SlideShare a Scribd company logo
Optimum controller design
Dr.R.SUBASRI
Associate. Professor
Dept .of EIE
17.03.2015
soamisuba@yahoo.comDr.R.Subasri,KEC,INDIA
Problem Definition
To control the deflection of pendulum () and
cart’s position(x).
Dr.R.Subasri,KEC,INDIA
Control Requirements
-SISO System
• The pendulum should return to its upright
position within 5 seconds (Settling time)
• The position of pendulum should never move
more than 0.05 radians away from the
vertical.
Transfer function model with impulse
input
Dr.R.Subasri,KEC,INDIA
Parameters
• mass of the cart (M) :0.5 kg
• mass of the pendulum (m) :0.5 kg
• friction of the cart (b) :0.1 N/m/sec
• length to pendulum center
of mass(l) : 0.3 m
• Inertia of the pendulum (I) : 0.006 kg*m^2
• Force applied to the cart :F
• Cart position coordinate : x
• pendulum angle from vertical :
Dr.R.Subasri,KEC,INDIA
Mathematical modeling
• Summing the forces in the Free Body Diagram
of the cart in the horizontal direction
• Summing the forces in the Free Body Diagram
of the pendulum in the horizontal direction
Mx bx N F+ + =
2
N mx mlθcosθ mlθ sinθ= + −
2
(M m)x bx mlθcosθ mlθ sinθ F+ + + − =
First equation of motion:
Dr.R.Subasri,KEC,INDIA
• sum the forces perpendicular to the pendulum
• Second equation of motion:
2
(I ml )θ mglsinθ mlxcosθ+ + = −
Linearise the equations about vertical equilibrium angle
( = )
Let  represent the deviation of the pendulum's
position from equilibrium, that is  =  + 
Approximations of small angle
sin ( + ) =- 
cos ( + ) = -1
Dr.R.Subasri,KEC,INDIA
Mathematical modeling
• The two linear equations of motions are:
( )2
I ml φ mglφ mlx
(M m) x bx mlφ u
+ − =
+ + − = Control Force F
replaced by u
Dr.R.Subasri,KEC,INDIA
Transfer function model
• Use Laplace transform to derive the transfer
function model
• Where,
2
2
4 3 2
ml
s
φ(s) q
U(s) b(I ml ) (M m)mgl bmgl
s s s s
q q q
=
+ +
+ − −
( )( )2 2
q M m I ml (ml) = + + − 
Dr.R.Subasri,KEC,INDIA
open-loop response
-transfer function model
• M = .5; m = 0.2; b = 0.1;
• i = 0.006; g = 9.8;
• l = 0.3;
• q = (M+m)*(i+m*l^2)-(m*l)^2; %simplifies input
• num = [m*l/q 0]
• den = [1 b*(i+m*l^2)/q -(M+m)*m*g*l/q -b*m*g*l/q]
output should be:
• num = 4.5455 0
• den = 1.0000 0.1818 -31.1818 -4.4545
Dr.R.Subasri,KEC,INDIA
open-loop response
-transfer function model
• To observe the system's velocity response to an
impulse force applied to the cart add the following
lines at the end m-file:
• t=0:0.01:5;
• impulse(num,den,t)
• axis([0 1 0 60])
The response is entirely
unsatisfactory.
It is not stable in open loop.
Dr.R.Subasri,KEC,INDIA
Closed loop response-transfer function model
• As the pendulum's position should return to
the vertical after the initial disturbance, the
reference signal should be zero.
• The force applied to the cart can be added as
an impulse disturbance.
Dr.R.Subasri,KEC,INDIA
Effect of PID controller
• kd = 1;k = 1;ki = 1;
• numPID = [kd k ki];
• denPID = [1 0];
• numc = conv(num,denPID)
• denc = polyadd(conv(denPID,den),
conv(numPID,num))
numc = 4.5455 0 0
denc = 1.0000 4.7273 -26.6363 0.0910 0
Dr.R.Subasri,KEC,INDIA
Closed loop Impulse response with PID
• t=0:0.01:5;
• impulse(numc,denc,t)
• axis([0 1.5 0 40])
This response is still
not stable.
Dr.R.Subasri,KEC,INDIA
Closed loop Impulse response with PID
• increasing the proportional control (k) ,
k=100;
axis([0, 2.5, -0.2, 0.2])
The settling time is
acceptable at about
2 sec.
The overshoot is high
Dr.R.Subasri,KEC,INDIA
Closed loop Impulse response with PID
• increase kd as 20
The overshoot has been
reduced so that the
pendulum does not
move more than 0.05
radians away from the
vertical.
Dr.R.Subasri,KEC,INDIA
Control Requirements
-MIMO System
• To control both the pendulum's angle and the
cart's position.
• The cart should achieve it's desired position
within 5 seconds (settling time)
• Rise time under 0.5 seconds.
• Pendulum's overshoot to 20 degrees (0.35
radians), and it should also settle in under 5
seconds.
-State space model with step inputDr.R.Subasri,KEC,INDIA
State space model
• After a little algebra, the linearized system
equations can also be represented in state-
space form:
Dr.R.Subasri,KEC,INDIA
• R - commanded step input to the cart (step
input of 0.2 m)
• 4 states X– the position and velocity of the
cart and the angle and angular velocity of the
pendulum.
• output y - both the position of the cart and
the angle of the pendulum.
Dr.R.Subasri,KEC,INDIA
Open loop response
• M = 0.5; m = 0.2; b = 0.1; i = 0.006; g
= 9.8; l = 0.3;
• p = i*(M+m)+M*m*l^2; %denominator
• A = [0 1 0 0;
0 -(i+m*l^2)*b/p (m^2*g*l^2)/p 0;
0 0 0 1;
0 -(m*l*b)/p m*g*l*(M+m)/p 0];
B = [0; (i+m*l^2)/p; 0; m*l/p];
C = [1 0 0 0; 0 0 1 0];
D = [0;0];
p = eig(A)
Dr.R.Subasri,KEC,INDIA
• Eigen Values are
p = 0 -0.1428 5.5651 -5.6041
one right-half-plane pole at 5.5651,the system
is unstable in open loop.
• blue line - the cart's position
• green line - the pendulum's angle.Dr.R.Subasri,KEC,INDIA
State feedback controller
Open Loop:
Closed Loop:
Dr.R.Subasri,KEC,INDIA
State feedback controller
• t = 0:0.01:3;
• u = 0.2*ones(size(t));
• p1=-0.8+1.351i;
• p2=-0.8-1.351i;p3=-4;p4=-5
• K = place(A,B,[p1 p2,p3,p4])%%% controller
gain
• %input
• [y,x]=lsim(A-B*K,B,C,D,u,t);
• plot(t,y(:,1),'r',t,y(:,2))
Dr.R.Subasri,KEC,INDIA
Closed Loop response
Dr.R.Subasri,KEC,INDIA
Boost converter
• A=[0 -0.2 ; 40 -20]
• B=[ 0.5;0];
• C=[ 1 0];
• Pole: -3 , -3
Dr.R.Subasri,KEC,INDIA
Linear Quadratic Regulator (LQR) Controller
• The lqr function allows to choose two
parameters, R and Q, which will balance the
relative importance of the input and state in
the cost function to be optimized.
• The simplest case is to assume R=1, and
Q=C'*C.
• Essentially, the lqr method allows for the
control of both outputs. The controller can be
tuned by changing the nonzero elements in
the Q matrix to get a desirable response.
Dr.R.Subasri,KEC,INDIA
• The structure of Q, is C'*C
• 1 0 0 0
• 0 0 0 0
• 0 0 1 0
• 0 0 0 0
• The element in the (1,1) position will be used
to weight the cart's position and the element
in the (3,3) position will be used to weight the
pendulum's angle.
Find the K matrix that will give a good controller.
Dr.R.Subasri,KEC,INDIA
• x=1;y=1;
• Q=[x 0 0 0; 0 0 0 0; 0 0 y 0; 0 0 0 0];
• R = 1;
• K = lqr(A,B,Q,R)
• Ac = [(A-B*K)];
• Bc = [B];
• Cc = [C];
• Dc = [D]; T=0:0.01:5;
• U=0.2*ones(size(T));
• [Y,X]=lsim(Ac,Bc,Cc,Dc,U,T);plot(T,Y)
Dr.R.Subasri,KEC,INDIA
Closed loop response-LQR
• K = -1.0000 -1.6567 18.6854 3.4594
Dr.R.Subasri,KEC,INDIA
• Using x=5000 and y=100, the following value
of K and step response were found:
• K = -70.7107 -37.8345 105.5298 20.9238
All of the design requirements have been met
with the minimum amount of control effortDr.R.Subasri,KEC,INDIA
Thank you
Dr.R.Subasri,KEC,INDIA

More Related Content

What's hot

Operators n dirac in qm
Operators n dirac in qmOperators n dirac in qm
Operators n dirac in qmAnda Tywabi
 
Servo systems
Servo systemsServo systems
Servo systems
cairo university
 
Ladder operator
Ladder operatorLadder operator
Ladder operator
MehboobAlam59
 
Bhdpis1
Bhdpis1Bhdpis1
Bhdpis1
foxtrot jp R
 
Achieve asymptotic stability using Lyapunov's second method
Achieve asymptotic stability using Lyapunov's second methodAchieve asymptotic stability using Lyapunov's second method
Achieve asymptotic stability using Lyapunov's second method
IOSRJM
 
Linear quadratic regulator and pole placement for stabilizing a cart inverted...
Linear quadratic regulator and pole placement for stabilizing a cart inverted...Linear quadratic regulator and pole placement for stabilizing a cart inverted...
Linear quadratic regulator and pole placement for stabilizing a cart inverted...
journalBEEI
 
Tensor analysis
Tensor analysisTensor analysis
Tensor analysis
University of Education
 
Adaptive Control Scheme with Parameter Adaptation - From Human Motor Control ...
Adaptive Control Scheme with Parameter Adaptation - From Human Motor Control ...Adaptive Control Scheme with Parameter Adaptation - From Human Motor Control ...
Adaptive Control Scheme with Parameter Adaptation - From Human Motor Control ...toukaigi
 
Sliding Mode Controller Design for Hybrid Synchronization of Hyperchaotic Che...
Sliding Mode Controller Design for Hybrid Synchronization of Hyperchaotic Che...Sliding Mode Controller Design for Hybrid Synchronization of Hyperchaotic Che...
Sliding Mode Controller Design for Hybrid Synchronization of Hyperchaotic Che...
ijcsa
 
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
Mike Simon
 
LYAPUNOV STABILITY PROBLEM SOLUTION
LYAPUNOV STABILITY PROBLEM SOLUTIONLYAPUNOV STABILITY PROBLEM SOLUTION
LYAPUNOV STABILITY PROBLEM SOLUTION
rohit kumar
 
Discrete control
Discrete controlDiscrete control
Discrete control
cairo university
 
Generalized Laplace - Mellin Integral Transformation
Generalized Laplace - Mellin Integral TransformationGeneralized Laplace - Mellin Integral Transformation
Generalized Laplace - Mellin Integral Transformation
IJERA Editor
 
Numerical analysis m3 l6slides
Numerical analysis m3 l6slidesNumerical analysis m3 l6slides
Numerical analysis m3 l6slides
SHAMJITH KM
 
Av 738- Adaptive Filtering - Wiener Filters[wk 3]
Av 738- Adaptive Filtering - Wiener Filters[wk 3]Av 738- Adaptive Filtering - Wiener Filters[wk 3]
Av 738- Adaptive Filtering - Wiener Filters[wk 3]
Dr. Bilal Siddiqui, C.Eng., MIMechE, FRAeS
 
Parallel tansport sssqrd
Parallel tansport sssqrdParallel tansport sssqrd
Parallel tansport sssqrd
foxtrot jp R
 
2 classical field theories
2 classical field theories2 classical field theories
2 classical field theories
Solo Hermelin
 
Lyapunov stability
Lyapunov stability Lyapunov stability
Lyapunov stability
Srinath Thamban
 
Anti-Synchronization Of Four-Scroll Chaotic Systems Via Sliding Mode Control
Anti-Synchronization Of Four-Scroll Chaotic Systems Via Sliding Mode Control Anti-Synchronization Of Four-Scroll Chaotic Systems Via Sliding Mode Control
Anti-Synchronization Of Four-Scroll Chaotic Systems Via Sliding Mode Control
IJITCA Journal
 
Av 738 - Adaptive Filtering - Kalman Filters
Av 738 - Adaptive Filtering - Kalman Filters Av 738 - Adaptive Filtering - Kalman Filters
Av 738 - Adaptive Filtering - Kalman Filters
Dr. Bilal Siddiqui, C.Eng., MIMechE, FRAeS
 

What's hot (20)

Operators n dirac in qm
Operators n dirac in qmOperators n dirac in qm
Operators n dirac in qm
 
Servo systems
Servo systemsServo systems
Servo systems
 
Ladder operator
Ladder operatorLadder operator
Ladder operator
 
Bhdpis1
Bhdpis1Bhdpis1
Bhdpis1
 
Achieve asymptotic stability using Lyapunov's second method
Achieve asymptotic stability using Lyapunov's second methodAchieve asymptotic stability using Lyapunov's second method
Achieve asymptotic stability using Lyapunov's second method
 
Linear quadratic regulator and pole placement for stabilizing a cart inverted...
Linear quadratic regulator and pole placement for stabilizing a cart inverted...Linear quadratic regulator and pole placement for stabilizing a cart inverted...
Linear quadratic regulator and pole placement for stabilizing a cart inverted...
 
Tensor analysis
Tensor analysisTensor analysis
Tensor analysis
 
Adaptive Control Scheme with Parameter Adaptation - From Human Motor Control ...
Adaptive Control Scheme with Parameter Adaptation - From Human Motor Control ...Adaptive Control Scheme with Parameter Adaptation - From Human Motor Control ...
Adaptive Control Scheme with Parameter Adaptation - From Human Motor Control ...
 
Sliding Mode Controller Design for Hybrid Synchronization of Hyperchaotic Che...
Sliding Mode Controller Design for Hybrid Synchronization of Hyperchaotic Che...Sliding Mode Controller Design for Hybrid Synchronization of Hyperchaotic Che...
Sliding Mode Controller Design for Hybrid Synchronization of Hyperchaotic Che...
 
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
Non-linear control of a bipedal (Three-Linked) Walker using feedback Lineariz...
 
LYAPUNOV STABILITY PROBLEM SOLUTION
LYAPUNOV STABILITY PROBLEM SOLUTIONLYAPUNOV STABILITY PROBLEM SOLUTION
LYAPUNOV STABILITY PROBLEM SOLUTION
 
Discrete control
Discrete controlDiscrete control
Discrete control
 
Generalized Laplace - Mellin Integral Transformation
Generalized Laplace - Mellin Integral TransformationGeneralized Laplace - Mellin Integral Transformation
Generalized Laplace - Mellin Integral Transformation
 
Numerical analysis m3 l6slides
Numerical analysis m3 l6slidesNumerical analysis m3 l6slides
Numerical analysis m3 l6slides
 
Av 738- Adaptive Filtering - Wiener Filters[wk 3]
Av 738- Adaptive Filtering - Wiener Filters[wk 3]Av 738- Adaptive Filtering - Wiener Filters[wk 3]
Av 738- Adaptive Filtering - Wiener Filters[wk 3]
 
Parallel tansport sssqrd
Parallel tansport sssqrdParallel tansport sssqrd
Parallel tansport sssqrd
 
2 classical field theories
2 classical field theories2 classical field theories
2 classical field theories
 
Lyapunov stability
Lyapunov stability Lyapunov stability
Lyapunov stability
 
Anti-Synchronization Of Four-Scroll Chaotic Systems Via Sliding Mode Control
Anti-Synchronization Of Four-Scroll Chaotic Systems Via Sliding Mode Control Anti-Synchronization Of Four-Scroll Chaotic Systems Via Sliding Mode Control
Anti-Synchronization Of Four-Scroll Chaotic Systems Via Sliding Mode Control
 
Av 738 - Adaptive Filtering - Kalman Filters
Av 738 - Adaptive Filtering - Kalman Filters Av 738 - Adaptive Filtering - Kalman Filters
Av 738 - Adaptive Filtering - Kalman Filters
 

Similar to Optimal c ontrol

Analysis & Control of Inverted Pendulum System Using PID Controller
Analysis & Control of Inverted Pendulum System Using PID ControllerAnalysis & Control of Inverted Pendulum System Using PID Controller
Analysis & Control of Inverted Pendulum System Using PID Controller
IJERA Editor
 
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
Thomas Templin
 
Controller design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqrController design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqr
eSAT Publishing House
 
Controller design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqrController design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqr
eSAT Journals
 
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
IJERA Editor
 
Navigation of Mobile Inverted Pendulum via Wireless control using LQR Technique
Navigation of Mobile Inverted Pendulum via Wireless control using LQR TechniqueNavigation of Mobile Inverted Pendulum via Wireless control using LQR Technique
Navigation of Mobile Inverted Pendulum via Wireless control using LQR Technique
IJMTST Journal
 
Dynamic systems project (1)
Dynamic systems project (1)Dynamic systems project (1)
Dynamic systems project (1)Kshitija Joshi
 
Attitude Control of Satellite Test Setup Using Reaction Wheels
Attitude Control of Satellite Test Setup Using Reaction WheelsAttitude Control of Satellite Test Setup Using Reaction Wheels
Attitude Control of Satellite Test Setup Using Reaction Wheels
A. Bilal Özcan
 
Project ppt 18 june.pptx
Project ppt 18 june.pptxProject ppt 18 june.pptx
Project ppt 18 june.pptx
PawanTiwari672779
 
Modeling, simulation and control of a robotic arm
Modeling, simulation and control of a robotic armModeling, simulation and control of a robotic arm
Modeling, simulation and control of a robotic arm
cesarportilla8
 
Ips csmc 14.06.2016
Ips csmc 14.06.2016Ips csmc 14.06.2016
Ips csmc 14.06.2016
SaurabhSaini91
 
Tuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
Tuning of PID, SVFB and LQ Controllers Using Genetic AlgorithmsTuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
Tuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
International Journal of Engineering Inventions www.ijeijournal.com
 
lec 2 Robotics time & motion
lec 2 Robotics time & motionlec 2 Robotics time & motion
lec 2 Robotics time & motion
cairo university
 
Fundamentals of Transfer Function in control system.pptx
Fundamentals of Transfer Function in control system.pptxFundamentals of Transfer Function in control system.pptx
Fundamentals of Transfer Function in control system.pptx
profabhishekranjan
 
Thesis presentation on inverted pendulum
Thesis presentation on inverted pendulum Thesis presentation on inverted pendulum
Thesis presentation on inverted pendulum
Nowab Md. Aminul Haq
 
Iaetsd position control of servo systems using pid
Iaetsd position control of servo systems using pidIaetsd position control of servo systems using pid
Iaetsd position control of servo systems using pid
Iaetsd Iaetsd
 
Hexacopter using MATLAB Simulink and MPU Sensing
Hexacopter using MATLAB Simulink and MPU SensingHexacopter using MATLAB Simulink and MPU Sensing
Hexacopter using MATLAB Simulink and MPU Sensing
IRJET Journal
 
Project Presentation
Project PresentationProject Presentation
Project PresentationTabish Fawad
 

Similar to Optimal c ontrol (20)

Analysis & Control of Inverted Pendulum System Using PID Controller
Analysis & Control of Inverted Pendulum System Using PID ControllerAnalysis & Control of Inverted Pendulum System Using PID Controller
Analysis & Control of Inverted Pendulum System Using PID Controller
 
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
 
Controller design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqrController design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqr
 
Controller design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqrController design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqr
 
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
 
Navigation of Mobile Inverted Pendulum via Wireless control using LQR Technique
Navigation of Mobile Inverted Pendulum via Wireless control using LQR TechniqueNavigation of Mobile Inverted Pendulum via Wireless control using LQR Technique
Navigation of Mobile Inverted Pendulum via Wireless control using LQR Technique
 
Dynamic systems project (1)
Dynamic systems project (1)Dynamic systems project (1)
Dynamic systems project (1)
 
Attitude Control of Satellite Test Setup Using Reaction Wheels
Attitude Control of Satellite Test Setup Using Reaction WheelsAttitude Control of Satellite Test Setup Using Reaction Wheels
Attitude Control of Satellite Test Setup Using Reaction Wheels
 
Project ppt 18 june.pptx
Project ppt 18 june.pptxProject ppt 18 june.pptx
Project ppt 18 june.pptx
 
Modeling, simulation and control of a robotic arm
Modeling, simulation and control of a robotic armModeling, simulation and control of a robotic arm
Modeling, simulation and control of a robotic arm
 
Ips csmc 14.06.2016
Ips csmc 14.06.2016Ips csmc 14.06.2016
Ips csmc 14.06.2016
 
Tuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
Tuning of PID, SVFB and LQ Controllers Using Genetic AlgorithmsTuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
Tuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
 
lec 2 Robotics time & motion
lec 2 Robotics time & motionlec 2 Robotics time & motion
lec 2 Robotics time & motion
 
Ball and beam
Ball and beamBall and beam
Ball and beam
 
Fundamentals of Transfer Function in control system.pptx
Fundamentals of Transfer Function in control system.pptxFundamentals of Transfer Function in control system.pptx
Fundamentals of Transfer Function in control system.pptx
 
Relatório
RelatórioRelatório
Relatório
 
Thesis presentation on inverted pendulum
Thesis presentation on inverted pendulum Thesis presentation on inverted pendulum
Thesis presentation on inverted pendulum
 
Iaetsd position control of servo systems using pid
Iaetsd position control of servo systems using pidIaetsd position control of servo systems using pid
Iaetsd position control of servo systems using pid
 
Hexacopter using MATLAB Simulink and MPU Sensing
Hexacopter using MATLAB Simulink and MPU SensingHexacopter using MATLAB Simulink and MPU Sensing
Hexacopter using MATLAB Simulink and MPU Sensing
 
Project Presentation
Project PresentationProject Presentation
Project Presentation
 

More from Ramaiahsubasri

Bode plot
Bode plotBode plot
Bode plot
Ramaiahsubasri
 
Induction motor 3ph
Induction motor 3phInduction motor 3ph
Induction motor 3ph
Ramaiahsubasri
 
Nss fourier
Nss fourierNss fourier
Nss fourier
Ramaiahsubasri
 
Transformer
TransformerTransformer
Transformer
Ramaiahsubasri
 
Sliding Mode Controller
Sliding Mode Controller Sliding Mode Controller
Sliding Mode Controller
Ramaiahsubasri
 
Root locus compensation
Root locus compensationRoot locus compensation
Root locus compensation
Ramaiahsubasri
 
Ethics
EthicsEthics
Bode plot
Bode plotBode plot
Bode plot
Ramaiahsubasri
 

More from Ramaiahsubasri (8)

Bode plot
Bode plotBode plot
Bode plot
 
Induction motor 3ph
Induction motor 3phInduction motor 3ph
Induction motor 3ph
 
Nss fourier
Nss fourierNss fourier
Nss fourier
 
Transformer
TransformerTransformer
Transformer
 
Sliding Mode Controller
Sliding Mode Controller Sliding Mode Controller
Sliding Mode Controller
 
Root locus compensation
Root locus compensationRoot locus compensation
Root locus compensation
 
Ethics
EthicsEthics
Ethics
 
Bode plot
Bode plotBode plot
Bode plot
 

Recently uploaded

road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 

Recently uploaded (20)

road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 

Optimal c ontrol

  • 1. Optimum controller design Dr.R.SUBASRI Associate. Professor Dept .of EIE 17.03.2015 soamisuba@yahoo.comDr.R.Subasri,KEC,INDIA
  • 2. Problem Definition To control the deflection of pendulum () and cart’s position(x). Dr.R.Subasri,KEC,INDIA
  • 3. Control Requirements -SISO System • The pendulum should return to its upright position within 5 seconds (Settling time) • The position of pendulum should never move more than 0.05 radians away from the vertical. Transfer function model with impulse input Dr.R.Subasri,KEC,INDIA
  • 4. Parameters • mass of the cart (M) :0.5 kg • mass of the pendulum (m) :0.5 kg • friction of the cart (b) :0.1 N/m/sec • length to pendulum center of mass(l) : 0.3 m • Inertia of the pendulum (I) : 0.006 kg*m^2 • Force applied to the cart :F • Cart position coordinate : x • pendulum angle from vertical : Dr.R.Subasri,KEC,INDIA
  • 5. Mathematical modeling • Summing the forces in the Free Body Diagram of the cart in the horizontal direction • Summing the forces in the Free Body Diagram of the pendulum in the horizontal direction Mx bx N F+ + = 2 N mx mlθcosθ mlθ sinθ= + − 2 (M m)x bx mlθcosθ mlθ sinθ F+ + + − = First equation of motion: Dr.R.Subasri,KEC,INDIA
  • 6. • sum the forces perpendicular to the pendulum • Second equation of motion: 2 (I ml )θ mglsinθ mlxcosθ+ + = − Linearise the equations about vertical equilibrium angle ( = ) Let  represent the deviation of the pendulum's position from equilibrium, that is  =  +  Approximations of small angle sin ( + ) =-  cos ( + ) = -1 Dr.R.Subasri,KEC,INDIA
  • 7. Mathematical modeling • The two linear equations of motions are: ( )2 I ml φ mglφ mlx (M m) x bx mlφ u + − = + + − = Control Force F replaced by u Dr.R.Subasri,KEC,INDIA
  • 8. Transfer function model • Use Laplace transform to derive the transfer function model • Where, 2 2 4 3 2 ml s φ(s) q U(s) b(I ml ) (M m)mgl bmgl s s s s q q q = + + + − − ( )( )2 2 q M m I ml (ml) = + + −  Dr.R.Subasri,KEC,INDIA
  • 9. open-loop response -transfer function model • M = .5; m = 0.2; b = 0.1; • i = 0.006; g = 9.8; • l = 0.3; • q = (M+m)*(i+m*l^2)-(m*l)^2; %simplifies input • num = [m*l/q 0] • den = [1 b*(i+m*l^2)/q -(M+m)*m*g*l/q -b*m*g*l/q] output should be: • num = 4.5455 0 • den = 1.0000 0.1818 -31.1818 -4.4545 Dr.R.Subasri,KEC,INDIA
  • 10. open-loop response -transfer function model • To observe the system's velocity response to an impulse force applied to the cart add the following lines at the end m-file: • t=0:0.01:5; • impulse(num,den,t) • axis([0 1 0 60]) The response is entirely unsatisfactory. It is not stable in open loop. Dr.R.Subasri,KEC,INDIA
  • 11. Closed loop response-transfer function model • As the pendulum's position should return to the vertical after the initial disturbance, the reference signal should be zero. • The force applied to the cart can be added as an impulse disturbance. Dr.R.Subasri,KEC,INDIA
  • 12. Effect of PID controller • kd = 1;k = 1;ki = 1; • numPID = [kd k ki]; • denPID = [1 0]; • numc = conv(num,denPID) • denc = polyadd(conv(denPID,den), conv(numPID,num)) numc = 4.5455 0 0 denc = 1.0000 4.7273 -26.6363 0.0910 0 Dr.R.Subasri,KEC,INDIA
  • 13. Closed loop Impulse response with PID • t=0:0.01:5; • impulse(numc,denc,t) • axis([0 1.5 0 40]) This response is still not stable. Dr.R.Subasri,KEC,INDIA
  • 14. Closed loop Impulse response with PID • increasing the proportional control (k) , k=100; axis([0, 2.5, -0.2, 0.2]) The settling time is acceptable at about 2 sec. The overshoot is high Dr.R.Subasri,KEC,INDIA
  • 15. Closed loop Impulse response with PID • increase kd as 20 The overshoot has been reduced so that the pendulum does not move more than 0.05 radians away from the vertical. Dr.R.Subasri,KEC,INDIA
  • 16. Control Requirements -MIMO System • To control both the pendulum's angle and the cart's position. • The cart should achieve it's desired position within 5 seconds (settling time) • Rise time under 0.5 seconds. • Pendulum's overshoot to 20 degrees (0.35 radians), and it should also settle in under 5 seconds. -State space model with step inputDr.R.Subasri,KEC,INDIA
  • 17. State space model • After a little algebra, the linearized system equations can also be represented in state- space form: Dr.R.Subasri,KEC,INDIA
  • 18. • R - commanded step input to the cart (step input of 0.2 m) • 4 states X– the position and velocity of the cart and the angle and angular velocity of the pendulum. • output y - both the position of the cart and the angle of the pendulum. Dr.R.Subasri,KEC,INDIA
  • 19. Open loop response • M = 0.5; m = 0.2; b = 0.1; i = 0.006; g = 9.8; l = 0.3; • p = i*(M+m)+M*m*l^2; %denominator • A = [0 1 0 0; 0 -(i+m*l^2)*b/p (m^2*g*l^2)/p 0; 0 0 0 1; 0 -(m*l*b)/p m*g*l*(M+m)/p 0]; B = [0; (i+m*l^2)/p; 0; m*l/p]; C = [1 0 0 0; 0 0 1 0]; D = [0;0]; p = eig(A) Dr.R.Subasri,KEC,INDIA
  • 20. • Eigen Values are p = 0 -0.1428 5.5651 -5.6041 one right-half-plane pole at 5.5651,the system is unstable in open loop. • blue line - the cart's position • green line - the pendulum's angle.Dr.R.Subasri,KEC,INDIA
  • 21. State feedback controller Open Loop: Closed Loop: Dr.R.Subasri,KEC,INDIA
  • 22. State feedback controller • t = 0:0.01:3; • u = 0.2*ones(size(t)); • p1=-0.8+1.351i; • p2=-0.8-1.351i;p3=-4;p4=-5 • K = place(A,B,[p1 p2,p3,p4])%%% controller gain • %input • [y,x]=lsim(A-B*K,B,C,D,u,t); • plot(t,y(:,1),'r',t,y(:,2)) Dr.R.Subasri,KEC,INDIA
  • 24. Boost converter • A=[0 -0.2 ; 40 -20] • B=[ 0.5;0]; • C=[ 1 0]; • Pole: -3 , -3 Dr.R.Subasri,KEC,INDIA
  • 25. Linear Quadratic Regulator (LQR) Controller • The lqr function allows to choose two parameters, R and Q, which will balance the relative importance of the input and state in the cost function to be optimized. • The simplest case is to assume R=1, and Q=C'*C. • Essentially, the lqr method allows for the control of both outputs. The controller can be tuned by changing the nonzero elements in the Q matrix to get a desirable response. Dr.R.Subasri,KEC,INDIA
  • 26. • The structure of Q, is C'*C • 1 0 0 0 • 0 0 0 0 • 0 0 1 0 • 0 0 0 0 • The element in the (1,1) position will be used to weight the cart's position and the element in the (3,3) position will be used to weight the pendulum's angle. Find the K matrix that will give a good controller. Dr.R.Subasri,KEC,INDIA
  • 27. • x=1;y=1; • Q=[x 0 0 0; 0 0 0 0; 0 0 y 0; 0 0 0 0]; • R = 1; • K = lqr(A,B,Q,R) • Ac = [(A-B*K)]; • Bc = [B]; • Cc = [C]; • Dc = [D]; T=0:0.01:5; • U=0.2*ones(size(T)); • [Y,X]=lsim(Ac,Bc,Cc,Dc,U,T);plot(T,Y) Dr.R.Subasri,KEC,INDIA
  • 28. Closed loop response-LQR • K = -1.0000 -1.6567 18.6854 3.4594 Dr.R.Subasri,KEC,INDIA
  • 29. • Using x=5000 and y=100, the following value of K and step response were found: • K = -70.7107 -37.8345 105.5298 20.9238 All of the design requirements have been met with the minimum amount of control effortDr.R.Subasri,KEC,INDIA