📄 foc.mdl
字号:
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
DataType "auto"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Relay
OnSwitchValue "eps"
OffSwitchValue "eps"
OnOutputValue "1"
OffOutputValue "0"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "All ports same datatype"
OutDataType "fixdt(1,16,0)"
ConRadixGroup "Use specified scaling"
OutScaling "[]"
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 Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Inherit via internal rule"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
ContinuousStateAttributes "''"
Realization "auto"
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "fixdt(1,16,0)"
ConRadixGroup "Use specified scaling"
OutScaling "[]"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
}
Block {
BlockType Trigonometry
Operator "sin"
OutputSignalType "auto"
SampleTime "-1"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "foc"
Location [2, 82, 1014, 700]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name "Constant"
Position [25, 80, 55, 110]
Value "0.96"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [680, 431, 685, 499]
Orientation "left"
BackgroundColor "black"
NamePlacement "alternate"
ShowName off
Outputs "3"
}
Block {
BlockType Gain
Name "Gain1"
Position [930, 280, 960, 310]
Gain "30/pi"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType SubSystem
Name "Parksystem1"
Ports [4, 2]
Position [475, 415, 540, 520]
Orientation "left"
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "Parksystem1"
Location [520, 158, 975, 314]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "ia"
Position [30, 28, 60, 42]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "ib"
Position [30, 63, 60, 77]
Port "2"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "ic"
Position [25, 103, 55, 117]
Port "3"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "teta"
Position [185, 118, 215, 132]
Port "4"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType SubSystem
Name "VR"
Ports [3, 2]
Position [260, 54, 360, 96]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "VR"
Location [433, 403, 931, 723]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [15, 43, 45, 57]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "In2"
Position [15, 108, 45, 122]
Port "2"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "In3"
Position [15, 168, 45, 182]
Port "3"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [195, 21, 240, 54]
CollapseMode "All dimensions"
InputSameDT off
OutDataType "sfix(16)"
OutScaling "2^0"
RndMeth "Floor"
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [200, 81, 245, 114]
CollapseMode "All dimensions"
InputSameDT off
OutDataType "sfix(16)"
OutScaling "2^0"
RndMeth "Floor"
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [270, 141, 315, 174]
CollapseMode "All dimensions"
InputSameDT off
OutDataType "sfix(16)"
OutScaling "2^0"
RndMeth "Floor"
}
Block {
BlockType Product
Name "Product3"
Ports [2, 1]
Position [275, 196, 320, 229]
CollapseMode "All dimensions"
InputSameDT off
OutDataType "sfix(16)"
OutScaling "2^0"
RndMeth "Floor"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [345, 26, 380, 84]
ShowName off
Inputs "|++"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [350, 152, 380, 208]
ShowName off
Inputs "|-+"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"
Ports [1, 1]
Position [95, 140, 125, 170]
Operator "cos"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction1"
Ports [1, 1]
Position [95, 215, 125, 245]
}
Block {
BlockType Outport
Name "Out1"
Position [425, 48, 455, 62]
IconDisplay "Port number"
}
Block {
BlockType Outport
Name "Out2"
Position [425, 168, 455, 182]
Port "2"
IconDisplay "Port number"
}
Line {
SrcBlock "Product3"
SrcPort 1
Points [5, 0; 0, -30]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Product2"
SrcPort 1
Points [5, 0; 0, 10]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [40, 0; 0, -25]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "In2"
SrcPort 1
Points [75, 0; 0, -35; 15, 0]
Branch {
Points [0, 140]
DstBlock "Product3"
DstPort 2
}
Branch {
Points [45, 0]
DstBlock "Product1"
DstPort 1
}
}
Line {
SrcBlock "Trigonometric\nFunction1"
SrcPort 1
Points [55, 0; 0, -65]
Branch {
DstBlock "Product2"
DstPort 2
}
Branch {
DstBlock "Product1"
DstPort 2
}
}
Line {
SrcBlock "Product"
SrcPort 1
Points [40, 0; 0, 15]
DstBlock "Sum"
DstPort 1
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -