📄 bifilarpendulumlib.mdl
字号:
SaturateOnIntegerOverflow off
}
Block {
BlockType Goto
Name "Goto"
Position [180, 452, 230, 478]
FontSize 14
GotoTag "TH_0"
TagVisibility "local"
}
Block {
BlockType Goto
Name "Goto1"
Position [90, 185, 110, 205]
FontSize 14
GotoTag "C"
TagVisibility "local"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [2, 1]
Position [505, 88, 550, 132]
FontSize 14
ExternalReset "either"
IgnoreLimit off
Port {
PortNumber 1
Name "dtheta_dt"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [3, 1]
Position [640, 95, 685, 175]
FontSize 14
ExternalReset "either"
InitialConditionSource "external"
IgnoreLimit off
Port {
PortNumber 1
Name "theta"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [140, 340, 170, 370]
FontSize 14
Operator "square"
}
Block {
BlockType RandomNumber
Name "MeasurementNoise"
Position [780, 185, 810, 215]
FontSize 14
Variance "SigTh*SigTh"
Seed "ThSeed"
SampleTime "0"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [175, 91, 205, 124]
ShowName off
FontSize 14
Inputs "*/"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [265, 86, 295, 119]
ShowName off
FontSize 14
Inputs "**"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [345, 81, 375, 114]
ShowName off
FontSize 14
Inputs "**"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product3"
Ports [5, 1]
Position [210, 251, 250, 369]
FontSize 14
Inputs "***//"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product4"
Ports [2, 1]
Position [401, 255, 434, 285]
Orientation "up"
ShowName off
FontSize 14
Inputs "**"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product5"
Ports [3, 1]
Position [260, 173, 290, 207]
ShowName off
FontSize 14
Inputs "**/"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "ViscousDamping"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [805, 125, 825, 145]
ShowName off
FontSize 14
IconShape "round"
Inputs "|++"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Fcn
Name "d^2(theta)/dt"
Position [445, 286, 715, 324]
Orientation "left"
FontSize 14
Expr "sin(u(1))/(sqrt(1-.5*((D/h)^2)*(1-cos(u(1))"
")))"
}
Block {
BlockType Constant
Name "g"
Position [40, 290, 110, 320]
FontSize 14
Value "9.81"
}
Block {
BlockType SubSystem
Name "height"
Ports [0, 1]
Position [40, 396, 85, 424]
FontSize 14
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "height"
Location [433, 403, 931, 703]
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 "Displacement"
Position [105, 95, 175, 125]
Value "h"
}
Block {
BlockType Constant
Name "Displacement Disturbance"
Position [105, 170, 175, 200]
Value "Sigh*randn(1)"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [240, 100, 260, 120]
ShowName off
IconShape "round"
Inputs "|++"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "h"
Position [360, 103, 390, 117]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Displacement Disturbance"
SrcPort 1
Points [70, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "h"
DstPort 1
}
Line {
SrcBlock "Displacement"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "theta"
Position [845, 128, 875, 142]
FontSize 14
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "MeasurementNoise"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "theta"
DstPort 1
}
Line {
SrcBlock "Theta0"
SrcPort 1
DstBlock "Goto"
DstPort 1
}
Line {
SrcBlock "Product4"
SrcPort 1
Points [0, -130]
DstBlock "Add"
DstPort 3
}
Line {
Name "ViscousDamping"
FontSize 14
Labels [0, 0]
SrcBlock "Product5"
SrcPort 1
Points [95, 0; 0, -80]
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "Product5"
DstPort 2
}
Line {
SrcBlock "C"
SrcPort 1
DstBlock "Goto1"
DstPort 1
}
Line {
SrcBlock "KD"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "I"
SrcPort 1
Points [50, 0]
Branch {
Points [0, 50]
Branch {
DstBlock "Product5"
DstPort 3
}
Branch {
Points [0, 135]
DstBlock "Product3"
DstPort 4
}
}
Branch {
Points [0, -35]
DstBlock "Product"
DstPort 2
}
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "Product2"
DstPort 2
}
Line {
SrcBlock "Abs"
SrcPort 1
Points [5, 0]
DstBlock "Product2"
DstPort 1
}
Line {
Name "dtheta_dt"
FontSize 14
Labels [0, 0]
SrcBlock "Integrator"
SrcPort 1
Points [5, 0]
Branch {
Points [0, -85; -315, 0; 0, 20]
Branch {
Points [0, 50]
Branch {
DstBlock "Product5"
DstPort 1
}
Branch {
DstBlock "Product1"
DstPort 1
}
}
Branch {
DstBlock "Abs"
DstPort 1
}
}
Branch {
DstBlock "Integrator1"
DstPort 1
}
}
Line {
SrcBlock "Add"
SrcPort 1
Points [15, 0]
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Product2"
SrcPort 1
DstBlock "Add"
DstPort 1
}
Line {
Name "theta"
FontSize 14
Labels [0, 0]
SrcBlock "Integrator1"
SrcPort 1
Points [40, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
DstBlock "d^2(theta)/dt"
DstPort 1
}
}
Line {
SrcBlock "Displacement"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "m"
SrcPort 1
DstBlock "Product3"
DstPort 1
}
Line {
SrcBlock "g"
SrcPort 1
Points [40, 0; 0, -20]
DstBlock "Product3"
DstPort 2
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
Points [10, 0; 0, -45]
DstBlock "Product3"
DstPort 3
}
Line {
SrcBlock "height"
SrcPort 1
Points [105, 0]
DstBlock "Product3"
DstPort 5
}
Line {
SrcBlock "Product3"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "d^2(theta)/dt"
SrcPort 1
Points [-15, 0]
DstBlock "Product4"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [80, 0]
DstBlock "Product4"
DstPort 1
}
Line {
SrcBlock "From"
SrcPort 1
Points [5, 0]
Branch {
Points [115, 0]
Branch {
DstBlock "Integrator1"
DstPort 3
}
Branch {
Points [0, -25]
DstBlock "Integrator1"
DstPort 2
}
}
Branch {
DstBlock "Integrator"
DstPort 2
}
}
Annotation {
Name "Use TH_0 signal to\nreset both integrators"
Position [542, 186]
FontSize 14
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -