Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

LAB 10

PID And STATE FEEDBACK CONTROLLER FOR OVERHEAD


CRANE
Anees Sohail(RP21-EE-419)
Haroon Raza (RP21-EE-401)
Hammad Sajid(RP21-EE-432)
Nabeel Shoukat(RP21-EE-434)
IEECE, University of the Punjab Lahore-54590 PAKISTAN
Email: aneessohail31d@gmail.com
Instructor: Dr. Umar Farooq

Abstract:
In this lab, we're building a model of an
overhead crane and using controller to keep
it from swinging too much while lifting and
moving loads. We want to prevent the
crane from swinging wildly because that
could cause damage and harm people. So,
we're using PID controller to keep
everything stable and safe by reducing the
swing.
In our lab, we're working on making sure
Keywords: the crane doesn't swing too much when it's
carrying stuff around. We're using
1. PID controller,
a PID controller and state feedback
2. Swinging/Oscillations controller to help with this. If the crane
swings too much, it could break and hurt
3. State feedback
people or damage things.
controllers
4. Overhead crane,
So, we're using PID to keep the crane
steady and safe. The PID controller helps by
making small adjustments to keep
1. Introduction: everything balanced. By doing this, we can
prevent accidents and make sure everything
Overhead cranes have come a long way goes smoothly in the lab.
since they were first invented. They used to
run on steam power, mainly moving heavy
things in factories. Now, they're powered 2. Mathematical Modeling
by electricity and hydraulics, making them
work better. Non linear equation of motion of Overhead
crane
(m+M)*x ̈ + b*x ̇ + m*l*θ ̈*cosθ (I + m*l2 ¿∗θ̈ – m*g*l*θ – m*l)¿ ẍ +b 1∗θ̇ = 0
m*l*θ^2*sinθ=F ……….eq(1) ………..eq(10)
After linearize these equation we find the
(I + m*l^2)*θ ̈ – m*g*l*sinθ+m*l*x ̈ *cosθ θ (s )
+b1*θ ̇ = 0 ………..eq(2) transfer function of is given below
F ( s)
θ (s ) m∗l
From eq(2) = ∗s2 +b 1∗( b+ ( m
F ( s) ( I ( m+ M ) + ( I +m∗l )∗b+m∗M ∗l ) ¿
2 2

θ ̈= 1/((I + m*l^2))*(m*g*l*sinθ-m*l*x ̈ ……..eq(11)


*cosθ - b1*θ ̇) ………….eq(3)

Put eq(3) in eq(1) Parameters:

(m+M)*x ̈ + b*x ̇ + m*l*1/((I +


m*l^2))*(m*g*l*sinθ-m*l*x ̈ *cosθ - b1*θ ̇)
*cosθ – m*l*θ^2*sinθ=F ………….eq (4)

((m+M)- (m*l *cosθ)/((I +


m*l^2))*m*l*cosθ)* x ̈ + b*x ̇ + (m*l
*cosθ)/((I + m*l^2))*(b1*θ ̇) –
m*l*θ^2*sinθ=F …..eq (5)

β1(t)*x ̈ + b*x ̇ + β2(t) - β3(t) - β4(t) = F


………..eq (6)

x ̈= 1/β1(t) *( -b*x ̇ - β2(t) + β3(t) + β4(t) +


F )……..eq (7)

θ ̈= k2/k1*sin θ - β1(t)/k1 -
(m*l*cosθ)/(k1*β1(t) ) + (b1*θ)/k1 ………
eq (8)

To linearize this equations (1) and (2)


by using taylor series:
At θ=π
Assume
sin θ - π
cos θ −1
2
θ̇ =0
We give the linear equations are motions
are
(m+M)¿ ẍ + b* ẋ - m*l*θ̈=F … … … . eq (9)
L 0.36
g 9.8
M 2.4
m 0.23
I 0.099
b 0.05
B1 0.005

After putting the parameters in eq (11) we get

The Transfer Function is


θ (s ) ( 0.23 )∗(0.36)
= … … eq (
F ( s) ((0.099)(2.63)∗( 0.1288 )∗(0.05))∗s + ( ( 0.005 )∗( ( 0.05 ) + ( 0.23+ 2.4 ) ) )∗s+( ( 0.8114 )∗(2.63)+0.05)
2

Applying Some Simplification

θ (s ) (0.0828)
= … … eq (13)
F (s) (0.338)∗s + ( 0.0134 )∗s +(2.183)
2

Eq (13) is the transfer function of overhead crane.

3. Controller design

We design a PID controller for overhead crane


θ (s ) (0.0828)
= … … eq (10)
F (s) (0.338)∗s + ( 0.0134 )∗s +(2.183)
2

We make closed loop system of this equation

θ (s ) (0.0828)(kp∗s+ ki+ kd ¿ s2 )
= … … eq (14)
F (s) ( 0.338 )∗s 3+ ( 0.0134+0.0828∗kd )∗s+ ( 2.183+ 0.0828∗kp ) +0.0828∗Ki

Finding Desired poles


Ts = 0.5 sec and %O.S is 10%
Desired eq is given below
3 2
s +116 s +1681∗s +8100 … … eq (15)
We compare this eq to find the values of gain with eq (10)
Kp=20275 , Ki = 97826 , Kd = 1400
We design a state feedback controller by using servo control.
FIGURE.1
Figure.1. shows the loop of Servo control of state feedback
ẋ = Ax+Bu ……eq(12) open loop
U=-K1*x
ẋ=x∗( A−B∗K 1 ) … eq ( 16 ) closed loop

[ ][
˙
x1
=
0 1
][ ] [ ]
x1
x 2 −6.45 −0.0396 x 2 0.244
+
0
R

[
A-Bk=
0 1
−6.45 −0.0396 ][ ]

0
0.244
∗¿

A-BK= [−6.45−0.244∗K
0
1 −0.0396−0.244∗K 2 ]
1

[ 6.45+0.244∗K
s- (A-Bk)=
s
1 s+ 6.45+0.244∗K 2 ]
−1

After taking determinant we get


2
s + s∗( 0.0396+0.244∗K 2 ) +(0.244∗K 1+6.45)=0 eq (17 )
Place all the poles at s=-10 so we get the equation
(s+10)*(s+10)=0
After simplifying we get
2
s +20∗s +100=0 … … eq ( 18 )
After comparing the equations 17 and 18 we get values of K1 K2 and K3.
K1=383.40 , K2=81.80

We design a state feedback controller by using servo control because G(s) has no integrator.
Integral control of state feedback controller
Figure.2.

Figure.2. shows the loop of integral control of state feedback


ẋ = Ax+Bu ……eq(19) open loop
U=Ki*γ -K*x
ẋ=x∗( A−B∗K )+ B∗Ki∗γ … eq ( 20 ) closed loop
[ ẋγ ]=[( A−BK
−Cx
)
0 ][ ] [ ]
B∗Ki x
+
0
γ 200
R

[ ]
0 1 0
A-Bk= −6.45−0.244∗Ki −0.0396−0.244∗K 2 0.244∗Ki
1 0 0

[ ]
s −1 0
s- (A-Bk)= 6.45+0.244∗Ki s+0.0396+ 0.244∗K 2 −0.244∗Ki
−1 0 s
After taking determinant we get
s3 +12∗s 2 ( 0.0396+ 0.244∗K 2 ) +s∗( 6.45+ 0.244∗K 1 )−0.244∗Ki=0 eq ( 21 )
Place all the poles at s= -10 so we get the equation
(s+10)*(s+10)*(s+10)=0
After simplifying we get
3 2
s +30∗s +100∗s+ 1000=0 … … eq ( 22 )
After comparing the equations 14 and 15 we get values of Ki K1 and K2
Ki=4098.36 , K1=383.40 , K2=122.78
4.1
We Implement into both hardware and simulation simulation on Matlab simulink are shown in
Fig.3.
Figure.3.

Figure.3. shows the non linear model of overhead crane.


Figure.3.
Figure.3. shows the response of the position covers of overhead crane.
Figure.4.

Figure .4. shows the output response of non linear overhead crane.

Figure.5.

Figure 5. shows the open loop model of overhead crane.

Figure.6.

Figure.6.shows the output response of closed loop with PID controller of overhead crane.
Figure.7.

Figure.7.shows the output response of PID controller of overhead crane.


Figure.8.

Figure.8. shows the model of State feedback controller (Servo Control) of DC overhead crane.

Figure.9.
Figure.9. shows the output response of state feedback controller (Servo control) of DC
overhead crane.

Figure.10.

Figure.10. shows the model of state feedback controller (integral control) of DC overhead
crane.
Figure.11.

Figure.11. shows the output response of state feedback controller (integral control) of DC
overhead crane.

Figure.12.
Figure.12. shows the hardware model of overhead crane.
Figure.13.

Figure.13. shows the open loop response of the overhead crane

Figure.14.
Figure.14. shows the closed response of the overhead crane

5. Conclusions
In this experiment, we've found that before Acknowledgment
implementing the PID and state feedback We gratefully acknowledge the support of
controllers, the overhead crane Dr.Umar Farooq for this project who helped
experienced maximum oscillation. us in understanding the problem to
However, after applying PID, we observed a overcome it with some solution.
significant reduction in oscillation, thereby
minimizing the likelihood of accidents. Now, References
the crane moves more smoothly between [1] E . Monmasson and M. N. Cirtea,
locations and efficiently transports objects “Design methodology for in dustrial control
without excessive swinging. systems: A review, “IEEE trans. IND.
Electrons., vol . 54. No. 4 pp. 1824-
1842,2007.
[2] J. Holtz, “Pulsewidth modulation: A
survey”IEEE trans. Ind. Electrons, vol. 39,
no.5,pp. 410-420, dec. 1992.

You might also like