SlideShare a Scribd company logo
1 of 30
Download to read offline
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 qm
Anda Tywabi
 
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
 

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

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
 
Dynamic systems project (1)
Dynamic systems project (1)Dynamic systems project (1)
Dynamic systems project (1)
Kshitija Joshi
 
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
 
Project Presentation
Project PresentationProject Presentation
Project Presentation
Tabish 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 (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

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Recently uploaded (20)

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 

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