0% found this document useful (0 votes)
4 views7 pages

PID Control

Uploaded by

amgadalinasser00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views7 pages

PID Control

Uploaded by

amgadalinasser00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Made with Xodo PDF Reader and Editor

Faculty of Engineering
Electrical Engineering Department

What do we offer?
➢ Daily harvests and
summaries.
➢ Tutorial links & websites
The Weekly News.
➢ Scientific Seminars.
➢ Various scientific journals.
➢ Scientific trips.
➢ Experimental questions
and models.
➢ Scientific abstracts.
➢ Audio records for the
lectures.
➢ Videos for the lectures.
➢ Test Forms.
➢ Bots and Scientific
Channels.

Lab No: (1)

Committee’s Members:
Fares Alselwi
Course name:
Digital Control Systems (Lab)
Made with Xodo PDF Reader and Editor

➢ LAP1 PID control:

%in this lab we show tha pid control and effict of the errors control system
% and we show the graphcally section with diffrent value of Kp.

kp=1 ; ki=1 ; kd=1


s=tf('s') % define Laplace variable
gc=kp+ki/s+kd*s % constructs the tf of the PID controller in the Laplace domain
c=pid(kp,ki,kd) % creates a PID controller
tf(c)

kd =1
s = s
Continuous-time transfer function.

gc =

s^2 + s + 1
------------------
s
Continuous-time transfer function.
c =
1
Kp + Ki * --- + Kd * s
s

with Kp = 1, Ki = 1, Kd1 =

Continuous-time PID controller in parallel form.

ans =
s^2 + s + 1
-------------------
s

Continuous-time transfer function.

kp=[1 5 10 15 20 30]
ki=0
kd=0

c=pid(kp,ki,kd)
gp=tf(1,[1 3 1])
h=1
uncsys=feedback(gp*c,h)
step(uncsys)

hold on
Made with Xodo PDF Reader and Editor

kp ‫عندما تتغير قيمة‬


kp =
1 5 10 15 20 30
ki = 0
kd = 0

When Kp = 1

gp = 1
-----------------
s^2 + 3 s + 2

When Kp = 5

gp = 5
-----------------
s^2 + 3 s + 6

When Kp = 10

gp = 10
-----------------
s^2 + 3 s + 11

When Kp = 15

gp = 15
-----------------
s^2 + 3 s + 16

When Kp =20

gp = 20
-----------------
s^2 + 3 s + 21

When Kp = 30

gp = 30
-----------------
s^2 + 3 s + 31

1x6 array of continuous-time transfer functions.


Made with Xodo PDF Reader and Editor
Made with Xodo PDF Reader and Editor

kp=15
ki=4
kd=7
c=pid(kp,ki,kd)
gp=tf(1,[1 3 1])
h=1
uncsys=feedback(gp,h)
step(uncsys)
hold on
csys=feedback(gp*c,h)
step(csys)
grid

kp = 15
ki = 4
kd = 7
c = 1
Kp + Ki * --- + Kd * s
s
with Kp = 15, Ki = 4, Kd = 7
Continuous-time PID controller in parallel form.
gp =
1
----------------
s^2 + 3 s + 1
Continuous-time transfer function.
h = 1
uncsys =
1
---------------------
s^2 + 3 s + 2
Continuous-time transfer function.
csys =
7 s^2 + 15 s + 4
---------------------------------
s^3 + 10 s^2 + 16 s + 4

Continuous-time transfer function.

kp=20
ki=4
kd=7
c=pid(kp,ki,kd)
gp=tf(1,[1 3 1])
h=1
uncsys=feedback(gp,h)
step(uncsys)
hold on
csys=feedback(gp*c,h)
step(csys)
grid
Made with Xodo PDF Reader and Editor

kp = 20
ki = 4
kd = 7
c =
1
Kp + Ki * --- + Kd * s
s
with Kp = 20, Ki = 4, Kd = 7
Continuous-time PID controller in parallel form.
gp =
1
------------------
s^2 + 3 s + 1
Continuous-time transfer function.
h = 1
uncsys =
1
--------------------
s^2 + 3 s + 2
Continuous-time transfer function.
csys =

7 s^2 + 20 s + 4
-----------------------
s^3 + 10 s^2 + 21 s + 4

Continuous-time transfer function.

Gp=tf(1 ,[1 10 20])


step(feedback(Gp,h))
hold on
[C info ]=pidtune( Gp,'pid')
step(feedback(Gp*C,h))

Gp = 1
----------------------
s^2 + 10 s + 20
Continuous-time transfer function.
C =
1
Kp + Ki * --- + Kd * s
s
with Kp = 39.3, Ki = 116, Kd =
3.33
Continuous-time PID controller in
parallel form.
info =
struct with fields:
Stable: 1
CrossoverFrequency: 4.1614
PhaseMargin: 74.0404
Made with Xodo PDF Reader and Editor

Pidtool ‫بطريقة اخرى نستطيع استخدام أمر‬

pidtool ( Gp)

Written by fares Alselwi

You might also like