Lab Report 08

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 26

DEPARTMENT OF MECHATRONICS ENGINEERING

UNIVERSITY OF ENGINEERING & TECHNOLOGY, PESHAWAR

MtE-328L Control Systems LAB, 6th Semester

Student Name: Sania Shaheen

Registration No: 18-PWMCT-0603

Lab: 08 Observe the Output of PD and PI Controllers.


Below Basic Student’
Criteria Excellent (4) Proficient (3) Basic (2)
(1) s Score

Report is mostly Report is


Report is as per
as per the disorganized Sections/Steps
the guidelines.
To organize the lab guidelines and and follows are not
All
report and practice most some ordered and
sections/steps
the writing skills as sections/steps are guidelines but Report is not
are clearly
per the guidelines ordered well but most of the as per the
organized in
requires minor guidelines are guidelines
a logical
improvements. missing
order.
The report
completely
The report
discusses the The report is
The report discusses the
To discuss the required task in totally
discusses the lab work but
actual task own words with irrelevant to
required task have
some relevant the lab work
irrelevant
additional
information
information
Calculations and
Calculations Most data and
data analysis
and data observations
were performed Calculations
analyses were were recorded
To perform accurately, but and data
performed adequately,
calculations and minor errors analyses of
clearly, but with
data analysis were made both lab were
concisely, and several
in calculations missing
accurately, with significant
and
correct units. errors or
in applying
omissions.
correct units

Graphs, if
necessary, were Graphs, if Major
To present results Graphs, if
drawn necessary, components
in the form of necessary, were
accurately and were drawn but of lab were
graphs drawn
neatly and were inadequately. missing
adequately
clearly labelled.

Comments:

Course Instructor: Engr. Wahad-Ur-Rehman


Control Systems Lab report

Observe the Output Of PD And PI Controller

Objectives:
 To study the detail theory of PI and PD
 Design the PI and PD controller using command in m.file
 Design the PI and PD controller in Simulink
 Tuning of PI and PD controller for desired output
 Apply the PI and PD controller to a real time system

Tools and Equipment:


 MATLAB Simulink with control system library.

Controller

Introduction:

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 used in all complex control
systems. [1]

A controller is basically a unit present in a control system that generates control signals to
reduce the deviation of the actual value from the desired value to almost zero or lowest
possible value. It is responsible for the control action of the system so as to get accurate
output.

Most of the industrial process required that some variable like temperature, flow, level and
position etc. should remain at or near some reference point called set point.

The device which serve to maintain the process variable at set point is called as controller

It determines the deviation of the system and produces the control signal that reduces the
deviation to 0 or small value

The method of producing a control signal by the controller is known as control action.

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 2 | 26


Control Systems Lab report

Figure 8.1 Controller in a control system [2]

Figure 8.2 Controllers in Physical Process [3]

Significance of Controller:

 Controllers improve the steady-state accuracy by decreasing the steady state error. As
the steady-state accuracy improves, the stability also improves.
 Controllers also help in reducing the unwanted offsets produced by the system.
 Controllers can control the maximum overshoot of the system.

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 3 | 26


Control Systems Lab report

 Controllers can help in reducing the noise signals produced by the system.
 Controllers can help to speed up the slow response of an overdamped system.

Types of Controllers:

Following are some types of controllers with sub-classifications;

 Continuous controllers
o Proportional controllers
o Integral controllers
o Derivative controllers
o Composite controllers
 PI (Proportional Integral controllers)
 PD (Proportional derivative controllers)
 PID (Proportional integral derivative controllers)
 Discontinuous controllers
o On-Off controllers
 Two position controllers
 Multi-position controllers

Controllers

Discontinuous Continuous

On-Off
Proportional Integral Derivative Composite
Controllers
Controllers

Two Position Proportional


Controller Integral (PI)

Proportional
Multi-Position
Derivative
Controller

Proportional
Integral
Derivative (PID)
Course Instructor: Engr. Wahad-Ur-Rehman P a g e 4 | 26
Control Systems Lab report

Continuous Controllers:

In continuous controllers the controlled variable (also known as the manipulated variable) can
have any value within the controller’s output range. In the continuous controller theory, there
are three basic modes on which the whole control action takes place, which are:

 Proportional controllers.
 Integral controllers.
 Derivative controllers.

These three types of controllers can be combined into new controllers:

 Proportional and integral controllers (PI Controller)


 Proportional and derivative controllers (PD Controller)
 Proportional integral derivative control (PID Controller)

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.

Note!

 Compared to continuous controllers, discontinuous controllers operate on very simple,


switching final controlling elements.

Fundamental Controllers:

1. Proportional Controller:
In single Proportional mode, the controller simply multiplies the Error by the Proportional
Gain (Kp) to get the controller output.
A high proportional gain results in a large change in the output for a given change in the
error.

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 5 | 26


Control Systems Lab report

Figure 8.3 Proportional controller [4]

Generally,

Figure 8.4 General effect of proportional gain

2. Integral Controllers:
An integral controller (also called reset controller) can eliminate the steady-state error that
occurs with a proportional controller. Integral control action is expressed as follows: [4]
𝒕

𝒇𝑰(𝒕) = 𝑲𝒊 ∫ 𝒆(𝝂)𝒅𝝂
𝟎

Where,
fI (t) is the integral control action
Ki is the integral constant.

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 6 | 26


Control Systems Lab report

Figure 8.5 Integral controller

Figure 8.6 integral Controller output


3. Derivative Controllers:
The derivative controller generates a control action proportional to the time derivative of
the error signal.
The basic idea of derivative control is to generate one large corrective effort immediately
after a load change in order to begin eliminating the error as quickly as possible. [5]

𝑑
It can be expressed as;

𝐴(𝑡) = 𝐾𝑑 ∗ [𝑒(𝑡)]
𝑑𝑡
Where, 𝐾𝑑 is proportional constant also known as controller gain. The derivative
controller is also known as the rate controller.

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 7 | 26


Control Systems Lab report

Figure 8.7 Derivative Controller

Limitations of Proportional controller:

With proportional controller we have,

 Reduced the rise time


 Reduce the steady-state error,
 Decreased the settling time by a small amount

But Maximum overshoot occur

PD Controller:

PD-control is combination of feedforward and feedback control, because it operates on both


the current process conditions and predicted process conditions. In PD-control, the control
output is a linear combination of the error signal and its derivative. PD-control contains the
proportional control’s damping of the fluctuation and the derivative control’s prediction of
process error. [4]

As mentioned, PD-control correlates the controller output to the error and the derivative of
the error.

A PD controller is described by the transfer function:

𝐾(𝑠) = 𝑘𝑝 + 𝑘𝑑𝑠

𝒌𝒑
𝑲(𝒔) = 𝒌𝒅 (𝒔 + )
�𝒅

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 8 | 26


Control Systems Lab report

Objectives of Controllers:

The main objectives of controller are

 Decrease the maximum overshot


 Reduce the rise time
 Reduce the settling time
 Reduce steady-state error

Example: 01 (Real time system)

Mass-Spring Damper System:

Let us consider a mass spring damper system,

Figure 8.8 Mechanical mass-spring damper system

Using Newton’s Second Law we we have the governing equation of the system as,

𝑚𝑥̈ + 𝑏𝑥̇ + 𝑘𝑥 = 𝐹

Laplace transform of the above equation becomes,

𝑚𝑠2 𝑋(𝑠) + 𝑏𝑠 𝑋(𝑠) + 𝑘 𝑋(𝑠) = 𝐹(𝑠)

Hence, the transfer function of the system becomes,

𝑋(𝑠 ) 1
=
𝐹(𝑠) 𝑚𝑠 + 𝑏𝑠 + 𝑘
2

Now, for 𝑚 = 1 𝑘𝑔, 𝑏 = 10 𝑁𝑠/𝑚, and 𝑘 = 20 𝑁/𝑚 transfer function becomes;


Course Instructor: Engr. Wahad-Ur-Rehman P a g e 9 | 26
Control Systems Lab report

𝑿(𝒔) 𝟏
= 𝟐
𝑭 (𝒔 ) 𝒔 + 𝟏𝟎𝒔 + 𝟐𝟎

a) Without Proportional controller:

M file code:

num = [1];
dnum = [1 10 20];
system = tf(num,dnum);
linearSystemAnalyzer(system)
stepinfo(system)

Simulink Circuit:

Results:

Figure 8.9 Plot Characteristics

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 10 | 26


Control Systems Lab report

Figure 8.10 Script file results

Figure 8.11 Simulink results

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 11 | 26


Control Systems Lab report

Steady State Error:

𝑆𝑆 𝑒𝑟𝑟𝑜𝑟 = 𝐼𝑛𝑖𝑡𝑖𝑎𝑙 𝑣𝑎𝑙𝑢𝑒 − 𝑓𝑖𝑛𝑎𝑙 𝑣𝑎𝑙𝑢𝑒

𝑆𝑆 𝑒𝑟𝑟𝑜𝑟 = 1 − 0.05

𝑆𝑆 𝑒𝑟𝑟𝑜𝑟 = 0.95

Which means,

%𝒂𝒈𝒆 𝑺𝑺 𝒆𝒓𝒓𝒐𝒓 = 𝟗𝟓% (𝒕𝒐𝒐 𝒍𝒂𝒓𝒈𝒆)

Now to reduce this error, proportional controller is used.

b) With Proportional controller (𝑲𝒑 = 𝟓𝟎):

Proportional gain is multiplied to the output of the system to reduce the error in steady state.

M file code:

num = [1];
dnum = [1 10 20];
system = tf(num,dnum);
Kp = 50;
C = pid(Kp)
T = feedback(C*system,1)
linearSystemAnalyzer(T)
stepinfo(T)

Simulink Circuit:

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 12 | 26


Control Systems Lab report

Results:

Figure 8.12 Plot Characteristics

Figure 8.13 script file result

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 13 | 26


Control Systems Lab report

Figure 8.14 Simulink result

Steady State Error:

𝑆𝑆 𝑒𝑟𝑟𝑜𝑟 = 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 𝑣𝑎𝑙𝑢𝑒 − 𝑓𝑖𝑛𝑎𝑙 𝑣𝑎𝑙𝑢𝑒

= 1 − 0.78

= 0.22 (𝑄𝑢𝑖𝑡𝑒 𝑙𝑜𝑤)

Now,

%𝑺𝑺 𝒆𝒓𝒓𝒐𝒓 = 𝟐𝟐 %

Table 8.1 Comparison of steady state error

Note!

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 14 | 26


Control Systems Lab report
SS error without controller SS error with controller

95 % 22 %

 By increasing the value of 𝐾𝑝 although SS error decreases, but its high value causes
the response of the system to fluctuate having peak overshoot.

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 15 | 26


Control Systems Lab report

c) Proportional and Derivative (PD) controller:

M file code:

clear all;
clc;
num = [1];
denom = [1 10 20];
system = tf(num,denom)
kp = 1000;
kd1 = 1;
kd2 = 10;
kd3 = 50;
kd4 = 100;
C1 = pid(kp,0,kd1);
C2 = pid(kp,0,kd2);
C3 = pid(kp,0,kd3);
C4 = pid(kp,0,kd4);
T1 = feedback(system*C1,1)
T2 = feedback(system*C2,1)
T3 = feedback(system*C3,1)
T4 = feedback(system*C4,1)

linearSystemAnalyzer(T1,T2,T3,T4)

Simulink Circuit:

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 16 | 26


Control Systems Lab report

Results:

Figure 8.15 Combined responses at different values of Kd

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 17 | 26


Control Systems Lab report

Figure 8.16 Combined responses at different values of Kd with settling time

Figure 8.17 Combined responses at different values of Kd with overshoots

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 18 | 26


Control Systems Lab report

Table 8.2 Observation table for different values of Kp and Kd


Proportional Derivative Rise Settling Steady State Steady
Gain, Kp Gain, Kd Time (s) Time (s) Value State Error
1 0.149 0.726 0.833 17%
10 0.148 0.22 0.833 17%

50 0.0335 0.298 0.833 17%


100
100 0.0147 1.49 0.833 17%

500 0.00267 0.00267 0.833 17%

1 0.055 0.713 0.962 4%

10 0.0576 0.348 0.962 4%

500 50 0.0387 0.0602 0.962 4%

100 0.0217 0.0424 0.962 4%

500 0.00398 0.962 4%

1 0.0373 0.709 0.98 2%

10 0.0388 0.341 0.98 2%

50 0.0306 0.154 0.98 2%


1000
100 0.0205 0.0331 0.98 2%

500 0.00426 0.00736 0.98 2%

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 19 | 26


Control Systems Lab report

Figure 8.18 Simulink combined output for different values of Kd

Figure 8.19 Simulink separate Output at different values of Kd

Table 8.3 Advantages and disadvantages of PD controller

Advantages Disadvantage
Reduced peak overshoot Negligible effect on rise time
Reduced settling time Negligible effect on steady state error

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 20 | 26


Control Systems Lab report

d) Proportional and Integral (PI) controller:

M file code:

clear all;
clc;
num = [1];
denom = [1 10 20];
system = tf(num,denom)
kp = 1000;
ki1 = 1;
ki2 = 100;
ki3 = 500;
ki4 = 2000;
C1 = pid(kp,ki1,0);
C2 = pid(kp,ki2,0);
C3 = pid(kp,ki3,0);
C4 = pid(kp,ki4,0);
T1 = feedback(system*C1,1)
T2 = feedback(system*C2,1)
T3 = feedback(system*C3,1)
T4 = feedback(system*C4,1)

linearSystemAnalyzer(T1,T2,T3,T4)

Simulink Circuit:

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 21 | 26


Control Systems Lab report

Results:

Figure 8.20 Combined script file result of PI controller

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 22 | 26


Control Systems Lab report

Figure 8.21 Combined script file result of PI controller with each settling time

Figure 8.22 Combined Simulink result of PI controller at different values of Ki

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 23 | 26


Control Systems Lab report

Figure 8.23 Separate Simulink result of PI controller at different values of Ki

Table 8.4 Observation table for different values of Ki

Proportional Integral Rise Time Settling Steady State Steady State


Gain,Kp Gain,Ki Time Value Error
1 0.1855 253.9 1 0%
10 0.1827 24.92 1 0%
100 50 0.1727 4.54 1 0%
100 0.1632 1.95 1 0%
200 0.1486 0.8475 1 0%
1 0.1023 NAN 1 0%
10 0.1021 32.83 1 0%
200 50 0.1009 6.16 1 0%
100 0.995 2.8116 1 0%
200 0.097 1.0527 1 0%
1 0.0771 NAN 1 0%
10 0.077 NAN 1 0%
300 50 0.0766 6.8063 1 0%
100 0.0762 3.146 1 0%
200 0.0754 1.263 1 0%

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 24 | 26


Control Systems Lab report

Table 8.5 Advantage and disadvantage of PI controller

Advantage Disadvantage

Reduced steady state error Peak overshoot

Discussion:
The proportional controller (KP) will have the effect of reducing the rise time and will
reduce, but never eliminate, the steady state error. An integral controller (KI) will have the
effect of eliminating the steady state error, but it may make the transient response worse. A
derivative control (KD) will have the effect of increasing the stability of the system, reducing
the overshoot and improving the transient response.

Table 8.6 Summary of observations

CL Response Rise time Peak Overshoot Settling time SS error

Kp Decrease Increase Small change Decrease

Ki Decrease Increase Increase Eliminate

Kd Small change Decrease Decrease Small change

Conclusion:
Hence, from above experimentation and observations over various outputs, it can be concluded
that;

 Using any single controller reduces one error but may cause the system to
malfunction in any other aspect
 Proportional controller reduces steady state error but causes peak overshoot
 Integral controller eliminates steady state error but it makes the system slower with
peak overshoot
 Derivative controller decreases the peak overshoot and settling time, but cannot
reduce steady state error.
 PD controller is unable to reduce rise time and steady state error

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 25 | 26


Control Systems Lab report

 PI controller causes system to have overshoots and way more unstable transient state
 The only option for a nearly perfect output is to use all the controller in conjunction
i.e. PID controller

References

[1] "Electrical4u," [Online]. Available: https://www.electrical4u.com/types-of-controllers-


proportional-integral-derivative-controllers/. [Accessed 10 June 2021].

[2] "EDGEFX.US," [Online]. Available: https://www.efxkits.us/industrial-control-systems-and-


control-strategies/. [Accessed 10 June 2021].

[3] "Control Engineering," [Online]. Available:


https://www.controleng.com/articles/fundamentals-of-cascade-control/. [Accessed 10 June
2021].

[4] "Science direct," [Online]. Available:


https://www.sciencedirect.com/topics/engineering/integral-controller. [Accessed 5 July 2021].

[5] "Science Direct," [Online]. Available:


https://www.sciencedirect.com/topics/engineering/derivative-control. [Accessed 5 July 2021].

[6] [Online]. Available:


https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemi
cal_Process_Dynamics_and_Controls_(Woolf)/09%3A_Proportional-Integral-
Derivative_(PID)_Control/9.02%3A_P%2C_I%2C_D%2C_PI%2C_PD%2C_and_PID_control.

Course Instructor: Engr. Wahad-Ur-Rehman P a g e 26 | 26

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy