A methodology to improve simulation of multibody systems using estimation techniques

ABSTRACT This paper presents a methodology for state estimation and accuracy improvement of computer simulations of computer aided engineering (CAE) models based on prediction and correction state estimation techniques and sensing. The aim is to simulate the dynamic behaviour of a real system, which can be sensed, and obtain values of states that are not measurable due to economic or technical limitations. This methodology can be applied to both optimization of design processes and on-line control of complex systems. State estimation techniques are currently used only on mathematical models, where the relationships among system variables are expressed by means of mathematical language, making state observer implementation possible but leading to limitations in system modelling and knowledge. Favoured over mathematical models, multibody CAE models (created by means of computer-aided engineering software) have become the essential tool for complex system development, simulation, analysis, optimization and control, such as multibody systems; one of their main advantages is the ease and flexibility in creating and modifying them, allowing the faithful modelling of complex systems.


Introduction
For a great number of applications, such as dynamical control of systems or optimization of design processes, the choice of suitable mathematical model or modelling method is important [1,2]. State estimation techniques allow knowing the value of the state variables of a dynamical system when the measurement of these variables is not technically or economically feasible [3][4][5][6][7]. The feedback (correction phase) of state variables improves the system control, but their estimation (prediction phase) requires a model that establishes the relationships among system variables. Currently used models are mathematical ones, where these relationships among variables are expressed by means of mathematical language, making state observer implementation possible, which is also mathematically expressed. To make complex system models compatible with state observers, simplifications of the reality are required, neglecting the effects that actually occur in the real system and that may have relevance in system knowledge and control [8][9][10][11][12][13][14][15][16][17][18][19][20][21].
Among the most current estimation techniques are those listed in references [22][23][24][25]. A method of designing a sliding interval mode observer for application to non-linear systems is proposed in [22]. [23][24][25][26] propose new methods for developing an Interval State Estimator for different types of systems. These methods have the advantage over previous designs in that they do not require cooperativity of the system dynamics and do not use observer gain with increased accuracy of the results. But none of the above references are applicable to the multibody CAE models that are the subject of this paper. In all the formulations presented, the explicit expression of the algebraic-differential equations defining the dynamical system is required. This is not always possible in complex multibody models that include non-linear effects of structural behaviour analysed with finite element techniques.
Alternately, when the aim of the model of a system is not state estimation, but instead simply the simulation of the real system for its development, analysis, optimization, or implementation of control techniques [27], the use of computer aided engineering (CAE) is common. The use of specific software in the various fields of engineering allows the real systems to be modelled with ease and flexibility, which involves the creation of models more complete and faithful to the real system. The models generated by the computer-aided engineering software are called CAE models [28][29][30].
Multibody systems is an example of CAE models use. Geometric, kinematic, dynamic, and generally nonlinear relationships exist between numerous rigid and flexible interacting bodies in time and space, resulting in large linear and angular displacements that become extremely complex [31][32][33][34]. In fact, they require the development of specific techniques to mathematically solving the equations generated to simulate the system [35][36][37].
Because of this complexity in modelling and analysing multibody systems, CAE has been applied to the dynamics of multibody systems, resulting in software of dynamic simulation of multibody systems or software simulation of multibody systems (multibody Dynamics simulation, MBD simulation, or multibody Simulation, MBS), such as MSC.Adams R , CarSim R , RecurDyn R , SimMechanics R or SIMPACK R . Complex multibody systems can be easily modelled in CAE, including the use of CAD tools for geometry and FEA (Finite Element Analysis) [38][39][40] tools for flexible bodies and control systems [41][42][43][44][45][46]. These models are parameterized and can be intuitively modified. After the model simulation is performed by an internal solver, CAE tools offer powerful ways to analyse the system, not only via 2D and 3D graphics but also by design and parameter optimization, parameter identification, vibration analysis and material fatigue, among others.
Given the advantages of multibody CAE models versus mathematical ones in creating, modifying, simulating and analysing a system, it seems interesting to apply the techniques of state estimation to multibody CAE models. However, despite the interest in the estimated states and the advantages of multibody CAE models, there is still only one bibliographic reference of the combination of the two [47], where a particular case of use of this combination of techniques is shown.
However, the CAE models are not always properly defined. In these cases, it is necessary to correct the simulation to compensate for the model error. This limitation in the model definition can be corrected by applying estimation techniques. The problem is that the CAE software does not make the set of algebraicdifferential equations of the model explicitly available. The availability of this set of equations is necessary for the application of the state estimation techniques mentioned above. Therefore, this paper proposes a method that allows the application of state variable simulation strategies in CAE models where the equations are not explicitly available, but the system response can be known by performing a parallel simulation in the estimation/correction stages.
The main contribution of this work is the presentation of a methodology for improving the accuracy of poorly defined multibody CAE model simulation. This methodology is based on state estimation strategies.
The remaining of the paper is structured as follows. Section 2 presents the proposed methodology for CAE models in similarity to those based on explicit mathematical models. In section 3 it is applied to a very simple CAE model, but which allows to see the applicability and potential of the proposed methodology. Section 4 presents the results obtained and discusses their applicability. The conclusions of the work are presented in section 5.

Methodology
Dynamical systems are defined by their state variables ( x(t)). Some of these state variables are imposed by external systems and make the system change, i.e. the inputs ( u(t)). Other state variables are observable, measured or have influence on external systems, showing how the system changes and propagates its consequences, i.e. the outputs ( z(t)). States can be obtained only by simulating the system: modeling it in a laboratory (keeping the measured states), elaborating a mathematical model and solving the equations, or using any type of special simulation tool (such as CAE software).
In the case of mathematical models, the relationships among variables are expressed in mathematical language. For a dynamical system in the continuous time domain, the model usually consists of a system of algebraic-differential equations. As shown in Figure 1a, the generic function f calculates the state variables and their derivatives from themselves and from input variables at each integration step in the continuous time domain. Once the system is solved and the system state is found, the generic function h allows the values of the output variables to be calculated from the state variables.
Normally, the outputs obtained from this simulation ( z(t),∼ denotes simulation) are not exactly the same as the outputs measured from the real system ( z(t)), leading to a simulation error ( y(t) = z(t) − z(t)). This is just because the model does not represent every property of the real system. The value obtained in the simulation for the state variables will not coincide with its real value x(t), although this latter one is not known.
The state estimation is a process that takes input variables and output ones measured in the real system and, based on the system model and the state observer, obtains the estimate of output ( z(t)) and state variables ( x(t)). In this manner, if the state estimation is successful, the output variable values of the simulation approach or converge to the values of the same output variables measured in the real system. This means that the simulation has been corrected and that the values obtained from the state variables are good estimates of their real values. State observers, such as mathematical algorithms, are designed for use on mathematical models, so the model formulation is "accessible", that is, the original differential equation Equation (1) can be modified to integrate this algorithm, called the observer. Thus, the resulting correction from applying the state observer on the residual of the measure is included in the equation system by multiplying it by a calculated gain, for example, according to the Extended Kalman Filter, Equation (2).
(1) In the simulation of a multibody CAE model, equations do not exist explicitly. The calculation of state variables and their derivatives, as well as output variables, is performed from input variables imposed on the model. As in its application in mathematical modelling, the state estimation of multibody CAE models should also act on the calculation of the state variables to try to converge the output variables calculated from them with the same output variables measured in the real system. In a CAE model, it is not possible to act directly on a state variable, only on the inputs, since the first ones are only calculated depending on the system dynamics, and they must be consistent with each other. In the case of a multibody system, the position and velocity of a body, for example, should be dynamically consistent, the second one being the temporal derivative of the first one, according to Eq (3).
The calculation of one of the two is acted on because it is treated as an input system, and this restricts one degree of freedom. Unlike state estimation on a mathematical model, in a CAE model, the dynamic coherence must be maintained so that the derivative of the position cannot be calculated as the velocity plus another component, as Equation (4) shows for the particular Extended Kalman Filter case. In a CAE model, the only way to act on the calculation of state variables is, as explained above, by system excitation. Because this excitation is not actually present in the system, it is called virtual excitation. This virtual excitation must act on the system in the sense of minimizing the residual of the measurement, so it is controlled by feedback of this residual. The vector variable that designates the set of virtual excitations is denoted by υ. The system dynamics that determine the influence of virtual excitations on state variables is denoted by the function ω. Figure 2a shows the diagram of proposed state estimation on the model analogously to the diagram presented for the state estimation on the mathematical model in Figure 1b. Note that, in this case, the proposed state observer does not act, adding its result to the calculation of the state variables on the model denoted by f , but it is used for the calculation of the virtual excitations υ, which act on the model ( f ) through its own dynamics ω. Thus, the effect of virtual excitations is already included in the calculation of the balance in each integration step for determination of the state variables.
However, in the case of multibody CAE models, equations denoted by vector functions f , h, and ω, as shown in Figure 2a, do not explicitly exist. For this reason, Figure 2b shows with more accuracy the process of state estimation in multibody CAE models, particularly for a vehicle model. It is interesting to note that the calculations of the measurement residual and state observer, which calculates the virtual excitations, are included within the dashed-line rectangle since these calculations are done simultaneously to calculate the balance in each integration step, thus affecting the values of the state variables such that the residual measurement is minimized. Consequently, the CAE model must take the output variables measured in the real system, including the calculation of the measurement residual and the virtual excitations from this residual based on the state observer algorithm, and finally apply the virtual excitations on the original model through the dynamic system. This virtual excitation should be able to correct the deviation of the state variables regarding the real system in view of the error of model output variables with respect to the same variables measured in the real system. That is, the virtual excitation complements the erroneous effect from the defect model so that the combination of both effects on the rest of the model is the correct one. Therefore, the virtual excitation has a physical meaning of the same nature as the effect that it tries to correct. On the other hand, the virtual excitation must not remove any degree of freedom of the system.
By contrast, state estimation on mathematical models adds to the equations of these an artificial correction in the sense that it has no physical meaning. Only the derivative values of the state variables are added. These values are calculated from the error in the output variables measured according to an algorithm value that does not take into account the dynamical system. The consequence is that the dynamic coherence of the system is lost since the equations are altered independently of this consistency, and thereby variables lose the relationships the real system should have. In short, the proposed methodology for state estimation in multibody CAE models, unlike the existing ones in mathematical models, does not alter the dynamic coherence of the system because the model is corrected through virtual excitations with physical meaning.

Example of state estimation on a simple CAE model
For easy application of the methodology proposed, the mechanical system (shown in Figure 3a) is put forward. This system consists of a single body (green) of a certain mass supported by a set spring-damper (red) that is fixed to the ground such that the body movement is limited to the vertical direction (translational kinematic restriction, cyan). The body acts on its own weight (due to the gravity field, blue) and a variable outer vertical force over time (magenta). In this system, the vertical position of the body is measured, i.e. its height above the floor and this coincides with the length of the spring-damper. The initial position corresponds with the natural length of the spring, without any elongation or compression. In this simple unidimensional multibody system, the input is, therefore, the force acting on the body and the measured output vertical position. The state to be estimated is the force exerted by the spring-damper assembly.
In this case, as in downstream applications, the actual (real) system is an MSC.ADAMS R model that simulates the input variables, state and output to clearly explain the methodology obtained.
Assuming the behaviour of the spring-damper, i.e. the force as a function of the elongation and speed of its elongation, is known, the calculation of this force is very simple because it simply measures the position, calculating its derivative in time and directly applying the performance curves to determine the resultant force. In many cases, these behaviours are assumed to be linear, i.e. the spring exerts force proportional to its elongation, and the shock absorber (damper) produces a force proportional to the speed of its displacement. However, in reality, to precisely know the behaviour of a spring, above all, a damper is complicated. While you can perform measurements on test facilities specifically designed to determine these behaviours, they vary over time and under the conditions of use. Thus, supposedly known spring-damper behaviour included in the model is a possible source of model error, especially if it is simplified and assumed to be linear. Therefore, a state estimator is applied here to compensate for the lack of the real system and possible defects in a simulation model.
If the force acting on the body is the system input, it can be theoretically solved by applying Newton's Second Law on the body. The acceleration can be obtained by deriving twice the measure of the position to find the force that makes the entire spring-damper. This is true in this particular simple case, where the input and output statuses are directly related and the only equation of the system (one-dimensional system) is well known. However, this is not possible in a more complex general case where the technique presented is applicable. Consequently, although this is an extremely simple system and applying estimation technique states would not be necessary, it is useful to simply explain the operation of state estimation models of CAE according to the methodology proposed in this work.
Assume that the real system is initially defined by the body mass (10 kg), elongation (0.5 m) and springdamper force curves ( Figure 4). Also, suppose that the force acting on the body follows the function of Equation (5): The proposed methodology's aim is to correct the simulated dynamical behaviour of a poorly defined model. In this example, the poorly defined model is basically the same as that used as a real system. However, because the behaviour of the spring-damper is  not well-known in a real-life problem, as has already been explained, simplified linear behaviour defined by K spring = 500 N/m and C damper = 100 N/m is assumed, which is totally different from the behaviours in the actual system. In Figure 4, the actual behaviour of the spring-damper is shown in blue, and the modified behavior is shown in red.
With this model definition, and maintaining the same entry as in the real system, the system output, i.e. the body position, is totally wrong, as shown in Figure 5 (blue line). The vertical speed and acceleration in the simulation also differ from the actual values since they are time derivatives of position. Clearly, the force of the spring-damper calculated by the model is also far from reality, as shown in Figure 6. Once the real system and model are defined and the error of the latter (poorly defined, as indicated) is demonstrated, it is interesting to apply the proposed methodology to estimate states with the aim of knowing the force exerted by the spring-damper. To estimate the force of the spring-damper, a virtual force parallel to it as a virtual excitation, i.e. acting on the body and the floor reaction (Figure 3b), is created. This virtual force compensates the damper-spring error force. This error is calculated by the model, based on erroneous behaviour curves (default model), so that the displacement body in the model follows the measured output.
In this particular case, a Proportional-Integral (PI) observer is performed. The force is calculated using the algorithm of a PI controller on the residual of the measurement. The residual of the measurement is the difference between the position of the body depending on the modelẑ(t) and the measured position z(t) in reality (from the simulation model MSC.ADAMS taken as the real system), according to  Equation (6).
Where F v (t) is the virtual force, time varying, z(t) vertical position of the body,ẑ(t) the estimated value of the vertical position of the body, and K p , K i the proportional and integral constants of the PI Observer. Comparing the corrected system with the original system, it is found that the corrected force of the spring-damper is indeed the sum of the calculated on the corrected plus the virtual force Equation (7) system strength. That is, this is the force that sets the behaviour of the spring to the actual output. Therefore, this force,F k−c (t), thusly calculated is the estimate of the actual force exerted by the spring-damper.
Whereż(t) represents the estimation of the vertical velocity of the body andF k−c ẑ(t),ż(t) is the force exerted by the spring-damper according to the corrected simulation model. Note that the notationF k−c is used to denote that it is calculated by the model, i.e. the force of the spring-damper calculated from an erroneous parameter value. However, this calculation is performed on the corrected system sinceẑ(t) andż(t) are themselves corrected. Thus, the virtual force acquires, over time, the required value for the solution of the new equation matching the resolution of the original equation, i.e. so that the corrected system output is the same as the original system. The value of the virtual force is added to the force by the spring-damper, with the physical meaning of the error calculated by the model force.

Results and discussion
In practice, the parameters of the PI Observer must be set until the position of the resulting body model resembles the body's position in the real system. After a few iterations, it is reached by trial and error, with the values K p = 1.0e5 and K i = 1.0e4, with no intention of seeking the best, only those that yield a satisfactory result and demonstrate the operation of state estimation.
With all this, the output variable (vertical position) can be obtained in the corrected simulation model. The values effectively converge to the same values measured in the real system ( Figure 5). The error-corrected output is, in any case, less than 2.5 mm over 600 mm maximum height of body, a 0.42% error. The estimated spring-damper force, calculated as the sum of that obtained by the model and the virtual force strength, is similar to the actual force ( Figure 6). The error in the estimation can be fixed in 5 N (although it has, at some point of instability, reached 10 N) with 440 N on the actual force. This represents a 1.14% error. Obviously, the vertical speed and acceleration of the body are also corrected and consistent with the position between them.
In conclusion, the force from the spring-damper set was estimated by correcting the model used in the simulation thanks to a virtual force. This virtual force is governed by the difference between the vertical position of the body as in the real system and that obtained in the simulation model, and it acts on it in an attempt to minimize the difference, as stated in Equation (6). Consequently, the model in view of the output variables is corrected to obtain the correct value of the state variable in the real system.
The proposed state estimation methodology has a fully satisfactory operation since the state is estimated and the behaviour of the model is similar to that of the real system. The proposed methodology based on state estimation techniques has been successful since it is possible to build a multibody CAE model while admitting that some features of reality are unknown, and through the technique presented, its effect is corrected for the actual value of the state, making the simulation results converge with reality.
In the shown example, the operation of the virtual drive to correct the model globally has been demonstrated. Not only can the values of states be extracted, i.e. to estimate them, but it is also possible to extract the value of any variable system since the entirety is consistent. In addition, since the virtual drive as a correction has a physical meaning, it is also possible to draw conclusions from this variable. Because the real system is a simulated multibody CAE model, the value of all variables in the system can be obtained, which validates the estimation. In this case, in which there is no measurement noise or uncertainty, the convergence of the estimation is indisputable.
It should be noted that, although it has raised the mathematical formulation of the system, i.e. the mathematical model, it has only been used to explain the consequences of error model and the virtual drive (excitation) needed. The model used to estimate states only exists in the environment of multibody dynamic simulation software (MSC.ADAMS R in this case) and is fed with the values of the output variables of the real system. Although the actual system will also be a model in the same software (MSC.ADAMS), this fact has no relevance, and the numerical values could come from experimentation or other simulation models. It is therefore not necessary to raise the system equations for the implementation of state estimation, which is relatively simple in this case but very complicated in other cases, as previously explained.
Another important item is the result of the resolution of the corrected dynamical system, i.e. simulation. It is not, as in the case of estimating states on mathematical models, to add an algorithm to the system equations. In the multibody CAE model corrected, the virtual drive is an integral part of the model, and the actual system will play as long as it is fed with the values of the output variables that are necessary. Accordingly, this springdamper system can become an integral part of a larger system, as one of its subsystems, with the guarantee that it will work faithfully to reality.
It should also be noted that, in these simple system states, the proposed estimator uses the only available output variable, the vertical position of the body. However, if more outputs, such as speed reading body would not be necessary to use in estimating states to calculate the virtual force. If the spring force is observable, only one measurement is required. Extending this result to a much larger system where the spring-damper is only a subsystem, it would be necessary to consider the outputs from other subsystems or the global system for estimating states or generating a matrix with zero as many of its terms. The state observer would remain one-dimensional, with the same performance and the same parameters to be set by the designer.
The above two findings mean that the proposed methodology for estimating states on multibody CAE models has a modular nature: the corrected system can be integrated into a larger system while maintaining its independent functioning from the rest of the system.
However, if separately estimating the component due to the spring and the shock instead of estimating the entire force of the spring-damper, the result would be two unobservable states. Because both forces act between the same bodies in the same direction, there are infinite combinations thereof such that their sum, combined with the force acting from the outside, are consistent with body movement.

Conclusion
A methodology for the state estimation of multibody CAE models has been presented, one that maintains the conceptual and operational fundamentals of the state estimation such as it has been raised thus far on mathematical models and extends them to these models.
Instead of altering the formulation of the model by introducing corrections directly in the calculation equations of states, such as the state observers do on mathematical (explicit formulation) models, the methodology presented intends to correct the system through virtual excitations. These excitations are coherent with the system dynamics and have physical meaning. Due to that, the values of output variables of the simulation converge to the values of the corresponding variables measured in the real system.
As in the current state estimation, it is assumed that if the output variables calculated on the model converge with the values measured in reality, then the corresponding values of the state variables calculated on the model are good estimates of their real values.
This methodology avoids the explicit modelling approach using mathematical language. It uses the power and flexibility of computer-aided engineering software. This work allows conservation of cost and time.
One important advantage is that the proposed state estimation is modular, and its complexity is practically independent of the model complexity. The proposed methodology makes use only of those useful variables, either states or outputs. A consequence of the above is that the implementation of state estimation barely adds computational cost to the simulation model.
Additionally the state observer acquires a physical meaning for the system. Another advantage is that it is possible to correct various errors in the model independently if they are not connected to each other or correct all of them at the same time if there is an interrelationship.
As a disadvantage, the designer of state estimation needs detailed knowledge and understanding of the real system and the model to be able to implement this methodology successfully. It is necessary to analyse the potential errors of the model and their effects on the system, similar to the relationships among system variables, to introduce the appropriate correction from the right measures of the real system. In this case, it is not sufficient to apply the mathematical algorithm of the state observer on the system of equations; moreover, an analytical understanding of the work is required.
The model faithfully represents the topology of the real multibody system; however, the model is defective because of the dynamic parameters of the real system, such as the behaviour of a shock absorber or a tire. This reproduces the existing problem when modelling multibody systems. It is easy to measure the geometry of the real system and reproduce it in the model (even using CAD tools). Nevertheless, it is very complex and expensive (even impossible) to measure certain parameters of the real system and their evolution over time, including the conditions of use and their historical data. The methodology presented here extends the state estimation to multibody CAE models with the intent to correct this disadvantage.