Inverted Pendulum Control using Pole Placement Technique
Control Systems
Non-Linear Dynamical System
- Non-Linear System is a system in which the change of the output is not linearly proportional to the change of the input.
- Non-Linear Dynamical Systems that describe changes in variable over time may often appear unpredictable.
- The state variables, represented as a vector x, capture the system's memory or variables of interest, while inputs u influence the system.
- The system's behavior is compactly expressed using the state equation f.
x – State, u – Input, x˙ = f(t,x,u)
- State Equation of the System
- The inverted
pendulum is a non-linear system because its equations of motion are non-linear
due to the presence of trigonometric functions like sin(θ) and cos(θ), where θ is the angle of the pendulum.
- The pendulum’s dynamics depend on both the angle θ and its angular velocity θ˙.
Mathematical Modeling of a System
The Euler-Lagrange method is used to
derive the equations of motion of a given system.
Euler-Lagrange Method
The Euler-Lagrange method states that the
equations of motion of a system can be obtained by solving the following
equation:
L is the Lagrangian which is the difference
between the Kinetic Energy and Potential Energy of the system.
x and x˙ are the state variables (position and velocity respectively).
In this pendulum system the mass of the
bob is m. The length of rod to which the bob is attached to is l.
Assume the rod to be rigid and have no mass. So, all the mass is concentrated
to the bob.
While swinging, at any arbitrary point in
the pendulum’s trajectory, it can assume to be at a height h from the
bottom.
To calculate the Lagrangian L for
this system, compute the Kinetic Energy and Potential Energy of this system.
Since the pendulum bob is oscillating in a circular trajectory, using rotational mechanics the Kinetic Energy can be given by:
I is the moment of inertia of bob, w
is the angular velocity.
θ˙ and θ are the state
variables of the system.
External Force Acting on the System
Any non-conservative force acting on the
system appears on the right side of the Euler-Lagrange equation.
Introduction to Pole Placement Technique
- Pole Placement is a powerful method used in control
systems design to ensure that the system behaves in a desired way.
- This technique involves adjusting the system's closed-loop poles by designing an appropriate feedback controller.
- Poles determine the stability, speed of response, and oscillatory behavior of a system, making their placement critical for achieving the desired performance.
- It requires the system to be controllable, meaning all states must be influenced by the input.
- If the system is completely state controllable, then the poles of the closed loop system may be placed at any desired location.
- By choosing the appropriate state feedback gain matrix K it is possible to decide the desired closed loop pole location.
- Let the system
- Let the control signal u = -Kx
Substituting u = - Kx in the system state equation
The stability and transient response characteristics are determined by eigen values of the matrix A- BK
Key Concepts:
1. Poles and Stability:
Poles of a system are the roots of its characteristic equation. For a system to
be stable, all poles must lie in the left-half of the complex plane (for
continuous-time systems).
2. State Feedback:
Pole placement uses state feedback, where the system's state variables
are fed back into the system via a gain matrix K. The feedback law is:
u=−Kx
where u is
the control input and x is the state vector.
3. Closed-Loop Dynamics:
By applying state feedback, the new closed-loop system dynamics are given by:
x˙=(A−BK)x
where A and
B are the system matrices. The eigenvalues of A−BK determine the
closed-loop poles.
The eigen values of A-BK is called as regulator
poles
Placing the regulator poles in the desired location is called as pole placement technique.
4. Design Objective:
The goal is to compute the feedback gain K such that the closed-loop poles are
placed at desired locations for the required stability and performance.
Introduction to State Space Analysis
- A state-space representation is a mathematical model of a physical system as a set of input, output and state variables related by first-order differential equation.
- State variables are variables whose values evolve through time and depends on the externally imposed values of input variables.
- Output variables depend on the values of the state variables.
x(t)- State Vector
y(t)- Output Vector
u(t)- Input Vector
A - State Matrix
B - Input Matrix
C - Output Matrix
D - Feed-Forward Matrix
1. Find the equilibrium points
- Set x˙1 =0 and x˙2 =0
- Equilibrium points of pendulum system are (nπ,0) where n =0,±1,±2,..
- There are only two equilibrium positions (0,0) and (π,0). The remaining equilibrium points are repetitions based on number of full swings of the pendulum.
- The equilibrium point (0,0) will be when the pendulum bob is vertically downwards.
- The equilibrium point (π,0) will be when the pendulum bob is vertically upwards.
- The system will be stable at equilibrium point (0,0) and unstable at equilibrium point (π,0).
2. Calculate the Jacobian of the system of equations
The Jacobian for the A matrix of the state equation will be:
Since the system has input, also calculate Jacobian for the B
matrix.
Since T is input, replace T with u
3. For each equilibrium point, substitute value of (x1, x2) in the Jacobian and calculate the A and B matrix
The values of A matrix for each equilibrium point will be:
The values of B matrix for all equilibrium points will be:
4. Construct the state equation for each equilibrium point
The state equation for equilibrium point (0,0) will be:
The state equation for equilibrium point (π,0) will be:
5. Check the stability of the system at each equilibrium point
At equilibrium point (0,0) the eigenvalues will be:
At equilibrium point (π,0) the eigenvalues will be:
- The eigenvalues for (0,0) will be purely imaginary. Hence the system will be marginally stable.
- System will be continuing to oscillate about the equilibrium point (0,0).
- The eigenvalues for (π,0) will be purely real. One of the eigenvalues will have positive real part. Hence the system will be unstable.
- The system will be stable for (0,0) and unstable for (π,0).
Note: Inverted Pendulum can be achieved by using Pole Placement Technique to stabilize the unstable equilibrium point (π,0).
Controllability
A system is said to be controllable at time t =
t0, if it is possible by means of an unconstrained control
vector to transfer the system from any initial state x(t0)
to any other state in the finite interval of time.
A matrix which determines if a system is
fully controllable or not is called the controllability matrix.
Controllability matrix (R) of a
system is
If a system is fully controllable, then rank(R) = n
Controllability of the Pendulum (with external torque)
The rank of R is 2 which is equal
to the number of state variables. Hence the system is fully controllable.
Pole Placement Technique
Determination of Matrix K using Direct Substitution Method
If the order of the system is less than or equal to 3, direct
substitution of matrix K into the desired characteristics polynomial will
be simpler.
Step 1: Check the controllability condition for the system
Pendulum system is fully controllable.
Step2:
Using the desired eigen values
(desired closed loop poles), the desired characteristics polynomial is written
as follows
Let μ1 = -1, μ2 = -2(left-half of the complex plane for stability) are the
desired closed loop poles.
(s - μ1)(s - μ2) = s2
+ 3s + 2
Step 3: Determine the values of k1,
k2
K = [k1, k2]
Since both sides of this equations are polynomials in s, the coefficient of like powers can be equated to get the K values.
The block diagram corresponding to
the system
K is not unit for the given system. It depends on the desired closed loop poles. Selection of desired closed loop poles depends on the response characteristics.
Code Link
Comments
Post a Comment