📄 fdctools.mdl
字号:
Library {
Name "fdctools"
Version 3.00
BlockDataTips off
BlockParametersDataTip off
BlockAttributesDataTip off
BlockPortWidthsDataTip off
BlockDescriptionStringDataTip off
BlockMaskParametersDataTip off
ToolBar off
StatusBar off
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Wed Mar 26 16:49:56 2003"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "Dutchroll"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Tue May 13 21:04:32 2003"
ModelVersionFormat "1.%<AutoIncrement:18>"
ConfigurationManager "none"
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "fdctools"
Location [31, 57, 521, 287]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Block Fcn"
Ports [0, 1, 0, 0, 0]
Position [25, 35, 55, 65]
FontName "Arial"
FontSize 11
ShowPortLabels off
MaskType "Block Fcn"
MaskDescription "Block Function"
MaskHelp "This block implements a block signal.<br><br>\n"
"Parameters:\n<li>the initial (=final) value of the signal,\n<li>the amplitude"
" of the block (positive = upwards, negative = downwards), \n<li>the start tim"
"e, and\n<li>the stop time (which must be later than the start time)."
MaskPromptString "Initial value (=final value):|Amplitude of bloc"
"k (+ = step up, - = step down):|Start time of block:|Stop time of block:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "yinit=@1;yblock=@2;tstart=@3;tstop=@4;"
MaskDisplay "plot(0,0,100,100,[100,60,60,20,20,0],[50,50,89,"
"89,50,50])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "-1|2|1|4"
System {
Name "Block Fcn"
Location [24, 56, 225, 197]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Step
Name "End block"
Position [35, 55, 55, 75]
FontName "Arial"
FontSize 11
Time "tstop"
Before "0"
After "-yblock"
SampleTime "0"
}
Block {
BlockType Constant
Name "Initial value"
Position [25, 95, 65, 115]
FontName "Arial"
FontSize 11
Value "yinit"
}
Block {
BlockType Step
Name "Start block"
Position [35, 15, 55, 35]
FontName "Arial"
FontSize 11
Time "tstart"
Before "0"
After "yblock"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1, 0, 0, 0]
Position [100, 46, 115, 84]
ShowName off
FontName "Arial"
FontSize 11
IconShape "rectangular"
Inputs "+++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out"
Position [150, 58, 180, 72]
FontSize 11
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Initial value"
SrcPort 1
Points [10, 0; 0, -30]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Start block"
SrcPort 1
Points [20, 0; 0, 30]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "End block"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Doublet"
Ports [0, 1, 0, 0, 0]
Position [25, 85, 55, 115]
FontName "Arial"
FontSize 11
ShowPortLabels off
MaskType "Doublet"
MaskDescription "Doublet signal."
MaskHelp "This block implements a doublet signal:<br><br>"
"\ny = y1 if (tstart <= t < tstart+dt1), <br><br>\ny = y2 if (tstart+dt1 <= "
"t < tstart+dt1+dt2), <br><br>\ny = ystart = yfinal if (t < tstart) or (t > ts"
"tart+dt1+dt2).<br><br>\nwhere tstart is the start time, dt1 is the length of "
"the first time-interval and dt2 is the length of the second time-interval."
MaskPromptString "Start time [sec]:|Length of time interval 1 [se"
"c]:|Length of time interval 2 [sec]:|y1:|y2:|y start (= y final):"
MaskStyleString "edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on"
MaskCallbackString "|||||"
MaskEnableString "on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on"
MaskVariables "ts1=@1;dt1=@2;dt2=@3;y1=@4;y2=@5;cnst=@6;"
MaskDisplay "plot([0 1 1 2.5 2.5 4 4 5],[0 0 1 1 -1.5 -1.5 0"
" 0])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1|1|1|1|-1|0"
System {
Name "Doublet"
Location [10, 66, 214, 245]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Constant
Name "Const."
Position [20, 135, 50, 155]
FontName "Arial"
FontSize 11
Value "cnst"
}
Block {
BlockType Sum
Name "Sum"
Ports [4, 1, 0, 0, 0]
Position [115, 45, 130, 100]
ShowName off
FontName "Arial"
FontSize 11
IconShape "rectangular"
Inputs "++++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Step
Name "step1"
Position [25, 15, 45, 35]
FontName "Arial"
FontSize 11
Time "ts1"
Before "0"
After "y1-cnst"
SampleTime "0"
}
Block {
BlockType Step
Name "step2"
Position [25, 55, 45, 75]
FontName "Arial"
FontSize 11
Time "ts1+dt1"
Before "0"
After "-y1+y2"
SampleTime "0"
}
Block {
BlockType Step
Name "step3"
Position [25, 95, 45, 115]
FontName "Arial"
FontSize 11
Time "ts1+dt1+dt2"
Before "0"
After "-y2+cnst"
SampleTime "0"
}
Block {
BlockType Outport
Name "Out"
Position [155, 68, 185, 82]
FontSize 11
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Const."
SrcPort 1
Points [40, 0; 0, -50]
DstBlock "Sum"
DstPort 4
}
Line {
SrcBlock "step1"
SrcPort 1
Points [25, 0; 0, 25]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "step2"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "step3"
SrcPort 1
Points [25, 0; 0, -25]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "MA-filter"
Ports [1, 1, 0, 0, 0]
Position [245, 31, 295, 69]
ShowName off
FontName "Arial"
FontSize 11
ShowPortLabels on
MaskType "Moving Average filter"
MaskDescription "Digital Moving Average filter"
MaskHelp "Digital Moving Average filter.<br><br>\ny(k) = "
"1/ns * (u(k) + u(k-1) + ... + u(k-ns)),<br><br>\nwhere ns is the number of sa"
"mples for averaging (to be specified by the user). "
MaskPromptString "Number of samples for averaging:|Sample time:|I"
"nitial value of input signal:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskVariables "ns=@1;Ts=@2;uinit=@3;"
MaskInitialization "Ama=[zeros(1,ns);[eye(ns-1) zeros(ns-1,1)]]; Bm"
"a=[1; zeros(ns-1,1)]; Cma=1/ns*ones(1,ns); Dma=0; xinit=uinit*ones(ns,1);"
MaskDisplay "disp('Moving\\nAverage')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "5|0.1|0"
System {
Name "MA-filter"
Location [24, 54, 305, 147]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "In2"
Position [15, 38, 45, 52]
FontSize 11
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType DiscreteStateSpace
Name "MA-filter"
Position [70, 25, 205, 65]
FontName "Arial"
FontSize 11
A "Ama"
B "Bma"
C "Cma"
D "Dma"
X0 "xinit"
SampleTime "Ts"
}
Block {
BlockType Outport
Name "Out2"
Position [230, 38, 260, 52]
FontSize 11
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "MA-filter"
DstPort 1
}
Line {
SrcBlock "MA-filter"
SrcPort 1
DstBlock "Out2"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "On/off switch"
Ports [2, 1, 0, 0, 0]
Position [175, 32, 210, 68]
FontName "Arial"
FontSize 11
ShowPortLabels off
MaskType "On/off switch"
MaskDescription " If input(1) = 1 \n output = input(2) \n el"
"se if input(1) = 0\n output = 0"
MaskHelp "On/off switch. If the first input signal is equ"
"al to 1, the second input signal will be sent to the output port. Else, if th"
"e first input signal is equal to zero, the output signal will be zero.<br><br"
">\n\nNote: for other values of the first input signal, the resulting output w"
"ill be unpredictable!"
MaskDisplay "plot(0,0,100,100,[31,31,32,34,34,32,31,31,0],[5"
"0,48,47,48,51,53,51,50,50],[100,75,51],[50,50,97]);disp('?')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "On/off switch"
Location [21, 51, 272, 238]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "Crit"
Position [15, 53, 45, 67]
FontSize 11
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Inport
Name "In"
Position [15, 13, 45, 27]
FontSize 11
Port "2"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1, 0, 0, 0]
Position [85, 75, 100, 95]
ShowName off
FontName "Arial"
FontSize 11
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Switch
Name "Switch"
Position [150, 69, 175, 101]
FontName "Arial"
FontSize 11
Threshold "0"
}
Block {
BlockType Constant
Name "const."
Position [20, 100, 45, 120]
FontName "Arial"
FontSize 11
Value "0.5"
}
Block {
BlockType Constant
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -