*5.2. Results*

After the setup of the MB model of the slider-crank mechanism, it is embedded into the ADE-KF estimation framework presented in Section 4.

The input torque delivered by the motor is assumed unknown, and jointly estimated with the model states as introduced in Section 4.4. It is assumed that all model uncertainties is dominated by the augmented state, representing the unknown input, while the model is considered perfect.

The a posteriori Kalman filter step is computed using the augmented measurements discussed in Section 4.2. These combine the angular motor velocity ˙ *θ* together with the model constraint equations *φ*. The angular motor velocity is directly available on many mechatronic drives since they are equipped with relatively accurate encoders for control or monitoring purposes.

For the validation of our estimation framework, summarized in Figure 5, we compare the estimates (virtual sensors) of the motor position *θ*, motor velocity ˙ *θ*, slider acceleration *Y*¨ and motor torque *T* with measurements directly obtained from the experimental setup. Besides the motor encoder, an accelerometer on the slider is employed and motor torques can be directly extracted from the drive unit.

**Figure 5.** Diagram of the coupled state-input estimation scheme and signal comparisons. *θ* and ˙ *θ* are the motor angle and angular motor velocity respectively; *Y*¨ is the translational slider acceleration; *T* is the motor torque.

The performed experiments span 9.4 s and are executed for three levels of desired angular motor velocity, which are provided to the motor controller as desired set points: 40, 50 and 60 rad/sec. Note that, due to the non-ideal behavior of the system and the limitations of the PID controller, the desired set point results in practice in a varying angular velocity.

The measured and the estimated motor angle *θ*, rotational velocity ˙ *θ*, and the slider translational acceleration *Y*¨ are compared in Figure 6.

Three subsets of this full timespan are shown in Figure 7 to better appreciate the transient effects during the start-up and the two velocity transitions.

It is clear from Figures 6 and 7 that the ADE-KF with the MB model tracks these various (derivative) states very well, underlining the well represented system kinematics.

In Figure 8 the estimated motor torque is compared to the measured motor torque. This comparison shows a good prediction over the full time series (on the left) and on the angular velocity transitions (zoom-in figures on the right) thanks to the proposed methodology.

**Figure 6.** Comparison of the measured and estimated motor angle *θ* (**top**), motor angular velocity ˙ *θ* (**middle**) and translational slider acceleration *Y*¨ (**bottom**) for the full time series.

**Figure 7.** Comparison of the measured and estimated motor angle *θ* (**top row**), motor angular velocity ˙ *θ* (**middle row**) and translational slider acceleration *Y*¨ (**bottom row**). Zoom-in per column on the velocity transitions.

**Figure 8.** Comparison of the measured and estimated motor torque; on the left, full time series; on the right, the zoom-in on the velocity transitions are shown.

In Table 3 the root mean square error of the estimated virtual sensors and input torque are reported, underlying the relatively high accuracy of the estimated quantities. It is defined as *ErrorRMS* = "∑*<sup>k</sup>* [*χm*(*k*)−*χe*(*k*)]<sup>2</sup> *nk* , where *χ<sup>m</sup>* and *χ<sup>e</sup>* are the measured and estimated variables respectively, while *nk* is the total number of data samples.

**Table 3.** Accuracy of the estimated quantities in terms of root mean square error.


The choice of performing the experiments for a relatively long timespan was made to demonstrate the filter stability in terms of both mean value and covariance prediction. For these kind of applications, where the uncertainty is dominated by difficult to model load effects (friction, etc.), the choice of focussing the model covariance on the input load allows effectively propagating the uncertainties. The dashed blue curves in Figure 8 represent the estimated expected variation of the augmented average state estimate within the 70% of confidence. It is expressed in terms of the standard deviations *σ<sup>d</sup>* = " P+ *<sup>d</sup>* computed for each *<sup>k</sup>th* filter step where <sup>P</sup><sup>+</sup> *<sup>d</sup>* is the diagonal term of the a posteriori estimated covariance associated with the augmented state (disturbance). It is important to notice that the experimental motor torque (in red) remains bounded by the estimated input uncertainty therefore being an accurate estimation of the real covariance.

These results for the estimated torques show a significantly larger error than those obtained for the (derivative) states. For multibody problems in general, the state-estimates can be expected to be dominated by the kinematics of the system, which are generally well known. For the load estimates however, the dynamics of the system will play a crucial role. Besides key dynamic quantities such as the system inertia which can be modelled very accurately, other effects such as friction forces also influence this outcome. In this work we employed the friction model from Equation (56), but any error on this model is also propagated to the torque estimates. Due to the complex nature of the interface conditions for the slider and the rail (and the other bearings in the system), some errors are to be expected here. Key for future research will therefore be to examine how these complex load phenomena can be accounted for as effectively as possible. Moreover, by only employing one physical measurement ( ˙ *θ*) in the ADE-KF scheme, it is guarantied that the accuracy of the estimated input torque would be less accurate for a poorly identified model. This can be observed in [15] where the same validation case was considered. Here, Angeli et al. proposed a deep learning methodology to reduce the initial MB equations from redundant to minimal coordinates where the resulting equations are then employed in an augmented extended Kalman filter scheme. Alternatively to what is presented in the current contribution, the supposed unknown motor torque is estimated employing the slider acceleration (*Y*¨) and no slider-track friction model was considered which has led to slightly less accurate input and virtual sensors estimation as compared to the currently proposed approach and model.

An important aspect in estimation problems is the choice of the Kalman filter parameters such as the process and measurement noise covarince matrices, *Q*˜ *<sup>k</sup>* and *R*˜ *<sup>k</sup>*. It is recurrent while dealing with KF-based estimators that the accuracy of the estimated quantities is highly influenced by the selection of those parameters. However, general rules are not available since the filter parameters and influence strongly depend on the application case. Therefore, it is common to resort to a tuning step as the process of investigating and selecting these parameters. In the context of this work, the adopted strategy is described in the following section.

#### *5.3. Kalman Filter Tuning*

To attain the best accuracy from the presented estimation scheme, the model and measurement covariances need to be judiciously selected. In this work we have started with the selection of the measurement covariance matrix *R*˜ *<sup>k</sup>* associated with the augmented measurement equations *y*˜. In lack of other information, We assume this measurement covariance constant over time. The covariance results from the combination of two main measurement contributions: the (motor) angular velocity ˙ *θ* and the augmented constraint measurements *φ*, which reads as

$$
\bar{R}\_k = \begin{bmatrix} R\_\theta & \mathbf{0}\_\lambda^T \\ \mathbf{0}\_\lambda & R\_\Phi \end{bmatrix}' \tag{57}
$$

where *R*˙ *<sup>θ</sup>* is generally tuned based on reference noise measurements while for this application, since no noise reference was available, the author has chosen a value which is representative of the encoder measurement noise: *R*˙ *<sup>θ</sup>* = 10−<sup>2</sup> (rad2/s2). Moreover, the authors have experienced that the influence of the measurement noise parameter *R*˙ *<sup>θ</sup>* is relative to the value of the process noise covariance *Q*˜ *<sup>k</sup>*.

*R<sup>φ</sup>* instead is linked to the mathematical and physical meaning of the constraint equations. In MB applications, we can distinguish two types of constraint equations: the ones that come from the inherent coordinates formulations, i.e., *φ<sup>c</sup>* (e.g., Euler parameters should be unit vector and rotation matrix should be orthogonal), and the ones that come from joints definition, i.e., *φj*, as for instance the spherical and/or revolute joints. In this work, for the latter a small noise term is allowed (i.e., all diagonal terms of *Rφ<sup>j</sup>* are set to 10−<sup>9</sup> while the off-diagonal terms are set to zero) representing the joint imperfections typical of real systems, whereas for the former, they are treated as perfect measurements (i.e., *Rφ<sup>c</sup>* = 0), otherwise the kinematics and the mathematical principles that are used to describe the MB system are no longer valid.

Similarly to the augmented measurement covariance *R*˜ *<sup>k</sup>*, the augmented process noise matrix *Q*˜ *<sup>k</sup>* is assumed constant for all filter steps and it can be written as combination of the system and augmented states contributions as

$$
\tilde{Q}\_k = \begin{bmatrix} Q\_x & 0 \\ 0 & Q\_d \end{bmatrix}. \tag{58}
$$

As we assume the model to be practically perfect compared to the high uncertainty on the unknown inputs, the process noise matrix *Qx* associated with the system states is set to zero.

The remaining parameter *Qd* associated with the unknown input torque (disturbance) is obtained in a brute-force optimization fashion. Since in this case there is only a single value to be chosen, an exhaustive search is therefore not computationally prohibitive. In this regard a grid of *Qd* values have been selected, going from 10−<sup>5</sup> to 10<sup>5</sup> sampled exponentially in eleven increments, leading to a corresponding eleven performed estimations. The choice of the *Qd* is based on the L-curve method proposed by [28] where its nearly optimal value (Not optimal in absolute sense due to discrete evaluation points *Qd* and the user defined *R*˙ *<sup>θ</sup>*) is such that the best trade-off is achieved between the *Error norm* and *Smoothing error*. These norms are defined as

$$Error\,norm = \sum\_{k=1}^{n\_k} ||y\_k^\* - \bar{y}\_k^-||\_2 \tag{59}$$

and,

$$Smoothing\,norm = \frac{\sum\_{k=1}^{n\_k} ||d(k)||\_2}{\sum\_{k=1}^{n\_k} ||T(k)||\_2} \tag{60}$$

where *d*(*k*) and *T*(*k*) are the estimated (disturbance) and measured torque respectively, while *nk* is the total number of sampling point *k*. On the left side of Figure 9 the L-curve for the evaluated *Qd* grid points is shown where the blue marked point is the chosen value corresponding to *Qd* = 100. This value have been used for the results shown in Figures 6–8. As expected, it is observed that the error norm decreases with an increasing smoothing error which corresponds to an increasing *Qd* till a saturation is reached. This occurs when a further increase of process noise value does not show significant improvements to the estimation results (*Qd* > 100).

On the right side of Figure 9 the estimated torque with the chosen *Qd* (marked in blue) is compared to a sub-optimal value (marked in orange) on the velocity transitions zones while in Figure 10 the full time series are compared.

**Figure 9.** The L-curve plot for different process variance *Qd* (**left figure**) and zoom-in comparison on the velocity transition of the measured and estimated motor torque using two different values of process variance *Qd* (**right figure**).

In Figures 9 and 10, it can be seen that despite a relatively similar tracking of the input (more delayed), at low rotational speed using a smaller covariance than the "optimal" one, the estimation accuracy degrades over time with a worse tracking of estimated torque.

**Figure 10.** Comparison of the estimated motor torque using two different values of process covariance *Qd* of the augmented state.

Although this study does not address the full scope of noise covariance tuning, the author deemed it sufficient to explain the methodological developments considered in this contribution. Further research on covariance tuning might be necessary to obtain a more holistic approach.

#### **6. Discussion and Conclusions**

This work presents a new estimation methodology tailored for MB models to enable the definition of virtual sensors for various system states and inputs.

Through the choice of a general MB modeling approach various key physical effects can be accurately accounted for, ranging from nonlinear kinematics to complex dynamic effects. The developed framework allows using these multibody models in an estimation framework without particular additional modeling assumptions or reformulations. More specifically, no constraint elimination methods are required to employ the defined MB model into the estimation framework, reducing the preparation time and the user effort to setup the estimation problem while ensuring the correct physical and mathematical interpretation of the system under investigation. As the proposed methodology has no particular assumptions with respect to the multibody model formulation it can be easily extended to any of the commonly available (flexible) MB approaches, e.g., FNCF, FFR-CMS, or GCMS. However, to fully benefit from the proposed approach the equations of motion and tangent stiffness matrices of the system should be analytically available to efficiently assemble the linearized system and measurement matrices.

In the present work, we exploited the FNCF MB approach, as this methodology inherently enables an easy and efficient evaluation of the different tangent model matrices required for the estimation framework.

Finally, the developed methodology has been experimentally validated on a slidercrank mechanism. Very high accuracy is obtained for the estimated states with respect to the available measurements. Good accuracy is also obtained for the estimated input torque, but due to the larger dynamic model errors in e.g., friction effects the resulting errors are higher than those obtained for the states. The validation has been performed over a relatively large time-span which also demonstrates the capability of the presented framework to obtain long-term stable estimates with a bounded uncertainty, in the form of a bounded covariance.

The presented methodology has some drawbacks since a large number of states (including the Lagrange multipliers) and measurements (including the constraints equations) are employed. These lead to a computationally less efficient approach as compared to other state of the art techniques (e.g., using minimal coordinates [15]). A possible solution to mitigate this issue might come from a wise selection of the number of bodies and constraints equations to construct the high-fidelity model. For instance, in this contribution, the choice of redundant number of bodies and constraints was made in purpose to stress the potential of the proposed methodology while dealing with redundant set of DAEs equations. More precisely, not all bodies and hence constraints were required to achieve the estimated motor torque with the same level of accuracy (e.g., the motor housing and the different supports). Nevertheless, if computational efficiency is not a limiting factor, i.e., if an online estimation is not required, this approach has the potential to enable a very generic deployment of (flexible) multibody-based state-input estimation.

Future work will focus on how these methodologies can be employed to obtain more accurate descriptions for key dynamic effects such as the friction present in these multibody systems.

**Author Contributions:** Conceptualization and implementation, R.A. and M.V.; Methodology, R.A.; in-house MB research code, M.V.; validation, R.A.; resources, W.D.; instrumentation and data acquisition, R.A.; writing, review and editing, R.A., M.V. and F.N.; supervision J.C., F.N. and W.D. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work has been carried out within the framework of the Flanders Make ICON project: Virtual Sensing on Flexible systems using distributed parameter models (VSFlex). The research was partially supported by Flanders Make, the strategic research center for the manufacturing industry. Internal Funds KU Leuven are gratefully acknowledged for their support. VLAIO (Flanders Innovation & Entrepreneurship Agency) is also acknowledged for its support.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The data presented within this study are resulting from activities within the acknowledged projects and are available therein.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Abbreviations**

The following abbreviations are used in this manuscript:

