Estimating the Characteristic Curve of a Directional Control Valve in a Combined Multibody and Hydraulic System Using an Augmented Discrete Extended Kalman Filter

The estimation of the parameters of a simulation model such that the model’s behaviour matches closely with reality can be a cumbersome task. This is due to the fact that a number of model parameters cannot be directly measured, and such parameters might change during the course of operation in a real system. Friction between different machine components is one example of these parameters. This can be due to a number of reasons, such as wear. Nevertheless, if one is able to accurately define all necessary parameters, essential information about the performance of the system machinery can be acquired. This information can be, in turn, utilised for product-specific tuning or predictive maintenance. To estimate parameters, the augmented discrete extended Kalman filter with a curve fitting method can be used, as demonstrated in this paper. In this study, the proposed estimation algorithm is applied to estimate the characteristic curves of a directional control valve in a four-bar mechanism actuated by a fluid power system. The mechanism is modelled by using the double-step semi-recursive multibody formulation, whereas the fluid power system under study is modelled by employing the lumped fluid theory. In practise, the characteristic curves of a directional control valve is described by three to six data control points of a third-order B-spline curve in the augmented discrete extended Kalman filter. The results demonstrate that the highly non-linear unknown characteristic curves can be estimated by using the proposed parameter estimation algorithm. It is also demonstrated that the root mean square error associated with the estimation of the characteristic curve is 0.08% with respect to the real model. In addition, all the errors in the estimated states and parameters of the system are within the 95% confidence interval. The estimation of the characteristic curve in a hydraulic valve can provide essential information for performance monitoring and maintenance applications.


Introduction
Multibody system dynamics (MBS) approaches enable the creation of the equations of motion that describe a mechanical system and relevant sub-components of complex mechanical systems [1,2]. The use of MBS leads to physics-based models that act as a single source of information [3] and represent the operation of an equivalent physical system in the real world [4]. The data generated by an MBS simulation model can be used to solve real-world problems throughout a product's life cycle [5].
A physical system might have parameters that are difficult to estimate and that could accordingly create uncertainties in MBS models. In the real world, these parameters might be cumbersome or sometimes even impossible to measure directly due to economical limitations and sensor implementation difficulties. In addition, these parameters might change over time due to wear and other factors that come into play during operation. In some cases, parameters can only be interpreted from the manufacturer's catalogues while not manifesting the current state of a product or differences in individual products due to manufacturing tolerances. Estimating these parameters can provide valuable information about the state and working performance of a product [6,7]. Manufacturers can use this information for condition monitoring [8,9], predictive maintenance [10][11][12], and real-time simulations for digital-twin applications [13,14].
In general, parameter estimation is a discipline that provides the essential tools for the estimation of parameters appearing in the modelling of a system [15]. The most common techniques for parameter estimation are weighted least squares [16,17], Kalman filtering [18,19], orthogonal least squares [20], robust techniques that include clustering [10], and regression diagnostics [21]. Among these algorithms, Kalman filters for parameter estimation have been utilised in a wide variety of engineering studies, ranging from control [22] and mechatronics [23] to heat transfer [24,25], fluid mechanics [26,27], turbulence [28], and others.
In the MBS field, several types of Kalman filter algorithms have been used to estimate system states based on the multibody equations of motion [29][30][31][32][33][34]. In state estimation, the independent coordinate method was introduced by using the independent positions and velocities of the multibody model as the states of the Kalman filter [30]. Using the independent coordinate method, the MBS formulation offers a general approach for estimating the system coordinates in terms of independent states for open-and closed-loop systems [30,31,34]. Less attention has been given to parameter estimation in MBS systems [35]. This is due to the complexity of the problem. As in many cases, the parameters are not constant and have to be estimated from the measurable variables of the dynamic system. In an-MBS related study, vehicle suspended mass and road friction were estimated in a dual-estimation application by using the extended Kalman filter (EKF) and the unscented Kalman filter (UKF) [36]. The generalised polynomial chaos (gPC) theory was first implemented in the framework of MBS in 2006 to quantify the parametric and external uncertainties [37,38]. However, in [37,38], only constant parameters were estimated.
Contrary to this, in practical systems, the parameters are a function of several system variables and may follow very complicated and unknown non-linear variations during the working cycles [39,40]. For instance, in the case of a hydraulically actuated mobile working machine, the characteristic curve of a hydraulic valve can play a significant role in terms of machine performance [41,42]. The characteristic curve of a hydraulic valve can be expressed as a function of the spool position and the semi-empiric flow rate coefficient [41,42]. The semi-empiric flow rate coefficient relates the discharge coefficient, pressure losses, and flow characteristics that demonstrate the dynamic characteristics of a hydraulic valve [43][44][45]. Accordingly, the characteristic curve of a hydraulic valve can be used in the condition monitoring and predictive maintenance of hydraulically driven systems [42]. However, in an operating hydraulic system, only the minimum and maximum points on the characteristic curve can be determined from the manufacturer's catalogues with a high level of certainty [41,42]. The characteristic curve of a hydraulic valve remains unclear in a working cycle and varies from one hydraulic valve to another due to manufacturing tolerances and possible wear [41,42]. Applying parameter estimation theories [46,47] in combination with MBS equations of motion can enable the estimation of the characteristic curve of a hydraulically driven physical system in operation by using a limited amount of information.
Generally, unknown parameters are treated as constants in the dynamic equations of motion. The estimation of non-linear parameters typically requires an accurate description of the first derivatives of the corresponding parameters. However, in the real world, the first derivatives of parameters are unclear. The first derivative of a characteristic curve in a hydraulic valve is an example. In the case of a characteristic curve, a vector of data points can be constructed using random points between the minimum and maximum values provided in the manufacturer's catalogues. Through a parameter vector, the characteristic curve of a hydraulic valve in the real world can be estimated by combining parameter estimation algorithms [46,47] and curve-fitting methods [48][49][50][51][52]. Considering parameter estimation constraints, this study proposes the estimation of parameters by combining the augmented discrete extended Kalman filter (ADEKF) with curve-fitting methods.
The objective of this study is to propose a parameter estimation algorithm by combining the ADEKF algorithm with a curve-fitting method in an application for estimating linear and non-linear parameters. To this end, parameters are introduced as vectors in the augmented state vector. Due to the accuracy of the finite difference schemes in the complex plane, as demonstrated in [53,54], an approach to computing the Jacobian of a non-linear system of ordinary differential equations (ODEs) through complex variables in the framework of a parameter estimation algorithm is proposed. Based on the parameter estimation algorithm, the structures of covariance matrices of plant and measurement noises are introduced. The parameter estimation algorithm is applied to estimate the characteristic curve of a directional control valve in a hydraulically driven four-bar mechanism. As reported in [55], the double-step formulation has advantages over Index-3 Augmented Lagrangian formulation due to the use of a coordinate partitioning method [56]. Therefore, the double-step semi-recursive formulation is used to model the four-bar mechanism with relative coordinates. A fluid power system, in turn, is modelled by using the lumped fluid theory. This algorithm is verified by estimating the characteristic curves of the directional control valve using three, four, five, and six vector data control points in the mechanism. The implementation of the parameter estimation algorithm is explained by using MBS simulation models that represent the real model, estimation model, and simulation model. The estimation model considers the actuator position, pump pressure, and the pressure on the piston side as sensor measurements to account for the system responses. Applying the proposed parameter estimation methodology in MBS systems can enable the estimation of parameters of any complex system in a real-world system.
The rest of this paper is organised as follows. In Section 2, the parameter estimation methodology is described. Section 2 details further into the double-step semi-recursive MBS formulation, lumped fluid theory, monolithic approach, the ADEKF with a curvefitting method, and structure of covariance matrices of plant and measurement noises. The parameter estimation methodology is applied to the case example presented in Section 3. Section 4 demonstrates the results of the parameter estimation algorithm for the case example. Finally, conclusions about parameter estimation are provided in Section 5. Figure 1 depicts a methodology that can be used to estimate the parameters of a dynamic system by using a simulation model. In this model, an initial covariance matrix

Parameter Estimation Methodology
Here, L is the dimension of the augmented state vector, and R denotes the set of real numbers. x ∈ R L−n hp and y ∈ R n hp represent the states and parameters of the system, respectively. Here, n h p is the number of hydraulic parameters. In the real world, the sensors shown in the Figure 1 can be replaced by sensor measurements obtained from a physical system, such as a forklift, a tractor, etc. [4,57]. To account for the system response, the sensor measurement vector o includes the minimum number of measurements required by the ADEKF algorithm to estimate the states and parameters of a real system. In Figure 1, h corresponds to the sensor measurement function. Note that the parameters should not be included in the measurement vector, i.e., y / ∈ o. The parameter estimation algorithm estimates the augmented state vectorx + k and covariance matrix P + k from the minimum information of the real system at time step k − 1 in the simulation model.

Multibody Dynamic Formulations
The parameter estimation methodology described in Section 2 is applied to the simulation of a hydraulically driven mechanism. In this study, the hydraulically driven mechanism is modelled using a double-step semi-recursive MBS formulation and the lumped fluid theory. The coupled multibody and hydraulic dynamics are integrated by using a single-step implicit trapezoidal integration scheme in a monolithic coupling approach. As demonstrated in [55], the double-step semi-recursive formulation uses a coordinate partitioning method [58][59][60] to express the hydraulically driven mechanism in terms of independent coordinates. As a result, the double-step semi-recursive formulation presents an appropriate multibody simulation approach for state and parameter estimation applications.

Double-Step Semi-Recursive Formulation
In the semi-recursive formulation, a body i is defined by the set of six Cartesian velocities as Z i = ṙ T i ω T i T and six Cartesian accelerations asŻ i = r T iω T i T for a complete description [61,62]. Here,ṙ i ,r i , ω i andω i are velocities, accelerations, angular velocities, and angular accelerations of the body, respectively. In the relative coordinate system, the position of n b bodies in a system can be described by using joint coordinates as z = z 1 z 2 .... z n b T [61,62]. The absolute velocity Z and the absolute acceleratioṅ Z of the system bodies can be mapped in terms of the relative joint velocity vectorż and the relative joint acceleration vectorz by using the velocity transformation matrix as follows [61,62]: where T ∈ R 6n b ×6n b is the path matrix that demonstrates the topology of the system, and R d ∈ R 6n b ×n b is a block diagonal matrix. The path matrix T is a lower triangular matrix and contains entries of 6 × 6 (I 6 ) unit matrices representing bodies between the body under observation and the root of the system [61]. In Equation (1), the block diagonal matrix R d and the productṘ dż can be computed with the joint-dependent element of the velocity transformation matrix b i ∈ R 6×1 and the joint-dependent element of the acceleration transformation vector d i ∈ R 6×1 , respectively [61,62]. The semi-recursive formulation is described hereafter, but the interested reader is referred to [61,62] for further details of T, b i , and d i . The composite mass matrix M i ∈ R 6×6 and the composite force vector Q i ∈ R 6×1 of the ith body can be described using absolute coordinates as [61,62]: where m i is the mass of the i body, f i ∈ R 3×1 is a vector of external forces,ω i is the skew-symmetric matrix of the angular velocity vector, n i ∈ R 3×1 is the vector of external moments, I 3 is a 3 × 3 unit matrix, andg i ∈ R 3×3 is the skew-symmetric matrix of the position vector of the centre of mass of the body in the global coordinate system. In Equation (2), J i is the inertia tensor of the ith body, which can be computed as described in [61]. Applying the principle of virtual work and using Equation (1) yields the equation of motion for an open-loop system in the simplified form [61,62]: where M ∈ R 6n b ×6n b is the block diagonal matrix consisting of the composite mass matrices of the bodies. The force vector Q ∈ R 6n b ×1 is the column matrix of composite forces. To incorporate closed-loop systems, the double-step semi-recursive formulation is used in this study [62]. In this method, a set of m constraint equations Φ(z) = 0 are introduced for closure of an open-loop system. This method employs Gaussian elimination with a full pivoting approach to identify the independent and dependent columns of the Jacobian matrix Φ z [62][63][64]. Through this formulation, relative joint-independent coordinates can be used to define the dynamics of a system, i.e., the relative joint-dependent coordinates can be computed in terms of the relative joint-independent coordinates. Hence, this provides an appropriate option for the state and parameter estimation applications. The relative joint velocity vectorż can be described using the coordinate partitioning method [59]: whereż d ∈ R m are the relative joint-dependent velocities,ż i ∈ R n f are the relative jointindependent velocities, R z ∈ R n b ×n f is the velocity transformation matrix, Φ d z ∈ R m×m , and Φ i z ∈ R m×n f are the Jacobian matrices of the constraint equations with respect to the dependent and independent relative joint positions, respectively. In Equation (5), it is assumed that neither singular configurations nor redundant constraints exist; as a consequence, the inverse of matrix Φ d z can be obtained [55,59]. The relative joint acceleration vector can be expressed by differentiating Equation (5) [59]: wherez i are the relative joint-independent accelerations, andṘ z is the derivative of the velocity transformation matrix. Substituting Equation (6) into Equation (4) results in an equation of motion for a closed-loop system in a simplified form [55,56,58,63,64]: where   + TṘ dż represent the absolute accelerations when the vectorz is zero in Equation (6). Equation (7) can be further simplified using the

Hydraulic Lumped Fluid Theory
The lumped fluid theory can be used to compute pressures within a hydraulic circuit [65]. Using this approach, a hydraulic circuit is assumed to be composed of discrete volumes. The pressures inside the volumes are equally distributed, with the acoustic waves having a negligible effect on the pressures [41,65]. In any hydraulic volume V h , the differential pressureṗ h can be computed [41,65] aṡ where Q h is the sum of incoming and outgoing volume flow rates, k 0 is the flow gain, k p is the pressure flow coefficient, and n f is the total amount of volume flows. By employing a semi-empirical method, the volume flow rate Q R through a throttle valve can be described as [66] Q where ∆p is the pressure difference and C R = C d A R 2 ρ is the semi-empirical flow rate coefficient of the throttle valve. Here, C d is the flow discharge coefficient and ρ is the fluid density. In Equation (9), A R is the cross-sectional area of the pressure relief valve. Similarly, the volume flow rate Q d through a directional control valve can be computed as [67,68] where C v is the semi-empiric flow rate coefficient, and U is the relative position of the spool. Equation (10) is complemented by the following first-order differential equation: where U re f is the reference voltage signal, and τ is the time constant. The incoming flow rate Q in and outgoing flow rate Q out in the hydraulic cylinder can be described as whereṡ is the piston velocity, and A 1 and A 2 are the areas on the piston and piston-rod side of the cylinder, respectively. The force F h produced by the cylinder can be written as where p 1 and p 2 are, respectively, the pressure on the piston and piston-rod side, which can be calculated by using Equation (8). F µ is the total friction force in the hydraulic cylinder caused by the hydraulic sealing. As proposed in [69], this friction force can be calculated by employing the Brown and McPhee model [70], which is valid for both positive and negative tangential velocity. The actuator velocity dependent friction force can be written in the vector form as where F c is the Coulomb friction, v s is the Stribeck velocity, F s is the static friction, σ 2 is the coefficient of viscous friction, andṡ is the actuator velocity vector.

Monolithic Approach: Coupling MBS and Hydraulic Dynamic Systems
The MBS formulation can be combined with the fluid power system solver to form a unified set of non-linear differential equations in a monolithic approach: where p is the pressure vector, and y is the vector of hydraulic parameters. Equation (15) is a set of non-linear equations that can be represented as f(x, U) = 0. Here, the vector x = z TżT p T y T T . The solution of the non-linear equations described in Equation (15) is stiff. A stiff equation can be solved by using single-step implicit trapezoidal integration scheme [55,[71][72][73]. In this integration scheme, the relative joint-independent positions and the pressures are initially predicted as z i k+1 = z i k +ż i k ∆k + 1 2z i k ∆k 2 and p k+1 = p k +ṗ k ∆k, respectively [73]. The derivatives of z i k+1 and p k+1 can be predicted aṡ  (5) and (6) at the velocity and acceleration levels, respectively [55]. Substituting Equation (16) into Equation (15) leads to a set of dynamic equilibrium equations as F(χ k+1 ) = 0 at the time step k + 1 as where T is unknown. The Newton-Raphson method is employed on the non-linear Equation (17) to iteratively compute the unknown variables [73,74]: where ∆z i k+1 < 1 × 10 −10 rad and ∆p k+1 < 1 × 10 −2 Pa are the error tolerances in the relative joint independent positions and pressures provided in the Newton-Raphson method. In Equation (18) is the residual vector, which can be computed as In Equation (18), is the tangent matrix, which can be numerically approximated at a point χ 0 by using a forward finite differences, as demonstrated in the literature [72,75]. Now, by computing ∆χ (h+1) k+1 from Equation (18), the next iteration χ can be calculated.

Estimation Algorithm: ADEKF with a Curve-Fitting Method
In this section, the ADEKF parameter estimation algorithm is introduced in the framework of a B-spline curve-fitting method. It is important to note, however, that the introduced procedure can be easily modified for applications of other curve-fitting methods, as mentioned in [48,49]. Parameter estimation through the ADEKF comprises prediction and update stages. At the prediction stage, in the case of the coupled multibody and hydraulic systems, the augmented state vector can be described as At this step,x − k is calculated in the time integration of a dynamic model described as [46] x To account for unknown parameters, the proposed parameter estimation algorithm employs the curve-fitting method. Through this method, a B-spline curve is constructed with the knot vector u for non-uniform open splines [48,49] at the current time step: where n is the number of control points, d is the degree, B i,d (u) are the dth order of B-spline basis functions, and N i is the control point vector. The control point vector can be expressed in terms of the system parameters y. For instance, in the case of the characteristic curve, the control point vector can be written in terms of the spool position and semi-empiric flow Here, U min , U 1 , and U n represent spool positions, and C v min , C v 1 , and C v max are the semi-empiric flow rate coefficients of a hydraulic valve. B i,d (u) can be defined by using the Cox-de Boor recursion formula [48,49]: where u i is the ith element of the knot vector for non-uniform open splines. Next, the numerical values of parameters, which are scalar, should be evaluated by using Equation (21) at time step k to be incorporated in Equation (20). The calculation of Equation (20) at the desired input signal is straightforward. However, the numerical computation of the Jacobian matrix f x k−1 could be challenging when using a curve-fitting method. Each term of the Jacobian matrix can be approximated by using complex variables to reduce the truncation error [53,54] for very small increments. For instance, in the case of a multi-variable function, the Jacobian column of Equation (20) with respect to the rth term of the augmented state vectorx k−1 can be written in the partial derivative form as where r ∈ [1, L], and iδ represents a very small increment in the complex plane. δ = Lε is a real value. Epsilon ε is a very small number and depends on the machine's precision. The rth term of the state vectorx k−1,r + iδ is expanded by using the Taylor series [53,54]. The evaluation of Im(f(x + k−1,1 ,x + k−1,2 , ...,x k−1,r + iδ, ...,x + k−1,L )) for the parameter vector u k requires the evaluation of C(u k−1 ) as complex numbers. However, the knot vector cannot contain any complex numbers [48,49]. Therefore, a criterion |t − t i k−1 | < Ξ is introduced, where Ξ can be a small real number, such as 0.1, which implies that the knotpoint distance between t i k−1 and the complex input argument t should be less than Ξ. Using this criterion enables the knot points to be evaluated with the curve-fitting method through complex input. With the Jacobian of the dynamic system f x k−1 , the covariance matrix P − k is approximated as [46] P where Q k is the covariance matrix of the plant noise. In the update stage, the sensor measurements are taken into account to improve the estimated augmented state vectorx − k . The innovation ∆ k is calculated as [46] where o k are the sensor measurements at the k time step, and h(x − k ) is the sensor measurement function. With the Jacobian of the sensor measurement function h x , the innovation in the covariance matrix S k and the Kalman gain K k can be calculated as [46] where R k is the covariance matrix of the measurement noise. Finally, the augmented state vectorx + k and covariance matrix P + k are updated at the time step k, which will be used for the next time step as [46]x where I L is the identity matrix of dimension L.

Covariance Matrices of Process and Measurement Noises
It is well known that when applying Kalman filters, the tuning of the filter parameters is crucial, especially the covariance matrices of the plant and measurement noises. Furthermore, it was established in [30,31] that in dealing with non-linear systems, the improper tuning/setting of these covariance matrices can make the algorithm unstable. In this study, the properties of measurement noise are precisely known because the measurements are built from a dynamic model (providing ground truth) with an addition of white Gaussian noise to replicate real sensors. Thus, the covariance matrix of measurement noise can be obtained. For instance, when using position and pressure sensors, the covariance matrix of the measurement noise, R, would then take the form [30,31,34] where σ s and σ p are the standard deviations of measurement noises at the position and pressure levels, respectively. In Equation (29), n is the number of actuator sensors and n p is the number of pressure sensors. I n , I n p , 0 n×n p , and 0 n p ×n are the identity and zero matrices of corresponding orders, respectively. In the case of a multibody model along with positions and velocities as the state vector, the structure of the plant noise in the discrete-time frame was well established in [30,31] and can be written as where ∆t is the size of the integration time step and n f is the number of degrees of freedom of the system. It should be noted that Equation (30) includes the variance at the acceleration level, σẍ, because of the acceleration errors arising from the inaccurate description of forces and mass distribution. Furthermore, the state vector in this study also includes the hydraulic pressures and the hydraulic parameters, along with the positions and velocities, and errors can occur at the pressure and parameter levels as well. Therefore, inspired by [34], the variance of hydraulic pressures, σ p,D , and the variance of hydraulic parameters, σ h p,D , can be directly incorporated as the diagonal elements in Equation (30). Accordingly, the structure of the covariance matrix of the plant noise, Q, in the parameter estimation can be written as In this study, the integration errors are assumed to be negligible in comparison to the acceleration, pressure, and parameter errors.

Case Example: Hydraulically Actuated System
The parameter estimation methodology described in Section 2 is applied to estimate the characteristic curves at the a, b, c, and d ports of the 4/3 directional control valve shown in Figure 2. A four-bar mechanism actuated by a hydraulic circuit is presented in Figure 2. The dynamics of the mechanism are modelled using the semi-recursive and hydraulic lumped fluid theories, as described below.

Dynamic Model of the System
The bodies of the mechanism are assumed to be rectangular beams whose lengths are L 1 = 2 m, L 2 = 8 m, and L 3 = 5 m and whose masses are m 1 = 100 kg, m 2 = 400 kg, and The four-bar mechanism is actuated using the sinusoidal reference input signal, which is taken as U re f = 10 sin (0.4πk), where k is the simulation run time. The simulations are performed for 5 s. The hydraulic circuit consists of a double-acting hydraulic cylinder, connecting hoses 1 and 2, a 4/3 directional control valve, a pressure relief valve, a connecting hose of volume V p , a differential pump of pressure p p , and a tank with a constant pressure source p T . Figure 2. Hydraulically actuated four-bar mechanism. The mechanism is actuated by a differential pressure pump. C va , C v b , C vc , and C v d represent the semi-empiric flow rate coefficients at a, b, c and d ports of the 4/3 directional control valve. Gray rectangles indicate the pressure sensors on the control volumes V p and V 1 .

Dynamic model of the system
The bodies of the mechanism are assumed to be rectangular beams, whose lengths are L 1 = 2 m, L 2 = 8 m and L 3 = 5 m, and masses are m 1 = 100 kg, m 2 = 400 kg and m 3 = 250 kg, respectively. The position vector at points D is The point G is located at the center of mass of body 1. The double-step semi-recursive formulation, described in Sec. 2.1.1, is used to model the four-bar mechanism. The four-bar mechanism is actuated using the sinusoidal reference input signal taken as U re f = 10 sin (0.4πk), where k is the simulation run time. The simulations are performed for 5 s. The hydraulic circuit consists of a double acting hydraulic cylinder, connecting hoses 1 and 2, a 4/3 directional control valve, a pressure relief valve, a connecting hose of volume V p , a differential pump of pressure p p , and a tank with constant pressure source p T .
The lumped fluid theory, described in Sec. 2.1.2, is used to compute the pressures within the hydraulic circuit. In application of the lumped fluid theory, the hydraulic circuit Figure 2. Hydraulically actuated four-bar mechanism. The mechanism is actuated by a differential pressure pump. C v a ,C v b ,C v c , and C v d represent the semi-empiric flow rate coefficients at the a, b, c, and d ports of the 4/3 directional control valve. Grey rectangles indicate the pressure sensors on the control volumes V p and V 1 .
The lumped fluid theory described in Section 2.1.2 is used to compute the pressures within the hydraulic circuit. In the application of the lumped fluid theory, the hydraulic circuit can be divided into three control volumes V p , V 1 , and V 2 . The pressure derivativeṡ p p ,ṗ 1 , andṗ 2 through these volumes can be computed aṡ where Q d 1 and Q d 2 are the flow rates in the control volumes 1 and 2. In Equation (32), Q p and Q R are the pump flow rate and flow rate through the pressure relief valve, respectively. The flow rates Q R , Q d 1 , and Q d 2 can be computed by employing Equations (9) and (10), respectively. The constant hydraulic parameters are tabulated in Table 1. In Equation (32), s is the actuator velocity, which can be determined from the actuator position vector s. Following Figure 2, the vector s can be calculated from the position vectors r G and r D as whereṙ G is the velocity vector of point G. The control volumes V 1 and V 2 appearing in Equation (32) can be calculated as follows: where V h 1 , V h 2 , and V p are the control volumes of the respective hoses, as described in Table 1. In Equation (34), l 1 and l 2 are the lengths of the piston side and the piston-rod side chambers, respectively. l 1 and l 2 can be calculated with the vector s as where l 1 0 and l 2 0 are the initial piston side length and the initial piston-rod side length, respectively. l 1 0 and l 2 0 are computed from the length of cylinder l, which is given in Table 1. Using the vector s, the hydraulic force F h produced by the double-acting cylinder can be calculated as where F h is computed from Equation (13). The hydraulic force vector F h is combined with the external force vector f i to calculate Q in Equation (3). The resultant equations of motion (15) are formulated for the hydraulically driven four-bar mechanism. Equations (15) are solved by using an implicit single-step trapezoidal integration scheme in a monolithic approach, which was described in Section 2.1.3.

Real and Estimation Models
In this study, three dynamic versions of the mechanism are used to demonstrate the implementation of the parameter estimation algorithm. One of the models is the real model. The sensor measurements o are taken from the real model. The modelling errors are introduced in the force model of the estimation model with respect to the real model. The properties of the estimation model and the simulation model are the same. In Table 2, the properties of the real model, the estimation model, and the simulation model are provided.
Note that the simulation model is used in this study to demonstrate the differences between the simulated world and the real world. Table 2. Properties of the real model, the estimation model, and the simulation model. Errors in the simulation model and the estimation model are given in comparison to the real model. s 1 0 , p p 0 , and p 1 0 represent the initial actuator position, the initial pump pressure, and the initial pressure on the piston side as the system states. The system parameters C v a , C v b , C v c , C v d , k 0 , and k p represent the semi-empiric flow rate coefficient at the a, b, c, and d ports of the directional control valve, the flow gain, and the pressure flow coefficients, respectively.

Errors Symbol Real Model Estimation Model Simulation Model
State As in practise, the minimum and maximum points on the characteristic curves of a directional control valve can be determined from the manufacturer's catalogues. Using this limited information, the characteristic curves are defined linearly at all ports of the directional control valve in the cases of the estimation model and the simulation model. The linear characteristic curves are implemented by using the minimum and maximum values of the semi-empiric flow rate coefficients C v a , C v b , C v c , and C v d at the valve closing and the valve opening positions, respectively. The linear characteristic curves of the directional control valve affect the dynamics of the estimation model throughout the simulation runtime. In the case of the real model, the characteristic curves of the directional control valve are unclear and can be non-linear. With Equation (21), the non-linear characteristic curves of the directional control valve are implemented using C v a , C v b , C v c , and C v d in the hydraulic circuit of the real model. Similarly, the initial actuator positions s 1 0 of the real model and the estimation model are different. Note that the initial relative joint coordinates of the bodies in the system can be found from s 1 0 andṡ 1 0 by using geometrical relationships. To avoid instabilities in the integration process, the simulations are started in the static equilibrium position, the details of the mechanism of which can be found in [34].

Sensor Measurements
In this study, the measurable observations o = s p p p 1 T are taken from the real model. In the real model, the actuator position sensor measures the actuator position s [76]. Gauge pressure sensors are used for the pressure measurements p p and p 1 [34]. These pressure sensors measure the pressure with respect to the atmospheric pressure. The pressure sensors are installed on their respective volumes, as also shown in Figure 2. The numerical values of the standard deviation, as mentioned in Equation (29), are taken as σ s = 1.12 × 10 −3 m and σ p = 1.5 × 10 5 Pa for the actuator and pressure sensors, respectively.

Parameter Estimation Algorithm
In the parameter estimation algorithm, the augmented state vectorx is defined aŝ where s is the actuator position,ṡ is the actuator velocity, p p , p 1 , and p 2 are the pressures, k p is the pressure flow coefficient, k 0 is the flow gain, and C v = C v a C v b C v c C v d are the semi-empiric flow rate coefficients at the corresponding ports of the directional control valve. In Equation (37),x andŷ present the states and the parameters of the hydraulically driven four-bar mechanism, respectively. Equations (20)- (28) are implemented to estimate the augmented state vectorx and the characteristic curves of the directional control valve. In this application, the third-order B-spline interpolation method is combined with the ADEKF. For the case example, three, four, five, and six control points are used in the parameter estimation algorithm to compute Equations (20) and (24). As mentioned earlier, the first, third, and fourth state variables are measured. Therefore, the sensor measurement function h(x − k ) and its Jacobian h x can be written as where and h x are used in Equations (26) and (27), respectively, in the parameter estimation algorithm.

Results and Discussion
In this section, the results of the simulation of the estimation model of the parameter estimation algorithm are presented. The results of the estimation model are compared to those of the real model and the simulation model. The initial covariance P 0 used in the augmented state estimator includes σ 2 s = 1 × 10 −4 m 2 for the actuator position, σ 2 s = 1 × 10 −4 m 2 /s 2 for the actuator velocity, and three pressure terms of σ 2 p = 22.50 × 10 7 Pa 2 in the diagonal. For the hydraulic parameters, the initial covariance values σ 2 k p = 1 × 10 14 Pa 2 , σ 2 k 0 = 1 × 10 2 and σ 2 C v = 9 × 10 2 m 6 s 2 Pa are used in the diagonal. The numerical values of the plant noise σ 2 x = 0.8 m 2 /s 4 and σ 2 p = 259.81 × 10 7 Pa 2 for Equation (31) are obtained through trial and error. All models are run with a time step of 1 ms and provide sensor data to the parameter estimation algorithm at 1000 Hz.

Estimating the Characteristic Curve of the Valve
In the real model, as only the minimum point c min and the maximum point c max on the characteristic curves are known at the a, b, c, and d ports of the directional control valve, the characteristic curves are generally unclear in the working cycles of the real model. The characteristic curves may vary from one valve to another and can be highly non-linear in the working cycle. In Figure 3, Spline 1 and Spline 2, which are in the cyan colour, are used to demonstrate the non-linear behaviour of the directional control valve in the real model.  The proposed parameter estimation algorithm can be used to estimate the characteristic curves of the real model with this limited information. To this end, the semi-empiric flow rate coefficients C v a , C v b , C v c , and C v d are defined with the data control points between c min and c max in Equation (37). Equation (37) To estimate the characteristic curve, three, four, five, and six control points are used in the control point vector N a . As an example, these data control points for Spline 1 in each case are presented in Table 3.
The abscissa of vector N a represents the spool position U, whereas the ordinate of vector N a indicates the semi-empiric flow rate coefficients C v a at port a of the directional control valve. The results of the second-order B-spline are described in Appendix A. The results of the third-order B-spline demonstrate the characteristic curve of the directional control valve relatively better in a working cycle, as shown in Figure 3. As can be seen, Spline 1 and Spline 2 of the third-order B-spline are drawn in each data control point estimation The proposed parameter estimation algorithm can be used to estimate the characteristic curves of the real model with this limited information. To this end, the semi-empiric flow rate coefficients C v a , C v b , C v c , and C v d are defined with the data control points between c min and c max in Equation (37). Equation (37) To estimate the characteristic curve, three, four, five, and six control points are used in the control point vector N a . As an example, these data control points for Spline 1 in each case are presented in Table 3.
The abscissa of vector N a represents the spool position U, whereas the ordinate of vector N a indicates the semi-empiric flow rate coefficients C v a at port a of the directional control valve. The results of the second-order B-spline are described in Appendix A. The results of the third-order B-spline demonstrate the characteristic curve of the directional control valve relatively better in a working cycle, as shown in Figure 3. As can be seen, Spline 1 and Spline 2 of the third-order B-spline are drawn in each data control point estimation case. The dashed red-coloured line indicates the characteristic curve of the simulation model. The dashed black-coloured line demonstrates the estimation model. In Figure 3a, three points, c min , c 1 , and c max , are used to estimate Spline 1 and Spline 2 of the real model. The characteristic curve of the estimation model precisely follows the real model in the case of three points. Further, the percentages of the root mean square error (RMSE) are described in the Table 3 for Spline 1 and Spline 2 to verify the observations. case. The dashed red-coloured line indicates the characteristic curve of the simulation model. The dashed black-coloured line demonstrates the estimation model. In Figure 3a, three points, c min , c 1 , and c max , are used to estimate Spline 1 and Spline 2 of the real model. The characteristic curve of the estimation model precisely follows the real model in the case of three points. Further, the percentages of the root mean square error (RMSE) are described in the Table 3 for Spline 1 and Spline 2 to verify the observations.   Figure 3b shows the estimation of the characteristic curve when using four points c min , c 1 , c 2 , and c max . As can be seen in Figure 3b, the semi-empiric flow rate coefficient C v a for Spline 2 changes with small increments until 52% opening of the spool as compared to Spline 1 in the real model. After this point, the parameter C v a increases sharply towards the maximum point c max . The difference of the estimated curve from the real model's curve is indistinguishable. The RMSEs of these curves are given in Table 3. The relatively complicated non-linear behaviours of the directional control valve can be estimated by using five control points and six control points. This can be seen in Figure 3c,d. By using the estimated characteristic curves, the working conditions of the directional control valve can be predicted.  Table 3. Root mean square error in the estimation of the characteristic curve. The third and fourth columns represent the root mean square errors in Spline 1 and Spline 2, respectively.  Figure 3b shows the estimation of the characteristic curve when using four points c min , c 1 , c 2 , and c max . As can be seen in Figure 3b, the semi-empiric flow rate coefficient C v a for Spline 2 changes with small increments until 52% opening of the spool as compared to Spline 1 in the real model. After this point, the parameter C v a increases sharply towards the maximum point c max . The difference of the estimated curve from the real model's curve is indistinguishable. The RMSEs of these curves are given in Table 3. The relatively complicated non-linear behaviours of the directional control valve can be estimated by using five control points and six control points. This can be seen in Figure 3c,d. By using the estimated characteristic curves, the working conditions of the directional control valve can be predicted.

Convergence of the Vector Data Control Points
The convergence rate of the data control points in the parameter vector C v a is further explained in Figure 5 to describe the estimation process. These plots demonstrate the convergence rate of data control points in the case of Spline 2, as presented in Figure 3. For instance (see Figure 5b), c 1 and c 2 converge towards the corresponding point on the curve of the real model at 0.22 s. However, during the estimation process, c 1 briefly becomes negative, and shortly thereafter converges smoothly to the real model. The curves of Spline 2 change into an S-shape during the working cycle, as shown in Figure 3c,d. In these cases, c 2 , c 3 , and c 4 converge at different simulation times according to the corresponding order in the vector C v a . Through the ADEKF algorithm, unknown curves start converging within a range of 0 < t ≤ 0.3 s when using the three-, four-, five-, and six-point estimation techniques.

Accuracy Requirements of State Estimations
The successful application of the parameter estimation algorithm requires the accurate estimation of the system states x. To demonstrate this requirement, the errors in the estimated actuator position s, estimated actuator velocityṡ, estimated pump pressure p p , estimated piston side pressure p 1 , estimated piston-rod side pressure p 2 , and estimated parameter C v a in the case of Spline 2 (described in Figure 3d) are shown in Figure 6. The errors in the estimated parameters k p and k 0 are presented in Appendix B. The average of the parameter vector C v a at each time step is considered in Figure 6.
The errors are computed from ±1.96σ. Here, σ is the standard deviation calculated from the covariance matrix P + k at each time step. These plots demonstrate the requirement of an accurate estimation of the system's states to estimate the system's parameters. As can be seen in Figure 6, the 95% confidence interval (CI) is used by the system states in the 5 s simulation period. The errors in s,ṡ, p p , p 1 , andṡ fluctuate in the confidence interval. As indicated earlier, s,ṡ, and p p are measured in this example. The errors in the parameters C v a , k p , and k 0 are also in the CI, as can be seen in the corresponding plots. The key to the parameter estimation is that the estimated system states should be in the 95% CI during the working cycle.

Conclusions
This work proposes the estimation of the parameters of a system by combining parameter estimation theories and curve-fitting methods. The ADEKF algorithm is introduced in the framework of a B-spline curve-fitting method. Using the proposed algorithm, the parameters can be defined as a vector containing a set of data control points. This algorithm is applied on a hydraulically driven four-bar mechanism to estimate the characteristic curves of a directional control valve. The double-step semi-recursive formulation and lumped fluid theories are used to model the four-bar mechanism and the hydraulic system, respectively. The measurements taken from the real system include the actuator position, pump pressure, and piston side pressure. The semi-empiric flow rate coefficient vector C v a is defined with three to six data control points in order to define the characteristic curve of the directional control valve.
The unknown non-linear nature of the characteristic curves of the directional control valve are precisely estimated. The maximum RMSE observed in the estimation of the characteristic curves is 0.08%. This implies that the characteristic curves are accurately estimated. The data control points in the parameter vector C v a converge in the range of 0 < t ≤ 0.3 s in these estimation cases. To account for the system's response, the estimation of the system's state vector variables should be located in the 95% confidence interval. By using the estimated characteristic curves, important information about the discharge coefficient, pressure losses, and flow characteristics of the directional control valve can be interpreted. With this valuable information, manufacturers and users can monitor the condition of a system and make decisions about the repair and maintenance of hydraulically driven systems.
Applying the parameter estimation algorithm in the real world by using a multibodybased estimation model can enable the estimation of important parameters. This can be challenging, as the estimation model might not be as accurate as the real world necessitates. However, despite implementation challenges, the application of this parameter estimation algorithm will provide an interesting area for manufacturers and researchers. Manufacturers can use these parameters in condition monitoring, repair and maintenance, and the anticipation of product life cycles. With a product's application history, important design changes can be introduced in future designs of the product. This will ultimately lead to more efficient MBS-based digital-twin applications through the use of real-time simulations and more sustainable future products.

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

Appendix A. The Estimation of the Curve Using Second-Order (Linear) B-Spline Interpolation
When using second-order (linear) B-spline interpolation, the characteristic curves of the directional control valve are not continuous, as shown in the Figure A1. Therefore, to demonstrate the real-world application, it is recommended to use the third-order B-spline or above.

Appendix B. Estimation of the Pressure Flow Coefficient and the Flow Gain
The estimation of the pressure flow coefficient k p and the flow gain k 0 in the case example is represented below.

Appendix B. Estimation of the Pressure Flow Coefficient and the Flow Gain
The estimation of the pressure flow coefficient k p and the flow gain k 0 in the case example is represented below.