Synthesizer Tutorial
Synthesizer Tutorial
Synthesizer Tutorial
=
K =3.272e10 (from the PLL Design Assistant)
Nnom =34.6, =1, Kv =50e6, Icp =100e-6 (from above)
Result: gain =1/(4.42e-9)
o This corresponds to 4.4 nF of capacitance in the loop filter!
Therefore, the loop filter capacitance would likely need to be
implemented off-chip in this design. Note that the above formula
allows us to see that reduction of the charge pump current, Icp,
would also allow reduction of the capacitance value. However,
reduction of Icp would, in turn, lead to an increased impact of
charge pump noise on the PLL output. The best value for Icp, and
loop filter capacitance, would need to be decided later after SPICE
simulations of the charge pump and other PLL blocks are
performed.
Implementation of the above parameters and PLL configuration into Sue2 should yield a circuit whose
primary circuit blocks are similar to those shown below.
16
B. Setting Up the CppSim Simulation File
Within the Sue2 window, select Tools CppSim Simulation. You should see the Cppsim
Run Menu that pops up. Left click on the Edit Sim File button, and an Emacs window should
pop up. Now open CppSimView and make sure it synchronizes to your new schematic. If
not, left-click the Synch button on the CppSimView window to do it.
Within the Emacs windows that pops up, enter the following values
// Number of time steps needs to be large enough to achieve noise analysis
num_sim_steps: 3e6
// Choose a time step such that its inverse is over a factor ten higher than the reference
frequency
Ts: 1/400e6
// For the transient response, look at a 150 microsecond span starting at 50 microseconds
output: test start_time=50e-6 end_time=200e-6
probe: vin sd_in
// For the noise performance, start recording after transients have died away
17
output: test_noise start_time=200e-6
probe: noiseout
// Set the nominal divide value to 34.6154, and apply a step of 0.1 at 50 microseconds
global_param: in_gl=34.6154 delta_gl=0.1 step_time_gl=50e-6
C. Examining the Simulated Step Response
Now run the CppSim simulation, and then plot signal vin to observe the transient response.
You should obtain a plot as shown below.
Compare the above step response to that produced by the PLL Design Assistant.
To do so, go back to the PLL Design Assistant, turn off the alter: statements, and remove
the variations from the parasitic poles.
The PLL Design Assistant should then look as shown below, and the corresponding step response
should match that of CppSim quite well.
18
D. Examining the Simulated Phase Noise
In CppSimView, switch to the test_noise.tr0 output file, and then run the plot function
plot_pll_phasenoise(x,10e3,20e6,noiseout)
The above function specifies that we look at the output phase noise of the PLL at offset frequencies
that span from 10 kHz to 20 MHz. You should see a plot similar to that shown below. Note that the
frequency does not span all the way down to 10 kHz due to the limited number of points at
frequencies in that range. To see this, rerun the plot function and have it span from 1 kHz to 20 MHz,
and then left-click on the Zoom button and then on (L)ineStyle you should see that there are very
few points at low frequencies, and that the lowest frequency point is quite inaccurate due to the
spectral density calculation method employed. The issue of limited low frequency points is improved
if we substantially increase the number of simulation sample points (and decimate the resulting
signals using the trigger command in the test.par file to keep a reasonable output file size), but doing
so carries the negative effect of increasing the time for the simulation.
Note that the very low frequency sample points in the simulated phase noise plot have a large amount
of variance compared to their high frequency counterparts, and are therefore unreliable in their
accuracy (i.e., dont make conclusions that you are seeing 1/f noise or other phenomenon based on the
lowest frequency portion of the simulated phase noise plots). To get better accuracy, you need to
increase the number of simulation sample points (at the expense of longer simulation times).
19
Now go back to the PLL Design Assistant, and plot the phase noise of the synthesizer with
the detector noise turned off.
The PLL Design Assistant should look as shown below, and the results between CppSim and PLL
Design Assistant should match quite well.
Advanced CppSim Simulation Analysis
20
Let us now examine some non-ideal effects that are not predicted by the PLL Design Assistant, but
can be captured by the time-domain simulation approach that CppSim offers. We will first observe the
impact of increasing the divider step value so that the PLL loses frequency lock and creates a
condition of cycle slipping. Mismatch between the up and down current sources will then be
introduced in the charge pump, which will reveal increased phase noise due to noise folding of the
quantization noise. To deal with such mismatch, it is common to purposefully introduce a phase
offset into the synthesizer through the addition of current at the charge pump output we will show
the positive and negative impact of this approach. Finally, we will change the input value to the
modulator in order to observe fractional spurs that are produced.
A. Observing Cycle Slipping
Let us look at the effect of introducing a larger step value in the divide value on the transient
performance of the synthesizer.
Click on the Edit Sim File button in CppSim Run Menu, and change the delta_gl
parameter in test.par from 0.1 to 1.
Rerun the CppSim simulation, load the test.tr0 (rather than test_noise.tr0) output file, and
then run the plotsig() function on signal vin.
The resulting step response should be similar to that shown below it no longer looks as predicted by
the PLL Design Assistant! The reason for the discrepancy is that the PLL Design Assistant assumes a
linearized PLL model that is valid only when the PLL is in lock. In this case, we have put a large
enough step to take the synthesizer out of lock, and are seeing the effects of cycle slipping that occurs
before it eventually returns to a locked state.
21
B. Examining the Effects of Charge Pump Mismatch
Now let us examine the impact of charge pump current mismatch on the phase noise of the
synthesizer.
Within Sue2, change the bottom charge current from 100 microamps to 110 microamps.
This change causes there to be a mismatch between the up and down charge pump
currents. Note that the updated Sue2 schematic should match that shown below.
Rerun the CppSim simulation, load in the test_noise.tr0 output file, and run the
plot_pll_phasenoise() function on signal noiseout. This time, increase the frequency
scale in plot_pll_phasenoise() to span from 10 kHz to 30 MHz.
The resulting phase noise plot should be similar to that shown below. Comparing this plot to the
earlier one (with matched up and down current sources) reveals significantly more noise at low
frequencies. This effect is caused by the effective nonlinearity introduced by the mismatched current,
which causes the highpass shaped Sigma-Delta quantization noise to be folded down into lower
frequencies.
22
C. Moving the Nominal Phase Error Away from Zero
Now go back to the Sue2 schematic, and add in a constant offset current into the charge
pump output of 30 microamps (as shown in the schematic figure below).
The effect of this offset current is to shift the relative phase of the reference and divider outputs, so
that we are no longer in the portion of the tristate phase detector characteristic that experiences
variable up and down pulses. In the case below, the down pulse will become fixed in width according
to the reset delay, and the up pulse be expanded such that its average width is roughly 30% of the
reference period (i.e., not considering the effect of the small-width down pulse, the up pulse must be
on 30% of the time in order to offset the 30 microamp offset and make the input to the leadlagfilter
have a zero average). This schematic change will have some positive and negative effects, as we will
now explore.
23
Run CppSim, and then use the plotsig() function to plot signal vin.
Your plot should match the one shown below, and reveals that the PLL is no longer locking properly.
The reason for this behavior is that the offset added to the charge pump output counteracts the offset
added by the frequency detection circuitry of the PFD when the PLL is out of lock. In this case, the
charge pump offset value is so large (at 30 microamps) that it overrides the frequency detector action
to the point that frequency lock is not achieved. In practice, one would not put such a large offset into
the charge pump output, but this exercise hopefully illustrates one of the impacts of doing so.
24
Now click on Edit Sim File in CppSimView, and change the delta_gl parameter in the
test.par file to be zero.
Rerun the CppSim simulation and again plot vin as above.
You should see a plot as shown below, which reveals that the PLL becomes locked within 200
microseconds. In this case, we started close enough to lock at the beginning of the simulation that the
offset current does not pose a problem. Again, in a practical design, you could not accommodate such
a large current offset at the charge pump output as you would need to be able to regain lock with a
large divide value change (especially at power-up). We are simply following through on this exercise
for pedagogical reasons.
Now re-examine the phase noise of the synthesizer by selecting the test_noise.tr0 output file
and then running the plot_pll_phasenoise() function (from 10 kHz to 30 MHz) on signal
noiseout.
The resulting plot should appear as shown below. Notice that the mismatch between the up and down
current pulses no longer causes significant folding of the Sigma-Delta quantization noise, but that a
spur now appears at the reference frequency of 26 MHz. Fortunately, there is a great deal of filtering
in the loop filter by the time you hit the reference frequency, so that is still below -100 dBc and not of
consequence.
25
D. Producing Fractional Spurs
Now click on Edit Sim File in CppSimView, and change the in_gl parameter to 34.65.
Rerun CppSim, and again plot the phase noise of the synthesizer as before.
The plot should appear as shown below, and reveals the presence of fractional spurs due to the
updated value of 34.65 going into the Sigma-Delta modulator. In practice, if possible, a proper job of
frequency planning in the system can avoid having to hit such undesirable input values to the
modulator. Otherwise, dithering methods are a possibility to prevent the creation of such spurs.
Fortunately, in this case, we see that the spurs have magnitude less than -80 dBc, and shouldnt pose a
problem since they meet the goal of achieving spur performance better than -80 dBc. However, this
may not be the case for other Sigma-Delta input values, and thorough investigation of this issue is
warranted in an actual design.
Also, please note that the spur peaks shown in the phase noise plot are sampled values of waveforms
of very narrow width the peak that you see may not be the actual peak of the waveform. Therefore,
the actual value of the spur may be higher than actually observed here. Phase noise measurement
systems perform an algorithm to estimate the spur values, which we havent bothered to do (i.e., we
just provide the right-hand scale to give you a reasonable sense of the spur level values).
26
Conclusion
In this tutorial, we have used the PLL Design Assistant and CppSim programs to design a frequency
synthesizer at the system level that is intended for a GSM transmitter application. Using the PLL
Design Assistant, we were able to examine the noise performance of the synthesizer under different
configurations and thereby select a candidate approach that met the GSM noise specifications and also
met the settling time requirements under nominal conditions. The impact of parameter variations was
then assessed, and its effects on phase noise and settling time examined. Using the CppSim
behavioral simulator, we were then able to verify the noise and dynamic analysis of the PLL Design
Assistant under nominal conditions. CppSim also allowed for examination of non-ideal behavior such
as cycle slipping, the impact of charge pump mismatch, and the presence of fractional spurs for a
given modulator input setting. Hopefully, this exercise has given you helpful insights not only
for fractional-N synthesizer design, but also for PLL design in general.