📄 pll.mdl
字号:
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Integrator
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
IgnoreLimit off
ZeroCross on
ContinuousStateAttributes "''"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow 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 Sin
SineType "Time based"
TimeSource "Use simulation time"
Amplitude "1"
Bias "0"
Frequency "1"
Phase "0"
Samples "10"
Offset "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
Block {
BlockType TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
ContinuousStateAttributes "''"
Realization "auto"
}
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 "pll"
Location [394, 98, 1216, 612]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name "10000Hz"
Position [595, 75, 635, 105]
Orientation "left"
ForegroundColor "red"
Value "2*pi*f0"
}
Block {
BlockType Constant
Name "10000Hz1"
Position [630, 272, 700, 308]
Orientation "left"
ForegroundColor "cyan"
Value "2*pi*f0"
}
Block {
BlockType Clock
Name "Clock1"
Position [605, 125, 625, 145]
Orientation "left"
ForegroundColor "red"
DisplayTime on
Decimation "1"
}
Block {
BlockType Clock
Name "Clock2"
Position [630, 335, 650, 355]
Orientation "left"
ForegroundColor "cyan"
DisplayTime on
Decimation "1"
}
Block {
BlockType Gain
Name "Gain"
Position [615, 164, 660, 196]
ForegroundColor "blue"
Gain "ko"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [535, 225, 565, 255]
Orientation "left"
IgnoreLimit off
}
Block {
BlockType TransferFcn
Name "Low-Pass Filter"
Position [500, 162, 560, 198]
ForegroundColor "blue"
Numerator "bf"
Denominator "af"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [325, 201, 330, 239]
Orientation "left"
NamePlacement "alternate"
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [395, 161, 440, 194]
ForegroundColor "blue"
CollapseMode "All dimensions"
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [530, 281, 575, 314]
Orientation "left"
ForegroundColor "cyan"
CollapseMode "All dimensions"
}
Block {
BlockType Product
Name "Product3"
Ports [2, 1]
Position [525, 81, 570, 114]
Orientation "left"
ForegroundColor "red"
CollapseMode "All dimensions"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [700, 164, 730, 196]
ForegroundColor "green"
Floating off
Location [419, 515, 1220, 754]
Open off
NumInputPorts "1"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "0.03"
YMin "-800"
YMax "800"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [270, 204, 300, 236]
Orientation "left"
ForegroundColor "green"
NamePlacement "alternate"
Floating off
Location [106, 46, 1275, 783]
Open off
NumInputPorts "1"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "0.03"
YMin "-800"
YMax "800"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave 100 Hz"
Ports [0, 1]
Position [530, 25, 560, 55]
Orientation "left"
ForegroundColor "red"
SineType "Time based"
Frequency "2*pi*100"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [470, 90, 490, 110]
Orientation "down"
ForegroundColor "red"
ShowName off
IconShape "round"
Inputs "|++"
CollapseMode "All dimensions"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [480, 290, 500, 310]
Orientation "down"
ForegroundColor "cyan"
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "|++"
CollapseMode "All dimensions"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [405, 225, 465, 255]
Orientation "left"
ForegroundColor "green"
VariableName "Vout"
MaxDataPoints "inf"
Decimation "10"
SampleTime "-1"
SaveFormat "Structure With Time"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"
Ports [1, 1]
Position [410, 330, 440, 360]
Orientation "left"
ForegroundColor "cyan"
Operator "cos"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction1"
Ports [1, 1]
Position [400, 85, 430, 115]
Orientation "left"
ForegroundColor "red"
}
Line {
SrcBlock "Low-Pass Filter"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock "Integrator"
DstPort 1
}
}
Line {
SrcBlock "Trigonometric\nFunction"
SrcPort 1
Points [-35, 0; 0, -160]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Low-Pass Filter"
DstPort 1
}
Line {
SrcBlock "Trigonometric\nFunction1"
SrcPort 1
Points [-25, 0; 0, 70]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Clock2"
SrcPort 1
Points [-35, 0]
DstBlock "Product2"
DstPort 2
}
Line {
SrcBlock "10000Hz1"
SrcPort 1
DstBlock "Product2"
DstPort 1
}
Line {
SrcBlock "Product2"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [0, 30]
DstBlock "Trigonometric\nFunction"
DstPort 1
}
Line {
SrcBlock "Product3"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "10000Hz"
SrcPort 1
DstBlock "Product3"
DstPort 1
}
Line {
SrcBlock "Clock1"
SrcPort 1
Points [-15, 0]
DstBlock "Product3"
DstPort 2
}
Line {
SrcBlock "Sine Wave 100 Hz"
SrcPort 1
Points [-45, 0; 0, 5]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [-135, 0]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [-25, 0; 0, -15]
DstBlock "Trigonometric\nFunction1"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope1"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [-40, 0]
Branch {
DstBlock "Sum2"
DstPort 1
}
Branch {
Points [-5, 0]
Branch {
DstBlock "To Workspace"
DstPort 1
}
Branch {
Points [-10, 0; 0, 65; -130, 0]
DstBlock "Mux"
DstPort 2
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -