Modeling a new Gimbal System using Nonlinear ARX (NARX) Model

A new 3-degree-of-freedom gimbal system design has been developed and experimented at Universiti Malaysia Perlis (UniMAP). The gimbal system is built from polylactic acid (PLA) using a 3D printer. Based on the analysis, the gimbal system can hold up to 23.45 kg and 69.90 MPa of stress. Thus, the gimbal system requires further analysis to investigate the system’s capability in terms of control and stability. Hence, this paper models the gimbal system to the mathematical modelling using the black-box technique with the Nonlinear ARX (NARX) model to achieve the objective. There are six regressor parameters set up to obtain the model where the input and output data for the gimbal axes (roll, pitch and yaw) are gathered from the experiment. The result shows that the best fitting percentage with low complexity is the 4th-order nonlinear regressor with 96.08% (yaw), 95.63% (roll) and 94.65% (pitch). Thus, the gimbal system shows that the model has high accuracy and is suitable to use for further control and stability analysis.


Introduction
A gimbal system is a mechanical device comprising two or more rings mounted on axes (roll, pitch and yaw) and perpendicular to each other.It finds widespread use in various applications and industries, for instance, spacecraft [1] [2], drones [3][4], camera stabilizers [5], single gimbal control moment gyroscope (SGCMG) [6], and unmanned air vehicle (UAV) [7].As a result, the importance of gimbal systems has grown significantly.Because of this effect, a gimbal system is designed and developed by a research team at University Malaysia Perlis (UniMAP) in 2023 [8].The design aimed to produce a gimbal system that is suitable for research purposes, low cost and easy to produce.
The gimbal system is constructed from polylactic acid (PLA) material, which, from the analysis, the structure can hold up to 23.45 kg and 69.90 MPa.However, more analysis is required to obtain the gimbal's limitations and capability before it can be used in research, especially in the control design and stability.Thus, the gimbal's mathematical model is needed to achieve the objective using system identification approaches.
System identification involves defining the dynamic behaviour of a system or its components based on measured data.It is instrumental in constructing mathematical models for dynamic systems and relies on studying mathematical modelling systems through tests and experimental data [9] [10].Hence, this paper aims to discuss the estimation of the gimbal system, encompassing its structure, design, characteristics, inputs, and outputs using nonlinear autoregressive exogenous input (NARX) system identification properties.This research target to produce a high best-fitting percentage of the gimbal's mathematical model where the gimbal system is dealt as a black-box system.

Gimbal system
A gimbal system as shown in Figure 1 is developed by a research team in UniMAP and it is presented in 2023 [8].The gimbal system has three axes (roll, pitch, yaw) which are present at the x, y and z axes respectively.A Von-Mises stress finite element analysis has been applied to the system's design where the result shows that the maximum force to the gimbal system is 230.87 N and that is equal to 23.54 kg at 69.90 MPa.The input and output data of the three-axis gimbal system is collected by the research team in the form of angles (yaw, pitch, and roll) with various tests.

NARX model
There are several system identification models available to determine a nonlinear system such as Hammerstein-Wiener, and autoregressive moving average with exogenous input (ARMAX).However, in this project, the NARX model is used to estimate the gimbal system based on the high accuracy results and less processing time to create the mathematical model for the 3 axes rotational system.
The NARX model is one of the nonlinear models, which is a linear ARX model extension.Two stages are required for system identification in NARX models.The process begins with the calculation of regressors, by using previous and current input data; and output values.The next step is to use a nonlinear estimator to transfer the regressors to the model output based on the merged linear and nonlinear functions.There are several forms of nonlinear estimators, including wavelet networks, multilayer neural networks, and tree-partition networks.The block is disregarded in a nonlinear estimator for either the linear or nonlinear function.The NARX model's block diagram is shown in Figure 2. The equation of the NARX model can be written as shown in Equation 1.
where y(t) denotes the outcome, r denotes the regressors, u denotes the input, L denotes an autoregressive with exogenous (ARX) linear function, d defines a scalar offset, g((u-r)Q) symbolizes

NARX model
To apply the NARX model using MATLAB for obtaining a mathematical model, several steps need to be gone through.Each of these steps is crucial for building the model effectively as shown in Figure 3.The input and output data have been collected and are ready to be utilized, with a common time value of approximately 0.08 seconds (based on the application needed).This consistent time value will be employed to construct the model.Subsequently, the regressor and system order will be determined based on the best results obtained after conducting tests with various orders, ranging from 1 st to 6 th order, as presented in Table 1.Then, explore different mapping functions and select the most stable one that aligns well with the system data to build the mathematical model.where the matrix has the form NN = [na nb nk] and defines the number of delays between each output (na) and each input variable (nb, nk).

Results
In this section, the result for this research is presented.The results are divided into two parts.The first part shows the data preparation for the three inputs and three outputs, where both input and output data are represented in angles and measured in degrees where the u is presenting the inputs and y the output.The first input and output represents the yaw angles, starting at 104°± and then increasing to 153°± after 10 seconds.The second input and output data represent the pitch angles, starting at 59°± and increasing to 100°± after 10 seconds.The third input and output data denote the roll angles, starting at 104°± and increasing to 153°± after 10 seconds.The total data collection time spans is 20 seconds, as shown in Figure 4.The result shows that the input and output data are comparable, where the average root mean square deviation (RMSE) equal 3.85 degree and the average error percentage (% Error) is 2.29% .However, at 10 seconds, there is a sharp drop before increasing back, and the reason for this phenomenon is because of the non-minimum phase factor where the gimbal system has zeros on the right side of the s-plane.Next, the second part, Figure 5 illustrates the results of applying six different system orders with a nonlinear regressor.The outcomes indicate that the optimal order is the 6 th order, but the performance is almost similar with the 4 th order.Nevertheless, the 4 th order is the best among all the nonlinear regressor in term of the result and complexity.Where, the average value of the 4 th order for roll, pitch and yaw is 95.45% compared to 95.45% and 95.53% for the 5 th and 6 th orders respectively.On the other hand, Figure 6 presents the results of various tested functions, with the wavenet mapping object showing the best performance, achieving the highest accuracy percentage with the minimum of 94.66% for all axes.Overall, the accuracy of the experimental results is high, suggesting the possibility of creating a model that closely resembles the real hardware on a smaller scale.However, it is essential to verify and confirm these results, which will be presented in the subsequent section.

Conclusion and future work
In conclusion, the identification of the nonlinear high-order 3D gimbal system has been successful, achieving a high accuracy of 96.08% (yaw), 95.63% (roll) and 94.65% (pitch).this model is ready to be utilized and can be used for further investigated.The model presents a valuable tool for advancing research and understanding in the field of 3D gimbal systems.For future work, the obtained gimbal's model performance with a controller such as decaying boundary layer thorough error feedback switching function (DBLSF) [12] will be validated with the experimental data.This process to ensure the accuracy of this model is high with and without controller implementation.

Figure 3 .
Figure 3. Steps to apply the NARX model in MATLAB to create a mathematical model.

Table 1 .
Regressor model parameters structure for nonlinear ARX model.