Position control for ball and beam system based on active disturbance rejection control

ABSTRACT This paper proposes a new control strategy to the position control of the ball in the ball and beam system by adopting an active disturbance rejection control (ADRC). ADRC is composed of a tracking differentiator (TD), an extended state observer (ESO), a nonlinear state error feedback control law (NLSEF), and a disturbance compensation device (DCD). The ESO observes and tracks the position of the ball and the direct current (DC) servomotor in real time. The total disturbance of the system can be expanded and amplified, and can also be effectively compensated in real time to suppress interferences by the ESO. The procedures of research are as follows. First, the model of the ball and beam system, including the motion equation of the system and the DC servomotor, is established. Second, ADRC is designed and applied to the ball and beam system and the DC servomotor. Third, the control model of the ball and beam system is built on the basis of ADRC. Finally, the ball position of ADRC is simulated and verified. The results show that the ball and beam system based on ADRC exhibits better performance than the proportion integration differentiation controller.


Introduction
The ball and beam system is regarded as a typical nonlinear system. Its nonlinearity is mainly manifested in: 1, Dead zone and saturation characteristic. 2, DC servomotor and pulley drive non-linearity. 3, Discontinuity of position measurement. 4, Nonlinear resistance. Due to the complex nonlinear nature of the ball and beam system, the ball and beam system can represent a general nonlinear control object. For example, in studying the balance of goods carried by mobile robots, performing attitude control of space vehicles, nonlinear control of actuators, and position control of spacecraft in space engineering can all use the model of the ball and beam system as the control object. Researchers have proposed various control methods to solve the existing problems of nonlinear systems. Kim and Oh (2000) used the nonlinear fuzzy proportion integration differentiation (PID) control method for control systems with nonlinearities or uncertainties. Zhou, Li, Wu, Wang, and Ahn (2017) designed an adaptive fuzzy controller to handle the input saturation of nonlinear systems. Ding, Wang, Shen, and Shu (2013) designed a time-varying filter for H∞ disturbance attenuation levels to solve the H∞ filtering problem of nonlinear systems. Li, Shen, Wang, Huang, and Luo CONTACT Bingyou Liu lby009@mail.ustc.edu.cn (2018) proposed a dynamic event-triggered synchronization control method to improve the energy utilization efficiency of nonlinear systems. Many scholars at home and abroad have also recently investigated the position control of the ball and beam system and proposed numerous control methods. The design methods of the classical PID control, root locus control, and frequency response mechanism are also specified in the user manuals and experimental instruction of Google technologies. However, the design methods of the PID control, root trajectory control, and frequency response have the contradiction of rapidity and overshoot. Krasinskii, Il'Ina, and Krasinskaya (2017) performed modelling and simulation of the ball and beam system and described in detail its nonlinear characteristics. Neural fuzzy algorithm control, fuzzy PID control and linear PD control are applied to ball and beam system (Hui & Sharma, 2015;Wen, 2009;Wu & Liu, 2015). In their findings, control precision was improved, but system robustness was weakened, relative to the traditional PID control. Oh, Jang, and Pedrycz (2011) develop a design methodology for a fuzzy PD cascade controller for a ball and beam system. Although traditional PD was applied to the control of internal servomotors, the interference of the ball caused by system jitter was not effectively suppressed. Almutairi and Zribi (2010) applied control methods, which were based on the structure of a sliding mode variable, to the ball and beam system, but problems on adjustment time were not solved. Static and dynamic controllers in sliding mode were proposed by designing a comprehensive system model to control the position of the ball. Various intelligent control methods, such as adaptive and feedback control of fuzzy dynamic systems (Amjad, Kashif, Abdullah, & Shareef, 2010;Chang, Chan, Chang, & Tao, 2011), were applied to the ball and beam system. These studies elaborated the procedures that involved certain inhibitory effects on the external interference of the system, but the influence of internal interference was not fully discussed. Zhu, Qi, and Shen (2014) proposed a feed-forward neural network control for ball and beam systems. The controller, which comprised a feed-forward neural network identification mechanism, a neural network, and a PID controller, was used to further improve the control performance of ball and beam systems, but adjustment time was not sufficiently improved. The nonlinear characteristics of ball and beam system correspond to its structure, but discontinuities are apparent in the position measurements of multiparty interference instruments and potentiometers during motion. Many methods can be used to control the position of the ball in ball and beam systems. Nonetheless, a new control method for the nonlinear complexity of the ball during motion is necessary to subsequently realize high-precision control of the ball and beam system. The design of the nonlinear system controller is an important issue in the effective control of the position of the ball. The ball and beam system is driven by the pulley rotation of the DC servomotor by using a rotating mechanism to adjust the height of the connecting beam and subsequently control the inclination of the rail. Therefore, the position of the ball is achieved with the rotation of the position-controlled DC servomotor. Many scholars have investigated the control of the DC servomotor. Liu, Mao, and Chen (2018) proposed a direct torque control of the DC servomotor based on the duty ratio and designed a method to reduce torque ripples. The constant switching frequency, which generally depends on the torque error, was also maintained to reduce dependence on certain parameters. Li and Yang (2017) proposed an improved sensorless control method. Instead of low-pass filters, a Second-Order generalized integrator is used to get the fundamental component of the back-EMF with minimal phase lag. Anita, Viswanathan, and Umamaheswari (2001) proposed a control method for the DC servomotor by considering the fault-tolerant slip film of a neural fuzzy system. Based on the as-built nonlinear extended disturbance observer in inner loop, Yang (2016) proposed one outer-loop compound controller by means of statespace design method to realize the high-precision position tracking ability of the servo system. However, the jitter problems of the DC servomotor in their study were not solved. ADRC has low dependence on objects, strong robustness, and good anti-interference performance. If ADRC is considered, the problems on electric jitters can be solved.
Jingqing Han of the Chinese Academy of Sciences proposed ADRC more than 20 years. ADRC is a nonlinear control method that can estimate and compensate internal and external disturbances in real time, and it has rapid response and strong ability against antijamming. ADRC inherits the characteristics of the traditional PID control, especially its error elimination mechanism (Han, 2009;Huang & Xue, 2014;Li, Li, Wang, & Zhao, 2013). Moreover, ADRC further develops and enriches the essence of the PID controller and is thus expected to replace PID in the control field. The influence of ADRC has increased in recent years, and the literature review suggests that its theoretical foundation has been explored from different angles. For instance, Gao (2013) examined and analyzed the basic principles of cybernetics, its paradigm, and essential issues. Moreover, discussions on the concept and significance of ADRC helped to develop further ADRC technology. For example, Guo and Zhao (2015) conducted an in-depth analysis of the three links of ADRC and highlighted their possible limitations and unresolved problems. Subsequent studies by Gao (2014Gao ( , 2015 and  further contributed to the abovementioned discussions. Scholars have also applied ADRC to different fields and consequently achieved remarkable results. Wang and Su (2013) used a linear expansion state observer to realize actual compensation of the nominal spacecraft system and its attitude tracking by adopting a relatively high precision control method and consequently solved attitude tracking problems related to aircraft model uncertainty and external disturbance. Zhou and Sun (2018) designed ADRC of PMSM speed control system to solve contradiction between the overshoot and fast speed.
Studying the non-linearity of the ball and beam system is significant. Classic control theory and various modern control strategies can be applied, but the actual environment of nonlinear systems is unstable and the risk is high, hence the difficulty encountered by many scholars. Moreover, its system structure is simple, and the nonlinear performance is outstanding. Both factors can help solve the above-mentioned problems. External and internal disturbances are strong in actual environments due to the prominent characteristics of nonlinear ball and beam systems. In existing research on ball and beam systems, the intensity of interference suppression is weak, control precision is insufficient, and the contradiction between overshoot and speediness has yet to be resolved. Hence, an advanced controller is needed. The present study uses ADRC to accurately control the position of the ball of the system. The position angles of the DC motor of the inner loop and the ball of the outer loop are used as controls. This scheme can help solve the contradiction between overshoot and speed, and it can suppress the influence of interference on the control of the ball and beam system. ADRC enables the ball to rapidly reach the designated position without overshoot, thereby improving system robustness. Consequently, the precise control of the ball position of the system can be achieved. Our research comprises three main features. (1) Lagrangian kinematics law is adopted for the model establishment of the ball and beam system and its DC servomotor. (2) A second-order ADRC, which includes a tracking differentiator (TD), an extended state observer (ESO), a nonlinear state error feedback (NLSEF), and a disturbance compensation device (DCD), is designed for tuning the parameters of each part. (3) Based on ADRC and PID controllers, a model for the ball position control of the ball and beam system is established and the system is simulated. Then the final conclusion is obtained by comparing the simulation results.

Introduction to the ball and beam system
The ball and beam system is a typical equipment used to determine the effects of a control experiment. The system is applied to the development of classical and modern control theories, and it also has high research value. Many practical models of non-linearity can be abstracted as the ball and beam system.
The ball and beam system in this study consists of a mechanical part (DC servomotor) and a control part (IPM100 intelligent servo drive and DC power supply). Figure 1 shows the mechanical part of the ball and beam system.
The ball support guide rail is composed of a potentiometer and a scale. One end of the guide rail is connected to the support beam, the other end is affixed to the connecting beam. When the DC motor operates, the deceleration pulley also moves by changing its angle of rotation, while the connecting beam swings and changes the angle of the guide rail. Thus, the ball moves under the effect of gravity on the support guide rail. In the model, r is the position of the ball (the distance from the ball to the connecting beam), θ is the angle between the connecting beam and horizontal line, α is the rotation angle of the beam, d is the distance between the connecting lever The motion range of the ball on the guide rail is 0-0.4 m (i.e. the length of the crossbar is L = 0.4 m). The location of a ball, which can be detected in real time by using a linear displacement potentiometer, is converted into a voltage signal digital-to-analog (A/D) value, and this result is compared with the expected ball position to determine the position error. Then, the turning angle of the reduction pulley is derived on the basis of the accurate control of the outer loop controller. The target position angle of the motor is obtained by using a speedincreasing mechanism, and the result is compared with that of the incremental encoder motor to determine the position angle error. The position angle of the motor is controlled by the inner control. Then the motor starts to turn according to the rotations of the drive pulley and connecting beam, thus changing the angle between the connecting beam and the horizontal line, which corresponds to ball movement. Figure 2 shows ball and beam position control system schematic.
The inner and outer loop controllers selected in this study are ADRC. In the figure, r is the target position of the ball, x is the real time position of the ball, e is the position error of the ball, θ r is the turning angle of the reduction pulley, β r is the target turning angle of the motor, U is the armature voltage of the motor, and β is the real time position angle of the motor.

Angle model of the ball and beam system
As previously shown in Figure 1, the angle between a connecting beam and the horizontal line is represented by θ (i.e. rotation angle with the wheel). The rotation angle of the beam is α, the distance between the connecting point of the connecting beam and the gear is d, and the length of the crossbar is L. The slope angles α and θ of the crossbar approximated a proportional relation, and its mathematical relation is as follows: which is: ( 2 )

Mechanical model of the ball and beam system
The total kinetic energy of the ball and beam system is as follows: where m is the mass of the ball, J is the moment of inertia of the ball, R is the radius of the ball, and J M is the moment of inertia of the ball and the beam. The total potential energy of the ball and beam system is as follows: where L is the length of the beam, and M is its mass. Based on the Lagrange equation: The mathematical model of the ball and beam system is as follows: Considering that α is zero when the system is in an equilibrium state, we can linearize the system near zero and obtain the approximate linear equation as follows: By substituting equation (1) into equation (7), we obtain: The Laplace transform of the above equation is as follows: where X(s) is the Laplace transform of the position of the ball. The moment of inertia of the ball is J = (9.9e−6)kg·m2, the radius of the ball is R = 0.015 m, mass is m = 0.1 kg, length is L = 0.4 m, and the radius of the pinion is d = 0.04 m. The mechanical model of the ball and beam system can be obtained as follows:

DC servo motor model of the ball and beam system
The four dynamic relations of the DC servomotor can be expressed as follows: where u is the armature voltage, i a is the armature current, β is the position angle of the DC servomotor, La and Ra are armature-equivalent inductors and resistors, e a is the anti-potential, T is the motor torque, J a is the rotary inertia of motor rotor and load, T f is the load torque, K t is the torque constant, and K e is the voltage constant. Given that L a is small, the above equation can be simplified as follows:β The dynamic structure diagram of the position angle equation of the DC servomotor in accordance with equation (12) is shown in Figure 4.

ADRC design
ADRC inherits the advantages of the PID, particularly its ability for error elimination. Furthermore, ADRC can manipulate control objects even without the establishment of an accurate model. ADRC is composed of four parts. First, TD is used to track signals, including differential ones, which is used to arrange excessive processes. The input signal of the tracking system can be rapidly obtained without overshoot. Second, the ESO is used to observe the internal state and the unmeasurable state of the estimation system, while implementing the model and external disturbance for feed-forward compensation.
Third, the NLSEF control law realizes the nonlinear combination of the TD and ESO. Moreover, the nonlinear combination of the NLSEF control law and ESO are used as the control quantity of controlled objects to ensure a stable and efficient output signal. Fourth, DCD is used to compensate the disturbances and convert the system into an integral series device. Figure 5 presents the integration of ADRC to the ball and beam system. Figure 5 also shows the double closed-loop ADRC of the ball and beam system. In the figure, r is the position of the given ball, x 1 is the tracking signal of r, x 2 is the differential signal of x 1 , Z 11 is the differential signal of x, Z 12 is the differential signal of Z 11 , β r is the target position of the motor, β 1 is the tracking signal of β r , β 2 is the differential signal of β 1 , Z 21 is a β tracking signal, Z 22 is the differential signal for Z 21 , and n is the deceleration ratio of the deceleration zone. The algorithm flow chart of ADRC is shown in Figure 6:

TD design
TD is an important part of ADRC, which can improve response speed, and the contradiction between rapidity and overshoot can be solved effectively by arranging the transition process sequence and by tracking the input signal. The differential form of the input signal can also be simultaneously obtained.
In the design, h is the sampling step length, r 0 is the velocity factor, fhan is the maximum speed control synthesis function whose algorithm is as follows:

ESO design
ESO serves as the core component of ADRC. The nonlinear factors, uncertainties, and internal and external disturbances of the system can be observed in real time. In particular, the real time variation in the position angles of the ball can be accurately predicted, and a new state variable can be updated by accurately extending existing ones. The inner loop is used to control the real time turning angle β of the Z 21 tracking signal motor, while the outer loop is used to control the real time position x of the Z 11 tracking signal ball. The form of the continuous nonlinear ESO is as follows: α 1 , δ), where e is the observation error, b 0 is the estimated value of the compensation factor, α 1 , α 2 , and α 3 are the nonlinear factors, β 1 , β 2 , and β 3 are the gains of the ESO.
The solution is available: Then the expression of final function can be obtained as follows:

NLSEF design
The NLSEF is a nonlinear configuration to process the TD, the ESO, and the state error of a reference input, the expression of the control law is as follows:  u 0 = β 1 fal(e 1 , α 1 , δ 1 ) + β 2 fal(e 2 , α 2 , δ 1 ) +β 3 fal(e 3 , α 3 , δ 1 ), where e 1 , e 2 , and e 3 are the error, the error integral, and the error differential, respectively, β 1 , β 2 , and β 3 are the gain of error, the integral gain of error, and differential gain of error, respectively.

DCD design
DCD is used to compensate the total disturbance of the position angle of the DC servomotor controlled by the inner loop and the total disturbance of the ball and beam system controlled by the outer loop. System disturbances consist of internal and external disturbances, which can be compensated in real time by b 0 . The compensation formula of the ball and beam system is as follows: Where u 01 is the control signal without disturbance compensation, u is the compensation control signal of the DCD. The real-time compensation of total disturbance is expressed as Z 13 /b 0 .

Parameter tuning
As discussed first part of the paper, certain parameters in ADRC must be adjusted. To effectively demonstrate the control effect of ADRC, this study must set the following parameters: The TD has two parameters, h 0 and r 0 . r 0 is used to determine the tracking speed of the TD, in which a large tracking value indicates rapidity. However, r 0 causes hyper-harmonic noise, and thus, its value must be set as small as possible under the premise of ensuring the tracking speed. h 0 is used to determine the tracking accuracy. In general, the larger the value of h 0 is, the better the tracking performance of the system will be. However, the value of h 0 is too large to cause signal distortion. Considering, we selected h 0 = 0.01 and r 0 = 10. β 1 , β 2 , and β 3 are the gains of the ESO. To meet the stability conditions the following values are selected: β 1 = 60, β 2 = 1200, and β 3 = 8000. α 1 , α 2 , and α 3 are the nonlinear factors, in general, α 1 = 0.50, α 2 = 0.25, and α 3 = 0.12. δ is the filter factor that takes a value of 0.01. β 1 , β 2 , and β 3 are the error gain, integral gain of error, and differential gain of error, respectively. Their values are β 1 = 25, β 2 = 5, and β 3 = 75. After analysis, the value of b 0 is 2.50. Table 1 presents a summary of the specific parameters.

Simulation experiments and discussion
To verify the performance of ADRC in controlling ball position of the ball and beam system, ADRC and PID control models are built by using Simulink. Different positions, such as step, square wave, and sinusoidal signals, are inputted to the position of ball in the simulation model.
Step and white noise disturbances are added when the step signal is used as the input. The simulations are observed, and the results of the effects of ADRC and PID controller are compared to verify the characteristics of ADRC rapidly without overshoot and with strong robustness. Figure 7 shows the response curves of the PID controller and ADRC with a step input. In this figure, the overshoot of the PID controller is 12%, and its adjustment time is 2.25 s. By contrast, the overshoot of ADRC is 0%, and its adjusting time is 0.42 s. Therefore, ADRC has faster adjusting speed and smaller overshoot than the PID controller. Figure 8 shows the response curves of the PID controller and ADRC when the input period is a 10 s square wave pulse signal. In the PID controller, when amplitude jumps back to the stable output of 2.95 s, and its overshoot is 7%. In ADRC, when amplitude jumps back to the stable output of 0.46 s, and its overshoot is 0%. Therefore, ADRC has faster recovery time compared with the PID controller, and it has no overshoot. Figure 9 shows the response curves of the PID controller and ADRC when the input cycle is a 2 s sinusoidal. In the PID controller, the time of arrival in the first peak is 1.19 s, which indicates that the peak of the sine function is not reached. The second peak is 4.17 s, and the overshoot is 9%. In ADRC, the first peak time is 0.82 s without overshoot. Thus, for the input response of the sinusoidal, the control effect of ADRC is faster without overshoot. A step signal is initially inputted, and step perturbation is added after 5 s. Figure 10 illustrates the step perturbations with different amplitudes. In which the perturbations of a, b, c, and d are enhanced successively. As shown by the diagram, the anti-jamming ability and recovery time in ADRC are better than those in the PID controller.
The input is set with a step signal of 0.2 m. Figure 11(a) shows simulation curves with white noise interference at 0.1 variance, while Figure 11(b) shows similar curves with 1.0 variance. In Figure 11(a), we can see that the output amplitude of the PID controller has significant fluctuations, but the output amplitude of ADRC controller in this respect is basically no fluctuation. In Figure 11(b), the PID controller appears with large fluctuations with unstable output signal is unstable, whereas ADRC only has small fluctuations with stable output signal in this respect. Thus, the anti-interference of ADRC is stronger than that of the PID controller.
A comparison of the effects of PID and ADRC on the control of ball and beam system is listed in Table 2. According to Table 2, the characteristics of the PID controller are as follows. (1) The overshoot is range from 7% to 12%. (2) Adjustment time is as high as 2.25 s and has even reached 2.95 s for the square wave. (3) The controller has poor anti-interference performance.
Meanwhile, ADRC features are as follows. (1)  By comparison, it can be found that ADRC has faster response speed and stronger robustness than PID controller, and the former has almost no overshoot.

Conclusions
In this paper, a small ball position control strategy based on double closed loop ADRC is proposed. Firstly, the control strategy provides high-quality control for the system through TD. Then, ESO1 and ESO2 respectively observe the external disturbance and internal disturbance of the system in real time, and finally provide a stable and effective output signal for the system through NLSEF. Due to its excellent control performance, ADRC can effectively solve the contradiction between rapidity and overshoot and improve the robustness of the system. In order to verify the good control performance of the control strategy, we conducted a simulation study on the system. The results show that the control strategy has rapidity and anti-interference performance. Finally, highprecision control of the ball position of the ball and beam system is achieved.
The ball and beam system is a nonlinear system, and its research value is significant in actual nonlinear environments. The favourable control effect of ADRC on the ball and beam system confirms the feasibility and effectiveness of implementing ADRC strategies. ADRC is suitable for then on linear, and unstable scenarios that likely involve the disturbance of various objects.