100% found this document useful (1 vote)
52 views12 pages

Mohsin PID Controller Tutorial

This document provides an example of designing a PID controller for a second order mass damper system. It first presents the mathematical model of the system and analyzes its open loop response. It then introduces a PD controller in the closed loop transfer function. By comparing to a standard second order system, it calculates the PD controller gains to achieve a settling time of less than 0.5 seconds. Simulation results show the closed loop response has a settling time of 0.44 seconds and overshoot of 17.8%, meeting the requirements. Finally, it provides some MATLAB commands for analysis and presents a practice problem of designing a PD controller for a DC motor speed control system.

Uploaded by

Mukaram Ali
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (1 vote)
52 views12 pages

Mohsin PID Controller Tutorial

This document provides an example of designing a PID controller for a second order mass damper system. It first presents the mathematical model of the system and analyzes its open loop response. It then introduces a PD controller in the closed loop transfer function. By comparing to a standard second order system, it calculates the PD controller gains to achieve a settling time of less than 0.5 seconds. Simulation results show the closed loop response has a settling time of 0.44 seconds and overshoot of 17.8%, meeting the requirements. Finally, it provides some MATLAB commands for analysis and presents a practice problem of designing a PD controller for a DC motor speed control system.

Uploaded by

Mukaram Ali
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 12

PID Controller (Tutorial)

SUBJECT: CONTROL SYSTEMS


INSTRUCTOR: DR MOHSIN JAMIL

Example#1(2nd Order Mass Damper System)


Given is the 2nd order mass damper System. Design a PD Controller for
the given system such that
Settling time<0.5 second

m 10kg

m=Mass of Object

k 1

k=Spring Cofficient

b 1

b=Damping Cofficient
f=Input Force
x=Outpt Displacement

Solution
Approach to Solve the problem

Get the Mathematical Model of System(Modelling)


Open Loop Response of the System.
Transfer Function of Proposed Controller.
Closed-Loop Transfer Function.
Comparison With Standard 2nd Order System to get Controller Gains.
Closed-Loop Response of the System.

Mathematical Modelling of Mass Damper System


Using Newtons 2nd Law of Motion

F ma

input force f t
spring force kx t
damping force bx t
mx t f t kx t bx t
Taking LaplaceTransform
ms 2 X s F s kX s bsX ( s )
X s
F s

1
ms 2 bs k

TF

X s
F s

1
10 s 2 s 1

Open Loop Response of System


Step Response

System: sys
Peak amplitude: 1.6
Overshoot (%): 60.4
At time (sec): 10.2

1.8

1.6

1.4

1.2

System: sys
Time (sec): 72.6
Amplitude: 1.02

Amplitude

1
System: sys
Final Value: 1
System: sys
Rise Time (sec): 3.69

0.8

0.6

0.4

0.2

20

40

60
Time (sec)

80

100

120

Closed-Loop Transfer Function

Controller TF K c s k p k d s
Plant TF G s

1
10 s 2 s 1

Closed LoopTF H s

Kc s G s

1 Kc s G s

kd s

10 s 2 kd 1 s k p 1

Gain Calculation
Compare with Standard 2nd Order System we will get
n 2

2
2
s 2n s n
kd 1
10
kp 1

2n

n
2

10

0.1 k p kd s
k 1 kp 1
s2 d
s

10 10

k p 1321
kd 183

1325 183s
H s
10 s 2 184 s 1322

8
ts

4.6

4.6
n
11.5
0.8*0.5

Closed-Loop Response
Step Response
1.4
System: sys
Peak amplitude: 1.18
Overshoot (%): 17.8
At time (sec): 0.186

1.2

System: sys
Settling Time (sec): 0.44
1
System: sys
Final Value: 0.999
System: sys
Rise Time (sec): 0.0707

Amplitude

0.8

0.6

0.4

0.2

0.1

0.2

0.3
Time (sec)

0.4

0.5

0.6

Analysis
Resulting Overshoot is 17% and the Settling time is 0.4 sec. so from
result it can be concluded that PD controller deals very well with the
settling time but a bit problem with overshoot but still it reduced from
the 60 % to 17 %

Common MATLAB Commands


Defining Transfer Function
>>num=[1 0] %Nominator of Transfer Function with increasing power of s
form right to left
>>dnum=[10 2 1] %Denominator of Transfer Function
>>sys=tf(num,dnum) %Command to define transfer function
>>sys1=feedback(sys,1) %System with unity feedback closed-loop transfer
function

System Analysis

>>step(sys) %Gives the response of system for step input


>>impulse(sys) %Gives the response of system for impulse input
>>pzmap(sys) %Gives Pole-Zero Map of system
>>rlocus(sys) %Gives Root locus Plot for system
>>bode(sys) %Gives Bode Plots of system
>>nyquist(sys) %Gives Nyquist plot of system

Practice Exercise
Change the Value of Gains and see the effect on the output.
See the effect of using proportional, derivative and integral controllers
individually and with different combinations.
See the effect of P, I and D controller effect on the different perimeters
like settling time, overshoot, rise time and steady state errors.

Get Familiar with MATLAB and SIMULINK to perform simulations.

Practice Problem(DC Motor Speed Control)


Design a PD Controller for the Given DC Motor Model such that
Settling time is less than 2 sec and overshoot less than 5 %.
J 0.01
b 0.1
K 0.01
R 1
L 0.5

You might also like