You are on page 1of 10

Sudan University of Science and Technology

Faculty of Engineering
School of Electrical and Nuclear Engineering
Fifth Year (Control)
Course of Computer Application 4

P PI PD PID
controllers
,

and

with a rotational mechanical system

Prepared by:
Haitham Mohammed Ali Al-radhi

Number: 88

Teacher: Nihad Abdullah Hamid

01-08-2016

1: The schematic of the physical system


The figure below represents the schematic of a rotational mechanical system, the
output is the angular displacement 2(t) and the input is the torque T(t).

1(t)

T(t)
2(t)

Fig.(1): Rotational mechanical system.


First of all, we derive the equations for the system as follow:
[Sum of impedances connected to the motion at 1] 1(s) [Sum of impedances
between 1 and 2] 2(s) = [Sum of applied torques at 1] . (a)
-[Sum of impedances between 1 and 2] 1(s) + [Sum of impedances connected to
the motion at 2] 2(s) = [Sum of applied torques at 2] (b)
So,
[J1s2 + b1s + k1]
-[b1s+k1]

1(s)

1(s)

[b1s+k1] 2(s) = T(s) (1)

+ [(b1+b2)s + (k1+k2)]

2(s)

=0

.(2)

Equations (1),(2) are analogous to electrical mesh equations after conversion to


angular velocity. Thus,
[J1s + b1+

1(s)

[b1+ ]

2(s)

= T(s) (3)

-[b1+ ]

1(s)

+ [(b1+b2) +

2(s)

=0

.(4)

Now, we can write the equations using the electrical components where J=L, b=R,
k=1/c, T(s)=E(s), (s)=I(s) We get:
[Ls+ R1 +

]I1(s) [R1+

]I2(s) = E(s) (5)

-[R1+ ]I1(s) + [(R1+R2) +

]I2(s) = 0

.(6)

2: The equivalent electric system and the transfer function


The equivalent electrical circuit is shown below, the output is the current i2(t)
and the input is the voltage v(t), but i represent the angular velocity and in our
system the output is the angular displacement then, in the next equations I(s) will
be replaced with sI(s) to represent the output :
L

e(t)
i1(t)

R1

R2
i2(t)

c1

c2

Fig.(2): The equivalent electrical circuit for our rotational mechanical system.
To simplify the operation, lets choose values for the components as follows:
J=1 kg.m2, b=1 N.m.s/rad, k=1N.m/rad, T=50 N.m
L=1H, R=1 , c=(1/k)=1 F, e=50v

By substituting the values in the equations:


[s+ 1 + ]sI1(s) [1+ ]sI2(s) = E(s) (7)
-[1+ ]sI1(s) + [2+ ]sI2(s) = 0

.(8)

By solving the two equations (7),(8), either using the matrixes or the substituting,
we get the transfer function G(s)= I2(s)/E(s).
G(s)=

after simplification,
G(s) =

3: The system response without controller


Figure (3) shows the simulink model, the m-file code and the step response of the
rotational mechanical system without adding any controller.

(a)

(b)

Figure (3): a. The


simulink model. b. The mfile code. c. The step
response of the system
without adding any
controller.

(c)
The DC gain of the closed loop transfer function (sys=

) is , so 0.5 is the

final value of the output to a unit step input. This corresponds to the steady-state
error of 0.5, quite large indeed.

Its desired to meet these characteristics:


the settling time equals to 1.5 sec, the rising time equals to 0.4 sec, the peak time
equals to 1 sec, the overshoot is desired to be less than 5% , and eliminate the
steady-state error.

4: P- Controller
Proportional controller contains a proportional gain serially connected to the
system plant. The main usage of the proportional (P) controller is to decrease (but
never eliminate) the steady state error of the system. Applying P controller
decreases the rise time. Increasing gain increases percent overshoot and number of
oscillations.
Figure (4) shows the simulink model, the m-file code and the step response
of the rotational mechanical system with P controller.

(a)
(b)

Figure (4): a. The


simulink model. b.
The m-file code. c.
The step response of
the system with Pcontroller.

(c)

5: PI- Controller
Proportional-Integral controller contains a proportional gain and an integral
connected in parallel and the combination of them is connected serially to the
system plant. Using integral control makes the system type-one so, the steady-state
error due to a step input is zero. However, it has very poor transient response.
Using integral action increases the oscillations in the output of the closed loop
systems. Increasing ki increases overshoot and settling time making the system
response sluggish.
Figure (5) shows the simulink model, the m-file code and the step response of
the rotational mechanical system with PI controller.

(a)
(b)

Figure (5): a. The


simulink model. b.
The m-file code. c.
The step response of
the system with PIcontroller.

(c)

6: PD- Controller
Proportional-Derivative controller contains a proportional gain and a derivative
controller connected in parallel and the combination of them is connected serially
to the system plant. Derivative action is usually used to improve transient response
of the closed loop system. Only D control is not used because it amplifies high
frequency noise which is never desired. Derivative action decreases the overshoot
and the settling time, and had a small effect on the rise time. However, it does not
have any effect on steady state performance of the closed loop.
Figure (6) shows the simulink model, the m-file code and the step response of
the rotational mechanical system with PD controller.

(a)
(b)

Figure (6): a. The


simulink model. b.
The m-file code. c.
The step response
of the system with
PD-controller.

(c)

7: PID- Controller
Proportional-Integral-Derivative controller contains a proportional gain, a
derivative controller, as well as integral connected in parallel and the combination
of them is connected serially to the system plant. PID controllers are considered as
the best choice to control various plants. It has zero steady-state error, fast
response (short rise time), no oscillations and higher stability means acceptable
transient response. The only problem with PID control is tuning.
Figure (7) shows the simulink model, the m-file code and the step response of
the rotational mechanical system with PID controller.

(a)
(b)

Figure (7): a. The


simulink model. b. The
m-file code. c. The step
response of the system
with PID-controller.

(c)

8: Results

Control
type
-

Parameters

P
controller
PI
controller
PD
controller
PID
controller

kp=10

15.1

0.483

1.34

71.4

0.091

kp=10
ki=2
kp=10
kd=10
kp=10
ki=5.7
kd=10.6

24.4

0.499

1.35

67.8

2.38

0.286

0.814

10.9

0.091

1.49

0.346

0.907

3.97

Settling
Rising
time (sec) time (sec)
14.1
1.27

Peak
Over
time (sec) shoot (%)
3.32
44.3

Steadystate error
0.5

Important Notice:
As mentioned before that the problem with the controllers is the tuning
operation to find the best parameters. Fortunately, MATLAB has automatic tuning
option. However, automatic tuning does not usually provide the best results, it only
provides optimal results. P-I-D tuning is an engineering art and should be manually
done by control engineers. In this system the controllers parameters had chosen
manually.

You might also like