forked from zietzm/Helmholtz_Test_Bench
620 lines
37 KiB
TeX
620 lines
37 KiB
TeX
\chapter{Operating Instructions}\label{chp:users_guide}
|
|
\section{Test Bench Assembly Instructions}
|
|
Because of the limited space available in the \gls{irs} cleanroom, the test bench may need to be disassembled and reassembled in the future. Instructions for this are provided here. Mentioned position numbers relate to those shown in Figure \ref{fig:assembly}.
|
|
|
|
\begin{figure}[h]
|
|
% preliminary
|
|
\sbox\twosubbox{%
|
|
\resizebox{\dimexpr.99\textwidth-1em}{!}{%
|
|
\includegraphics[trim={3 0 3 0}, clip, height=4cm]{media/Frame_iso.pdf}%
|
|
\includegraphics[height=4cm]{media/Cable Routing.png}%
|
|
}%
|
|
}
|
|
\setlength{\twosubht}{\ht\twosubbox}
|
|
\centering
|
|
\subcaptionbox{Structural frame \cite{Blessing_TestBench} \label{fig:frame_iso2}}{%
|
|
\includegraphics[height=\twosubht]{media/Frame_iso.pdf}%
|
|
}\quad
|
|
\subcaptionbox{Full test bench and cable routing\protect\footnotemark \label{fig:cable_routing2}}{%
|
|
\includegraphics[height=\twosubht]{media/Cable Routing.png}%
|
|
}
|
|
\caption{Test bench assembly drawings}
|
|
\label{fig:assembly}
|
|
\end{figure}
|
|
\footnotetext{Base drawing from \cite{Blessing_TestBench}}
|
|
|
|
\subsection{Disassembly Procedure}\label{sec:disassembly}
|
|
\myparagraph{Notes:}
|
|
The coils must always be supported on two sides during handling to avoid bending.\\
|
|
The used slot nuts are wedged in the structural profiles and will stay in place even when their screw is removed. In most cases this is desirable, to mark the correct positions for reassembly. If one needs to be removed, loosen the attached screw and gently tap its head with a hammer.\\
|
|
\textbf{All removed screws must be stored orderly, as they are needed for future reassembly!}
|
|
|
|
\paragraph{Procedure:}
|
|
\begin{enumerate}
|
|
\item Undo cabling
|
|
\begin{enumerate}
|
|
\item Disconnect switch box from main cable and \gls{psu}s
|
|
\item Disconnect coil cables from central screw terminal (Fig. \ref{fig:main_connector})
|
|
\item Disconnect screw terminals between coils, leave terminal on one side
|
|
\item Untie wires from their guiding structures
|
|
\end{enumerate}
|
|
\item Remove Z-axis coils
|
|
\begin{enumerate}
|
|
\item Unscrew upper coil brackets (20) from profiles (08), but leave them on the coil
|
|
\item Lift off upper coil (A6)
|
|
\item Remove upper coil support profiles (08), leave angle pieces on main structure
|
|
\item Repeat procedure for lower coil
|
|
\end{enumerate}
|
|
\item Remove Y and X-axis coils
|
|
\begin{enumerate}
|
|
\item Unscrew coil brackets (19) for one Y-axis coil (A5) from frame profiles (07), but leave them on the coil
|
|
\item Lift off coil (A5)
|
|
\item Repeat procedure for second coil (A5) and X-axis coils (A4)
|
|
\end{enumerate}
|
|
\item Remove mounting plate (21)
|
|
\item Lay remaining frame on its side, mounting plate profiles (09) should be on top and bottom (orientation shown in Figure \ref{fig:assembly_rectangle})
|
|
\item Separate "upper" rectangular frame section (highlighted yellow in Figure \ref{fig:assembly_rectangle})
|
|
\begin{enumerate}
|
|
\item Remove bolts of angles connecting rectangle to cross-member profiles (07), angle pieces should remain on "upper" rectangle
|
|
\item Lift off entire rectangle section
|
|
\end{enumerate}
|
|
\item Remove cross-member profiles (07) from "lower" rectangle section, angles stay attached
|
|
\end{enumerate}
|
|
|
|
\begin{figure}[h!]
|
|
\begin{minipage}{0.49\textwidth}
|
|
\includegraphics[width=\textwidth]{media/wire_collector}
|
|
\caption{Main connector (X-cables temp.)}
|
|
\label{fig:main_connector}
|
|
\end{minipage}
|
|
\begin{minipage}{0.49\textwidth}
|
|
\includegraphics[width=\textwidth]{media/disassembly_frame1}
|
|
\caption{Intermediate (dis-)assembly step}
|
|
\label{fig:assembly_rectangle}
|
|
\end{minipage}
|
|
\end{figure}
|
|
|
|
\subsection{Reassembly Procedure}
|
|
\myparagraph{Notes:}
|
|
These instructions assume a disassembly according to Section \ref{sec:disassembly}. Most slot nuts should still be in place and simplify positioning the parts. However, the angle pieces do allow some tolerance, so care should still be taken to get the correct alignments.
|
|
|
|
\paragraph{Procedure:}
|
|
\begin{enumerate}
|
|
\item Lay one main frame rectangle on the floor as shown in Figure \ref{fig:assembly_rectangle}
|
|
\item Attach cross-member profiles (07)
|
|
\item Attach second frame rectangle on top, state should now be as shown in Figure \ref{fig:assembly_rectangle}.
|
|
\item Lift frame upright and adjust foot heights for solid stand
|
|
\item Attach mounting plate (21)
|
|
\item Install X and Y-axis coils
|
|
\begin{enumerate}
|
|
\item Lift +X coil (A4) onto cross-member profiles (07); mind wire exit position (Fig. \ref{fig:cable_routing2})
|
|
\item If needed, adjust cross-member profile height; coil should be supported equally on upper and lower profiles without bending
|
|
\item Centre coil and secure with 3D-printed brackets (19)
|
|
\item Repeat for -X (A4)and Y-axis coils (A5)
|
|
\end{enumerate}
|
|
\item Install Z-axis coils (A6)
|
|
\begin{enumerate}
|
|
\item Attach lower coil support profiles (08)
|
|
\item Lift -Z coil over X/Y coils onto support profiles; mind wire exit position (Fig. \ref{fig:cable_routing2})
|
|
\item Centre coil and secure with 3D-printed brackets (20)
|
|
\item Repeat for upper support profiles and +Z coil
|
|
\end{enumerate}
|
|
\item Make electrical connections
|
|
\begin{enumerate}
|
|
\item Connect screw terminals between coils (unmarked wire ends)
|
|
\item Route and tie down wires as shown in Figure \ref{fig:cable_routing2}
|
|
\item Check that there are no short circuits between coil wires and frames
|
|
\item Connect main screw terminal as shown in Figure \ref{fig:main_connector}
|
|
\item Connect main cable to switch box
|
|
\item Verify contact on all axes (multimeter at switch box inputs), resistances approx. {\SI{3.1}{\ohm}}
|
|
\item Connect switch box to \gls{psu}s: X-axis to \gls{psu} 1 channel 1, Y-axis to \gls{psu} 1 channel 2, Z-axis to \gls{psu} 2 channel 1
|
|
\end{enumerate}
|
|
\item Setup laptop and initialize control program as described in Section \ref{sec:software_init}
|
|
\item Verify correct polarity on all axes through magnetic field measurements at different currents
|
|
\item Calibrate test bench (exact procedure to be developed)
|
|
\end{enumerate}
|
|
|
|
\newpage
|
|
\section{Software Users Guide}\label{sec:software_guide}
|
|
\subsection{Installation}
|
|
\begin{enumerate}
|
|
\item Download latest release: \url{https://egit.irs.uni-stuttgart.de/eive/Helmholtz_Test_Bench/releases}
|
|
\item Unpack ZIP-folder and run "Release{\textbackslash}Helmholtz Control.exe"
|
|
\item Setup hardware and program according to Section \ref{sec:software_init}
|
|
\end{enumerate}
|
|
|
|
\subsection{User Interface Elements}
|
|
The general \gls{ui} layout is shown in Figure \ref{fig:ui_overview}. The upper area contains the interactive elements of each operating mode and settings page. Switching between these pages is done using the top "Menu" bar. The lower half of the \gls{ui} contains the status display and a console output.
|
|
|
|
\subsubsection*{Status Display}
|
|
The status display shows the current state of the test bench devices. Explanations of the different values are given in Table \ref{tab:status_contents}.
|
|
|
|
\small
|
|
\begin{longtable}{lp{12.5cm}}
|
|
\caption{Status display entries}\\
|
|
\hline
|
|
\textbf{Entry} & \textbf{Explanation}\\ \hline
|
|
\endfirsthead
|
|
\multicolumn{2}{c}%
|
|
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
|
|
\hline
|
|
\textbf{Entry} & \textbf{Explanation}\\ \hline
|
|
\endhead
|
|
\hline \multicolumn{2}{r}{\textit{Continued on next page}} \\
|
|
\endfoot
|
|
\hline
|
|
\endlastfoot
|
|
\gls{psu} Serial Port: & Serial \gls{com} port used to connect to the \gls{psu} for this axis. \\[8pt]
|
|
\gls{psu} Channel: & \gls{psu} output channel for this axis (0$\rightarrow$channel 1, 1$\rightarrow$channel 2). \\[8pt]
|
|
\gls{psu} Status: & Connection status of \gls{psu} for this axis. Possible states: \vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item \textit{Connected:} communication nominal
|
|
\item \textit{Not Connected:} \gls{psu} not found during initialization
|
|
\item \textit{Connection Error:} \gls{psu} was connected but then an error occurred, e.g. it was disconnected
|
|
\end{itemize} \\[-4pt]
|
|
Arduino Status: & Connection status of switch box Arduino (identical for all axes). Possible states: \vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item \textit{Connected:} communication nominal
|
|
\item \textit{Not Connected:} Arduino not found during initialization
|
|
\item \textit{Connection Error:} Arduino was connected but then an error occurred, e.g. it was disconnected
|
|
\end{itemize} \\[-4pt]
|
|
Output: & Status of \gls{psu} output channel. Possible states: \vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item \textit{Active:} set current or voltage is applied to the output jacks
|
|
\item \textit{Inactive:} output jacks are unpowered
|
|
\item \textit{Unknown:} no connection to \gls{psu}
|
|
\end{itemize} \\[-4pt]
|
|
Remote Control: & Status of \gls{psu} channel remote interface. Possible states: \vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item \textit{Active:} channel can be controlled remotely
|
|
\item \textit{Inactive:} channel can not be controlled remotely
|
|
\item \textit{Unknown:} no connection to \gls{psu}
|
|
\end{itemize}\\[-4pt]
|
|
Voltage Setpoint: & Maximum voltage \gls{psu} is set to supply. \\[4pt]
|
|
Actual Voltage: & Voltage across \gls{psu} channel output jacks. Usually lower than "Voltage Setpoint", as voltage is throttled to achieve the desired current. \\[16pt]
|
|
Current Setpoint: & Current the \gls{psu} output channel is set to supply \\[8pt]
|
|
Actual Current: & Current flowing through the \gls{psu} output channel. \\[8pt]
|
|
Target Field: & Desired magnetic flux density in the measurement area. \\[8pt]
|
|
Trgt. Field Raw: & Flux density used to calculate needed current (after ambient field compensation). \\[8pt]
|
|
Target Current: & Desired current to flow through the coils. Negative values mean reversed polarity. \\[8pt]
|
|
Inverted: & Status of polarity change relay for this axis inside the switch box. Possible states:\vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item \textit{True:} (Arduino pin "HIGH"$\rightarrow$relay switched$\rightarrow$polarity inverted, status \gls{led} should be illuminated)
|
|
\item \textit{False:} pin "LOW"$\rightarrow$opposite of "True" state
|
|
\item \textit{Unknown:} no connection to Arduino
|
|
\end{itemize}\\[-20pt]
|
|
\label{tab:status_contents}
|
|
\end{longtable}
|
|
\normalsize
|
|
|
|
\subsubsection*{Manual Mode}\label{sec:manual_mode_guide}
|
|
The manual input mode is used to set static currents or magnetic fields on the test bench. Its layout is shown in Figure \ref{fig:manualmodepure}. The main \gls{ui} elements are listed below.
|
|
|
|
\begin{figure}[h]
|
|
\centering
|
|
\includegraphics[width=0.5\linewidth]{media/manual_mode_pure}
|
|
\caption{Manual input mode user interface}
|
|
\label{fig:manualmodepure}
|
|
\end{figure}
|
|
|
|
\begin{itemize}
|
|
\item \textbf{"Select Input Mode" drop-down}: Switches between setting currents or magnetic fields
|
|
\item \textbf{Value entry fields:} Enter values to be set on the test bench here
|
|
\begin{itemize}
|
|
\item Entries must be numeric (decimal point)
|
|
\item Entries must be in indicated safe range (may be changed in the settings page)
|
|
\end{itemize}
|
|
\item \textbf{"Compensate ambient field" checkbox:} When ticked, the ambient magnetic field (set in settings page) is subtracted from entered values before commanding the test bench (inactive for "Current" input mode)
|
|
\item \textbf{"Execute" button:} Implements values from the entry fields
|
|
\begin{itemize}
|
|
\item Commands currents on \gls{psu}s and polarity on switch box
|
|
\item If a device is not connected, the remaining ones are still commanded
|
|
\item Values beyond safe limits (indicated to the right of entry fields) are rejected
|
|
\item Device status and any errors are displayed in status display and console
|
|
\end{itemize}
|
|
\item \textbf{"Power Down All" button}: "Panic button", sets currents on both \gls{psu}s to 0, deactivates outputs and sets switch box relay pins to inactive state
|
|
\item \textbf{"Reinitialize" button:} Reruns program initialization
|
|
\begin{itemize}
|
|
\item Reinitializes connection to \gls{psu}s and switch box Arduino
|
|
\item Press after (re)connecting a device to let program establish communications
|
|
\end{itemize}
|
|
\end{itemize}
|
|
|
|
\textbf{To command a field vector or currents on the test bench:}
|
|
\begin{enumerate}
|
|
\item Select needed input mode, using the drop-down menu
|
|
\item Enter desired values in entry fields
|
|
\item For magnetic fields, choose whether ambient field should be compensated by (un)ticking the checkbox
|
|
\item Press "Execute" button, devices will now implement set values
|
|
\item Check console output to see if any errors occurred
|
|
\item Monitor behavior in status display and on devices
|
|
\item When finished, press "Power Down All" button to remove currents from the test bench
|
|
\end{enumerate}
|
|
|
|
\subsubsection*{CSV Sequence Execution Mode}\label{sec:csv_mode_guide}
|
|
This mode is used to run timed sequences of magnetic fields. These have to be defined in a \gls{csv} file of the following form:
|
|
\begin{itemize}
|
|
\item \textit{Column separator:} Semicolon (;)
|
|
\item \textit{Decimal:} Comma (,) or Period (.)
|
|
\item \textit{Line terminator:} Tested with Windows standard (\code{\textbackslash r\textbackslash n}), other options may work as well
|
|
\item \textit{Columns:} Time in seconds; X-axis, Y-axis and Z-axis flux density in Tesla
|
|
\end{itemize}
|
|
An example for the \gls{csv} file structure is given below:
|
|
%[caption=Example \gls{csv} file]
|
|
\begin{lstlisting}
|
|
Time (s);xField (T);yField (T);zField (T)
|
|
0,5;0,000015;0,000025;0,00002
|
|
1;0,0000155;0,0000245;0,0000205
|
|
\end{lstlisting}
|
|
When loading such a file, the application will check that there are no values exceeding the safe test bench limits in the sequence. If any are found, a warning message is shown and the limits displayed in the sequence graph. It is still possible to execute such a sequence, however the excessive values will not be commanded. For those time stamps, \SI{0}{\ampere} is set instead. The limits may be adjusted in the program settings page, but care should be taken to avoid equipment damage.\\
|
|
\begin{figure}[h]
|
|
\centering
|
|
\includegraphics[width=\textwidth]{media/csv_mode_pure}
|
|
\caption{CSV sequence mode user interface}
|
|
\label{fig:csvmodepure}
|
|
\end{figure}
|
|
|
|
The \gls{ui} layout is shown in Figure \ref{fig:csvmodepure}, its main elements are listed below.
|
|
\begin{itemize}
|
|
\item \textbf{"Select csv file..." button:} Opens a file dialog to let user choose a \gls{csv} file to execute
|
|
\item \textbf{"Run Sequence" button} Starts executing the sequence from the chosen \gls{csv} file
|
|
\item \textbf{"Stop Run" button:} Aborts sequence execution
|
|
\item \textbf{"Reinitialize devices" button:} Reruns program initialization
|
|
\begin{itemize}
|
|
\item Reinitializes connection to \gls{psu}s and switch box Arduino
|
|
\item Press after (re)connecting a device to let program establish communications
|
|
\end{itemize}
|
|
\item \textbf{"Disable device connection checks" checkboxes:} Disable connection check for specific devices, allowing sequence execution with some equipment missing
|
|
\item \textbf{Graph display:} Displays graph of field sequence, as it will be executed by the test bench
|
|
\end{itemize}
|
|
\newpage
|
|
\textbf{To execute a field sequence:}
|
|
\begin{enumerate}
|
|
\item Ensure correct configuration of program and test bench in the settings page
|
|
\item Prepare sequence in \gls{csv} file with correct format (external program)
|
|
\item Press "Select csv file..." button, select prepared file and open
|
|
\item Check plots to confirm sequence was loaded correctly and no values exceed safe limits
|
|
\item If not all devices are used, check boxes of unused devices to disable connection check
|
|
\item Press "Run Sequence" button
|
|
\item Monitor execution in console, status display and on devices
|
|
\end{enumerate}
|
|
|
|
\subsubsection*{Ambient Field and Coil Constant Calibration}
|
|
\label{sec:ambient_field_calibration}
|
|
The application offers calibration tools to determine the exact ambient field with the intention of cancelling it, as well for measuring the test bench's coil constants.
|
|
These are both integrated into one application view, depicted in Figure \ref{fig:ambientcalibrationpure}.
|
|
All the calibration tools require access to the complete Helmholtz cage hardware, as well as a magnetometer.
|
|
These must be connected before starting the test.
|
|
It is important that the magnetometer is centered as well as possible to achieve accurate results.
|
|
For these tests, where the magnetometer itself is not the \gls{dut}, it is recommended to use the IRS's FGM3D reference magnetometer.
|
|
Further, an adapter script (\code{fgm3d\_adapter.py}) already exists for this sensor.
|
|
For more details on writing adapter scripts and connecting magnetometers, please refer to Section \ref{sec:tcp_api}.
|
|
|
|
\begin{figure}[h]
|
|
\centering
|
|
\includegraphics[width=\linewidth]{media/ambient_calibration_pure}
|
|
\caption{Ambient field and coil constant calibration view.}
|
|
\label{fig:ambientcalibrationpure}
|
|
\end{figure}
|
|
|
|
After setting up the magnetometer, operation is simple: Click on the buttons to ``Calibrate Ambient Field'' or ``Calibrate Coil Constants''.
|
|
This will cause the calibration procedure to start.
|
|
The current status will be shown in the progress bar underneath.
|
|
After completing, the results of the calibration procedure will be saved into the data fields on the right hand side of Figure \ref{fig:ambientcalibrationpure}.
|
|
At this point, the buttons underneath the respective will become available.
|
|
These two calibrations are primarily used to determine important application config parameters, namely the ambient field and coil constant as their names imply.
|
|
To automatically apply the newly measured values, click ``Save and apply''.
|
|
The ``Copy to clipboard'' will put the results table as shown in the \gls{ui} into the system clipboard, from which it can be pasted into software such as Microsoft Excel and LibreOffice Calc.
|
|
If semi-raw experiment data is required to verify the program functioning or to apply custom algorithms, it can be exported with the ``Export raw CSV'' button.
|
|
|
|
\vspace{5mm}
|
|
\textbf{Ambient Field Calibration Method}
|
|
This calibration uses a P-controller (implemented as PI-controller with $I=0$) to attempt to reach zero as a set point for the magnetometer.
|
|
Updates are preformed approximately every half second by default and the calibration executes for 45 seconds.
|
|
The procedure consistently achieves zero offsets below \SI{10}{\nano\tesla}.
|
|
The ambient field exported by this calibration has been processed by multiplying the current that was required with the current coil constants, thus it is strongly recommended to first preform the coil constant calibration if both are to be executed.
|
|
|
|
\vspace{5mm}
|
|
\textbf{Coil Constant Calibration Method}
|
|
The coil consant calibration uses a linear distribution of currents in each axis individually to collect coil consant data.
|
|
Each setpoint is held for 3 seconds before being measured, and by default 8 points distributed across \SI{-3}{\ampere} to \SI{3}{\ampere}.
|
|
To calculate the individual setpoints corresponding to each setpoint, first the field magnitude compared to the inital conditions is calculated, second the sign is estimated and reapplied, third the field is divided by the applied current.
|
|
The final result is the average of all constants.
|
|
In addition to the primary coil constant measurement, the maximum setpoints are also sampled once for each axis to calculate the angles between the coils.
|
|
This is simply done by calculating the angle between the measured vectors.
|
|
|
|
To understand the calibration methods in all detail, it is recommended to look at the \code{calibration.py} source file.
|
|
|
|
\subsubsection*{Magnetometer Calibration}
|
|
\label{sec:magnetometer_calibration}
|
|
|
|
The helmholtz control software supports calibrating magnetometers.
|
|
In preparation, a calibration of the ambient field using the reference magnetometer (FGM3D) should be conducted beforehand to achieve accurate results.
|
|
Afterwards, the magnetometer must be replaced with the \gls{dut}.
|
|
Since the software only supports one magnetometer at once, the reference magnetometer (meaning: its adapter script) should be disabled beforehand.
|
|
Tip: To mount CubeSat magnetometers a purpose built PC104 holder can be found in accompanyment of the Helmholtz cage.
|
|
|
|
As the coordinate system of the Helmholtz Cage and the magnetometer may not match, there are two options that available.
|
|
First, the calibration can be conducted as-is, and the calibration results will reflect the unexpected coordinate system by often yielding negative sensitivities and untypical sensor axis angles.
|
|
These values are not invalid, but describe a sensor correction that would transform it into the Helmholtz coordinate system.
|
|
With some work, the desired calibration parameters could be extracted mathematically by changing signs and adding or subtracting \SI{90}{\degree} increments.
|
|
The second option would be to change the sensors orientation in software in the adapter script that is used.
|
|
This yields a more expected set of calibration parameters, but these now do not describe the initial axes anymore.
|
|
In this case, the parameters must be correlated back to their initial axes and angles must be negated if the axis was flipped.
|
|
This common issue should be solved robustly in the control/calibration software in the future.
|
|
|
|
\begin{figure}[h]
|
|
\centering
|
|
\includegraphics[width=\linewidth]{media/magnetometer_calibration_pure}
|
|
\caption{Magnetometer calibration view.}
|
|
\label{fig:magcalibrationpure}
|
|
\end{figure}
|
|
The procedure to start the magnetometer can be done as follows:
|
|
\begin{itemize}
|
|
\item Activate the FGMM3D box, start the \textit{FGM3D TD Application} software and check if the device was recognissed automatically (Port: FGM3D TD (000125). If the device was not recognized, click on \textit{File -> Rescan} devices, else restart the computer.
|
|
\item Click on \textit{connct} and \textit{start}. Telemetry should now be displayed in the application. Use the \textit{Live Streaming} console and stram to \textbf{COM10}
|
|
\item Start the \textit{Helmholtz Control.exe} software and navigate to e.g. \textit{Menu -> Ambient Filed Calibration}
|
|
Start the \textit{fgm3dcadapter.py} script that forwards the data live stream from \textit{COM10} on the Sensys app \textbf{COM11} of the Helmholtz application.
|
|
\item Start the data live stream in the FGM3D software by first starting the data acquisition and then live streaming function. Check if the console of the applocation says "Magnetometer State: active"
|
|
\item The test bench should be ready to run e.g. the Magnetometer Calibrtation script.
|
|
\end{itemize}
|
|
|
|
|
|
The calibration method used (Zikmund \cite{ref:calibration_procedure_magnetometer_helmholtz_cage}) relies on a simplified error model and the Helmholtz test bench.
|
|
After either measuring the local geomagnetic field or cancelling it, the magnetometer-under-test runs through a sequence of magnetic fields generated by the Helmholtz coils, which supplies sufficient data to solve a system of equations containing the coefficients of interest.
|
|
The non-linear system is constructed with the equation below on a per-axis basis, with one row for every sample.
|
|
|
|
\begin{equation*}
|
|
B_{meas} = S \left( B_E \sin{\alpha_E} + B_x \cos{\alpha} \cos{\beta} + B_y \cos{\alpha} \sin{\beta} + B_z \sin{\alpha} \right)
|
|
\end{equation*}
|
|
|
|
The calibration procedure makes use of nearly equidistantly distributed vectors in all directions as test points.
|
|
The number of these points, as well as the settle time before taking a measurement, can be set in the \gls{ui}.
|
|
Generally, a high number of points, such as larger than 8, is recommended to achieve both an accurate result and also to get useful residual data.
|
|
The meaning of the individual calibration coefficients can be derived from Zikmund \cite{ref:calibration_procedure_magnetometer_helmholtz_cage} or also the thesis accompanying the Helmholtz test bench \cite{ref:leons_test_bench}.
|
|
|
|
After completing, the results of the calibration procedure will be saved into the data fields on the right hand side of Figure \ref{fig:magcalibrationpure}.
|
|
This also enables the save buttons underneath.
|
|
The ``Copy to clipboard'' will put the results table as shown in the \gls{ui} into the system clipboard, from which it can be pasted into software such as Microsoft Excel and LibreOffice Calc.
|
|
If semi-raw experiment data is required to verify the program functioning or to apply custom algorithms, it can be exported with the ``Export raw CSV'' button.
|
|
|
|
\subsubsection*{Data Logging Configuration Page}\label{sec:logging_guide}
|
|
The application has the ability to log test bench data to a \gls{csv} file.
|
|
The data is temporarily stored internally and must be saved to an external file by user request.
|
|
The logging output is highly customizable using the options shown in Figure \ref{fig:loggingpure}.
|
|
|
|
An example of a log file is given in Appendix \ref{app:example_files}.
|
|
Unless explicitly disabled, the first three columns are time stamps: date, system time and time since the start of logging in seconds.
|
|
All dynamic values from the status display as well as the magnetometer status can be logged, see Table \ref{tab:status_contents} for explanations.
|
|
Each type of data is logged for all three axes by default, but this can also be specified.
|
|
The units for numerical values are Volt, Ampere and Tesla.
|
|
|
|
There are two options as for when and how often data is logged.
|
|
The first option logs a row of data in a regular time interval specified by the user.
|
|
The second option logs, whenever a significant command is sent to the test bench, for example when a new field vector is commanded.
|
|
Both options can be used simultaneously.
|
|
|
|
The logging configuration \gls{ui} is shown in Figure \ref{fig:loggingpure}.
|
|
Its elements are listed below.
|
|
|
|
\begin{figure}[h]
|
|
\centering
|
|
\includegraphics[width=0.6\linewidth]{media/logging_mode_pure}
|
|
\caption{Data logging configuration page}
|
|
\label{fig:loggingpure}
|
|
\end{figure}
|
|
|
|
\begin{itemize}
|
|
\item \textbf{"Start Logging" button:} Starts the logging of data, as configured in the other elements
|
|
\item \textbf{"Stop Logging" button:} Stops the logging of data
|
|
\item \textbf{"Write data to file" button:} Lets user save the logged data to a file
|
|
\begin{itemize}
|
|
\item Opens dialogue to let user select a file path (chosen file name must be *.csv)
|
|
\item Saves logged data to the selected file
|
|
\end{itemize}
|
|
\item \textbf{"Clear logged data" button:} Deletes all data logged internally by the program, user will be asked if data should be saved to a file first
|
|
\item \textbf{"Datapoints logged" counter:} Displays the current number of logged data rows
|
|
\item \textbf{"Log in regular intervals" controls:} Enable checkbox to periodically log data, set interval (in seconds) in the entry field to the right
|
|
\item \textbf{"Log whenever test bench is commanded" checkbox:} Enable, to log data on significant changes to the test bench (e.g. a new field vector is commanded)
|
|
\item \textbf{Data selection checkboxes:} Select what data to log, explanations for most options are given in Table \ref{tab:status_contents}.
|
|
In addition, the Log X/Y/Z-Axis Data checkboxes specify whether the selected logging variables will be included for the respective axis.
|
|
\end{itemize}
|
|
\textbf{To collect and save log data:}
|
|
\begin{enumerate}
|
|
\item Select when to log data (both options can be used simultaneously)
|
|
\begin{itemize}
|
|
\item For regular logging, enable "Log in regular intervals" checkbox and set desired interval
|
|
\item For logging on test bench command, enable second checkbox
|
|
\end{itemize}
|
|
\item Select what data to log, using the lower checkboxes
|
|
\item Press "Start Logging" button
|
|
\item When finished, press "Stop Logging" button
|
|
\item Press "Write data to file" button
|
|
\item Choose file location and name (must be *.csv, e.g. my\_log.csv), and press save
|
|
\item Press "Clear logged data" button (optional)
|
|
\end{enumerate}
|
|
\newpage
|
|
\subsubsection*{Settings Page}\label{sec:settings_guide}
|
|
This is the main page for configuring the program. The settings can be stored to and loaded from *.ini configuration files.\\
|
|
The different program constants are set through a series of entry fields. All imputs must be numerical values (decimal points). Safe limits for each value are set inside the program. The constants and limits are listed in Table \ref{tab:settings_entries}. If a value exceeding those boundaries is entered, a warning message is displayed and the respective entry field marked in red. \textbf{It is not recommended to ignore these warnings, as incorrect settings can damage equipment on the test bench!}
|
|
|
|
\begin{figure}[h]
|
|
\centering
|
|
\includegraphics[width=0.8\linewidth]{media/config_mode_pure}
|
|
\caption{Program settings page}
|
|
\label{fig:settingspure}
|
|
\end{figure}
|
|
Figure \ref{fig:settingspure} shows a screenshot of the \gls{ui} layout with the default settings. The main elements are listed below.
|
|
\begin{itemize}
|
|
\item \textbf{"Load config file..." button:} Imports an existing configuration file
|
|
\begin{itemize}
|
|
\item Opens file dialogue for selecting configuration file
|
|
\item Loads settings from selected file
|
|
\item Checks if any settings exceed safe limits and, if so, displays warning messages
|
|
\item Reinitializes test bench devices with new settings
|
|
\end{itemize}
|
|
\item \textbf{"Save current config" button:} Writes settings to the currently selected file and reinitializes test bench devices with new settings
|
|
\item \textbf{"Save current config as..." button:} Writes settings to a new file
|
|
\begin{itemize}
|
|
\item Opens dialogue to let user choose new file path and name (must be *.ini)
|
|
\item Reinitializes test bench devices with current settings
|
|
\end{itemize}
|
|
\item \textbf{"Serial Port" entries:} Input \gls{com} ports for both \gls{psu}s and the switch box here
|
|
\begin{itemize}
|
|
\item Use Windows device manager to find correct port names (connect devices separately to differentiate between devices)
|
|
\item Test bench X- and Y-axes need to be connected to channel 1 and 2 of one \gls{psu}, Z-axis to channel 1 of the other
|
|
\end{itemize}
|
|
\item \textbf{Program constant entry fields:} Set constants here, details are listed in Table \ref{tab:settings_entries}
|
|
\item \textbf{"Update and Reinitialize" button:} Implements any changed settings in the program and on test bench devices, needs to be pressed for changes to take effect
|
|
\item \textbf{"Restore Defaults" button:} Restores default settings
|
|
\end{itemize}
|
|
|
|
\begin{table}[ht]
|
|
\small
|
|
\caption{Settable program constants}
|
|
\begin{tabular}{llp{10.2cm}}
|
|
\hline
|
|
\textbf{Entry} & \textbf{Limits} & \textbf{Explanation}\\ \hline
|
|
\rule{0pt}{12pt} Coil Constants: & 0 to \SI{50}{\micro\tesla\per\ampere} & Magnetic field generated per applied current \vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item Used to calculate current needed to achieve desired field
|
|
\item Must be measured and tuned before test campaigns
|
|
\end{itemize}\\[-4pt]
|
|
Ambient Field: & -200 to \SI{200}{\micro\tesla} & Background magnetic field in the measurement area \vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item Subtracted from desired field to compensate ambient field
|
|
\item Must be measured and tuned before test campaigns
|
|
\end{itemize}\\[-4pt]
|
|
Resistances: & 1 to \SI{5}{\ohm} & Electrical resistance of each axis, measure from \gls{psu} connectors \\[8pt]
|
|
Max. Current: & 0 to 6 \si{\ampere} & Current limit for each axis \vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item Program will block commanding of higher values on \gls{psu}
|
|
\item Maximum safe permanent current: $I_{max}=\SI{5.5}{\ampere}$ \cite{Blessing_TestBench}
|
|
\end{itemize}\\[-4pt]
|
|
Max. Voltage: & 0 to \SI{16}{\volt} & Voltage limit for each axis \vspace{-1.5mm}
|
|
\begin{itemize}
|
|
\setlength\itemsep{-0.2em}
|
|
\item Program will block commanding of higher values on \gls{psu}
|
|
\item Maximum safe voltage, limited by diodes inside switch box: $U_{max}=\SI{16}{\volt}$
|
|
\end{itemize}\\[-4pt]
|
|
Arduino Pins: & 15,16,17 & Output pins on switch box Arduino for inverting polarity on each axis (hard wired inside switch box, should not need to be changed) \\
|
|
\hline
|
|
\end{tabular}
|
|
\label{tab:settings_entries}
|
|
\end{table}
|
|
|
|
\clearpage
|
|
\subsection{Hardware Connections and Program Setup}\label{sec:software_init}
|
|
\begin{enumerate}
|
|
\item Connect hardware
|
|
\begin{enumerate}
|
|
\item Connect switch box to test bench main cable bundle (connector on the back)
|
|
\item Connect switch box to \gls{psu}s: \textbf{X-axis to \gls{psu} 1 channel 1, Y-axis to \gls{psu} 1 channel 2, Z-axis to \gls{psu} 2 channel 1}
|
|
\item Connect switch box power supply (\SI{12}{\volt} DC)
|
|
\item Connect switch box \gls{usb} port to \gls{pc}
|
|
\item Connect \gls{psu} \gls{usb} ports to \gls{pc}
|
|
\end{enumerate}
|
|
\item Configure interfaces to hardware
|
|
\begin{enumerate}
|
|
\item Start program (run "Helmholtz Cage Control.exe")
|
|
\item Go to settings page (Menu$\rightarrow$Settings...)
|
|
\end{enumerate}
|
|
\begin{itemize}
|
|
\item If program has not been configured before:
|
|
\begin{enumerate}
|
|
\setcounter{enumii}{2}
|
|
\item Use Windows device manager to find correct serial \gls{com} ports for \gls{psu}s and Arduino (connect /disconnect in turn to differentiate between devices)
|
|
\item Enter \gls{com} port names in application (switch box should be found automatically)
|
|
\item Press "Update and Reinitialize" button
|
|
\end{enumerate}
|
|
\item If a previous configuration exists:
|
|
\begin{enumerate}
|
|
\setcounter{enumii}{2}
|
|
\item Press "Load config file..." button
|
|
\item Select configuration file (e.g. "myconfig.ini") and open
|
|
\item Check that the settings were loaded correctly and no values violate the safe limits (fields highlighted in red)
|
|
\end{enumerate}
|
|
\end{itemize}
|
|
\begin{enumerate}
|
|
\setcounter{enumii}{5}
|
|
\item Check console print to see if all devices were found, otherwise check physical connections and \gls{com} port settings
|
|
\end{enumerate}
|
|
\item If using a magnetometer, the listening port is open and the adapter script can now be started
|
|
\item Test configuration
|
|
\begin{enumerate}
|
|
\item Go to manual mode (Menu$\rightarrow$Static Manual Input)
|
|
\item Switch input mode to "Current" (see Section \ref{sec:manual_mode_guide})
|
|
\item Set different currents and check device response:
|
|
\begin{itemize}
|
|
\item Current should be activated on correct \gls{psu} channel
|
|
\item For negative currents, corresponding status \gls{led} on switch box should light up and relay actuation be audible as clicking sound
|
|
\end{itemize}
|
|
\item If using a magnetometer: Check the device output in either of the calibration-views
|
|
\end{enumerate}
|
|
\item Go back to the settings page (Menu$\rightarrow$Settings...)
|
|
\item Change program constants as needed (e.g. enter measured ambient field), see Section \ref{sec:settings_guide}
|
|
\item Save configuration:
|
|
\begin{itemize}
|
|
\item Press "Save current config" button to update the current configuration file
|
|
\item Press "Save current config as..." button to save to a new configuration file, set new file name in file dialogue (e.g. "myconfig.ini")
|
|
\end{itemize}
|
|
\end{enumerate}
|
|
|
|
\subsection{TCP Remote Control}
|
|
\label{sec:tcp_api}
|
|
|
|
The Helmholtz Control Software offers a TCP automation interface that is opened upon application start-up.
|
|
To find out which port is being listened on, look for the corresponding information in the application console, but typically, it will be port 6677.
|
|
The commands that are accepted by the TCP interface are documented in Table \ref{tab:tcp_comamnds} and also in the \code{socket\_control.py} source file.
|
|
All field commands will implicitly preform the usual safety checks to ensure safe operation.
|
|
The commands that are shown must all be terminated with a single {\textbackslash}n (newline) char.
|
|
Commands may be split across multiple packets if desired.
|
|
Important Note: Before useful commands can be sent, \code{declare\_api\_version} must be called.
|
|
|
|
The \code{tools} folder in the application git repository contains an example implementation (\code{fgm3d\_adapter.py}) of a magnetometer interface using the TCP socket.
|
|
|
|
%\small
|
|
\begin{longtable}{lp{8.5cm}}
|
|
\caption{TCP Remote Control Commands}\\
|
|
\hline
|
|
\textbf{Command} & \textbf{Description}\\ \hline
|
|
\code{set\_raw\_field} [X] [Y] [Z] & Returns: 0 or 1 for success.
|
|
Accepts decimal point formatted floats, with or without scientific notation. The float() cast must understand it.
|
|
The field units are Tesla.
|
|
This causes an additional field of the given strength to be generated, without regard for the pre-existing geomagnetic/external fields. \\ \hline
|
|
|
|
\code{set\_compensated\_field} [X] [Y] [Z] & Returns: 0 or 1 for success.
|
|
Accepts decimal point formatted floats, with or without scientific notation. The float() cast must understand it.
|
|
The field units are Tesla.
|
|
This causes a field of exactly the given magnitude to be generated by compensating external factors such as the
|
|
geomagnetic field. \\ \hline
|
|
|
|
\code{set\_coil\_currents} [X] [Y] [Z] & Returns: 0 or 1 for success.
|
|
Accepts decimal point formatted floats, with or without scientific notation. The float() cast must understand it.
|
|
The field units are Ampere.
|
|
This establishes the requested current in the individual coils. \\ \hline
|
|
|
|
\code{magnetometer\_field} [X] [Y] [Z] & Returns: 1.
|
|
Accepts decimal point formatted floats, with or without scientific notation. The float() cast must understand it.
|
|
The field units are Tesla.
|
|
Sets the state of a virtual magnetometer object which mirrors a physical sensor by means of
|
|
this command. \\ \hline
|
|
|
|
\code{get\_api\_version} & Returns: a string uniquely identifying each API version.
|
|
This function can be called before \code{declare\_api\_version}. \\ \hline
|
|
|
|
\code{declare\_api\_version} [version] & Returns: 0 or 1.
|
|
Declare the API version the client application was programmed for.
|
|
It must be compatible with the current API version. This prevents unexpected behavior by forcing programmers to specify which API they are expecting.
|
|
This function must be called before sending HW commands. \\ \hline
|
|
\label{tab:tcp_comamnds}
|
|
\end{longtable}
|
|
%\normalsize |