## Materials and Methods
### Model and Control System Design
\right]\mathrm{z}(\mathrm{t})+[\mathrm{0_{2\times 1 }}]\mathrm{u}(\mathrm{t})\stackrel{{\mathrm{def}}}{{=}}[\mathrm{C}] \mathrm{z}(\mathrm{t})+[\mathrm{D}]\mathrm{u}(\mathrm{t}) \tag{6}\]  
in which z(t) is the state of the system, u(t) the control input, T the selection vector, and [A], [B], [C], [D] the SS representation quadruplet. Since the laser sensor could be removed from the system in an eventual next prototype, the adopted control design uses only the first row of [C], using the laser sensor only for limit switch purposes. The initial state array is:  
\[\mathrm{z_{0}}\stackrel{{\mathrm{def}}}{{=}}\mathrm{z}(\mathrm{t} \;=\;0)\;=\;\left\{\dot{\mathrm{x}}_{a}(0),\dot{\mathrm{x}}(0),\dot{\mathrm{x }}_{b}(0),\mathrm{x}_{a}(0),\mathrm{x}(0),\mathrm{x}_{b}(0)\right\}^{t}\cong \{0,\mathrm{v}_{0},0,0,0,0\}^{t} \tag{7}\]  
in which v\({}_{0}\) is the approach speed. Such SS system is then reduced to its minimal realization through Mathworks Control System Toolbox(tm), thus yielding positive results in both controllability and observability tests, as both the controllability and the observability matrices are fully ranked. The modeled system's SS representation is then inputted in the MPC, which was adopted due to high constraint adaptiveness. In fact, the peak force of the selected motor (105 N) is too close to the highest force level to be expected (about 100 N) for choosing serendipitous, i.e., simpler and software-saturated, control strategies such as PID control. The MPC bases its computations on the following control subjects: prediction horizon, quadratic program (QP) optimization, and receding horizon (RH) technique. Said control algorithm was adopted due to constraint adaptiveness. Prediction horizon (Hp) is the number of steps ahead to be computed (and controlled) by the algorithm, forming the macro vector:  
\[\mathrm{U}(\mathrm{k}|\mathrm{k})\;=\;\left\{\mathrm{u}(\mathrm{k}|\mathrm{k })\;\mathrm{u}(\mathrm{k}+1\,|\mathrm{k})\ldots\mathrm{u}\big{(}\mathrm{k}+ \mathrm{H_{p}}-1\,|\mathrm{k}\big{)}\;\varepsilon_{\mathrm{k}}\right\} \tag{8}\]  
in which caption \"i \(|\)\" means that the prediction of the i-th time step is being calculated during the j-th time step and \(\varepsilon_{\mathrm{k}}\) is the slack variable for soft constraint violation;  
QP vector \(\mathrm{U}(\mathrm{k}|\mathrm{k})\) optimization is subject to plant system morphology (SS quadruplet) and constraints (in this case, the actuator's peak force), through the following cost function:  
\[\mathrm{J}(\mathrm{U}(\mathrm{k}|\mathrm{k}))\;=\;\mathrm{J}_{\mathrm{y}}( \mathrm{U}(\mathrm{k}|\mathrm{k}))+\mathrm{J}_{\mathrm{u}}(\mathrm{U}(\mathrm{ k}|\mathrm{k}))+\mathrm{J}_{\mathrm{au}}(\mathrm{U}(\mathrm{k}|\mathrm{k}))+ \mathrm{J}_{\mathrm{e}}(\mathrm{U}(\mathrm{k}|\mathrm{k}))\stackrel{{ \mathrm{def}}}{{=}}\sum_{\xi_{\mathrm{s}}\;=\;1}^{4}\mathrm{J}_{\xi_{ \mathrm{s}}}(\mathrm{U}(\mathrm{k}|\mathrm{k})) \tag{9}\]  
\[\mathrm{J}_{\xi_{\mathrm{s}}}(\mathrm{U}(\mathrm{k}|\mathrm{k}))\;=\;\sum_{i\;= \;0}^{H_{p}-1}\xi^{t}(\mathrm{k}+i\,|\mathrm{k})\Omega_{\xi}^{\mathrm{s}}( \mathrm{k}+i|\mathrm{k}) \tag{10}\]As Equation (10) shows, each cost function part is regulated by a tunable weight matrix \(\Omega\). The higher the weight, the more optimized the respective target \(\xi\) in the QP optimization. A description of every addendum of the cost function is shown in Table 3.  
RH technique extracts control input u(k \(\mid\)k) from the QP optimized macro vector U(k \(\mid\)k) and inputs it to the plant. Since the state of the system is not totally measured, the controller needs the implementation of a state observer. The implementation used a Kalman Filter observer, whose matrices L and M are set by default as optimal static gains for the plant model by the MathWorks Model Predictive Control Toolbox(tm) and Control System Toolbox(tm).