Exp-9 ACS Lab
Exp-9 ACS Lab
Aim: - To design and implement control action for maintaining a pendulum in the upright position
(even when subjected to external disturbances) through LQR technique in an Arduino Mega.
Inverted Pendulum System Design:
System modelling is performed to obtain the equation utilised for the TWSB robot's cart and
pendulum. In order to get optimal control term values for the TWSB robot, the outcome of system
modelling will be transferred into MATLAB for simulation. The equation is derived as stated below
in accordance with below Figure.
The response force N is calculated by adding the forces in the horizontal direction of the free-body
diagram of the pendulum.
The second equation of motion for this system is obtained by adding the forces perpendicular to the
pendulum. Using this axis to solve the problem substantially simplifies the maths. You need to get
the following equation:
To eliminate the P and N terms from the above equation, add the moments around the pendulum's
centroid to get the following equation.
This set of equations must be linearized since the analysis and control design approaches, we shall
utilise in this example apply solely to linear systems. Specifically, we will linearize the equations
pertaining to the vertically upward equilibrium position, 𝜃 = π, and assume that the system remains
inside a limited region around this equilibrium. This assumption should be reasonable given that,
while under control, the pendulum should not stray more than 20 degrees from its vertically upward
position.
∅ must reflect the positional deviation of the pendulum from equilibrium that is 𝜃 = 𝜋 + ∅. Again,
assuming a tiny (∅) deviation from equilibrium, we may approximate the nonlinear functions in our
system equations using the following small-angle approximations:
After substituting the aforementioned approximations into our nonlinear governing equations, we get
two linearized motion equations. The letter F has been replaced by the letter u.
To derive the transfer functions of the linearized system equations, we must first apply the Laplace
transform to the system equations with starting conditions of zero. Below are the obtained Laplace
transforms.
Remember that a transfer function describes the connection between a single input and a single
output.
The above transfer function demonstrates that the origin contains both a pole and a zero.
These may be eliminated, rendering the transfer function as follows.
In a similar fashion, the transfer function with the cart position X(s) as the output may
be constructed to get the following.
Result:-
We have successfully study to the design and implement control action for maintaining a pendulum
in the upright position (even when subjected to external disturbances) through LQR technique in an
Arduino Mega.