\chapter{Mathematical derivations of \acs{ILRO} time domain model}

\section[Zero cross delay derivation for \texorpdfstring{$\Delta>0$}{Delta > 0}]{Zero cross delay derivation for \boldmath{$\Delta>0$}}
\label{add:zc_deriv_pos}

The goal is to find the analytical expression for $d$, which is defined as
\begin{equation}
d\left(\Delta\right) = t_\s{zc}\{v_\s{sum}(t), \Delta \neq 0\}-t_\s{zc}\{v_\s{sum}(t), \Delta = 0\}
\label{eq:d_goal}
\end{equation}
where
\begin{equation}
\begin{split}
v_\s{sum}(t)=v_\s{osc}(t)+v_\s{inj}(t)=
&-V_\s{osc,max} + (V_\s{osc,max} + V_\s{osc})\cdot \exp\left(-\frac{t}{\tau}\right)\\
&-V_\s{inj,max} + (V_\s{inj,max} + V_\s{inj})\cdot \exp\left(\frac{-t+\Delta}{\tau}\right)
\end{split}
\end{equation}
We can start from 
\begin{equation}
v_\s{sum}(t_\s{zc})=0
\end{equation}
and the analytical expression for $t_\s{zc}(\Delta)$ can be derived as follows.
\begin{equation}
\begin{split}
-V_\s{osc,max} + (V_\s{osc,max} + V_\s{osc})\cdot \exp\left(-\frac{t_\s{zc}}{\tau}\right)\\-V_\s{inj,max} + (V_\s{inj,max} + V_\s{inj})\cdot \exp\left(\frac{-t_\s{zc}+\Delta}{\tau}\right)=0
\end{split}
\end{equation}
\begin{equation}
\begin{split}
\exp\left(-\frac{t_\s{zc}}{\tau}\right)\cdot\left[V_\s{osc,max} + V_\s{osc} + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)\right] \\
= V_\s{osc,max}+V_\s{inj,max}
\end{split}
\end{equation}
\begin{gather}
\exp\left(-\frac{t_\s{zc}}{\tau}\right)=\frac{V_\s{osc,max}+V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}\\
\ln\left[\exp\left(-\frac{t_\s{zc}}{\tau}\right)\right]=\ln\left[\frac{V_\s{osc,max}+V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}\right]\\
-\frac{t_\s{zc}}{\tau} = \ln\left[\frac{V_\s{osc,max}+V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}\right]\\
t_\s{zc}\left(\Delta\right) = -\tau\ln\left[\frac{V_\s{osc,max}+V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}\right]\label{eq:tzc_fun}
\end{gather}

We can easily express $t_\s{zc}\{v_\s{sum}(t), \Delta = 0\}$ as
\begin{equation}
t_\s{zc}\left(\Delta=0\right) = -\tau\ln\left(\frac{V_\s{osc,max}+V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} + V_\s{inj,max} + V_\s{inj}}\right)
\end{equation}
and subtracting it from \autoref{eq:tzc_fun} (per \autoref{eq:d_goal}) finally yields
\begin{equation}
\left.d\left(\Delta\right)\right\rvert_\s{\Delta>0} = \tau\ln\left[\frac{V_\s{osc,max} + V_\s{osc} + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}{V_\s{osc,max} + V_\s{osc} + V_\s{inj,max} + V_\s{inj}}\right]
\label{eq:d_delta_pos_add}
\end{equation}

\section[Zero cross delay derivation for \texorpdfstring{$\Delta<0$}{Delta < 0}]{Zero cross delay derivation for \boldmath{$\Delta<0$}}
\label{add:zc_deriv_neg}

This derivation is nearly identical to the one discussed in \autoref{add:zc_deriv_pos}. The only difference is that instead of using 
\begin{equation}
v_\s{inj}(t)= -V_\s{inj,max} + (V_\s{inj,max} + V_\s{inj})\cdot \exp\left(\frac{-t+\Delta}{\tau}\right)
\end{equation}
we use
\begin{equation}
v_\s{inj}(t)= V_\s{inj,max} - (V_\s{inj,max} + V_\s{inj})\cdot \exp\left(\frac{-t+\Delta}{\tau}\right)
\end{equation}

This is because for negative $\Delta$, we are interested in the interaction of the \emph{rising part} of the injection waveform with the falling part of the oscillation waveform. The derivation then continues as shown previously.

The goal is to find the analytical expression for $d$, which is defined as
\begin{equation}
d\left(\Delta\right) = t_\s{zc}\{v_\s{sum}(t), \Delta \neq 0\}-t_\s{zc}\{v_\s{sum}(t), \Delta = 0\}
\end{equation}
where
\begin{equation}
\begin{split}
v_\s{sum}(t)=v_\s{osc}(t)+v_\s{inj}(t)=
&-V_\s{osc,max} + (V_\s{osc,max} + V_\s{osc})\cdot \exp\left(-\frac{t}{\tau}\right)\\
&+V_\s{inj,max} - (V_\s{inj,max} + V_\s{inj})\cdot \exp\left(\frac{-t+\Delta}{\tau}\right)
\end{split}
\end{equation}

We can start from 
\begin{equation}
v_\s{sum}(t_\s{zc})=0
\end{equation}
and the analytical expression for $t_\s{zc}(\Delta)$ can be derived as follows.
\begin{equation}
\begin{split}
-V_\s{osc,max} + (V_\s{osc,max} + V_\s{osc})\cdot \exp\left(-\frac{t_\s{zc}}{\tau}\right)\\+V_\s{inj,max} - (V_\s{inj,max} + V_\s{inj})\cdot \exp\left(\frac{-t_\s{zc}+\Delta}{\tau}\right)=0
\end{split}
\end{equation}
\begin{equation}
\begin{split}
\exp\left(-\frac{t_\s{zc}}{\tau}\right)\cdot\left[V_\s{osc,max} + V_\s{osc} - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)\right] \\
= V_\s{osc,max}-V_\s{inj,max}
\end{split}
\end{equation}
\begin{gather}
\exp\left(-\frac{t_\s{zc}}{\tau}\right)=\frac{V_\s{osc,max}-V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}\\
\ln\left[\exp\left(-\frac{t_\s{zc}}{\tau}\right)\right]=\ln\left[\frac{V_\s{osc,max}-V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}\right]\\
-\frac{t_\s{zc}}{\tau} = \ln\left[\frac{V_\s{osc,max}-V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}\right]\\
t_\s{zc}\left(\Delta\right) = -\tau\ln\left[\frac{V_\s{osc,max}-V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}\right]\label{eq:tzc_fun_neg}
\end{gather}

We can easily express $t_\s{zc}\{v_\s{sum}(t), \Delta = 0\}$ as
\begin{equation}
t_\s{zc}\left(\Delta=0\right) = -\tau\ln\left(\frac{V_\s{osc,max}-V_\s{inj,max}}{V_\s{osc,max} + V_\s{osc} - V_\s{inj,max} - V_\s{inj}}\right)
\end{equation}
and subtracting it from \autoref{eq:tzc_fun_neg} finally yields
\begin{equation}
\left.d\left(\Delta\right)\right\rvert_\s{\Delta<0} = \tau\ln\left[\frac{V_\s{osc,max} + V_\s{osc} - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta}{\tau}\right)}{V_\s{osc,max} + V_\s{osc} - V_\s{inj,max} - V_\s{inj}}\right]
\label{eq:d_delta_neg_add}
\end{equation}

\section{Maximum zero cross delay}
\label{add:max_d}

As discussed in \autoref{sec:ilro}, $v_\s{osc}(\Delta_\s{max})=-V_\s{inj}$. Therefore
\begin{gather}
-V_\s{osc,max} + (V_\s{osc,max} + V_\s{osc})\cdot \exp\left(-\frac{\Delta_\s{max}}{\tau}\right)=-V_\s{inj}\\
\exp\left(-\frac{\Delta_\s{max}}{\tau}\right)=\frac{V_\s{osc,max}-V_\s{inj}}{V_\s{osc,max}+V_\s{osc}}\\
\Delta_\s{max}=-\tau\ln\left(\frac{V_\s{osc,max}-V_\s{inj}}{V_\s{osc,max}+V_\s{osc}}\right)
\end{gather}

We can input this equation into \autoref{eq:d_delta_pos_add} and start rearranging.
\begin{equation}
\begin{split}
d_\s{max} &= \tau\ln\left[\frac{V_\s{osc,max} + V_\s{osc} + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta_\s{max}}{\tau}\right)}{V_\s{osc,max} + V_\s{osc} + V_\s{inj,max} + V_\s{inj}}\right]\\
&= \tau\ln\left\{\frac{\splitfrac{V_\s{osc,max} + V_\s{osc}}{ + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left[\frac{-\tau}{\tau}\cdot\ln\left(\frac{V_\s{osc,max}-V_\s{inj}}{V_\s{osc,max}+V_\s{osc}}\right)\right]}}{V_\s{osc,max} + V_\s{osc} + V_\s{inj,max} + V_\s{inj}}\right\}\\
&=\tau\ln\left[\frac{V_\s{osc,max} + V_\s{osc} + \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\frac{V_\s{osc,max}+V_\s{osc}}{V_\s{osc,max}-V_\s{inj}}}{V_\s{osc,max} + V_\s{osc} + V_\s{inj,max} + V_\s{inj}}\right]
\end{split}
\end{equation}

After multiplying and further rearranging we obtain
\begin{equation}
d_\s{max} = \tau\ln\left(\frac{\splitfrac{V_\s{osc,max}^2+V_\s{osc,max} V_\s{osc}}{+V_\s{osc,max} V_\s{inj,max}+V_\s{inj,max} V_\s{osc}}}{\splitfrac{V_\s{osc,max}^2+V_\s{osc,max} V_\s{osc}+V_\s{osc,max} V_\s{inj,max}}{-V_\s{osc} V_\s{inj}-V_\s{inj} V_\s{inj,max} - V_\s{inj}^2}}\right)
\label{eq:d_inter_add_max}
\end{equation}

The expression for injection ratio from \autoref{eq:ilro_k} allows further rearranging of \autoref{eq:d_inter_add_max}
\begin{equation}
d_\s{max} = \tau\ln\left(\frac{V_\s{osc,max}^2+V_\s{osc,max} V_\s{osc}+KV_\s{osc,max}^2+K V_\s{osc}^2}{\splitfrac{V_\s{osc,max}^2+V_\s{osc,max} V_\s{osc}+K V_\s{osc,max}^2}{-K V_\s{osc}^2-V_\s{inj} V_\s{inj,max} - V_\s{inj}^2}}\right)
\label{eq:d_max_acc_add_max}
\end{equation}

This is the most simplified analytic expression for $d_\s{max}$ applicable to \acsp{ILRO} of any number of stages. It is however quite complicated and not very practical. Thankfully, for \acsp{ILRO} whose number of stages is greater or equal to 5, we can write $V_\s{osc}\approx V_\s{osc,max}$ and $V_\s{inj}\approx V_\s{inj,max}$ (as was proven in \autoref{sec:ilro}), and these two equations can simplify the expression for $d_\s{max}$ even further.
\begin{equation}
\begin{split}
d_\s{max} &= \tau\ln\left(\frac{V_\s{osc}^2+V_\s{osc}^2+K V_\s{osc}^2+K V_\s{osc}^2}{V_\s{osc}^2+V_\s{osc}^2+K V_\s{osc}^2-K V_\s{osc}^2-V_\s{inj}^2 - V_\s{inj}^2}\right)\\
&= \tau\ln\left(\frac{2 V_\s{osc}^2+2 K V_\s{osc}^2}{2 V_\s{osc}^2-2 V_\s{inj}^2}\right)\\
&= \tau\ln\left(\frac{V_\s{osc}^2+ K V_\s{osc}^2}{V_\s{osc}^2-V_\s{inj}^2}\right)
\end{split}
\end{equation}

Since $V_\s{inj}=K V_\s{osc}$, we can continue in simplifying.
\begin{equation}
\begin{split}
d_\s{max} &= \tau\ln\left[\frac{V_\s{osc}^2(1+K)}{V_\s{osc}^2-(K V_\s{osc})^2}\right]\\
&= \tau\ln\left[\frac{V_\s{osc}^2(1+K)}{V_\s{osc}^2(1-K^2)}\right]\\
&= \tau\ln\left[\frac{1+K}{(1-K^2)}\right]\\
&= \tau\ln\left[\frac{1+K}{(1-K) (1+K)}\right]\\
&= \tau\ln\left(\frac{1}{1-K}\right)
\end{split}
\end{equation}

\section{Minimum zero cross delay}
\label{add:min_d}

Analogous derivation to the one shown in \autoref{add:max_d} can be done for the minimum zero cross delay $d_\s{min}$.

As discussed in \autoref{sec:ilro}, $v_\s{osc}(\Delta_\s{min})=V_\s{inj}$. Therefore we can write
\begin{gather}
-V_\s{osc,max} + (V_\s{osc,max} + V_\s{osc})\cdot \exp\left(-\frac{\Delta_\s{min}}{\tau}\right)=V_\s{inj}\\
\exp\left(-\frac{\Delta_\s{min}}{\tau}\right)=\frac{V_\s{osc,max}+V_\s{inj}}{V_\s{osc,max}+V_\s{osc}}\\
\Delta_\s{min}=-\tau\ln\left(\frac{V_\s{osc,max}+V_\s{inj}}{V_\s{osc,max}+V_\s{osc}}\right)
\end{gather}

We can input this equation into \autoref{eq:d_delta_neg_add} and start rearranging.
\begin{equation}
\begin{split}
d_\s{min} &= \tau\ln\left[\frac{V_\s{osc,max} + V_\s{osc} - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left(\frac{\Delta_\s{min}}{\tau}\right)}{V_\s{osc,max} + V_\s{osc} - V_\s{inj,max} - V_\s{inj}}\right]\\
&= \tau\ln\left\{\frac{\splitfrac{V_\s{osc,max} + V_\s{osc}}{ - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\exp\left[\frac{-\tau}{\tau}\cdot\ln\left(\frac{V_\s{osc,max}+V_\s{inj}}{V_\s{osc,max}+V_\s{osc}}\right)\right]}}{V_\s{osc,max} + V_\s{osc} - V_\s{inj,max} - V_\s{inj}}\right\}\\
&=\tau\ln\left[\frac{V_\s{osc,max} + V_\s{osc} - \left(V_\s{inj,max} + V_\s{inj}\right)\cdot\frac{V_\s{osc,max}+V_\s{osc}}{V_\s{osc,max}+V_\s{inj}}}{V_\s{osc,max} + V_\s{osc} - V_\s{inj,max} - V_\s{inj}}\right]
\end{split}
\end{equation}

After multiplying and further rearranging we obtain
\begin{equation}
d_\s{min} = \tau\ln\left(\frac{\splitfrac{V_\s{osc,max}^2+V_\s{osc,max} V_\s{osc}}{-V_\s{osc,max} V_\s{inj,max}-V_\s{inj,max} V_\s{osc}}}{\splitfrac{V_\s{osc,max}^2+V_\s{osc,max} V_\s{osc}-V_\s{osc,max} V_\s{inj,max}}{+V_\s{osc} V_\s{inj}-V_\s{inj} V_\s{inj,max} - V_\s{inj}^2}}\right)
\label{eq:d_inter_add_min}
\end{equation}

The expression for injection ratio from \autoref{eq:ilro_k} allows further rearranging of \autoref{eq:d_inter_add_min}
\begin{equation}
d_\s{min} = \tau\ln\left(\frac{V_\s{osc,max}^2+V_\s{osc,max} V_\s{osc}-K V_\s{osc,max}^2-V_\s{inj,max} V_\s{osc}}{V_\s{osc,max}^2+V_\s{osc,max} V_\s{osc}-V_\s{inj} V_\s{inj,max} - V_\s{inj}^2}\right)
\label{eq:d_max_acc_add_min}
\end{equation}

This is the most simplified analytic expression for $d_\s{min}$ applicable to \acsp{ILRO} of any number of stages. For \acsp{ILRO} whose number of stages is greater or equal to 5, we can write $V_\s{osc}\approx V_\s{osc,max}$ and $V_\s{inj}\approx V_\s{inj,max}$ (as was proven in \autoref{sec:ilro}), and these two equations can simplify the expression for $d_\s{min}$ even further.
\begin{equation}
\begin{split}
d_\s{min} &= \tau\ln\left(\frac{V_\s{osc}^2+V_\s{osc}^2-K V_\s{osc}^2-K V_\s{osc}^2}{V_\s{osc}^2+V_\s{osc}^2-V_\s{inj}^2-V_\s{inj}^2}\right)\\
&= \tau\ln\left(\frac{2 V_\s{osc}^2-2 K^2 V_\s{osc}}{2V_\s{osc}^2-2 V_\s{inj}^2}\right)\\
&= \tau\ln\left(\frac{V_\s{osc}^2- K^2 V_\s{osc}}{V_\s{osc}^2-V_\s{inj}^2}\right)
\end{split}
\end{equation}

Since $V_\s{inj}=K V_\s{osc}$, we can continue in simplifying.
\begin{equation}
\begin{split}
d_\s{min} &= \tau\ln\left[\frac{V_\s{osc}^2(1-K)}{V_\s{osc}^2-(K V_\s{osc})^2}\right]\\
&= \tau\ln\left[\frac{V_\s{osc}^2(1-K)}{V_\s{osc}^2(1-K^2)}\right]\\
&= \tau\ln\left[\frac{1-K}{(1-K^2)}\right]\\
&= \tau\ln\left[\frac{1-K}{(1-K)(1+K)}\right]\\
&= \tau\ln\left(\frac{1}{1+K}\right)
\end{split}
\end{equation}

\chapter{Eight stage \acs{ILRO} \textsc{Matlab} model}

\begin{center}
\rotatebox{90}{\begin{minipage}{0.92\textheight}
\captionsetup{type=figure} 
    \includegraphics[width=21.5cm]{matlab/ilro_8_schema.pdf}
    \captionof{figure}[]{Eight stage \acs{ILRO} model}
    \label{fig:matlab_ilro_8}
\end{minipage}}
\end{center}

\chapter{Digital appendix}
\label{chapter:digital_appendix}

Below is the directory tree of the digital appendix. The digital appendix is split into several levels of folders. Due to size constraints, only some of the contents of the directory will be listed, but the names of the folders should be self-explanatory and should allow the reader to find the desired files.

\vspace{0.5cm}

{\small
%
\dirtree{%.
.1 digital\_appendix/ \DTcomment{root folder}.
.2 latex/.
.3 chapters/ \DTcomment{\LaTeX{} files of all chapters and sections}.
.4 {...} .
.3 diplomova\_prace.tex \DTcomment{main \LaTeX{} file}.
.3 {...} .
.2 figures/ \DTcomment{all figures made in Ipe 7.2.20}. 
.3 {...} .
.2 charts\_and\_data/ \DTcomment{PGFplots charts and source \texttt{.csv} and \texttt{.tex} files}.
.3 {...} .
.2 matlab/.
.3 data/ \DTcomment{\textsc{Matlab}-generated data used for charts}.
.4 {...} .
.3 scripts/ \DTcomment{\texttt{.m} files for calculations and/or plotting}.
.4 {...} .
.3 schematics/ \DTcomment{exported Simulink schematics in PDF}.
.4 {...} .
.3 simscape\_lib/ \DTcomment{Simscape invertor model and library}.
.4 {...} .
.3 simulink/ \DTcomment{Simulink testbenches}.
.4 {...} .
.3 workspaces/ \DTcomment{\texttt{.mat} workspaces (variable definitions)}.
.4 {...} .
.2 cadence/ .
.3 cadence\_data/ \DTcomment{Cadence simulation outputs used for charts}.
.4 {...} .
.3 schematics.pdf \DTcomment{Cadence Virtuoso designed schematics}.
}
}