Open access peer-reviewed chapter

PID Cascade Controller Design for an Unstable System

Written By

Mustafa Saad

Submitted: 26 April 2022 Reviewed: 01 June 2022 Published: 17 May 2023

DOI: 10.5772/intechopen.105669

From the Edited Volume

PID Control for Linear and Nonlinear Industrial Processes

Edited by Mohammad Shamsuzzoha and G. Lloyds Raja

Chapter metrics overview

76 Chapter Downloads

View Full Metrics

Abstract

In control engineering, the control of an unstable system is very concerning. An example of an unstable system that uses control principles is a ball and beam balancer system. This system consists of a long beam attached to a motor at its midpoint. A steel ball moves on the top of the beam with an acceleration proportional to the beam angle. If the system is uncontrolled well, the steel ball may fall from the beam. This paper presents an approach to modeling and controlling the ball position for the ball and beam balancer system. Starting with a mathematical equation for the nonlinear system, the model of the system is produced. Then, it demonstrates the design of the PID cascade controller system to stabilize the system and regulate the ball to its reference position. The performance of the system was evaluated and tested for set-point tracking signal and disturbance rejection test. The simulation studies were done using Matlab Simulink and the results indicated that the proposed approach yields robust closed-loop performance.

Keywords

  • unstable system
  • ball and beam balancer
  • modeling
  • controller design
  • cascade
  • PID
  • tuning
  • disturbance rejection

1. Introduction

Most industrial processes can be considered nonlinear and uncertain processes. The control of these processes is considered dangerous if they were unstable. An unstable system such as a ball and beam balancer exists in some control laboratories. It is used by control engineering students to design and apply some of the controller techniques to control the ball position [1]. It is easy to understand that many classical and modern controller design techniques still can be applied to this system. Besides that, due to its simple construction, it can be classified as a feedback control system and it is used to learn how to stabilize the unstable system. It is normally related to real control problems such as horizontally stabilizing an airplane during landing and in turbulent airflow [2, 3].

The ball and beam system is seen as a standard control engineering system whose fundamental theory can be used to stabilize problems for various systems. For example, the balancing problem in moving robots that use to carry and spacecraft position control systems in aerospace engineering [4].

The ball and beam system is considered a nonlinear system [5]. Its nonlinearity is due to the dead zone and saturation characteristic, DC motor, and pulley drive nonlinearity and discontinuity of position measurement. The ball and beam system can show a general nonlinear control object. The model of the ball and beam balancer system can be used as a control item such as balancing mobile robots in goods carrying, controlling spacecraft, control of nonlinear actuators, and position control of space vehicles in aerospace engineering can all use the model, the ball, and the beam system as the control object [6].

A steel ball is positioned on the beam as shown in Figure 1. When the current control signal is applied to the motor, the beam is titled about its center axis. This causes the rolling of the ball on the beam. The control objective is to regulate the ball position on the beam automatically by changing the manipulated beam angle. This is a difficult mission due to the rolling of the ball on the length of the beam. This movement has an acceleration proportional to the angle of the beam [7]. The system is bounded input unbounded output because bounded beam angle gives unbounded ball position. Hence, the system must be controlled to position the ball at the desired position.

Figure 1.

Ball beam balancer system.

Most real systems are nonlinear and closed-loop controllers that can be a valuable approach to ensure sufficient performance. Many nonlinear control systems have been documented for academic education to learn about feedback control in control engineering courses. As a standard, the ball and beam is a classic example of such a system [8].

The ball and beam system has been studied and controlled using several control techniques by many researchers. In the previous, a good variety of methods is applied to this system [9, 10, 11, 12, 13].

Advertisement

2. System mathematical modeling

The ball and beam balancer system is a multi-loop system that contains two parts. The modeling of DC motor and the model derivation ball and beam. The system free-body of the ball and beam balancer system as shown in Figure 2 illustrates two DOF systems. One is moving the ball up and down on the beam and the other one is the beam rotating around its center. The demonstration of the whole system dynamics is complex therefore a simple mathematical model derivation is done to design the system controller.

Figure 2.

System free body [14].

The ball and beam balancer motion is shown in Figure 3. It can be seen that three forces acting on the ball are the rolling constraint force, the sliding component force due to gravity, which depends on the beam angle , and the reacting force.

Figure 3.

Ball and beam balancer motion.

The balancing forces are;

Fb=mgsinFr=mx¨E1

Fr is the ball rolling force and x is the ball position on the beam. By geometry, the ball position is rewritten as

x=αa´E2

α = angular displacement of the ball.a´= distance between the axis of the ball and the point of contact of the ball with the beam

The ball balancing torque τb is:

τb=Fra´=Jbα¨E3
Jb=25ma2E4

whereJb= ball moment inertia.a= ball radius.

The beam and motor torque can be derived. Since the beam bears the load of the ball and the input motor torque. The torque balance equation is:

τbm=τin=Jbm¨E5

where bm indicates the beam and motor and τinrepresents the torque produced by the motor.

τin=ktIinE6

Then, the obtained equations after simplification and substitution are;

1+25aα´2x¨=gsinE7

and

Jbm¨=ktIinE8

For linearization, it is assumed that the system operates at about 0° beam angle, and for small angles approximation sin=. Then Eq. (7) can be rewritten as

1+25aα´2x¨=gE9
aα´1
1+25x¨=gE10

Two transfer functions can be obtained, the first transfer function for the motor system relates to beam angles and the current inputIin. This transfer function is the inner loop transfer function. By taking Laplace transform of Eq. (8)

sIins=ktJbms2E11

The second transfer function is for the ball and beam system that relates to the ball position x and beam angle is obtained by taking Laplace to transform of Eq. (10). The parameters of the system that have been used in this paper are given in Table 1.

ParameterSymbolValueUnit
Beam and motor moment of inertiaJbm0.062kg.m2
Gravitational constantg9.81m /s2
Motor torque constantkt5.27Nm/A
Mass of the ballm0.01kg
Ball radiusɑ0.015m
Beam lengthl0.40m
Beam widthw0.004m

Table 1.

Parameters of the system.

xss=5g71s2E12

The overall open-loop system transfer function related to ball position to the current input can be written as.

xsIins=5gkt7Jbm1s4E13
Advertisement

3. PID controller

A proportional–integral–derivative controller (PID controller) is a generic feedback control mechanism as shown in Figure 4. PID controller is the most commonly used feedback controller. The controller is used to minimize the difference between the reference input and the controlled variable by manipulating the manipulated variable. PID controllers are the top first choice in the unknown process. However, the PID controller gains should be tuned carefully to obtain the greatest performance.

Figure 4.

Feedback control system with PID controller.

The PID controller design includes three parameters: proportional, integral, and derivative gains, denoted as P, I, and D, respectively [15, 16]. The proportional gain determines the reaction based on the present error, the integral gain calculates the reaction based on the sum of recent errors, and the derivative gain determines the reaction based on the rate of change of error. The PID controller can operate in different control mods since some processes need to use one mode or two mods to obtain the desired control. This is done by eliminating undesired control action and putting its gain to zero. PI, PD, P, or I controller mods is derived from standard PID controller in the nonappearance of the relevant control actions. PI controllers are the most commonly used in industrial applications since derivative action is sensitive to noise. On the other hand, the presence of an integral action makes the system output reaches its setpoint.

The PID controller operates on the error signal e(t), which is the difference between the desired setpoint r(t) and the measured output y(t) to yield a control signal u(t). PID controller has the general form.

ut=Kpet+Ki0tetdt+KdddtetE14

The desired closed-loop system characteristics are achieved by correcting the controller parameters 𝐾p, Ki, and 𝐾d, often by “tuning.” The proportional term may only achieve stability. The integral term guarantees the disturbance rejection. The derivative term is responsible for response shaping. Even though, the PID controllers are the most widely used class of control systems. It cannot be used in MIMO systems due to system complicity.

Applying Laplace transformation of Eq. (14) results in the transformed PID controller equation

UsEs=Kp+Kis+KdsE15

where the controller parameters are:

Proportional gain, Kp.

A large value gives a faster response and a very large value may cause an oscillatory and unstable system.

Integral gain, Ki.

A large value eliminates the steady-state error more quickly and increases overshoot. Very large values invite instability, integrator windup, or actuator saturation.

Derivative gain, Kd with a.

With a larger value, the response reaches the desired response faster, decreases overshoot, slows the transient response, and may cause instability.

The desired characteristic specification involves a good tuning control using adjusting the controller parameters to their optimum values. Sometimes PID controllers often offer satisfactory control; even their parameters did not tune. However, carefully tuning can improve the system performance, and poor tuning gives an unacceptable performance.

PID tuning is a challenging problem, the complex performance criteria should be achieved even with the limitations of PID control [17]. Different methods for loop tuning and techniques are more sophisticated and subjected to patents. In manual methods for loop tuning, if the system is online, the tuning method requires setting integral and derivative gains to zero and increasing the proportional gain until the output response becomes oscillatory. According to the “quarter amplitude decay” response, this gain is set to half of that value. Next, increase the integral gain until zero error is obtained for the process. Finally, increase the derivative gain, if necessary, until the output response reaches its steady state in presence of disturbance. However, too much high derivative gain will cause the output response overshoots the desired input and some systems cannot accept overshoot. Table 2 describes the effectiveness of increasing controller gains on the system response. The table is used as a reference and only help in calculating the values of controller parameters. Because these parameters are dependent on each other, changing one of these parameters can change the effect of the other two.

Controller parameterRise timeOvershootSettling timeSteady state error
𝐾PDecreaseIncreaseSmall changeDecrease
𝐾iDecreaseIncreaseIncreaseEliminate
𝐾dSmall changeDecreaseDecreaseNone

Table 2.

Effect of increasing 𝐾p, 𝐾i, and 𝐾d parameters in the closed-loop system.

There are different control techniques for tuning a PID controller. Many of these techniques require the transfer function of the system, then selecting controller gains Kp, Ki, and Kd depending on the system dynamics. The PID controller tuning method should be carefully chosen, for example, in practice, some loops take minutes or longer to reach steady state. Therefore, manual tuning could be an inefficient choice. In addition, tuning method selection depends on the type of tuning online or offline method. In the case of offline systems, some tuning methods require applying a step change to the system and measuring the output response. Then, use this reopens to calculate the controller gains. Table 3 illustrates the comparison between some tuning methods.

MethodAdvantagesDisadvantages
Manual TuningThe online method does not require mathTime-consuming, expert persons are required
Ziegler-NicholsEstablished Method, online methodSome trial and error is required, aggressive tuning
Software ToolsRegular tuning, online or offline method.Costs and training involved
Cohen-CoonGood process methodOffline method, Math required, deal with first-order processes only

Table 3.

PID controller tuning methods.

Advertisement

4. PID cascade controller design for ball beam balancer system

The suggested block diagram of the ball and beam balancer system consists of two-loop as shown in Figure 5. The inner loop is the motor control loop, and the outer loop, which is the ball beam control loop. In this paper, the design approach has to stabilize the inner loop first, and then the outer loop is controlled. The motor loop control is in series with ball and beam loop control.

Figure 5.

Block diagram of ball and beam balancer system.

In this research, the design of the PID cascade controller [18, 19, 20, 21] includes two control loops, an inner loop with a primary PID controller to control the beam angle, and an outer loop with a secondary PID controller to control the ball position. The secondary controller is designed to offset the effect of disturbances before it significantly affects the output of the controlled system. While the output of the first controller provides the reference for the second loop. This reduces any unexpected changes from the inner loop. The secondary controller adjusts the motor. There is a relation between motor angle and beam angle, any change in the motor angle causes a change in the beam angle. Therefore, the ball position is controlled by changing the beam angle.

The PID controller parameters are hard to tune when system parameters besides control action change while the system operates. So, in this research, the controller gains are tuned using a tuning tool in Simulink control design based on the performance and robustness of the system. The obtained PID controller parameters to control the system are illustrated in Table 4. The simulation of the PID cascade diagram of the ball and beam balancer system is shown in Figure 6.

ControllerKpKiKd
PID (inner loop)0.10870.00291.1465
PID (outer loop)26.217311.856312.8809

Table 4.

The best tuned PID controller parameters.

Figure 6.

Simulation diagram of ball and beam balancer system.

In this design, the ITAE criterion is used to compute the best PID controller gains. The ITAE index is the best selectivity of the performance indices because it measures the integration of error for a specific time as the system parameters are varied [7]. The ITAE index formula is:

ITAE=0ttetdt
Advertisement

5. Simulation results and discussion

The system is an unstable system with poles at the origin. So a controller is needed to control the system by looking at the response of the system that specifies some criteria. One of the first things that must be done is to decide upon a criterion for measuring how good the response is. For example, it does not matter how the response reaches a steady state but the steady state itself either has a large error or not. However, transient behavior is also important in determining the best response. For that, some criterion is introduced such as settling time, rise time, overshoot, and steady-state error.

PID cascade controller was designed and built using Matlab Simulink as shown in the previous section. To verify its performance in regulating the ball position of the ball and beam balancer system for different positions, such as step signal, step-change tracking signal, and sinusoidal signals were used as input test types for ball position in the simulation model. To test the robustness of the controlled system, the input disturbance step signal was used.

Firstly, the inner loop was controlled by tuning the controller parameters of the first PID until getting the best performance of the inner loop. After that, the second PID in the outer loop was tuned to get a stable response from the system. Figure 7 shows the step response of ball position using PID controllers, where the best parameters that give this response were tableted in Table 4.

Figure 7.

Step response of ball position using PID controller.

The designed controller stabilized the system with zero steady-state error. The system has a fast response and reached the steady-state value in short time. However, the system has an overshoot; but it is still an acceptable overshoot because the ball was still on the specified beam length. The performance specifications of the system using the PID cascade controller are summarized in Table 5.

Performance specification
Overshoot (OS %)25.4%
Peak Time0.036 sec.
Settling Time0.122 sec.
Steady State Error0
ITAE0.0006237

Table 5.

performance specifications of the system using PID controller.

The setpoint change was performed, starting with the ball at the middle of the beam (origin). At 1 second, the ball position changed to 0.1-meter position of the beam center, at 2 seconds the desired ball position changed to the left side of the beam at position 0.1 meter, the ball position was changed again to 0.15 meter at 4 seconds on the left side, and return to the middle of the beam at 5.5 seconds.

The setpoint-tracking signal contained changing the set point during the operation as shown in Figure 8. Using the PID controller, the system output perfectly tracked the setpoint changes of ball position.

Figure 8.

Step tracking response of the system.

In this research, the ball and beam balancer system was subjected to input disturbance with a force acting on a ball with 0.05 step at a time of 2 sec. The output response under effective of this disturbance is shown in Figure 9.

Figure 9.

Output response of the system with input disturbance.

The result showed that the disturbance affected the system at a time between 2 and 2.5 seconds. The designed controller can overcome this disturbance and reposition the ball to its setpoint in approximately 0.5 seconds.

The controlled system is tested for sinusoidal input and the result of the ball position is shown in Figure 10. As shown, the output response reached the desired input in a fast time, without overshoot and almost zero steady-state error.

Figure 10.

Output response for sinusoidal input.

Advertisement

6. Conclusion

This research was successfully elaborated and the PID cascade controllers were magnificently been designed. A model for a ball and beam system is well derived such that the free-rolling ball of the ball and beam system can be positioned at any desired location on the beam without falling. For a ball and beam balancer system, the most required criterion is that the system has a small or no overshoot and zero steady-state error. From the results and discussion in the previous section. The simulation results have shown that the suggested approach can stabilize the system efficiently. Furthermore, the performance during the transient period of the system is good where a small overshoot was obtained. In addition, the PID cascade controller provided a very small settling time and zero steady-state error. Moreover, the proposed controller has successfully tracked the step tracking signal and sinusoidal signal. For the disturbance, the designed controller approved its ability to reject the effect of disturbance. Therefore, it can be concluded that the robustness of PID cascade controllers was achieved.

References

  1. 1. Márton L, Lantos B. Stable adaptive ball and beam control. In: 2006 IEEE International Conference on Mechatronics. 2006. pp. 507-512
  2. 2. Rahmat MF, Wahid H, Wahab NA. Application of intelligent controller in a ball and beam control system. International Journal on Smart Sensing and Intelligent Systems. 2010;3(1):45-60. DOI: 10.21307/ijssis-2017-378
  3. 3. Ali AT, Taha OA. Design and implementation of ball and beam system using PID controller. Automatic Control and Information Sciences. 2017;3(1):1-4
  4. 4. Oh S-K, Jang H-J, Pedrycz W. The design of a fuzzy cascade controller for ball and beam system: A study in optimization with the use of parallel genetic algorithms. Engineering Applications of Artificial Intelligence. 2009;22(2):261-271
  5. 5. Wang L-X. Stable and optimal fuzzy control of linear systems. IEEE Transactions on Fuzzy Systems. 1998;6(1):137-143. DOI: 1063-6706(98)00848-0
  6. 6. Meiling Ding BL, Wang L. Position control for ball and beam system based on active disturbance rejection control. Systems Science & Control Engineering. 2019;7(1):97-108. DOI: 10.1080/21642583.2019.1575297
  7. 7. Amjad KIM, Abdullah SS, Shareef Z. A simplified intelligent controller for ball and beam system. In: Presented at the International Conference on Education Technology and Computer. 2010
  8. 8. Al-dujaili Q, Humaidi AJ, Pereira DA, Ibraheem IK. Adaptive backstepping control design for ball and beam system. International Review of Applied Sciences and Engineering. Jul 2021;12(3):211-221. DOI: 10.1556/1848.2021.00193
  9. 9. Hauser J, Sastry S, Kokotovic P. Nonlinear control via approximate input-output linearization: The ball and beam example. In: IEEE Transactions on Automatic Control. Mar 1992;37(3):392-398. DOI: 10.1109/9.119645
  10. 10. Nguyen HNPCX, Lukianov AD, Pham TD, Nguyen TT, Nguyen HT. Design of an embedded control system based on the quasi-time optimal control law when limiting the control signal for the ball and beam system. In: XV International Scientific-Technical Conference “Dynamic of Technical Systems”. 2018
  11. 11. Mustafa Saad MK. Design and implementation of an embedded ball-beam controller using PID algorithm. Universal Journal of Control and Automation. 2017;5(4):63-70. DOI: 10.13189/ujca.2017.050402
  12. 12. Meenakshipriya B, Kalpana K. Modelling and control of ball and beam system using coefficient diagram method (CDM) based PID controller. IFAC Proceedings Volumes. 2014;47(1):620-626
  13. 13. Aguilar-Ibañez C, Suarez-Castanon MS, Rubio JDJ. Stabilization of the ball on the beam system by means of the inverse Lyapunov approach. Mathematical Problems in Engineering. 2012;2012:810597. DOI: 10.1155/2012/810597
  14. 14. Rosales EA. A Ball-on-Beam Project Kit. MA, USA: Massachusetts Institute of Technology; 2004
  15. 15. Lloyds Raja G, Ali A. New PI-PD controller design strategy for industrial unstable and integrating processes with dead time and inverse response. Journal of Controlled Automative Electrical System. 2021;32:266-280. DOI: 10.1007/s40313-020-00679-5
  16. 16. Kumari S, Aryan P, Raja GL. Design and simulation of a novel FOIMC-PD/P double-loop control structure for CSTRs and bioreactors. International Journal of Chemical Reactor Engineering. 2021;19(12):1287-1303. DOI: 10.1515/ijcre-2021-0140
  17. 17. Lawrence B. Tuning of A PID Controller for Optimal Performance of Ball and Beam System. IJERT; 2020
  18. 18. Ali GLR. Design of Cascade control structure for stable processes using method of moments. In: 2nd International Conference on Power and Embedded Drive Control. 2019
  19. 19. Raja AAGL. Modified series cascade control strategy for integrating processes. In: Indian Control Conference. 2018
  20. 20. Raja AAGL. Enhanced series Cascade control strategies for unstable processes. In: 4th International Conference on Electrical Energy Systems. 2018
  21. 21. Lloyds Raja AAG. Enhanced tuning of Smith predictor based series cascaded control structure for integrating processes. ISA Transactions. 2021;14:191-205. DOI: 10.1016/j.isatra.2020.12.045

Written By

Mustafa Saad

Submitted: 26 April 2022 Reviewed: 01 June 2022 Published: 17 May 2023