%
% Presentation example
% Tibault Reveyrand - http://www.microwave.fr
%
% http://www.microwave.fr/LaTeX.html
% ---------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% beamer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To run - pdflatex filename.tex
% acroread filename.pdf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\documentclass[compress,brown]{beamer}
\documentclass[compress,brown]{beamer}
\usepackage{etex}
\mode<presentation>
\usetheme{Warsaw} %Warsaw
% other themes: AnnArbor, Antibes, Bergen, Berkeley, Berlin, Boadilla, boxes, CambridgeUS, Copenhagen, Darmstadt, default, Dresden, Frankfurt, Goettingen,
% Hannover, Ilmenau, JuanLesPins, Luebeck, Madrid, Maloe, Marburg, Montpellier, PaloAlto, Pittsburg, Rochester, Singapore, Szeged, classic
%\usecolortheme{lily}
% color themes: albatross, beaver, beetle, crane, default, dolphin, dov, fly, lily, orchid, rose, seagull, seahorse, sidebartab, structure, whale, wolverine
%\usefonttheme{serif}
% font themes: default, professionalfonts, serif, structurebold, structureitalicserif, structuresmallcapsserif
\hypersetup{pdfpagemode=FullScreen} % makes your presentation go automatically to full screen
% define your own colors:
\definecolor{Red}{rgb}{1,0,0}
\definecolor{Blue}{rgb}{0,0,1}
\definecolor{Green}{rgb}{0,1,0}
\definecolor{magenta}{rgb}{1,0,.6}
\definecolor{lightblue}{rgb}{0,.5,1}
\definecolor{lightpurple}{rgb}{.6,.4,1}
\definecolor{gold}{rgb}{.6,.5,0}
\definecolor{orange}{rgb}{1,0.4,0}
\definecolor{hotpink}{rgb}{1,0,0.5}
\definecolor{newcolor2}{rgb}{.5,.3,.5}
\definecolor{newcolor}{rgb}{0,.3,1}
\definecolor{newcolor3}{rgb}{1,0,.35}
\definecolor{darkgreen1}{rgb}{0, .35, 0}
\definecolor{darkgreen}{rgb}{0, .6, 0}
\definecolor{darkred}{rgb}{.75,0,0}
\xdefinecolor{olive}{cmyk}{0.64,0,0.95,0.4}
\xdefinecolor{purpleish}{cmyk}{0.75,0.75,0,0}
% can also choose different themes for the "inside" and "outside"
% \usepackage{beamerinnertheme_______}
% inner themes include circles, default, inmargin, rectangles, rounded
% \usepackage{beamerouterthemesmoothbars}
% outer themes include default, infolines, miniframes, shadow, sidebar, smoothbars, smoothtree, split, tree
\useoutertheme[subsection=false]{smoothbars}
% to have the same footer on all slides
%\setbeamertemplate{footline}[text line]{STUFF HERE!}
\setbeamertemplate{footline}[text line]{} % makes the footer EMPTY
% include packages
\usepackage{subfigure}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage[all,knot]{xy}
\xyoption{arc}
\usepackage{url}
\usepackage{multimedia}
\usepackage{hyperref}
% Package pour le français
\usepackage[utf8]{inputenc}
\usepackage[french]{babel} % Pour adopter les règles de typographie française
\usepackage[T1]{fontenc} % Pour que LaTeX comprenne les caractères accentués ;
% norme iso-8859, cela risque de ne pas marcher avec
% des fichiers créés sous windows
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Title Page Info %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\logo{\href{http://ecee.colorado.edu/microwave/index.php}{\includegraphics[height=0.75cm]{img/CU3.png}}}
\title{TRL algorithm to de-embed a RF test fixture}
%\subtitle{Introducing to waveform engineering}
\author{\href{http://www.microwave.fr}{T. Reveyrand}}
\institute{University of Colorado - Boulder \\ECEE department \\425 UCB Boulder, Colorado 80309 \\ USA}
\date{July 2013}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Begin Your Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{
\titlepage
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{\tableofcontents}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Introduction}
\subsection*{Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INTRODUCTION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% =================================================================
\begin{frame}{Motivations for this talk}
\vspace{-0.3cm}
\center
\includegraphics[width=0.5\textwidth]{img/test-fixture.jpg}
\begin{itemize}
\item De-embedding of a test-fixture measured in the coaxial reference planes ;
\item Perform a TRL calibration when the VNA provides some ill conditioned solutions ("Reflect" checking not correct) ;
\item Offer a open, complete and ready-to-use source code for educational purpose.
\end{itemize}
\end{frame}
\subsection*{Basics}
\begin{frame}{Some definitions : [S] parameters}
\vspace{-0.3cm}
\center
\includegraphics[width=0.4\textwidth]{img/quadripole.pdf}
% \begin{boldequation}
\begin{equation}
\left( {\begin{array}{*{20}c}
{b_1} \\
{b_2} \\
\end{array}} \right) = \left[ {\begin{array}{*{20}c}
{S_{11}} & {S_{12} } \\
{S_{21} } & {S_{22} } \\
\end{array}} \right] \cdot \left( {\begin{array}{*{20}c}
{a_1 } \\
{a_2 } \\
\end{array}} \right)
\end{equation}
\end{frame}
\begin{frame}{Some definitions : [T] parameters}
\vspace{-0.3cm}
\center
\includegraphics[width=0.4\textwidth]{img/quadripole.pdf}
\begin{equation}
\left( {\begin{array}{*{20}c}
{a_1} \\
{b_1} \\
\end{array}} \right) = \left[ {\begin{array}{*{20}c}
{T_{11}} & {T_{12} } \\
{T_{21} } & {T_{22} } \\
\end{array}} \right] \cdot \left( {\begin{array}{*{20}c}
{b_2 } \\
{a_2 } \\
\end{array}} \right)
\end{equation}
\end{frame}
\begin{frame}{Some definitions : [T] parameters}
\vspace{-0.3cm}
\center
\includegraphics[width=0.8\textwidth]{img/cascade.pdf}
\begin{equation}
\left[T_{Total}\right]=\left[T_{A}\right]\cdot\left[T_{B}\right]\cdot\left[T_{C}\right]
\end{equation}
\end{frame}
\begin{frame}{Conversions between [S] and [T]}
\begin{itemize}
\item $\left[S\right]$ to $\left[T\right]$
\begin{equation}
\left[T\right]=\left[ {\begin{array}{*{20}c}
{ -\frac{1}{S_{21}} } & {-\frac{S_{22}} {S_{21}} } \\
{\frac{S_{11}} {S_{21}} } & { \frac{S_{21} \cdot S_{12}-S_{11} \cdot S_{22}}{S_{21}} } \\
\end{array}} \right]
\end{equation}
\item $\left[T\right]$ to $\left[S\right]$
\begin{equation}
\left[S\right]=\left[ {\begin{array}{*{20}c}
{ -\frac{T_{21}}{T_{11}} } & {\frac{T_{11}\cdot T_{22} - T_{12}\cdot T_{21}} {T_{11}} } \\
{\frac{1} {T_{11}} } & { -\frac{T_{12}}{T_{11}} } \\
\end{array}} \right]
\end{equation}
\end{itemize}
\end{frame}
\section{TRL}
\subsection{Standards}
\begin{frame}{Standards for the TRL algorithm}
\vspace{-0.3cm}
\begin{itemize}
\item \underline{T}HRU : totally known
\begin{equation}
\left[T_{THRU}^{Std}\right]=\left[ {\begin{array}{*{20}c}
{1} & {0 } \\
{0 } & {1 } \\
\end{array}} \right]
\end{equation}
\item \underline{R}EFLECT : unknown
\begin{equation}
\text{Sgn}\left(\Re\left\{\Gamma_{REFLECT}^{Std}\right\}\right)=\pm 1
\end{equation}
\item \underline{L}INE : partially known
\begin{equation}
\left[T_{LINE}^{Std}\right]=\left[ {\begin{array}{*{20}c}
{e^{-\gamma\cdot l}} & {0 } \\
{0 } & {e^{+\gamma\cdot l}} \\
\end{array}} \right]
\end{equation}
\end{itemize}
\end{frame}
\subsection{THRU and LINE Measurements}
\begin{frame}{Measuring the THRU}
\vspace{-0.3cm}
\begin{equation}
\left[T_{THRU}^{Meas}\right]=\left[T_{IN}\right]\cdot\left[T_{THRU}^{Std}\right]\cdot\left[T_{OUT}\right]
\end{equation}
\begin{equation}
{\left[T_{IN}\right]}^{-1}\cdot\left[T_{THRU}^{Meas}\right]=\left[T_{THRU}^{Std}\right]\cdot\left[T_{OUT}\right]
\end{equation}
\begin{equation}
{\left[T_{IN}\right]}^{-1}\cdot\left[T_{THRU}^{Meas}\right]=\left[T_{OUT}\right]
\end{equation}
$${\left[T_{IN}\right]}^{-1} = \left[\overline{T_{IN}}\right]$$
\begin{equation}
\left[\overline{T_{IN}}\right]\cdot\left[T_{THRU}^{Meas}\right]=\left[T_{OUT}\right]
\label{eq2}
\end{equation}
\end{frame}
\begin{frame}{Measuring the LINE}
\vspace{-0.3cm}
\begin{equation}
\left[T_{LINE}^{Meas}\right]=\left[T_{IN}\right]\cdot\left[T_{LINE}^{Std}\right]\cdot\left[T_{OUT}\right]
\end{equation}
\begin{equation}
{\left[T_{IN}\right]}^{-1}\cdot\left[T_{LINE}^{Meas}\right]=\left[T_{LINE}^{Std}\right]\cdot\left[T_{OUT}\right]
\end{equation}
\begin{equation}
\left[\overline{T_{IN}}\right]\cdot\left[T_{LINE}^{Meas}\right]=\left[ {\begin{array}{*{20}c}
{e^{-\gamma\cdot l}} & {0 } \\
{0 } & {e^{+\gamma\cdot l}} \\
\end{array}} \right]\cdot\left[T_{OUT}\right]
\label{eq1}
\end{equation}
\end{frame}
\subsection{$T_{OUT}$ parameters : $\left(\frac{T_{12}}{T_{11}}\right)$ and $\left(\frac{T_{21}}{T_{22}}\right)$}
\begin{frame}{OUTPUT : Defining the [M] matrix}
\vspace{-0.3cm}
Equation (\ref{eq1}) is :
\begin{equation}
\left[ {\begin{array}{*{20}c}{\overline{T}_{11}} & {\overline{T}_{12}} \\ {\overline{T}_{21}} & {\overline{T}_{22}} \end{array}} \right] \cdot\left[T_{LINE}^{Meas}\right] = \left[ {\begin{array}{*{20}c}{T_{11}\cdot e^{-\gamma\cdot l}} & {T_{12}\cdot e^{-\gamma\cdot l}} \\ {T_{21}\cdot e^{+\gamma\cdot l}} & {T_{22}\cdot e^{+\gamma\cdot l}} \end{array}} \right]
\label{eq3}
\end{equation}
(\ref{eq2}) in (\ref{eq3}) give :
\begin{equation}
\left[ {\begin{array}{*{20}c}{T_{11}} & {T_{12}} \\ {T_{21}} & {T_{22}} \end{array}} \right] \cdot {\left[T_{THRU}^{Meas}\right]}^{-1} \cdot \left[T_{LINE}^{Meas}\right] = \left[ {\begin{array}{*{20}c}{T_{11}\cdot e^{-\gamma\cdot l}} & {T_{12}\cdot e^{-\gamma\cdot l}} \\ {T_{21}\cdot e^{+\gamma\cdot l}} & {T_{22}\cdot e^{+\gamma\cdot l}} \end{array}} \right]
\end{equation}
or
\begin{equation}
\left[ {\begin{array}{*{20}c}{T_{11}} & {T_{12}} \\ {T_{21}} & {T_{22}} \end{array}} \right] \cdot \left[M\right] = \left[ {\begin{array}{*{20}c}{T_{11}\cdot e^{-\gamma\cdot l}} & {T_{12}\cdot e^{-\gamma\cdot l}} \\ {T_{21}\cdot e^{+\gamma\cdot l}} & {T_{22}\cdot e^{+\gamma\cdot l}} \end{array}} \right]
\label{eq_M}
\end{equation}
with $$\left[M\right]={\left[T_{THRU}^{Meas}\right]}^{-1} \cdot \left[T_{LINE}^{Meas}\right]$$
\end{frame}
\begin{frame}{OUTPUT : TRL Equations}
\vspace{-0.3cm}
Equations given by (\ref{eq_M}) are :
\begin{equation}
T_{11}\cdot M_{11} + T_{12}\cdot M_{21} = T_{11} \cdot e^{-\gamma \cdot l}
\label{g3}
\end{equation}
\begin{equation}
T_{11}\cdot M_{12} + T_{12}\cdot M_{22} = T_{12} \cdot e^{-\gamma \cdot l}
\label{g4}
\end{equation}
\begin{equation}
T_{21}\cdot M_{11} + T_{22}\cdot M_{21} = T_{21} \cdot e^{+\gamma \cdot l}
\label{g5}
\end{equation}
\begin{equation}
T_{21}\cdot M_{12} + T_{22}\cdot M_{22} = T_{22} \cdot e^{+\gamma \cdot l}
\label{g6}
\end{equation}
\end{frame}
\begin{frame}{OUTPUT : Solving $\left(\frac{T_{12}}{T_{11}}\right)$}
\vspace{-0.3cm}
(\ref{g4}) gives :
\begin{equation}
e^{-\gamma \cdot l} = \left(\frac{T_{11}}{T_{12}}\right)\cdot M_{12} + M_{22}
\label{g7}
\end{equation}
(\ref{g7}) in (\ref{g3}) gives :
\begin{equation}
T_{11}\cdot M_{11} + T_{12}\cdot M_{21} = T_{11} \cdot \left[ \left(\frac{T_{11}}{T_{12}}\right)\cdot M_{12} + M_{22} \right]
\end{equation}
\begin{equation}
M_{11} + \left(\frac{T_{12}}{T_{11}}\right)\cdot M_{21} = \left(\frac{T_{11}}{T_{12}}\right) \cdot M_{12} + M_{22}
\end{equation}
\begin{equation}
{\left(\frac{T_{12}}{T_{11}}\right)}^2 \cdot M_{21} + \left(\frac{T_{12}}{T_{11}}\right) \cdot \left( M_{11} - M_{22}\right) - M_{12} = 0
\end{equation}
\end{frame}
\begin{frame}{OUTPUT : Solving $\left(\frac{T_{22}}{T_{21}}\right)$}
\vspace{-0.3cm}
(\ref{g5}) gives :
\begin{equation}
e^{+\gamma \cdot l} = M_{11} + \left(\frac{T_{22}}{T_{21}}\right)\cdot M_{21}
\label{g8}
\end{equation}
(\ref{g8}) in (\ref{g6}) gives :
\begin{equation}
T_{21}\cdot M_{12} + T_{22}\cdot M_{22} = T_{22} \cdot \left[ \left(\frac{T_{22}}{T_{21}}\right)\cdot M_{21} + M_{11} \right]
\end{equation}
\begin{equation}
M_{22} + \left(\frac{T_{21}}{T_{22}}\right)\cdot M_{12} = \left(\frac{T_{22}}{T_{21}}\right) \cdot M_{21} + M_{11}
\end{equation}
\begin{equation}
{\left(\frac{T_{22}}{T_{21}}\right)}^2 \cdot M_{21} + \left(\frac{T_{22}}{T_{21}}\right) \cdot \left( M_{11} - M_{22}\right) - M_{12} = 0
\end{equation}
\end{frame}
\begin{frame}{OUTPUT : $\left(\frac{T_{12}}{T_{11}}\right)$ and $\left(\frac{T_{22}}{T_{21}}\right)$}
\vspace{-0.3cm}
\begin{equation}
X^2 \cdot M_{21}+X \cdot \left[ M_{11}-M{22}\right] - M_{12}
\label{eq_S12}
\end{equation}
This polynom has 2 solutions : $\left(\frac{T_{12}}{T_{11}}\right)$ and $\left(\frac{T_{22}}{T_{21}}\right)$
Usually, $\left|\frac{T_{12}}{T_{11}}\right|$ < $\left|\frac{T_{22}}{T_{21}}\right|$
\vspace{1.0cm}
If we consider the following polynom :
\begin{equation}
X^2 \cdot M_{12}+X \cdot \left[ M_{22}-M{11}\right] - M_{21}
\end{equation}
Then the 2 solutions are $\left(\frac{T_{11}}{T_{12}}\right)$ and $\left(\frac{T_{21}}{T_{22}}\right)$
\end{frame}
\subsection{$\overline{T}_{IN}$ parameters : $\left(\frac{\overline{T}_{12}}{\overline{T}_{11}}\right)$ and $\left(\frac{\overline{T}_{21}}{\overline{T}_{22}}\right)$}
\begin{frame}{INPUT : Defining the [N] matrix}
\vspace{-0.3cm}
Equation (\ref{eq1}) is :
\begin{equation}
\left[ {\begin{array}{*{20}c}{\overline{T}_{11}} & {\overline{T}_{12}} \\ {\overline{T}_{21}} & {\overline{T}_{22}} \end{array}} \right] \cdot\left[T_{LINE}^{Meas}\right] = \left[ {\begin{array}{*{20}c}
{e^{-\gamma\cdot l}} & {0 } \\
{0 } & {e^{+\gamma\cdot l}} \\
\end{array}} \right] \cdot \left[ {\begin{array}{*{20}c}{T_{11}} & {T_{12}} \\ {T_{21}} & {T_{22}} \end{array}} \right]
\label{eqN}
\end{equation}
(\ref{eq2}) in (\ref{eqN}) gives :
\begin{equation}
\left[ {\begin{array}{*{20}c}{\overline{T}_{11}} & {\overline{T}_{12}} \\ {\overline{T}_{21}} & {\overline{T}_{22}} \end{array}} \right] \cdot\left[T_{LINE}^{Meas}\right] = \left[ {\begin{array}{*{20}c}
{e^{-\gamma\cdot l}} & {0 } \\
{0 } & {e^{+\gamma\cdot l}} \\
\end{array}} \right] \cdot \left[ {\begin{array}{*{20}c}{\overline{T}_{11}} & {\overline{T}_{12}} \\ {\overline{T}_{21}} & {\overline{T}_{22}} \end{array}} \right] \cdot\left[T_{THRU}^{Meas}\right]
\end{equation}
or
\begin{equation}
\left[ {\begin{array}{*{20}c}{\overline{T}_{11}} & {\overline{T}_{12}} \\ {\overline{T}_{21}} & {\overline{T}_{22}} \end{array}} \right] \cdot \left[N\right] = \left[ {\begin{array}{*{20}c}{\overline{T}_{11}\cdot e^{-\gamma\cdot l}} & {\overline{T}_{12}\cdot e^{-\gamma\cdot l}} \\ {\overline{T}_{21}\cdot e^{+\gamma\cdot l}} & {\overline{T}_{22}\cdot e^{+\gamma\cdot l}} \end{array}} \right]
\label{eq_N}
\end{equation}
with $$\left[N\right]=\left[T_{LINE}^{Meas}\right] \cdot {\left[T_{THRU}^{Meas}\right]}^{-1}$$
\end{frame}
\begin{frame}{INPUT : $\left(\frac{\overline{T}_{12}}{\overline{T}_{11}}\right)$ and $\left(\frac{\overline{T}_{22}}{\overline{T}_{21}}\right)$}
\vspace{-0.3cm}
Equation (\ref{eq_N}) is similar to (\ref{eq_M}). Thus we can consider :
\begin{equation}
X^2 \cdot N_{21}+X \cdot \left[ N_{11}-N_{22}\right] - N_{12}
\label{eq_S34}
\end{equation}
This polynom has 2 solutions : $\left(\frac{\overline{T}_{12}}{\overline{T}_{11}}\right)$ and $\left(\frac{\overline{T}_{22}}{\overline{T}_{21}}\right)$
Usually, $\left|\frac{\overline{T}_{12}}{\overline{T}_{11}}\right|$ < $\left|\frac{\overline{T}_{22}}{\overline{T}_{21}}\right|$
\vspace{1.0cm}
If we consider the following polynom :
\begin{equation}
X^2 \cdot N_{12}+X \cdot \left[ N_{22}-N_{11}\right] - N_{21}
\end{equation}
Then the 2 solutions are $\left(\frac{\overline{T}_{11}}{\overline{T}_{12}}\right)$ and $\left(\frac{\overline{T}_{21}}{\overline{T}_{22}}\right)$
\end{frame}
\subsection{The THRU equality : $\left(\frac{T_{11}}{\overline{T}_{11}}\right)$ and $\left(\frac{T_{21}}{\overline{T}_{22}}\right)$}
\begin{frame}{The THRU equality}
\vspace{-0.3cm}
\center
\includegraphics[width=0.8\textwidth]{img/thru.pdf}
$$ \left( {\begin{array}{*{20}c}
{b_2} \\
{a_2} \\
\end{array}} \right) = \left[ {\begin{array}{*{20}c}
{\overline{T}_{11}} & {\overline{T}_{12} } \\
{\overline{T}_{21} } & {\overline{T}_{22} } \\
\end{array}} \right] \cdot \left( {\begin{array}{*{20}c}
{a_1 } \\
{b_1 } \\
\end{array}} \right) $$
$$ \left( {\begin{array}{*{20}c}
{b_2} \\
{a_2} \\
\end{array}} \right) = \left[ {\begin{array}{*{20}c}
{T_{11}} & {T_{12} } \\
{T_{21} } & {T_{22} } \\
\end{array}} \right] \cdot \left( {\begin{array}{*{20}c}
{b_3 } \\
{a_3 } \\
\end{array}} \right) $$
% \begin{itemize}
% \item {Forward}
% bla bla
%\item {Reverse}
%bla bla
%\end{itemize}
\end{frame}
\begin{frame}{Forward mode : $b_2$ equality to extract $ \left( \frac{T_{11}}{\overline{T}_{11}}\ \right)$}
\vspace{-0.3cm}
The $b_2$ equality leads us to :
\begin{equation}
\overline{T}_{11} \cdot a_1 + \overline{T}_{12} \cdot b_1 = T_{11} \cdot b_3 + T_{12} \cdot a_3
\end{equation}
And by definition, about the THRU measurement, we know :
\begin{center}
$S_{21}^{Meas}={\left.\frac{b_3}{a_1}\right|}_{a_3=0}$ and $S_{11}^{Meas}={\left.\frac{b_1}{a_1}\right|}_{a_3=0}$
\end{center}
Thus,
\begin{equation}
a_1 \cdot \left( \overline{T}_{11} + \overline{T}_{12} \cdot \frac{b_1}{a_1} \right) = T_{11} \cdot b_3
\end{equation}
\begin{equation}
\overline{T}_{11} \cdot \left( 1 + \left( \frac{\overline{T}_{12}}{\overline{T}_{11}} \right) \cdot S_{11}^{Meas} \right) = T_{11} \cdot S_{21}^{Meas}
\end{equation}
\begin{equation}
\left( \frac{T_{11}}{\overline{T}_{11}}\ \right) = \frac {\left( 1 + \left( \frac{\overline{T}_{12}}{\overline{T}_{11}} \right) \cdot S_{11}^{Meas} \right)}{S_{21}^{Meas}}
\label{eq_S5}
\end{equation}
\end{frame}
\begin{frame}{Reverse mode : $a_2$ equality to extract $ \left( \frac{T_{21}}{\overline{T}_{21}}\ \right)$}
\vspace{-0.3cm}
The $a_1$ equality leads us to :
\begin{equation}
\overline{T}_{21} \cdot a_1 + \overline{T}_{22} \cdot b_1 = T_{21} \cdot b_3 + T_{22} \cdot a_3
\end{equation}
For the THRU measurement, we know :
\begin{center}
$S_{12}^{Meas}={\left.\frac{b_1}{a_3}\right|}_{a_1=0}$ and $S_{22}^{Meas}={\left.\frac{b_3}{a_3}\right|}_{a_1=0}$
\end{center}
Thus,
\begin{equation}
b_1 \cdot \overline{T}_{22} = T_{21} \cdot b_3 + T_{21} \cdot a_3
\end{equation}
leads us to :
\begin{equation}
\left( \frac{T_{21}}{\overline{T}_{22}} \right) = \frac {S_{12}^{Meas}}{S_{22}^{Meas} + \left( \frac{T_{22}}{T_{21}} \right)}
\label{eq_S6}
\end{equation}
\end{frame}
\subsection{The REFLECT equality : Extracting $\left( \frac{\overline{T}_{21}}{\overline{T}_{11}} \right)$}
\begin{frame}{REFLECT Measurement}
\center
\includegraphics[width=0.8\textwidth]{img/reflect.pdf}
\begin{equation}
\Gamma_{REFLECT}^{Std}=\frac{b_1}{a_1}=\frac{\overline{T}_{21} + \overline{T}_{22} \cdot S_{11}^{Meas}}{\overline{T}_{11} + \overline{T}_{12} \cdot S_{11}^{Meas}}
\label{std_verif}
\end{equation}
\begin{equation}
\Gamma_{REFLECT}^{Std}=\frac{b_2}{a_2}=\frac{T_{12} + T_{11} \cdot S_{22}^{Meas}}{T_{22} + T_{21} \cdot S_{22}^{Meas}}
\end{equation}
\end{frame}
\begin{frame}{REFLECT Equality}
\center
\vspace{-1cm}
\begin{equation}
\frac{\overline{T}_{21} + \overline{T}_{22} \cdot S_{11}^{Meas}}{\overline{T}_{11} + \overline{T}_{12} \cdot S_{11}^{Meas}}=\frac{T_{12} + T_{11} \cdot S_{22}^{Meas}}{T_{22} + T_{21} \cdot S_{22}^{Meas}}
\end{equation}
\begin{equation}
\frac{\overline{T}_{21}}{\overline{T}_{11}} \cdot \left( \frac{1 + \left( \frac{\overline{T}_{22}}{\overline{T}_{21}} \right) \cdot S_{11}^{Meas}}
{1 + \left( \frac{\overline{T}_{12}}{\overline{T}_{11}} \right) \cdot S_{11}^{Meas}} \right) = \frac{T_{11}}{T_{21}} \cdot \left( \frac{S_{22}^{Meas}+ \left( \frac{T_{12}}{T_{11}}\right) }{S_{22}^{Meas}+ \left( \frac{T_{22}}{T_{21}}\right) }\right)
\end{equation}
\begin{equation}
{\left( \overline{T}_{21} \right)}^2 \cdot \left( \frac{T_{21}}{\overline{T}_{22}} \right) \cdot \left( \frac{\overline{T}_{22}}{\overline{T}_{21}}\right) = {\left( \overline{T}_{11} \right)}^2 \cdot \left( \frac{T_{11}}{\overline{T}_{11}} \right) \cdot \frac{\left( \frac{S_{22}^{Meas}+ \left( \frac{T_{12}}{T_{11}}\right) }{S_{22}^{Meas}+ \left( \frac{T_{22}}{T_{21}}\right) }\right)}{ \left( \frac{1 + \left( \frac{\overline{T}_{22}}{\overline{T}_{21}} \right) \cdot S_{11}^{Meas}}
{1 + \left( \frac{\overline{T}_{12}}{\overline{T}_{11}} \right) \cdot S_{11}^{Meas}} \right)}
\end{equation}
\end{frame}
\begin{frame}{REFLECT Equality}
\center
\vspace{-1cm}
\begin{equation}
{\left( \frac{\overline{T}_{21}}{\overline{T}_{11}} \right)} = \pm \sqrt{\frac{\left( \frac{T_{11}}{\overline{T}_{11}} \right) \cdot \left( \frac{S_{22}^{Meas}+ \left( \frac{T_{12}}{T_{11}}\right) }{S_{22}^{Meas}+ \left( \frac{T_{22}}{T_{21}}\right) }\right)}{\left( \frac{T_{21}}{\overline{T}_{22}} \right) \cdot \left( \frac{\overline{T}_{22}}{\overline{T}_{21}}\right) \cdot \left( \frac{1 + \left( \frac{\overline{T}_{22}}{\overline{T}_{21}} \right) \cdot S_{11}^{Meas}}
{1 + \left( \frac{\overline{T}_{12}}{\overline{T}_{11}} \right) \cdot S_{11}^{Meas}} \right)}}
\label{eq_S7}
\end{equation}
There are 2 solutions. We select the good one thanks to the knowledge of $\text{Sgn}\left(\Re{\left\{\Gamma_{REFLECT}^{Std}\right\}}\right)=\pm 1$ in (\ref{std_verif}):
\begin{equation}
\Gamma_{REFLECT}^{Std}=\left(\frac{\overline{T}_{21}}{\overline{T}_{11}}\right) \cdot \left( \frac{1 + \left( \frac{\overline{T}_{22}}{\overline{T}_{21}} \right) \cdot S_{11}^{Meas}}
{1 + \left( \frac{\overline{T}_{12}}{\overline{T}_{11}} \right) \cdot S_{11}^{Meas}} \right)
\end{equation}
\end{frame}
\begin{frame}{TRL Completed}
%\center
%\vspace{-1cm}
The TRL algorithm is completed. We got 7 parameters from :
\begin{itemize}
\item {The $\left[M\right]$ matrix:}
$\left(\frac{T_{12}}{T_{11}}\right)$ and $\left(\frac{T_{22}}{T_{21}}\right)$ from (\ref{eq_S12}) ;
\item {The $\left[N\right]$ matrix:}
$\left(\frac{\overline{T}_{12}}{\overline{T}_{11}}\right)$ and $\left(\frac{\overline{T}_{22}}{\overline{T}_{21}}\right)$ from (\ref{eq_S34});
\item {The THRU equality:}
$\left( \frac{T_{11}}{\overline{T}_{11}}\ \right)$ from (\ref{eq_S5}) and $\left( \frac{T_{21}}{\overline{T}_{22}} \right)$ from (\ref{eq_S6}) ;
\item {The REFLECT equality:}
$\left( \frac{\overline{T}_{21}}{\overline{T}_{11}} \right)$ from (\ref{eq_S7}) ;
\end{itemize}
\vspace{0.5cm}
It is suffisent for $\left[S\right]$ parameters de-embedding but not for power measurement.
We need to normalize correctly the system of equation (finding the absolute value of $\overline{T}_{11}$).
For that purpose we will consider a reciprocity assumption : $S_{21}^{IN}=S_{12}^{IN}$.
\end{frame}
\section{Reciprocity}
\subsection*{Reciprocity}
% \subsection{Conversion between $\left[S_{IN}\right]$ and $\left[\overline{T}_{IN}\right]$}
\begin{frame}{Reciprocity assumption}
We should have :
\begin{equation}
\left[\overline{T}_{IN}\right]=\left[ {\begin{array}{*{20}c}
{ \frac{S_{21} \cdot S_{12}-S_{11} \cdot S_{22}}{S_{12}} } & {\frac{S_{22}} {S_{12}} } \\
{-\frac{S_{11}} {S_{12}} } & {\frac{1} {S_{12}} } \\
\end{array}} \right]
\end{equation}
Thus the reciprocity assumption ($S_{21} = S_{12}$) leds to :
\begin{equation}
\overline{T}_{11} \cdot \overline{T}_{22} - \overline{T}_{12} \cdot \overline{T}_{21} = 1
\label{reciprocity}
\end{equation}
\end{frame}
\begin{frame}{Reciprocity assumption}
We can obtain from TRL the complete $\left[ \overline{T}_{IN} \right]$ and $\left[ T_{OUT} \right]$ matrix from an arbitrary value of $\overline{T}_{11}$. Those matrix has to be multiplied by K in order to fullfill equation (\ref{reciprocity}) such as :
\begin{equation}
K^2 = \frac{1}{\overline{T}_{11} \cdot \overline{T}_{22} - \overline{T}_{12} \cdot \overline{T}_{21}}
\end{equation}
\begin{equation}
K = \pm \sqrt{\frac{1}{\overline{T}_{11} \cdot \overline{T}_{22} - \overline{T}_{12} \cdot \overline{T}_{21}}}
\end{equation}
There are 2 solutions. The good one is selected such as the extrapolated phase of $S_{21}$ on DC is as close as possible of zero.
\end{frame}
\section{Scilab Code}
\subsection{Presentation}
\begin{frame}{This code is now available in Scilab}
\vspace{-0.3cm}
\center
\includegraphics[width=0.65\textwidth]{img/toolbox.jpg}
\url{http://www.microwave.fr/uW.html}
\end{frame}
\subsection{Example}
\begin{frame}{Example with an OPEN reflect}
\vspace{-0.3cm}
\center
S2P Measurements : Thru (black), Line (blue) and Open (red).
\includegraphics[width=0.6\textwidth]{img/input_open.pdf}
\end{frame}
\begin{frame}{Example with an OPEN reflect}
\vspace{-0.3cm}
\center
S2P Extracted : Port 1 (black), Port 2 (blue) and De-embedded open (red).
\includegraphics[width=0.6\textwidth]{img/output_open.pdf}
\end{frame}
\begin{frame}{Example with an SHORT reflect}
\vspace{-0.3cm}
\center
S2P Measurements : Thru (black), Line (blue) and Short (red).
\includegraphics[width=0.6\textwidth]{img/input_short.pdf}
\end{frame}
\begin{frame}{Example with an SHORT reflect}
\vspace{-0.3cm}
\center
S2P Extracted : Port 1 (black), Port 2 (blue) and De-embedded short (red).
\includegraphics[width=0.6\textwidth]{img/output_short.pdf}
\end{frame}
\subsection{Insights}
\begin{frame}{Source Code : uW\_TRL\_calc.sci}
\vspace{-0.3cm}
\center
\includegraphics[width=0.55\textwidth]{img/code1.png}
\end{frame}
\begin{frame}{Source Code : uW\_TRL\_calc.sci}
\vspace{-0.3cm}
\center
\includegraphics[width=0.75\textwidth]{img/code2.png}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End Your Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}