\documentclass{article} 

\usepackage[english]{babel}
\usepackage[a4paper,top=2cm,bottom=2cm,left=2cm,right=2cm,marginparwidth=1.75cm]{geometry}
\usepackage[inline]{enumitem}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{float}
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{listings}

\newcommand{\eqline}{\noalign{\smallskip} \hline \noalign{\smallskip}}

\title{
    Reflection Experiment\linebreak
    \large{EV6 - Hardware Implementation}
}

\author{
    van Iterson, Arne\\
    Student Nr: 1798423
    \and
    Selier, Tom\\
    Student Nr: 1808444
}

\makeindex

\begin{document}
\maketitle

\begin{abstract}
    This document describes the process of, and measurements taken during the reflection experiment; Part of the EV6 Hardware Implementation course at the University of applied sciences Utrecht.
\end{abstract}

\noindent\makebox[\linewidth]{\rule{\linewidth}{0.4pt}}
\setlist[itemize]{itemjoin=\hspace*{\fill},itemjoin*=\hspace*{\fill}}

\begin{multicols}{2}
    \section{Introduction}
    Signals travel over transmission lines, these lines can be as simple as a wire or as complex as a PCB trace. Any transmission line has a characteristic impedance, when the line is not terminated properly, reflections will occur. 
    These reflections can cause signal integrity issues, and can even damage the transmission hardware. 
    However, the effect can also be used to our advantage, by putting a pulse on the line and measuring the time it takes for the reflection to return, we can roughly calculate the length of the transmission line or a fault in the cable.

    Different termination methods and values have different effects on the reflections. 

    \subsection{Objective}
    The purpose of the experiment is to learn the importance of proper termination of transmission lines. The results should include the effects of various different termination methods and the estimated length of an un-terminated transmission line of unknown length. 
    
    \section{Methodology}\label{sec:Methodology}
    The experiment requires a pulse to be generated on the line and a way to measure any reflections, the equipment used is as follows:
    \begin{itemize}[beginpenalty=10000]
        \item Rigol DG 2041A Function/Arbritrary Waveform Generator
        \begin{itemize}
            \item Setup according to the method described in the lab manual:
            \begin{itemize}
                \item Pulse 0 to 5 Volts
                \item Frequency 1 kHz
                \item Pulse width 12 ns, edge time 5 ns
                \item Output impedance 50 $\Omega$
            \end{itemize}
        \end{itemize}

        \item DPO 2012 Oscilloscope
        \begin{itemize}
            \item Using default settings
        \end{itemize}
        \item Multiple 1 meter BNC cables with a characteristic impedance of 50 $\Omega$
        \begin{itemize}
            \item One for trigger output, three for the experiment itself
        \end{itemize}
        \item BNC cable of unknown length with a characteristic impedance of 75 $\Omega$
        \item Various BNC accessories
        \begin{itemize}
            \item Short circuit terminator
            \item 50 $\Omega$ terminator
            \item T-connectors
            \item Male to male connectors
        \end{itemize}
    \end{itemize}

    \subsection{Measurements to be taken}
    The following scenarios will be tested:
    \begin{itemize}
        \item Open termination
        \item Short termination
        \item Matched termination
    \end{itemize}
    For each scenario, the full dataset of the oscilloscope will be saved to CSV and analysed at a later moment using Python. 

    \newpage

    \subsection{Setup}
    All measurements will be taken using the setup in Figure \ref*{fig:setup}.
    \begin{figure}[H]
        \includegraphics[width=\linewidth]{./img/setup.png}
        \caption{Measurement setup}
        \label{fig:setup}
    \end{figure}

    In initial tests, it was found that using a single BNC cable between the terminator and the function generator would produce a reflection, however it would overlap with the original signal, making it difficult to take any measurements. Therefore the setup was built using three cables instead of one in order to delay the reflection to a point where it can be measured. The cables were connected using BNC male to male connectors, making the total cable length about 3 meters. 

    \section{Expected results}
    We expect the following results for the different termination methods:
    \begin{description}
        \item[Open termination]
        The reflected signal will be equal in amplitude to the input signal.
        \begin{figure}[H]
            \includegraphics[width=\linewidth]{./img/Graph - Expected - Unterminated.png}
            \caption{Expectation for open termination}
            \label{fig:expected_open}
        \end{figure}

        \item[Short termination]
        The reflected signal will be equal in amplitude to the input signal, but inverted.
        \begin{figure}[H]
            \includegraphics[width=\linewidth]{./img/Graph - Expected - Terminated 0 Ohm.png}
            \caption{Expectation for short termination}
            \label{fig:expected_short}
        \end{figure}
        
        \item[Matched termination]
        The reflected signal will not exist. 
        \begin{figure}[H]
            \includegraphics[width=\linewidth]{./img/Graph - Expected - Terminated 50 Ohm.png}
            \caption{Expectation for matched termination}
            \label{fig:expected_matched}
        \end{figure}

    \end{description}
    \section{Results}
    First, the pulse itself was measured without any cable to ensure that the pulse matched the settings of the function generator. 

    \begin{figure}[H]
        \includegraphics[width=\linewidth]{./img/Graph - Probe Only.png}
        \caption{Pulse measurement, no cable}
        \label{fig:probe_only}
    \end{figure}
    The resulting pulse is as described in section \ref{sec:Methodology}, and within tolerances.

    \subsection{Termination results}
        \subsubsection{Open termination}
        \begin{figure}[H]
            \includegraphics[width=\linewidth]{./img/Graph - Unterminated End.png}
            \caption{Result for open termination}
            \label{fig:actual_open}
        \end{figure}
        The open termination results in a reflection of roughly equal amplitude to the original signal. There is 36 ns between the original pulse and the reflection.

        \subsubsection{Short termination}
        \begin{figure}[H]
            \includegraphics[width=\linewidth]{./img/Graph - Terminated 0 Ohm.png}
            \caption{Result for short termination}
            \label{fig:actual_short}
        \end{figure}        
        The short termination results in a reflection of the original signal, but inverted. The reflection is also of lower amplitude than the original signal. Interestingly, the time between the original pulse and the reflection is 36 ns exactly, which is identical as the open termination result.

        \subsubsection{Matched termination}
        \begin{figure}[H]
            \includegraphics[width=\linewidth]{./img/Graph - Terminated 50 Ohm.png}
            \caption{Result for matched termination}
            \label{fig:actual_matched}
        \end{figure}
        As expected, the matched termination results in no reflection at all.


    \subsection{Cable length determination} \label{sec:cable length determination}
    By measuring the difference in time between the original pulse and the reflection, we can calculate the length of the cable using the speed formula:
    \begin{align*}
        v &= \frac{s}{t}\\
        s &= v \cdot t
    \end{align*}

    The speed of light in a cable is roughly 2/3 of the speed of light in a vacuum. Good quality cables include this value exactly, but unfortunately, we do not have this information for the cables used in this experiment. 

    \begin{align*}
        c &= 299792458 & [ms^{-1}]\\
        v &= \frac{2}{3} \cdot c\\
        &= 199861638,\overline{66} & [ms^{-1}]\\
        t &= 36 & [ns]\\
        &= 36 \cdot 10^{-9} & [s]\\
        \frac{1}{2}t &= 18 \cdot 10^{-9} & [s]
    \end{align*}

    Time has to be divided by 2 since the reflection has to travel the same distance twice, once to the end of the cable and once back.

    \begin{align*}
        s &= 1199861638,\overline{66} \cdot (18 \cdot 10^{-9})\\
        &= 3,5975094959 & [m]\\
        \noalign{\smallskip} \hline \noalign{\smallskip}
        s &\approx 3,6 & [m]
    \end{align*}

    The actual length of the cable is 3 meters, so the result is somewhat off, there are several possible reasons for this:
    \begin{enumerate}
        \item The speed of light in the cable and the male to male connectors is not exactly 66\% of the speed of light in a vacuum. Each percent difference yields a difference of about 5 cm in this case.
        \item The cables are not exactly 1 meter long
        \item The length of the male to male connectors is not taken into account
    \end{enumerate}

    \subsubsection{Unknown 75 Ohm cable}
    \begin{figure}[H]
        \includegraphics[width=\linewidth]{./img/Graph - 75 Ohm cable.png}
        \caption{Result for unknown cable}
        \label{fig:unknown_cable}
    \end{figure}
    The cable with an unknown length is a 75 Ohm cable made by Belden. It has partnumber 9248 printed on the sheath of the cable. According to the datasheet of the cable, the propagation delay is 82 \%\footnote{Belden, "Part Number: 9248", 9248 datasheet, 2019}. 
    
    Furthermore, the initial pulse shown in figure \ref{fig:unknown_cable} is 3.5 V instead of 2.5 V. This is because the cable is a 75 Ohm cable, and thus creats a different voltage division. However, this does not affect the results of the experiment, since the pulse does not change position with respect to time.

    Using the same equations as in section \ref{sec:cable length determination}, the length of the cable can be calculated.

    \begin{align*}
        c &= 299792458 & [ms^{-1}]\\
        v &= 0.82 \cdot c\\
        &= 245829815,56 & [ms^{-1}]\\
        t &= 223 & [ns]\\
        &= 223 \cdot 10^{-9} & [s]\\
        \frac{1}{2}t &= 116,5 \cdot 10^{-9} & [s] \\
        s &= 245829815,56 \cdot (116,5 \cdot 10^{-9})\\
        &= 27,4100243725 & [m]\\
        \noalign{\smallskip} \hline \noalign{\smallskip}
        s &\approx 27,4 & [m]
    \end{align*}

    \section{Conclusion}
    Reflections can be used to measure distance in case of a faulty cable. However, an accurate propagation delay of the cable should be known. Otherwise, depending on the length of the cable, the measurement could be off by several meters to kilometers.

    In conclusion, a reflection in a transmission line can be manipulated by its termination. A matched impedance will result in no reflections, whilst a mismatched reflection will cause reflections, either positive or negative. 
    
\end{multicols}
\end{document}