%! TEX root = ../thesis.tex
\chapter{Results}

In this chapter all results from the experiments, as well as reasons will be discussed.

\section{Calibration\label{calib}}

This calibration process yielded some workflows for use inside the system as well as calibration values for the used PowerIt. 

\subsection{Calibration-Database}

The obtained calibration values for the in these experiments used PowerIt, are combined in \autoref{pitdb}.

\begin{listing}[H]
    \centering
    \minty[%
        minted options={lastline=10}%
    ]{yaml}{pitstop/pitdb.yaml}
    \codecaption{
        PITDB entry for B05 PowerIt.
        \mintinline{cpp}{id} is obtained by the firmware and unique to each STM32Chip.
        The \mintinline{cpp}{name} corresponds to the label on each PowerIt.
        All \mintinline{cpp}{poly*} are all polynomial coefficients in order of 0th degree to 2nd degree. 
    }%
    \label{pitdb}
\end{listing}

And to compare, the values in \autoref{lst:pitdb-example} are theoretical values, obtained from all equations in \autoref{ch:theory}.


\begin{listing}[H]
    \begin{mintyfig}[]{yaml}
        ---
        uuid: 'default'
        name: 'Bxx'
        poly18i: [-3.0, 25.0, 0.0]
        poly48i: [0.0, 227.27, 0.0]
        poly10v: [0.0, 4.0, 0.0]
        poly18v: [0.0, 1.0, 0.0]
        poly48v: [0.0, 27.386, 0.0]

    \end{mintyfig}
    \codecaption{%
        Default PITDB entry for any PowerIt.
        All \mintinline{cpp}{poly*} are all polynomial coefficients in order of 0th degree to 2nd degree. 
    }%
    \label{lst:pitdb-example}
\end{listing}

\subsection{Accuracy}

To obtain an accuracy for the internal measurements, the experimental sweeps can be repeated after calibration.
One example of a calibrated measurement can be seen in \autoref{fig:postcalib10v}.

\begin{figure}[H]
    \centering
    \vspace{-1.5cm}
    \hspace*{-.15\columnwidth}
    \includegraphics[width=1.3\columnwidth]{../pitstop/20180825/postcalib_10v.pdf}
    \vspace{-1cm}
    \caption{%
        Voltages after calibration.
        Sweep from \SIrange{43.2}{52.8}{\volt} input voltage resulting in a range from \SIrange{8.64}{10.56}{\volt}.
        The errors in the bottom diagram show the differences between reference and PIT values.
    }%
    \label{fig:postcalib10v}
\end{figure}

This repeats the calibration measurement for \SI{9.6}{\volt}.
Here quite similar values can be observed, with a maximum \(\Delta V\) of around \SI{31.7}{\milli\volt}. 
It is also possible to see a systematic error in \autoref{fig:postcalib10v}.
This error could be corrected, but requires further iterations of the calibration procedure.
Additional iterations would allow for a reduction of \(\Delta V\), up to a value of \SI{24.5}{\milli\volt} (\(\approx\) \SI{.25}{\%}).

%This result is similar to others, and for all it would be possible to achieve a bit better fits.
In comparison to this, the \SI{1.8}{\volt} measurement should have a bit better accuracy because of the even simpler circuit.

\begin{align*}
    \SI{.25}{\%} \cdot \SI{1.8}{\volt} \approx \SI{4.5}{\milli\volt}
\end{align*}

And also the accuracy of measuring \SI{48}{\volt} should be worse than \SI{24}{\milli\volt}, again because of the circuits complexity.

\begin{align*}
    \SI{.25}{\%} \cdot \SI{48}{\volt} \approx \SI{120}{\milli\volt}
\end{align*}

%TODO: currents

\section{Regulation}\label{sec:withoutreg}

    THese are the obtained results from attempting to regulate the \SI{1.8}{\volt} terminals.

    \subsection{Without Regulation}

        Before the regulation could be attempted some parameters were needed to complete the SWRM, see equations~\ref{eq:iretmeancorr},~\ref{eq:r0} and~\ref{eq:r1}.
        With these values and their respective (error) ranges the in \autoref{fig:reg} found plot could be created.

        \begin{figure}[H]
            \centering
            \vspace{-.5cm}
            \hspace*{-.16\columnwidth}
            \includegraphics[width=1.3\columnwidth]{../pitstop/20180828/reticle_variance.pdf}
            \vspace{-.5cm}
            \caption{%
                Plot of the expected range of V\(_\text{drop}\) for different current draw. This result is the expected spread without any regulation. Shown are the range for 98\% and 50\% of reticles, as well as the mean V\(_\text{drop}\) for all reticles.
            }%
            \label{fig:reg}
        \end{figure}

        In \autoref{fig:reg} the expected spread of V\(_\text{drop}\) can be found.
        Thsi spread is the worst case scenario of V\(_\text{drop}\) distribution.
        The reason for that is that with a regulated voltage a constant V\(\text{drop}\) is expected.
        This applies to all currents up until \(\approx\) \SI{80}{\ampere}, becase from there the regulation would not work anymore and V\(_\text{drop}\) would behave like in the unregulated case. 

    \subsection{With Regulation}

        To verify the regulation is working and to see if the prediction in \autoref{fig:regswrm} is correct new values were measured.
        These Values are the voltages with regulation enabled at different Reticles (see \autoref{fig:postreg}).

        \begin{figure}[H]
            \centering
            \vspace{-1cm}
            \hspace*{-.15\columnwidth}
            \includegraphics[width=1.3\columnwidth]{../pitstop/20180828/ret_vdip.pdf}
            \vspace{-1cm}
            \caption{%
                Observed AnaB voltages after regulation at multiple reticles.
                Reticle \#40 shows the best-case scenario with the least amount of V\(_\text{drop}\).
                Reticle \#5 is a worst-case scenario, with the highest V\(_\text{drop}\) while still being a usable reticle.
            }%
            \label{fig:postreg}
        \end{figure}

        In \autoref{fig:postreg} three different reticles (\#5, \#29 and \#40) were measured.
        Observable is, that firstly the regulation, which was set to achieve \SI{1.8}{\volt} is working until I\(_{ana}\) is at I\(_\text{thresh}=\SI{80}{\ampere}\).
        There the minmal potentiometer setting is used.
        From here V\(_\text{drop}\) behaves the same as without regulation.

        Secondly the voltages for different reticles is different and not equal.
        This was one of the assumptions in the SWRM.
        To describe that behavior a distance based model (\autoref{sec:dwrm}: DWRM) could be the solution.

        And third, under the assumption of a constant fit (up to I\(_{ana} \approx \SI{80}{\ampere}\)) a systematic error can be observed.

        Also, the expected behavior from \autoref{sec:withoutreg} can be observed.

        Additionally if the range of I\(_\text{ana}\) > I\(_\text{thresh}\) is observed, V\(_\text{drop}\) does not increase by more than about \SI{30}{\milli\volt}.


    \subsection{Distance Wafer Resistance Model (DWRM)}\label{sec:dwrm}

        So far, the discussed measurements and SWRM have been enough to create a first iteration regulation mechanism.
        Until now assumptions like a constant R\(_0\) over the complete Wafer, have driven the creation of equations to satisfy this model.
        They also led to observable inaccuracies, as seen in \autoref{eq:r0}.
        Although the SWRM approximates the real world, it is not exact enough.
        To further develop a model that could describe the real world setup in a better way, the next model would have to describe e.g. a different R\(_0\).

        In a wafer, the distance between reticles and voltage connector (see \autoref{fig:mainpcb}) are resulting in additional resistance.

        Therefore the DWRM could be adapted.
        Circuit~\ref{fig:retmodelshell} visualizes a model, in which each different distance from the voltage connector, is classified with an additional resistance.

        \begin{figure}[H]
            \centering
            \includegraphics[width=.45\columnwidth]{tikz/reticlepower_2}
            \caption{Modified model of the to measure resistances and their currents.
            Similar to SWRM \(R_0\) describes the resistance of a connection between the PowerIt Output, up to the FET (depicted as switch), while \(R_1\) is a Resistance between FET and Reticles. But additionally \(R_{0+}\) described a Resistance, that depends on the distance between reticle and voltage connector. 
            The measurement is done between output terminals on the PowerIt and pins on a Analog readout board}%
            \label{fig:retmodelshell}
        \end{figure}

        With this model the voltage is now expected to change depending on the reticles distance instead of being the same. The distances inside a wafer are visualized in \autoref{fig:retmodelrdist}

        \begin{figure}[H]
            \centering
            \hspace*{-.14\columnwidth}
            \includegraphics[width=1.1\columnwidth]{../pitstop/20180821/reticel_rtheo.pdf}
            \vspace{-1cm}
            \caption{Distances of reticles to the nearest voltage supplying connection for DWRM, distance is in reticle-side length}%
            \label{fig:retmodelrdist}
        \end{figure}