📄 s3a.mdl
字号:
Model {
Name "s3a"
Version 2.00
SimParamPage Solver
SampleTimeColors off
WideVectorLines off
PaperOrientation landscape
StartTime "0.0"
StopTime "10"
Solver ode15s
RelTol "1e-6"
AbsTol "1e-6"
Refine "1"
MaxStep "0.01"
InitialStep "auto"
FixedStep "auto"
MaxOrder 3
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
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
}
System {
Name "s3a"
Location [41, 64, 763, 444]
Open on
ScreenColor white
Block {
BlockType SubSystem
Name "."
Position [375, 106, 390, 139]
ShowPortLabels off
MaskType "Dot Product"
MaskDescription "Inner (dot) product.\ny=sum(u1.*u2)"
MaskHelp "Computes the inner (dot) product of the inputs: "
"sum(u1.*u2). The inputs are vectors of the "
"same length. Output is a scalar."
MaskDisplay "disp('.\\n')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "."
Location [33, 479, 253, 634]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_1"
Position [15, 25, 35, 45]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_2"
Position [15, 90, 35, 110]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Product
Name "Product"
Position [65, 55, 90, 75]
Inputs "2"
}
Block {
BlockType Sum
Name "Sum"
Position [125, 55, 145, 75]
Inputs "+"
}
Block {
BlockType Outport
Name "out_1"
Position [185, 55, 205, 75]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
}
}
Block {
BlockType Gain
Name "1/J"
Position [495, 119, 540, 161]
Gain "1/J"
}
Block {
BlockType Gain
Name "1/Laq"
Position [170, 109, 215, 151]
Gain "1/Laq"
}
Block {
BlockType Switch
Name "C1"
Position [105, 208, 125, 272]
Orientation left
Threshold "0.5"
}
Block {
BlockType Switch
Name "C2"
Position [105, 296, 125, 364]
Orientation left
Threshold "0.5"
}
Block {
BlockType Clock
Name "Clock"
Position [416, 250, 434, 265]
Orientation down
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Location [30, 40, 140, 75]
}
Block {
BlockType Ground
Name "Grd"
Position [160, 214, 170, 226]
Orientation left
}
Block {
BlockType Integrator
Name "Integrator"
Position [245, 112, 275, 148]
ExternalReset none
InitialConditionSource internal
InitialCondition "Iarated"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "Integrator2"
Position [565, 122, 595, 158]
ExternalReset none
InitialConditionSource internal
InitialCondition "wmrated"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType SubSystem
Name "m3a"
Position [95, 20, 168, 50]
DropShadow on
OpenFcn "m3a"
ShowPortLabels off
MaskType "Masked block of m3a.m"
MaskHelp "Uses m3a.m to initialize and plot"
MaskDisplay "disp('Initialize\\nand plot')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "m3a"
Location [20, 197, 328, 323]
Open off
ScreenColor white
Annotation {
Position [152, 52]
VerticalAlignment top
Text "Uses m3a.m to initialize and plot\nresults "
"of S3.m"
}
}
}
Block {
BlockType Mux
Name "Mux"
Position [397, 280, 673, 300]
Orientation down
Inputs "5"
}
Block {
BlockType SubSystem
Name "Product2"
Position [240, 50, 260, 90]
Orientation left
ShowPortLabels off
MaskType "Dot Product"
MaskDescription "Inner (dot) product.\ny=sum(u1.*u2)"
MaskHelp "Computes the inner (dot) product of the inputs: "
"sum(u1.*u2). The inputs are vectors of the "
"same length. Output is a scalar."
MaskDisplay "disp('.\\n')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "Product2"
Location [33, 479, 253, 634]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_1"
Position [15, 25, 35, 45]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_2"
Position [15, 90, 35, 110]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Product
Name "Product"
Position [65, 55, 90, 75]
Inputs "2"
}
Block {
BlockType Sum
Name "Sum"
Position [125, 55, 145, 75]
Inputs "+"
}
Block {
BlockType Outport
Name "out_1"
Position [185, 55, 205, 75]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
}
}
Block {
BlockType Gain
Name "Ra"
Position [220, 173, 255, 207]
Orientation left
Gain "Ra"
}
Block {
BlockType Gain
Name "Rext"
Position [190, 245, 250, 275]
Orientation left
Gain "Rext"
}
Block {
BlockType Scope
Name "Scope"
Position [460, 324, 480, 346]
Orientation left
Floating off
Location [29, 404, 763, 568]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "10"
YMin "-300"
YMax "300"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows off
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Position [120, 90, 135, 170]
Inputs "-+--"
}
Block {
BlockType Sum
Name "Sum2"
Position [450, 114, 465, 161]
Inputs "+-"
}
Block {
BlockType Step
Name "Timing\nmotoring2braking"
Position [305, 319, 340, 341]
Orientation left
Time "1"
Before "1"
After "0"
}
Block {
BlockType Fcn
Name "Tload"
Position [450, 178, 605, 202]
Orientation left
Expr "0.01 + 3.189e-4*u[1]^2"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [580, 324, 630, 346]
VariableName "y"
Buffer "1000"
Decimation "1"
SampleTime "0"
}
Block {
BlockType Constant
Name "Va_braking"
Position [170, 343, 250, 357]
Orientation left
Value "Vbrake"
}
Block {
BlockType Constant
Name "Va_motoring"
Position [170, 303, 250, 317]
Orientation left
Value "Vrated"
}
Block {
BlockType Constant
Name "kaphi"
Position [365, 69, 415, 91]
Orientation left
Value "0.6699"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "1/Laq"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "1/J"
DstPort 1
}
Line {
SrcBlock "1/J"
SrcPort 1
DstBlock "Integrator2"
DstPort 1
}
Line {
SrcBlock "1/Laq"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "."
DstPort 2
}
Branch {
Points [40, 0; 0, 110; 160, 0]
DstBlock "Mux"
DstPort 2
}
Branch {
Points [40, 0; 0, 60]
DstBlock "Ra"
DstPort 1
}
Branch {
Points [40, 0; 0, 130]
DstBlock "Rext"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 30]
DstBlock "To Workspace"
DstPort 1
}
Branch {
Points [0, 30]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Rext"
SrcPort 1
DstBlock "C1"
DstPort 3
}
Line {
SrcBlock "kaphi"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Product2"
DstPort 2
}
Branch {
Points [-15, 0; 0, 35]
DstBlock "."
DstPort 1
}
}
Line {
SrcBlock "Ra"
SrcPort 1
Points [-120, 0; 0, -30]
DstBlock "Sum"
DstPort 4
}
Line {
SrcBlock "C1"
SrcPort 1
Points [-15, 0; 0, -100]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Va_motoring"
SrcPort 1
DstBlock "C2"
DstPort 1
}
Line {
SrcBlock "Va_braking"
SrcPort 1
DstBlock "C2"
DstPort 3
}
Line {
SrcBlock "C2"
SrcPort 1
Points [-25, 0; 0, -210]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Product2"
SrcPort 1
Points [0, 0]
Branch {
Points [-155, 0; 0, 30]
DstBlock "Sum"
DstPort 1
}
Branch {
Points [-10, 0; 0, -35; 420, 0]
DstBlock "Mux"
DstPort 5
}
}
Line {
SrcBlock "Integrator2"
SrcPort 1
Points [0, 0]
Branch {
Points [25, 0; 0, -80]
DstBlock "Product2"
DstPort 1
}
Branch {
Points [25, 0; 0, 105; -35, 0]
DstBlock "Mux"
DstPort 4
}
Branch {
Points [25, 0; 0, 50]
DstBlock "Tload"
DstPort 1
}
}
Line {
SrcBlock "Timing\nmotoring2braking"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "C2"
DstPort 2
}
Branch {
Points [-15, 0; 0, -90]
DstBlock "C1"
DstPort 2
}
}
Line {
SrcBlock "."
SrcPort 1
Points [0, 0]
Branch {
Points [15, 0; 0, 105; 125, 0]
DstBlock "Mux"
DstPort 3
}
Branch {
DstBlock "Sum2"
DstPort 1
}
}
Line {
SrcBlock "Tload"
SrcPort 1
Points [-20, 0; 0, -40]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Grd"
SrcPort 1
DstBlock "C1"
DstPort 1
}
Annotation {
Position [197, 53]
VerticalAlignment top
Text "Ea"
}
Annotation {
Position [607, 122]
VerticalAlignment top
Text "wm"
}
Annotation {
Position [412, 112]
VerticalAlignment top
Text "Tem"
}
Annotation {
Position [307, 117]
VerticalAlignment top
Text "Ia"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -