--- /dev/null
+\section*{Additional Figures}
+
+\subsection*{Language Speed}
+
+\begin{figure}[H]
+ \centering
+ \includegraphics[width=0.8\textwidth]{figures/thread_performance.png}
+ \caption{Comparison of a minimal test program to compare best case thread sample rates in C and Python; each point is an average over 50000 samples. Note that both trends are linear, but a logarithmic scale had to be used to compare the datasets on the same graph.}
+ \label{thread_performance.png}
+\end{figure}
+
+
+\begin{figure}[H]
+ \centering
+ \includegraphics[width=0.8\textwidth]{figures/thread_deviation.png}
+ \caption{The standard deviations of the distributions in Figure \ref{thread_performance.png}. It should be noted that the distributions are not gaussian.}
+\end{figure}
+
+
+
+
+\subsection*{Data storage Efficiency}
+
+\begin{figure}[H]
+ \centering
+ \includegraphics[width=0.8\textwidth]{figures/data_storespeed.png}
+ \caption{Efficiency of different data storage methods. Although a data base provides many advanced features, it was realised that these features were not really needed for storing time ordered sensor data.}
+\end{figure}
+
+\subsection*{Sampling Rates}
+
+\begin{figure}[H]
+ \centering
+ \includegraphics[width=0.8\textwidth]{figures/adc_histogram.png}
+ \caption{Same graph as Figure \ref{sample_rate_histogram.png} but zoomed in to highlight the distribution obtained with \funct{ADC_Read} is called.}
+\end{figure}
+
+
+\begin{figure}[H]
+ \centering
+ \includegraphics[width=0.8\textwidth]{figures/rt_vs_normal_3-2-0-4-amd64_1e-6s.png}
+ \caption{Distributions (nanosecond timestamp resolution) for Real Time Linux kernel (\textcolor{green}{green}) and ``Vanilla'' Linux kernel (\textcolor{red}{red}) running on an i5 laptop with the sample rate set to 1$\mu\text{s}$}
+\end{figure}
+
+
+\begin{figure}[H]
+ \centering
+ \includegraphics[width=0.8\textwidth]{figures/rt_vs_normal_3-2-0-4-amd64_1e-4s.png}
+ \caption{As above but with a 100$\mu\text{s}$ sample rate}
+\end{figure}
+
+
Another major design change which occurred quite early in the project is the switch from using multiple processes to running a single multithreaded process on the server. After performing some rudimentary testing (see Section \ref{Server Interface}) it became clear that a system of separate programs would be difficult to implement and maintain. Threads are similar to processes but are able to directly share memory, with the result that much less synchronisation is required in order to transfer information.
-{\bf Note on filenames:} In the following, files and directories related to the server are located in the \href{https://github.com/szmoore/MCTX3420/tree/master/server}{server} directory, files related to the (currently used) GUI are in \href{https://github.com/szmoore/MCTX3420/tree/master/testing/MCTXWeb}{testing/MCTXWeb}, and files created for testing purposes are located in \href{https://github.com/szmoore/MCTX3420/tree/master/testing}{testing}.
+{\bf Note on filenames:} In the following, files and directories related to the server are located in the \href{https://github.com/szmoore/MCTX3420/tree/master/server}{server} directory, files related to the (currently used) GUI are in \href{https://github.com/szmoore/MCTX3420/tree/master/testing/MCTXWeb}{testing/MCTXWeb}, and files created for testing purposes are located in \href{https://github.com/szmoore/MCTX3420/tree/master/testing}{testing}. In the server there is nearly always an associated \texttt{.h} ``header'' file for each \texttt{.c} ``source'' file.
\begin{figure}[H]
\centering
Code to read sensor values is located in the \gitref{server}{sensors} subdirectory. With the exception of the dilatometer (discussed in Section \ref{Image Processing}), all sensors used in this project produce an analogue output. After conditioning and signal processing, this arrives at an analogue input pin on the BeagleBone as a signal in the range $0\to1.8\text{V}$. The sensors currently controlled by the software are:
\begin{itemize}
- \item {\bf Strain Gauges} (x4)
+ \item {\bf Strain Gauges} (x4) \gitref{server}{sensors/strain.c}
To simplify the amplifier electronics, a single ADC is used to read all strain gauges. GPIO pins are used to select the appropriate strain gauge output from a multiplexer. A mutex is used to ensure that no two strain gauges can be read simultaneously.
- \item {\bf Pressure Sensors} (x3)
+ \item {\bf Pressure Sensors} (x3) \gitref{server}{sensors/pressure.c}
There are two high range pressure sensors and a single low range pressure sensor; all three are read independently
- \item {\bf Microphone} (x1)
+ \item {\bf Microphone} (x1) \gitref{server}{sensors/microphone/c}
The microphone's purpose is to detect the explosion of a can. This sensor was given a low priority, but has been tested with a regular clicking tone and found to register spikes with the predicted frequency (~1.5Hz).
- \item {\bf Dilatometer} (x2) - See Section \ref{Image Processing}
+ \item {\bf Dilatometer} (x2) - \gitref{server}{sensors/dilatometer.c} See Section \ref{Image Processing}
\end{itemize}
Additional sensors can be added and enabled through use of the \funct{Sensor_Add} function in \funct{Sensor_Init} in the file \gitref{server}{sensors.c}.
Code to set actuator values is located in the \gitref{server}{actuators} subdirectory. The following actuators are (as of writing) controlled by the software and have been successfully tested in collaboration with the Electronics and Pneumatics teams. Additional actuators can be added and enabled through use of the \funct{Actuator_Add} function in \funct{Actuator_Init} in the file \gitref{server}{actuators.c}.
-\subsubsection{Relay Controls}
+\subsubsection{Relay Controls} \gitref{server}{actuators/relay.c}
The electrical team employed three relays for control over digital devices. The relays are switched using the GPIO outputs of the BeagleBone Black.
\subsubsection{PWM Outputs}
-A single PWM output is used to control a pressure regulator. The electrical team constructed an RC filter circuit which effectively averages the PWM signal to produce an almost constant analogue output. The period of the PWM is $2\text{kHz}$. This actuator has been calibrated, which allows the user to input the pressure value in kPa rather than having to control the PWM duty cycle correctly.
+A single PWM output is used to control a pressure regulator (\gitref{server}{actuators/pregulator.c}). The electrical team constructed an RC filter circuit which effectively averages the PWM signal to produce an almost constant analogue output. The period of the PWM is $2\text{kHz}$. This actuator has been calibrated, which allows the user to input the pressure value in kPa rather than having to control the PWM duty cycle correctly.
\begin{figure}[H]
% Appendices
\appendix
\include{appendices/glossary}
+\include{appendices/figures}
%\include{proposal/proposal.tex}
%\renewcommand\chaptername{Appendix}
%\chapter{Appendix}
\begin{titlepage}
\title{MCTX3420 Mechatronics Design\\Remote System Control of a Pressure Vessel Test Rig\\Software Team Report}
\author{Justin Kruger, 20767264 (Chapter \ref{Introduction and Approach})\\
- Sam Moore, 20503628 (Editing/Referencing, Sections \ref{Server Program},\ref{Hardware Interfacing},\ref{Authentication Mechanisms} Chapter \ref{Conclusions and Recommendations}), \\
+ Sam Moore, 20503628 (Sections \ref{Server Program},\ref{Hardware Interfacing},\ref{Authentication Mechanisms} Chapter \ref{Conclusions and Recommendations}), \\
Jeremy Tan, 20933708 (Sections \ref{Server/Client Communication},\ref{Alternative Communication Technologies},\ref{BeagleBone Configuration})\\
Callum Schofield, 20947475 (Section \ref{Image Processing})\\
James Rosher, 20939143 (Section \ref{Human Computer Interaction and the Graphical User Interface}) \\
Rowan Heinrich, 20939081 (Section \ref{GUI Design Process}) \\ \\ \\
- \includegraphics[width=150px]{figures/uwacrest.pdf} \\ \\ \\\r
+ \includegraphics[width=150px]{figures/uwacrest.pdf} \\ \\ \\
-}\r
+}
-\date{November 2013}\r
+\date{November 2013}
\maketitle
-\centering\r
-\r
+\centering
+
\end{titlepage}