Clock and Data Recovery/Structures and types of CDRs/The (slave) CDR based on a second order PLL/2nd order type 2

llll

Generalities of the 2nd order type 2 PLL
''Robust, tolerant but excitable. Zero phase error once locked, to sample the received eye exactly in the middle - independently of the loop gain.''

The CDRs are unity feedback systems and – in most cases- of type 1.

When the loop gain cannot be known (because of a bang-bang phase detector or because of a highly variable transition density in the received signal), the type 1 architectures may not be adequate.

The PLL designer, faced with a loop gain that can vary in a very large interval, may be unable to design so that the sampling error remains negligible in all conditions.

The steady state error of the type 1 CDRs, both 1st and 2nd order, as seen earlier, is: Es = (ωp -ωfr) / G that represents how much the sampling instant deviates from the middle point of the received pulses.

Es depends on the accuracy of the VCO, (ωp -ωfr), and on the open loop gain, G.

A type 1 PLL (1st or 2nd order) may be inadequate, if Gφ varies in a wide range, for two reasons:
 * 1) the VCO accuracy ωp -ωfr  is too large a percentage of ωp,  (which is the case, for example, with on-chip RC or LC oscillators where  ωfr may vary from sample to sample by more than 20% and be furthermore sensitive to voltage supply and temperature) 
 * 2) the open loop gain G, product of Gφ  and Gf and GVCO, is too low, (which is sometimes the case, for instance, when the feedback circuit of the oscillator has an especially high Q to be insensitive to certain forms of phase noise, or -which is often the case- if some hard non-linearities are present in the loop, making the gain of one of its blocks variable with the signal amplitude, and rendering a linear modelling impossible. This is typically the case is when a bang-bang phase detector is used. Conditions of low gain have to be expected, but a general model is not available to cover all such possibilities).

The compression to zero of the steady state error can be obtained in return for, as it will be shown, some reduction of the small signal performances.

This is obtained going from a type 1 to a type 2 loop.  (A 1st order type 2 loop can not exist: the 2nd order type 2 loop is the architecture of choice if no sampling error is desired) .

The Amplifier/filter (for a loop of 2nd order and of type 2) changes from

a finite pole and one zero at ∞ of the 2nd order type 1 loop, (or from the flat gain of the 1st order type 1 loop),

and now exhibits one pole in the axes origin and one finite zero.

Comparator and VCO models are unchanged.



The compression to zero of the steady state error can be obtained even if the gain of one block is non linear (e.g. when a bang-bang phase detector is in place), because of the inherent robustness of this loop.

As it will be shown with a detailed analysis of the "linear" version of the loop, the remarkable caracteristics in the large signal case are accompanied by poor small signal performances.

The following development of the model (the simulations of this 2-2 loop are also available in the simulator that can be retrieved following the link [link]...) will show that this loop has the main advantages of : and the disadvantages of: which overall qualify this loop architecture as inadequate for regenerator applications, but good when the large signal performances are important in presence of hard non-linearities.
 * a zero steady state sampling error (no matter what the loop gain is)
 * a very good jitter tolerance at low frequencies
 * a very strong rejection of low frequency noise from the VCO
 * a weak jitter filtering roll-off, that means poor rejection of channel noise, and a very high gain peaking.
 * a tracking that overshoots when the input phase jumps abruptly
 * under damped noise and jitter transfer characteristics around the loop corner frequency

In particular, when the phase comparator is of bang-bang type and the accuracy of the VCO free-running frequency ffr is poor, this architecture is preferred for CDRs.

For example, in a field different from CDRs, this architecture is interesting in applications of spatial detection and ranging of a moving target (where large signals are the normal case, and some overshooting of the target is desirable).

In the most classical reference for PLLs, that dates back to 1966, when CDRs were just one application (the last among the listed !), this architecture, identified as “high-gain, second order loop”, was  described with the greatest detail and indicated as the most common.

Its robustness and versatility are certainly the reasons for such early succes and present longevity, although it is not preferred today for burst-mode or for regenerator applications of CDRs.

ωn2 and ζ as functions of G and τz
As derived in the figure above, the jitter transfer function of the 2-2 loop is: $$\tfrac{Y(s)}{X(s)} = \tfrac{(s\tau_f + 1)}{(s^2\tfrac{\tau_f}{G}+s\tau_f + 1)} $$

 Note: $&tau;$f   =    $&tau;$z

To derive the loop parameters ω0 and ζ from the circuit parameters ωz and G, let's contrast the two versions of the jitter transfer function: $$\tfrac{Y(s)}{X(s)} = \tfrac{( 1 + \tfrac{s}{\omega_z})}{(1+\tfrac{2 \zeta s}{\omega_0} +  \tfrac{s^2}{\omega_0^2 })} =  \tfrac{(s\tau_z +1)}{(\tfrac{s^{2}\tau_z}{G} + s\tau_z + 1)} $$

 Note: 1/$&omega;$z = $&tau;$z ; $&omega;$o = $&omega;$n2 = undamped natural frequency; $&zeta;$ = damping ratio Equating the two pairs of significant coefficients of the denominators: $$ \tfrac{2\zeta}{\omega_o} $$= &tau;z  and: &omega;o&zeta;  =$$\tfrac{G\tau_z}{2}       $$  → →

Dimensional check:

G = Gφ Gf GVCO [rad/sec]

Gφ [volt/rad], Gf [volt/volt], GVCO [rad /(sec-volt)]

ωn22 = G/τz [sec-2]

ζ = $\sqrt{G&tau;_{z}/2}$ [ a-dimensional ]

Jitter transfer function
$$\tfrac{Y(j\omega)}{X(j\omega)} = \tfrac{( 1 + \tfrac{j\omega}{\omega_z})}{(1+\tfrac{2j \zeta \omega}{\omega_{n2}} - \tfrac{\omega^2}{\omega_{n2}^2 })} $$ The characteristic equation is:   a(s) = 0, where   a(s) = s2+ 2ζωn2s + ωn22= 0.

The poles p1 and p2 are the roots of a(s): $$ \,\! p_1, p_2 =-\omega_{n2}\zeta \mp\omega_{n2}\sqrt{\zeta^2-1}=-\tfrac{G}{2}\mp\tfrac{\sqrt{G^2-\tfrac{4G}{\tau_z}}}{2}= \tfrac{-G\tau_z\mp G\sqrt{\tau_z^2 - \tfrac{4\tau_z}{G}}}{2\tau_z}= \tfrac{-G \mp \sqrt{G^2 - \tfrac{4G}{\tau_z}}}{2}     $$ Its magnitude is: $$|\tfrac{Y(j\omega)}{X(j\omega)}| = 20 log_{10} \tfrac{( \omega^2\tau_z^2 + 1)^\tfrac{1}{2} } {(\omega^2\tau_z^2 + (1-(\tfrac{\omega^2\tau_z}{G})^2 )^\tfrac{1}{2}}     $$ [[File:Jitter transfer functions 1 1, 2 1 , 2 2.png|thumb|center|600px|alt=Jitter transfer functions of the PLLs of order 1 type 1, order 2 type 1 and order 2 type 2, as well as the transfer functions of the two filter blocks for the two order 2 loops.| Jitter transfer functions of the loops of  order 1 type 1, order 2 type 1 and order 2 type 2.

Filter cut-off frequencies, damping ratios and natural undamped frequencies are chosen for a meaningful comparison. ]] The high frequency roll-off of the jitter transfer function of this 2nd order type 2 loop is a single pole low pass (20 dB/decade) -like the 1st order type 1 loop-, instead of a double pole low pass (40 dB/decade) of the 2nd order type 1 PLL.

ωz = ωn2 /2ζ

If ωz << ωn2 (i.e. when ζ >>1), the loop behaves very much like a slow first order, type 1 loop with the additional, elimination of the steady state error (of the type 1 loop).

This can be understood considering that If instead ωz has been designed to be greater  than  ωn2 /2, then ζ becomes smaller and smaller  (ζ =  ωn2 /2ωz )    and the loop becomes underdamped at frequencies close to ωn2 /2. Overshoots at the otput of the filter will appear. In this condition, the non linearity (the saturation boundaries) of the node between filter and VCO will be reached very often. This clamping at the saturation boundaries may be seen as a “reduction of the underdamping”, and may be inevitable (and therefore accepted) in loops with very narrow tuning range of the VCO.
 * the first pole at ωn2(1-&radic;(ζ2-1)) ≈ 2ωz compensates the zero at ωz and that
 * the second pole is at a frequency much larger than ωn2, that is at ωn2(1+&radic;(ζ2-1)) ≈ ωn2ζ.

The optimum would be in the interval  0.7 < ωn2/2ωz <1.3.


 * But this circuit architecture is often used with bang-bang phase detectors whose gain Gφ varies with the signal amplitude, and is maximum at the smallest signal amplitude (= when the phase jitter is minimum that is when acquisition is almost or fully achieved).
 * In that case the loop behaviour is (approximately!) like a linear overdamped loop (ζ = Gτz/4 where G is much larger because Gφ, although variable with the error signal, is much larger than in the linear model).

The magnitude of the jitter transfer function in a 2-2 loop model always shows some gain peaking
The magnitude of the 2nd order type 2 loop always exhibits a gain peaking, no matter what the values of the fundamental parameters are, at a frequency &omega;peak: $${\omega_p} = {\omega_z} \sqrt{\sqrt{\ 1+8\zeta^2}-1} $$ = $$ \tfrac{\omega_n2} {  2 \zeta }\sqrt{\sqrt{1+8\zeta^2}-1} $$ and the magnitude of the jitter transfer function starts from 1 (=0 dB) at frequency zero, grows gradually to the peak point and then starts its fall with an asymptotic slope of -20 dB/decade.

Error signal
$$\Epsilon (s) = Y(s)- X(s) = X(s) - X(s) \tfrac{( 1 + \tfrac{s}{\omega_z})}{(1+\tfrac{2 \zeta s}{\omega_{n2}} +  \tfrac{s^2}{\omega_{n2}^2 })} = X(s) \tfrac{(1+\tfrac{2 \zeta s}{\omega_{n2}}  +  \tfrac{s^2}{\omega_{n2}^2 } -1-\tfrac{s}{\omega_z})}{(1+\tfrac{2 \zeta s}{\omega_{n2}}  +  \tfrac{s^2}{\omega_{n2}^2 })} = X(s) \tfrac{( \tfrac{s^2}{\omega_{n2}^2 } +s(\tfrac{2 \zeta}{\omega_{n2}} -\tfrac{1}{\omega_z}))}{(1+\tfrac{2 \zeta s}{\omega_{n2}}  +  \tfrac{s^2}{\omega_{n2}^2 })} $$

The magnitude of the ratio error/input, i.e. of the normalized error-signal function, is: $$ |\tfrac{\Epsilon (j\omega) }{X(j\omega)}| = 20log_{10}\tfrac{(\tfrac{\omega^4}{\omega_{n2}^4}+\omega^2(\tfrac{2\zeta}{\omega_{n2}}-\tfrac{1}{\omega_z})^2)^\tfrac{1}{2}}{(\tfrac{\omega^2}{\omega_{z}^2}+(1-\tfrac{\omega^2}{\omega_{n2}^2})^2)^{\tfrac{1}{2} } }$$ [[File:Norm error functions 1 1, 2 1 , 2 2.png|thumb|center|750px|alt=Jitter transfer functions of the PLLs of order 1 type 1, order 2 type 1 and order 2 type 2, as well as the transfer functions of the two filter blocks for the two order 2 loops.| Normalized error-signal functions of the loops of order 1 type 1, order 2 type 1 and order 2 type 2.

Filter cut-off frequencies, damping ratios and natural undamped frequencies are chosen for a meaningful comparison. ]] zero in ωz

poles in - ζωn2 ∓  ωn2 $\sqrt{ζ² - 1}$

Jitter tolerance
The normalized jitter tolerance can be obtained

 under the hypothesis that the tolerance is limited by (and only by) the lateral eye opening, which is reasonable in most practical cases, see also the relevant page as |X(jω)|&Epsilon;(jω) = 1 that is:

$$ |{X(j\omega)}|_{{\Epsilon(j\omega)}=1} = 1 / 20log_{10}\tfrac{(\tfrac{\omega^4}{\omega_{n2}^4}+\omega^2(\tfrac{2\zeta}{\omega_{n2}}-\tfrac{1}{\omega_z})^2)^\tfrac{1}{2}}{(\tfrac{\omega^2}{\omega_{z}^2}+(1-\tfrac{\omega^2}{\omega_{n2}^2})^2)^{\tfrac{1}{2} } }$$

[[File:Norm tolerance functions 1 1, 2 1 , 2 2.png|thumb|center|750px|alt=Normalized jitter tolerance functions of the PLLs of order 1 type 1, order 2 type 1 and order 2 type 2, as well as the transfer functions of the two filter blocks for the two order 2 loops.| Normalized jitter tolerance functions of the loops of order 1 type 1, order 2 type 1 and order 2 type 2.

Filter cut-off frequencies, damping ratios and natural undamped frequencies are chosen for a meaningful comparison. ]]

 It may be noted that the Bode plot of the curve of normalized jitter tolerance is the mirrored image (across the x axis) of the normalized error curve.

The asintote towards low frequencies (in the log-log plot) has a slope of 40 dB/ decade (as opposite to the slope of 20 dB/ decade  of the type 1 systems).

This is typical of all type 2 systems, that are more tolerant ( 20 dB/ decade more) of low frequency jitter than type 1 systems.

The rejection of generated (VCO) noise…..
Noise injected into the different nodes of the PLL loop reaches the output modified by the loop operation.

See also the page Clock and Data Recovery/Noise is shaped by the PLL structure.

The description in the s domain of such modifications for a 2nd order type 2 PLL is: [[File:Block diagram and noise equations 2-2.png|thumb|center|700px|alt=The phase noise generated inside each PLL block is modified before it appears at the PLL output. Block diagram and equations for the 2nd order type 2 loop.| The phase noise generated inside each PLL block is modified before it appears at the PLL output,

block diagram and equations for the 2nd order type 2 loop. ]]

The noise generated by the filter Nf is modified by the transfer equation TFNf = (TFVCO) / 1 + TFPhComp*TFfilter*TFVCO) The noise generated by the VCO No is modified by the transfer equation TFNo = 1/(1 + TFPhComp*TFfilter*TFVCO)

[[File:VCO noise - transfer functions 1 1, 2 1 , 2 2.png|thumb|center|750px|alt=VCO noise - transfer functions of the PLLs of order 1 type 1, order 2 type 1 and order 2 type 2, as well as the transfer functions of the two filter blocks for the two order 2 loops.| VCO noise - transfer functions VCO-to-output of the loops of order 1 type 1, order 2 type 1 and order 2 type 2.

Filter cut-off frequencies, damping ratios and natural undamped frequencies are chosen for a meaningful comparison. ]]

Y(s) = X(s) *    ((Gφ Gf GVCO)((sτz + 1 )/τzs2))   /    (1 +  (Gφ Gf GVCO)((sτz + 1 )/τzs2))
 * + Nφ(s)   *   (Gf GVCO)/((sτz + 1 )/τzs2)       /    (1 +  (Gφ Gf GVCO)((sτz + 1 )/τzs2))
 * + Nf(s)             *              (GVCO/s)                   /     (1 +  (Gφ Gf GVCO)((sτz + 1 )/τzs2))
 * + No(s)                 *                  1                        /     (1 +  (Gφ Gf GVCO)((sτz + 1 )/τzs2))

Y(s)/No(s)  =     s2τz   /  ( s2τz  +  (Gφ Gf GVCO)((sτz + 1 )) Y(s)/No(s)   =     s2τz   /  ( s2τz  +  Gsτz + G )

two zeros in the origin and two poles at:   − ( G  +  √( G2− 4G/τz ) ) / 2  ;   −  (  G − √( G2− 4G/τz   ) ) / 2

Its magnitude is:
 * Y(jω)/No(jω)| = 20log10((ω2τz)/(ω2τz2G2+(G-ω2τz )2)1/2)

A 2 - 2 loop attenuates the VCO noise at all frequencies below $$\omega_{22}$$, with a double slope (40 dB/decade). There can be noise amplification at certain frequencies because of the gain magnitude oveshoots 0 dB, whenever $$\zeta_{22}$$ <­$\sqrt{1/2}$. The peaking of the overshoot occurs at &omega; = &omega;22 / $\sqrt{1 &minus; 2&zeta;&sup2;}$, and reaches as high as   20log10(1 / (2&zeta;$\sqrt{1 &minus; 2&zeta;&sup2;}$)). The following figure illustrates the behavior of the 1-1 and 2-2 loops (using on purpose for the 2 - 2 a damping ratio that is unacceptably low) and gives the relevant formulas. [[File:VCO Noise transfer 1-1 n 2-2.png|thumb|center|750px|alt=VCO to output (noise) transfer functions of the PLLs of order 1 type 1 and order 2 type 2, as well as the transfer function of the filter block for the order 2 loop| VCO to output (noise) transfer functions of the PLLs of order 1 type 1 and order 2 type 2, as well as the transfer function of the filter block for the order 2 loop.

The damping ratio of the 2nd order loop has been chosen too low on purpose, to emphasize the risk of amplification of noise at certain frequencies. ]]
 * The 2-2 loop is a good choice if a noisy VCO must be used and is certainly preferable when some loop parameters can vary in a wide range because of hard non linearities (if G can become very large in certain conditions e.g. when a bang-bang detector is used)).

This architecture is the best of the three to mitigate a noisy VCO (see the double slope of attenuation for low frequencies), but the damping ratio $$\zeta_{22}$$ shall remain larger than $\sqrt{1/2}$ = 0.707, to avoid amplification of noise frequencies around &omega;22.

Unit Step Response
The analysis in the frequency domain (jitter transfer, error function, jitter tolerance, noise transfer) models the circuit behavior in the "small signal" conditions.

The Unit Step Response is part of the same mathematical model, and gives a time domain perspective of the circuit,

that complements the frequency domain perspective offered by the jω functions.

The Unit Step Response can be obtained from the jitter transfer function, multiplying it by 1/s and inverse transforming.

In fact the (unit) step response shows the response of the PLL output phase to an abrupt variation of the input phase.

The (unit) step response is used primarily to see how the acquisition phase evolves towards phase lock.

The step response of this type of loop is fast because the loop filter does not attenuate the high frequencies, (like in the case of the 1st order loop, and unlike the case of the 2nd order type 1 loop).

The output phase overshoots significantly (it does so even for ζ ≥ 1) the input (that is a unit step starting at t = 0).

The overshoot with ζ ≥ 1 is a consequence of the amplification of the low frequencies and of the infinite gain at d.c. in the loop filter.

The area of the step response above the asymptote compensates exactly for the area below.



It is however important to be cautious when using the step response to model the system in case of large abrupt variations of the input phase.

Care is necessary because the boundaries of linear operation of the system (the range of the phase comparator, the swing of the filter output, the control range of the VCO, ..) can easily be reached and exceeded during a (relatively) large transient. The CDR will -very likely- still operate correctly but its performances may not be well described by this linear model during such transient.

The response when left free-running
The CDR is left free-running, for instance, when the incoming signal has no level transitions ( and consequently the phase comparator cannot detect its phase ).

At that moment the phase comparator can only output its neutral - i.e. no phase difference - level.


 * In a 1st order loop, the comparator output waveform is applied directly to the VCO input (apart from a possible flat amplification).
 * The VCO abruptly changes its frequency (that was fp as long as it was in lock) jumping to its free-running frequency ffr.
 * The sampling point (its phase is the integral of the VCO frequency step) drifts from its lock-in point following a linear (phase) ramp.
 * The slope of the ramp is the frequency difference between the free-running frequency of the local oscillator and the frequency of the remote transmit oscillator:

Δf = ffr - fp.
 * The (1st order type 1) loop drifts 1 rad exactly after a time equal to: fp / |fp – ffr| periods of received pulses.

When transitions disappear, the comparator output does not show any (big) change: zero it was and zero it becomes. But the infinite d.c. gain, in this open loop condition, makes the circuit evolution depend on the small manufacturing imprecisions! The unit step response of the loop filter is the sum of a unit step plus a ramp of slope 1/&tau;z, multiplied by Gf. But the actual response is generated by a step of height equal to just the output offset of the phase comparator in its neutral state (plus the possible error signal, originated by input jitter, present immediately before), therefore attenuated in proportion with respect to the unit step response! This offset is originated by manifacturing mismatches between circuit stages that are theoretically identical, and amounts to around one percent of the total signal range, while the step (of the type 1 loops) coming from (fp - ffr) / fp is closer to 20 percent points. ''The figure above contrasts the behavior of the three fundamental loops, assuming that all have the same fp, the same Gf and the same VCO gain. This helps understand the differences in the architectural sense, but in practice each of the three models would be used in a different application, under widely different conditions.''
 * In a 2nd order type 1 loop, the loop filter smooths down the frequency step. The phase ramp does not start immediately, but smoothly. The smoothing corresponds to the time constant of its filter, τf.
 * In a 2nd order type 2 loop, as long as correct lock is maintained, the comparator output signal is about zero. The filter that follows, with its practically infinite gain at d.c., is able to provide exactly the "drive error" (that corrects the VCO from ffr to fp) with a negligible signal level at its input.

The 2nd order type 2 loop transits from lock to free-running with neither frequency nor phase discontinuity  at the beginning it drifts less than the loops of type 1, but gradually accelerates its drift because of the integration of low frequencies in its filter,

and eventually overtakes the drift of the type 1 loops.