📄 nonlinear_car_sub1.mdl
字号:
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "-1"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "nonlinear_car_sub1"
Location [84, 125, 755, 520]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Car's subsystem"
Ports [2, 1]
Position [215, 65, 255, 125]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
Port {
PortNumber 1
Name "x'"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
System {
Name "Car's subsystem"
Location [159, 123, 742, 382]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [45, 100, 75, 114]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [485, 170, 515, 184]
Orientation "left"
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Fcn
Name "Fh"
Position [410, 200, 470, 230]
Orientation "left"
Expr "30*sin(0.0001*u)"
Port {
PortNumber 1
Name "Fh"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Fcn
Name "Fw"
Position [335, 150, 395, 180]
Orientation "left"
Expr "0.001*(u[1]+20*sin(0.01*u[2]))^2"
Port {
PortNumber 1
Name "Fw"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Gain
Name "Gain"
Position [340, 75, 390, 105]
Gain "0.01"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "x''"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [425, 75, 455, 105]
IgnoreLimit off
Port {
PortNumber 1
Name "x'"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [505, 75, 535, 105]
IgnoreLimit off
Port {
PortNumber 1
Name "x"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType MinMax
Name "Low Limits"
Ports [2, 1]
Position [215, 23, 245, 107]
Function "max"
Inputs "2"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Max Brake"
Position [155, 30, 185, 60]
Value "-2000"
}
Block {
BlockType Constant
Name "Max Thrust"
Position [25, 50, 55, 80]
Value "1000"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [455, 146, 460, 184]
Orientation "left"
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [285, 52, 305, 128]
ShowName off
Inputs "+--"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType MinMax
Name "Up Limits"
Ports [2, 1]
Position [100, 43, 130, 127]
Function "min"
Inputs "2"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [465, 55, 495, 70]
Orientation "up"
IconDisplay "Port number"
}
Line {
Name "Fh"
Labels [3, 0]
SrcBlock "Fh"
SrcPort 1
Points [-145, 0; 0, -125]
DstBlock "Sum"
DstPort 2
}
Line {
Name "Fw"
Labels [2, 1]
SrcBlock "Fw"
SrcPort 1
Points [-60, 0]
DstBlock "Sum"
DstPort 3
}
Line {
Name "x"
Labels [0, 0]
SrcBlock "Integrator1"
SrcPort 1
Points [15, 0; 0, 125]
DstBlock "Fh"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [-40, 0]
DstBlock "Fw"
DstPort 1
}
Line {
Name "x'"
Labels [0, 0]
SrcBlock "Integrator"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
Points [10, 0]
DstBlock "Integrator1"
DstPort 1
}
Branch {
Points [0, 65]
DstBlock "Mux"
DstPort 1
}
Branch {
DstBlock "Out1"
DstPort 1
}
}
Line {
Name "x''"
Labels [0, 0]
SrcBlock "Gain"
SrcPort 1
Points [0, 0]
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [15, 0]
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Low Limits"
SrcPort 1
Points [0, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Up Limits"
SrcPort 1
Points [65, 0]
DstBlock "Low Limits"
DstPort 2
}
Line {
SrcBlock "Max Brake"
SrcPort 1
Points [10, 0]
DstBlock "Low Limits"
DstPort 1
}
Line {
SrcBlock "Max Thrust"
SrcPort 1
Points [0, 0]
DstBlock "Up Limits"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0]
DstBlock "Up Limits"
DstPort 2
}
Line {
SrcBlock "In2"
SrcPort 1
Points [0, 0]
DstBlock "Mux"
DstPort 2
}
Annotation {
Name "Fe"
Position [263, 58]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType Clock
Name "Clock in"
Position [150, 100, 170, 120]
Decimation "10"
}
Block {
BlockType Constant
Name "Constant"
Position [200, 175, 230, 205]
Orientation "left"
}
Block {
BlockType SubSystem
Name "Control subsystem"
Ports [2, 1]
Position [80, 50, 120, 110]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Control subsystem"
Location [59, 304, 284, 418]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 40, 55, 54]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [25, 70, 55, 84]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "Ke"
Position [115, 45, 145, 75]
Gain "50"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "Fc"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [70, 29, 90, 91]
ShowName off
Inputs "-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [170, 55, 200, 69]
IconDisplay "Port number"
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [5, 0]
DstBlock "Ke"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
Name "Fc"
Labels [0, 0]
SrcBlock "Ke"
SrcPort 1
Points [0, 0]
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
Points [0, 0]
DstBlock "Sum1"
DstPort 2
}
}
}
Block {
BlockType Display
Name "Display"
Ports [1]
Position [415, 180, 505, 210]
Orientation "left"
Decimation "1"
Lockdown off
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [590, 179, 620, 211]
Floating off
Location [294, 251, 618, 490]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "55"
YMax "65"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Reference
Name "Slider Gain"
Ports [1, 1]
Position [110, 172, 175, 208]
Orientation "left"
SourceBlock "simulink/Math\nOperations/Slider\nGain"
SourceType "Slider Gain"
ShowPortLabels on
low "0"
gain "62.5"
high "100"
Port {
PortNumber 1
Name "xc'"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Line {
SrcBlock "Control subsystem"
SrcPort 1
DstBlock "Car's subsystem"
DstPort 1
}
Line {
Name "xc'"
Labels [0, 0]
SrcBlock "Slider Gain"
SrcPort 1
Points [-90, 0; 0, -95]
DstBlock "Control subsystem"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Slider Gain"
DstPort 1
}
Line {
SrcBlock "Clock in"
SrcPort 1
DstBlock "Car's subsystem"
DstPort 2
}
Line {
Name "x'"
SrcBlock "Car's subsystem"
SrcPort 1
Points [295, 0; 0, -80]
Branch {
Labels [1, 0]
Points [95, 0; 0, 135; -105, 0; 0, 45]
Branch {
DstBlock "Display"
DstPort 1
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
Branch {
Points [-540, 0; 0, 50]
DstBlock "Control subsystem"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -