Next Article in Journal
Effects of Methanol Application on Carbon Emissions and Pollutant Emissions Using a Passenger Vehicle
Next Article in Special Issue
Frequency Response Estimation for Multiple Aircraft Control Loops Using Orthogonal Phase-Optimized Multisine Inputs
Previous Article in Journal
Modeling and Optimization of Heavy Metals Biosorption by Low-Cost Sorbents Using Response Surface Methodology
Previous Article in Special Issue
A New Camera Calibration Technique for Serious Distortion
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Dynamic Modeling of a Nonlinear Two-Wheeled Robot Using Data-Driven Approach

1
Department of Electrical Engineering, Air University Islamabad, Aerospace and Aviation Campus Kamra, Attock 43570, Pakistan
2
Faculty of Electrical Engineering, Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi 23640, Pakistan
3
Department of Computer Science and Engineering, Kongju National University, Cheonan 31080, Korea
*
Authors to whom correspondence should be addressed.
Processes 2022, 10(3), 524; https://doi.org/10.3390/pr10030524
Submission received: 29 December 2021 / Revised: 11 February 2022 / Accepted: 26 February 2022 / Published: 7 March 2022
(This article belongs to the Special Issue System Identification: Latest Advances and Prospects)

Abstract

:
A system identification of a two-wheeled robot (TWR) using a data-driven approach from its fundamental nonlinear kinematics is investigated. The fundamental model of the TWR is implemented in a Simulink environment and tested at various input/output operating conditions. The testing outcome of TWR’s fundamental dynamics generated 12 datasets. These datasets are used for system identification using simple autoregressive exogenous (ARX) and non-linear auto-regressive exogenous (NLARX) models. Initially the ARX structure is heuristically selected and estimated through a single operating condition. We conclude that the single ARX model does not satisfy TWR dynamics for all datasets in term of fitness. However, NLARX fitted the 12 estimated datasets and 2 validation datasets using sigmoid nonlinearity. The obtained results are compared with TWR’s fundamental dynamics and predicted outputs of the NLARX showed more than 98% accuracy at various operating conditions.

1. Introduction

System identification using open loop experimental datasets is a well-known trick for determining the unknown dynamics of a real-time system [1]. The mathematical models obtained through an open loop experimental data driven approach serve as a bridge between control theory and real-world problems. The development of a modern feedback control system for a real- world problem requires an accurate estimate of unknown dynamics. Thus, good system identification will lead a control designer to develop a control system in a systematic manner and diagnose an appropriate solution to a real-world problem [2,3]. The unknown dynamics of a system can be represented in terms of both frequency and time domain, depending upon the control methodology, which determines the type of mathematical representation being adopted. Classical control theory uses the frequency domain and modern control systems uses state space representation (time domain). System identification using open loop datasets at various operating conditions [4] can represent system dynamics in the time domain as well as the frequency domain. Parametric system identification can be performed by using fundamental laws of physics but are based on a set of assumptions which may lead to the inaccurate estimation of unknown dynamics due to unknown parameters. On the other hand, time series data are used for the determination of an infinite number of model parameters, and for their estimation without having sufficient knowledge of the dynamical systems [5].
Over the past several decades, robots have received a great deal of attention due to their usage in almost every part of life. Almost every type of robot is an engineering problem in itself [6]. A TWR can be thought of as a ground-based mobile robot with two wheels for supporting its body. Two high-torque DC electric motors are used to drive the wheels independently. For this reason, the robot has the advantage of a high maneuverability, but also has the disadvantage of stability problems due to unstable pitch motion. Several control techniques have been applied to address this, including the state feedback [7,8,9,10]. For the development of an autonomous vehicle based on a TWR, presented in [11]. The TWR was facilitated with provision of the three controllers for balancing, controlling and steering. Experimental results showed that the robot is able to move in a desired straight line. Subsequently, another autonomous two-wheeled vehicle is reported in [12] based on a trajectory tracking control system, designed using partial state feedback linearization. Different control techniques, namely, optimal control [13], adaptive control [14,15,16] and predictive control [17], have been used in designing the trajectory tracking control system. Much work has been done on the system modelling of TWR dynamics on a planar surface [13,14,15,16,17].
A review of the literature revealed that due to the complexity of the mathematical modeling of nonlinear dynamics and its assumptions, various parameters have been left undetermined. Thus, there is a need for an approach that can estimate the dynamics of a system based on experimental observation. The results of several linear and nonlinear models for two-wheeled robots are compared in [18]. The identification of TWR dynamics using neural networks is presented in [19]. The problem with this technique is that it does not provide transient and training datasets considering only a single operating condition. System identification for optimal control design (linear quadratic regulator) using the SI toolbox in Matlab is presented in [20]. The experimental modeling of human heart rate response during walking, cycling and rowing at various intensity levels is presented in [21]. System identification using a data-driven approach for human heart rate during treadmill exercise at different treadmill speeds is performed in [22]. A data-driven robust adaptive H-infinity controller during various rhythmic exercises is described in [23]. Previous studies using data-driven approaches had been unable to identify TWR dynamics at different operating conditions. Thus, the system identification of TWR dynamics using a nonlinear ARX model at twelve different operating conditions with optimal efficacy is presented in this paper. This technique will be useful in the future for designing and simulating feedback control systems.
The rest of this paper is organized as follows. Section 2 gives a brief overview of the system dynamics and ARX model structure, Section 3 describes the methodology, Section 4 contains simulations and results, Section 5 contains discussion and analysis and Section 6 concludes the overall work.

2. TWR Dynamics Moving on a Planar Surface and ARX Model Structure

A block diagram of the TWR is shown in Figure 1. The time-varying robot posture (position coordinates x and y, along with orientation angle Ψ in a specific coordinate system) caused by the motion of the robot is represented by Equation (1):
O = x y Ψ ,
The high-torque DC electric motors drive the wheels in such a way that the TWR moves with linear velocity ‘u’ and angular velocity ‘r’ because of the difference in the rotational speed of the two DC motors. The state equations for the system are represented by Equations (2)–(4):
x ˙ = u   cos Ψ v   sin   Ψ
y ˙ = u   sin Ψ   +   v cos   Ψ  
Ψ ˙ = r

2.1. ARX Model Structure

For parameter estimation, one of the most reliable types of regression model is the ARX model. In the ARX model, the assumption made is that the current output of the system is a function of the last ‘n’ system outputs and the last ‘m’ system inputs. This technique proves to be the most efficient technique for solving linear regression equations when provided in analytical form. Furthermore, when the order of the system is high, this technique can perform at its best. The generalized form of this technique is given in Equation (5):
y k   =   B q A q u k   +   1 A q e k
where y[k] is output, u[k] is input and e[k] is disturbance.

2.2. NLARX Model Structure

In the time-series modelling, NLARX is a non-linear autoregressive model which has exogenous inputs. The current value of a time series is related to both the past values of the same series and the current and past values of the exogenous series, that is, an externally determined series that has an impact on the model’s series of interest. An error term is also included which indicates that knowledge of the other terms will not permit the current value of the time series to be anticipated exactly. The algebraic expression of this model is given below in Equation (6) as:
y t   =   F y t 1 , y t 2 , y t 3 , , u t , u t 1 , u t 2 , u t 3 ,   +   E t  
where ‘y’ is the variable of our interest, ‘u’ is the externally determined variable that helps in the prediction of ‘y’, is the error term and function ‘F’ is some nonlinear function (i.e., polynomial).
The estimated regressor and details of the output nonlinear functions are tabulated in Table 1.
The cost function is defined as the mean square error between the simulated response of the nonlinear kinematics and the estimated output of the model, as given by Equation (7).
e t = y N L y e s t 2  
where
Y N L = x N L y N L ψ N l  
Y E S T = x E S T y E S T ψ E S T  

3. Methodology

At first step, the given system of differential equations is simulated in Matlab-Simulink. Twelve different datasets are generated through different possible scenarios by varying the parameter vales of linear velocity and angular velocity respectively. For twelve datasets, a total of 729 samples are acquired and then exported to the workspace.
The order of the model should be selected prior to the estimation of parameters and reconstruction of the dataset. According to the number of inputs, outputs and desired delay, the order of the system is determined in [na, nb, nk] format. ‘na’ is a ny-by-ny matrix, while ‘nb’ and ‘nk’ are ny-by-nu matrices. The order of the system is adjusted intelligently so that the system performed better and achieved more than 98% accuracy even in the presence of noisy conditions. ARX and NLARX models are applied on each individual dataset and on the merged dataset with the orders already defined. In the case of the NLARX model, appropriate nonlinearities are incorporated and the results analyzed afterwards.

4. Simulation and Results

4.1. Dataset Generation

The details of different operating conditions are shown in Table 2.
All the input and output datasets are acquired at different operating points, listed in Table 1. These datasets are obtained through the nonlinear kinematics of the TWR given in Equations (2) and (3). TWR kinematics is implemented in a Simulink environment using the S function. The radius of the wheel is considered as a physical parameter that converts the rotation of the DC motor to a linear velocity along x and y directions, as shown in Equation (8).
V = r ω
where ‘r’ represents the radius of a wheel, ‘V’ represents the linear velocity and ‘ω’ represents the angular velocity of the DC motor.
The two DC motors are operated in the two wheels of the TWR, and the rotation of these motors covered the linear displacement of the x and y axes. Moreover, the angular velocity is 90 ° apart from x, y coordinates, and thus angular rotation is considered at the z axis with z displacement equal to zero. These are the three manipulated inputs of the TWR used for generating the datasets. The obtained datasets from 12 different operating conditions provided the testbed for estimation of the nonlinear dynamics of the TWR. The sampling time period is 0.25 s for the nonlinear kinematics of the TWR. All the datasets are obtained using the Matlab command ‘iddata’ and combined using the ‘merge’ command. The merged dataset is used for estimating the dynamics of the TWR. The NLARX structure is heuristically selected to provide maximum fit for the estimation of 12 operating conditions, as shown in Table 1. The NLARX model is estimated using the Matlab ‘nlarx’ command. This model is validated at two different operating conditions. In the first dataset, the two DC motor velocities are equal to 2 m/s and angular velocity is equal to 0.05 rad/s. In the second dataset, the two DC motor velocities are equal to 4 m/s and angular velocity is equal to 0.8 rad/s. The obtained datasets are considered as validation datasets.

4.2. Estimated Results of the NLARX Model

The obtained NLARX models are used to estimate the 12 operating conditions listed in Table 1 and compared with the nonlinear kinematics acquired in the 12 estimated datasets. All the other datasets gave 100% accuracy and are not provided here. For the sake of convenience, only the results of the sixth operating condition are shown in Figure 2. To validate the NLARX model, the validation datasets used the estimated response as shown in Figure 3 and Figure 4.

5. Discussion and Analysis

A system identification of a two-wheeled robot (TWR) from its fundamental nonlinear kinematics using the data-driven approach at different operating conditions is presented in this paper. The fundamental model of TWR is implemented in a Simulink environment and tested at various input/output operating conditions, as shown in Table 1. The simulated outcome of the TWR fundamental dynamics generated 12 estimated datasets for TWR model identification. These datasets are developed based on the analysis of the nonlinear kinematics of the TWR. The analysis showed that linear displacement is covered by TWR when angular rotation is equal to zero, otherwise the TWR followed a circular path indicated by sinusoid variation in x and y displacement axes, as shown in Figure 2, Figure 3 and Figure 4. Based on the observations, twelve operating conditions are identified. The TWR kinematics are estimated by using NLARX. Initially the ARX structure is heuristically selected and estimated at a single operating condition. We conclude that the single ARX model did not satisfy the TWR dynamics for all datasets in terms of fitness. However, the NLARX model fitted the 12 estimated datasets and 2 validation datasets using sigmoid nonlinearity. The simulated responses from the NLARX estimated models are compared with the fundamental dynamics of the TWR at validation operating conditions, as shown in Figure 3 and Figure 4. The results indicate that the NLARX model performed optimally for the validation dataset. Thus, system identification for the TWR using an NLARX structure performed well and would be suitable for simulating a feedback control system. The results in the form of fit to estimation data and mean square error are presented in Table 3. The fitness value of the third output is 100% for all datasets as it is a ramp function.

6. Conclusions

The estimated response from the NLARX estimated model is compared with the fundamental dynamics of the TWR. Results indicated that the NLARX model performed optimally for the validation dataset. Thus, system identification for the TWR using the NLARX structure performed well and would be suitable for simulating a feedback control system. Furthermore, the results presented in this paper exceed in terms of accuracy the work already presented [19] using a neural network approach for a similar but less-complex system without noise. The cited neural network required extensive training and is less accurate than the work presented in this paper. Therefore, this paper presents the estimation and validation of a complex model of the fundamental dynamics of a TWR using an NLARX model with maximum accuracy, even in the presence of noise.

Author Contributions

Conceptualization, M.A.K. and D.-e.-Z.B.; formal analysis, D.-e.-Z.B.; investigation, D.-e.-Z.B.; methodology, M.A.K.; software, M.A.K.; supervision, D.-e.-Z.B.; writing—original draft, M.A.K.; writing—review and editing, D.-e.-Z.B., B.A., H.A., J.R. and J.K.; funding acquisition, J.R. and J.K. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Technology Development Program of MSS [No. S3033853].

Institutional Review Board Statement

Not Applicable.

Informed Consent Statement

Not Applicable.

Data Availability Statement

The datasets that support the findings of this study are available from the authors, upon reasonable request.

Acknowledgments

The authors thank the autonomous reviewers who helped to improve the quality of the paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Ljung, L. Perspectives on system identification. Annu. Rev. Control 2010, 34, 1–12. [Google Scholar] [CrossRef] [Green Version]
  2. Berardi, U. Modelling and testing of a dielectic electro-active polymer (DEAP) actuator for active vibration control. J. Mech. Sci. Technol. 2013, 27, 1–7. [Google Scholar] [CrossRef]
  3. Kim, Y.; Kim, Y.H.; Lee, S. Multivariable nonlinear identification of smart buildings. Mech. Syst. Signal Process. 2015, 62, 254–271. [Google Scholar] [CrossRef]
  4. Cheng, T.M.; Savkin, A.V.; Celler, B.G.; Su, S.W.; Wang, L. Nonlinear modeling and control of human heart rate response during exercise with various work load intensities. IEEE Trans. Biomed. Eng. 2008, 55, 2499–2508. [Google Scholar] [CrossRef] [PubMed]
  5. Kim, Y.; Kim, J.M.; Kim, Y.H. System identification of smart buildings under ambient excitations. J. Meas. 2016, 87, 294–302. [Google Scholar] [CrossRef]
  6. Peltier, M.D. Trajectory Control of a Two-Wheeled Robot. Master’s Thesis, University of Rhode Island, Kingston, RI, USA, 2012. [Google Scholar]
  7. Nomura, T.; Kitsuka, Y.; Suemitsu, H.; Matsuo, T. Adaptive backstepping control for a two-wheeled autonomous robot. In Proceedings of the 2009 ICCAS-SICE 2009, Fukuoka, Japan, 18–21 August 2009; pp. 4687–4692. [Google Scholar]
  8. 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]
  9. Uddin, N. Lyapunov-based control system design of two-wheeled robot Computer. In Proceedings of the 2017 International Conference on Computer, Control, Informatics and Its Applications (IC3INA), Jakarta, Indonesia, 23–26 October 2017; pp. 121–125. [Google Scholar]
  10. Uddin, N.; Nugroho, T.A.; Pramudito, W.A. Stabilizing Two-wheeled robot using linear quadratic regulator and states estimation. In Proceedings of the 2017 2nd International conferences on Information Technology, Information Systems and Electrical Engineering (ICITISEE), Yogyakarta, Indonesia, 1–3 November 2017; pp. 229–234. [Google Scholar] [CrossRef]
  11. Ha, Y.S.; Yuta, S. Trajectory Tracking Control for Navigation of the Inverse Pendulum Type Self-contained Mobile Robot. Robot. Auton. Syst. 1996, 17, 65–80. [Google Scholar] [CrossRef]
  12. Pathak, K.; Franch, J.; Agrawal, S.K. Velocity and position control of a wheeled inverted pendulum by partial feedback linearization. IEEE Trans. Robot. 2005, 21, 505–513. [Google Scholar] [CrossRef]
  13. Uddin, N. Trajectory Tracking Control System Design for Autonomous Two-Wheeled Robot. J. Infotel 2018, 10, 90–97. [Google Scholar] [CrossRef]
  14. Cui, R.; Guo, J.; Mao, Z. Adaptive backstepping control of wheeled inverted pendulums models. Nonlinear Dyn. 2015, 79, 501–511. [Google Scholar] [CrossRef]
  15. Yue, M.; Wang, S.; Sun, J.Z. Simultaneous balancing and trajectory tracking control for two-wheeled inverted pendulum vehicles: A composite control approach. Neurocomputing 2016, 191, 44–54. [Google Scholar] [CrossRef]
  16. Uddin, N. Adaptive Trajectory Tracking Control System of Two-Wheeled Robot. J. Phys. Conf. Ser. 2019, 1373, 012052. [Google Scholar] [CrossRef]
  17. Yue, M.; An, C.; Sun, J.Z. An efficient model predictive control for trajectory tracking of wheeled inverted pendulum vehicles with various physical constraints. Int. J. Control Autom. Syst. 2018, 16, 265–274. [Google Scholar] [CrossRef]
  18. Shahraki, M.; Sh, M.A.; Mousavinia, A. Two wheel self-balanced mobile robot identification based on experimental data. In Proceedings of the 2017 Iranian Conference on Electrical Engineering (ICEE), Tehran, Iran, 2 May 2017; pp. 883–888. [Google Scholar] [CrossRef]
  19. Uddin, N. System Identification of Two-Wheeled Robot Dynamics Using Neural Networks. J. Phys. Conf. Ser. 2020, 1577, 012034. [Google Scholar] [CrossRef]
  20. Ahmed, A.H.; Aburas, O.E.; Meelad, N.A.; Abu-Raas, A.A. Modeling and Control of Two Wheels Robot Using Linear Quadratic Regulators. In Proceedings of the 2021 IEEE 1st International Maghreb Meeting of the Conference on Sciences and Techniques of Automatic Control and Computer Engineering MI-STA, Tripoli, Libya, 25–27 May 2021; pp. 193–197. [Google Scholar] [CrossRef]
  21. Baig, D.; Su, H.; Cheng, T.M.; Savkin, A.V.; Su, S.W.; Celler, B.G. Modeling of human Heart Rate response during walking, cycling and rowing. In Proceedings of the 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology, Buenos Aires, Argentina, 31 August–4 September 2010; pp. 2553–2556. [Google Scholar]
  22. Su, S.W.; Wang, L.; Celler, B.G.; Savkin, A.V.; Guo, Y. Identification and control for heart rate regulation during treadmill exercise. IEEE Trans. Biomed. Eng. 2007, 54, 1238–1246. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  23. Baig, D.E.; Ahmad, R.; Savkin, A.; Celler, B. Robust adaptive H ∞ control design for heart rate regulation during rhythmic exercises of unknown type. Int. J. Adapt. Control Signal Process. 2019, 33, 843–854. [Google Scholar] [CrossRef]
Figure 1. TWR on a planar surface and velocity diagram [19].
Figure 1. TWR on a planar surface and velocity diagram [19].
Processes 10 00524 g001
Figure 2. Estimated model response ‘+’ of NLARX from estimation dataset 6 and ‘−’ indicates the nonlinear kinematics of the TWR.
Figure 2. Estimated model response ‘+’ of NLARX from estimation dataset 6 and ‘−’ indicates the nonlinear kinematics of the TWR.
Processes 10 00524 g002
Figure 3. Estimated model response ‘o’ of the TWR from validation dataset 1 and ‘-’ indicates the nonlinear kinematics of the TWR.
Figure 3. Estimated model response ‘o’ of the TWR from validation dataset 1 and ‘-’ indicates the nonlinear kinematics of the TWR.
Processes 10 00524 g003
Figure 4. Estimated model response ‘o’ of the TWR from validation dataset 2 and ‘-’ indicates the nonlinear kinematics of the TWR.
Figure 4. Estimated model response ‘o’ of the TWR from validation dataset 2 and ‘-’ indicates the nonlinear kinematics of the TWR.
Processes 10 00524 g004
Table 1. Regressor and its nonlinearity function for the NLARX model.
Table 1. Regressor and its nonlinearity function for the NLARX model.
OutputsX-Axis (m)Y-Axis (m)Z-Axis (Rad)
Output Regressor F y 1 t 1 ,   y 1 t 2 , ߪ   y 1 t 6 F y 2 t 1 ,   y 2 t 2 , ߪ   y 2 t 6 y 3 t 1
Input Regressor u 1 t 1 ,   u 1 t 2 ,   u 1 t 3 ;
u 2 t 1 ,   u 1 t 2 ,   u 1 t 3 ;
u 1 t 1 ,   u 1 t 2 ,   u 1 t 3 ;
u 1 t 1 ,   u 1 t 2 ,   u 1 t 3 ;
u 2 t 1 ,   u 1 t 2 ,     u 1 t 3 ;
u 1 t 1 ,   u 1 t 2 ,   u 1 t 3 ;
u t
Output Nonlinearity FunctionSigmoidnetSigmoidnetLinear
Table 2. Operating conditions for testing TWR dynamics.
Table 2. Operating conditions for testing TWR dynamics.
Name of Entityx (m/s)y (m/s)r (Rad/s)
Dataset 1300.05
Dataset 2030.05
Dataset 3001
Dataset 4330.05
Dataset 5330.5
Dataset 6331
Dataset 7500.05
Dataset 8100.05
Dataset 9050.05
Dataset 10010
Dataset 110.250.250.5
Dataset 120.250.251
Table 3. Statistical Results Fitness and Mean Square Error.
Table 3. Statistical Results Fitness and Mean Square Error.
Name of DatasetFit to Estimation Data (%)Mean Square Error
Dataset 199.98 4.004   ×   10 5
Dataset 299.99 6.594   ×   10 5
Dataset 398.76 1.468   ×   10 5
Dataset 499.98 6.417   ×   10 5
Dataset 599.90.0001177
Dataset 699.720.0002171
Dataset 799.98 5.098   ×   10 5
Dataset 899.93 1.522   ×   10 5
Dataset 999.99 8.96   ×   10 5
Dataset 1099.98 1.777   ×   10 5
Dataset 1199.48 9.609   ×   10 6
Dataset 1298.76 1.468   ×   10 5
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Khan, M.A.; Baig, D.-e.-Z.; Ashraf, B.; Ali, H.; Rashid, J.; Kim, J. Dynamic Modeling of a Nonlinear Two-Wheeled Robot Using Data-Driven Approach. Processes 2022, 10, 524. https://doi.org/10.3390/pr10030524

AMA Style

Khan MA, Baig D-e-Z, Ashraf B, Ali H, Rashid J, Kim J. Dynamic Modeling of a Nonlinear Two-Wheeled Robot Using Data-Driven Approach. Processes. 2022; 10(3):524. https://doi.org/10.3390/pr10030524

Chicago/Turabian Style

Khan, Muhammad Aseer, Dur-e-Zehra Baig, Bilal Ashraf, Husan Ali, Junaid Rashid, and Jungeun Kim. 2022. "Dynamic Modeling of a Nonlinear Two-Wheeled Robot Using Data-Driven Approach" Processes 10, no. 3: 524. https://doi.org/10.3390/pr10030524

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