📄 demo_gs1.mdl
字号:
Model {
Name "demo_gs1"
Version 2.20
SimParamPage Solver
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths off
StartTime "0.0"
StopTime "30"
Solver ode45
RelTol "1e-3"
AbsTol "1e-6"
Refine "1"
MaxStep "0.1"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption RefineOutputTimes
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
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
RTWPlaceOutputsASAP off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_default_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 "demo_gs1"
Location [2, 70, 596, 490]
Open on
ToolBar on
StatusBar on
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType Reference
Name " Controlled system "
Ports [1, 2, 0, 0, 0]
Position [255, 250, 385, 325]
DropShadow on
SourceBlock "NelinSys/Nonlinear Systems Synthesis/Nonlinear "
"SISO system\n(State-Space model)"
SourceType "Nonlinear SISO system - state-space model"
n "2"
F "[-sqrt(x1); sqrt(x1)-sqrt(x2)]"
Fp "0"
G "[1; 0]"
Gp "0"
H "x2"
Hp "0"
pp "[0.1; 0.01]"
}
Block {
BlockType Reference
Name "Controlled system"
Ports [1, 2, 0, 0, 0]
Position [255, 115, 385, 190]
DropShadow on
SourceBlock "NelinSys/Nonlinear Systems Synthesis/Nonlinear "
"SISO system\n(State-Space model)"
SourceType "Nonlinear SISO system - state-space model"
n "2"
F "[-sqrt(x1); sqrt(x1)-sqrt(x2)]"
Fp "0"
G "[1; 0]"
Gp "0"
H "x2"
Hp "0"
pp "[0.1; 0.01]"
}
Block {
BlockType SubSystem
Name "Desired\nvalue "
Ports [0, 1, 0, 0, 0]
Position [25, 125, 55, 155]
ShowPortLabels on
System {
Name "Desired\nvalue "
Location [119, 49, 441, 484]
Open off
ToolBar off
StatusBar off
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType Step
Name "0s"
Position [40, 35, 70, 65]
Time "0"
Before "0"
After "1"
}
Block {
BlockType Step
Name "10s"
Position [40, 165, 70, 195]
Time "10"
Before "0"
After "1"
}
Block {
BlockType Step
Name "15s"
Position [40, 230, 70, 260]
Time "15"
Before "0"
After "1"
}
Block {
BlockType Step
Name "20s"
Position [40, 295, 70, 325]
Time "20"
Before "0"
After "1"
}
Block {
BlockType Step
Name "25s"
Position [40, 360, 70, 390]
Time "25"
Before "0"
After "-1"
}
Block {
BlockType Step
Name "5s"
Position [40, 100, 70, 130]
Time "5"
Before "0"
After "1"
}
Block {
BlockType Sum
Name "Sum"
Ports [6, 1, 0, 0, 0]
Position [185, 23, 210, 402]
ShowName off
Inputs "++++++"
}
Block {
BlockType Outport
Name "w"
Position [270, 208, 300, 222]
Port "1"
OutputWhenDisabled held
InitialOutput "[]"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "w"
DstPort 1
}
Line {
SrcBlock "25s"
SrcPort 1
DstBlock "Sum"
DstPort 6
}
Line {
SrcBlock "20s"
SrcPort 1
DstBlock "Sum"
DstPort 5
}
Line {
SrcBlock "15s"
SrcPort 1
DstBlock "Sum"
DstPort 4
}
Line {
SrcBlock "10s"
SrcPort 1
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "5s"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "0s"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Input scheduling"
Ports [2, 1, 0, 0, 0]
Position [125, 129, 205, 176]
DropShadow on
SourceBlock "NelinSys/Nonlinear Systems Synthesis/Gain Sched"
"uling Blocks/State-space gain-scheduling\ncontroller for SISO systems"
SourceType "State-space gain-scheduling controller for SISO"
" systems"
n "2"
vzorec "-(-w^(1/2)+4*w)/w*x1+4*w+1/2*(-w^(1/2)+8*w-16*w"
"^(3/2))/w*(x2-w)"
vzorecP "0"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1, 0, 0, 0]
Position [500, 115, 505, 155]
BackgroundColor black
ShowName off
Inputs "3"
}
Block {
BlockType Reference
Name "Output scheduling"
Ports [2, 1, 0, 0, 0]
Position [130, 264, 210, 311]
DropShadow on
SourceBlock "NelinSys/Nonlinear Systems Synthesis/Gain Sched"
"uling Blocks/State-space gain-scheduling\ncontroller for SISO systems"
SourceType "State-space gain-scheduling controller for SISO"
" systems"
n "2"
vzorec "-(-x2^(1/2)+4*x2)/x2*x1+8*x2^(1/2)*(w-x2)+4*x2"
vzorecP "0"
}
Block {
BlockType Scope
Name "System\noutput"
Ports [1, 0, 0, 0, 0]
Position [535, 120, 565, 150]
Floating off
Location [493, 30, 795, 229]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "30 "
YMin "0 "
YMax "5 "
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "System\nstates\n(input sch.)"
Ports [1, 0, 0, 0, 0]
Position [535, 205, 565, 235]
Floating off
Location [497, 221, 795, 410]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "30 "
YMin "0 "
YMax "8 "
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "System\nstates\n(output sch.)"
Ports [1, 0, 0, 0, 0]
Position [535, 340, 565, 370]
Floating off
Location [494, 405, 795, 594]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "30 "
YMin "0 "
YMax "8 "
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "System\noutput"
DstPort 1
}
Line {
SrcBlock "Desired\nvalue "
SrcPort 1
Points [20, 0]
Branch {
Points [0, -45; 405, 0]
DstBlock "Mux"
DstPort 1
}
Branch {
Points [0, 0]
Branch {
DstBlock "Input scheduling"
DstPort 1
}
Branch {
Points [0, 135]
DstBlock "Output scheduling"
DstPort 1
}
}
}
Line {
SrcBlock "Controlled system"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Input scheduling"
SrcPort 1
DstBlock "Controlled system"
DstPort 1
}
Line {
SrcBlock "Controlled system"
SrcPort 2
Points [30, 0; 0, 50]
Branch {
DstBlock "System\nstates\n(input sch.)"
DstPort 1
}
Branch {
Points [-320, 0; 0, -55]
DstBlock "Input scheduling"
DstPort 2
}
}
Line {
SrcBlock "Output scheduling"
SrcPort 1
DstBlock " Controlled system "
DstPort 1
}
Line {
SrcBlock " Controlled system "
SrcPort 1
Points [95, 0]
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock " Controlled system "
SrcPort 2
Points [30, 0; 0, 50]
Branch {
Points [-315, 0; 0, -55]
DstBlock "Output scheduling"
DstPort 2
}
Branch {
DstBlock "System\nstates\n(output sch.)"
DstPort 1
}
}
Annotation {
Position [281, 37]
Text "Gain Scheduling control of a SISO system - demo"
" simulation"
FontSize 14
FontWeight bold
}
Annotation {
Position [281, 57]
Text "\"2 tanks without interaction\" system, input a"
"nd output scheduling"
FontSize 14
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -