UNIVERSITI TEKNOLOGI MARA
SCHOOL OF MECHANICAL ENGINEERING
Program : Bachelor of Engineering (Hons.) Mechanical
Course : Control Engineering
Course Code : MEC522
Lecturer/Tutor Name : Ir. Ts. Dr Mohammad Azzeim Bin Mat Jusoh
Group : EMD6M5B
ASSIGNMENT 1 (PAIR WORK)
No. Student Name Student ID Signature
1. MUHAMMAD AZRI HUSAINI BIN AZZUADI 2019295076
2. NUR ADAM BIN AHMAD NAZLI 2019207066
Submission Date: 9th June 2022
TABLE OF CONTENTS
LIST OF FIGURES.......................................................................................................3
QUESTION 1................................................................................................................4
QUESTION 2................................................................................................................5
QUESTION 3................................................................................................................7
QUESTION 4................................................................................................................8
QUESTION 5..............................................................................................................11
QUESTION 6..............................................................................................................16
REFERENCES...........................................................................................................17
2
LIST OF FIGURES
Figure 1: Block Diagram with PID Controller (Question 2)...........................................5
Figure 2: Block Parameters: Step (Question 2)...........................................................5
Figure 3: Block Diagram with Scope (Question 2).......................................................6
Figure 4: Scope (Question 2).......................................................................................6
Figure 5: Block Diagram with PID Controller (Question 4)...........................................8
Figure 6: Block Parameters: PID Controller (Question 4)............................................8
Figure 7: Block Diagram with Scope (Question 4).......................................................9
Figure 8: Scope (Question 4).......................................................................................9
Figure 9: Block Diagram with PID Controller (Question 5A)......................................11
Figure 10: Block Parameters: PID Controller (Question 5A)......................................11
Figure 11: Block Diagram with Scope (Question 5A).................................................12
Figure 12: Scope (Question 5A).................................................................................12
Figure 13: Block Diagram with PID Controller (Question 5B)....................................13
Figure 14: Block Parameters: PID Controller (Question 5B)......................................13
Figure 15: Figure 7: Block Diagram with Scope (Question 5B).................................14
Figure 16: Scope (Question 5B).................................................................................14
3
Assignment objectives: using MATLAB to simulate and test control systems; self-
learning new concepts from the simulation.
QUESTION 1
What is the following MATLAB/Simulink simulation a representation of?
SOLUTION:
The MATLAB or Simulink simulation is a model of a closed-loop feedback control
system that only controls the first-order process proportionally. It is made up of a set-
point, a controller, a transfer function that represents a first-order process, and an
output (controlled variable).
4
QUESTION 2
Attach a copy of the Scope output for a step input of unit magnitude, occurring at a
time of 5 units into the simulation. Your simulation should run until the process
reaches steady state.
SOLUTION:
Figure 1: Block Diagram with PID Controller (Question 2)
5
Figure 2: Block Parameters: Step (Question 2)
Figure 3: Block Diagram with Scope (Question 2)
6
Figure 4: Scope (Question 2)
7
QUESTION 3
What is the final value of the Scope output variable when simulated until it reaches
steady state? Demonstrate/show/prove theoretically (i.e., without using Simulink)
that this value is correct.
SOLUTION:
C (s ) Note:
T ( s) =
R ( s)
G(s) = Forward Path of block diagram
C (s ) G(s)
= 1
R ( s ) 1+G ( s ) H (s ) G(s) = 2
s + 6 s +5
C (s )
=
( 1
2
s + 6 s +5 ) G(s)H(s) = Loops in block diagram
R (s ) 1+ 0 G(s)H(s) = 0
1 1
C ( s) = R(s) R(s0) =
2 s
s +6 s+5
C ( s) =
1 1
s +6 s+5 s
2 ()
The above uses that the step input of unit magnitude occurs at a time of 5 units into
the simulation. Then, applying the Final Value Theorem (FVT):
lim C ( t ) =lim sC ( s )
t→∞ s →0
lim C ( t ) =lim s
t→∞ s →0 ( 2
1
s +6 s+5 () 1s )
lim C ( t ) =lim s
t→∞ s →0 ( 2
1
s +6 s+5 () 1s )
1
lim C ( t ) =lim 2
t→∞ s →0 (0) +6 (0)+ 5
1
lim C ( t ) = =0.2
t→∞ 5
8
Final answer = 0.2
QUESTION 4
Add a PID controller to the process (as shown below) and re-simulate the response
to a point in time so that it reaches steady state. Use P = 50, I = 0, D = 4
Show the Scope output and describe what you notice.
Discuss your observation of the response in both transient and steady state region
and compare to your answer in part 1.
SOLUTION:
9
Figure 5: Block Diagram with PID Controller (Question 4)
Figure 6: Block Parameters: PID Controller (Question 4)
10
Figure 7: Block Diagram with Scope (Question 4)
Figure 8: Scope (Question 4)
11
12
QUESTION 5
Next, simulate the process with a P, I, and D gains as
(a) P = 70, I = 10, D = 2
(b) P = 90, I = 50, D = 4
Attach the Scope output for these simulations and explain why you observe the
behaviour noticed.
SOLUTION:
(A)
Figure 9: Block Diagram with PID Controller (Question 5A)
13
Figure 10: Block Parameters: PID Controller (Question 5A)
Figure 11: Block Diagram with Scope (Question 5A)
14
Figure 12: Scope (Question 5A)
15
(B)
Figure 13: Block Diagram with PID Controller (Question 5B)
Figure 14: Block Parameters: PID Controller (Question 5B)
16
Figure 15: Figure 7: Block Diagram with Scope (Question 5B)
Figure 16: Scope (Question 5B)
17
18
QUESTION 6
In general, what do you conclude about PID controller in a process?
SOLUTION:
Ziegler and Nichols came up with tuning rules in 1942 to help engineers find
and set the right parameters for PID controllers. In the middle of the 1950s,
automatic PID controllers were finally used a lot in industrial facilities.
PID is an acronym for proportional integral derivative. PID is one type of
device used to control process variables such as temperature, speed, flow and
pressure in industry sectors. A control loop feedback device is utilized in this
controller to manage all process variables.
This sort of control is used to steer an otherwise level system in the direction
of a goal location. It is utilised nearly everywhere for temperature control and in
several scientific, automation, and chemical processes. In this controller, closed-loop
feedback is utilised to keep the actual output of a method as near to the target as
feasible, if not produced at a fixed point.
Figure 17: A Block Diagram of a PID controller in a Feedback Loop
19
REFERENCES
Bennett, S. (1993). Development of the PID Controller. IEEE Control Systems, 13(6), 58–
62. https://doi.org/10.1109/37.248006
Chaturvedi, D. K. (2017). Modeling and Simulation of Systems using MATLAB and
Simulink. Modeling and Simulation of Systems Using MATLAB and Simulink, 1–709.
https://doi.org/10.1201/9781315218335/MODELING-SIMULATION-SYSTEMS-
USING-MATLAB
Hammoodi, S. J., Sayegh Flayyih, K., Hamad, A. R., & Hammoodi, S. (2020). Design and
Implementation Speed Control System of DC Motor Based on PID Control and
Matlab Simulink. International Journal of Power Electronics and Drive System
(IJPEDS), 11(1), 127–134. https://doi.org/10.11591/ijpeds.v11.i1.pp127-134
J. Pearson. (1973). Modern Control System Theory and Application. IEEE Transactions
on Automatic Control, AC-18(3), 328–329.
https://doi.org/10.1109/TAC.1973.1100282
Martyanov, A. S., Solomin, E. v., & Korobatov, D. v. (2015). Development of Control
Algorithms in Matlab/Simulink. Procedia Engineering, 129, 922–926.
https://doi.org/10.1016/J.PROENG.2015.12.135
Rivera, D. E., Morarl, M., & Skogestad, S. (1986). Internal Model Control: Pid Controller
Design. Industrial and Engineering Chemistry Process Design and Development,
25(1), 252–265.
https://doi.org/10.1021/I200032A041/ASSET/I200032A041.FP.PNG_V03
20
21