📄 fractional_4.mdl
字号:
}
System {
Name "Make Square1"
Location [459, 359, 767, 528]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [30, 80, 60, 110]
Value "0"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [135, 32, 165, 63]
Operator ">"
}
Block {
BlockType Outport
Name "Out1"
Position [270, 43, 300, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [55, 0]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Make Square2"
Ports [1, 1]
Position [580, 165, 610, 215]
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "Make Square"
MaskDescription "For input +ve values output is 1\nFor input -ve"
" values output is 0"
MaskDisplay "plot(0,0,100,100,[90,70,70,50,50,30,30,10,10],["
"20,20,40,40,20,20,40,40,20],[90,87,84,80,76,73,70,67,63,60,57,53,50,47,44,40,"
"36,33,30,27,23,20,17,13,10],[70,65,63,62,63,65,70,75,77,78,77,75,70,65,63,62,"
"63,65,70,75,77,78,77,75,70])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Make Square2"
Location [459, 360, 767, 528]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [30, 80, 60, 110]
Value "0"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [135, 32, 165, 63]
Operator ">"
}
Block {
BlockType Outport
Name "Out1"
Position [270, 43, 300, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [55, 0]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "More Info1"
Ports []
Position [110, 412, 305, 469]
BackgroundColor "green"
DropShadow on
ShowName off
AncestorBlock "rab_favorites/More Info1"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskDisplay "disp('Fractional N PLL with\\n Analog Phase Cor"
"rection\\n Info ')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "More Info1"
Location [99, 109, 822, 710]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Annotation {
Name " Fractional-N PLL with Analog"
" Phase Error Correction"
Position [148, 17]
HorizontalAlignment "left"
VerticalAlignment "top"
FontName "Arial"
FontSize 12
FontWeight "bold"
}
Annotation {
Name "Fractional N PLL synthesizers attain improv"
"ed frequency resolution at the expense \nof increased circuit complexity and "
"increased phase noise (timing jitter) over thier \nnon fractional counterpart"
"s. The average output frequency of the PLL is (N+M)*fr where fr is \nthe fre"
"quency reference. The M term is the \"fractional\" part and lies between 0.0 "
"and 1. \n\nThis model implements a fractional N scheme with analog phase erro"
"r correction\nin the phase detector portion of the design. This *eliminates* "
" the sidebands introduced \nby switching the loop divider between N and N+1. "
" Implementing the phase error correction \ncircuitry as part of the phase det"
"ector and loop compensation filter yeilds a design that \nis easier to implem"
"ent than the previous model that required a phase shifted clock. \n\n \n1)Pha"
"se-frequency detector and error compensator uses \"dual D\" flip flop phase "
"\ndetector, integrator, sample / hold, and simple lead/lag loop filter. \n\n2"
") Divide by N or N+1 is implemented using a \"swallow\" counter \nscheme, lik"
"e it would likely be done in hardware. \n\n3) A modulo 1 accumulator controls"
" the switching between N and N+1 with \nthe carry output. The accumulator ou"
"tput (state) is used to drive the phase \ncompensation circuitry. \n\n4) Run "
"the simulation with the compensation off: switch in lower position.\nMiminize"
" the model to look at the graphs. Note the significant phase \njitter and sid"
"ebands due to the periodic variations of the VCO control \nvoltage. \n\n5) Ch"
"ange the switch to the upper (compensation on) position. Note \nthe complete "
"elimination of timing jitter, and, frequency spurs. Also note that \nit is "
"far easier to see the modulation in the frequency domain \nsidebands than th"
"e phase jitter of the clock. The single remaining spur \n(-100 dBc).\n\n6) T"
"he Simulink model and simulation are virtually perfect. Real world component "
"\nlimitations can now be introduced to study their effects on the system perf"
"ormance. \n"
Position [113, 42]
HorizontalAlignment "left"
VerticalAlignment "top"
FontName "Arial"
FontSize 12
}
}
}
Block {
BlockType SubSystem
Name "N or N+1 swallow counter"
Ports [4, 1]
Position [325, 271, 465, 364]
Orientation "left"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "var"
PropagatedSignals "div_by_n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "N or N+1 swallow counter"
Location [58, 300, 889, 628]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "102"
Block {
BlockType Inport
Name "div_in_clk"
Position [20, 37, 50, 53]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "Swallow"
Position [15, 88, 45, 102]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "ref_clk"
Position [15, 133, 45, 147]
Port "3"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "N"
Position [560, 88, 590, 102]
Port "4"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name " "
Position [160, 199, 180, 221]
}
Block {
BlockType Reference
Name "D Flip-Flop1"
Ports [3, 2]
Position [100, 102, 145, 178]
SourceBlock "simulink_extras/Flip Flops/D Flip-Flop"
SourceType "DFlipFlop"
ShowPortLabels on
}
Block {
BlockType Reference
Name "D Flip-Flop2"
Ports [3, 2]
Position [245, 82, 290, 158]
SourceBlock "simulink_extras/Flip Flops/D Flip-Flop"
SourceType "DFlipFlop"
ShowPortLabels on
}
Block {
BlockType Reference
Name "D Flip-Flop3"
Ports [3, 2]
Position [465, 97, 510, 173]
SourceBlock "simulink_extras/Flip Flops/D Flip-Flop"
SourceType "DFlipFlop"
ShowPortLabels on
}
Block {
BlockType Memory
Name "Memory"
Position [440, 220, 470, 250]
Orientation "left"
}
Block {
BlockType Memory
Name "Memory3"
Position [320, 85, 350, 115]
ShowName off
}
Block {
BlockType Logic
Name "Pulse Swallow Gate"
Ports [2, 1]
Position [560, 37, 590, 68]
NamePlacement "alternate"
Port {
PortNumber 1
Name "div_n_clk"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Terminator
Name "T1"
Position [320, 130, 340, 150]
}
Block {
BlockType Terminator
Name "T2"
Position [565, 135, 585, 155]
}
Block {
BlockType Terminator
Name "T3"
Position [165, 150, 185, 170]
}
Block {
BlockType Logic
Name "and_1"
Ports [2, 1]
Position [385, 92, 415, 123]
}
Block {
BlockType SubSystem
Name "clock divider"
Ports [1, 1, 0, 1]
Position [620, 69, 680, 121]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Port {
PortNumber 1
Name "div_by_n"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "clock divider"
Location [284, 241, 903, 401]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "divide # "
Position [125, 93, 155, 107]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType TriggerPort
Name "clock in"
Ports []
Position [300, 80, 320, 100]
}
Block {
BlockType Constant
Name "Constant2"
Position [25, 35, 45, 55]
ShowName off
}
Block {
BlockType Fcn
Name "Fcn4"
Position [280, 42, 330, 68]
ShowName off
Expr "u<1"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [2, 1]
Position [200, 39, 225, 66]
ShowName off
Operator "mod"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [75, 35, 95, 55]
ShowName off
IconShape "round"
Inputs "|++"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [120, 25, 155, 65]
SampleTime "-1"
}
Block {
BlockType Outport
Name " "
Position [360, 48, 390, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "divide # "
SrcPort 1
Points [0, -40]
DstBlock "Math\nFunction"
DstPort 2
}
Line {
SrcBlock "Fcn4"
SrcPort 1
DstBlock " "
DstPort 1
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
Points [10, 0; 15, 0]
Branch {
DstBlock "Fcn4"
DstPort 1
}
Branch {
Points [0, 65; -170, 0]
DstBlock "Sum"
DstPort 2
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Annotation {
Name "clock out"
Position [372, 71]
}
}
}
Block {
BlockType Outport
Name "Div by N or N+1"
Position [745, 88, 775, 102]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "N"
SrcPort 1
DstBlock "clock divider"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -