📄 simple_pll_3.mdl
字号:
Amplitude "1/7.2"
Frequency "2*pi*(Fc)"
SampleTime "0"
}
Block {
BlockType Reference
Name "Spectrum\nScope"
Ports [1]
Position [600, 90, 635, 140]
DialogController "dspdialog.SpectrumScope"
DialogControllerArgs "DataTag0"
SourceBlock "dspsnks4/Spectrum\nScope"
SourceType "Spectrum Scope"
ShowPortLabels off
ScopeProperties on
Domain "Frequency"
HorizSpan "1"
UseBuffer on
BufferSize "256"
Overlap "64"
inpFftLenInherit off
FFTlength "128"
numAvg "2"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "[3 16 504 221]"
AxisProperties off
XUnits "Hertz"
XRange "[-Fs/2...Fs/2]"
InheritXIncr on
XIncr "1.0"
XLabel "Samples"
YUnits "dB"
YMin "-110"
YMax "10"
YLabel "Magnitude, dB"
LineProperties off
wintypeSpecScope "Hanning"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Reference
Name "anti alias"
Ports [1, 1]
Position [250, 32, 315, 88]
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Elliptic"
filttype "Lowpass"
N "9"
Wlo "BW*pi"
Whi "80"
Rp "1.2"
Rs "100"
}
Block {
BlockType Reference
Name "anti alias1"
Ports [1, 1]
Position [250, 142, 315, 198]
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Elliptic"
filttype "Lowpass"
N "9"
Wlo "BW*pi"
Whi "80"
Rp "1.2"
Rs "100"
}
Block {
BlockType Product
Name "down convert"
Ports [2, 1]
Position [150, 41, 195, 74]
RndMeth "Floor"
}
Block {
BlockType Product
Name "down convert1"
Ports [2, 1]
Position [145, 151, 190, 184]
RndMeth "Floor"
}
Block {
BlockType ZeroOrderHold
Name "sampler (imag)"
Position [375, 151, 410, 189]
SampleTime "1/(1.28*BW)"
}
Block {
BlockType ZeroOrderHold
Name "sampler (real)"
Position [380, 41, 415, 79]
SampleTime "1/(1.28*BW)"
}
Line {
SrcBlock "Input Signal"
SrcPort 1
Points [45, 0]
Branch {
Points [0, -45]
DstBlock "down convert"
DstPort 2
}
Branch {
Points [0, 50]
DstBlock "down convert1"
DstPort 1
}
}
Line {
SrcBlock "down convert"
SrcPort 1
DstBlock "anti alias"
DstPort 1
}
Line {
SrcBlock "anti alias"
SrcPort 1
DstBlock "sampler (real)"
DstPort 1
}
Line {
SrcBlock "Sine Wave1"
SrcPort 1
DstBlock "down convert"
DstPort 1
}
Line {
SrcBlock "Sine Wave2"
SrcPort 1
DstBlock "down convert1"
DstPort 2
}
Line {
SrcBlock "anti alias1"
SrcPort 1
DstBlock "sampler (imag)"
DstPort 1
}
Line {
SrcBlock "down convert1"
SrcPort 1
DstBlock "anti alias1"
DstPort 1
}
Line {
SrcBlock "sampler (real)"
SrcPort 1
Points [45, 0; 0, 45]
DstBlock "Real-Imag to\nComplex"
DstPort 1
}
Line {
SrcBlock "sampler (imag)"
SrcPort 1
Points [50, 0; 0, -50]
DstBlock "Real-Imag to\nComplex"
DstPort 2
}
Line {
SrcBlock "Real-Imag to\nComplex"
SrcPort 1
DstBlock "Spectrum\nScope"
DstPort 1
}
Annotation {
Name "cosine"
Position [47, 76]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "sine"
Position [46, 203]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType Sin
Name "Ref Osc\n100 MHz"
Ports [0, 1]
Position [25, 50, 55, 80]
SineType "Time based"
Frequency "2*pi*100e6"
Phase "pi"
SampleTime "0"
}
Block {
BlockType TransportDelay
Name "Reset Delay "
Position [185, 130, 215, 160]
Orientation "left"
DelayTime "2e-9"
InitialOutput "1"
BufferSize "100"
}
Block {
BlockType Reference
Name "SW1"
Ports [2, 1]
Position [330, 255, 360, 295]
NamePlacement "alternate"
SourceBlock "simulink/Signal\nRouting/Manual Switch"
SourceType "Manual Switch"
ShowPortLabels on
sw "1"
action "0"
}
Block {
BlockType Reference
Name "SW2 "
Ports [2, 1]
Position [835, 245, 870, 280]
Orientation "down"
NamePlacement "alternate"
SourceBlock "simulink/Signal\nRouting/Manual Switch"
SourceType "Manual Switch"
ShowPortLabels on
sw "0"
action "0"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [835, 373, 865, 407]
Floating off
Location [530, 550, 1018, 762]
Open off
NumInputPorts "1"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "6e-006"
YMin "0"
YMax "4"
DataFormat "StructureWithTime"
LimitDataPoints off
Decimation "100"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [515, 233, 545, 267]
Floating off
Location [534, 373, 1022, 585]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "6e-006"
YMin "-1"
YMax "2"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
LimitDataPoints off
Decimation "100"
SampleTime "0"
}
Block {
BlockType Terminator
Name "Terminator1"
Position [370, 150, 390, 170]
Orientation "up"
NamePlacement "alternate"
ShowName off
}
Block {
BlockType Terminator
Name "Terminator2"
Position [440, 130, 460, 150]
Orientation "down"
NamePlacement "alternate"
ShowName off
}
Block {
BlockType SubSystem
Name "Voltage Measurement"
Tag "PoWeRsYsTeMmEaSuReMeNt"
Ports [0, 1, 0, 0, 0, 2]
Position [725, 167, 755, 203]
ShowName off
AttributesFormatString "\\n"
AncestorBlock "powerlib/Measurements/Voltage Measurement"
CopyFcn "powericon('psbloadfunction',gcbh,'Measurement B"
"lock','VerifyPhasor');"
LoadFcn "powericon('psbloadfunction',gcbh,'Measurement B"
"lock','');"
PreSaveFcn "powericon('psbloadfunction',gcbh,'ModelCloseFcn"
"','');"
InitFcn "powericon('psbloadfunction',gcbh,'InitFcnOfSPSB"
"locks','Measurement Block');"
CloseFcn "powericon('psbloadfunction',gcbh,'CloseFcn','')"
";"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskType "Voltage Measurement"
MaskDescription "Ideal voltage measurement."
MaskHelp "web(psbhelp);"
MaskPromptString "Phasor simulation|Output signal :|Equivalent ci"
"rcuit"
MaskStyleString "checkbox,popup(Complex|Real-Imag|Magnitude-Angl"
"e|Magnitude),edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "off,off,off"
MaskVisibilityString "off,on,off"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "PhasorSimulation=@1;OutputType=@2;PSBequivalent"
"=@3;"
MaskInitialization "switch OutputType\ncase 1\n OutputSelection "
"= 1;\n NormalMode = 2;\n PhasorMode = 1;\ncase 2\n OutputSelection ="
"[2,3];\n NormalMode = 3;\n PhasorMode = [1,2];\ncase 3\n OutputSelec"
"tion =[4,5];\n NormalMode = 3;\n PhasorMode = [1,2];\ncase 4\n Outpu"
"tSelection =[4];\n NormalMode = 2;\n PhasorMode = 1;\nend\n%\nif Phasor"
"Simulation\n SelectionMode = PhasorMode;\nelse\n SelectionMode = Normal"
"Mode;\nend\n"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "port"
MaskIconUnits "autoscale"
MaskValueString "off|Magnitude|0"
MaskTabNameString ",,"
Port {
PortNumber 1
Name "vco_contrl\n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
System {
Name "Voltage Measurement"
Location [206, 474, 665, 687]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [275, 121, 280, 179]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "Phasor Measurements"
Ports [1, 1, 1]
Position [145, 123, 250, 147]
BackgroundColor "green"
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Phasor Measurements"
Location [255, 525, 861, 796]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "measure"
Position [70, 28, 100, 42]
IconDisplay "Port number"
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [20, 15, 40, 35]
}
Block {
BlockType Gain
Name "180/pi"
Position [225, 105, 245, 125]
Gain "180/pi"
}
Block {
BlockType ComplexToMagnitudeAngle
Name "Complex to\nMagnitude-Angle"
Ports [1, 2]
Position [140, 85, 195, 125]
ShowName off
Output "Magnitude and angle"
}
Block {
BlockType ComplexToRealImag
Name "Complex to\nReal-Imag"
Ports [1, 2]
Position [140, 45, 195, 85]
ShowName off
Output "Real and imag"
}
Block {
BlockType Mux
Name "Mux2"
Ports [5, 1]
Position [275, 23, 280, 127]
ShowName off
Inputs "5"
DisplayOption "bar"
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [315, 51, 350, 99]
Elements "OutputSelection"
InputPortWidth "5"
}
Block {
BlockType Outport
Name "options"
Position [380, 68, 410, 82]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "measure"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, 30]
Branch {
Points [0, 40]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -