The system to be investigated in this project is a ball and beam system. This system is one of the classical systems in control theory. Due to properties such as nonlinearity and inherent instability caused by gravity and external disturbances such as mechanical sliding, it can be a suitable system for analysis and design.
The ball is allowed to move with one degree of freedom on the beam. One end of the beam is connected to a servo motor via a lever, which determines the height and angle of rotation of the beam by the servo motor. When, for example, the servo motor gear rotates with an angle α, it changes the angle of the beam by θ. By changing the angle of the beam relative to the horizontal position, gravity causes the pendulum to slide along the beam, and as a result, the position of the ball can be moved back and forth by the servo motor and the lever connected to it. The ultimate goal of this system is to control it in such a way that ball remains at a desired point on the beam and external disturbances do not affect its position.To model the losses and friction of the motor and the conveyor belt that transfers force to the beam, we use a damper with a constant of b. And to model the delay that occurs, we use a spring with stiffness K. Ultimately, considering the described conditions, the equations governing the system will be as follows:
The values of the parameters are written as follows:
Symbol | Parameter | Value |
---|---|---|
Ball mass | ||
Ball radius | ||
Beam friction | ||
Spring stiffness | ||
Force application distance | ||
Moment of inertia of the beam | ||
Moment of inertia of the ball | ||
Gravity of earth |
To study the behavior of the system, 4 state variables, 1 control input, and 2 outputs are defined as follows:
-
$x_1$ : position of the ball -
$x_2$ : velocity of the ball -
$x_3$ : Angle of the beam -
$x_4$ : Angular velocity of the beam -
$u$ : Input voltage - Outputs: position of the ball & angle of the beam
State equations are written as follows:
$\dot{x_1}=x_2$ $\dot{x_2}=\frac{A_{22}\times C_1-A_{12}\times C_2}{det(A)}$ $\dot{x_3}=x_4$ $\dot{x_4}=\frac{-A_{21}\times C_1+A_{11}\times C_2}{det(A)}$
Where
The state values over a 10-second period are illustrated below.
The set of differential equations is linearized around the
$\dot{X} = AX+Bu$ $Y = CX + Du$
Where
Eigen values of the linearized system are outlined as:
Since
The controllability matrix is presented as:
Since the controllability matrix is full-rank, the system is controllable.
Also, the observability matrix is presented as:
Since the observability matrix is full-rank, the system is observable.
The transform function is written as follows:
Since order of the transform function is equal to the number of state variables, the system representation is minimal.
Poles of
Zeros of
Coefficients less than 1e-4 are considered to be 0.
Non-linear system
The non-linear system is simulated as below. The simulation results of the non-linear system with a PID controller is shown below.
3D render | Step response |
---|---|
Linearized system
The linearized system is also tuned using a PID controller, with the following properties.
The step response is shown below. This system cannot be stabilized using a compensator.
If we remove the unstable pole of the system, the linearized system will be stabilized, but the main non-linear system will still remain unstable.
Non-linear system The simulation results of the non-linear system are presented as follows.
3D render | Step response |
---|---|
Linearized system
The linearized system is also tuned using a PID controller, with the following properties.
The simulation results of the linearized system are presented as follows.
States | Outputs |
---|---|
Two state feedbacks are designed with fast and slow poles.
- Fast poles =
$[-3, -4, -5, -6]$ - Slow poles =
$[-0.5, -0.7, -0.9, -1.1]$
\ | Fast poles | Slow poles |
---|---|---|
State feedback gain | ||
Step response | ||
Outputs |
As evident from both systems, the slower poles exhibit smoother movement and require more time to converge. However, a challenge arises when adjusting the poles: the final output value changes accordingly, unless the system converges to zero.
Therefore, if the system is slow, the final value will be large, whereas a design with fast poles will yield a smaller final value, as demonstrated by this example, approximately 0.07.
A white noise with a power of 0.3 and a 10-second sampling time is introduced into the system.
The outputs for both state feedbacks are depicted below.
\ | Fast poles | Slow poles |
---|---|---|
Outputs |
The final value changes every time the disturbance is added.
A reference tracker is designed with state feedback and integral control with the following properties.
Since
- State feedback gain:
$K=[34.05 , 18.85 , 39.64 , 5.32 , -14.69]$ .
States | Outputs |
---|---|
A white noise with a power of 0.3 and a 20-second sampling time is introduced into the system.
States | Outputs |
---|---|
As shown, whenever a disturbance is added, the system attempts to track the input and eliminate the disturbance.
Since
where
The step response of the linearized system with the aforementioned state feedback
A reduced-dimensional state estimator is desined based on the following procedure.
$\dot{X} = A_{n\times n}X_{n\times 1} + B_{p\times n}u_{p\times 1}$ $y_{l\times 1} = C_{l\times n}X_{n\times 1}$
- Select an arbitrary
$(n-l) \times (n-l)$ stable matrix$F$ that has no eigenvalues in common with those of$A$ .
- Select an arbitrary
$(n-l) \times l$ matrix$L$ such that$(F,L)$ is controllable.
- Solve the unique
$T$ in the Lyapunov equation$TA-FT=LC$ . Note that$T$ is an$(n-l)\times n$ matrix.
- If
is singular, go back to step 2; otherwise,
consider the
is an estimate of
The step response of the linearized system with the aforementioned state feedback
States | Error |
---|---|
where
The step response of the non-linear system with the aforementioned state feedback
States | Error |
---|---|
where
A single interval square signal is added as disturbance with the following properties.
$Amplitude = ±0.1$ $Delay = 5s$ $Width = 0.05s$
The step response of the non-linear system with the aforementioned state feedback
Disturbance | Amplitude = 0.1 | Amplitude = -0.1 |
---|---|---|
States | ||
Outputs | ||
3D render |
- Chen, C. (1995). Linear System Theory and Design.
- Course: Modern Control Systems [ECE 447]
- Semester: Fall 2023
- Institution: School of Electrical & Computer Engineering, College of Engineering, University of Tehran
- Instructor: Dr. Kebriaei
- Contributors: Fardin Abbasi, Mohammad Mashreghi