LQR
LQR
LQR
CONTROL
Linear Quadratic
Regulator
Abdul monem alqzeeri 744
Control Theory
Optimal Control
Examples
Application
Conclusion
Motivation for Control
Engineering
• Control has a long history which began with the early
desire of humans to harness the materials and forces of
nature to their advantage Ex(mechanisms for keeping
wind-mills pointed into the wind).
Accuracy.
Noise. Sensitivity.
Speed. Stability.
Bandwidth
.
Branches of Control
Engineering
Maximize
Minimize
Pontryagin Kalman
(1988 –1908) BELLMAN 2016- 1930))
(1920 -1984)
By 1958, L.S.
Pontryagin had In 1960 three major papers
developed his maximum R. Bellman [1957] applied were published by R.
principle, which solved dynamic programming to Kalman and coworkers One
optimal control problems the optimal control of of these papers discussed
relying on the calculus discrete-time systems. the optimal control of
of variations developed systems, providing the
by L. Euler (1707-1783). design equations for the
linear quadratic regulator
(LQR).
LINEAR QUADRATIC REGULATOR
An automated algorithm for finding optimal feedback for a
linear system in state space form.
LQR determines the feedback law to find in the least time with
the least control effort.
If our objective is to keep the state x(t) near zero then we call it
state regulator system.
If we try to keep the output or state near a desired state or
output, then we are dealing with a tracking system.
WHY LQR
• Different techniques (such as: full-state-feedback, PID, root
locus…) are used in designing of control systems (i.e. obtaining
of control-gains to achieve desired closed-loop characteristics)
irrespective of the magnitude of the gains.
• Or :
LQR DESIGN:
PROBLEM OBJECTIVE
Q R
LQR DESIGN:
PROBLEM STATEMENT
• Performance Index (to minimize):
• Path Constraint:
• Boundary
Conditions:
LQR DESIGN:
NECESSARY CONDITIONS OF
OPTIMALITY
• Hamiltonian:
• State Equation:
LQR DESIGN:
NECESSARY CONDITIONS OF
OPTIMALITY
• Costate Equation:
• Terminal penalty:
• Boundary Condition:
LQR DESIGN:
DERIVATION OF RICCATI
EQUATION
LQR DESIGN:
DERIVATION OF RICCATI
EQUATION
• Riccati equation:
• Boundary condition:
EXAMPLE - INVERTED PENDULUM
EXAMPLE - INVERTED PENDULUM
EXAMPLE - INVERTED PENDULUM
EXAMPLE - MATLAB
1-CLEAR;CLC ';u=-(K*x')-15
2-ALPHA=0.5; subplot(2,2,1);plot(t,x1);grid-16
3-A=[0 1 0;0 0 1; -35 -27 -5]; xlabel('t(sec)')-17
4-B=[0;0;1]; ylabel('x1')-18
5-Q=[1 0 0;0 1 0; 0 0 1]; subplot(2,2,2);plot(t,x2);grid-19
6-R=ALPHA*1; xlabel('t(sec)')-20
7-[K,P,E]=LQR(A,B,Q,R); ylabel('x2')-21
8-D=ZEROS; subplot(2,2,3);plot(t,x3);grid-22
9-SYS=SS(A-B*K,EYE(3),EYE(3),ZEROS(3,3)); xlabel('t(sec)')-23
10-T=0:0.01:4; ylabel('x3')-24
11-X=INITIAL(SYS,[1;1;1],T); subplot(2,2,4);plot(t,u);grid-25
12-X1=[1 0 0]*X'; xlabel('t(sec)')-26
13-X2=[0 1 0]*X'; ylabel('u')-27
28ylabel('u')
14-X3=(K*X')';
EXAMPLE - MATLAB
EXAMPLE - MATLAB
EXAMPLE - ALGEBRAIC RICCATI EQUATION
EXAMPLE - ALGEBRAIC RICCATI EQUATION
EXAMPLE - ALGEBRAIC RICCATI EQUATION
EXAMPLE - ALGEBRAIC RICCATI EQUATION
APPLICATION
Current research suggests the use of a liner quadratic performance
index for optimal control of regulators in various applications. Some
examples include correcting the trajectory of rocket and air
vehicles, and airplane stability, Segway and robotics.
CONCLUSIONS