% Created 2024-03-19 Tue 17:22
% Intended LaTeX compiler: pdflatex
\documentclass[a4paper, 10pt, DIV=12, parskip=full, bibliography=totoc]{scrreprt}

\input{preamble.tex}
\bibliography{test-bench-apa.bib}
\author{Dehaeze Thomas}
\date{\today}
\title{Test Bench - Amplified Piezoelectric Actuator}
\hypersetup{
 pdfauthor={Dehaeze Thomas},
 pdftitle={Test Bench - Amplified Piezoelectric Actuator},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 29.2 (Org mode 9.7)}, 
 pdflang={English}}
\usepackage{biblatex}

\begin{document}

\maketitle
\tableofcontents

\clearpage
The first goal is to characterize the APA300ML in terms of:
\begin{itemize}
\item The, geometric features, electrical capacitance, stroke, hysteresis, spurious resonances.
This is performed in Section \ref{sec:first_measurements}.
\item The dynamics from the generated DAC voltage (going to the voltage amplifiers and then applied on the actuator stacks) to the induced displacement, and to the measured voltage by the force sensor stack.
Also the ``actuator constant'' and ``sensor constant'' are identified.
This is done in Section \ref{sec:dynamical_meas_apa}.
\item Compare the measurements with the Simscape models (2DoF, Super-Element) in order to tuned/validate the models.
This is explained in Section \ref{sec:simscape_bench_apa}.
\end{itemize}

\begin{table}[htbp]
\caption{\label{tab:test_bench_apa_section_matlab_code}Report sections and corresponding Matlab files}
\centering
\begin{tabularx}{0.6\linewidth}{lX}
\toprule
\textbf{Sections} & \textbf{Matlab File}\\
\midrule
Section \ref{sec:test_bench_apa}\_ & \texttt{test\_bench\_apa\_1\_.m}\\
\bottomrule
\end{tabularx}
\end{table}
\chapter{Model of the Amplified Piezoelectric Actuator}
\label{sec:model_apa}
The Amplified Piezoelectric Actuator (APA) used is the APA300ML from Cedrat technologies (Figure \ref{fig:apa300ML}).

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.8\linewidth]{figs/apa300ML.png}
\caption{\label{fig:apa300ML}Picture of the APA300ML}
\end{figure}

Two simscape models of the APA300ML are developed:
\begin{itemize}
\item Section \ref{sec:apa_2dof_model}: a simple 2 degrees of freedom (DoF) model
\item Section \ref{sec:apa_flexible_model}: a ``flexible'' model using a ``super-element'' extracted from a Finite Element Model of the APA
\end{itemize}

For both models, an ``actuator constant'' and a ``sensor constant'' are used.
These constants are used to link the electrical domain and the mechanical domain.
They are described in Section \ref{sec:apa_constants}.
\section{Two Degrees of Freedom Model}
\label{sec:apa_2dof_model}

The presented model is based on \cite{souleille18_concep_activ_mount_space_applic} and represented in Figure \ref{fig:souleille18_model_piezo}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.6\linewidth]{./figs/souleille18_model_piezo.png}
\caption{\label{fig:souleille18_model_piezo}Picture of an APA100M from Cedrat Technologies. Simplified model of a one DoF payload mounted on such isolator}
\end{figure}

The parameters are described in Table \ref{tab:souleille18_model_params}.

\begin{table}[htbp]
\caption{\label{tab:souleille18_model_params}Parameters used for the model of the APA 100M}
\centering
\begin{tabularx}{0.6\linewidth}{lX}
\toprule
 & \textbf{Meaning}\\
\midrule
\(k_e\) & Stiffness used to adjust the pole of the isolator\\
\(k_1\) & Stiffness of the metallic suspension when the stack is removed\\
\(k_a\) & Stiffness of the actuator\\
\(c_1\) & Added viscous damping\\
\bottomrule
\end{tabularx}
\end{table}

The model is shown again in Figure \ref{fig:2dof_apa_model}.
As will be shown in the next section, such model can be quite accurate in modelling the axial behavior of the APA.
However, it does not model the flexibility of the APA in the other directions.

Therefore this model can be useful for quick simulations as it contains a very limited number of states, but when more complex dynamics of the APA is to be modelled, a flexible model will be used.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.2\linewidth]{figs/2dof_apa_model.png}
\caption{\label{fig:2dof_apa_model}Schematic of the 2DoF model for the Amplified Piezoelectric Actuator}
\end{figure}
\section{Flexible Model}
\label{sec:apa_flexible_model}

In order to model with high accuracy the behavior of the APA, a flexible model can be used.

The idea is to do a Finite element model of the structure, and to defined ``remote points'' as shown in Figure \ref{fig:apa300ml_ansys}.
Then, on the finite element software, a ``super-element'' can be extracted which consists of a mass matrix, a stiffness matrix, and the coordinates of the remote points.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.3\linewidth]{figs/mesh_APA.png}
\caption{\label{fig:apa300ml_ansys}Remote points for the APA300ML (Ansys)}
\end{figure}

This ``super-element'' can then be included in the Simscape model as shown in Figure \ref{fig:figure_name}.
The remotes points are defined as ``frames'' in Simscape, and the ``super-element'' can be connected with other Simscape elements (mechanical joints, masses, force actuators, etc..).

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=\linewidth]{figs/super_element_simscape.png}
\caption{\label{fig:figure_name}From a finite Element Model (Ansys, bottom left) is extract the mass and stiffness matrices that are then used on Simscape (right)}
\end{figure}
\section{Actuator and Sensor constants}
\label{sec:apa_constants}

On Simscape, we want to model both the actuator stacks and the sensors stack.
We therefore need to link the electrical domain (voltages, charges) with the mechanical domain (forces, strain).
To do so, we use the ``actuator constant'' and the ``sensor constant''.

Consider a schematic of the Amplified Piezoelectric Actuator in Figure \ref{fig:apa_model_schematic}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.5\linewidth]{figs/apa_model_schematic.png}
\caption{\label{fig:apa_model_schematic}Amplified Piezoelectric Actuator Schematic}
\end{figure}

A voltage \(V_a\) applied to the actuator stacks will induce an actuator force \(F_a\):
\begin{equation}
  \boxed{F_a = g_a \cdot V_a}
\end{equation}

A change of length \(dl\) of the sensor stack will induce a voltage \(V_s\):
\begin{equation}
  \boxed{V_s = g_s \cdot dl}
\end{equation}

The block-diagram model of the piezoelectric actuator is then as shown in Figure \ref{fig:apa-model-simscape-schematic}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa-model-simscape-schematic.png}
\caption{\label{fig:apa-model-simscape-schematic}Model of the APA with Simscape/Simulink}
\end{figure}

The constants \(g_a\) and \(g_s\) will be experimentally estimated.
\chapter{First Basic Measurements}
\label{sec:first_measurements}
Before using the measurement bench to characterize the APA300ML, first simple measurements are performed:
\begin{itemize}
\item Section \ref{sec:geometrical_measurements}: the geometric tolerances of the interface planes are checked
\item Section \ref{sec:electrical_measurements}: the capacitance of the stacks are measured
\item Section \ref{sec:stroke_measurements}: the stroke of the APA are measured
\item Section \ref{sec:spurious_resonances}: the ``spurious'' resonances of the APA are investigated
\item Section \ref{sec:spurious_resonances_struts}: the ``spurious'' resonances of the struts are measured and compared with the FEM
\end{itemize}
\section{Geometrical Measurements}
\label{sec:geometrical_measurements}
The received APA are shown in Figure \ref{fig:received_apa}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.9\linewidth]{figs/received_apa.jpg}
\caption{\label{fig:received_apa}Received APA}
\end{figure}
\subsection{Measurement Setup}

The flatness corresponding to the two interface planes are measured as shown in Figure \ref{fig:flatness_meas_setup}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.8\linewidth]{figs/flatness_meas_setup.jpg}
\caption{\label{fig:flatness_meas_setup}Measurement Setup}
\end{figure}
\subsection{Measurement Results}

The height (Z) measurements at the 8 locations (4 points by plane) are defined below.
The X/Y Positions of the 8 measurement points are defined below.
Finally, the flatness is estimated by fitting a plane through the 8 points using the \texttt{fminsearch} command.
The obtained flatness are shown in Table \ref{tab:flatness_meas}.

\begin{table}[htbp]
\caption{\label{tab:flatness_meas}Estimated flatness}
\centering
\begin{tabularx}{0.25\linewidth}{lc}
\toprule
 & \textbf{Flatness} \([\mu m]\)\\
\midrule
APA 1 & 8.9\\
APA 2 & 3.1\\
APA 3 & 9.1\\
APA 4 & 3.0\\
APA 5 & 1.9\\
APA 6 & 7.1\\
APA 7 & 18.7\\
\bottomrule
\end{tabularx}
\end{table}

\begin{important}
The measured flatness of the APA300ML interface planes are within the specifications.
\end{important}
\section{Electrical Measurements}
\label{sec:electrical_measurements}
\subsection{Measurement Setup}
\begin{note}
The capacitance of the stacks is measure with the \href{https://www.gwinstek.com/en-global/products/detail/LCR-800}{LCR-800 Meter} (\href{doc/DS\_LCR-800\_Series\_V2\_E.pdf}{doc}) shown in Figure \ref{fig:LCR_meter}.
The excitation frequency is set to be 1kHz.
\end{note}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.9\linewidth]{figs/LCR_meter.jpg}
\caption{\label{fig:LCR_meter}LCR Meter used for the measurements}
\end{figure}
\subsection{Measured Capacitance}
From the documentation of the APA300ML, the total capacitance of the three stacks should be between \(18\mu F\) and \(26\mu F\) with a nominal capacitance of \(20\mu F\).
However, from the documentation of the stack themselves, it can be seen that the capacitance of a single stack should be \(4.4\mu F\).
Clearly, the total capacitance of the APA300ML if more than just three times the capacitance of one stack.

\begin{question}
Could it be possible that the capacitance of the stacks increase that much when they are pre-stressed?
\end{question}

The measured capacitance of the stacks are summarized in Table \ref{tab:apa300ml_capacitance}.

\begin{table}[htbp]
\caption{\label{tab:apa300ml_capacitance}Capacitance measured with the LCR meter. The excitation signal is a sinus at 1kHz}
\centering
\begin{tabularx}{0.5\linewidth}{lcc}
\toprule
 & \textbf{Sensor Stack} & \textbf{Actuator Stacks}\\
\midrule
APA 1 & 5.10 & 10.03\\
APA 2 & 4.99 & 9.85\\
APA 3 & 1.72 & 5.18\\
APA 4 & 4.94 & 9.82\\
APA 5 & 4.90 & 9.66\\
APA 6 & 4.99 & 9.91\\
APA 7 & 4.85 & 9.85\\
\bottomrule
\end{tabularx}
\end{table}

\begin{important}
From the measurements (Table \ref{tab:apa300ml_capacitance}), the capacitance of one stack is found to be \(\approx 5 \mu F\).
\end{important}

\begin{warning}
There is clearly a problem with APA300ML number 3
The APA number 3 has ben sent back to Cedrat, and a new APA300ML has been shipped back.
\end{warning}
\section{Stroke measurement}
\label{sec:stroke_measurements}
We here wish to estimate the stroke of the APA.

To do so, one side of the APA is fixed, and a displacement probe is located on the other side as shown in Figure \ref{fig:stroke_test_bench}.

Then, a voltage is applied on either one or two stacks using a DAC and a voltage amplifier.

\begin{note}
Here are the documentation of the equipment used for this test bench:
\begin{itemize}
\item \textbf{Voltage Amplifier}: \href{doc/PD200-V7-R1.pdf}{PD200} with a gain of 20
\item \textbf{16bits DAC}: \href{doc/IO131-OEM-Datasheet.pdf}{IO313 Speedgoat card}
\item \textbf{Displacement Probe}: \href{doc/Millimar--3723046--BA--C1208-C1216-C1240--FR--2016-11-08.pdf}{Millimar C1216 electronics} and \href{doc/tmp3m0cvmue\_7888038c-cdc8-48d8-a837-35de02760685.pdf}{Millimar 1318 probe}
\end{itemize}
\end{note}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.9\linewidth]{figs/stroke_test_bench.jpg}
\caption{\label{fig:stroke_test_bench}Bench to measured the APA stroke}
\end{figure}

From the documentation, the nominal stroke of the APA300ML is \(304\,\mu m\).
\subsection{Voltage applied on one stack}

Let's first look at the relation between the voltage applied to \textbf{one} stack to the displacement of the APA as measured by the displacement probe.

The applied voltage is shown in Figure \ref{fig:apa_stroke_voltage_time}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_stroke_voltage_time.png}
\caption{\label{fig:apa_stroke_voltage_time}Applied voltage as a function of time}
\end{figure}

The obtained displacements for all the APA are shown in Figure \ref{fig:apa_stroke_time_1s}.
The displacement is set to zero at initial time when the voltage applied is -20V.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_stroke_time_1s.png}
\caption{\label{fig:apa_stroke_time_1s}Displacement as a function of time for all the APA300ML (only one stack is used as an actuator)}
\end{figure}

Finally, the displacement is shown as a function of the applied voltage in Figure \ref{fig:apa_d_vs_V_1s}.
We can clearly see that there is a problem with the APA 3.
Also, there is a large hysteresis.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_d_vs_V_1s.png}
\caption{\label{fig:apa_d_vs_V_1s}Displacement as a function of the applied voltage (on only one stack)}
\end{figure}

\begin{important}
We can clearly confirm from Figure \ref{fig:apa_d_vs_V_1s} that there is a problem with the APA number 3.
\end{important}
\subsection{Voltage applied on two stacks}

Now look at the relation between the voltage applied to the \textbf{two} other stacks to the displacement of the APA as measured by the displacement probe.

The obtained displacement is shown in Figure \ref{fig:apa_stroke_time_2s}.
The displacement is set to zero at initial time when the voltage applied is -20V.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_stroke_time_2s.png}
\caption{\label{fig:apa_stroke_time_2s}Displacement as a function of time for all the APA300ML (two stacks are used as actuators)}
\end{figure}

Finally, the displacement is shown as a function of the applied voltage in Figure \ref{fig:apa_d_vs_V_2s}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_d_vs_V_2s.png}
\caption{\label{fig:apa_d_vs_V_2s}Displacement as a function of the applied voltage on two stacks}
\end{figure}
\subsection{Voltage applied on all three stacks}

Finally, we can combine the two measurements to estimate the relation between the displacement and the voltage applied to the \textbf{three} stacks (Figure \ref{fig:apa_d_vs_V_3s}).

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_d_vs_V_3s.png}
\caption{\label{fig:apa_d_vs_V_3s}Displacement as a function of the applied voltage on all three stacks}
\end{figure}

The obtained maximum stroke for all the APA are summarized in Table \ref{tab:apa_measured_stroke}.

\begin{table}[htbp]
\caption{\label{tab:apa_measured_stroke}Measured maximum stroke}
\centering
\begin{tabularx}{0.25\linewidth}{lc}
\toprule
 & \textbf{Stroke} \([\mu m]\)\\
\midrule
APA 1 & 373.2\\
APA 2 & 365.5\\
APA 3 & 181.7\\
APA 4 & 359.7\\
APA 5 & 361.5\\
APA 6 & 363.9\\
APA 7 & 358.4\\
\bottomrule
\end{tabularx}
\end{table}
\subsection{Conclusion}
\begin{important}
The except from APA 3 that has a problem, all the APA are similar when it comes to stroke and hysteresis.
Also, the obtained stroke is more than specified in the documentation.
Therefore, only two stacks can be used as an actuator.
\end{important}
\section{Spurious resonances - APA}
\label{sec:spurious_resonances}
\subsection{Introduction}

From a Finite Element Model of the struts, it have been found that three main resonances are foreseen to be problematic for the control of the APA300ML (Figure \ref{fig:apa_mode_shapes_ter}):
\begin{itemize}
\item Mode in X-bending at 189Hz
\item Mode in Y-bending at 285Hz
\item Mode in Z-torsion at 400Hz
\end{itemize}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=\linewidth]{figs/apa_mode_shapes.gif}
\caption{\label{fig:apa_mode_shapes_ter}Spurious resonances. a) X-bending mode at 189Hz. b) Y-bending mode at 285Hz. c) Z-torsion mode at 400Hz}
\end{figure}

These modes are present when flexible joints are fixed to the ends of the APA300ML.

In this section, we try to find the resonance frequency of these modes when one end of the APA is fixed and the other is free.

In the section \ref{sec:spurious_resonances_struts}, a similar measurement will be performed directly on the struts.
\subsection{Measurement Setup}

The measurement setup is shown in Figure \ref{fig:measurement_setup_torsion}.
A Laser vibrometer is measuring the difference of motion between two points.
The APA is excited with an instrumented hammer and the transfer function from the hammer to the measured rotation is computed.

\begin{note}
The instrumentation used are:
\begin{itemize}
\item Laser Doppler Vibrometer Polytec OFV512
\item Instrumented hammer
\end{itemize}
\end{note}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.7\linewidth]{figs/measurement_setup_torsion.jpg}
\caption{\label{fig:measurement_setup_torsion}Measurement setup with a Laser Doppler Vibrometer and one instrumental hammer}
\end{figure}
\subsection{X-Bending Mode}

The vibrometer is setup to measure the X-bending motion is shown in Figure \ref{fig:measurement_setup_X_bending}.
The APA is excited with an instrumented hammer having a solid metallic tip.
The impact point is on the back-side of the APA aligned with the top measurement point.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.7\linewidth]{figs/measurement_setup_X_bending.jpg}
\caption{\label{fig:measurement_setup_X_bending}X-Bending measurement setup}
\end{figure}

The data is loaded.
The configuration (Sampling time and windows) for \texttt{tfestimate} is done:
The transfer function from the input force to the output ``rotation'' (difference between the two measured distances).
The result is shown in Figure \ref{fig:apa300ml_meas_freq_bending_x}.

The can clearly observe a nice peak at 280Hz, and then peaks at the odd ``harmonics'' (third ``harmonic'' at 840Hz, and fifth ``harmonic'' at 1400Hz).
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa300ml_meas_freq_bending_x.png}
\caption{\label{fig:apa300ml_meas_freq_bending_x}Obtained FRF for the X-bending}
\end{figure}

Then the APA is in the ``free-free'' condition, this bending mode is foreseen to be at 200Hz (Figure \ref{fig:apa_mode_shapes_ter}).
We are here in the ``fixed-free'' condition.
If we consider that we therefore double the stiffness associated with this mode, we should obtain a resonance a factor \(\sqrt{2}\) higher than 200Hz which is indeed 280Hz.
Not sure this reasoning is correct though.
\subsection{Y-Bending Mode}

The setup to measure the Y-bending is shown in Figure \ref{fig:measurement_setup_Y_bending}.

The impact point of the instrumented hammer is located on the back surface of the top interface (on the back of the 2 measurements points).

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.7\linewidth]{figs/measurement_setup_Y_bending.jpg}
\caption{\label{fig:measurement_setup_Y_bending}Y-Bending measurement setup}
\end{figure}

The data is loaded, and the transfer function from the force to the measured rotation is computed.
The results are shown in Figure \ref{fig:apa300ml_meas_freq_bending_y}.
The main resonance is at 412Hz, and we also see the third ``harmonic'' at 1220Hz.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa300ml_meas_freq_bending_y.png}
\caption{\label{fig:apa300ml_meas_freq_bending_y}Obtained FRF for the Y-bending}
\end{figure}

We can apply the same reasoning as in the previous section and estimate the mode to be a factor \(\sqrt{2}\) higher than the mode estimated in the ``free-free'' condition.
We would obtain a mode at 403Hz which is very close to the one estimated here.
\subsection{Z-Torsion Mode}

Finally, we measure the Z-torsion resonance as shown in Figure \ref{fig:measurement_setup_torsion_bis}.

The excitation is shown on the other side of the APA, on the side to excite the torsion motion.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.7\linewidth]{figs/measurement_setup_torsion_bis.jpg}
\caption{\label{fig:measurement_setup_torsion_bis}Z-Torsion measurement setup}
\end{figure}

The data is loaded, and the transfer function computed.
The results are shown in Figure \ref{fig:apa300ml_meas_freq_torsion_z}.
We observe a first peak at 267Hz, which corresponds to the X-bending mode that was measured at 280Hz.
And then a second peak at 415Hz, which corresponds to the X-bending mode that was measured at 412Hz.
A third mode at 800Hz could correspond to this torsion mode.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa300ml_meas_freq_torsion_z.png}
\caption{\label{fig:apa300ml_meas_freq_torsion_z}Obtained FRF for the Z-torsion}
\end{figure}

In order to verify that, the APA is excited on the top part such that the torsion mode should not be excited.
The two FRF are compared in Figure \ref{fig:apa300ml_meas_freq_torsion_z_comp}.
It is clear that the first two modes does not correspond to the torsional mode.
Maybe the resonance at 800Hz, or even higher resonances. It is difficult to conclude here.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa300ml_meas_freq_torsion_z_comp.png}
\caption{\label{fig:apa300ml_meas_freq_torsion_z_comp}Obtained FRF for the Z-torsion}
\end{figure}
\subsection{Compare}
The three measurements are shown in Figure \ref{fig:apa300ml_meas_freq_compare}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa300ml_meas_freq_compare.png}
\caption{\label{fig:apa300ml_meas_freq_compare}Obtained FRF - Comparison}
\end{figure}
\subsection{Conclusion}

When two flexible joints are fixed at each ends of the APA, the APA is mostly in a free/free condition in terms of bending/torsion (the bending/torsional stiffness of the joints being very small).

In the current tests, the APA are in a fixed/free condition.
Therefore, it is quite obvious that we measured higher resonance frequencies than what is foreseen for the struts.
It is however quite interesting that there is a factor \(\approx \sqrt{2}\) between the two (increased of the stiffness by a factor 2?).

\begin{table}[htbp]
\caption{\label{tab:apa300ml_measured_modes_freq}Measured frequency of the modes}
\centering
\begin{tabularx}{0.6\linewidth}{Xcc}
\toprule
\textbf{Mode} & \textbf{FEM - Strut mode} & \textbf{Measured Frequency}\\
\midrule
X-Bending & 189Hz & 280Hz\\
Y-Bending & 285Hz & 410Hz\\
Z-Torsion & 400Hz & 800Hz?\\
\bottomrule
\end{tabularx}
\end{table}
\chapter{Dynamical measurements - APA}
\label{sec:dynamical_meas_apa}
In this section, a measurement test bench is used to extract all the important parameters of the Amplified Piezoelectric Actuator APA300ML.

This include:
\begin{itemize}
\item Stroke
\item Stiffness
\item Hysteresis
\item ``Actuator constant'': Gain from the applied voltage \(V_a\) to the generated Force \(F_a\)
\item ``Sensor constant'': Gain from the sensor stack strain \(\delta L\) to the generated voltage \(V_s\)
\item Dynamical behavior from the actuator to the force sensor and to the motion of the APA
\end{itemize}

The bench is shown in Figure \ref{fig:picture_apa_bench}, and a zoom picture on the APA and encoder is shown in Figure \ref{fig:picture_apa_bench_encoder}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.5\linewidth]{figs/picture_apa_bench.jpg}
\caption{\label{fig:picture_apa_bench}Picture of the test bench}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.5\linewidth]{figs/picture_apa_bench_encoder.jpg}
\caption{\label{fig:picture_apa_bench_encoder}Zoom on the APA with the encoder}
\end{figure}

The bench is schematically shown in Figure \ref{fig:test_bench_apa_alone} and the signal used are summarized in Table \ref{tab:test_bench_apa_variables}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.8\linewidth]{figs/test_bench_apa_alone.png}
\caption{\label{fig:test_bench_apa_alone}Schematic of the Test Bench}
\end{figure}

\begin{table}[htbp]
\caption{\label{tab:test_bench_apa_variables}Variables used during the measurements}
\centering
\begin{tabularx}{0.9\linewidth}{lllX}
\toprule
\textbf{Variable} & \textbf{Description} & \textbf{Unit} & \textbf{Hardware}\\
\midrule
\texttt{Va} & Output DAC voltage & {[}V] & DAC - Ch. 1 - PD200 - APA\\
\texttt{Vs} & Measured stack voltage (ADC) & {[}V] & APA - ADC - Ch. 1\\
\texttt{de} & Encoder Measurement & {[}m] & PEPU Ch. 1 - IO318(1) Ch. 1\\
\texttt{da} & Attocube Measurement & {[}m] & PEPU Ch. 2 - IO318(1) Ch. 2\\
\texttt{t} & Time & {[}s] & \\
\bottomrule
\end{tabularx}
\end{table}

This section is structured as follows:
\begin{itemize}
\item Section \ref{sec:meas_one_apa}: the measurements are first performed on one APA.
\item Section \ref{sec:meas_all_apa}: the same measurements are performed on all the APA and are compared.
\end{itemize}
\section{Measurements on APA 1}
\label{sec:meas_one_apa}
Measurements are first performed on only \textbf{one} APA.
Once the measurement procedure is validated, it is performed on all the other APA.
\subsection{Excitation Signals}
Different excitation signals are used to perform FRF estimations.

Typically, this is done in three steps:
\begin{enumerate}
\item A low pass filtered white noise is used with rather small amplitudes (Figure \ref{fig:exc_signal_1_noise}).
This first excitation is used to estimate the main resonance of the system.
\item A sweep-sine from 10Hz to 400Hz is used (Figure \ref{fig:exc_signal_2_sweep}).
The sweep-sine is is notched around the estimated resonance of the system.
\item A band-limited white noise from 300Hz to 2kHz is used to estimate the high frequency behavior (Figure \ref{fig:exc_signal_3_hf_noise}).
\end{enumerate}

For all the excitation signals, before the excitation starts, the mean voltage is slowly increased halfway between the minimum voltage (-20V) and the maximum (150V).

The first measurement is only used to have a first estimation of the dynamics and verify that everything is setup correctly.
The second excitation is done to estimate the dynamics from 10Hz to 350Hz and the third excitation from 350Hz to 2kHz.
The second and third measurements are therefore combined in the frequency domain to form one good estimation of the dynamics from 10Hz up to 2kHz.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/exc_signal_1_noise.png}
\caption{\label{fig:exc_signal_1_noise}Low pass filtered white noise. Time domain (left), Frequency domain (right)}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/exc_signal_2_sweep.png}
\caption{\label{fig:exc_signal_2_sweep}Sweep Sine with a decreased amplitude around the resonance of the APA}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/exc_signal_3_hf_noise.png}
\caption{\label{fig:exc_signal_3_hf_noise}Band-pass white noise. Time domain (left), Frequency domain (right)}
\end{figure}
\subsection{First Measurement}
For this first measurement for the first APA, a basic logarithmic sweep is used between 10Hz and 2kHz.

The data are loaded.
The initial time is set to zero.
The excitation signal is shown in Figure \ref{fig:apa_bench_exc_sweep}.
It is a sweep sine from 10Hz up to 2kHz filtered with a notch centered with the main resonance of the system and a low pass filter.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_bench_exc_sweep.png}
\caption{\label{fig:apa_bench_exc_sweep}Excitation voltage}
\end{figure}
\subsection{FRF - Setup}
Let's define the sampling time/frequency.
Then we defined a ``Hanning'' windows that will be used for the spectral analysis:
We get the frequency vector that will be the same for all the frequency domain analysis.
\subsection{FRF - Encoder and Interferometer}
In this section, the transfer function from the excitation voltage \(V_a\) to the encoder measured displacement \(d_e\) and interferometer measurement \(d_a\).

The coherence from \(V_a\) to \(d_e\) and from \(V_a\) to \(d_a\) are computed and shown in Figure \ref{fig:apa_1_coh_dvf}.
They are quite good from 10Hz up to 500Hz.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_1_coh_dvf.png}
\caption{\label{fig:apa_1_coh_dvf}Coherence for the identification from \(V_a\) to \(d_e\)}
\end{figure}

The transfer functions are then estimated and shown in Figure \ref{fig:apa_1_frf_dvf}.
It is shown than both the encoder and interferometers are measuring the same dynamics up to \(\approx 700\,Hz\).
Above that, it is possible that there is some flexible elements apart from the APA that is adding resonances into one or the other FRF.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_1_frf_dvf.png}
\caption{\label{fig:apa_1_frf_dvf}Obtained transfer functions from \(V_a\) to both \(d_e\) and \(d_a\)}
\end{figure}

\begin{important}
The transfer functions obtained in Figure \ref{fig:apa_1_frf_dvf} are very close to what was expected:
\begin{itemize}
\item constant gain at low frequency
\item resonance at around 100Hz which corresponds to the APA axial mode
\item no further resonance up until high frequency (\(\approx 700\,Hz\)) at which points several elements of the test bench can induces resonances in the measured FRF
\end{itemize}

However, it was not expected to observe a ``double resonance'' at around 95Hz (instead of only one resonance).
\end{important}
\subsection{FRF - Force Sensor}
Now the dynamics from excitation voltage \(V_a\) to the force sensor stack voltage \(V_s\) is identified.

The coherence is computed and shown in Figure \ref{fig:apa_1_coh_iff} and found very good from 10Hz up to 2kHz.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_1_coh_iff.png}
\caption{\label{fig:apa_1_coh_iff}Coherence for the identification from \(V_a\) to \(V_s\)}
\end{figure}

The transfer function is estimated and shown in Figure \ref{fig:apa_1_frf_iff}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_1_frf_iff.png}
\caption{\label{fig:apa_1_frf_iff}Obtained transfer functions from \(V_a\) to \(V_s\)}
\end{figure}

\begin{important}
The obtained dynamics from the excitation voltage \(V_a\) to the measured sensor stack voltage \(V_s\) is corresponding to what was expected:
\begin{itemize}
\item constant gain at low frequency
\item complex conjugate zero and then complex conjugate pole
\item constant gain at high frequency
\end{itemize}
\end{important}
\subsection{Hysteresis}
We here wish to visually see the amount of hysteresis present in the APA.

To do so, a quasi static sinusoidal excitation \(V_a\) at different voltages is used.

The offset is 65V (halfway between -20V and 150V), and the sin amplitude is ranging from 1V up to 80V (full range).

For each excitation amplitude, the vertical displacement \(d\) of the mass is measured.

Then, \(d\) is plotted as a function of \(V_a\) for all the amplitudes.

We expect to obtained something like the hysteresis shown in Figure \ref{fig:expected_hysteresis}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.8\linewidth]{figs/expected_hysteresis.png}
\caption{\label{fig:expected_hysteresis}Expected Hysteresis \cite{poel10_explor_activ_hard_mount_vibrat}}
\end{figure}

The data is loaded.
The excitation voltage amplitudes are:
The excitation voltage and the measured displacement are shown in Figure \ref{fig:hyst_exc_signal_time}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/hyst_exc_signal_time.png}
\caption{\label{fig:hyst_exc_signal_time}Excitation voltage and measured displacement}
\end{figure}

For each amplitude, we only take the last sinus in order to reduce possible transients.
Also, the motion is centered on zero.

The measured displacement at a function of the output voltage are shown in Figure \ref{fig:hyst_results_multi_ampl}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/hyst_results_multi_ampl.png}
\caption{\label{fig:hyst_results_multi_ampl}Obtained hysteresis for multiple excitation amplitudes}
\end{figure}

\begin{important}
From Figure \ref{fig:hyst_results_multi_ampl}, it is quite clear that hysteresis is increasing with the excitation amplitude.
For small excitation amplitudes (\(V_a < 0.4\,V\)) the hysteresis stays reasonably small.

Also, it is quite interesting to see that no hysteresis is found on the sensor stack voltage when using the same excitation signal.
\end{important}
\subsection{Estimation of the APA axial stiffness}
In order to estimate the stiffness of the APA, a weight with known mass \(m_a\) is added on top of the suspended granite and the deflection \(d_e\) is measured using the encoder.

The APA stiffness can then be estimated to be:
\begin{equation}
  k_{\text{apa}} = \frac{m_a g}{d}
\end{equation}

The data is loaded, and the measured displacement is shown in Figure \ref{fig:apa_1_meas_stiffness}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_1_meas_stiffness.png}
\caption{\label{fig:apa_1_meas_stiffness}Measured displacement when adding the mass and removing the mass}
\end{figure}

From Figure \ref{fig:apa_1_meas_stiffness}, it can be seen that there are some drifts that are probably due to some creep.
This will induce some uncertainties in the measured stiffness.

Here, a mass of 6.4 kg was used:
The stiffness is then computed as follows:
And the stiffness obtained is very close to the one specified in the documentation (\(k = 1.794\,[N/\mu m]\)).
\begin{verbatim}
k = 1.68 [N/um]
\end{verbatim}


The stiffness could also be estimated based on the main vertical resonance of the system at \(\omega_z = 2\pi \cdot 94 \,[rad/s]\).
The suspended mass is \(m_{\text{sus}} = 5\,kg\).
And therefore, the axial stiffness of the APA can be estimated to be:
\begin{equation}
k_{\text{APA}} = m_{\text{sus}} \omega_z^2
\end{equation}

\begin{verbatim}
k = 1.99 [N/um]
\end{verbatim}


The two values are found relatively close to each other.
Anyway, the stiffness of the model will be tuned to match the measured FRF.
\subsection{Stiffness change due to electrical connections}
Changes in the electrical impedance connected to the piezoelectric actuator causes changes in the mechanical compliance (or stiffness) of the piezoelectric actuator.

In this section is measured the stiffness of the APA whether the piezoelectric actuator is connected to an open circuit or a short circuit (e.g. the output of a voltage amplifier).

Note here that the resistor in parallel to the sensor stack is present in both cases.

First, the data are loaded.
And the initial displacement is set to zero.
The measured displacements are shown in Figure \ref{fig:apa_meas_k_time_oc_cc}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_meas_k_time_oc_cc.png}
\caption{\label{fig:apa_meas_k_time_oc_cc}Measured displacement}
\end{figure}

And the stiffness is estimated in both case.
The results are shown in Table \ref{tab:APA_measured_k_oc_cc}.
\begin{table}[htbp]
\caption{\label{tab:APA_measured_k_oc_cc}Measured stiffnesses on ``open'' and ``closed'' circuits}
\centering
\begin{tabularx}{0.3\linewidth}{cc}
\toprule
 & \(k [N/\mu m]\)\\
\midrule
Not connected & 2.3\\
Connected & 1.7\\
\bottomrule
\end{tabularx}
\end{table}

\begin{important}
Clearly, connecting the actuator stacks to the amplified (basically equivalent as to short circuiting them) lowers its stiffness.
\end{important}
\subsection{Effect of the resistor on the IFF Plant}
A resistor \(R \approx 80.6\,k\Omega\) is added in parallel with the sensor stack.
This has the effect to form a high pass filter with the capacitance of the stack.

This is done for two reasons (explained in details \href{../test-bench-force-sensor/test-bench-force-sensor.org}{this document}):
\begin{enumerate}
\item Limit the voltage offset due to the input bias current of the ADC
\item Limit the low frequency gain
\end{enumerate}

The (low frequency) transfer function from \(V_a\) to \(V_s\) with and without this resistor have been measured.

We use a very long ``Hanning'' window for the spectral analysis in order to estimate the low frequency behavior.
And we estimate the transfer function from \(V_a\) to \(V_s\) in both cases:
With the following values of the resistor and capacitance, we obtain a first order high pass filter with a crossover frequency equal to:
\begin{verbatim}
f0 = 0.39 [Hz]
\end{verbatim}


The transfer function of the corresponding high pass filter is:
Let's compare the transfer function from actuator stack to sensor stack with and without the added resistor in Figure \ref{fig:frf_iff_effect_R}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/frf_iff_effect_R.png}
\caption{\label{fig:frf_iff_effect_R}Transfer function from \(V_a\) to \(V_s\) with and without the resistor \(k\)}
\end{figure}

\begin{important}
The added resistor has indeed the expected effect of forming an high pass filter.
\end{important}
\section{Comparison of all the APA}
\label{sec:meas_all_apa}
The same measurements that was performed in Section \ref{sec:meas_one_apa} are now performed on all the APA and then compared.
\subsection{Axial Stiffnesses - Comparison}
Let's first compare the APA axial stiffnesses.

The added mass is:
Here are the numbers of the APA that have been measured:
The data are loaded.
The raw measurements are shown in Figure \ref{fig:apa_meas_k_time}.
All the APA seems to have similar stiffness except the APA 7 which show strange behavior.

\begin{warning}
It is however strange that the displacement \(d_e\) when the mass is removed is higher for the APA 7 than for the other APA.

It turns out the PD200 amplifier was connected to only one stack, the other stack was open circuited. Therefore, the total axial stiffness of the APA was increased.
\end{warning}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_meas_k_time.png}
\caption{\label{fig:apa_meas_k_time}Raw measurements for all the APA. A mass of 6.4kg is added at arround 15s and removed at arround 22s}
\end{figure}

The stiffnesses are computed for all the APA and are summarized in Table \ref{tab:APA_measured_k}.

\begin{table}[htbp]
\caption{\label{tab:APA_measured_k}Measured stiffnesses}
\centering
\begin{tabularx}{0.3\linewidth}{cc}
\toprule
APA Num & \(k [N/\mu m]\)\\
\midrule
1 & 1.68\\
2 & 1.69\\
4 & 1.7\\
5 & 1.7\\
6 & 1.7\\
7 & 1.93\\
8 & 1.73\\
\bottomrule
\end{tabularx}
\end{table}

\begin{important}
The APA300ML manual specifies the nominal stiffness to be \(1.8\,[N/\mu m]\) which is very close to what have been measured.
Only the APA number 7 is a little bit higher, due to the fact that one of the stack was open-circuited instead of short circuited.
\end{important}
\subsection{FRF - Setup}
As the APA7 was not correctly wired, it is ignored:
The identification is performed in three steps:
\begin{enumerate}
\item White noise excitation with small amplitude.
This is used to determine the main resonance of the system.
\item Sweep sine excitation with the amplitude lowered around the resonance.
The sweep sine is from 10Hz to 400Hz.
\item High frequency noise.
The noise is band-passed between 300Hz and 2kHz.
\end{enumerate}

Then, the result of the second identification is used between 10Hz and 350Hz and the result of the third identification if used between 350Hz and 2kHz.

The data are loaded for both the second and third identification:
The time is the same for all measurements.
Then we defined a ``Hanning'' windows that will be used for the spectral analysis:
We get the frequency vector that will be the same for all the frequency domain analysis.
\subsection{FRF - Encoder and Interferometer}
In this section, the dynamics from excitation voltage \(V_a\) to encoder measured displacement \(d_e\) is identified.

We compute the coherence for 2nd and 3rd identification:
The coherence is shown in Figure \ref{fig:apa_frf_dvf_plant_coh}, and it is found that the coherence is good from low frequency up to 700Hz.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_frf_dvf_plant_coh.png}
\caption{\label{fig:apa_frf_dvf_plant_coh}Obtained coherence for the plant from \(V_a\) to \(d_e\)}
\end{figure}


Then, the transfer function from the DAC output voltage \(V_a\) to the measured displacement by the encoders is computed:
The obtained transfer functions are shown in Figure \ref{fig:apa_frf_dvf_plant_tf}.
They are all superimposed.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_frf_dvf_plant_tf.png}
\caption{\label{fig:apa_frf_dvf_plant_tf}Estimated FRF for the DVF plant (transfer function from \(V_a\) to the encoder \(d_e\))}
\end{figure}

A zoom on the main resonance is shown in Figure \ref{fig:apa_frf_dvf_zoom_res_plant_tf}.
It is clear that the responses around the resonances are well matching for all the APA.

It is also clear that there is not a single resonance but two resonances, a first one at 95Hz and a second one at 105Hz.

\begin{question}
Why is there a double resonance at around 94Hz?
\end{question}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_frf_dvf_zoom_res_plant_tf.png}
\caption{\label{fig:apa_frf_dvf_zoom_res_plant_tf}Estimated FRF for the DVF plant (transfer function from \(V_a\) to the encoder \(d_e\)) - Zoom on the main resonance}
\end{figure}
\subsection{FRF - Force Sensor}
In this section, the dynamics from \(V_a\) to \(V_s\) is identified.

First the coherence is computed and shown in Figure \ref{fig:apa_frf_iff_plant_coh}.
The coherence is very nice from 10Hz to 2kHz.
It is only dropping near a zeros at 40Hz, and near the resonance at 95Hz (the excitation amplitude being lowered).

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_frf_iff_plant_coh.png}
\caption{\label{fig:apa_frf_iff_plant_coh}Obtained coherence for the IFF plant}
\end{figure}

Then the FRF are estimated and shown in Figure \ref{fig:apa_frf_iff_plant_tf}
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_frf_iff_plant_tf.png}
\caption{\label{fig:apa_frf_iff_plant_tf}Identified IFF Plant}
\end{figure}
\subsection{Conclusion}

\begin{important}
So far, all the measured FRF are showing the dynamical behavior that was expected.
\end{important}
\chapter{Test Bench APA300ML - Simscape Model}
\label{sec:simscape_bench_apa}
In this section, a simscape model (Figure \ref{fig:model_bench_apa}) of the measurement bench is used to compare the model of the APA with the measured FRF.

After the transfer functions are extracted from the model (Section \ref{sec:simscape_bench_apa_first_id}), the comparison of the obtained dynamics with the measured FRF will permit to:
\begin{enumerate}
\item Estimate the ``actuator constant'' and ``sensor constant'' (Section \ref{sec:simscape_bench_apa_id_constants})
\item Tune the model of the APA to match the measured dynamics (Section \ref{sec:simscape_bench_apa_tune_2dof_model})
\end{enumerate}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,width=0.5\linewidth]{figs/model_bench_apa.png}
\caption{\label{fig:model_bench_apa}Screenshot of the Simscape model}
\end{figure}
\section{First Identification}
\label{sec:simscape_bench_apa_first_id}

The APA is first initialized with default parameters:
The transfer function from excitation voltage \(V_a\) (before the amplification of \(20\) due to the PD200 amplifier) to:
\begin{enumerate}
\item the sensor stack voltage \(V_s\)
\item the measured displacement by the encoder \(d_e\)
\item the measured displacement by the interferometer \(d_a\)
\end{enumerate}
The obtain dynamics are shown in Figure \ref{fig:apa_model_bench_bode_vs} and \ref{fig:apa_model_bench_bode_dl_z}.
It can be seen that:
\begin{itemize}
\item the shape of these bode plots are very similar to the one measured in Section \ref{sec:dynamical_meas_apa} expect from a change in gain and exact location of poles and zeros
\item there is a sign error for the transfer function from \(V_a\) to \(V_s\).
This will be corrected by taking a negative ``sensor gain''.
\item the low frequency zero of the transfer function from \(V_a\) to \(V_s\) is minimum phase as expected.
The measured FRF are showing non-minimum phase zero, but it is most likely due to measurements artifacts.
\end{itemize}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_model_bench_bode_vs.png}
\caption{\label{fig:apa_model_bench_bode_vs}Bode plot of the transfer function from \(V_a\) to \(V_s\)}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_model_bench_bode_dl_z.png}
\caption{\label{fig:apa_model_bench_bode_dl_z}Bode plot of the transfer function from \(V_a\) to \(d_L\) and to \(z\)}
\end{figure}
\section{Identify Sensor/Actuator constants and compare with measured FRF}
\label{sec:simscape_bench_apa_id_constants}
\subsection{How to identify these constants?}
\paragraph{Piezoelectric Actuator Constant}

Using the measurement test-bench, it is rather easy the determine the static gain between the applied voltage \(V_a\) to the induced displacement \(d\).
\begin{equation}
  d = g_{d/V_a} \cdot V_a
\end{equation}

Using the Simscape model of the APA, it is possible to determine the static gain between the actuator force \(F_a\) to the induced displacement \(d\):
\begin{equation}
  d = g_{d/F_a} \cdot F_a
\end{equation}

From the two gains, it is then easy to determine \(g_a\):
\begin{equation} \label{eq:actuator_constant_formula}
  \boxed{g_a = \frac{F_a}{V_a} = \frac{F_a}{d} \cdot \frac{d}{V_a} = \frac{g_{d/V_a}}{g_{d/F_a}}}
\end{equation}
\paragraph{Piezoelectric Sensor Constant}

Similarly, it is easy to determine the gain from the excitation voltage \(V_a\) to the voltage generated by the sensor stack \(V_s\):
\begin{equation}
  V_s = g_{V_s/V_a} V_a
\end{equation}

Note here that there is an high pass filter formed by the piezoelectric capacitor and parallel resistor.

The gain can be computed from the dynamical identification and taking the gain at the wanted frequency (above the first resonance).

Using the simscape model, compute the gain at the same frequency from the actuator force \(F_a\) to the strain of the sensor stack \(dl\):
\begin{equation}
  dl = g_{dl/F_a} F_a
\end{equation}

Then, the ``sensor'' constant is:
\begin{equation} \label{eq:sensor_constant_formula}
  \boxed{g_s = \frac{V_s}{dl} = \frac{V_s}{V_a} \cdot \frac{V_a}{F_a} \cdot \frac{F_a}{dl} = \frac{g_{V_s/V_a}}{g_a \cdot g_{dl/F_a}}}
\end{equation}
\subsection{Identification Data}
Let's load the measured FRF from the DAC voltage to the measured encoder and to the sensor stack voltage.
\subsection{2DoF APA}
\paragraph{2DoF APA}
Let's initialize the APA as a 2DoF model with unity sensor and actuator gains.
\paragraph{Identification without actuator or sensor constants}
The transfer function from \(V_a\) to \(V_s\), \(d_e\) and \(d_a\) is identified.
\paragraph{Actuator Constant}
Then, the actuator constant can be computed as shown in Eq. \eqref{eq:actuator_constant_formula} by dividing the measured DC gain of the transfer function from \(V_a\) to \(d_e\) by the estimated DC gain of the transfer function from \(V_a\) (in truth the actuator force called \(F_a\)) to \(d_e\) using the Simscape model.
\begin{verbatim}
ga = -32.2 [N/V]
\end{verbatim}
\paragraph{Sensor Constant}
Similarly, the sensor constant can be estimated using Eq. \eqref{eq:sensor_constant_formula}.

\begin{verbatim}
gs = 0.088 [V/m]
\end{verbatim}
\paragraph{Comparison}
Let's now initialize the APA with identified sensor and actuator constant:
And identify the dynamics with included constants.
The transfer functions from \(V_a\) to \(d_e\) are compared in Figure \ref{fig:apa_act_constant_comp} and the one from \(V_a\) to \(V_s\) are compared in Figure \ref{fig:apa_sens_constant_comp}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_act_constant_comp.png}
\caption{\label{fig:apa_act_constant_comp}Comparison of the experimental data and Simscape model (\(V_a\) to \(d_e\))}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_sens_constant_comp.png}
\caption{\label{fig:apa_sens_constant_comp}Comparison of the experimental data and Simscape model (\(V_a\) to \(V_s\))}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_comp_model_frf.png}
\label{fig:apa_comp_model_frf}
\end{figure}


\begin{important}
The ``actuator constant'' and ``sensor constant'' can indeed be identified using this test bench.
After identifying these constants, the 2DoF model shows good agreement with the measured dynamics.
\end{important}
\subsection{Flexible APA}
In this section, the sensor and actuator ``constants'' are also estimated for the flexible model of the APA.
\paragraph{Flexible APA}
The Simscape APA model is initialized as a flexible one with unity ``constants''.
\paragraph{Identification without actuator or sensor constants}
The dynamics from \(V_a\) to \(V_s\), \(d_e\) and \(d_a\) is identified.
\paragraph{Actuator Constant}
Then, the actuator constant can be computed as shown in Eq. \eqref{eq:actuator_constant_formula}:
\begin{verbatim}
ga = 23.5 [N/V]
\end{verbatim}
\paragraph{Sensor Constant}
\begin{verbatim}
gs = -4839841.756 [V/m]
\end{verbatim}
\paragraph{Comparison}
Let's now initialize the flexible APA with identified sensor and actuator constant:
And identify the dynamics with included constants.
The obtained dynamics is compared with the measured one in Figures \ref{fig:apa_act_constant_comp_flex} and \ref{fig:apa_sens_constant_comp_flex}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_act_constant_comp_flex.png}
\caption{\label{fig:apa_act_constant_comp_flex}Comparison of the experimental data and Simscape model (\(u\) to \(d\mathcal{L}_m\))}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/apa_sens_constant_comp_flex.png}
\caption{\label{fig:apa_sens_constant_comp_flex}Comparison of the experimental data and Simscape model (\(u\) to \(\tau_m\))}
\end{figure}

\begin{important}
The flexible model is a bit ``soft'' as compared with the experimental results.
\end{important}
\section{Optimize 2-DoF model to fit the experimental Data}
\label{sec:simscape_bench_apa_tune_2dof_model}
The parameters of the 2DoF model presented in Section \ref{sec:apa_2dof_model} are now optimize such that the model best matches the measured FRF.

After optimization, the following parameters are used:
The dynamics is identified using the Simscape model and compared with the measured FRF in Figure \ref{fig:comp_apa_plant_after_opt}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/comp_apa_plant_after_opt.png}
\caption{\label{fig:comp_apa_plant_after_opt}Comparison of the measured FRF and the optimized model}
\end{figure}

\begin{important}
The tuned 2DoF is very well representing the (axial) dynamics of the APA.
\end{important}
\chapter{Conclusion}
\label{sec:test_bench_apa_conclusion}
\printbibliography[heading=bibintoc,title={Bibliography}]
\end{document}
