📄 demo_exakt_nestab.mdl
字号:
Model {
Name "demo_exakt_nestab"
Version 2.20
SimParamPage Solver
SampleTimeColors off
InvariantConstants off
WideVectorLines on
ShowLineWidths off
StartTime "0.0"
StopTime "15.0"
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
CloseFcn ";slview('closediagram',bdroot);"
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_exakt_nestab"
Location [2, 74, 592, 460]
Open on
ToolBar on
StatusBar on
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType Step
Name " Desired value"
Position [20, 85, 50, 115]
Orientation down
Time "5"
Before "2"
After "10"
}
Block {
BlockType Reference
Name "Compensation of\nnonlinearities"
Ports [2, 1, 0, 0, 0]
Position [200, 149, 275, 191]
DropShadow on
SourceBlock "NelinSys/Nonlinear Systems Synthesis/Exact Line"
"arization Blocks/Linearizing control law\nfor SISO systems"
SourceType "Linearizing control law for SISO systems"
n "4"
vzorec "-1275185191261904181/1801439850948198400*sin(2*"
"x3)-100090988508834477/1801439850948198400*x4*sin(x3)+19314281477129185/18014"
"398509481984*v-1299882967647201/18014398509481984*v*cos(2*x3)"
vzorecP "0"
}
Block {
BlockType Reference
Name "Controlled system"
Ports [1, 2, 0, 0, 0]
Position [320, 130, 450, 205]
DropShadow on
SourceBlock "NelinSys/Nonlinear Systems Synthesis/Nonlinear "
"SISO system\n(State-Space model)"
SourceType "Nonlinear SISO system - state-space model"
n "4"
F "[x2; (1275185191261904181/900719925474099200*si"
"n(x3)*cos(x3)+100090988508834477/1801439850948198400*x4*sin(x3))/(10307082222"
"388193/9007199254740992-1299882967647201/9007199254740992*cos(x3)^2); x4; (-1"
"0111247660162817333/900719925474099200*sin(x3)-100090988508834477/18014398509"
"48198400*x4*cos(x3)*sin(x3))/(793645331123890861/1801439850948198400-10009098"
"8508834477/1801439850948198400*cos(x3)^2)]"
Fp "0"
G "[0; 1/(10307082222388193/9007199254740992-12998"
"82967647201/9007199254740992*cos(x3)^2); 0; -cos(x3)/(793645331123890861/1801"
"439850948198400-100090988508834477/1801439850948198400*cos(x3)^2)]"
Gp "0"
H "x1"
Hp "0"
pp "[0 0 0 0]'"
}
Block {
BlockType Reference
Name "Linear controller"
Ports [2, 1, 0, 0, 0]
Position [65, 134, 150, 181]
DropShadow on
SourceBlock "NelinSys/Nonlinear Systems Synthesis/Exact Line"
"arization Blocks/Linear controller\nfor SISO systems"
SourceType "State-space controller for an \"r-integrator\" "
"SISO system"
r "2"
kor "[-2 -2 -6]"
integ on
}
Block {
BlockType Reference
Name "State-coordinates transformation"
Ports [1, 1, 0, 0, 0]
Position [365, 325, 425, 355]
Orientation left
DropShadow on
SourceBlock "NelinSys/Nonlinear Systems Synthesis/Exact Line"
"arization Blocks/Coordinates transformation\nfor SISO systems"
SourceType "Coordinates transformation for SISO systems"
n "4"
r "2"
Z "[x1; x2]"
Zp "0"
}
Block {
BlockType Scope
Name "System\noutput"
Ports [1, 0, 0, 0, 0]
Position [535, 135, 565, 165]
Floating off
Location [515, 30, 795, 263]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "15 "
YMin "0 "
YMax "10 "
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "System\nstates"
Ports [1, 0, 0, 0, 0]
Position [535, 265, 565, 295]
Floating off
Location [515, 290, 795, 521]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "15 "
YMin "-20 "
YMax "60 "
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Line {
SrcBlock "Linear controller"
SrcPort 1
DstBlock "Compensation of\nnonlinearities"
DstPort 1
}
Line {
SrcBlock " Desired value"
SrcPort 1
Points [0, 25]
DstBlock "Linear controller"
DstPort 1
}
Line {
SrcBlock "State-coordinates transformation"
SrcPort 1
Points [-325, 0; 0, -170]
DstBlock "Linear controller"
DstPort 2
}
Line {
SrcBlock "Controlled system"
SrcPort 2
Points [50, 0; 0, 95]
Branch {
Points [0, 60]
DstBlock "State-coordinates transformation"
DstPort 1
}
Branch {
Points [-340, 0; 0, -100]
DstBlock "Compensation of\nnonlinearities"
DstPort 2
}
Branch {
DstBlock "System\nstates"
DstPort 1
}
}
Line {
SrcBlock "Controlled system"
SrcPort 1
DstBlock "System\noutput"
DstPort 1
}
Line {
SrcBlock "Compensation of\nnonlinearities"
SrcPort 1
DstBlock "Controlled system"
DstPort 1
}
Annotation {
Position [231, 267]
Text "LINEARIZATION LOOP"
}
Annotation {
Position [86, 327]
Text "CONTROL LOOP"
}
Annotation {
Position [301, 37]
Text "Exact linearization of a SISO system - demo sim"
"ulation"
FontSize 14
FontWeight bold
}
Annotation {
Position [296, 57]
Text "An example of a system with unstable zero dynam"
"ics"
FontSize 14
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -