\chapter{Injection Locked Ring Oscillator Modelling}
\label{chapter:model}

In this chapter, a \textsc{Matlab}\footnote{\textsc{Matlab} R2019b and R2020b were used.} model of a differential \ac{ILRO} will be presented. In the first section, the motivation for the model will be discussed. Afterwards, the model itself will be described. Following that, the various simulation outputs of the model will be discussed, and in the penultimate section, the various analyses that can be performed using the model will be presented. Finally, the limitations of the model will be acknowledged.

\section{Motivation and goals}

It is important to discuss the motivation for the model, and the questions it should be able to answer.

\textsc{Matlab} models of \ac{IC} blocks are, in general, used for top-level block simulations from the system design point of view during architecture definition project stages. It is important to note that when a low level or a device level block is to be modelled, \textsc{Matlab} models offer limited accuracy. The reason is that in reality, the real behaviour of these low level blocks is far from ideal, governed instead by complicated transistor device physics. The lower the level of the block, the more inaccurate are the idealized macromodels.

In this thesis, a \textsc{Matlab} model of a differential \ac{ILRO} will be created to  obtain and/or confirm knowledge and intuition about the injection locking phenomenon, reveal some design trade-offs and answer some of the unanswered questions with regards to \acp{ILRO}. The goal is to create a relatively simple model quickly, capable of helping the designer reach conceptual understanding of the \ac{ILRO} during the architecture definition stage, i.e. before the design stage even begins. The actual physical implementation can be optimized later with better suited tools such as the Cadence Virtuoso \& ADE suite.

There are a few questions related to the behaviour of an \ac{ILRO} that the literature has not answered yet. These are the effects of injection clock duty cycle variation on the locking range, or the effect of injection pulse width on locking range or injection clock duty cycle sensitivity.

\section{Model overview}

There are two main ways a \textsc{Matlab} model of a circuit can be created. Either the transient waveforms can be calculated step by step with explicit difference equation loops via a script, which is a very flexible but challenging and time-consuming method (as essentially a custom transient simulation engine needs to be created), or a Simulink model can be created using Simscape blocks schematically. The second approach yields results much faster and is therefore preferable for pre-design models such as the one in this thesis, although it does offer less control to the user.

There were two variants of the model created - an eight stage \ac{ILRO}, as shown on \autoref{fig:matlab_ilro_8} in the appendices, and a sixteen stage \ac{ILRO}. The sixteen stage oscillator schematic is wide and not legible on an A4 paper, the full sized schematics are therefore available in the accompanying digital appendix (see \autoref{chapter:digital_appendix}).

\subsection{Differential inverter model}

Since an \ac{ILRO} only consists of several inverters and an injection circuit, the choice of model for the inverter is important.

The simplest possible model of an inverter which still bears some semblance to its real counterpart is shown on \autoref{fig:matlab_inverter}. This model is functionally identical to the one used for the mathematical analysis on \autoref{fig:ilro_simple}. 

\begin{figure}[htb]
	\centering
	\includegraphics[width=11cm]{matlab/Inverter_diff_schema.pdf}
	\vspace{-0.1cm}
	\caption{Differential inverter model in Simulink} \label{fig:matlab_inverter}\vspace{-0.3cm}
\end{figure}

An input capacitance is followed by a voltage sensing double pole switch, connecting the output either to ground or the supply rail through a resistor. If the voltage on the capacitor crosses a specific threshold, the switch changes state in an opposite way, i.e. if the voltage rises above the threshold, the switch connects the output to ground and vice versa. Therefore, the input capacitance of the next inverter in the ring is charged or discharged through the output resistance of the previous inverter. The differential action is not implemented faithfully, as the differential inverter model simply contains two independent single ended inverters.

Clearly, this model has its shortcomings. It does not reflect any non-linearity of inverter gain or $g_\s{m}$ and it is pseudo-differential at best. However, the model is simple enough to guarantee relatively fast simulation time. This is important, as when oscillators are simulated and relatively high frequency domain precision is desired, a large number of samples and periods is required (easily in the range of hundreds of thousands of sampled points over thousands of oscillation periods).

Several parameters of this model have been \enquote{masked} so that they can be set from the top hierarchical level in Simulink. Apart from the obvious ones, such as $R$, $C$, $V_\s{DD}$ or $V_\s{th,sw}$, the initial voltage of the capacitor $V_\s{C,0}$ is crucial for \enquote{kickstarting} the oscillations as soon as possible during simulation runtime.

\subsection{Injection signal}

While it would be possible to recreate the injection circuit from \autoref{fig:injection_circuit} in Simulink, it is not necessary. First of all, the inverter model is idealized as it is, and secondly, Simscape is not very efficient at solving feedback systems. It was determined that implementing the injection circuit from \autoref{fig:injection_circuit} slowed down the simulation by as much as a factor of ten.

Instead, the current will be injected using ideal rectangular pulses via dependent current sources. It is expected that the dominant factor is not the shape of the pulse, but the charge injected in a given time period.

Default Simulink blocks are used to implement waveform shaping. Any zero-crossing waveform source block can be used at the input of the shaper to produce constant width rectangular pulses. The advantage of this approach is that the source block can be a pulse train block, where the duty cycle can be varied, or a chirp, sweeping through a range of frequencies over time. In both cases, the waveform shaping blocks create a train of identical pulses at the times when the source waveform crosses zero, whatever its original shape.

\begin{figure}[htb]
	\centering
	\includegraphics[width=12.5cm]{matlab/pulse_schema.pdf}
	\vspace{-0.1cm}
	\caption{Injection pulse train generator} \label{fig:matlab_pulse}\vspace{-0.3cm}
\end{figure}

\begin{figure}[htb]
	\centering
	\includegraphics[width=10cm]{matlab/chirp_schema.pdf}
	\vspace{-0.1cm}
	\caption{Injection pulse chirp generator} \label{fig:matlab_chirp}\vspace{-0.3cm}
\end{figure}

The way this is done is shown on \autoref{fig:matlab_pulse} and \autoref{fig:matlab_chirp}. First, the source waveform is delayed by $\mathtt{pw}$. Then, the delayed and the original waveforms pass through the \enquote{sign} block, which returns 1 for positive values, -1 for negative values and 0 for zero. The results are subtracted, and the outcome of this subtraction is non-zero only during zero-crossings of the source waveform for the time specifed by $\mathtt{pw}$. This way, pulses of fixed length $\mathtt{pw}$ and amplitude $\pm 2$ are created. The $0.5$ gain block brings the amplitude to $\pm 1$, and the final gain block scales the size of the pulse by $\mathtt{a\_inj}$, which is the height of the current pulses in Amperes. This value is then fed into the Simscape current sources.

Additionally, a noise source is added to the rectangular pulses, as seen on \autoref{fig:matlab_ilro_8} (the red white noise source block on the left). Even though the noise is injected along with the current pulses, it models the noise of the ring oscillator itself. This is useful for phase noise simulations.

\subsection{Default simulation parameters}
\label{subsec:sim_params}

The simulation parameters listed in \autoref{tab:default_params} were used for all simulations which will be discussed in the following sections, unless specified otherwise. Similarly, the sixteen stage \ac{ILRO} model will be used by default.

\begin{table}[htb]
\centering
\caption{Default simulation parameters}
\label{tab:default_params}
\begin{tabular}{ccc}  
\toprule
Parameter 			&  Default value  			& Note	\\
\midrule
\texttt{res} 			& \SI{1000}{\ohm} 			& inverter output resistance 	\\
\texttt{cap} 			& \SI{72.5}{\femto\farad} 	& inverter input capacitance 	\\
\texttt{cap{\_}esr} 	& \SI{0}{\ohm} 			& inverter input capacitance \acs{ESR}	\\
\texttt{vdd} 			& \SI{1.2}{\volt} 			& supply voltage	\\
\texttt{vth} 			& \SI{0.6}{\volt} 			& inverter switch threshold	\\
\texttt{sw{\_}g{\_}open} & \SI{1}{\nano\siemens} 		& inverter switch open conductance	\\
\texttt{sw{\_}r{\_}closed} & \SI{0.1}{\ohm} 	& inverter switch closed resistance	\\
\texttt{pw} 			& \SI{100}{\pico\second} 	& injection pulse width	\\
\texttt{a{\_}inj} 		& \SI{200}{\micro\ampere} 	& injection pulse height	\\
\texttt{duty{\_}cycle} 	& \SI{50}{\percent} 		& injection clock duty cycle	\\
\texttt{noise{\_}power} 	& 0 						& height of \acs{PSD} of white noise	\\
\texttt{ts} 			& \SI{10}{\pico\second} 		& sampling period	\\
\bottomrule
\end{tabular}
\end{table}%

Via \autoref{eq:ro_freq}, the free running frequency of the eight stage \ac{ILRO} model using the parameters listed in \autoref{tab:default_params} is
\begin{equation}
f_\s{osc}=\frac{1}{2NRC\ln\left(2\right)}=\frac{1}{2\cdot 8 \cdot 1000 \cdot 72.5 \cdot 10^{-15}\cdot\ln\left(2\right)}=\SI{1.244}{\giga\hertz}
\end{equation}
and similarly for the sixteen stage \ac{ILRO} model, \SI{621.9}{\mega\hertz} (a half of the eight stage $f_\s{osc}$) can be calculated.

\section{Simulation outputs}

There are multiple types of simulation outputs which the model offers. The transient data can be viewed on its own, transformed into the frequency domain or viewed from both time and frequency points of view simultaneously with a spectrogram.

It has to be noted that the model is sensitive to solver accuracy. Optimum performance was achieved using the \enquote{ode45} variable-step solver along with a relative tolerance no larger than $10^{-8}$. Otherwise, the solver errors accumulate and the waveforms can even erroneously stop oscillating.

\subsection{Transient waveforms}
\label{subsec:transient}

The primary type of output from Simulink models are transient waveforms, an example of which is shown on \autoref{fig:lowf} and \autoref{fig:highf}. On these two figures, $i_\s{inj}$ is the differential injected current waveform, $v_\s{prev}$ is the differential voltage at the stage preceding the injection stage and $v_\s{inj}$ is the differential voltage at the injection stage (the reason their polarity is the same is that the preceding stage is cross connected to the injection stage, as seen on \autoref{fig:matlab_ilro_8}).

Transient waveforms can be used directly or for further post processing, as shown in \autoref{subsec:time_domain_measurements}.

\begin{figure}[p]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_lowf.pdf}
	\vspace{-0.3cm}
	\caption{\acs{ILRO} model period of oscillation for $\acs{finj} < \acs{f0}$} \label{fig:lowf}\vspace{-0.3cm}
	
	\vspace{1cm}	
	
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_highf.pdf}
	\vspace{-0.3cm}
	\caption{\acs{ILRO} model period of oscillation for $\acs{finj} > \acs{f0}$} \label{fig:highf}\vspace{-0.3cm}
\end{figure}

\subsection{Frequency domain}
\label{subsec:freq_domain}

Transient waveforms can be used to calculate their frequency domain representation via \ac{DFT}. To obtain \ac{PSD}, the \texttt{pwelch()} command can be used, utilizing Welch's method of pre-processing the transient signal by cutting it into segments, windowing and transforming them into frequency domain separately and averaging the spectra. This method achieves easily readable low noise plot at the cost of lower frequency resolution.

\begin{figure}[htb]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_psd_lock_unlock.pdf}
	\vspace{-0.3cm}
	\caption{\acs{PSD} of \acs{ILRO} model when injection pulled and locked} \label{fig:psd_pull_lock}\vspace{-0.3cm}
\end{figure}

An example of a \ac{PSD} calculated with the \texttt{pwelch()} command is shown on \autoref{fig:psd_pull_lock}, focusing on the first harmonic region of the frequency range. In the first case, $f_\s{inj}=\SI{606}{\mega\hertz}$, which is just outside the lower edge of the locking range for the default simulation parameter (see \autoref{tab:default_params}) sixteen stage \ac{ILRO}. The oscillator does not lock, but is pulled instead. The first harmonic frequency decreases and the spectrum smears, containing a large number of products of \ac{finj} and \ac{f0}.

In the second case, $\ac{finj}=\SI{606.5}{\mega\hertz}$, which is a frequency only slightly different to the previous case, but \enquote{inside} the locking range. The oscillator is locked and its spectrum is clean, containing only a single harmonic at \ac{finj}. This observation can be used for determining the size of the locking range.

\subsection{Spectrogram}
\label{subsec:spectrogram}

A spectrogram is shown on \autoref{fig:spectrogram}. This spectrogram focuses on the first harmonic of the sixteen stage \ac{ILRO} model, where the input injection signal is a chirp rising linearly in frequency over time.

\afterpage{\begin{landscape}
\begin{figure}[p]
\begin{center}
\captionsetup{type=figure} 
    \includegraphics[width=22.25cm]{grafy/spectrogram.pdf}
    \captionof{figure}{Spectrogram of a clock phase first harmonic with chirp injection signal}
    \label{fig:spectrogram}
\end{center}
\end{figure}
\end{landscape}}

From the start of the simulation until $t=\SI{2.5}{\micro\second}$, the oscillator is free running, oscillating at roughly \SI{621.9}{\mega\hertz}, as calculated in \autoref{subsec:sim_params}. At $t=\SI{2.5}{\micro\second}$, the injections start at roughly $\ac{finj}=\SI{604}{\mega\hertz}$. This is outside the locking range of the oscillator, but close enough so that the oscillator is pulled to this frequency immediately. This is clearly visible, as the first harmonic frequency quickly decreases from \SI{621.9}{\mega\hertz} to approximately \SI{619.5}{\mega\hertz}, and additional frequency content appears, as discussed and shown previously in \autoref{subsec:freq_domain}.

As the frequency of the injections \ac{finj} increases, the oscillator is pulled more and more, until $t\approx\SI{6}{\micro\second}$, when the oscillator locks at $\ac{finj}\approx\SI{607}{\mega\hertz}$ and all other harmonics disappear. This clean harmonic rises in frequency along with \ac{finj}, until \ac{finj} crosses the free running frequency \SI{621.9}{\mega\hertz} at $t\approx\SI{30}{\micro\second}$. This is accompanied by a slight but visible disturbance in the frequency contents, as the envelope of the oscillations suddenly changes shape (this is visible on the plots from \autoref{subsec:transient}). Finally, at $t\approx\SI{47}{\micro\second}$, \ac{finj} reaches approximately \SI{634}{\mega\hertz} and the oscillator unlocks. 

The spectrogram can be clearly used a crude way of determining the locking range, but because the number of points per period needed to achieve high frequency resolution is very high, and the length of the transient simulation to achieve good temporal resolution has to be very long, both the simulations and the spectrogram building take a long time.

\section{Analyses}

In the following subsections, analyses meant to provide the desired insights about the \acp{ILRO}, such as the locking range, duty cycle sensitivity or injection pulse width dependencies will be presented.

Unless otherwise specified, all the following analyses were performed on the sixteen stage \ac{ILRO} model by default.

\subsection{Locking range}
\label{subsec:locking_range}

In this subsection, locking range of the \ac{ILRO} models will be determined and compared to analytical predictions, which have been derived in \autoref{sec:ilro}.

In order to determine the locking range, the locked state needs to be distinguished. There are two main approaches to this: the frequency domain approach and the time domain approach. 

The frequency domain approach was foreshadowed in \autoref{subsec:freq_domain} or \autoref{subsec:spectrogram}. When the oscillator locks, the magnitude spectrum features a single clean tone in the first harmonic region of the frequency range at \ac{finj}.

The time domain approach works more visually, as when the oscillator is not locked, the envelope of the injection stage voltage is periodically pulsating at a frequency significantly lower than \ac{finj} due frequency pulling which resembles amplitude modulation.

Whatever the method used, the results for the locking range are the same. The absolute locking range of the sixteen stage \ac{ILRO} model is shown on \autoref{fig:abs_locking}, and the relative locking range of the two models is shown on \autoref{fig:rel_locking}. The relative locking range is calculated as

\begin{equation}
{\delta}f_\s{LR}=\frac{{\Delta}f_\s{LR}}{\ac{f0}}=\frac{f_\s{inj,max}-f_\s{inj,min}}{\ac{f0}}
\end{equation}

therefore the locking range can be also expressed as $\pm 0.5\cdot{\delta}f_\s{LR}\cdot 100\%$ distributed approximately symmetrically around \ac{f0}.

\begin{figure}[htb]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_abs_locking.pdf}
	\vspace{-0.3cm}
	\caption{Locking range of the \acs{ILRO} model as a function of injection ratio} \label{fig:abs_locking}\vspace{-0.3cm}
\end{figure}

\begin{figure}[htb]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_rel_locking.pdf}
	\vspace{-0.3cm}
	\caption{Relative locking range of \acs{ILRO} models as a function of injection ratio} \label{fig:rel_locking}\vspace{-0.3cm}
\end{figure} 

Based on the charts on \autoref{fig:abs_locking} and \autoref{fig:rel_locking}, this symmetry of the locking range only holds for $K < 0.3$, which is the range of interest for most \ac{FTDC} applications. The reason why for higher $K$ the center of the locking range strays away from \ac{f0} towards the lower frequencies is unknown. It could be a physical effect manifesting also in device level simulations, or it might be a quirk of this type of models, as it is predicted by both the equation \autoref{eq:ilro_lockrange_analytic} and this Simulink model. 

The locking range predicted by \autoref{eq:ilro_lockrange_analytic} and determined with the Simulink model match well for $K < 0.3$. The discrepancy between the analytical prediction and the model is significant only for the $f_\s{inj,min}$ limit when the injection ratio is high. The analytical model behaves hyperbolically in this region, which is clearly not a physical result, while the Simulink model clearly approaches a finite value.

The fact that the Simulink model and the analytical expression match so well is interesting, as the analytical derivation assumed a different shape of the injection signal - for that derivation, a wide 50 \% duty cycle square wave was used, while the Simulink model features short injection pulses. While the shape of the injection waveform might not affect the width of the locking range significantly, as the deciding factor is the amount of charge injected in total during the \enquote{sensitive period} as discussed in \autoref{subsec:ilro_limitations}, it does affect other parameters, as will be discussed later in \autoref{subsec:matlab_pw}.

\subsection{Time domain measurements}
\label{subsec:time_domain_measurements}

In this subsection, the time domain metrics used by the analytic \ac{ILRO} model from \autoref{sec:ilro} such as the injection waveform phase shift $\Delta$ and its equivalent injection angle $\vartheta$ or the zero cross delay caused by the injection $d$ will be measured.

First, it is necessary to define these quantities in context of the different injection waveform. This is showcased on \autoref{fig:time_domain_measurement}.
The injection phase shift $\Delta$, or the injection angle $\vartheta$ respectively, were measured with a \textsc{Matlab} script as the distance between the zero crossing instant of the differential voltage signal of the falling edge of the previous stage and the rising edge of the injection pulse. 

The zero cross delay $d$ measurement is a bit more complicated. First, assuming the stage immediately preceding the so-called injection stage is the last stage, the time between the zero cross of the second to last stage and the last stage is measured by a \textsc{Matlab} script. This time interval is unaffected by the injections in this model. Then, the time interval between the zero crossing of the previous stage and the injection stage is measured. The difference between these two time measurements is $d$.

\begin{figure}[htb]
	\centering
	\includegraphics[width=11cm]{obrazky/time_domain_measurement.pdf}
	\vspace{-0.2cm}
	\caption{Definition of time domain measurements} \label{fig:time_domain_measurement}\vspace{-0.3cm}
\end{figure} 

The charts mapping the various time domain metrics against \ac{finj} are shown on \autoref{fig:delta}, \autoref{fig:inj_angle} and \autoref{fig:d}. The injection frequency in these charts is swept from \SI{607}{\mega\hertz} to \SI{634}{\mega\hertz}, as that is the locking range for the sixteen stage \ac{ILRO} model with default simulation parameters as listed in \autoref{tab:default_params}.

\begin{figure}[p]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_delta.pdf}
	\vspace{-0.4cm}
	\caption{The phase shift $\Delta$ of the \acs{ILRO} model as a function of $f_\s{inj}$} \label{fig:delta}\vspace{-0.3cm}
	
	\vspace{1cm}
	
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_angle.pdf}
	\vspace{-0.4cm}
	\caption{The injection angle $\vartheta$ of the \acs{ILRO} model as a function of $f_\s{inj}$} \label{fig:inj_angle}\vspace{-0.3cm}
\end{figure} 

In the charts plotting $\Delta$ or $\vartheta$, it is clearly visible that when $\ac{finj} > \ac{f0}$, the injection pulses aligns in phase with the injection stage oscillation waveform and hasten its zero crossings. On the other side of the locking range, when $\ac{finj} < \ac{f0}$, the injection waveform is in the opposite phase, delaying the zero-crossings of the injection stage. The transition between these two regions is rather sharp for reasons which will be explained shortly.

In contrast to the charts of $\Delta$ or $\vartheta$ stands \autoref{fig:d}, depicting the $d=f\left(f_\s{inj}\right)$ function, which is nearly perfectly linear (linear regression yields $R^2=0.9997$, signalling precise fit). This is not surprising. When the oscillation frequency of the \ac{ILRO} needs to match $\ac{finj}\neq \ac{f0}$, a non-zero value of $d$ is required, and the oscillatory period $T_\s{osc}$ is a linear function of $d$ as shown in \autoref{eq:ilro_lockrange_def}.

An interesting quirk of the chart on \autoref{fig:d} is that while at the lower end of the locking range, the $d$ can reach nearly \SI{20}{\pico\second}, at the higher end of the locking range, $d$ can only reach approximately \SI{16}{\pico\second}. The source of this asymmetry is unknown, but is clearly identical to the source of the asymmetry of the locking range itself, as discussed in \autoref{subsec:locking_range}.

\begin{figure}[p]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_d.pdf}
	\vspace{-0.4cm}
	\caption{The zero cross delay $d$ of the \acs{ILRO} model as a function of $f_\s{inj}$} \label{fig:d}\vspace{-0.3cm}
	
	\vspace{1cm}
	
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_angle_vs_d.pdf}
	\vspace{-0.4cm}
	\caption{The zero cross delay $d$ of the \acs{ILRO} model as a function of $\vartheta$} \label{fig:angle_vs_d}\vspace{-0.3cm}
\end{figure}

On the figure \autoref{fig:angle_vs_d}, the function $d=f\left(\vartheta\right)$ is shown. This chart explains why the $\Delta = f\left(f_\s{inj}\right)$ and $\vartheta = f\left(f_\s{inj}\right)$ functions feature such an abrupt transition in the vicinity of \ac{f0}. The reason is that the injection pulses can only really significantly affect the zero-crossing delay during the \enquote{sensitive period} as discussed in \autoref{subsec:ilro_limitations}. When $\vartheta\approx \SI{0}{\degree}$, the injection pulse adds to the rising edges, when $\vartheta\approx \SI{180}{\degree}$, the injection pulse subtracts from the rising edges. When $\vartheta$ is in-between (approximately \SI{30}{\degree} to \SI{90}{\degree}), the injection pulses align with the flat parts of the injection stage voltage waveform, where they have little to no effect, producing no significant change to $d$.

An interesting feature of the function shown on \autoref{fig:angle_vs_d} is that the function is asymmetric, i.e. the positive $d$ and the negative $d$ parts have a different shape (the positive $d$ part is much less linear). The reason for this asymmetry is not known, but it might be a quirk of models approximating inverter gate transitions with exponential $RC$ circuit charging waveforms, and/or might be linked to the source of the locking range asymmetry.

\subsection{Phase noise}
\label{subsec:phase_noise_model}

Another analysis that was performed is the \ac{PSD} analysis. The goal here was to determine whether or not injection locking improves phase noise performance of the oscillator.

Two \SI{50}{\micro\second} long simulations of the differential voltage at the last stage before the injection stage were performed. Noise was injected into the injection stage with the \enquote{Band-Limited White Noise} block ($\mathtt{noise{\_}power}=10^{-22}$). In one case, the oscillator was free-running, in the other, it was locked to $\ac{finj}=\SI{618}{\mega\hertz}$. The first \SI{10}{\micro\second} of the simulations were cut off due to transients at the start of the oscillations. The rest of the signals formed 450002 points, which were processed with the \texttt{pwelch()} command to obtain Welch's \ac{PSD} estimate. A 112500 points long Hann window was used to provide a clearer plot. The result is shown on \autoref{fig:psd}, where the oscillation frequency was normalized to enable comparative analysis.

\begin{figure}[hbt]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_psd.pdf}
	\vspace{-0.4cm}
	\caption{Power spectral density of a free-running and injection locked \acs{ILRO}} \label{fig:psd}\vspace{-0.3cm}
\end{figure}

It can be clearly seen that injection locking does improve phase noise of \acp{ILRO} in the vicinity of the main harmonic. This was explained for LC tank based \acp{ILO} back in \autoref{subsec:paradox_pnoise}, but was not discussed for \acp{ILRO}. 

The reason why the phase noise is improved is that without injection locking, ring oscillators accumulate jitter \cite[p.46]{li}. This means that the jitter of each transition, i.e. the difference between the ideal zero cross time and the real one, directly affects the zero cross time of the next stage and so on. Injection locking can overcome the jitter by forcing the transitions to occur at a specified frequency, essentially resetting the accumulated jitter with each injection. The noise is not removed altogether, but it does not accumulate in the vicinity of the oscillation harmonics any more.

In \autoref{subsec:paradox_pnoise}, it was determined that the frequency region where the phase noise is improved corresponds to the locking range. According to the Simulink model, this is not the case. Instead, the region seems to be about half of the locking range. 

\subsection{Injection clock duty cycle}
\label{subsec:ilo_modelling_duty}

In this section, the sensitivity of the \ac{ILRO} to the injection clock duty cycle variation will be examined. The \autoref{fig:inj_clock_duty_cycle} examines the effect of the injection clock duty cycle variation on the injection pulses.

\begin{figure}[htb]
	\centering
	\includegraphics[width=11cm]{obrazky/injection_clock_duty_cycle.pdf}
	\vspace{-0.2cm}
	\caption{The effect of injection clock duty cycle on injection pulse timing} \label{fig:inj_clock_duty_cycle}\vspace{-0.3cm}
\end{figure}

Based on the quantities highlighted on \autoref{fig:inj_clock_duty_cycle}, the duty cycle of the injection clock, and by extension also the duty cycle of the injection pulses, can be calculated with the following equation.
\begin{equation}
\mathit{DC}=\frac{T_\s{1}}{T_\s{inj}}=1-\frac{T_\s{2}}{T_\s{inj}}
\end{equation}

The effect of the duty cycle variation on locking range is shown on \autoref{fig:duty}.

\begin{figure}[p]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_rel_duty.pdf}
	\vspace{-0.4cm}
	\caption{Relative locking range of the \acs{ILRO} model as a function of injection clock duty cycle} \label{fig:duty}\vspace{-0.3cm}
	
	\vspace{1cm}	
	
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_rel_rel_duty.pdf}
	\vspace{-0.4cm}
	\caption{Normalized relative locking range of \acs{ILRO} models as a function of injection clock duty cycle} \label{fig:duty_norm}\vspace{-0.3cm}
\end{figure}

As expected, the duty cycle variation certainly does not benefit the locking range, but the shape of the curve is interesting. Naturally, it is symmetric. At first, it falls off quite rapidly within $\pm 10 \%$ of duty cycle variation, but flattens from there onward. The reason is that for such asymmetric injection clocks, if the oscillator is able to lock at all, one polarity of the pulses completely misses the \enquote{sensitive window} of the oscillation waveform. Varying duty cycle even more does not seem to hurt the locking range as much, as the pulse polarity which is not delivering its charge efficiently only weakly affects the oscillation frequency of the \ac{ILRO}.

The \enquote{single polarity locking} is showcased on \autoref{fig:dc40}, where the transient waveforms of the \ac{ILRO} are plotted. It is clearly visible that the oscillator locked to the negative polarity pulse, as the positive pulse occurs \textit{after} $v_\s{inj}$ crosses zero, thereby not affecting the zero cross timing $d$ at all. On the other hand, the negative polarity pulse performs as intended, because it occurs before the zero is crossed.

\begin{figure}[htb]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_dc40.pdf}
	\vspace{-0.2cm}
	\caption{\acs{ILRO} model period of oscillation for $DC = 40\%$, $\acs{finj}>\acs{f0}$} \label{fig:dc40}\vspace{-0.3cm}
\end{figure}

The relative locking range of both eight stage and sixteen stage \ac{ILRO} models as a function of duty cycle is shown on \autoref{fig:duty_norm}. Since the two models have different relative locking range (as seen on \autoref{fig:rel_locking}), their relative locking range has been normalized to 100\% at $\mathit{DC}=50 \%$ to allow easier comparison. The plot shows a difference of shape - the eight stage model seems to be less sensitive to the injection clock duty cycle.

\subsection{Injection pulse width}
\label{subsec:matlab_pw}

The final analysis of interest in this section is the analysis of the effects of varying injection pulse width. As was already discussed in \autoref{subsec:locking_range}, the locking range does not seem to be affected by the shape of the injection pulses.

However, the pulse width can affect the sensitivity of the \ac{ILRO} to injection clock duty cycle variation significantly, as shown on \autoref{fig:duty_pw}.

\begin{figure}[htb]
	\centering
	\includegraphics[width=14.5cm]{grafy/matlab_rel_duty_pw.pdf}
	\vspace{-0.4cm}
	\caption{Relative locking range of the \acs{ILRO} model for various injection pulse sizes} \label{fig:duty_pw}\vspace{-0.3cm}
\end{figure}

For this analysis, the default pulse width $\mathtt{pw}=\SI{100}{\pico\second}$ an height $\mathtt{a{\_}inj}=\SI{200}{\micro\ampere}$ have been altered. Three variations of the pulse width were made. To achieve comparative results, $\mathtt{a{\_}inj}$ was fine tuned so that the locking range stayed the same, i.e. for the \SI{25}{\pico\second} pulse, the amplitude had to be increased, while for the \SI{400}{\pico\second} pulse, it had to be decreased etc.

The results clearly show that wider pulse width helps massively with the sensitivity to the duty cycle. This can actually be explained with the \enquote{sensitive window} approach again - when the pulses are wide, altering the timing of one of the polarities within reasonable range still results in some overlap with the \enquote{sensitive window} of the oscillation waveform. On the other hand, some part of the injection pulses spends its charge outside of the window, burning power inefficiently.

\newpage
\subsection{Summary}

In this section, several analyses have been discussed. 

First of all, locking range equations derived in \autoref{sec:ilro} were verified. For $K < 0.3$, the equations match the Simulink model within $\approx 0.3\%$ for both the eight and sixteen stage models. 

Secondly, the injection angle $\vartheta$ or the zero cross delay $d$ were evaluated versus \ac{finj} or against each other. These analyses confirmed the intuitive understanding of injection locking proposed by the \enquote{sensitive window} hypothesis (described in \autoref{subsec:ilro_limitations}), at least within the context of the RC circuit based \ac{ILRO} models.

Afterwards, phase noise analysis was presented, again confirming the findings presented in \autoref{subsec:paradox_pnoise}. The phase noise of the \ac{ILRO} model improves when injection locked as expected, although the range of frequencies where this improvement occurs seems to be narrower than predicted by \cite{razavi} for harmonic \acp{ILO}.

A novel analysis was described next, as the effect of the injection clock duty cycle was investigated. There are two key insights: asymmetric injection clock hurts the locking range of the \ac{ILRO}, and this is more severe the higher the number of stages of the \ac{ILRO}.

Finally, the effect of the width of the injection pulses was examined. Naturally, the locking range changes when the pulse width is adjusted. This can be compensated for by also adjusting the height of the injected pulses. Although this fine tuning achieves the same locking range, the sensitivity to duty cycle variation of the injection clock is nevertheless different. Simulations have shown that wider injection pulses lead to less sensitivity to the injection clock at the cost of higher power consumption. This has been explained again with the use of the \enquote{sensitive window} model.

These last two analyses provide insights which could be valuable for device level design of the \ac{ILRO} and its auxiliary blocks. Although the source of the injection clock is usually a \ac{PLL} followed by a clock divider, and the injection clock is therefore symmetric enough, routing the clock through long multi-level clock trees can degrade the symmetry. The duty cycle variation can be compensated for during injection circuit design by widening the injected pulse width and decreasing the pulse height. This, however, increases the total power consumption, as the overall amount of injected charge is now higher. Power consumption of each \ac{ILRO} is important though, as in \ac{TDC} arrays, there will be a high number of them. A performance trade-off has been therefore identified before the device level design started.