0% found this document useful (0 votes)
19 views12 pages

LAB 12 CNC

Cnc machine

Uploaded by

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

LAB 12 CNC

Cnc machine

Uploaded by

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

Control Engineering Lab

Experiment No 12:
Calibrate the real-time DC servo motor system by analyzing
the performance parameter of PID controller

OBJECTIVE
 Design P, I, PI, PD, PID controller to calibrate the DC servo motor system.

THEORY
A proportional-integral-derivative controller (PID controller) is a control
loop feedback mechanism (controller) widely used in industrial control systems. A PID
controller calculates an error value as the difference between a measured process variable
and a desired set point. The controller attempts to minimize the error by adjusting the
process through use of a manipulated variable

Figure 1

As a kind of linear controller, the PID controller shall constitute control


deviation (4) between the given value r (t )and actual output value y (t)

e (t)=r (t)− y (t)

The PID controller is so called because it combines Proportion (P), Integral


(I ) with Differential (D) of the deviation via linear means, and constitutes
the control variable to have the object controlled. The law is:

[ ]
t
1 de (t )
u(t )=K P e( t)+ ∫
Tl 0
❑ e (t)dt+ T D
dt

Or in the form of transfer function

1
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

G(s)=
U (s)
E(s) (
=K P 1+
1
Tls )
+T D s

G(s)=
U (s)
E(s) (
=K 1+ P
1
T s
+T s
l
) D

Where, K P means proportion coefficient, T I integral time constant, and T D differential


time constant. In control system design and simulation, the transfer function is also
written in the form of:

U (s) K K s 2 + K p s+ K I
G(s)= =K P+ I + K D s= D
E(s) s s

Where, K P means proportion coefficient, T I integral coefficient, and T D differential

Figure 2
coefficient. Seen from the standpoint of root locus, formula (2.10) is equivalent to adding
a pole located at base point and two null points with variable location to the system.

5
Let assume the plant transfer function in above system is .
( s+1)( s+2)(s+3)
GRAPH:

PI:
Figure 3

2
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

PD:

Figure 4

PID:

Figure 5

3
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

MATLAB CODE:
clear
num=[5];
den=[1 6 11 6];
sys_ol=tf(num,den)
roots=zpk(sys_ol)
sys_cl=feedback(sys_ol,1)
% Design of PI controller..........................................
[Gc_PI, info_PI]=pidtune(sys_ol,'PI')
sys_clf=feedback(sys_ol*Gc_PI,1)
step(sys_cl,sys_clf)
% Design of PD controller..........................................
[Gc_PD, info_PD]=pidtune(sys_ol,'PD')
sys_clf=feedback(sys_ol*Gc_PD,1)
step(sys_cl,sys_clf)
% Design of PID controller..........................................
[Gc_PID, info_PID]=pidtune(sys_ol,'PID')
sys_clf=feedback(sys_ol*Gc_PID,1)
step(sys_cl,sys_clf))

Characteristics of P, I, and D controllers:


The proportional controller (KP) will have the effect of reducing the rise time and will
reduce, but never eliminate, the steady state error. An integral controller (K I) will have
the effect of eliminating the steady state error, but it may make the transient response
worse. A derivative control (KD) will have the effect of increasing the stability of the
system, reducing the overshoot and improving the transient response.

4
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

Lab Tasks
Q1: Open loop transfer function of DC Servo motor is
1
G0 (s)=
( 0.052 S+1)(0.12 S +1)
Show the close loop transfer function of DC servo motor by executing the Matlab
command when unit step input is applied. Record percentage overshoot, settling time,
peak time, and rise time.

Q2: Show the following tasks by executing the Matlab / Simulink commands.
1. Implement proportional and integral controller separately with Dc servo motor close
loop transfer function to yield closed-loop response with overshoot less than 10%,
settling time less than 1.5sec and static error 0. Investigate the K P and KI value to
achieve the desired results for real time DC servo system.
2. Implement PI, PD and PID Controller separately to the Dc servo close loop transfer
function to yield a closed-loop response with overshoot less than 5%, settling time
less than 1.5sec and static error 0.

5
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

Q 1) Matlab Code

6
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

Q 2) Matlab Code

clc
clear all
sysa=tf([1],[0.052 1])
sysb=tf([1],[0.12 1])
sysc=series(sysa,sysb)
sysd=feedback(sysc,1)
pidTuner

P controller

7
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

I Controller

8
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

PI Controller

9
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

PD Controller

10
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

PID Controller

11
Department of Mechanical Engineering, Air University A&AC Kamra
Control Engineering Lab

Conclusion

12
Department of Mechanical Engineering, Air University A&AC Kamra

You might also like