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

MCS Lab Exp Report With Cover Page

The document outlines a laboratory experiment for the MCS Lab course at AIUB, focusing on the performance and simulation of open-loop and closed-loop systems using Simulink. It includes group member details, marking rubrics for the report, and in-depth discussions on the design and tuning of PI, PD, and PID controllers, emphasizing their roles in regulating system performance and stability. The experiment also involves practical applications and simulations to demonstrate the effectiveness of these control strategies.

Uploaded by

sanjidkhu129
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)
29 views12 pages

MCS Lab Exp Report With Cover Page

The document outlines a laboratory experiment for the MCS Lab course at AIUB, focusing on the performance and simulation of open-loop and closed-loop systems using Simulink. It includes group member details, marking rubrics for the report, and in-depth discussions on the design and tuning of PI, PD, and PID controllers, emphasizing their roles in regulating system performance and stability. The experiment also involves practical applications and simulations to demonstrate the effectiveness of these control strategies.

Uploaded by

sanjidkhu129
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

American International University- Bangladesh (AIUB)

Faculty of Engineering (EEE)

Course
Course Name: MCS Lab EEE 4102 Section: B
Code:

Semester: 2023-24, Fall Faculty: Abu Shufian

Task: Laboratory Experiment 05

Performance and simulation of open loop and close loop system in


Experiment title:
Simulink

Group Members ID Name

1. 21-44896-2 Sanjid Raaz

2. 22-49918-3 Sifat Zaman


Group No: 7
3. 22-49752-3 Morsalin Alam Sanjid

4. 21-45582-3 Mohibul Islam Fahim

5. 22-49659-3 Mushfiq Alam Saumik

Marking Rubrics for Laboratory Experiment Report (to be filled by Faculty) Report: 5 Marks
Objectives Unacceptable Needs Good (1.5) Excellent (2) Secure
(0.5) improvement (1) d
Marks

Use of Students Fail to Students identified Students identified Students identified


Appropriat identify and some software and and utilized the and utilized the
e Tools utilize appropriate hardware tools for closely related most effective
software and prediction and software and hardware appropriate software
hardware tools for modeling but failed tools for prediction and hardware tools
prediction and to use them and modeling but for prediction and
modeling of the appropriately. failed to use them modeling of the
proposed solution effectively. proposed solution

Analysis of The software The software and/or The software and/or The software and/or
Implement and/or hardware hardware hardware hardware
ed Model implementation implementation has implementation has implementation has
has not been been partially been successfully been successfully
addressed and addressed and addressed but addressed and
provided only provided only provided only provided an in-depth
incomplete incomplete analysis. incomplete analysis. analysis

AIUB Modern Control System Lab/Section B ©2024 IEEE


analysis.

Depth of The student has The student has The student has The student has
Knowledge provided some provided a partial provided a detailed provided a detailed
about the processes for process for using process for using process for using
Tools [P1] using appropriate appropriate tools appropriate tools but appropriate tools,
tools but and does not fails to demonstrate which demonstrated
demonstrated no demonstrate in- the in-depth the in-depth
knowledge of the depth knowledge of knowledge of the knowledge of the
utilized tools the utilized tools utilized tools utilized tools.

Infrequent Students have Students have Students have Students have


encounter failed to address partially addressed addressed how the effectively
Issues [P4] how the how the Infrequent Infrequent encounter addressed how the
Infrequent encounter Issues Issues were resolved Infrequent
encounter Issues were resolved but but not related to used encounter Issues
were resolved . not related to used tools. were resolved using
tools. the appropriate
tools.

The models Failed to address Addressed some Addressed some Effectively


developed any outside outside problems outside problems addressed that the
by tools problems. but not encompassed by external issues
meet the encompassed by standards and codes of surrounded by
applicable standards and codes practice for standards and
codes [P5] of practice for professional regulations of
professional engineering practice for
engineering professional
engineering

Comments Total Marks:


:

Design of PI, PD controller and tunning of PID


controller
Modern Control Systems Lab [Section: B] Experiment Report 09

Sanjid Raaz Mushfiq alam soumik


Dept. of Electrical & Electronic
Engineering
[email protected] Morsalin alam sanjid
American International University-
American International University-
Bangladesh
Bangladesh
Dhaka-1229, Bangladesh
Dhaka-1229, Bangladesh
[email protected]
Dept. of Electrical & Electronic [email protected]
Engineering
mohibul islam fahim Sifat zaman
dept of electrical and electronics
[email protected] Dept. of Electrical & Electronic
American International University- Engineering [email protected]
Bangladesh American International University-
Bangladesh
Dhaka-1229, Bangladesh Dhaka-1229, Bangladesh American International University-
Bangladesh
Dhaka-1229, Bangladesh

Abstract- The design and tuning strategies for PI, PD, and PID PI Controller:
controllers are important in regulating system performance, The controller, as its name implies, combines both
and stability. For instance, PI controllers eliminate steady- proportional and integral components. The output is
state error, while PD controllers improve transient response.
PID controllers combine these features for better performance.
determined by summing the proportional and integral values
of the error signal.

Keywords— MATLAB, Design, PI controller, PD controller, Output of Controller = 𝐾𝑃𝑒(𝑡) + 𝐾𝑖 ∫ 𝑒(𝑡)𝑑𝑡


tuning, PID controller, Derivative action, Transient response,
Steady-state error, Sensitivity analysis, System stability
Taking Laplace =
1. I.
INTRODUCTION
Hence the transfer function of such controller is and
PI controllers integrate action to eliminate steady-state error, can be realized as shown in Fig.2.
while PD controllers employ derivative action to enhance
transient response. Combining both actions in PID controllers
offers additional benefits such as enhancing steady-state
accuracy, stability improvement, offset reduction, overshot
control, and noise signal mitigation. Furthermore, PID
controllers can accelerate the response of over-damped systems.
The transient response of a practical control system often
exhibits damped oscillation before reaching a steady-state
value. Commonly specified transient response characteristics
include delay time rise time, peak time, maximum overshoot,
and settling time. To meet these properties and various design
specifications, tuning adjustments are necessary. Many By incorporating an open-loop pole at the origin, which
techniques are available in the literature for designing and increases the system type by one, steady-state error can be
tuning both PI and PD controllers. reduced. An instance of a Type 0 system that produces a finite
error in response to a step input will produce zero error when
II. THEORY AND METHODOLOGY the system type is increased by one.

Feedback systems are highly advantageous and extensively


employed in amplifier circuits, oscillators, process control
systems, and several other electronic systems. However, for To see how to improve the steady-state error without
feedback to be a useful tool, it must be regulated, as an affecting the transient response, we look at Fig. 3(a). Here we
unregulated system will either oscillate or cease to operate. have a system operating with a desirable transient response
Figure 1 depicts a cascade compensation system in which a generated by the closed-loop poles at A.
PI or PD controller can be employed as a compensator. The
compensator's objective is to ensure that the error [E(s)]
becomes zero during steady state.
A controller in the forward path, which changes the
controller output corresponding to proportional plus
derivative of error signal is called PD controller.

i.e. Output of controller =


Taking Laplace = 𝐾𝑃𝐸(𝑠) + 𝑠𝐾𝑑𝐸(𝑠) = 𝐸(𝑠)[𝐾𝑃 +
𝑠𝐾𝑑]

The transfer function of such controller is [𝐾𝑃 + 𝑠𝐾𝑑]. This


can be realized as shown in fig.3.

Fig. 3. PD Controller

Fig. 3. Pole at A is (a) on the root locus without Let consider the plant,
compensator (b) not on the root locus with
compensatory pole added; (c) approximately on the root Assuming KP =1, it can be written as follows.
locus with compensatory pole and zero added.

As depicted in Figure 3(b), if we increase the system type by


adding a pole at the origin, the angular contribution of the open-
loop poles at point A ceases to be 180 degrees and the root
locus no longer passes through point A. To resolve the issue, an
additional zero is appended in proximity to the pole at the
origin, as illustrated in Figure 3(c). At this juncture, the angular Comparing denominator with standard form,
contributions of the compensation zero and pole are nullified,
point A remains at the root locus, and the classification of the
system has been upgraded. Additionally, it should be noted that
the necessary gain at the dominant pole remains relatively
constant compared to before compensation, as the length ratio Because of this controller, damping ratio increases by
between the compensatory pole and the compensation zero is
close to unity. As a result, the steady-state error has been factor
reduced significantly while the transient response remains Steady state error,
unaffected. An ideal integral compensator is a device consisting
of a zero near the pole and a pole now of integration.

Hence, PI controller has following characteristics: As there is no change in coefficients, errors will also remain the
same.
1. Generalized transfer function of PI compensator,
2. It increases the order of the system.
3. It increases TYPE of the system. 4. Zero at –a is small Hence PD controller has the following characteristics.
and negative.
i
𝑮𝑪
5. Active circuits are required to implement. Generalized transfer function of PD compensator,
6. Steady state error reduces tremendously for same type
of inputs. = 𝒔 + 𝒁𝒄

ii Zero at −𝑍𝐶 is selected to put design point on the


In overall this controller improves steady state part
affecting the transient part. root locus.
iii It increases the damping ratio. iv ‘𝜔𝑛’ for system
PD Controller:
remains unchanged. v ‘TYPE’ of the system
remains unchanged. vi It reduces settling time. vii Now-

Steady state error remains unchanged.


(a) Find the steady state error for a unit step input
(b) Design a PI controller to make the steady state error
viii Active circuits are required to implement. to zero.
(c) By using both theoretically and MATLAB codes
show that steady state error becomes zero?
In general PD controller improves transient part without
affecting steady state. Solution:
Design Process:

PI Controller:
➢ First add a pole at origin.
➢ Now add a zero very close to the origin.
➢ Generalized transfer function of PI compensator,

Fig. 4. Close loop feedback with PI controller


PD Controller:
1. First evaluating the performance of the uncompensated , where
system:
As percentage of overshoot should be less than 15%,

(a) ξ (zeta) is given, find dominant pole (old) from the root
locus of uncompensated system,

It is a type – 0 system,

(b) Now find old settling time, Thus,

2. Evaluate the performance of the compensated system: Arbitrarily selecting, −𝑎 = −0.1

From the question, find new 𝑇𝑆𝑛𝑒𝑤 and new 𝜔𝑛 [ξ will


Finally, transfer function of PI
(a) compensator,
remain unchanged]
(b) Find dominant pole (new),
Generalized transfer function for PI
controller is

𝑆𝑑𝑛𝑒𝑤 = −𝜎𝑑 + 𝑗𝜔𝑑


Comparing the above two equation,
KP = 1 Ki = 0.1

(c) Design the location of compensating zero, −𝑍𝐶


➢ Finding necessary angle (𝛳𝑍) to locate 𝑆𝑑𝑛𝑒𝑤 on
root locus.

➢ then find, −𝑍𝐶

III. EXPERIMENTAL PROCEDURE


Problem Statement 1:
A unity negative feedback system which is operating with a
closed loop response that has 58% overshoot and the
following transfer function:

;
Fig. 5. Root locus for the designed system

Now, implementing the controller in MATLAB Simulink and


plotting the output and error signal.

Fig. 6. Close loop feedback system with PI controller in


Simulink

Fig. 9. Error signal as an input of PI controller

Fig. 7. PI block parameters in MATLAB Simulink

Fig. 10. Comparison of Input command and output


values for compensated and uncompensated system

Fig8:Input command and Output Values of the designed


system

Fig. 11. Error signal as an input of PI controller for


compensated and uncompensated system

Problem Statement 2:
Fig. 13. Root locus for the uncompensated system
A unity negative feedback system has forward transfer
function,

𝑇ℎ𝑢𝑠, 𝑆𝑑𝑜𝑙𝑑 = −1.2 + 𝑗2.06


Find the location of compensating zero for designing a PD
compensator to yield a 16% overshoot, with a threefold
reduction in settling time. [Uncompensated System has ωn=
(b) Now find old settling time,
2.391 rad/s].

Solution: 1. Evaluate the performance of the compensated system:

(a) From the question, find new 𝑇𝑆𝑛𝑒𝑤 and new 𝜔𝑛 [ξ will
remain unchanged which is 0.504]

and new

b) Find dominant pole (new),

Therefore, the real part of the compensated system’s


Fig. 12. Close loop feedback with PD controller dominant, second-order pole is

Transfer function of PD controller,


Fig. 14 shows the designed dominant, second-order pole,

𝜔𝑑 = 3.604 tan (180° − 120.26°) = 6.193


with a real part equal to -3.604 and an imaginary part of

𝑆𝑑𝑛𝑒𝑤 = −𝜎𝑑 + 𝑗𝜔𝑑 = −3.604 + 𝑗6.193


Where, First evaluating the performance of the uncompensated
system:

We know,
Hence.

Now, finding dominant pole (old) from the root locus of

uncompensated system,
Fig. 15. Root locus for the designed system

Fig. 14. Root locus for the uncompensated system

(c) Designing the location of compensating pole, −� � Fig. 16. Close loop feedback system with PD controller in

➢ Finding necessary angle (𝛳� ) to locate � 𝑑𝑛𝑒𝑤on�



root Simulink
locus. � Now, the calculated value of

KP and Kd is set to MATLAB
➢ then find, −� � PD block.
��
Calculation:
Fig. 19. Error signal as an input of PD controller
(4 − 3.604) (6 − 3.604)

Thus, 𝜃� = 95.6°
so, −� � = −3.006 Finally,

Now,
� �=�+ 𝟑. 𝟎𝟎𝟔 ��

� �
Generalized transfer function for PI controller is
command and output values of the
𝐺𝐶(𝑠) = 𝐾𝑃 + 𝑠𝐾𝑑 Comparing the above two equation,

KP = 3.006 Kd = 1 Now, implement the controller in


MATLAB Simulink and plot the output and error signal.
Fig. 20. Comparison of Input command and output values

Fig. 17. PD controller block in Simulink for


compensated and uncompensated system

Fig. 22. Close loop feedback system of a DC motor with PID


controller in Simulink

Fig. 23. Inside the Speed Sub system

Fig. 21. Error signal as an input of PD controller for


compensated and uncompensated system

Additional Task:
In this part, we learned how to tune a PID controller using
MATLAB PID controller tuning tool. In practice, there might
be a situation where the plant transfer function is unknown.
For this type of scenario MATLAB PID controller tuning
toolbox is more useful. The following example illustrates the
method of tuning a PID controller for a DC motor speed
control application.
Transfer function of a DC motor can be expressed as

Where,

J= Moment
of Inertia of the Rotor
b= Damping Ratio of the Mechanical System [0.1

𝑁𝑚𝑠] K= Electromotive Force Constant


R= Electric Resistance [1Ω]
L= Electric Inductance
[0.5𝐻]

Using the above-mentioned values, the close loop feedback


system of a DC motor with PID controller is designed in
MATLAB Simulink, which is shown in fig. 22.
Fig. 27. MATLAB PID controller tuning dialog box

In fig. 27, MATLAB PID controller tuning block is suggesting the


values for PID controller, and the associated response curve is
plotted in fig. with solid line. The dotted line plot represents the
response of the system using current values. Now click on
‘Update Block’.

Now, all the values of PID controller is automatically updated


as shown in fig. 28.

Fig. 25. Random Noise Generator Block


Fig. 26. PID controller block before
tuning

Now clicking on the PID controller block. Fig. 26


represents the default values for PID controller block.
Now, clicking on ‘Tune’ and the following window will
pop-up,

Fig. 28. PID controller block after tuning

Fig. 29 represents the desired and measured speed of DC


motor.
2. IV. DISCUSSION
The experiment investigating the design and tuning of PI,
PD, and PID controllers achieved its main objective of
offering practical insights into control system dynamics. The
data uncovered distinct characteristics of each controller
type, with the PID controller demonstrating balanced
performance in both transient and steady-state conditions.
However, a notable oversight was initially neglecting
integral windup issues in the PI controller, affecting its
transient response. This highlighted the importance of
thorough consideration of potential challenges during
experimental setup. To enhance future studies, incorporating
more comprehensive analysis techniques like sensitivity
analysis could provide deeper insights into controllers' .
Fig. 29. Desired and measured speed of DC motor.
3. V. CONCLUSION
the design and tuning of PI, PD, and PID controllers are
essential aspects of control system engineering, offering
crucial tools for regulating system dynamics and achieving
Now, we make the response faster, clicking again in PID controller desired performance objectives. Throughout this study, we
box and a PID controller tuning window will pop-up. have explored the distinct characteristics and advantages of
each controller type, with the PID controller emerging as a
versatile solution capable of balancing transient and steady-
state responses effectively.

Abstract— This experiment is carried out to observe various


mathematical operations like partial fraction determination,
simplification , pole zero determination, Laplace transform,
inverse Laplace transform , state space model generation etc to
build the open loop and closed loop system in Simulink.

Keyword- open loop, closed loop, Simulink.


IV. Questions and answer to lab report

1) ansin figure 8 setp repsonse of pi controller is given. In


Fig. 30. MATLAB PID controller tuning dialog box figure 9 , error signal of pi controller is given. By changing
values we can improve response curve of this curve. In fgure
To make the response faster, sliding the Response time and 12 close loop feedback with pd controller is given.in fgigure
Transient Behavior slider as per your requirement. We will see 17 pd controller block is given. In figure 18 input and output
the corresponding plot in the window. After tuning as per the command of designed system.in figure 18 error signal of pd
requirement, click ‘Update Block’. controller as input is given.in fgure 20 comparision of input
command and output values for compesndated and
Fig. 31 represents the desired and measured speed of DC uncompensated ssytem is given.
motor after tuning for faster response.
2) ans:

Figure :response curve

Fig. 31. Desired and measured speed of DC motor after tuning


for faster response.
V.DISCUSSION
From the graph for step response of open loop and closed
loop system for a transfer function 1/(s+5) done using
Simulink we can see that for same gain close loop system
reaches steady state value faster than open loop system. The
closed loop system gives better step response. So, the close
loop system is better.
Figure : response curve of pi controller

VI. CONCLUSSION
The goal of this experiment was achieved properly by stu
dying and implementing open loop and closed loop system in
Simulink. For better understanding output was observed for v
arious value systems.
REFERENCES
[1] Norman S Nise , “Control System Enginerring :, avaliable edition ,
John Wiley and Sons Inc

[2] Richard C . Dorf, : “Modern Control Systems” . Addison


– Wesley Educational Publishers Inc, 3rd edition

Figure : response curve of pd controller

You might also like