100% found this document useful (1 vote)
160 views

Exp-9 ACS Lab

The document describes an experiment to design and implement control of an inverted pendulum system using LQR technique. It involves modeling the system to obtain equations of motion, linearizing the equations, and deriving transfer functions relating input and outputs. LQR control is then used to stabilize the system and maintain the pendulum in the upright position despite external disturbances. The LQR controller was implemented on an Arduino Mega and results showed the control action was successful at keeping the pendulum balanced.

Uploaded by

Anand Saini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
160 views

Exp-9 ACS Lab

The document describes an experiment to design and implement control of an inverted pendulum system using LQR technique. It involves modeling the system to obtain equations of motion, linearizing the equations, and deriving transfer functions relating input and outputs. LQR control is then used to stabilize the system and maintain the pendulum in the upright position despite external disturbances. The LQR controller was implemented on an Arduino Mega and results showed the control action was successful at keeping the pendulum balanced.

Uploaded by

Anand Saini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Experiment -9

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.

Figure: Inverted pendulum cart


M - Mass of Cart (kg)
m - Mass of Pendulum (kg)
b - Coefficient of Friction (N/ms-1)
l - Length to Pendulum Centre of Mass (m)
I - Mass Moment of Pendulum Inertia (kgm2) F -
Force (N)
x - Position Coordinate θ
theta - Pendulum Angle
Φ - Deviation of Pendulum Position from Equilibrium
By adding the forces in the horizontal free-body diagram of the cart, the following equation of
motion is obtained.

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.

By combining equations (3) and (4), it is possible to remove P and N terms.

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.

Then, substitute the above into the second equation.

The transfer function may be rearranged as follows:

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.

Linear-Quadratic Regulator Controller (LQR): -


LQR is a technique in current control theory that analyses such a system using a state space
approach. It is quite straightforward to deal with a multi-output system using state-space approaches.
Full state feedback may be used to stabilise the system. When LQR is implemented, a substantial
quantity of data gathered from experimental methods is necessary for network testing and training.
This problem limits the deployment of LQR controllers, despite the fact that this form of controller
may include intelligence and automation elements into the system being created. During the
deployment of LQR, it is necessary to gather a considerable quantity of experimental data for use in
network testing and training. This problem limits the implementation of LQR, despite the fact that
this form of controller may give intelligent and automated system characteristics.
Figure : LQR control system

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.

You might also like