📄 pd_sin.mdl
字号:
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [185, 30, 205, 50]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "u"
Position [230, 33, 260, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "e"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Derivative"
DstPort 1
}
Branch {
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [20, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "u"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "PD4"
Ports [1, 1]
Position [225, 840, 265, 900]
ForegroundColor "lightBlue"
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "PD4"
Location [192, 367, 477, 509]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "e"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Derivative
Name "Derivative"
Position [90, 85, 120, 115]
}
Block {
BlockType Gain
Name "Gain"
Position [140, 85, 170, 115]
Gain "[4500 4250]"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [95, 25, 125, 55]
Gain "[85500 49700]"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [185, 30, 205, 50]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "u"
Position [230, 33, 260, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "e"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Derivative"
DstPort 1
}
Branch {
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [20, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "u"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Robot const paramenter \ndisturbance"
Ports [1, 2]
Position [340, 604, 415, 666]
ForegroundColor "green"
BackgroundColor "cyan"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Robot const paramenter \ndisturbance"
Location [57, 338, 845, 624]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "torque"
Position [310, 13, 340, 27]
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Gravity"
Ports [1, 1]
Position [710, 150, 750, 210]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Gravity"
Location [408, 246, 753, 417]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "q"
Position [15, 25, 45, 40]
Orientation "down"
IconDisplay "Port number"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [260, 31, 265, 144]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Fcn
Name "gload1"
Position [165, 45, 225, 75]
Expr "30.38*cos(u(1))+2.3*cos(u(1)+u(2))"
}
Block {
BlockType Fcn
Name "gload2"
Position [170, 100, 230, 130]
Expr "22.54*cos(u(1)+u(2))"
}
Block {
BlockType Outport
Name "G"
Position [310, 83, 340, 97]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "gload1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "gload2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "q"
SrcPort 1
Points [10, 0; 0, 15; 90, 0]
Branch {
Points [0, 55]
DstBlock "gload2"
DstPort 1
}
Branch {
DstBlock "gload1"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "G"
DstPort 1
}
}
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [600, 55, 630, 85]
IgnoreLimit on
ZeroCross off
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [510, 59, 540, 91]
IgnoreLimit off
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [0, 1]
Position [410, 135, 450, 195]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Subsystem"
Location [347, 283, 572, 384]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Constant
Name "Constant"
Position [25, 35, 55, 65]
Value "10"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Constant1"
Position [80, 45, 110, 75]
Value "5"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [140, 26, 145, 64]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Outport
Name "Out1"
Position [170, 38, 200, 52]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [15, 0; 0, -15]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [5, 0; 0, -5]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [4, 1]
Position [375, 65, 415, 115]
ShowName off
IconShape "round"
Inputs "|+---"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "multiplication"
Ports [2, 1]
Position [295, 95, 335, 155]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "multiplication"
Location [92, 281, 547, 449]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "2x2"
Position [15, 43, 45, 57]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "2x1"
Position [275, 93, 305, 107]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Concatenate
Name "Matrix\nConcatenation"
Ports [2, 1]
Position [210, 27, 270, 143]
Mode "Horizontal matrix concatenation"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [330, 66, 375, 99]
Multiplication "Matrix(*)"
RndMeth "Floor"
}
Block {
BlockType Selector
Name "Selector1"
Ports [1, 1]
Position [145, 36, 185, 74]
Elements "[1 3]"
InputPortWidth "4"
}
Block {
BlockType Selector
Name "Selector2"
Ports [1, 1]
Position [140, 96, 180, 134]
Elements " [2 4]"
InputPortWidth "4"
}
Block {
BlockType Outport
Name "product"
Position [400, 78, 430, 92]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Selector1"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 1
}
Line {
SrcBlock "Selector2"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 2
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -