You are on page 1of 14

Process Control and Dynamics

MATLAB Assignment
Name: Vaibhav Jaiswal, Entry No. 2017CH10232, Group: 4

1. For the process transfer function:

a. Analysis in Simulink considering (1) no disturbances (ii) transfer function of the final
control element to be unity, generating the open loop response for a step change of
magnitude 2, with step time is after 1 s:
Ans. Below image depicts the open loop circuit setup where the input is step change of 2
magnitude. when Gv=1 and Gp=2/(s+1) along with Time delay of -0.2 in exponential to
obtain the same expression of G(s).
Below image depicts the input (step change of 2) in blue color and output response in
yellow obtained from scope.

b. Analysis in Simulink considering measurement transfer function to be unity,


generating the closed loop response:
Ans. Below image depicts the closed loop circuit setup where the input is step change of
2 magnitude. when Gv=1 and Gp=2/(s+1) along with Time delay of -0.2 in exponential to
obtain the same expression of G(s). Also, with Gm=1.
Below image depicts the input (step change of 2) in blue color and output response in yellow
obtained from scope.
c. Tuning suitable P, PI, and PID controllers using Ziegler-Nichols method and
comparing the responses:
Ans. Below image depicts the closed loop circuit setup where the input is step change of
2 magnitude. when Gv=1 and Gp=2/(s+1) along with Time delay of -0.2 in exponential to
obtain the same expression of G(s). Also, with Gm=1 and with P-controller.

I used max. step-size of 10^(-2).


Ziegler-Nichols: The integral and derivative control is eliminated; only Proportional
controller is used to get value of Kcu.
I tried to set Kc equal to a small value 1 and place the controller in the automatic mode but
the cycling response wasn’t stable. Gradually increase Kc in small increments until
continuous cycling occurs.
Checked at 5, then at 2, then 4….and so on till continuous cycling and sustained oscillation
with a constant amplitude was achieved at Kc= 4.25373748. Thus, got the ultimate gain, Kcu
= Kc = 4.25373748.
Then, I checked the same output response for more time to visualise whether it is stable or
converging or diverging. The above graph is at T= 10
The below graph for at T= 20

The below graph for at T= 50


The below graph for at T= 100

The below graph for at T= 10000


The period of the corresponding sustained oscillation is referred to as the ultimate period,
Pu which is obtained by measuring the time taken from one peak to other (using the cursor
measurements from Tools)
So, change in T comes out to be = 744 ms i.e. 0.744 seconds.

Now, we have got the value of Kcu = 4.25373748 and Pu = 0.744 seconds

Ziegler-Nichols Kc ƮI ƮD

P 0.5Kcu - -
PI 0.45Kcu Pu/1.2 -
PID 0.6Kcu Pu/2 Pu/8

So, we can calculate the values for P, PI and PID controller using above table.
i) For P controller:
Ziegler-Nichols Kc ƮI ƮD

P 2.12686874 - -

The settings work same in Parallel as well as in ideal case because it is just P controller.

Below image depicts the input (step change of 2) in blue color and output response in
yellow obtained from scope.
ii) For PI controller:

Ziegler-Nichols Kc ƮI ƮD

PI 1.914181866 0.62 -
I have used the Ideal form rather than the Parallel form for solving PI controller in Simulink
as the ideal one resemble best with analogous formula of PI controller. Also, I have put the
values in accordance with the table of Ziegler-Nichols method.

Below image depicts the input (step change of 2) in blue color and output response in
yellow obtained from scope.
iii) For PID controller:

Ziegler-Nichols Kc ƮI ƮD

PID 2.552242488 0.372 0.093


I have used the Ideal form rather than the Parallel form for solving PID controller in Simulink
as the ideal one resemble best with analogous formula of PID controller. Also, I have put the
values in accordance with the table of Ziegler-Nichols method

Below image depicts the input (step change of 2) in blue color and output response in
yellow obtained from scope.
Comparison between output response of P, PI and PID
 For the graphs of P controller, we observe that there is OFFset present (i.e.
OFFset is not equal to zero) as well as Oscillation present in the output response.

 In comparison with PI controller, we observe that the OFFset goes to zero but the
oscillation still persists. The OFFset reduces due to introduction of Integral
controller.

 In comparison with PID controller we observe that both the OFFset and
Oscillations have reduced. This has probably occurred due to introduction of
Derivative controller which reduces the oscillations (it might have also happened
in some cases that the oscillations could have increased).

Thus, we can derive the above three points after comparison. Also, the e2(t) value in the
PID controller is minimal due to which it is the most preferred one amongst all the
controllers.

You might also like