Next Article in Journal
Using a Deep Neural Network with Small Datasets to Predict the Initial Production of Tight Oil Horizontal Wells
Next Article in Special Issue
A Method for Visualization of Images by Photon-Counting Imaging Only Object Locations under Photon-Starved Conditions
Previous Article in Journal
Integrated Algorithm Based on Bidirectional Characteristics and Feature Selection for Fire Image Classification
Previous Article in Special Issue
Stable and Efficient Reinforcement Learning Method for Avoidance Driving of Unmanned Vehicles
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of an Output Filtering Method for an Unstable Wheel-Driven Pendulum System Parameter Identification

Department of Aeronautics and Astronautics, National Cheng Kung University, Tainan 701, Taiwan
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(22), 4569; https://doi.org/10.3390/electronics12224569
Submission received: 25 September 2023 / Revised: 2 November 2023 / Accepted: 5 November 2023 / Published: 8 November 2023

Abstract

:
This research aims to apply an output filtering method to conduct the system parameter identification of an unstable wheel-driven pendulum system. First, the nonlinear dynamic model of the system is established by utilizing the Lagrangian dynamic theorem. Next, the Least-Square (LS) is introduced for system parameter identification formulation. Nevertheless, considering the real scenario, the wheel displacement is acquired from encoders subject to quantization errors. The pitch angle of the pendulum cart is also accompanied by Gaussian noise. Therefore, using numerical differentiation for angular acceleration in the LS estimations directly would induce incorrect state information seriously. To address this practical issue, an output filtering method is considered. The developed parameter identification algorithm could attenuate the influence of the quantization effect as well as noisy data and thus obtain much more accurate parameter identification results. Comparative simulation reveals that the output filtering method has a superior parameter estimation performance than the direct numerical difference method.

1. Introduction

System parameter identification (SPI) uses the input and output histories to establish to describe its dynamic behavior [1,2,3,4]. Several data-driven identification methods for a nonlinear mechanical system can be found in [5,6]. The reason why SPI is important is that system parameters coupling with states would have a great effect on the system’s dynamic response. Namely, those parameters represent the system’s features. If those parameters can be identified accurately, it is without a doubt that the procedure of designing a control law will become more time-saving, efficient, and robust.
Nevertheless, without an accurate dynamic model, all attempts at parameter identification and rule-based controller designs are inefficient or even futile. Thus, establishing an accurate system model becomes the primary step. In the past decade, significant progress has been made in the research on self-stabilizing two-wheeled robots. Various models and controllers have been employed to interpret and control the dynamics of two-wheeled robots. Further research on the dynamic modeling of two-wheeled robots is also reviewed in [7]. There are several ways to derive the wheel-driven pendulum’s dynamics equation, such as the Newton methods [8] and the Lagrangian dynamic theorem [9]. Among different approaches, this paper adopts the Lagrangian dynamic theorem owing to its systematic formulation procedures. Moreover, due to the unstable nature of an inverted pendulum, a simple PID controller must be applied firstly to stabilize the system’s attitude when conducting the SPI processes.
Secondly, based on the derived model, it can be found that the SPI can be formulated as a standard LS solution. The LS method is widely applied in parameter identifications [10,11]. According to the LS, an over-determined normal equation Y ( t ) = Φ ( t ) X is formulated, where the output vector Y ( t ) and the observation matrix Φ ( t ) are the key measurements to determine the parameter vector X accurately. To fulfill the observation matrix Φ ( t ) , some states need to be estimated through numerical differentiation [12,13]. Nonetheless, from the practical realization point of view, the wheel angle data measured from encoders are subjected to quantization effect. Meanwhile, the measured pitch angle and angular velocity from an orientation sensor, such as the inertial measurement unit (IMU), would accompanied by inevitable Gaussian noise. As pointed out in [14], the measurement noise will be amplified if Y ( t ) and Φ ( t ) contain serious noise, which further gives rise to a negative influence on parameter identification.
To address the potential issue discussed above, the filter regression model is applied to the identification methodology for robot manipulators and industrial robots, eliminating the need for either the measurement or off-line calculation of the linear and angular accelerations [15,16,17,18,19]. Inspired by the works [20,21], an output filtering method is considered to tackle this problem and is applied to the unstable wheel-driven pendulum system. The advantage of the presented method is that the observation matrix of the filtering method does not contain the raw noise corrupted measurements, the filtered ones are adopted instead. Moreover, there is no need to involve the acceleration information, which is not directly available from sensors. Refer to the associated studies [22,23]; they present an energy-based regression model that only involves position and velocity. This approach avoids using numerical differentiation for acceleration estimations and applies integration on the joint/motor velocities. However, there is no extra degree of freedom to adjust the pure integration, which can be taken as a special case of a low-pass filter. Therefore, the command trajectories should be properly designed. Recent research [24] has emphasized the significance of coarse encoder quantization errors in angular measurements, which introduce noise affecting the estimation of velocity and acceleration. Consequently, the article addresses this issue by applying the filter-based method. Notably, in comparison to the differentiation-based method found in the existing literature, the filter-based primary feature is its avoidance of direct differentiation for velocity information acquisition. Moreover, the filter-based approach offers a more efficient approach to mitigate the influence of quantization noise. Experimental results presented in [24] affirm that filter-based SPI surpasses differentiation-based SPI in terms of parameter estimation accuracy. However, a simple stable motor system was presented [24]. To exploration the potential capability of the filter-based method, this work applied it to highly nonlinear unstable wheel-driven pendulum system.
Note that the selection of a filtering operator is highly important. A great integral operator should preserve the system’s dominant frequencies and filter out the unwanted noises. Otherwise, the integral operator might distort the dominant frequencies or could not remove the redundant noises. In summary, the importance of SPI mainly includes two parts: first, SPI allows control engineers to develop a robust control law more easily; second, dynamics modeling together with SPI can be used as a digital twin to monitor the system behavior online [25].
The main contributions of the paper are summarized as follows: (1) extending the filter-based SPI to a nonlinear unstable wheel-driven pendulum system; (2) presenting an output filtering method which can suppress the Gaussian noise and quantization noise effects; (3) conducting a performance comparison study between the proposed output filtering method and the direct numerical differentiation method; and (4) demonstrating the use of aggressive command input citation can enhance the precision of the parameter estimations.

2. System Description

The description of the wheel-driven pendulum dynamics model can be found in [26]. Figure 1 shows the position of the system, where θ w and θ p are the wheel’s rotational angle, and the inclined angle of the body, respectively. M represents the mass of the body and m denotes the mass of the wheels. J w and J p are the moment of inertia with respect to the wheel’s axles of the wheel and the body, respectively. R is the wheel radius. W and L are the distance between two wheels and the distance between the wheel and the center of mass, respectively. The positions of the left and right wheels, and the center of mass are represented by the coordinates ( x i , y i , z i ) , where i corresponds to l ,   r , or b .

2.1. Modeling of a Wheel-Driven Pendulum Cart

According to the Lagrangian dynamics, it is composed of the kinetic energy T and the potential energy U , which can be described as L = T U , in which
L = m R 2 θ ˙ w 2 + 1 2 M R 2 θ ˙ w 2 + M R θ ˙ w θ ˙ p L cos ( θ p ) + 1 2 M θ ˙ p 2 L 2 + J w θ ˙ w 2 + 1 2 J b θ ˙ p 2 + ε 2 J m θ ˙ w 2 2 ε 2 J m θ ˙ w θ ˙ p + ε 2 J m θ ˙ p 2 M g R M g L cos θ p
Based on the definition of the Lagrangian dynamics, one has
d d t ( L θ ˙ q ) L θ q = F q
where q denotes the general coordinate, and F q represents the general force with respect to the general coordinate. Hence, the dynamics equation of a wheel-driven pendulum cart can be written as
F θ w = ( ( 2 m + M ) R 2 + 2 J W + 2 ε 2 J m ) θ ¨ w + ( M L R cos ( θ p ) 2 ε 2 J m ) θ ¨ p M L R θ ˙ p 2 sin ( θ p )
and
F θ p = ( M L R cos ( θ p ) 2 ε 2 J m ) θ ¨ w + ( M L 2 + J b + 2 ε 2 J m ) θ ¨ p M g L sin ( θ p )
where F θ w , F θ p denotes the generalized force with respect to the general coordinate [ θ w θ p ] , respectively.

2.2. Model Description of a Motor

The governing equations of the electrical driving circuit and the motor mechanism can be expressed by
L d i d t + i R m + K e w = V i n
and
J m d w d t = K t i B m w T L
respectively, in Equation (5), L is the inductance, R m is the resistance, K e is the back emf constant, V i n is the applied voltage, i is the armature current, and w is the motor’s angular velocity which is equivalent to the wheel’s angular velocity θ ˙ w . Moreover, in (6), J m is the motor’s moment of inertia, K t is the torque constant, B m is the viscous coefficient, and T L represents the external load.
According to the property that electric power is equivalent to mechanical power, it follows that ( K e w ) i = ( K t i ) w . Therefore, one has K e = K t : = K . Since the mechanical dynamics of a wheel-driven pendulum cart are much slower than electrical dynamics, (5) reduces to
V i n i R m + K w
Based on (4)–(7), the actuator dynamics can be simplified by
J m d w d t = K R m V i n ( K 2 R m + B m ) w T L
The external loads are mainly caused by the friction between the cart’s body and wheels, and also between the wheels and the ground. Moreover, the influence of the motor’s viscosity can be neglected. Thus, T L can be modeled by
T L = f m ( θ ˙ p θ ˙ w )
Substituting (9) into (8) yields
J m d w d t = F θ w
in which
F θ w = α V i n 2 ( β + f w ) θ ˙ w + 2 β θ ˙ p
and the equivalent coefficients α and β are
α = 2 ε K t R m , β = ε K t K b R m + f m
Furthermore, because of the inverted pendulum’s physical behavior, it is obvious that F θ w = F θ p . Therefore, one has
F θ p = α V i n + 2 ( β + f w ) θ ˙ w 2 β θ ˙ p

2.3. Integrate the Model of a Pendulum Cart and Motors

Based on (4), (11) and (13), the complete dynamics equations of the wheel-driven pendulum cart can be represented by
α V i n = 2 ( β + f w ) θ ˙ w 2 β θ ˙ p M L R θ ˙ p 2 sin ( θ p ) + ( ( 2 m + M ) R 2 + 2 J W + 2 ε 2 J m ) θ ¨ w     + ( M L R cos ( θ p ) 2 ε 2 J m ) θ ¨ p
and
α V i n = 2 ( β + f w ) θ ˙ w 2 β θ ˙ p ( M L 2 + J b + 2 ε 2 J m ) θ ¨ p + M g L sin ( θ p )     ( M L R cos ( θ p ) 2 ε 2 J m ) θ ¨ w
Apparently, the dynamics of the wheel-driven pendulum are highly nonlinear and unstable. In order to estimate the parameters, the equivalent parameter representation should be further considered. Moreover, since the system is unstable, a stabilizing control law must be applied for the collection of input/output excitation signals.

3. System Parameter Identification

3.1. Least-Square Algorithm

The LS algorithm has been widely used to identify a system’s parameters since this approach enables the provision of a globally optimal solution to minimize the residual error. As a result, the LS algorithm plays an important role in this paper to perform the system parameter identification.
Consider the regression model as y ( t ) = φ ( t ) X , in which y ( t ) p is the output of the regression model, φ ( t ) p × n is the regressor, and X = [ X 1 X n ] T n is the unknown parameter vector to be identified.
Based on a sufficiently long period of observation for t = T ,   2 T ,   ,   N T , where T is the sampling interval, it gives the following over-determined equation Y = Φ X , where
Y = [ y ( T ) y ( 2 T ) y ( N T ) ] m × 1 ,   Φ = [ φ ( T ) φ ( 2 T ) φ ( N T ) ] m × n
and m = p N > n . The LS algorithm aims to determine the estimated parameter X ^ = [ X ^ 1 X ^ n ] T n to minimize the residual error E , which equals to min X ^ E 2 Y Φ X 2 . For the residual error E , the optimal solution is
X ^ = ( Φ T Φ ) 1 Φ T Y Φ Y
in which Φ = ( Φ T Φ ) 1 Φ T is the pseudo-inverse of the observation matrix Φ , and the matrix Φ T Φ must be invertible. Moreover, it is worth to note that the identified parameters X ^ will deviate from their references significantly if obvious noise appears in (16).

3.2. Regression Model of a Wheel-Driven Pendulum System

To facilitate the system identification, according to (14) and (15), define X = [ X 1 , X 2 , X 3 , X 4 , X 5 , X 6 , X 7 ] T as follows,
X 1 = ( 2 m + M ) R 2 + 2 J w α ,   X 2 = 2 ε J m α ,   X 3 = M L R α , X 4 = M L 2 + J b α ,   X 5 = M g L α ,   X 6 = 2 ( β + f w ) α ,   X 7 = 2 β α
Based on the equivalent parameter representation (18), Equations (14) and (15) become
V i n = ( X 1 + X 2 ) θ ¨ w + ( X 3 cos ( θ p ) X 2 ) θ ¨ p X 3 θ ˙ p 2 sin ( θ p ) + X 6 θ ˙ w X 7 θ ˙ p
and
V i n = ( X 3 cos ( θ p ) X 2 ) θ ¨ w ( X 4 + X 2 ) θ ¨ p X 5 sin ( θ p ) + X 6 θ ˙ w X 7 θ ˙ p
respectively. Next, to apply the LS algorithm, it is necessary to express the unknown system parameters in terms of a linear regression form
τ ( t ) = φ ( t ) X
in which τ ( t ) = [ V i n ( t ) , V i n ( t ) ] T and
φ ( t ) = [ θ ¨ w θ ¨ w θ ¨ p φ 13 0 0 θ ˙ w θ ˙ p 0 θ ¨ w θ ¨ p φ 23 θ ¨ p φ 25 θ ˙ w θ ˙ p ]
where
φ 13 = cos ( θ p ) θ ¨ p sin ( θ p ) θ ˙ p 2 , φ 23 = cos ( θ p ) θ ¨ w , φ 25 = sin ( θ p )
Given the sampled data for t = T ,   2 T ,   ,   N T , the LS equation can be constructed by Y = Φ X , where
Y = [ τ ( T ) τ ( 2 T ) τ ( N T ) ] 2 N × 1 ,   Φ = [ φ ( T ) φ ( 2 T ) φ ( N T ) ] 2 N × 7
Theoretically, the optimal parameters can be obtained by applying the LS solution X ^ = Φ Y to minimize the residual error.
However, an examination of the observation matrix Φ reveals that it involves not only the wheel rotation angle and the cart’s pitch angle and angular velocity but also the wheel’s angular velocity, acceleration, and the cart’s pitch angular acceleration. From a practical realization scenario, the wheel rotation angle can be directly measured through an encoder. Nevertheless, the angle measurement is subject to the quantization effect. Simultaneously, the pitch angle and the pitch angular velocity are also measurable by an IMU but are prone to measurement noise. Additionally, the regression matrix (22) includes unmeasurable variables such as the cart’s pitch angular acceleration, wheel angular velocity, and wheel angular acceleration, which must be obtained through numerical differencing. It is well known that the numerical differencing method can significantly amplify the noise. This amplification of measurement noise leads to the problem formulation of the ideal LS from Y = Φ X to Y + Δ Y = ( Φ + Δ Φ ) X , which causes parameter identification bias even using the optimal solution X ^ = Φ Y . In other words, the reduction in Δ Y and Δ Φ would effectively contribute to the improvement of parameter identification accuracy. This issue is going to be addressed by applying a filtering based regression model, introduced in the following section.

3.3. Filtering-Based Regression Model

It is well known that the measurement encoder quantization effect as well as the Gaussian noise may be amplified by taking the numerical differentiation. To avoid this potential weakness, the filtering-based regression model is considered. In other words, (21) should be rewritten as
τ ( t ) = [ d 2 d t 2 φ 2 ( t ) + d d t φ 1 ( t ) + φ 0 ( t ) ] X
in which
φ 2 ( t ) = [ θ w θ w θ p 0 0 0 0 0 0 θ w θ p 0 θ p 0 0 0 ] , φ 1 ( t ) = [ 0 0 cos ( θ p ) θ ˙ p 0 0 θ w θ p 0 0 cos ( θ p ) θ ˙ w 0 0 θ w θ p ] , φ 0 ( t ) = [ 0 0 0 0 0 0 0 0 0 sin ( θ p ) θ ˙ p θ ˙ w 0 sin ( θ p ) 0 0 ]
Taking the Laplace transform of (25) yields
τ ( s ) = φ ( s ) X
in which s represents the Laplace operator; τ ( s ) and φ ( s ) are defined as
τ ( s ) = { τ ( t ) } , φ ( s ) = φ a ( s ) + φ b ( s ) + φ c ( s )
and
φ a ( s ) = { φ ¨ 2 ( t ) } = s 2 φ 2 ( s ) s φ 2 ( 0 ) φ ˙ 2 ( 0 ) , φ b ( s ) = { φ ˙ 1 ( t ) } = s φ 1 ( s ) φ 1 ( 0 ) , φ c ( s ) = { φ 0 ( t ) } = φ 0 ( s )
Introduce a double filtering operator
I o ( s ) = 1 ( τ 1 s + 1 ) ( τ 2 s + 1 )
where the time constants τ 1 0 and τ 2 0 are to be determined. As highlighted in the recent work [21], the selection of the time constants is supposed to consider the excitation frequency of the input as well as the dynamic nature of the control system. An inadequate selection of the time constant may result in an obvious deviation of the identified parameters. Applying (30) to the Laplace transform (27) gives
τ 2 f ( s ) = φ 2 f ( s ) X
where
τ 2 f ( s ) = I o ( s ) τ ( s ) , φ 2 f ( s ) = φ 2 2 f ( s ) + φ 1 2 f ( s ) + φ 0 2 f ( s )
and
φ 2 2 f ( s ) = I o ( s ) ( s 2 φ 2 ( s ) s φ 2 ( 0 ) φ ˙ 2 ( 0 ) ) , φ 1 2 f ( s ) = I o ( s ) ( s φ 1 ( s ) φ 1 ( 0 ) ) , φ 0 2 f ( s ) = I o ( s ) φ 0 ( s )
To avoid the use of s 2 φ 2 ( s ) , reformulate φ 2 2 f ( s ) as follows
φ 2 2 f ( s ) = 1 τ 1 τ 2 1 ν 1 ( s 2 φ 2 ( s ) s φ 2 ( 0 ) φ ˙ 2 ( 0 ) ) = 1 τ 1 τ 2 φ 2 ( s ) + 1 τ 1 τ 2 ν 1 [ ν 2 φ 2 ( s ) ( s + 1 τ 1 ) φ 2 ( 0 ) ] + 1 τ 1 τ 2 ν 1 [ ( ν 2 1 τ 1 1 τ 1 τ 2 ) φ 2 ( s ) + 1 τ 1 φ 2 ( 0 ) φ ˙ 2 ( 0 ) ] = φ 2 ( s ) + Y 2 , 1 ( s ) + Y 2 , 2 ( s )
where
φ 2 ( s ) = 1 τ 1 τ 2 φ 2 ( s ) , Y 2 , 1 ( s ) = 1 τ 1 τ 2 τ 2 τ 2 s + 1 [ ν 2 φ 2 ( s ) φ 2 ( 0 ) ] , Y 2 , 2 ( s ) = 1 τ 1 τ 2 1 ν 1 [ 1 τ 1 2 φ 2 ( s ) + 1 τ 1 φ 2 ( 0 ) φ ˙ 2 ( 0 ) ]
and
ν 1 = ( s + 1 / τ 1 ) ( s + 1 / τ 2 ) , ν 2 = ( 1 / τ 1 + 1 / τ 2 )
In the same manner, removing s φ 1 ( s ) in φ 1 2 f ( s ) is followed by
φ 1 2 f ( s ) = 1 ( τ 1 s + 1 ) ( τ 2 s + 1 ) ( s φ 1 ( s ) φ 1 ( 0 ) )     = 1 τ 1 τ 2 τ 1 s + 1 ν 1 τ 1 φ 1 ( s ) + 1 τ 1 τ 2 1 ν 1 [ 1 τ 1 φ 1 ( s ) φ 1 ( 0 ) ]     = Y 1 , 1 ( s ) + Y 1 , 2 ( s )
where
Y 1 , 1 ( s ) = 1 τ 1 τ 2 τ 2 τ 2 s + 1 φ 1 ( s ) , Y 1 , 2 ( s ) = 1 τ 1 τ 2 1 ν 1 [ 1 τ 1 φ 1 ( s ) φ 1 ( 0 ) ]
Taking the inverse Laplace transformation of τ 2 f ( s ) = φ 2 f ( s ) X yields the filtering-based regression model as
τ 2 f ( t ) = φ 2 f ( t ) X
in which
τ 2 f ( t ) = 1 { τ 2 f ( s ) } , φ 2 f ( t ) = 1 { φ 2 f ( s ) }     = φ 2 2 f ( t ) + φ 1 2 f ( t ) + φ 0 2 f ( t )     = φ 2 ( t ) + Y 2 , 1 ( t ) + Y 2 , 2 ( t ) + Y 1 , 1 ( t ) + Y 1 , 2 ( t ) + φ 0 2 f ( t )
where φ 2 ( t ) = φ 2 ( t ) / τ 1 τ 2 . The filtering quantities τ 2 f ( t ) , Y 2 , 1 ( t ) , Y 2 , 2 ( t ) , Y 1 , 1 ( t ) , Y 1 , 2 ( t ) and φ 0 2 f ( t ) can be estimated by numerically integrating the following matrix differential equations:
τ ¨ 2 f ( t ) = ν 3 τ ˙ 2 f ( t ) 1 τ 1 τ 2 τ 2 f ( t ) + 1 τ 1 τ 2 τ ( t ) , Y ˙ 2 , 1 ( t ) = 1 τ 2 Y 2 , 1 ( t ) ν 2 τ 1 τ 2 φ 2 ( t ) , Y ¨ 2 , 2 ( t ) = ν 3 Y ˙ 2 , 2 ( t ) 1 τ 1 τ 2 Y 2 , 2 ( t ) + 1 τ 1 τ 2 τ 1 2 φ 2 ( t ) , Y ˙ 1 , 1 ( t ) = 1 τ 2 Y 1 , 1 ( t ) + 1 τ 1 τ 2 φ 1 ( t ) , Y ¨ 1 , 2 ( t ) = ν 3 Y ˙ 1 , 2 ( t ) 1 τ 1 τ 2 Y 1 , 2 ( t ) 1 τ 1 τ 2 τ 1 φ 1 ( t ) , φ ¨ 0 2 f ( t ) = ν 3 φ ˙ 0 2 f ( t ) 1 τ 1 τ 2 φ 0 2 f ( t ) + 1 τ 1 τ 2 φ 0 ( t )
Among (41), ν 3 = 1 / τ 1 + 1 / τ 2 and the initial conditions are
τ 2 f ( 0 ) = τ ˙ 2 f ( 0 ) = 0 ,   Y 2 , 1 ( 0 ) = 1 τ 1 τ 2 φ 2 ( 0 ) , Y 2 , 2 ( 0 ) = 0 , Y ˙ 2 , 2 ( 0 ) = 1 τ 1 τ 2 ( 1 τ 1 φ 2 ( 0 ) φ ˙ 2 ( 0 ) ) , Y 1 , 1 ( 0 ) = 0 , Y 1 , 2 ( 0 ) = 0 , Y ˙ 1 , 2 ( 0 ) = 1 τ 1 τ 2 φ 1 ( 0 ) , φ 0 2 f ( 0 ) = φ ˙ 0 2 f ( 0 ) = 0
Similar to (16) and (24), and considering the regression model (39), the LS equation can now be modified by the filtered normal equation Y 2 f = Φ 2 f X , where
Y 2 f = [ τ 2 f ( T ) τ 2 f ( 2 T ) τ 2 f ( N T ) ] 2 N × 1 ,   Φ 2 f = [ φ 2 f ( T ) φ 2 f ( 2 T ) φ 2 f ( N T ) ] 2 N × 7
Hence, the least-square solution to minimize the residual error is given by X ^ = Φ 2 f Y 2 f , where Φ 2 f is the pseudo-inverse of the filtering operator-based observation matrix. Compared to the original LS method, the proposed filtering method only contains the output measurable position and filtered velocity measurements. In short, the filtering method avoids the direct use of noisy acceleration measurements through numerical differentiation estimation and thereby provides a more accurate parameter estimation.
Further, owing to the introduction of the filtering factors τ 1 and τ 2 , the regression model can suppress the influence of initial condition and the measurement quantization and Gaussian errors. A guidance of the selection of the filtering factors, which plays a significant role in enhancing the accuracy of parameter identification results, has been addressed and proven in [21].
Regarding the realization of the filtering method presented in this section, firstly, the output filtering method is built upon the output filtering-based regression model (39) and involves arranging the time histories to formulate the least squares equation for optimal parameter estimation. The computational process of the entire method is not overly complex. The filtering quantities at each time point, t = T ,   2 T ,   ,   N T , as indicated in (39), can be estimated through numerical integration of the matrix differential equation provided in (41). We have transformed (41) under the assumption of zero-order hold to a discrete equation for numerical iteration. Further details regarding the numerical integration can be found in the Appendix A of reference [24]. Moreover, for the computation of the optimal solution using the least-squares method, a significant amount of memory may be required to allocate measurement matrices Φ 2 f . Considering the constraints of memory in embedded systems, it is not feasible to store all time data within the microprocessor. Therefore, to achieve real-time parameter identification, an iterative approach is necessary for the solution of the least squares method. The relevant methodology can be found in reference [21].

4. Numerical Simulation of the Filtering Method

The following simulation is performed in MATLAB/Simulink with the solver Runge-Kutta 4, where the time-step T = 0.001 s is applied. Since the wheel-driven pendulum cart is unstable, to meet the real situation when conducting SPI, a simple proportional–integral–derivative (PID) controller is implemented based on the linearized model applied to stabilize the cart’s attitude. The control gains are adjusted as follows: the proportional (P) gain, the integral (I) gain and the derivative (D) gain are set to be −168, −800, and −8.8, respectively. Note that the negative sign of the PID gains is from the definition of the tracking error.
The exact parameters are listed as follows: m = 4.6   kg , L = 1.8   m , M = 110   kg , R = 0.2413   m , ε = 14 , f m = 0.3 , K b = 0.722   Vs / rad , K t = 0.833   Nm / A , R m = 0.141   Ω , J w = 0.1339   kg m 2 , and J b = 87.89   kg m 2 . The nominal parameters which are used for the PID control design are set to be around 90 % of the exact parameters. The corresponding reference equivalent parameters are displayed in Table 1.
In regard to wheel encoder quantization, the resolution 60,000 counts per revolution is made. Thus, the resulting measurement quantization error is 2 π / 60,000   rad / count . On the other hand, the standard deviation of the noise for pitch angle and its angular velocity are 0.5 degrees and 0.5 degrees/s, respectively.
The following are the comparison of simulation results between the true parameters and the identified parameters under the condition: time constants τ 1 = 2.25 and τ 2 = 6.5 , the initial conditions [ θ w = 0 θ p = 0 θ ˙ w = 0 θ ˙ p = 0 ] are applied for all the following simulations.
Table 1 summarizes the performance comparison of the SPI between the direct numerical differentiation method and the proposed output filtering method. The results clearly illustrate that the proposed SPI method is able to provide a better accuracy as expected.
Moreover, as analyzed in [21], different excitation of the input commands has a significant impact on the observation matrix Φ 2 f 1 Φ 2 f . The simpler the command is, the more likely that the condition number of Φ 2 f 1 Φ 2 f would become bigger. In other words, Φ 2 f 1 Φ 2 f is likely to be ill-conditioned. On the contrary, the more active the input command is, the more probable that the matrix Φ 2 f 1 Φ 2 f is well-conditioned. Therefore, in this paper, a simple as well as an aggressive command are applied. To note, the simple command input is a sinewave while the aggressive command is the combination of several sine and cosine waves with different frequencies and amplitude. To put it clearly, the simple command is designed as R s i m p l e ( t ) = 20 sin ( t ) , and the aggressive command is designed as R a g g r e s s i v e ( t ) = 3 sin ( 7 t ) + 6 ( cos ( 4 t ) sin ( t ) ) + 10 cos ( 3 t ) sin 2 ( 5 t ) .
For the system identification of unstable systems, it is it is essential to begin by designing a controller and performing preliminary parameter tuning to ensure the stability of the closed-loop system. However, overly simplistic reference commands may not fully excite all aspects of the system’s behavior. By employing an aggressive command as a reference command to excite the system’s response, the controlled loop generates a control input signal to achieve the desired dynamic response of the system as close as possible. Subsequently, system parameter identification is conducted utilizing the closed-loop control input signal and historical data of system outputs. Figure 2 illustrates the input signals used for closed-loop parameter identification under aggressive command excitation, while Figure 3 displays the corresponding system output responses. Apparently, due to the imperfection of the sensors, the input/output signals are contaminated by measurement noise. Therefore, the filter-based method becomes very important for noise suppression during the SPI, which has been highlighted in Table 1.
According to Table 2, it is obvious that the parameters identified through the aggressive command are more accurate than the simple command. The results verify the assumption as mentioned before. In other words, an active command can excite wheel-driven pendulum cart’s dynamic response more obviously than just a simple command. Note that the selection of the filter time constants should not filter out the original system’s dynamic response, but should be able to suppress the measurement noise.
Based on the identified parameters, Figure 4 demonstrate the association output predictions. The red line represents the exact output response from true parameters. As for the blue and green line, the former stands for the prediction of parameters identified through simple command, while the latter is the prediction of parameters identified through aggressive command. One can observe that, from Figure 5, the RMSE (Root Mean Square Error) of the output prediction based on applying the identified parameters is very small. According to the simulation results, the RMSE for wheel angle output prediction is 0.3260 for the aggressive command and 0.2423 for the simple command, respectively. Besides, the RMSE for pitch angle output prediction is 6.8181e-04 for the aggressive command and 0.0016 for the simple command. Also, the RMSE for wheel angular rate output prediction is 0.1585 for the aggressive command and 0.1267 for the simple command. Lastly, the RMSE for pitch angular rate output prediction is 0.0064 for the aggressive command and 0.0201 for the simple command.
It is evident that states related to pitch, including pitch angle and pitch angular rate, exhibit lower output prediction errors when excited through an aggressive command compared to those excited by a simple command. In contrast, states associated with the wheel, although not showing significantly lower output prediction errors when excited through an aggressive command than when excited through a simple command, display very similar errors between the two cases.
This phenomenon can be attributed to the fact that the response of parameters identified through an aggressive command is superior to that of parameters identified through a simple command. The rationale behind this lies in the active command input’s capability to reduce the condition number of the observation matrix for the wheel-driven pendulum system. This reduction prevents the system from becoming ill-conditioned and thereby enhances the accuracy of parameter identification.
In the context of closed-loop system identification, the performance of system identification can be evaluated not only through the prediction of output responses but also by calculating the corresponding control inputs using the controller, thereby enabling control input predictions. Based on the results of closed-loop system identification, Figure 6 presents predictions of control inputs, comparing these predictions with both the measured and exact control inputs.
In Figure 6, the gray line represents the control input signal of the actual system with output measurement noise, the red line corresponds to the exact control input signal, while the green and blue lines represent the predicted control inputs obtained through the excitation of an simple command and an aggressive command, respectively. It is evident from the graph that the accuracy of control input prediction is influenced by the accuracy of pitch angle prediction, as control inputs are derived from the error between the reference command and the pitch angle. Consequently, the predictions generated through aggressive command excitation exhibit higher accuracy compared to those obtained through simple command excitation when compared to the exact control inputs.
When applying an output filtering method, it is necessary to perform numerical integration for specific system states as shown in (41), where the associated initial values for the integration is provided by (42). Consequently, any uncertainty in the initial value leading to bias results in the accumulation of errors in the system state over time, affecting the accuracy of the system state integration solution and, consequently, reducing the precision of parameter identification. Based on (42), it is evident that increasing the values of the filter parameters τ 1 and τ 2 can mitigate the impact of initial value uncertainty on numerical integration. To validate this statement, extra simulations are conducted to evaluate the accuracy of parameter identification under different cases. In order to clearly point out how the selection of the parameters τ 1 and τ 2 can affect the precision of the SPI, the following numerical cases are applied in the absence of output measurement noise. The results are summarized in Table 3.
In this simulation comparison study, the controller parameters and initial system settings remain consistent with the previous simulations. As mentioned previously, the maximum system frequency of unstable systems is typically challenging to estimate beforehand. Therefore, the easiest way for the design of the filter parameters ( τ 1 , τ 2 ) is based on the system’s reference commands, see [10,11,18]. In Case A, serving as the ground truth, there is no initial value bias. Considering a cutoff frequency of the output filter that is 10 times the maximum reference command frequency, the filter parameters are designed with τ 1 = τ 2 = 0.014 . In Case B, using the same filter parameters, the initial value uncertainty introduced by the IMU-based estimation of pitch angle is accounted for. Here, the initial value of the pitch angle bias is set to be with positive 0.5 degrees. Furthermore, to mitigate the effects of initial value uncertainty and assess the impact of increased filter parameters, we further conduct Case C, where filter parameters are adjusted to τ 1 = τ 2 = 0.14 . To further discuss an inadequate selection of the parameters degrade the SPI precision, the Case D, where filter parameters are increased to τ 1 = τ 2 = 4.2 , is demonstrated while keeping the same level of initial value uncertainty bias.
From Table 3, it can be observed that, as the ground truth in Case A, since there is no noise interference or initial value uncertainty, the filter-based SPI results in very low parameter estimation errors. However, under the influence of initial value bias in Case B, the accuracy of parameter identification is indeed affected, with some parameter estimation errors reaching up to 95%. To address the SPI error caused by initial value uncertainty, as shown in Case C, appropriately increasing the filter parameter values can effectively mitigate the impact of initial value uncertainty and reduce parameter estimation errors. Nevertheless, it should be emphasized that the filter parameter values cannot be infinitely increased, as previously discussed in the article. The concept of output filtering is based on the removal of noise from output data, and the physical significance of filter parameters is the cutoff frequency of the filter. Therefore, excessive increases in filter parameters may suppress the system’s dominant frequency response, making the original system behavior unobservable, which in turn decreases the accuracy of parameter estimation, as demonstrated in Case D.
In summary, when using the output filtering methods, the selection of the filter parameters carries significant implications. For unstable systems, under the condition of meeting basic tracking requirements, filter parameter design can be based on the maximum frequency of reference commands in the closed-loop control. The adjustment of filter parameters should not solely focus on noise removal, but should also consider the suppression of uncertainties in system initial value measurements.
Based on the above simulations, we can firmly conclude that the use of filtering-based system parameter identification can be applied to the nonlinear and unstable wheel-driven pendulum system successfully; the second-order output filtering method does not require the use of noisy acceleration signals, thus enabling more accurate parameter estimation; the filtering method is able to suppress the effects of Gaussian noise and quantization noise effectively; incorporation of aggressive command input can enhance the precision of parameter estimation.
Remark 1. 
In the process of system identification, unstable systems may lead to adverse experimental outcomes or even pose safety hazards. Therefore, utilizing closed-loop system identification not only ensures the stability during the SPI but also effectively estimates the parameters of unstable systems, subsequently reducing system uncertainties in later stages of control design. Furthermore, employing unstable systems for closed-loop model estimation as an application of digital twins holds significant value. Given the unique physical characteristics of unstable systems, arbitrary adjustments to system controller parameters may result in system divergence, or even more severe consequences such as system damage. Leveraging the concept of a digital twin, designers can perform preliminary assessments of physical systems within a virtual model and proceed with controller design. Through simulations, they can evaluate the expected performance of the controller, thus verifying the feasibility and effectiveness of the controller design. Ultimately, these designs can be applied to real-world systems, ensuring a safer and more reliable development of controllers prior to implementation and optimization.

5. Conclusions

This paper introduces an output filtering method to identify the system parameters of a nonlinear unstable wheel-driven pendulum cart. The detailed equations of motions and the associated measurement equations for the parameter identification are derived. Considering the real scenario, the measurement quantization as well as the Gaussian noises, which have a considerable impact on parameter estimations, are both taken into account. According to the presented filtering method, it cannot only suppress noisy acceleration, but preserve the dominant frequencies of the system’s response as well. Simulations firmly demonstrate that the presented output filtering method is superior to the direct numerical differentiation method. Furthermore, to excite the special dynamic response of the pendulum cart, a simple command and an aggressive command are applied to the system, respectively. Associated results show that the more active the reference command is, the more accurate the estimation results could be. In conclusion, precise system parameters can be obtained by applying the presented output filtering algorithm even in the presence of the measurement quantization effect as well as the measurement noise. Simulations are carried out to verify the feasibility of the purposed method.

Author Contributions

Conceptualization, C.-C.P. and M.-C.T.; methodology, C.-C.P. and N.-J.C.; software, M.-C.T. and N.-J.C.; validation, C.-C.P., N.-J.C. and M.-C.T.; formal analysis, C.-C.P.; investigation, M.-C.T. and N.-J.C.; resources, C.-C.P.; writing—original draft preparation, N.-J.C.; writing—review and editing, C.-C.P. and M.-C.T.; visualization, N.-J.C. and M.-C.T.; supervision, C.-C.P.; project administration, C.-C.P.; funding acquisition, C.-C.P. All authors have read and agreed to the published version of the manuscript.

Funding

The work is supported by the Ministry of Science and Technology under the grant number: MOST 111-2221-E-006-170.

Data Availability Statement

The data that used in this study are available from the corresponding author, upon reasonable request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Juang, J.-N.; Pappa, R.S. An eigensystem realization algorithm for modal parameter identification and model reduction. J. Guid. Control Dyn. 1985, 8, 620–627. [Google Scholar] [CrossRef]
  2. Juang, J.-N. Applied System Identification; Prentice-Hall, Inc.: Hoboken, NJ, USA, 1994. [Google Scholar]
  3. Juang, J.-N. Continuous-time bilinear system identification. Nonlinear Dyn. 2005, 39, 79–94. [Google Scholar] [CrossRef]
  4. Juang, J.-N.; Phan, M.Q. Identification and Control of Mechanical Systems; Cambridge University Press: Cambridge, UK, 2001. [Google Scholar]
  5. Jin, H.; Liu, Z.; Zhang, H.; Liu, Y.; Zhao, J. A dynamic parameter identification method for flexible joints based on adaptive control. IEEE/ASME Trans. Mechatron. 2018, 23, 2896–2908. [Google Scholar] [CrossRef]
  6. Vicente, B.A.H.; James, S.S.; Anderson, S.R. Linear System Identification Versus Physical Modeling of Lateral–Longitudinal Vehicle Dynamics. IEEE Trans. Control Syst. Technol. 2021, 29, 1380–1387. [Google Scholar] [CrossRef]
  7. Chan, R.P.M.; Stol, K.A.; Halkyard, C.R. Review of modelling and control of two-wheeled robots. Annu. Rev. Control 2013, 37, 89–103. [Google Scholar] [CrossRef]
  8. Grasser, F.; D’arrigo, A.; Colombi, S.; Rufer, A.C. JOE: A mobile, inverted pendulum. IEEE Trans. Ind. Electron. 2002, 49, 107–114. [Google Scholar] [CrossRef]
  9. Kim, H.; Jung, S. Control of a two-wheel robotic vehicle for personal transportation. Robotica 2016, 34, 1186–1208. [Google Scholar] [CrossRef]
  10. Moreno-Valenzuela, J.; Miranda-Colorado, R.; Aguilar-Avelar, C. A matlab-based identification procedure applied to a two-degrees-of-freedom robot manipulator for engineering students. Int. J. Electr. Eng. Educ. 2017, 54, 319–340. [Google Scholar] [CrossRef]
  11. Lopez-Sanchez, I.; Montoya-Cháirez, J.; Pérez-Alcocer, R.; Moreno-Valenzuela, J. Experimental Parameter Identifications of a Quadrotor by Using an Optimized Trajectory. IEEE Access 2020, 8, 167355–167370. [Google Scholar] [CrossRef]
  12. Calanca, A.; Capisani, L.M.; Ferrara, A.; Magnani, L. MIMO Closed Loop Identification of an Industrial Robot. IEEE Trans. Control Syst. Technol. 2011, 19, 1214–1224. [Google Scholar] [CrossRef]
  13. Jin, J.; Gans, N. Parameter identification for industrial robots with a fast and robust trajectory design approach. Robot. Comput.-Integr. Manuf. 2015, 31, 21–29. [Google Scholar] [CrossRef]
  14. Peng, C.C.; Su, C.Y. Modeling and Parameter Identification of a Cooling Fan for Online Monitoring. IEEE Trans. Instrum. Meas. 2021, 70, 1–14. [Google Scholar] [CrossRef]
  15. Moreno-Valenzuela, J.; Aguilar-Avelar, C. Motion Control of Underactuated Mechanical Systems; Springer: Berlin/Heidelberg, Germany, 2018; Volume 1. [Google Scholar]
  16. Khalil, W.; Dombre, E. Modeling Identification and Control of Robots; CRC Press: Boca Raton, FL, USA, 2002. [Google Scholar]
  17. Miranda-Colorado, R.; Moreno-Valenzuela, J. Experimental parameter identification of flexible joint robot manipulators. Robotica 2018, 36, 313–332. [Google Scholar] [CrossRef]
  18. Chávez-Olivares, C.; Reyes-Cortés, F.; González-Galván, E.; Mendoza-Gutierrez, M.; Bonilla-Gutierrez, I. Experimental evaluation of parameter identification schemes on an anthropomorphic direct drive robot. Int. J. Adv. Robot. Syst. 2012, 9, 203. [Google Scholar] [CrossRef]
  19. Guangjun, L.; Iagnemma, K.; Dubowsky, S.; Morel, G. A base force/torque sensor approach to robot manipulator inertial parameter estimation. In Proceedings of the 1998 IEEE International Conference on Robotics and Automation (Cat. No.98CH36146), Leuven, Belgium, 20–20 May 1998. [Google Scholar]
  20. Guého, D.; Singla, P.; Majji, M.; Melton, R.G. Filtered Integral Formulation of the Sparse Model Identification Problem. J. Guid. Control Dyn. 2022, 45, 232–247. [Google Scholar] [CrossRef]
  21. Peng, C.-C.; Chen, T.-Y. A recursive low-pass filtering method for a commercial cooling fan tray parameter online estimation with measurement noise. Measurement 2022, 205, 112193. [Google Scholar] [CrossRef]
  22. Gautier, M.; Khalil, W.; Restrepo, P. Identification of the dynamic parameters of a closed loop robot. In Proceedings of the 1995 IEEE International Conference on Robotics and Automation, Nagoya, Japan, 21–27 May 1995. [Google Scholar]
  23. Gautier, M. Dynamic identification of robots with power model. In Proceedings of the International Conference on Robotics and Automation, Albuquerque, NM, USA, 25 April 1997. [Google Scholar]
  24. Li, Y.-R.; Peng, C.-C. Encoder position feedback based indirect integral method for motor parameter identification subject to asymmetric friction. Int. J. Non-Linear Mech. 2023, 152, 104386. [Google Scholar] [CrossRef]
  25. Peng, C.-C.; Chen, Y.-H. A Hybrid Neural Ordinary Differential Equation Based Digital Twin Modeling and Online Diagnosis for an Industrial Cooling Fan. Future Internet 2023, 15, 302. [Google Scholar] [CrossRef]
  26. Arvidsson, M.; Karlsson, J. Design, Construction and Verification of a Self-Balancing Vehicle. 2012. Available online: http://publications.lib.chalmers.se/records/fulltext/163640.pdf (accessed on 24 September 2023).
Figure 1. Cartesian coordinate of the wheel-driven cart schematic diagram, where red dot represents the center of mass of the cart.
Figure 1. Cartesian coordinate of the wheel-driven cart schematic diagram, where red dot represents the center of mass of the cart.
Electronics 12 04569 g001
Figure 2. Input data for system identification.
Figure 2. Input data for system identification.
Electronics 12 04569 g002
Figure 3. Output data for system identification. (a) Wheel angle. (b) Pitch angle. (c) Wheel angular speed. (d) Pitch angular speed.
Figure 3. Output data for system identification. (a) Wheel angle. (b) Pitch angle. (c) Wheel angular speed. (d) Pitch angular speed.
Electronics 12 04569 g003aElectronics 12 04569 g003b
Figure 4. Outputs response predictions of the closed-loop model for the wheel-driven pendulum system. (a) Wheel angle. (b) Pitch angle. (c) Wheel angular speed. (d) Pitch angular speed.
Figure 4. Outputs response predictions of the closed-loop model for the wheel-driven pendulum system. (a) Wheel angle. (b) Pitch angle. (c) Wheel angular speed. (d) Pitch angular speed.
Electronics 12 04569 g004aElectronics 12 04569 g004b
Figure 5. Outputs prediction errors of the closed-loop model. (a) Wheel angle. (b) Pitch angle. (c) Wheel angular speed. (d) Pitch angular speed.
Figure 5. Outputs prediction errors of the closed-loop model. (a) Wheel angle. (b) Pitch angle. (c) Wheel angular speed. (d) Pitch angular speed.
Electronics 12 04569 g005
Figure 6. Control input prediction for closed-loop system.
Figure 6. Control input prediction for closed-loop system.
Electronics 12 04569 g006
Table 1. Simple command based on differentiation versus filtering.
Table 1. Simple command based on differentiation versus filtering.
Reference Parameter.Differentiation-BasedFilter-Based
Est. Para.Error (%)Est. Para.Error (%)
X 1 = 0.0436 0.00462889.380.0292133.04
X 2 = 0.0178 -0.006094134.240.0307172.52
X 3 = 0.1149 -0.003984103.470.0670941.60
X 4 = 0.8719 0.00832099.050.5147740.96
X 5 = 4.6701 3.4335226.482.8529738.91
X 6 = 0.7268 0.755954.0120.726850.0073
X 7 = 0.7256 −2.12978393.520.725260.0474
Table 2. Parameter identification results with different excitation command input.
Table 2. Parameter identification results with different excitation command input.
Reference ParameterSimple CommandAggressive Command
Est. Para.Error (%)Est. Para.Error (%)
X 1 = 0.0436 0.0292133.040.0499114.46
X 2 = 0.0178 0.0307172.520.0127628.26
X 3 = 0.1149 0.0670941.600.106956.914
X 4 = 0.8719 0.5147740.960.836804.027
X 5 = 4.6701 2.8529738.914.678820.1025
X 6 = 0.7268 0.726850.00730.726950.0212
X 7 = 0.7256 0.725260.04740.705812.7282
Table 3. The impact of various filter parameters on parameter identification results with initial value deviation.
Table 3. The impact of various filter parameters on parameter identification results with initial value deviation.
Ref. Para.Correct Initial Value Initial   Value   with   Uncertainty   ( θ p Deviation Is +0.5 Degrees)
Case   A .   τ 1   =   τ 2 = 0.014 Case   B .   τ 1   =   τ 2   =   0.014 Case   C .   τ 1 = τ 2 = 0.14 Case   D .   τ 1 = τ 2 = 4.2
Est. Para.Error (%)Est. Para.Error (%)Est. Para.Error (%)Est. Para.Error (%)
X 1 = 0.0436 0.043550.10740.0059086.4580.040337.48250.0501615.053
X 2 = 0.0178 0.017810.07640.0348595.7870.0195910.0590.0124829.844
X 3 = 0.1149 0.114750.1239-0.007271.06330.105867.86290.1276611.106
X 4 = 0.8719 0.871280.0707-0.010241.01170.803747.81690.9755411.886
X 5 = 4.6701 4.665540.09740.6596685.8744.348466.88705.2499712.416
X 6 = 0.7268 0.726840.00610.727190.05460.726840.00640.726860.0084
X 7 = 0.7256 0.725160.06000.722030.49140.725920.04420.716141.3031
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Peng, C.-C.; Cheng, N.-J.; Tsai, M.-C. Application of an Output Filtering Method for an Unstable Wheel-Driven Pendulum System Parameter Identification. Electronics 2023, 12, 4569. https://doi.org/10.3390/electronics12224569

AMA Style

Peng C-C, Cheng N-J, Tsai M-C. Application of an Output Filtering Method for an Unstable Wheel-Driven Pendulum System Parameter Identification. Electronics. 2023; 12(22):4569. https://doi.org/10.3390/electronics12224569

Chicago/Turabian Style

Peng, Chao-Chung, Nai-Jen Cheng, and Min-Che Tsai. 2023. "Application of an Output Filtering Method for an Unstable Wheel-Driven Pendulum System Parameter Identification" Electronics 12, no. 22: 4569. https://doi.org/10.3390/electronics12224569

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop