Lab 10 Cs
Lab 10 Cs
Criteria (Taxonomy Excellent (4) Proficient (3) Basic (2) Below Basic (1) Student’s
Level) Score
To organize the lab Report is as per the Report is mostly as Report is Sections/Steps are
report and practice the guidelines. All per the guidelines disorganized and not ordered and
writing skills as per the sections/steps are and most follows some Report is not as
guidelines clearly organized in a sections/steps are guidelines but
ordered well but per the guidelines
logical order. most of the
requires minor
guidelines are
improvements.
missing
The report The report discusses The report discusses The report is
To discuss the actual completely
The required the experiment/lab totally irrelevant
experiment/task discusses the required experiment/lab work but have to the
experiment/lab work work irrelevant experiment/lab
in own words with work
information
some relevant
additional
information
To perform calculations Calculations and Calculations and data Most data and Calculations and
data analyses were analysis were observations were data analyses of
and data analysis
performed clearly, performed recorded adequately
accurately, but but with several lab were missing
concisely, and
accurately, with minor errors were significant errors or
correct units. made both in omissions.
calculations and in
applying correct
units
To present results in the Graphs, if necessary, Graphs, if necessary, Graphs, if Major components
were drawn were drawn adequately necessary, were of lab were
form of graphs
accurately and neatly drawn but Missing
and were clearly inadequately.
labelled.
Comments:
Lab No: 10
Objectives:
To study the detail theory of PI.
Design the PI controller using command in .m file.
Design the PI controller in Simulink.
Tuning of PI controller for desired output.
Apply the PI controller to a real time system.
Theory:
Controller:
A controller is a mechanism that seeks to minimize the difference between the actual
value of a system (i.e. the process variable) and the desired value of the system (i.e.
the setpoint). Controllers are a fundamental part of control engineering and are used in
all complex control systems. [1]
Types of Controllers:
There are two main types of controllers:
Continuous controllers.
Discontinuous controllers.
Discontinuous Controller:
In discontinuous controllers, the manipulated variable changes between discrete
values. Depending on how many different states the manipulated variable can assume,
a distinction is made between two position, three position, and multi-position
controllers. Discontinuous controllers operate on very simple, switching final
controlling elements. [1]
Course Instructor: Engr. Wahad Ur Rahman
1
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
Continuous Controller:
The main feature of continuous controllers is that the controlled variable (also known
as the manipulated variable) can have any value within the controller’s output range.
Basically, there are three basic modes on which the whole control actions take place.
Proportional Controllers.
Integral Controllers.
Derivative Controllers.
By combining above three controllers, we can get:
Proportional and integral controllers (PI Controller)
Proportional and derivative controllers (PD Controller)
Proportional integral derivative control (PID Controller) [1]
Objectives of Controller:
Decrease the maximum overshot
Reduce the rise time
Reduce the settling time
Reduce steady state error
PI Controller:
A P.I Controller is a feedback control loop that calculates an error signal by taking the
difference between the output of a system, which in this case is the power being
drawn from the battery, and the set point. The set point is the level at which we’d like
to have our system running. The proportional integral controller is used to decrease
the steady state error without affecting the stability of the control system. [2]
u ( t )=K p e ( t ) + K i ∫ e ( t ) dt
2
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
Procedure:
Consider the mass spring system.
Create the .m file
Simulate the step response of the system without PI and PD controller.
Calculate the SS error from initial value and final value.
Apply the PI and PD controller to reduce the steady state error.
Keep the value of Kp constant and changing the Ki and Kdvalue.
Open the Simulink and model the system in Simulink.
First model it without PI and PD controller and then with PI and PD controller.
Analyze the response before and after proportional controller.
Simulate it for different values of proportional constant Kd and Ki.
3
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
4
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
5
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
Results:
Observations:
Table 8:1: System characteristics at different values of Kp and Kd
Proportional Derivative Rise Time Settling Steady State SS Error
Gain Kp Gain Kd Time Value
100 1 0.149 0.726 0.833 0.167
10 0.148 0.22 0.833 0.167
50 0.0335 0.298 0.833 0.167
100 0.0147 1.49 0.833 0.167
500 0.00267 9.26 0.833 0.167
500 1 0.055 0.713 0.962 0.038
10 0.0576 0.348 0.962 0.038
50 0.0387 0.0602 0.962 0.038
100 0.0217 0.0424 0.962 0.038
500 0.00398 0.013 0.962 0.038
1000 1 0.0373 0.709 0.98 0.02
10 0.0388 0.341 0.98 0.02
50 0.0306 0.154 0.98 0.02
100 0.0205 0.0331 0.98 0.02
500 0.00426 0.00736 0.98 0.02
6
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
Figure 8:8: System response at different values of Kp and Ki using Linear system Analyzer
7
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
Figure 8:9: System response at different values of Kp and Kd using Linear system Analyzer
8
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
Discussion:
We model the system that was given in task. But there was a lot of unwanted offsets,
low accuracy and instability. So we use PI, to remove unwanted offsets, gain more
stability and accuracy. Also rise time were decreasing but peak amplitude were
increasing. By increasing Kp, we got more fluctuations. From Table 8.1 and figure
8.10, we are seeing by keeping the value of Kp constant and increasing the value of
Kd, having the effect on increasing stability, reducing the overshoot, and Improving
the transient response. From Table 8.2 and figure 8.11, we are seeing by keeping the
value of Kp constant and increasing the value of Ki, having the effect of eliminating
the steady state error, but it may make the transient response worse.
References
[1] [Online]. Available: https://www.electrical4u.com/types-of-controllers-proportional-
integral-derivative-controllers/.
[2] [Online]. Available:
https://www.tutorialspoint.com/control_systems/control_systems_controllers.htm.
9
DEPARTMENT OF MECHATRONICS ENGINEERING
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, PESHAWAR
MtE-328L Control system LAB, 6th Semester
10