📄 belka.mdl
字号:
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
IgnoreLimit off
ZeroCross on
}
Block {
BlockType Logic
Operator "AND"
Inputs "2"
AllPortsSameDT on
OutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
SampleTime "-1"
}
Block {
BlockType MATLABFcn
MATLABFcn "sin"
OutputDimensions "-1"
OutputSignalType "auto"
Output1D on
SampleTime "-1"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Scope
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
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"
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Trigonometry
Operator "sin"
OutputSignalType "auto"
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 "belka"
Location [2, 82, 1195, 754]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name "Constant"
Position [55, 175, 85, 205]
Value "pi/2"
}
Block {
BlockType Reference
Name "Discrete\nPID Controller"
Ports [1, 1]
Position [215, 142, 260, 188]
ShowName off
SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discr"
"ete\nPID Controller"
SourceType "Discrete PID Controller"
ShowPortLabels on
Kp "90"
Ki "0"
Kd "10"
TcD "0.5e-3"
Par_Limits "[1e2 -1e2]"
Init "0"
Ts "0.001"
}
Block {
BlockType Reference
Name "Discrete\nPID Controller1"
Ports [1, 1]
Position [505, 32, 550, 78]
Orientation "left"
NamePlacement "alternate"
SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discr"
"ete\nPID Controller"
SourceType "Discrete PID Controller"
ShowPortLabels on
Kp "20"
Ki "0"
Kd "0"
TcD "0.5e-3"
Par_Limits "[1e2 -1e2]"
Init "0"
Ts "0.001"
}
Block {
BlockType Reference
Name "Discrete\nPID Controller3"
Ports [1, 1]
Position [215, 202, 260, 248]
ShowName off
SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discr"
"ete\nPID Controller"
SourceType "Discrete PID Controller"
ShowPortLabels on
Kp "0"
Ki "11"
Kd "9"
TcD "0.5e-3"
Par_Limits "[1e2 -1e2]"
Init "0"
Ts "0.001"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [930, 152, 935, 203]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [985, 259, 1015, 291]
Floating off
Location [6, 58, 1274, 767]
Open off
NumInputPorts "3"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
YMin "1.568~15.2916~-0.012"
YMax "1.57075~15.2933~0.001"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [1, 3]
Position [460, 152, 595, 228]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Subsystem"
Location [0, 88, 1268, 774]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [45, 43, 75, 57]
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "Gain"
Position [155, 17, 230, 83]
Gain "1/(mw+mb)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [274, 195, 326, 240]
Orientation "up"
Gain "(mb*l)/(2*(mw+mb))"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [359, 200, 411, 245]
Orientation "up"
Gain "(mb*l)/(mw+mb)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain3"
Position [520, 132, 605, 208]
Orientation "left"
NamePlacement "alternate"
Gain "bw/(mw+mb)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain4"
Position [685, 559, 725, 611]
Orientation "left"
NamePlacement "alternate"
Gain "3*g/(2*l)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain5"
Position [366, 570, 404, 610]
Orientation "up"
Gain "3/(2*l)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain6"
Position [560, 515, 605, 555]
Orientation "left"
NamePlacement "alternate"
Gain "3*bb/(mb*l^2)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [665, 80, 695, 110]
IgnoreLimit off
Port {
PortNumber 1
Name "x'\n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [870, 80, 900, 110]
IgnoreLimit off
Port {
PortNumber 1
Name "x\n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "Integrator2"
Ports [1, 1]
Position [730, 450, 760, 480]
IgnoreLimit off
Port {
PortNumber 1
Name "teta'\n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "Integrator3"
Ports [1, 1]
Position [1005, 450, 1035, 480]
InitialCondition "-pi/2"
IgnoreLimit off
Port {
PortNumber 1
Name "teta \n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [460, 282, 490, 313]
Orientation "left"
NamePlacement "alternate"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product2"
Ports [3, 1]
Position [640, 349, 670, 381]
Orientation "left"
NamePlacement "alternate"
Inputs "3"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product4"
Ports [2, 1]
Position [435, 612, 465, 643]
Orientation "left"
NamePlacement "alternate"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [445, 450, 475, 480]
ShowName off
IconShape "round"
Inputs "|+--"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "teta\"\n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Sum
Name "Sum1"
Ports [4, 1]
Position [390, 80, 420, 110]
ShowName off
IconShape "round"
Inputs "|+++-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "x\"\n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"
Ports [1, 1]
Position [1000, 250, 1030, 280]
Orientation "left"
NamePlacement "alternate"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction1"
Ports [1, 1]
Position [1000, 315, 1030, 345]
Orientation "left"
NamePlacement "alternate"
Operator "cos"
}
Block {
BlockType Outport
Name "x"
Position [1145, 88, 1175, 102]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "theta"
Position [1145, 458, 1175, 472]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "out x'"
Position [1075, 38, 1105, 52]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -