# Clock and Data Recovery/Structures and types of CDRs/The CDR' amplifier/filter

This CDR block, in comparison with the phase comparator and the VCO, requires much less hardware effort to be implemented. Therefore it adapts itself to the interfaces that the two other blocks present to it and
its performances complement what is available from the other two blocks
to achieve the desired characteristics of the overall loop.
When analyzing an existing CDR, in order to find out its fundamental blocks, and to find the fundamental architecture that corresponds (or at least comes closest) to it, the amplifier/filter is the easiest block to identify.
* First, it is the easiest to identify because it is the only block (unlike the phase comparator and the VCO) that needs not operate at frequencies as high as the line pulse frequency f$_p$. In fact, it operates at the "loop" frequencies (that are always lower and often even some decades lower than f$_p$). Consequently the technology used to implement the CDR is more than adequate for the amplifier/filter, which looks like the least sophisticated of the three blocks.
* Second, because it is a simple, self contained circuit block with only one input and one output and only one function to accomplish. The phase comparator may be combined with the pulse regenerator and bit decoder, with a run-length mitigator, etc.. The VCO may incorporate DLLs, special LC tuned networks, variable rate dividers, etc..
In some cases, this block may be just a level shifter, or a flat gain amplifier, or may not be present at all. In all cases though, this block exhibits a linear behavior, with the only exception sometimes at its output interface (the VCO drive) if it helps control the inherent non-linearity of the VCO at its end_of_range extremes.
In all cases, this block decides which of the different reference models apply. Whether the loop is a 1-1, 2-1 or 2-2, depends on it only.

## Large signals view

This amp/filter block adapts itself to the other two and its input and output interfaces match the output interface of the phase comparator and the input interface of the VCO.
The signal range at the output of the phase comparator corresponds to the phase interval that the comparator can follow before a slip takes place (multiplied by the comparator phase-to-voltage gain, Gφ).
The input range of the amp/filter is designed to match it exactly.
At the other interface, the filter output is designed to match the signal range that the VCO can accept at its input.

## Small signals view

All CDRs identify, inside the received signal, a frequency close to the free-running frequency of the VCO f$_{fr}$, and reject any other frequency that differs from f$_{fr}$ more than a certain, small amount. This amount is a characteristic bandwidth of the CDR, and is conceptually the same as the "jitter bandwidth" of the CDR. This is primarily a consequence of the integration performed by the VCO. To maintain the PLL "low-pass" requirement, also the amplifier/filter is always some sort of low-pass (that degenerates into a flat gain block in the simplest of all architectures, as presented in the example page, Section: 1st order, type 1).

### Flat gain

For the simplest PLL architecture of interest (loop of 1st order and of type 1 [link indietro]), the filter structure is the simplest: just an amplifier with a flat gain of value G$_f$ (at all frequencies of relevance for the loop operation). For such a PLL with flat gain in the intermediate block, the loop jitter low-pass frequency is called ω$_{n1}$.

### Low-pass, for more sophisticated PLLs

Besides the PLL with a flat gain block, two PLL architectures are of interest, that depend only on the architecture of the amplifier/filter itself:
* 1st order low-pass with a single pole (the PLL is a 2nd order type 1 loop):
* 1st order low-pass with a single zero (the PLL is a 2nd order type 2 loop):
The overall performances of these two 2nd order PLLs are analysed in the following page :
* The (slave) CDR based on a second order PLL
and each separately in :
* 2nd order type 1
* Applications of the 2nd order type 1 architecture
and in :
* 2nd order type 2
* Applications of the 2nd order type 2 architecture.

#### Equations of the 1st order low-pass filter in general

In general, a first order linear filter, with one zero and one pole, has the pole always at a frequency lower than the zero to be a low-pass.
(Its output, unbound in the ideal model, will be additionally brutally clamped to +/- Range [V] when implementing the simulator program).
The reference used to derive the model equations (and the recurrence relation of the linear part for the simulator) can be a possible analog implementation with an operational amplifier, 3 resistors and one capacitor.
The filter transfer function is obtained using the concept that the inverting input of an Op Amp stays at the same voltage of the other input, and that its impedance is infinite:
x(s)/R$_1$ = y(s)/R$_2$ + y(s)/(R$_3$+1/sC) y(s)/x(s) = [R$_2$(sCR$_3$ + 1)] / [R$_1$(sCR$_2$ +sCR$_3$ + 1)]
Where:
G$_0$ = R$_2$/R$_1$
G$_∞$ = R$_3$R$_2$ / (R$_1$(R$_2$+R$_3$)
τ$_z$ = R$_3$C ; τ$_p$ = C (R$_2$+R$_3$)
To have a calculation sheet simulate the filter, time is considered discrete, and every row of the calculation sheet represents one instant in a sequence. The row index k = 1,2,3,... is the reference index for all the time sequences and Δt is the discrete time step. A sequence x[k] can then be used as the representation of the input signal and a sequence y[k] as the representation of the output signal. A description of the first order filter with difference equations allows the computation of every y[k] from y[k-1], x[k] and x[k-1]. $_{(Asystemofhigherorderwouldneed,forthecomputationoftheoutputsample,correspondinglyoldersamplesfromtheinputandtheoutputsequences.}$ $_{Forinstance,asecondordersystemwouldrequirey[k-1],y[k-2],x[k],x[k-1]andx[k-2]forthecomputationofy[k]).}$ In the case of our first order filter, let's use the Capacitor equation:
ΔV = (I*Δt)/C
v$_C$[k] – v$_C$[k-1] = i$_C$[k]Δt/C
Note that this is a backward difference, in compliance with the causality of our system.
(As the capacitor is the only element with memory, it is the only one that is described by a first order difference equation). A second equation can be obtained from the Kirchoff's First Law applied to the node of the inverting input (no current flows into the inverting input of the Op Amp):
and a third equation from the Kirchoff's Second Law applied to the loop of the Op Amp output network:
Combining (1), (2) and (3), the intermediate variables i$_C$[k] and v$_C$[k] can be eliminated, and the solution found with respect to y[k].
x[n] Δt/R$_1$ – y[n] Δt/R$_2$ = y[n]C - R$_3$C(x[n]/R$_1$ – y[n]/R$_2$) – y[n-1]C + CR$_3$( x[n-1]/R$_1$ – y[n-1]/R$_2$) (1 & 2 & 3)
__ __

#### 1st order low-pass with a single zero

If R$_2$ = ∞ (i.e. if the PLL is of 2nd order, type 2) :
Where:
τ$_z$ = CR$_3$ τ$_f$ =τ$_z$ = 1/ω$_c$, with ω$_c$ = filter cut-off frequency y(s)/x(s) = G$_f$ (sτ$_z$ + 1) / sτ$_z$
The overall PLL block diagram, including the two hard non-linearities that are in the simulation but not in the model, is:
The low-pass filter recurrence relation for the simulation can be derved from:
i$_C$[k] = C(v$_C$[k] – v$_C$[k-1]) (1)
i$_C$[k] = i$_{R1}$[k] = x[k]/R$_1$ (2)
v$_C$[k] = y[k] – R$_3$ i$_C$[k] (3)
Combining (1), (2) and (3), the intermediate variables i$_C$[k] and v$_C$[k] can be eliminated, and the solution found with respect to y[k]:
The resulting equation can then be inserted in a calculation sheet for the simulation program. (The ratio R$_3$/R$_1$ corresponds to the high frequency gain G$_∞$ and the time constant R$_3$C corresponds to the time constant τ$_z$ of the finite zero).
An alternative way of presenting the single zero filter, to introduce the 2-2 PLL as a 1-1 loop with an additional integration [link], coming to the same results, is the following:
Recursive equation for the flat gain block:
$\mathbf {out} {[n]}$
$\mathbf {G} *\mathbf {x} {[n]}$
Recursive equation for the integrator block of gain 1:
$int[n]={\frac {1}{\tau _{i}}}\textstyle \sum _{1}^{n}x[k]\Delta t$
$int[n]={\frac {1}{\tau _{i}}}\textstyle \sum _{1}^{n-1}x[k]\Delta t+\displaystyle x[n]{\frac {\Delta t}{\tau _{i}}}$
$int[n]=int[n-1]+x[n]{\frac {\Delta t}{\tau _{i}}}$
It should be noted that an integrator (more appropriately: an "accumulator" in the discrete time domain) needs only one parameter to be identified. If τ$_i$ ( ω$_i$ = 1/τ$_i$ is the angular frequency for which the gain is 1 i.e. 0 dB) is chosen, then the above applies. The equation can be re-written, without change of result, using G$_i$ = 1/τ$_i$ or using ω$_i$ = 1/τ$_i$.
Recursive equation for a flat gain block of gain G$_f$ in parallel with an integrator of time constant τ$_i$:
$y[n]=G_{f}*x[n]+int[n]$
$y[n]=G_{f}x[n]+int[n-1]+x[n]{\tfrac {\Delta t}{\tau _{i}}}$
$y[n]=G_{f}x[n]+(y[n-1]-G_{f}x[n-1])+x[n]{\tfrac {\Delta t}{\tau _{i}}}$
_________ _______________
If the filter is to be part of a PLL, the relation ω$_c$ /ω$_{n1}$ is fundamental for the loop operation.
In a CDR of the 2nd order and type 2, the filter cut-off frequency ω$_c$ should be made smaller than 1/4 of the loop ω$_{n1}$ (ω$_{n1}$ is G, the open loop gain, or the forward gain if the filter was just a flat amplifier G$_f$).
As it will be shown, a 2nd order type 2 loop where ω$_c$ is larger than ω$_{n1}$/4 is underdamped according to ω$_{n1}$/(4ω$_c$) = ζ$^2$.

#### 1st order low-pass with a single pole

If R$_3$ = 0 (i.e. if the PLL is of 2nd order, type 1) :
Where:
τ$_p$ = CR$_2$
τ$_p$ = 1/ω$_c$ -> ω$_c$ = filter cut-off frequency
y(s)/x(s) = G$_f$ / (sτ$_p$ + 1)
The filter gain is flat from d.c. to the cut-off frequency, and then decreases with a slope of -20 dB/decade.
The overall PLL block diagram, including the two hard non-linearities that are in the simulation but not in the model, is:
The low-pass filter recurrence relation for the simulation can be derved from:
ΔQ = C ΔV (1)
i$_C$[k]Δt = C(y[k] – y[k-1]) (1)
i$_C$[k] = x[k]/R$_1$ – y[k]/R$_2$ (2)
Combining (1) and (2), it is possible to solve with respect to y[k], eliminating the intermediate variables i$_C$[k] and v$_C$[k], and to get the formula for the calculation sheet:
x[k]Δt/R$_1$ - y[k]Δt/R$_2$ = C(y[k] – y[k-1])
y[k](1+ Δt/CR$_2$) = y[k-1] + x[k]Δt/CR$_1$
y[k] = ( y[k-1] + x[k]Δt G$_f$/τ$_p$ ) / (1+ Δt/τ$_p$ )
If the filter is to be part of a PLL, the relation ω$_c$ /ω$_{n1}$ is fundamental for the loop operation.
In a 2nd order type 1 loop the filter cut-off frequency ω$_c$ should be made larger than 1/4 of the loop ω$_{n1}$ (ω$_{n1}$ is the same as G, the open loop gain, or the forward gain if the filter was just a flat amplifier G$_f$).
As it will be shown, a 2nd order type 1 loop where ω$_c$ is smaller than ω$_{n1}$/4 is underdamped according to ζ$^2$ = 4ω$_c$ /ω$_{n1}$.

## In case of a charge pump

When the last stage of the phase comparator is a charge pump, the performances of the loop amplifier/filter depend both on the charge pump current and on the additional RC networks . The following figure also shows the Bode plots of the transfer functions of the two (passive) filtering options:
The transfer functions are:
         * 2-2:v$_o$/i$_i$ = (1/s(C$_f$ + C)) * ( (1 + sRC$_f$) / (1 + sRC')) ; C' = series of C and C$_f$
         * 2-1:v$_o$/i$_i$ = R$_2$ / ( (1 + sR$_1$C)*(1 + sR$_2$C$_f$) + sCR$_2$))
These networks exhibit a high frequency pole that is influenced by C (1/RC' with C' = CC$_f$/(C+C$_f$) in the 2-2 case and 1/R$_1$C + 1/R$_2$C$_f$ in the 2-1 case). The frequency of this pole is always high enough not to influence the closed loop performances in the frequency band of interest. It corresponds to the need to prevent the high frequency noise (generated by the comparator logic and the charge pump) from propagating outside these circuit blocks. Otherwise said, the capacitor C and the poles it creates are not considered for the PLL order and type. When no RC network is present besides the capacitor C, the loop is a 1st order loop. The considerations above, about C filtering high frequency noise of the charge pump without influencing the fundamental PLL operation, hold good as well.

## References

* ↑ Floyd M. Gardner, "Charge-Pump Phase-Lock Loops", vol. COM-28, NO.11, pp. 1849 - 1858, November 1980 in IEEE TRANSACTION ON COMMUNICATION.
| ← Clock and Data Recovery/Structures and types of CDRs | Clock and Data Recovery | Clock and Data Recovery/Structures and types of CDRs/The CDR phase comparator → |