Académique Documents
Professionnel Documents
Culture Documents
H R Pota
June 6, 2005
1 Introduction
Phase-locked loop (PLL) is a feedback loop which locks two waveforms with same frequency but shifted in phase. The funda-
mental use of this loop is in comparing frequencies of two waveforms and then adjusting the frequency of the waveform in the
loop to equal the input waveform frequency. A block diagram of the PLL is shown in Figure 1. The heart of the PLL is a phase
comparator which along with a voltage controlled oscillator (VCO), a filter and an amplifier forms the loop. If the two frequen-
cies are different the output of the phase comparator varies and changes the input to the VCO to make its output frequency equal
to the input waveform frequency. The locking of the two frequencies is a nonlinear process but linear approximation can be used
to analyse PLL dynamics.
In getting the PLL to lock the proper selection of the filter is essential and it needs some attention. If the filter design is
understood from control theory point-of-view then the design becomes quite simple. In this short note we will discuss only the
fundamentals of the PLL and how you can use nonlinear simulation and linearised approximation to get a better understanding
of the PLL.
R
cos(ω0 t + ko vo dt)
VCO
2 Linearised PLL
To analyse the behaviour of a PLL we can linearise it about the locking frequency obtained with zero input voltage to the
VCO. This frequency is also known as free running frequency of the VCO. The linear model then only deals with the change in
frequencies about this lock frequency.
The linear approximation to the PLL is shown in Figure 2. The block F (s) in Figure 2 is the low-pass filter to get a signal
proportional to the difference in frequency (and phase) of the two waveforms. Looking from the phase comparator point-of-view,
the output of the multiplier and low-pass filter is a signal equal to the sine of the phase difference between the two input signals.
So our linear approximation is valid only when the phase difference is small.
ωi 1 φi+ vosc
F (s) KD V/rad A
s
−
φo 1 ωo
KO rad/s
V
s
For
1
F (s) =
1 + ωsc
Vosc (s) KD A
= . (4)
Ωi (s) s(1 + ωsc ) + KD AKo
2
For practical reasons of attenuating the out of bandwidth signals, the cut-off frequency of the low-pass filter is kept as low as
possible (this may vary with different applications). A low cut-off and a high KD AKo results in underdamped response which
can be improved by using a compensating network as shown in the simulink implementation next.
3 Simulink Implementation
Now let’s see how PLL can be simulated using simulink. We will compare the nonlinear simulation with linearised approxima-
tion. We first look at a step change in frequency and see how the PLL tracks it and then we look at demodulation of a frequency
modulated signal. We will also use the linearised approximation to design an appropriate filter F (s) to improve PLL perfor-
mance. The design of the filter is a constrained problem because the gain at high frequency needs to be really small otherwise
the sum-frequency signal will pass through and hinder the locking.
Vout
To Workspace
bf(s)
200
Sine Wave 50k Hz af(s)
Product Filter Gain Scope
1
s
Integrator
2*pi*49990
cos
49990Hz
Trigonometric Product1
Function
0.1
Clock
s2 /ωn2 + 2ζs/ωn + 1
.
(s/ω1 + 1)(s/ω2 + 1)
The values for the parameters used in both the simulations are given in the matlab script below.
The step response with this comparator is shown in Figure 7 and Figure 8.
Matlab Script
%Fri 27 May 2005
%pll filter design and linear analysis
3
VCO Input Voltage − (Nonlinear Simulation) VCO Input Voltage (Linear Simulation)
70 80
60 70
60
50
50
Voltage (V)
Voltage (V)
40
40
30
30
20
20
10 10
0 0
0 0.02 0.04 0.06 0.08 0.1 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
Time (s) Time (s)
Figure 4: PLL Output (Non-linear Simulation) Figure 5: PLL Output (Linearised Model)
pll
write to
output file
sinusoid
* num(s)
generator 200 MScope
* den(s)
Product
num(s)
Trig. Function +
cos den(s)
+
*
*
Product 49990
4
VCO Input Voltage − (Nonlinear Simulation) VCO Input Voltage (Linear Simulation)
70 80
60 70
60
50
50
Voltage (V)
Voltage (V)
40
40
30
30
20
20
10 10
0 0
0 0.02 0.04 0.06 0.08 0.1 0 0.02 0.04 0.06 0.08 0.1
Time (s) Time (s)
Figure 7: PLL Output with Compensator (Non-linear) Figure 8: PLL Output with Compensator (Linearised)
%run it before NoClockpll but make sure af and bf are what’s needed.
%the simulink file is NoClockpll
ko=200;
[bf,af]=butter(1,2*pi*20,’s’);
for 1 > 2
w1=2*pi*30; w2=2*pi*40;
wn=2*pi*10; zeta=0.99;
af=conv(af,conv([1/w1 1],[1/w2 1]));
bf=conv(bf,[1/wnˆ2 2*zeta/wn 1]);
end;
figure(1); rlocus(bf,[af 0]);
figure(1);step(ko*bf,[[af 0] + ko*[0 bf]]);
xlabel(’Time’); ylabel(’Voltage (V)’);
title(’VCO Input Voltage (Linear Simulation)’);
figure(2);rlocus(bf,[af 0])
3.4 FM Demodulation
Demodulation of FM signals can be done using PLLs. A simulink block diagram to demodulate FM signals is shown in Figure 9.
In [1, p. 165] it says:
The distinction between PM (phase modulation) and FM (frequency modulation) is artificial; both might be
termed angle modulation and treated in a unified manner. In this chapter, the term “PM” implies small phase
deviation, with a remanent carrier present, whereas “FM” has no such implications. The distinction is more apparent
in the modulator and demodulator configurations than in the signals themselves.
The parameters for simulation are: input waveform has a frequency of sin(2π10000t + sin(2π100t)) (the carrier frequency
is 10000 Hz, the modulating signal is sin(2π100t); the free oscillating frequency of the VCO is 10000 Hz.
From the block diagram in Figure 2 the transfer function between the input phase φi and output phase φo is
Φo (s) KD AKo
= . (5)
Φi (s) s(1 + ωs1 ) + KD AKo
5
Sine Wave 100 Hz
2*pi*f0
sin
10000Hz
Trigonometric Product3
Function1 0.1
Clock1
bf(s)
ko
af(s)
Product Low−Pass Filter Gain Scope
1
Vout
s
To Workspace Integrator
2*pi*f0
10000Hz1
Product2
cos 0.1
Trigonometric Clock2
Function
6
VCO Input Voltage − (Nonlinear Simulation) VCO Input Voltage (Linear Simulation)
0.25 1.6
0.2 1.4
1.2
0.15
1
Voltage (V)
Voltage (V)
0.1
0.8
0.05
0.6
0
0.4
−0.05 0.2
−0.1 0
0 0.05 0.1 0.15 0.2 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18
Time (s) Time (s)
Figure 10: Frequency Modulation (Non-linear) Figure 11: Frequency Modulation (Linearised)
VCO Input Voltage − (Nonlinear Simulation) VCO Input Voltage (Linear Simulation)
1.5 1.5
0.5 1
Voltage (V)
Voltage (V)
−0.5 0.5
−1
−1.5 0
0 0.02 0.04 0.06 0.08 0.1 0 1 2 3 4 5 6 7 8 9
Time (s) Time (s) −3
x 10
Figure 12: Frequency Modulation - Broadband (Nonlinear) Figure 13: Frequency Modulation - Broadband (Linearised)
4 Frequency Synthesis
There are several applications which need sinusoids of a precise frequency; radio and television broadcast systems and mobile
telephones being the most visible applications. The devices which output sinusoid at a preset frequency, from within a range of
frequencies, is called a frequency synthesiser. In this section we discuss a simple frequency synthesiser using the phase-locked
loop concepts.
In most frequency synthesisers, a square wave of the desired frequency is input and a sinusoid of that frequency is synthesised
at the output. It is well-known that feedback is one of the most important techniques of making the system output follow
a reference input. Here the interest is in making frequencies of the two waveforms identical. Instantaneous comparison of
the frequencies of two waveforms is not possible—frequency can only be measured after one time-period. To overcome this
limitation a scheme shown in Figure 14 is used. The method is quite simple. The reference square wave and the inverted signum
7
of the output sinusoid are multiplied and then averaged. Although these two operations are hard to perform in hardware but
there do exist circuits which can perform these operations close to the ideal. It is shown below that the output of the averager is
positive if the reference signal frequency is higher than the output sinusoid and vice-versa. This increases or decreases the VCO
input and accordingly adjusts the output sinusoid frequency. To generate the required input to the VCO, the input reference and
the fedback voltage are locked with a fixed phase difference hence the name phase-locked loop.
vr
va vosc
× Averager VCO
vo
Inverter signum
Figure 15 shows the transfer functions for the equivalent blocks in Figure 14.
vr KD va R vosc
× A cos(ω0 t + k0 va dt)
s
VCO
vo
Inverter signum
vr vo
1
| | | | | | | t
−1
vr × −vo
1
A1 A3
| | | | | | | t
A2 A4
−1
8
above the horizontal axis are larger than the areas below. This increase in the input to the voltage controlled oscillator incrases
the output frequency and this continues till the two frequencies are equal.
vr vo
1
| | | | | | | t
−1
vr × −vo
1
A1 A3
| | | | | | | t
A2 A4
−1
When the output frequency is greater than the input signal frequency, the waveforms are as shown in the Figure 18. From the
figure we can see that the input to the VCO decreases and this decreases the output frequency.
vr vo
1
| | | | | | | t
−1
vr × −vo
1
A1 A3
| | | | | | | t
A2 A4
−1
5 Links
All the scripts mentioned in the article are linked from:
http://www.ee.adfa.edu.au/staff/hrp/teaching/Electronics4/docs/PLL/index.html
References
[1] Floyd M. Gardner. Phaselock Techniques. John Wiley & sons, Brisbane, 2nd edition, 1979.
[2] Paul R. Gray and Robert G. Meyer. Analysis and Design of Analog Integrated Circuits. John Wiley and Sons, Brisbane, 3rd
edition, 1993.
[3] Paul R. Gray, Paul J. Hurst, Stephen H. Lewis, and Robert G. Meyer. Analysis and Design of Analog Integrated Circuits.
John Wiley and Sons, Brisbane, 4th edition, 2001. ISBN: 0-471-32168-0.