📄 s060_elg.mdl
字号:
Name "Digital Clock"
Position [160, 75, 195, 105]
SampleTime "ts"
}
Block {
BlockType Constant
Name "Phase"
Position [400, 100, 420, 120]
Value "Ph"
VectorParams1D on
}
Block {
BlockType Gain
Name "Sensitivity"
Position [105, 15, 155, 45]
Gain "Kc"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Gain
Name "Sensitivity2"
Position [255, 75, 300, 105]
Gain "Fc"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Gain
Name "Sensitivity3"
Position [605, 30, 655, 60]
Gain "Ac"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [465, 27, 485, 63]
IconShape "rectangular"
Inputs "+++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [230, 25, 250, 45]
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [300, 25, 350, 45]
X0 "0"
SampleTime "ts"
RTWStateStorageClass "Auto"
}
Block {
BlockType Fcn
Name "sin"
Position [510, 32, 585, 58]
Expr "cos(u[1])"
}
Block {
BlockType Outport
Name "out_1"
Position [690, 35, 710, 55]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Sensitivity3"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "sin"
SrcPort 1
DstBlock "Sensitivity3"
DstPort 1
}
Line {
SrcBlock "Phase"
SrcPort 1
Points [10, 0; 0, -55]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 35; -165, 0; 0, -30]
DstBlock "Sum1"
DstPort 2
}
}
Line {
SrcBlock "Sensitivity2"
SrcPort 1
Points [120, 0; 0, -45]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Digital Clock"
SrcPort 1
DstBlock "Sensitivity2"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "sin"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Sensitivity"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Sensitivity"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "离散采样保持"
Ports [2, 1]
Position [415, 28, 485, 92]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "Discrete Sample and Hold"
MaskDisplay "disp('Discrete\\nSample\\nand Hold')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "离散采样保持"
Location [412, 193, 802, 363]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [25, 30, 45, 50]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "in_2"
Position [25, 90, 45, 110]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Reference
Name "Rising edge\ndetector1"
Ports [1, 1]
Position [65, 78, 145, 122]
SourceBlock "com_util/Rising edge\ndetector"
SourceType "Edge detection"
thld "0.5"
}
Block {
BlockType Switch
Name "Switch"
Position [180, 84, 210, 116]
ShowName off
Threshold ".5"
}
Block {
BlockType TransportDelay
Name "Transport\nDelay"
Position [80, 25, 120, 55]
ShowName off
DelayTime "tss/2"
InitialInput "0"
BufferSize "1024"
PadeOrder "0"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [235, 92, 285, 108]
ShowName off
X0 "0"
SampleTime "tss"
RTWStateStorageClass "Auto"
}
Block {
BlockType Outport
Name "out_1"
Position [340, 90, 360, 110]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Transport\nDelay"
SrcPort 1
Points [30, 0; 0, 50]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Transport\nDelay"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "out_1"
DstPort 1
}
Branch {
Points [0, 40; -145, 0; 0, -30]
DstBlock "Switch"
DstPort 3
}
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Rising edge\ndetector1"
DstPort 1
}
Line {
SrcBlock "Rising edge\ndetector1"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "离散采样保持1"
Ports [2, 1]
Position [405, 235, 455, 295]
NamePlacement "alternate"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "Discrete Sample and Hold"
MaskDisplay "disp('Discrete\\nSample\\nand Hold')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "离散采样保持1"
Location [414, 195, 804, 365]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [25, 30, 45, 50]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "in_2"
Position [25, 90, 45, 110]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Reference
Name "Rising edge\ndetector1"
Ports [1, 1]
Position [65, 78, 145, 122]
SourceBlock "com_util/Rising edge\ndetector"
SourceType "Edge detection"
thld "0.5"
}
Block {
BlockType Switch
Name "Switch"
Position [180, 84, 210, 116]
ShowName off
Threshold ".5"
}
Block {
BlockType TransportDelay
Name "Transport\nDelay"
Position [80, 25, 120, 55]
ShowName off
DelayTime "tss/2"
InitialInput "0"
BufferSize "1024"
PadeOrder "0"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [235, 92, 285, 108]
ShowName off
X0 "0"
SampleTime "tss"
RTWStateStorageClass "Auto"
}
Block {
BlockType Outport
Name "out_1"
Position [340, 90, 360, 110]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Rising edge\ndetector1"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Rising edge\ndetector1"
DstPort 1
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "out_1"
DstPort 1
}
Branch {
Points [0, 40; -145, 0; 0, -30]
DstBlock "Switch"
DstPort 3
}
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Transport\nDelay"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay"
SrcPort 1
Points [30, 0; 0, 50]
DstBlock "Switch"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "离散复位积分"
Ports [3, 1]
Position [275, 20, 350, 70]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "Discrete Resettable integrator"
MaskHelp "RESETTABLE INTEGRATOR The resettable integ"
"rator is a masked function. This block has same functionality as the built-in"
" RESET INTEGRATOR except that when input 2 is non-zero, the block stops integ"
"ration."
MaskDisplay "disp('Discrete\\nResettable\\nintegrator')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "离散复位积分"
Location [414, 195, 945, 393]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "data"
Position [65, 35, 85, 55]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "trigger"
Position [65, 95, 85, 115]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "reset value"
Position [65, 140, 85, 160]
Port "3"
LatchInput off
Interpolate on
}
Block {
BlockType Ground
Name "Ground_1"
Position [115, 80, 125, 90]
ShowName off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [185, 30, 205, 50]
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Switch
Name "Switch1"
Position [240, 54, 265, 86]
Threshold "eps"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [290, 62, 340, 78]
X0 "0"
SampleTime "tss"
RTWStateStorageClass "Auto"
}
Block {
BlockType RelationalOperator
Name "equal"
Position [140, 69, 170, 91]
Operator "=="
}
Block {
BlockType Outport
Name "integrated\n output"
Position [435, 60, 455, 80]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -