📄 fdctools.mdl
字号:
Model {
Name "fdctools"
Version 2.09
SimParamPage Solver
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths off
PaperOrientation landscape
PaperType usletter
PaperUnits inches
StartTime "0.0"
StopTime "999999"
Solver ode45
RelTol "1e-3"
AbsTol "1e-3"
Refine "1"
MaxStep "10"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption RefineOutputTimes
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime off
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput off
OutputSaveName "yout"
LoadInitialState off
InitialState "xInitial"
SaveFinalState off
FinalStateName "xFinal"
LimitMaxRows off
MaxRows "1000"
Decimation "1"
AlgebraicLoopMsg warning
MinStepSizeMsg warning
UnconnectedInputMsg warning
UnconnectedOutputMsg warning
UnconnectedLineMsg warning
ConsistencyChecking off
ZeroCross on
SimulationMode normal
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_vc.tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
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 [8, 44, 517, 307]
Open on
ScreenColor white
Block {
BlockType SubSystem
Name "6-switch"
Ports [7, 1, 0, 0, 0]
Position [210, 86, 280, 154]
FontName "Arial"
FontSize 11
ShowPortLabels off
MaskDisplay "disp('6 switch:\\ny=u(u[1]+1)')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
System {
Name "6-switch"
Location [4, 42, 443, 419]
Open off
ScreenColor white
Block {
BlockType Inport
Name "Which\ninput?"
Position [30, 65, 50, 85]
ForegroundColor red
DropShadow on
FontName "Arial"
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "u1"
Position [195, 85, 215, 105]
DropShadow on
FontName "Arial"
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "u2"
Position [195, 135, 215, 155]
DropShadow on
FontName "Arial"
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "u3"
Position [195, 185, 215, 205]
DropShadow on
FontName "Arial"
Port "4"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "u4"
Position [195, 235, 215, 255]
DropShadow on
FontName "Arial"
Port "5"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "u5"
Position [195, 285, 215, 305]
DropShadow on
FontName "Arial"
Port "6"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "u6"
Position [195, 335, 215, 355]
DropShadow on
FontName "Arial"
Port "7"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Fcn
Name "1"
Position [95, 65, 150, 85]
ForegroundColor red
FontName "Arial"
ShowName off
Expr "u[1]==1"
}
Block {
BlockType Fcn
Name "2"
Position [95, 115, 150, 135]
ForegroundColor red
FontName "Arial"
ShowName off
Expr "u[1]==2"
}
Block {
BlockType Fcn
Name "3"
Position [95, 165, 150, 185]
ForegroundColor red
FontName "Arial"
ShowName off
Expr "u[1]==3"
}
Block {
BlockType Fcn
Name "4"
Position [95, 215, 150, 235]
ForegroundColor red
FontName "Arial"
ShowName off
Expr "u[1]==4"
}
Block {
BlockType Fcn
Name "5"
Position [95, 265, 150, 285]
ForegroundColor red
FontName "Arial"
ShowName off
Expr "u[1]==5"
}
Block {
BlockType Fcn
Name "6"
Position [95, 315, 150, 335]
ForegroundColor red
FontName "Arial"
ShowName off
Expr "u[1]==6"
}
Block {
BlockType Sum
Name "Sum"
Ports [6, 1, 0, 0, 0]
Position [340, 59, 355, 351]
FontName "Arial"
ShowName off
Inputs "++++++"
}
Block {
BlockType Product
Name "prod1"
Ports [2, 1, 0, 0, 0]
Position [250, 70, 270, 90]
FontName "Arial"
ShowName off
Inputs "2"
}
Block {
BlockType Product
Name "prod2"
Ports [2, 1, 0, 0, 0]
Position [250, 120, 270, 140]
FontName "Arial"
ShowName off
Inputs "2"
}
Block {
BlockType Product
Name "prod3"
Ports [2, 1, 0, 0, 0]
Position [250, 170, 270, 190]
FontName "Arial"
ShowName off
Inputs "2"
}
Block {
BlockType Product
Name "prod4"
Ports [2, 1, 0, 0, 0]
Position [250, 220, 270, 240]
FontName "Arial"
ShowName off
Inputs "2"
}
Block {
BlockType Product
Name "prod5"
Ports [2, 1, 0, 0, 0]
Position [250, 270, 270, 290]
FontName "Arial"
ShowName off
Inputs "2"
}
Block {
BlockType Product
Name "prod6"
Ports [2, 1, 0, 0, 0]
Position [250, 320, 270, 340]
FontName "Arial"
ShowName off
Inputs "2"
}
Block {
BlockType Outport
Name "y"
Position [390, 195, 410, 215]
DropShadow on
FontName "Arial"
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "Which\ninput?"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "1"
DstPort 1
}
Branch {
Points [0, 50]
Branch {
DstBlock "2"
DstPort 1
}
Branch {
Points [0, 50]
Branch {
DstBlock "3"
DstPort 1
}
Branch {
Points [0, 50]
Branch {
DstBlock "4"
DstPort 1
}
Branch {
Points [0, 50]
Branch {
DstBlock "5"
DstPort 1
}
Branch {
Points [0, 50]
DstBlock "6"
DstPort 1
}
}
}
}
}
}
Line {
SrcBlock "u1"
SrcPort 1
DstBlock "prod1"
DstPort 2
}
Line {
SrcBlock "prod1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "1"
SrcPort 1
DstBlock "prod1"
DstPort 1
}
Line {
SrcBlock "u2"
SrcPort 1
DstBlock "prod2"
DstPort 2
}
Line {
SrcBlock "prod2"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "2"
SrcPort 1
DstBlock "prod2"
DstPort 1
}
Line {
SrcBlock "u3"
SrcPort 1
DstBlock "prod3"
DstPort 2
}
Line {
SrcBlock "prod3"
SrcPort 1
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "3"
SrcPort 1
DstBlock "prod3"
DstPort 1
}
Line {
SrcBlock "u4"
SrcPort 1
DstBlock "prod4"
DstPort 2
}
Line {
SrcBlock "prod4"
SrcPort 1
DstBlock "Sum"
DstPort 4
}
Line {
SrcBlock "4"
SrcPort 1
DstBlock "prod4"
DstPort 1
}
Line {
SrcBlock "u5"
SrcPort 1
DstBlock "prod5"
DstPort 2
}
Line {
SrcBlock "prod5"
SrcPort 1
DstBlock "Sum"
DstPort 5
}
Line {
SrcBlock "5"
SrcPort 1
DstBlock "prod5"
DstPort 1
}
Line {
SrcBlock "u6"
SrcPort 1
DstBlock "prod6"
DstPort 2
}
Line {
SrcBlock "prod6"
SrcPort 1
DstBlock "Sum"
DstPort 6
}
Line {
SrcBlock "6"
SrcPort 1
DstBlock "prod6"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "y"
DstPort 1
}
Annotation {
Position [222, 12]
VerticalAlignment top
ForegroundColor red
FontName "Times New Roman"
FontSize 12
Text "This 6-switch was generated with the "
"Matlab program NSWITCH.M.\nTry running "
"this program yourself for any number "
"of input signals!"
}
}
}
Block {
BlockType SubSystem
Name "Block Fcn"
Ports [0, 1, 0, 0, 0]
Position [25, 31, 55, 59]
FontName "Arial"
FontSize 11
ShowPortLabels off
MaskType "Block Fcn"
MaskDescription "Block Function"
MaskHelp "This block implements a block signal.\\nDefine "
"the initial (=final) value, the\\namplitude "
"of the block (positive\\n= upwards, negative=dow"
"nwards),\\nthe start time, and the stop time "
"(must\\nbe smaller than the start time)."
MaskPromptString "Initial value (=final value):|Amplitude of "
"block (+ = step up, - = step down):|Start "
"time of block:|Stop time of block:"
MaskStyleString "edit,edit,edit,edit"
MaskInitialization "yinit=@1; yblock=@2; tstart=@3; tstop=@4;"
MaskDisplay "plot(0,0,100,100,[100,60,60,20,20,0],[50,50,89,8"
"9,50,50])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
MaskValueString "-1|2|1|4"
System {
Name "Block Fcn"
Location [4, 60, 241, 187]
Open off
ScreenColor white
Block {
BlockType Step
Name "End block"
Position [40, 45, 60, 65]
FontName "Arial"
FontSize 9
Time "tstop"
Before "0"
After "-yblock"
}
Block {
BlockType Constant
Name "Initial value"
Position [40, 85, 80, 105]
FontName "Arial"
FontSize 9
Value "yinit"
}
Block {
BlockType Step
Name "Start block"
Position [40, 5, 60, 25]
FontName "Arial"
FontSize 9
Time "tstart"
Before "0"
After "yblock"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1, 0, 0, 0]
Position [115, 36, 130, 74]
FontName "Arial"
FontSize 9
ShowName off
Inputs "+++"
}
Block {
BlockType Outport
Name "block"
Position [165, 45, 185, 65]
DropShadow on
FontName "Arial"
FontSize 9
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "block"
DstPort 1
}
Line {
SrcBlock "Initial value"
SrcPort 1
Points [10, 0; 0, -30]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Start block"
SrcPort 1
Points [30, 0; 0, 30]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "End block"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Doublet"
Ports [0, 1, 0, 0, 0]
Position [20, 81, 60, 119]
FontName "Arial"
FontSize 11
ShowPortLabels off
MaskType "Doublet"
MaskDescription "Doublet signal."
MaskHelp "This block implements a \\ndoublet signal "
"according to: \\ny = y1 if \\n tstart <= "
"t < tstart+dt1 \\ny = y2 if \\n tstart+dt1 "
"<= t < tstart+dt1+dt2 \\ny = y start = y "
"final if \\n t < tstart or t > tstart+dt1+dt2."
MaskPromptString "Start time [sec]:|Length of time interval "
"1 [sec]:|Length of time interval 2 [sec]:|y1:|y2"
":|y start (= y final):"
MaskStyleString "edit,edit,edit,edit,edit,edit"
MaskInitialization "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 [4, 60, 241, 231]
Open off
ScreenColor white
Block {
BlockType Constant
Name "Const."
Position [25, 125, 55, 145]
FontName "Arial"
FontSize 9
Value "cnst"
}
Block {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -