📄 dcpwm1.mdl
字号:
PortNumber 1
Name "Tf"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Integrator
Name "Integrator"
Ports [2, 1]
Position [200, 42, 230, 73]
ShowName off
InitialConditionSource "external"
InitialCondition "16.2162"
Port {
PortNumber 1
Name "ia"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [2, 1]
Position [470, 51, 500, 84]
ShowName off
InitialConditionSource "external"
InitialCondition "98.5245"
Port {
PortNumber 1
Name "wm"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Gain
Name "Kt"
Position [275, 44, 310, 76]
NamePlacement "alternate"
Gain "K"
Port {
PortNumber 1
Name "Te"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Gain
Name "Kv"
Position [275, 170, 310, 200]
Orientation "left"
Gain "K"
Port {
PortNumber 1
Name "ea"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Gain
Name "Ra"
Position [170, 125, 200, 155]
Orientation "left"
Gain "Ra"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [70, 45, 100, 75]
ShowName off
IconShape "round"
Inputs "||+--"
}
Block {
BlockType Sum
Name "Sum1"
Ports [3, 1]
Position [335, 45, 365, 75]
ShowName off
IconShape "round"
Inputs "||+--"
}
Block {
BlockType Constant
Name "iao"
Position [125, 92, 180, 108]
Value "15.576"
}
Block {
BlockType SubSystem
Name "model"
Ports []
Position [57, 208, 151, 262]
ForegroundColor "darkGreen"
DropShadow on
ShowName off
TreatAsAtomicUnit off
MaskDisplay "disp('MATHEMATICAL\\nMODEL')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "model"
Location [647, 256, 947, 415]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Annotation {
Name " Electrical system equation: \n "
" va = Ra.ia + La.dia/dt + ea\n where ea = K.wm\n "
" \n Mechanical system equation:\n Te = J.dwm/dt + Tl.signum(w"
"m) + f(wm)\n where Te = K.ia "
Position [20, 30]
HorizontalAlignment "left"
VerticalAlignment "top"
FontName "Arial"
FontSize 12
}
Annotation {
Name "Mathematical model of the dc machine "
Position [154, 17]
ForegroundColor "blue"
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType Constant
Name "wmo"
Position [395, 87, 450, 103]
Value "98.5232"
}
Block {
BlockType Outport
Name "ia"
Position [245, 15, 275, 30]
Orientation "up"
}
Block {
BlockType Outport
Name "wm"
Position [525, 15, 555, 30]
Orientation "up"
Port "2"
}
Line {
Name "ea"
Labels [2, 0]
SrcBlock "Kv"
SrcPort 1
Points [-206, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Ra"
SrcPort 1
Points [-80, 0]
DstBlock "Sum"
DstPort 3
}
Line {
Name "Te"
Labels [1, 0]
SrcBlock "Kt"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
Name "Tf"
Labels [0, 0]
SrcBlock "Bm"
SrcPort 1
Points [-55, 0]
DstBlock "Sum1"
DstPort 3
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "1/La"
DstPort 1
}
Line {
SrcBlock "1/La"
SrcPort 1
Points [5, 0]
DstBlock "Integrator"
DstPort 1
}
Line {
Name "ia"
Labels [1, 0]
SrcBlock "Integrator"
SrcPort 1
Points [25, 0]
Branch {
Points [0, 80]
DstBlock "Ra"
DstPort 1
}
Branch {
Points [0, 0]
Branch {
DstBlock "Kt"
DstPort 1
}
Branch {
DstBlock "ia"
DstPort 1
}
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "1/J"
DstPort 1
}
Line {
SrcBlock "1/J"
SrcPort 1
DstBlock "Integrator1"
DstPort 1
}
Line {
Name "wm"
Labels [2, 0]
SrcBlock "Integrator1"
SrcPort 1
Points [0, -10; 35, 0]
Branch {
Points [0, 80]
Branch {
DstBlock "Bm"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "Kv"
DstPort 1
}
}
Branch {
DstBlock "wm"
DstPort 1
}
}
Line {
SrcBlock "va"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Tl"
SrcPort 1
Points [9, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "iao"
SrcPort 1
DstBlock "Integrator"
DstPort 2
}
Line {
SrcBlock "wmo"
SrcPort 1
DstBlock "Integrator1"
DstPort 2
}
Annotation {
Name "BLOCK DIAGRAM MODEL OF A DC MOTOR"
Position [302, 241]
ForegroundColor "blue"
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "Info"
Ports []
Position [60, 216, 106, 246]
BackgroundColor "yellow"
DropShadow on
ShowName off
TreatAsAtomicUnit off
MaskDisplay "disp('INFO')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Info"
Location [205, 595, 492, 689]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Annotation {
Name "This demo simulates the running of a DC mot"
"or\nwith PWM (unipolar) excitation\n(5 hp 240V 1200 rpm)\nrated torque Tr = 3"
"0 N.m"
Position [136, 34]
FontName "Arial"
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [585, 76, 590, 114]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [360, 41, 365, 79]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "PWM"
Ports [2, 1]
Position [130, 112, 200, 148]
ForegroundColor "blue"
TreatAsAtomicUnit off
System {
Name "PWM"
Location [170, 505, 489, 682]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "control"
Position [15, 23, 45, 37]
}
Block {
BlockType Inport
Name "frequency"
Position [15, 88, 45, 102]
Port "2"
}
Block {
BlockType Clock
Name "Clock"
Position [30, 130, 50, 150]
Decimation "10"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [70, 86, 75, 124]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [165, 20, 185, 40]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Fcn
Name "saw"
Position [95, 90, 155, 120]
Expr "1/pi*atan(tan((2*pi*u(1)*u(2)-pi)/2))+0.5"
}
Block {
BlockType Relay
Name "step"
Position [215, 15, 245, 45]
}
Block {
BlockType Outport
Name "Output"
Position [275, 23, 305, 37]
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "saw"
DstPort 1
}
Line {
SrcBlock "control"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "frequency"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -