# Clock and Data Recovery/Miscellanea

### Unit step responses from the (jitter) transfer functions

The unit step response can be obtained from the (jitter) transfer function as follows:

• take the (jitter) transfer function that is in the s domain (maybe using r in lieu of s/ωn to simplify the notation, i.e. scaling ωn to 1 ) : its reverse transform (that is a function of t) is the unit impulse response. (The transform of the unit impulse is just a constant 1 in the s domain.)
• multiply the (jitter) transfer function by the transform of the unit step function, that is 1/s
• inverse-transform into the time domain, i.e. obtain the USR. (Note: when the change of scale property f(s/a) → a*F(t*a) is used, it does not apply to the factor 1/s coming from the unit step, because the step is a unit step!)

1st order, type 1 loop
$\tfrac{y(s)}{x(s)} = \tfrac{1}{(\tfrac{s}{\omega_n} + 1)}$ = $L\Big\{$Unit Impulse Response$\Big\}$
$\tfrac{y(s)}{ s x(s)}=\tfrac{1}{s}\tfrac{1}{(\tfrac{s}{\omega_n}+1)}= \tfrac{1}{s}\tfrac{\omega_n}{(s+\omega_n)}$ = $L\Big\{$Unit Step Response$\Big\}$
The inverse Laplace transform, by the property:

${\color{Midnight Blue} L^{-1}\big\{\tfrac{f(s)}{s}\big\} = \int\limits_{0}^{t}F(u)\, du}$, and by:

${\color{Midnight Blue}L^{-1}\big\{\tfrac{1}{s+a}\big\}=e^{-at}}$ is:
$\int\limits_{0}^{t}\omega_ne^{-\omega_n t} dt =\omega_n\left |\tfrac{e^{-\omega_nt}}{-\omega_n} \right |_0^t$
$= {\color{Blue}1 - e^{-\omega_n t}}$

2nd order, type 1 loop
$\tfrac{y(s)}{x(s)}$ = $L\Big\{$Unit Impulse Response$\Big\}$ $= \tfrac{1}{\left ( \tfrac{s^2}{\omega_{n2}^2}+\tfrac{2s\zeta}{\omega_{n2}}+1\right ) }$
$\tfrac{y(s)}{sx(s)}=\tfrac{1}{s}\tfrac{1}{\left(\tfrac{s^2}{\omega_{n2}^2}+\tfrac{2s\zeta}{\omega_{n2}}+1\right)}=\tfrac{1}{s}\tfrac{1}{\left(\tfrac{s}{\omega_{n2}}+\zeta \right)^2+\left(1-\zeta^2\right)}$

the factor: ${\color{Midnight Blue}\tfrac{1}{\left(\tfrac{s}{\omega_{n2}}+\zeta \right)^2+\left(1-\zeta^2\right)}}$ can be inverse-transformed using:

${\color{Midnight Blue}L^{-1}\Big\{\tfrac{1}{\left(r+\zeta\right)^2+\left(1-\zeta^2\right)}\Big\}=\tfrac{e^{-\zeta t}\sin{\sqrt{1-\zeta^2}t}}{{1-\zeta^2}t}}$, where: r = ${\color{Midnight Blue}\tfrac{s}{\omega_{n2}}}$,

and the change of scale property: ${\color{Midnight Blue}f\left(\tfrac{s}{\omega_{n2}}\right)}$${\color{Midnight Blue}\omega_{n2}F\left(\omega_{n2}t\right)}$
$L^{-1}\Big\{\tfrac{1}{s}\tfrac{1}{\left(\tfrac{s}{\omega_{n2}}+\zeta \right)^2+\left(1-\zeta^2\right)}=\int\limits_{0}^{t}\omega_{n2}\tfrac{e^{-\zeta\omega_{n2}u}\sin{\sqrt{1-\zeta^2}\omega_{n2}u}}{\sqrt{{1-\zeta^2}}}\, du \,\!$

${\color{Midnight Blue}\int\limits_{0}^{x}e^{ax}\sin{bx}\, du=\tfrac{e^{ax}(a\sin{bx}-b\cos{bx})}{a^2+b^2}; \quad a=-\zeta\omega_{n2} ;\quad b=\omega_{n2}\sqrt{1-\zeta^2} } \,\!$

$=\tfrac{\omega_{n2}}{\sqrt{1-\zeta^2}} \left | \tfrac{e^{ax}(a\sin{bx}-b\cos{bx}) }{a^2+b^2}\right |_0^t$
$=\tfrac{\omega_{n2}}{\sqrt{1-\zeta^2}} \left | \frac{e^{-\zeta\omega_{n2}x}(-\zeta\omega_{n2}\sin{\sqrt{1-\zeta^2}\omega_{n2}x}-\sqrt{1-\zeta^2}\omega_{n2}\cos{\sqrt{1-\zeta^2}\omega_{n2}x})}{\omega_{n2}^2\zeta^2+ (1-\zeta^2)\omega_{n2}^2} \right |_0^t$

$=\tfrac{ \left [ e^{-\zeta\omega_{n2} t}(-\zeta\sin{\sqrt{1-\zeta^2}\omega_{n2}t}-\sqrt{1-\zeta^2}\cos{\sqrt{1-\zeta^2}\omega_{n2}t}) -e^{-\zeta\omega_{n2} 0}(-\sqrt{1-\zeta^2}) \right ]}{\sqrt{1-\zeta^2}}$
$=\tfrac{\left [ -e^{-\zeta\omega_{n2} t}(\zeta\sin{\sqrt{1-\zeta^2}\omega_{n2} t}+\sqrt{1-\zeta^2}\cos{\sqrt{1-\zeta^2}\omega_{n2}t})+\sqrt{1-\zeta^2} \right ]}{\sqrt{1-\zeta^2}}$
$={\color{red}1 -\tfrac{ e^{-\zeta\omega_{n2}t}\left ( \zeta\sin{\sqrt{1-\zeta^2}\omega_{n2}t}+\sqrt{1-\zeta^2}\cos{\sqrt{1-\zeta^2}\omega_{n2}t} \right )}{\sqrt{1-\zeta^2}}}$

2nd order, type 2 loop
$\tfrac{y(s)}{x(s)} = \tfrac{(s\tau_z + 1)}{(s^2\tfrac{\tau_z}{G}+s\tau_z + 1)}$
${\color{Midnight Blue}\tau_z=\tfrac{2\zeta}{\omega_{n2}}}$
$\tfrac{y(s)}{x(s)}$ = $L\Big\{$Unit Impulse Response$\Big\}$ $= \tfrac{\tfrac{2s\zeta}{\omega_{n2}}+1}{\left ( \tfrac{s^2}{\omega_{n2}^2}+\tfrac{2s\zeta}{\omega_{n2}}+1\right ) }$
$\tfrac{y(s)}{sx(s)}=L\Big\{$Unit Step Response$\Big\}=\tfrac{1}{s}\tfrac{\tfrac{2s\zeta}{\omega_{n2}}+1}{\left(\tfrac{s^2}{\omega_{n2}^2}+\tfrac{2s\zeta}{\omega_{n2}}+1\right)}=\tfrac{1}{s}\tfrac{\tfrac{2s\zeta}{\omega_{n2}}+1}{\left(\tfrac{s}{\omega_{n2}}+\zeta \right)^2+\left(1-\zeta^2\right)}$
$L^{-1}\Big\{\tfrac{1}{s} \Big( \tfrac{\tfrac{2s\zeta}{\omega_{n2}}}{\left(\tfrac{s}{\omega_{n2}}+\zeta \right)^2+\left(1-\zeta^2\right)} + \tfrac{1}{\left(\tfrac{s}{\omega_{n2}}+\zeta \right)^2+\left(1-\zeta^2\right)} \Big) \Big\}$
$= L^{-1}\Big\{ \tfrac{2\zeta}{\omega_{n2}} \tfrac{1}{\left(\tfrac{s}{\omega_{n2}}+\zeta \right)^2+\left(1-\zeta^2\right)} \Big\}+USR_{2.1}$

the factor: ${\color{Midnight Blue}\tfrac{1}{\left(\tfrac{s}{\omega_{n2}}+\zeta \right)^2+\left(1-\zeta^2\right)}}$ can be inverse-transformed using:

${\color{Midnight Blue}L^{-1}\Big\{\tfrac{1}{\left(r+\zeta\right)^2+\left(1-\zeta^2\right)}\Big\}=\tfrac{e^{-\zeta t}\sin{\sqrt{1-\zeta^2}t}}{{1-\zeta^2}t}}$, where: r = ${\color{Midnight Blue}\tfrac{s}{\omega_{n2}}}$,

and the change of scale property: ${\color{Midnight Blue}f\left(\tfrac{s}{\omega_{n2}}\right)}$${\color{Midnight Blue}\omega_{n2}F\left(\omega_{n2}t\right)}$

to obtain: ${\color{Midnight Blue}\omega_{n2}\tfrac{e^{-\zeta\omega_{n2} t}\sin{\sqrt{1-\zeta^2}\omega_{n2} t}}{\sqrt{1-\zeta^2}}}$

$=\tfrac{2\zeta\omega_{n2}}{\omega{n2}}\ \tfrac{e^{-\zeta\omega_{n2}t}\sin{\sqrt{1-\zeta^2}\omega_{n2}t}}{\sqrt{1-\zeta^2}} + 1 -\tfrac{ e^{-\zeta\omega_{n2}t}\left ( \zeta\sin{\sqrt{1-\zeta^2}\omega_{n2}t}+\sqrt{1-\zeta^2}\cos{\sqrt{1-\zeta^2}\omega_{n2}t} \right )}{\sqrt{1-\zeta^2}}$
$= 1 +\tfrac{ e^{-\zeta\omega_{n2}t}\left ( 2\zeta\sin{\sqrt{1-\zeta^2}\omega_{n2}t} - \zeta\sin{\sqrt{1-\zeta^2}\omega_{n2}t}-\sqrt{1-\zeta^2}\cos{\sqrt{1-\zeta^2}\omega_{n2}t} \right )}{\sqrt{1-\zeta^2}}$
$= {\color{ForestGreen}1 +\tfrac{ e^{-\zeta\omega_{n2}t}\left ( \zeta\sin{\sqrt{1-\zeta^2}\omega_{n2}t}-\sqrt{1-\zeta^2}\cos{\sqrt{1-\zeta^2}\omega_{n2}t} \right )}{\sqrt{1-\zeta^2}}}$

The three cases are plotted together here below, using parameter values primarily to allow a meaningful comparison.

It should be emphasized that the value of ζ used for the second order loops in this figure is lower than the values used in practice.

Responses of the 3 fundamental models of PLL to an input step of 1 rad.
Parameters are chosen to produce a meaningful comparison, although the value of ζ for the second order loops is lower than the values used in practice.

### Architectures of just order 1 and 2? Not by chance!

There are just two orders of CDR architectures that are used in actuality.

They can be identified by the order of their jitter transfer functions:

1. first order, for the phase aligner CDR, (that was introduced at the beginning of the book as:)
2. second order, for both the possible types 1 and 2, (that were also introduced in the same page).

This “a posteriori” result can be associated elegantly with an “a priori” mathematical theory.

It is known that any possible transfer function can be well approximated by a rational function of the complex frequency “s” (i.e. by the ratio of two polynomials in s).
A rational function in turn can be represented by a partial fraction expansion:

F(s) = $\frac{\sum_{i=0}^m b^i s^i}{\sum_{i=0}^n a^i s^i}$= $\frac{\sum_{i=0}^m b^i s^i}{\prod_{i=1}^r (s+p_i)^n_i}$ = $b_n + \sum_{i=1}^r \sum_{k=1}^{n_i} \frac{c_ik}{(s+p_i)^k}$
F(s) = $\frac{\sum_{i=0}^m b^i s^i}{\sum_{i=0}^n a^i s^i}$ = $b_n + \frac{c_{11}}{(s+p_1)} + \frac{c_{22}}{(s-\sigma -j\omega)(s-\sigma +j\omega)} +$ more complex terms
(the denominator polynomial has $n_1$ roots equal to $p_1$, $n_2$ roots equal to $p_2$, ... , $n_r$ roots equal to $p_r$ where $\textstyle \sum_{i=1}^r \textstyle n_i$ = n)

which –in simpler terms- means that a CDR can be made with a first order loop, or with a second order loop, or with a product/sum of them.

Common engineering sense dictates that a design be “as simple as it can be made”.

Therefore just one of the simplest possibilities will be chosen:

• a constant $b_n$ is a flat jitter transfer function, and not a real choice;
• a first order (jitter) transfer function will be the choice when the prime considerations are a simple implementation, a quick response (=acquisition) and a high resilience to parameter drifts and non-linearities;
• a second order (jitter) transfer function will be the choice when either the low frequency performances (steady state error = d.c. phase error ; rejection of low frequency generated noise; ..) or the high frequency performances (tight bandwidth for input jitter filtering) are prime concerns. The 2.2 will be selected in the first case, the 2-1 in the second.
• any other (inevitably more complex) possibility does not offer much more performances while it makes the circuit more sensitive (often too sensitive) to parameter variations and to small non-linearities.

The three fundamental models are further developed in three dedicated chapters :

### PLL Simulator

#### What they are

These modeling and simulation programs are free software pieces based on a simple calculation sheet generated with Open Office (free software as well); the calculation files can be found and downloaded clicking on:

PLL Simulator 11 21 22 linear PhComp Rev 3.3 August 21 2011
PLL Simulator 11 21 22 bang-bang PhDet Rev 3.2 August 29 2011
PLL 11 21 22 linear small signal models of Jitter transfer, error, tolerance and noise Rev 1.0 August 13 2011

They run on any standard PC and simulate the acquisition phase of a PLL inside a CDR circuit.

The first in the list simulates the signals inside a PLL circuit based on a linear phase detector.
The second in the list simulates the signals inside a PLL circuit based on a bang-bang phase detector.
The third in the list models the magnitudes of the jω functions of the small signal linear model of the circuits simulated in the first program in the list.

Each of the three programs covers the three main topologies of a PLL: 1st order (type 1), 2nd order type 1 and 2nd order type 2.

##### Hardware platform

It has been developed on a Dell Studio 1555, with Intel® Core2® Duo CPU @2.20 GHz, 4.0 GB RAM, Microsoft Windows 7 Home Premium.

##### Software platform

This simulator file has been developed with: OpenOffice.org Calc
OpenOffice.org is a free open software that can be downloaded from www.openoffice.org

#### Purpose

Didactic, to:

• identify and point out the fundamental blocks of the PLL, and consequently of the clock recovery part of the CDR.
• Each block is identified in its function, its input/output connections, its characteristic and its main limitations (= its inevitable non-linearities).
• The simulated structure is the complete structure of a 2nd order PLL.
• The filter is the full feature 1st order filter, represented as a block of flat gain Gf, followed by a single pole at ωf.
• understand the overall PLL (= clock recovery) operation.
• get familiar with the formulas and equations that constitute the mathematical model (and with their implementation in the simulator or modeling calcsheets).
• introduce the concept of discrete time, as actual PLLs are often made with digital, discrete-time circuitry. In fact this tool:
• only uses 1500 time or frequency steps,
• uses difference equations in form of recurrence relations. See also: Difference_equations for the formulas used in the simulation of the loop filter and of the VCO.

##### Previous versions

An early version of this simulator (Rev. 1.x) used only:

• Values of ωn2, ζ , or G and τf, very close to 1. In fact, all values were “normalised”. This avoided the scaling burden to the software, but requested a corresponding effort to the user.
• The loop filter was represented as an true analog circuit, made of an operational amplifier, two resistors and one capacitor. Input values were the values of the resistors and capacitor in the filter circuit.
• A single page to input data and to picture the corresponding acquisition waveforms as well as the filter and jitter transfer functions.

A later version of this simulator (Rev. 2.x) used :

• Automatic scaling of x-axis (frequencies or times) and of y-axis (phases, voltages or magnitudes).
• Coverage of only the 2nd order type 1 topology of PLL.
• No added bias at the VCO input to simulate the difference between line frequency and oscillator free running frequency ( that was introduced only in the 2011 versions).
• A separate sheet (Input data) to input data and others to picture the corresponding acquisition waveform as well as the filter and jitter transfer function.
• Acquisition and magnitude functions in the same file.

Each file includes some description sheets that give a lot of details on how the software is constructed, so that it becomes easy to understand and even to modify.
The reader is invited to take advantage of those pages as much as of those that do the actual computations.
Each block simulated follows the description that can be found inside this book, that is repeated and furter detailed in the explanation sheets of each software piece.

#### Limitations

These programs are simple tools and are correspondingly limited.
Necessary cautions are related to:

The period of the received line pulses does not coincide with the time step used in the simulations. The latter is -in most of the possible cases- significantly longer.
The only frequencies that appear are the frequencies that characterize the loop operation. They are the only ones that are really simulated or plotted.
The line frequency shall always be -for the cases you want to simulate - significantly higher (typically 20 or more times higher) than any frequency significant for the loop operation.
The programs only use 1500 time or frequency steps.
A PLL is simulated, not an entire CDR. The simulator will show events like :
stuttering of the phase error as the input sinusoidal variations (that represent mostly the intersymbol interference jitter) trick the phase comparator back and forth across the tooth edges of the sawtooth characteristic;
clock slips, that are easily detected when the PLL ends tracking a signal parallel to the input signal, but with a gap that is multiple of the comparator range.
The simulator programs will not be able to show:
bit errors, because the simulations do not consider the input bit stream, but only its phase;
loop gain variations (consequence of variable input transition density, or of non linear gain of the phase detector). This is because of the same reason already mentioned for the point above. See: The CDR phase comparator for more considerations.
In spite of the many limitations, these tools are valid and complex enough to assist the average electronic engineer
towards a better comprehension of the PLL operation inside a CDR.

### Burst-mode upstream: 20 to 50 transitions for locking into an incoming burst. Case of the 2.5 Gbps US/ 1.25 Gbps DS GPON

http://www.itu.int/rec/T-REC-G.984.2/en ITU-T Rec. G.984.2

The example of GPON is more significant than EPON could be, because:
• GPON specs are more demanding in the burst acquisition phase, and
• GPON specifications define the fastest burst-mode receiver (in acquisition) that be still good in locked state performances, at the frequencies of the optical access applications.