\chapter{Global project proposal}

%\epigraph{\emph{`` O �nico homem que nunca comete erros � aquele que nunca faz coisa alguma. N�o tenha medo de errar, pois aprender� a n�o cometer duas vezes o mesmo erro.''}}%
%         {Theodore Roosevelt}

The requirements for this project are:
limited cost;
easy to assemble, install and remove from the vehicle;
should require no vehicle modifications.

For this project several approaches were considered:

For the perception solutions based in encoders, potentiometers and inertial sensors like accelerometers and gyroscopes were analyzed. As both encoders and potentiometers require anchorage points in the moving part and in the vehicle structure, the options were discarded.

Inertial modules offer less resolution than the other methods but this can be compensated with redundancy; they  can also be fixed to the vehicle without modifications. With that in consideration, an inertial module was developed based in ST microelectronics MEMS accelerometers and gyroscopes; taking advantage of its small size, the outcome was significantly smaller than all market available similar devices. For this application there is a particular interest in measuring the position of the vehicle pedals, wheel, gear lever, parking brake and among others. In first stage, and also due to the number of sensors available, only the pedals will be measured. The geometry of this vehicle allows to secure the sensors in the back of the pedals inside the grip rubber cover. For the following stages this setup will be extended to the gear lever, hand brake and the wheel. To decouple the components motion from the vehicle's, one sensor must be fixed to the vehicle mainframe to serve as a reference and all other sensors are attached to the moving parts. data is then compared with the fixed reference sensor, so differential measurement can filter out undesired global dynamic data.

Concerning the actuation, several types were studied such as electric linear, electric rotational and pneumatic. For this application and given the space constraints, the only two option were the electric linear and pneumatic, as rotational types require structure modifications to attach to the vehicle. Given that pedals have spring elements responsible for their return to home position , force control is the simplest to implement, because the force applied by a spring is linearly related to its displacement and such control can be preformed by a regular PID controller which can act similarly to an human driver.

\section{Mathematical principles}
To obtain differential measures vector computing techniques are applied. Starting with a simplification in which equal acceleration modules are measured by the different measuring devices, the angle between them can be calculated by the equation \ref{eq:vec_angle}, where "$\cdot$" is the dot product of the two three dimentional normalized vectors $v_{1}$ and $v_{2}$ where $v_{1}\cdot v_{2}=\vert v_{1}\vert \vert v_{2}\vert$.

\begin{equation}
    \label{eq:vec_angle}
    angle=\arccos(v_{1}\cdot v_{2})
\end{equation}

After motion tests it became clear that such simplification was not valid and more complex dynamic laws have to be considered. However if the units share one parallel axis, there may be the possibility to keep some simplifications on the system, as the geometry of the system is known and a reference unit can be used to compute the differences in the acceleration applied to the others\cite{foxlin2000head}.
Knowing the vector that links 


%Trying to replicate the best vehicle controller known, the human being, as it does not controls position but force to the vehicle controls, and it would be very difficult to preform such control using electrical actuation, a pneumatic pressure controlled actuator system was developed. Given that pedals have spring elements responsible for it's return to home position. Electrical pneumatic pressure regulators, allow us to control the force applied to the pedal from the actuator, which acts in opposite direction from the pedal spring, and makes possible closed loop control using PID type controller.
