SlideShare a Scribd company logo
1 of 53
BALL AND BEAM
MODELING
(m) mass of the ball 0.11 kg
(R) radius of the ball 0.015 m
(d) lever arm offset 0.03 m
(g) gravitational acceleration 9.8 m/s^2
(L) length of the beam 1.0 m
(J) ball's moment of inertia 9.99e-6 kg.m^2
(r) ball position coordinate
(alpha) beam angle coordinate
(theta) servo gear angle
Design criteria
Settling time < 3
seconds
Overshoot
< 5%
System equations
It should be noted that the above plant transfer function is a double integrator. As such it is
marginally stable and will provide a challenging control problem.
The transfer function can be implemented in MATLAB as follows:
m = 0.111;
R = 0.015;
g = -9.8; L = 1.0;
d = 0.03;
J = 9.99e-6;
s = tf('s’);
P_ball = -m*g*d/L/(J/R^2+m)/s^2
Analysis
create a transfer function model in MATLAB
m = 0.111;
R = 0.015;
g = -9.8; L = 1.0;
d = 0.03;
J = 9.99e-6;
s = tf('s’);
P_ball = -m*g*d/L/(J/R^2+m)/s^2
Pole zero plot
create a pole zero plot in MATLAB
m = 0.111;
R = 0.015;
g = -9.8; L = 1.0;
d = 0.03;
J = 9.99e-6;
s = tf('s’);
P_ball = -m*g*d/L/(J/R^2+m)/s^2
pzmap(P_ball)
The Ball and Beam system is a type II system which has two poles at the origin, as seen in the
pole/zero map below. Since the poles are not strictly in the left half plane, the open loop system will be
unstable as seen in the step response below
Open-loop step response
See open loop step response in MATLAB
m = 0.111;
R = 0.015;
g = -9.8; L = 1.0;
d = 0.03;
J = 9.99e-6;
s = tf('s’);
P_ball = -m*g*d/L/(J/R^2+m)/s^2
step(P_ball)
From this plot it is clear that the system is unstable in open-loop causing the ball to roll right off the
end of the beam. Therefore, some method of controlling the ball's position in this system is required.
CONTROLLER DESIGN
PID CONTOLLER
ROOTLOCUS
FREQUENCY
PID CONTROLLER DESIGN
What is
PIDCONTOLLER? A PID controller continuously calculates an error value e(t) as
the difference between a desired setpoint and a measured
process variable and applies a correction based on proportional,
integral, and derivative terms. PID is an initialism for
proportional-integral-derivative, referring to the three terms
operating on the error signal to produce a control signal.
(e)-thetrackingerror
(r)-desiredoutput
(y)-actualoutput
(u)-controlsignal
(Kp)-proportionalgain
(Ki)-integralgain
(Kd)-derivativegain
Kd
(t)
GENERAL TIPS
FORDESIGNING A
PIDCONTROLLER
1. Obtain an open-loop response and determine what
needs to be improved
2. Add a proportional control to improve the rise time
3. Add a derivative control to reduce the overshoot
4. Add an integral control to reduce the steady-state
error
5. Adjust each of the gains Kp, Ki and Kd until you
obtain a desired overall response.
CLOSED-LOOP REPRESENTATION
The block diagram for this example with a controller and unity feedback of the ball's position is
shown below
The transfer function for a PID controller is:
PROPORTIONAL CONTROL
The closed-loop transfer function for proportional control with a proportional gain (Kp) equal to 100, can
be modeled by following lines of MATLAB code into a new m-file.
m = 0.111;
R= 0.015;
g = -9.8;
L= 1.0;
d = 0.03;
J = 9.99e-6;
S = tf('s');
P_ball = -m*g*d/L/(J/R^2+m)/s^2;
Kp = 1;
C = pid(kp);
sys_cl=feedback(C*P_ball,1);
Now, we can model the system's response to a step input of
0.25 m. Add the following line of code.
Step(0.25*sys_cl)
axis([0 70 0 0.5])
Output
PROPORTIONAL CONTROL
The system remains marginally stable
with the addition of a proportional gain
Try changing the value of Kp and note
that the system remains unstable
PROPORTIONAL DERIVATIVE CONTROL
Add a derivative term to the controller. Copy the
following lines of code to an m-file and run it to view
the system's response
m = 0.111;
R = 0.015;
g = -9.8;
L = 1.0;
d = 0.03;
J = 9.99e-6;
s = tf('s');
P_ball = -m*g*d/L/(J/R^2+m)/s^2;
Kp = 10;
Kd = 10;
C = pid(Kp,0,Kd);
sys_cl=feedback(c*p_ball,1);
Now, we can model the system's response to a step
input of 0.25 m. Add the following line of code.
t=0:0.01:5;
step(0.25*sys_cl)
PROPORTIONAL DERIVATIVE CONTROL
Now the system is stable but the overshoot
is much too high
By increasing Kd we can lower the overshoot
and decrease the settling time slightly
Therefore, make Kd= 20
Kp = 10;
Kd = 20;
C = pid(Kp,0,Kd);
sys_cl=feedback(c*P_ball,1);
step(0.25*sys_cl)
Kd = 10
Kd = 20
Overshoot criterion is
met
Settling time needs
to come down a bit
To decrease the
settling time we may
try increasing the Kp
slightly to increase
the rise time. The
derivative gain Kd
can also be increased
to take off some of
the overshoot that
increasing Kp will
cause.
After playing with the gains a bit, the following step
response plot can be achieved with Kp= 15 and Kd= 40
Kp = 15;
Kd = 40;
C = pid(Kp,0,Kd);
sys_cl=feedback(c*p_ball,1);
step(0.25*sys_cl)
From this plot all the control objectives
have been met
 Settling time less than 3 seconds
 Overshoot less than 5%
ROOT LOCUS CONTROLLER
DESIGN
OPEN-LOOP
ROOTLOCUS
 The main idea of the root locus design is to estimate
the closed-loop response from the open-loop root locus
plot. By adding zeroes and/or poles to the original
system (adding a compensator), the root locus and thus
the closed-loop response will be modified.
MATLAB code in order to model the plant and plot the root locus is
m= 0.111;
R = 0.015;
g= -9.8;
L = 1.0;
d = 0.03;
J = 9.99e-6;
s = tf('s');
P_ball = -m*g*d/L/(J/R^2+m)/s^2;
rlocus(P_ball)
The system has two poles at the origin which
go off to infinity along the imaginary axes
The design criteria can be plotted onto the root locus using the sgrid command
This command generates a grid of constant damping ratio and natural frequency.
The damping ratio and natural frequency were found using the following equations
From the equations,
the damping ratio = 0.7
natural frequency =1.9
Our design Criteria is
Mp < 5% and Ts = 3 Sec
Sgrid(0.70, 1.9)
axis([-5 5 -2 2])
Plotting Sgrid on matlab
( the damping ratio = 0.7, natural frequency =1.9 )
 The area between the two dotted diagonal lines
represents locations where the percent overshoot is
less than 5%.
 The area outside the curved line represents locations
where the settling time is less than 3 seconds.
 Note that no region of the plot falls within the design
criteria shown by these lines.
 To remedy this and bring the root locus into the left-
hand plane for stability we will try adding a lead-
compensator to the system
let us add the controller to the plant and view the root locus.
We will position the zero near the origin to cancel out one of the poles.
The pole of our compensator will be placed to the left of the origin to pull the root locus further
into the left-hand plane.
LEAD COMPENSATOR
 A first order lead compensator tends to shift the root locus into the left-hand plane.
Matlab code is
zo = 0.01;
po = 5;
C=tf([1 zo],[1 po]);
rlocus(c*P_ball)
sgrid(0.70, 1.9)
Matlab code is
zo = 0.01;
po = 5;
C=tf([1 zo],[1 po]);
rlocus(c*P_ball)
sgrid(0.70, 1.9)
SHIFTED
We have moved the root locus into the left-hand plane, we may select a gain that will satisfy our
design requirements. We can use the rlocfind command to help us do this. Add the code
[k,poles]=rlocfind(C*P_ball)
onto the end
SELECTING GAIN
After doing this, you should see the following output in
the MATLAB command window.
Select a point in the graphics window
selected_point =
-2.4917 + 1.0109
K =
34.7474
poles =
-2.4950 + 1.0109i
-2.4950 - 1.0109i
-0.0101
PLOTTING THE CLOSED-LOOP RESPONSE
This value of K can be put into the system and the
closed-loop response to a step input of 0.25 m can be
obtained.
Sys_cl=feedback(k*c*p_ball,1);
t=0:0.01:5;
figure
step(0.25*sys_cl,t)
From this plot we see that when a 0.25-m step
input is given to the system both the settling
time and percent overshoot design criteria are
met.
FREQUENCY CONTROL
DESIGN
Frequency
DomainMethods
forController
Design
 The open-loop transfer function of the plant for the ball
and beam experiment is given below:
 The design criteria for this problem are:
Settling time less than 3 seconds
Overshoot less than 5%
Open-loopBode
Plot
• Adding a controller to the system changes the open-loop
Bode plot, therefore changing the closed-loop response.
• For obtaining the Bode Plot for this original open-loop
transfer function, we have to create a new m-file with the
following code and then run it in the MATLAB command
window.
m = 0.111;
R = 0.015;
g = -9.8;
L = 1.0;
d = 0.03;
J = 9.99e-6;
s = tf('s');
P_ball = -m*g*d/L/(J/R^2+m)/s^2;
bode(P_ball)
• From this plot ,we see that the phase margin is
zero which in turn indicates our system is
unstable.
• If we want to increase the phase margin and we
can use a lead compensator controller to do this.
Phase-lead
controller
• A first order phase-lead compensator has the form given below:
• The phase-lead compensator will add positive phase to
our system over the frequency range 1/ a T and 1/T,
which are called the corner frequencies.
• The maximum added phase for one lead compensator is
90 degrees.
• For our controller design we need a percent overshoot
of less than 5%, which corresponds to a damping ratio
(rho) of 0.7
• Generally 100*rho will give you the minimum phase
margin needed to obtain your desired overshoot
• Therefore, we require a phase margin greater than 70
degrees.
To obtain T and α, the following steps can be applied
1. Determine the positive phase needed
2. Determine the frequency where the phase should be
added (center frequency)
3. Determine the constant a from the equation below:
4. Determine t and aT from the following equations:
For 70 degrees and center frequency = 1, = 0.176 and = 5.67
• Now, we can add our lead controller to the system and
view the bode plot.
phi=70*pi/180;
a=(1-sin(phi))/(1+sin(phi));
w=1;
T=1/(w*sqrt(a));
K = 1;
C = K*(1+T*s)/(1+a*T*s);
bode(C*P_ball)
You can see that our phase margin is now 70 degrees
• Let's check the closed-loop response to a step input of
0.25 m.
• Add the following to your m-file. You should get the
following plot:
sys_cl = feedback(C*P_ball,1);
t = 0:0.01:5;
step(0.25*sys_cl,t)
Although the system is now stable and
the overshoot is only slightly over 5%, the settling time is not satisfactory.
Increasing the gain will increase the crossover frequency
and make the response faster.
With K = 5, your response should look like:
K = 5;
C = K*(1+T*s)/(1+a*T*s);
sys_cl = feedback(C*P_ball,1);
bode(C*P_ball) step(0.25*sys_cl,t)
The response is faster, however, the overshoot is much too high.
Increasing the gain further will just make the overshoot worse.
ADDING MORE PHASE
We can increase our phase-lead compensator to decrease the overshoot
pm = 80;
w = 1;
K = 1;
%view compensated system bode plot
pmr = pm*pi/180;
a = (1 - sin(pmr))/(1+sin(pmr));
T = sqrt(a)/w;
aT = 1/(w*sqrt(a));
C = K*(1+aT*s)/(1+T*s);
figure
bode(C*P_ball)
%view step response
sys_cl = feedback(C*P_ball,1);
t = 0:0.01:5;
figure
step(0.25*sys_cl,t)
The overshoot is fine but the settling time is just a bit long
Try different numbers
Using the following values the design criteria was met
pm = 85;
w = 1.9;
K = 2;
%view compensated system bode plot
pmr = pm*pi/180;
a = (1 - sin(pmr))/(1+sin(pmr));
T = sqrt(a)/w;
aT = 1/(w*sqrt(a));
C = K*(1+aT*s)/(1+T*s);
figure
bode(C*P_ball)
%view step response
sys_cl = feedback(C*P_ball,1);
t = 0:0.01:5;
figure
step(0.25*sys_cl,t)
the design criteria was met
 Settling time less than 3 seconds
 Overshoot less than 5%
SIMULINK MODELING
USING ROOT LOCUS METHOD
SIMULINK
MODELING
We need to make a s/m with
input as motor gear angle and
output as ball position
VARIABLES CAN ONLY BE ASSIGNED
TO FUNCTION BLOCK AS FUNCTIONS
OF U
SO LET.,
Now lets make it into a subsystem and check the open-loop response
Assign values of
constants in
command window
Run for 10 sec and check output
SYSTEM IS BIBO
UNSTABLE
SO WE NEED TO ADD A CONTROLLER
TO MAKE THE SYSTEM STABLE
We are adding the root locus controller we
designed earlier to make it stable
Meaning the ball will roll off the beam
Root locus controller design
 ADDING GAIN BLOCK OF 34.7 AND
 ADDING LEAD COMPENSATOR BY ADDING A
ZERO AT 0.01 AND A POLE AT 5
 THEN GIVE A UNIT NEGATIVE FEEDBACK AS
SHOWN IN FIG
Now lets run the stimulation for 10s and view the output
Yes. The system is stable
Also our design criterias are met
Max Peak Overshoot < 5%
Settling time < 3 Sec
Thus our stimulation is complete and success
P R E PA R E D BY
G ro u p 7
A LV I N S A J I G EO R G E
B H A R AT H V I N O D
A N I T H A K R
A S W I N K V
FA B N A N
S U B M I T T E D TO
D r M AT H E W P A B R A H A M
R E F E R E N C E : C T M S . E N G I N . U M I C H . E D U

More Related Content

Similar to BALLANDBEAM_GROUP7.pptx

Servo Fundamentals
Servo FundamentalsServo Fundamentals
Servo Fundamentalspurnima saha
 
Linear Control Hard-Disk Read/Write Controller Assignment
Linear Control Hard-Disk Read/Write Controller AssignmentLinear Control Hard-Disk Read/Write Controller Assignment
Linear Control Hard-Disk Read/Write Controller AssignmentIsham Rashik
 
Control tutorials for matlab and simulink introduction pid controller desig...
Control tutorials for matlab and simulink   introduction pid controller desig...Control tutorials for matlab and simulink   introduction pid controller desig...
Control tutorials for matlab and simulink introduction pid controller desig...ssuser27c61e
 
New controllers efficient model based design method
New controllers efficient model based design methodNew controllers efficient model based design method
New controllers efficient model based design methodAlexander Decker
 
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 pidIaetsd Iaetsd
 
179529572-ROOT-LOCUS-Control-system-Design-ppt.ppt
179529572-ROOT-LOCUS-Control-system-Design-ppt.ppt179529572-ROOT-LOCUS-Control-system-Design-ppt.ppt
179529572-ROOT-LOCUS-Control-system-Design-ppt.pptTaraGonzales5
 
Ct2 2013 14
Ct2 2013 14Ct2 2013 14
Ct2 2013 14dana53
 
Pid En Un Pic16 F684
Pid En Un Pic16 F684Pid En Un Pic16 F684
Pid En Un Pic16 F684quadrocopter
 
Pid En Un Pic16 F684
Pid En Un Pic16 F684Pid En Un Pic16 F684
Pid En Un Pic16 F684quadrocopter
 
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 armcesarportilla8
 
10 Discrete Time Controller Design.pptx
10 Discrete Time Controller Design.pptx10 Discrete Time Controller Design.pptx
10 Discrete Time Controller Design.pptxSaadAzhar15
 
Ece 415 control systems, fall 2021 computer project 1
Ece 415 control systems, fall 2021 computer project  1 Ece 415 control systems, fall 2021 computer project  1
Ece 415 control systems, fall 2021 computer project 1 ronak56
 
EENG519FinalProjectReport
EENG519FinalProjectReportEENG519FinalProjectReport
EENG519FinalProjectReportDaniel K
 
「SPICEの活用方法」セミナー資料(28JAN2011) PPT
「SPICEの活用方法」セミナー資料(28JAN2011) PPT「SPICEの活用方法」セミナー資料(28JAN2011) PPT
「SPICEの活用方法」セミナー資料(28JAN2011) PPTTsuyoshi Horigome
 
Robust PID Controller Design for Non-Minimum Phase Systems using Magnitude Op...
Robust PID Controller Design for Non-Minimum Phase Systems using Magnitude Op...Robust PID Controller Design for Non-Minimum Phase Systems using Magnitude Op...
Robust PID Controller Design for Non-Minimum Phase Systems using Magnitude Op...IRJET Journal
 

Similar to BALLANDBEAM_GROUP7.pptx (20)

Servo Fundamentals
Servo FundamentalsServo Fundamentals
Servo Fundamentals
 
Lead-lag controller
Lead-lag controllerLead-lag controller
Lead-lag controller
 
Linear Control Hard-Disk Read/Write Controller Assignment
Linear Control Hard-Disk Read/Write Controller AssignmentLinear Control Hard-Disk Read/Write Controller Assignment
Linear Control Hard-Disk Read/Write Controller Assignment
 
Chapter 10-pid-1
Chapter 10-pid-1Chapter 10-pid-1
Chapter 10-pid-1
 
ACS 22LIE12 lab Manul.docx
ACS 22LIE12 lab Manul.docxACS 22LIE12 lab Manul.docx
ACS 22LIE12 lab Manul.docx
 
Control tutorials for matlab and simulink introduction pid controller desig...
Control tutorials for matlab and simulink   introduction pid controller desig...Control tutorials for matlab and simulink   introduction pid controller desig...
Control tutorials for matlab and simulink introduction pid controller desig...
 
New controllers efficient model based design method
New controllers efficient model based design methodNew controllers efficient model based design method
New controllers efficient model based design method
 
1578385.ppt
1578385.ppt1578385.ppt
1578385.ppt
 
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
 
179529572-ROOT-LOCUS-Control-system-Design-ppt.ppt
179529572-ROOT-LOCUS-Control-system-Design-ppt.ppt179529572-ROOT-LOCUS-Control-system-Design-ppt.ppt
179529572-ROOT-LOCUS-Control-system-Design-ppt.ppt
 
Ct2 2013 14
Ct2 2013 14Ct2 2013 14
Ct2 2013 14
 
Pid En Un Pic16 F684
Pid En Un Pic16 F684Pid En Un Pic16 F684
Pid En Un Pic16 F684
 
Pid En Un Pic16 F684
Pid En Un Pic16 F684Pid En Un Pic16 F684
Pid En Un Pic16 F684
 
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
 
10 Discrete Time Controller Design.pptx
10 Discrete Time Controller Design.pptx10 Discrete Time Controller Design.pptx
10 Discrete Time Controller Design.pptx
 
Ece 415 control systems, fall 2021 computer project 1
Ece 415 control systems, fall 2021 computer project  1 Ece 415 control systems, fall 2021 computer project  1
Ece 415 control systems, fall 2021 computer project 1
 
EENG519FinalProjectReport
EENG519FinalProjectReportEENG519FinalProjectReport
EENG519FinalProjectReport
 
「SPICEの活用方法」セミナー資料(28JAN2011) PPT
「SPICEの活用方法」セミナー資料(28JAN2011) PPT「SPICEの活用方法」セミナー資料(28JAN2011) PPT
「SPICEの活用方法」セミナー資料(28JAN2011) PPT
 
DC servo motor
DC servo motorDC servo motor
DC servo motor
 
Robust PID Controller Design for Non-Minimum Phase Systems using Magnitude Op...
Robust PID Controller Design for Non-Minimum Phase Systems using Magnitude Op...Robust PID Controller Design for Non-Minimum Phase Systems using Magnitude Op...
Robust PID Controller Design for Non-Minimum Phase Systems using Magnitude Op...
 

Recently uploaded

Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 

Recently uploaded (20)

Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 

BALLANDBEAM_GROUP7.pptx

  • 3. (m) mass of the ball 0.11 kg (R) radius of the ball 0.015 m (d) lever arm offset 0.03 m (g) gravitational acceleration 9.8 m/s^2 (L) length of the beam 1.0 m (J) ball's moment of inertia 9.99e-6 kg.m^2 (r) ball position coordinate (alpha) beam angle coordinate (theta) servo gear angle
  • 4. Design criteria Settling time < 3 seconds Overshoot < 5%
  • 6. It should be noted that the above plant transfer function is a double integrator. As such it is marginally stable and will provide a challenging control problem. The transfer function can be implemented in MATLAB as follows: m = 0.111; R = 0.015; g = -9.8; L = 1.0; d = 0.03; J = 9.99e-6; s = tf('s’); P_ball = -m*g*d/L/(J/R^2+m)/s^2
  • 7. Analysis create a transfer function model in MATLAB m = 0.111; R = 0.015; g = -9.8; L = 1.0; d = 0.03; J = 9.99e-6; s = tf('s’); P_ball = -m*g*d/L/(J/R^2+m)/s^2
  • 8. Pole zero plot create a pole zero plot in MATLAB m = 0.111; R = 0.015; g = -9.8; L = 1.0; d = 0.03; J = 9.99e-6; s = tf('s’); P_ball = -m*g*d/L/(J/R^2+m)/s^2 pzmap(P_ball) The Ball and Beam system is a type II system which has two poles at the origin, as seen in the pole/zero map below. Since the poles are not strictly in the left half plane, the open loop system will be unstable as seen in the step response below
  • 9. Open-loop step response See open loop step response in MATLAB m = 0.111; R = 0.015; g = -9.8; L = 1.0; d = 0.03; J = 9.99e-6; s = tf('s’); P_ball = -m*g*d/L/(J/R^2+m)/s^2 step(P_ball) From this plot it is clear that the system is unstable in open-loop causing the ball to roll right off the end of the beam. Therefore, some method of controlling the ball's position in this system is required.
  • 12. What is PIDCONTOLLER? A PID controller continuously calculates an error value e(t) as the difference between a desired setpoint and a measured process variable and applies a correction based on proportional, integral, and derivative terms. PID is an initialism for proportional-integral-derivative, referring to the three terms operating on the error signal to produce a control signal.
  • 14. GENERAL TIPS FORDESIGNING A PIDCONTROLLER 1. Obtain an open-loop response and determine what needs to be improved 2. Add a proportional control to improve the rise time 3. Add a derivative control to reduce the overshoot 4. Add an integral control to reduce the steady-state error 5. Adjust each of the gains Kp, Ki and Kd until you obtain a desired overall response.
  • 15. CLOSED-LOOP REPRESENTATION The block diagram for this example with a controller and unity feedback of the ball's position is shown below The transfer function for a PID controller is:
  • 16. PROPORTIONAL CONTROL The closed-loop transfer function for proportional control with a proportional gain (Kp) equal to 100, can be modeled by following lines of MATLAB code into a new m-file. m = 0.111; R= 0.015; g = -9.8; L= 1.0; d = 0.03; J = 9.99e-6; S = tf('s'); P_ball = -m*g*d/L/(J/R^2+m)/s^2; Kp = 1; C = pid(kp); sys_cl=feedback(C*P_ball,1); Now, we can model the system's response to a step input of 0.25 m. Add the following line of code. Step(0.25*sys_cl) axis([0 70 0 0.5])
  • 17. Output PROPORTIONAL CONTROL The system remains marginally stable with the addition of a proportional gain Try changing the value of Kp and note that the system remains unstable
  • 18. PROPORTIONAL DERIVATIVE CONTROL Add a derivative term to the controller. Copy the following lines of code to an m-file and run it to view the system's response m = 0.111; R = 0.015; g = -9.8; L = 1.0; d = 0.03; J = 9.99e-6; s = tf('s'); P_ball = -m*g*d/L/(J/R^2+m)/s^2; Kp = 10; Kd = 10; C = pid(Kp,0,Kd); sys_cl=feedback(c*p_ball,1); Now, we can model the system's response to a step input of 0.25 m. Add the following line of code. t=0:0.01:5; step(0.25*sys_cl)
  • 19. PROPORTIONAL DERIVATIVE CONTROL Now the system is stable but the overshoot is much too high By increasing Kd we can lower the overshoot and decrease the settling time slightly Therefore, make Kd= 20 Kp = 10; Kd = 20; C = pid(Kp,0,Kd); sys_cl=feedback(c*P_ball,1); step(0.25*sys_cl) Kd = 10
  • 20. Kd = 20 Overshoot criterion is met Settling time needs to come down a bit To decrease the settling time we may try increasing the Kp slightly to increase the rise time. The derivative gain Kd can also be increased to take off some of the overshoot that increasing Kp will cause.
  • 21. After playing with the gains a bit, the following step response plot can be achieved with Kp= 15 and Kd= 40 Kp = 15; Kd = 40; C = pid(Kp,0,Kd); sys_cl=feedback(c*p_ball,1); step(0.25*sys_cl) From this plot all the control objectives have been met  Settling time less than 3 seconds  Overshoot less than 5%
  • 23. OPEN-LOOP ROOTLOCUS  The main idea of the root locus design is to estimate the closed-loop response from the open-loop root locus plot. By adding zeroes and/or poles to the original system (adding a compensator), the root locus and thus the closed-loop response will be modified.
  • 24. MATLAB code in order to model the plant and plot the root locus is m= 0.111; R = 0.015; g= -9.8; L = 1.0; d = 0.03; J = 9.99e-6; s = tf('s'); P_ball = -m*g*d/L/(J/R^2+m)/s^2; rlocus(P_ball) The system has two poles at the origin which go off to infinity along the imaginary axes
  • 25. The design criteria can be plotted onto the root locus using the sgrid command This command generates a grid of constant damping ratio and natural frequency. The damping ratio and natural frequency were found using the following equations From the equations, the damping ratio = 0.7 natural frequency =1.9 Our design Criteria is Mp < 5% and Ts = 3 Sec
  • 26. Sgrid(0.70, 1.9) axis([-5 5 -2 2]) Plotting Sgrid on matlab ( the damping ratio = 0.7, natural frequency =1.9 )  The area between the two dotted diagonal lines represents locations where the percent overshoot is less than 5%.  The area outside the curved line represents locations where the settling time is less than 3 seconds.  Note that no region of the plot falls within the design criteria shown by these lines.  To remedy this and bring the root locus into the left- hand plane for stability we will try adding a lead- compensator to the system
  • 27. let us add the controller to the plant and view the root locus. We will position the zero near the origin to cancel out one of the poles. The pole of our compensator will be placed to the left of the origin to pull the root locus further into the left-hand plane. LEAD COMPENSATOR  A first order lead compensator tends to shift the root locus into the left-hand plane. Matlab code is zo = 0.01; po = 5; C=tf([1 zo],[1 po]); rlocus(c*P_ball) sgrid(0.70, 1.9)
  • 28. Matlab code is zo = 0.01; po = 5; C=tf([1 zo],[1 po]); rlocus(c*P_ball) sgrid(0.70, 1.9) SHIFTED
  • 29. We have moved the root locus into the left-hand plane, we may select a gain that will satisfy our design requirements. We can use the rlocfind command to help us do this. Add the code [k,poles]=rlocfind(C*P_ball) onto the end SELECTING GAIN After doing this, you should see the following output in the MATLAB command window. Select a point in the graphics window selected_point = -2.4917 + 1.0109 K = 34.7474 poles = -2.4950 + 1.0109i -2.4950 - 1.0109i -0.0101
  • 30. PLOTTING THE CLOSED-LOOP RESPONSE This value of K can be put into the system and the closed-loop response to a step input of 0.25 m can be obtained. Sys_cl=feedback(k*c*p_ball,1); t=0:0.01:5; figure step(0.25*sys_cl,t) From this plot we see that when a 0.25-m step input is given to the system both the settling time and percent overshoot design criteria are met.
  • 32. Frequency DomainMethods forController Design  The open-loop transfer function of the plant for the ball and beam experiment is given below:  The design criteria for this problem are: Settling time less than 3 seconds Overshoot less than 5%
  • 33. Open-loopBode Plot • Adding a controller to the system changes the open-loop Bode plot, therefore changing the closed-loop response. • For obtaining the Bode Plot for this original open-loop transfer function, we have to create a new m-file with the following code and then run it in the MATLAB command window. m = 0.111; R = 0.015; g = -9.8; L = 1.0; d = 0.03; J = 9.99e-6; s = tf('s'); P_ball = -m*g*d/L/(J/R^2+m)/s^2; bode(P_ball)
  • 34. • From this plot ,we see that the phase margin is zero which in turn indicates our system is unstable. • If we want to increase the phase margin and we can use a lead compensator controller to do this.
  • 35. Phase-lead controller • A first order phase-lead compensator has the form given below: • The phase-lead compensator will add positive phase to our system over the frequency range 1/ a T and 1/T, which are called the corner frequencies. • The maximum added phase for one lead compensator is 90 degrees. • For our controller design we need a percent overshoot of less than 5%, which corresponds to a damping ratio (rho) of 0.7 • Generally 100*rho will give you the minimum phase margin needed to obtain your desired overshoot • Therefore, we require a phase margin greater than 70 degrees.
  • 36. To obtain T and α, the following steps can be applied 1. Determine the positive phase needed 2. Determine the frequency where the phase should be added (center frequency) 3. Determine the constant a from the equation below: 4. Determine t and aT from the following equations: For 70 degrees and center frequency = 1, = 0.176 and = 5.67
  • 37. • Now, we can add our lead controller to the system and view the bode plot. phi=70*pi/180; a=(1-sin(phi))/(1+sin(phi)); w=1; T=1/(w*sqrt(a)); K = 1; C = K*(1+T*s)/(1+a*T*s); bode(C*P_ball) You can see that our phase margin is now 70 degrees
  • 38. • Let's check the closed-loop response to a step input of 0.25 m. • Add the following to your m-file. You should get the following plot: sys_cl = feedback(C*P_ball,1); t = 0:0.01:5; step(0.25*sys_cl,t) Although the system is now stable and the overshoot is only slightly over 5%, the settling time is not satisfactory.
  • 39. Increasing the gain will increase the crossover frequency and make the response faster. With K = 5, your response should look like: K = 5; C = K*(1+T*s)/(1+a*T*s); sys_cl = feedback(C*P_ball,1); bode(C*P_ball) step(0.25*sys_cl,t) The response is faster, however, the overshoot is much too high. Increasing the gain further will just make the overshoot worse.
  • 40. ADDING MORE PHASE We can increase our phase-lead compensator to decrease the overshoot pm = 80; w = 1; K = 1; %view compensated system bode plot pmr = pm*pi/180; a = (1 - sin(pmr))/(1+sin(pmr)); T = sqrt(a)/w; aT = 1/(w*sqrt(a)); C = K*(1+aT*s)/(1+T*s); figure bode(C*P_ball) %view step response sys_cl = feedback(C*P_ball,1); t = 0:0.01:5; figure step(0.25*sys_cl,t)
  • 41. The overshoot is fine but the settling time is just a bit long Try different numbers
  • 42. Using the following values the design criteria was met pm = 85; w = 1.9; K = 2; %view compensated system bode plot pmr = pm*pi/180; a = (1 - sin(pmr))/(1+sin(pmr)); T = sqrt(a)/w; aT = 1/(w*sqrt(a)); C = K*(1+aT*s)/(1+T*s); figure bode(C*P_ball) %view step response sys_cl = feedback(C*P_ball,1); t = 0:0.01:5; figure step(0.25*sys_cl,t)
  • 43. the design criteria was met  Settling time less than 3 seconds  Overshoot less than 5%
  • 45. SIMULINK MODELING We need to make a s/m with input as motor gear angle and output as ball position
  • 46.
  • 47. VARIABLES CAN ONLY BE ASSIGNED TO FUNCTION BLOCK AS FUNCTIONS OF U SO LET.,
  • 48.
  • 49. Now lets make it into a subsystem and check the open-loop response Assign values of constants in command window
  • 50. Run for 10 sec and check output SYSTEM IS BIBO UNSTABLE SO WE NEED TO ADD A CONTROLLER TO MAKE THE SYSTEM STABLE We are adding the root locus controller we designed earlier to make it stable Meaning the ball will roll off the beam
  • 51. Root locus controller design  ADDING GAIN BLOCK OF 34.7 AND  ADDING LEAD COMPENSATOR BY ADDING A ZERO AT 0.01 AND A POLE AT 5  THEN GIVE A UNIT NEGATIVE FEEDBACK AS SHOWN IN FIG
  • 52. Now lets run the stimulation for 10s and view the output Yes. The system is stable Also our design criterias are met Max Peak Overshoot < 5% Settling time < 3 Sec Thus our stimulation is complete and success
  • 53. P R E PA R E D BY G ro u p 7 A LV I N S A J I G EO R G E B H A R AT H V I N O D A N I T H A K R A S W I N K V FA B N A N S U B M I T T E D TO D r M AT H E W P A B R A H A M R E F E R E N C E : C T M S . E N G I N . U M I C H . E D U