Lecture2 - PID Controller Laplace Transform and Transfer Function Maths

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Control Engineering

Lecture 2
CONTROL SYSTEMS ENGINEERING
By: Norman S. Nise

Dr. Mohammad Harun-Or-Rashid

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 1
Control Engineering

PID controller

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 2
Control Engineering

PID controller:
A proportional–integral–derivative controller (PID controller or three-term controller) is a control loop
algorithm employing feedback that is widely used in industrial control systems and a variety of other
applications requiring continuously modulated/adjusted control.
A PID controller continuously use the error value [difference between a desired setpoint (SP) and a
measured process variable (PV)].
PID controller applies a correction based on proportional, integral, and derivative terms (denoted P, I,
and D respectively), hence the name.

Fig.: A block diagram of a PID controller in a feedback loop. r(t) is the desired process value or setpoint (SP), and
y(t) is the measured process value (PV).

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 3
Control Engineering

PID controller:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 4
Control Engineering

PID controller:
The controller attempts to minimize the error over time by adjustment of a control variable,
such as the opening of a control valve, to a new value determined by a weighted sum of the
control terms.

The proportional term:


Term P is proportional to the current value of the SP − PV error.
For example, if the error is large and positive, the control output will be proportionately large
and positive, taking into account the gain factor "Kp".
Using proportional control alone will result in an error between the setpoint and the actual
process value, because it requires an error to generate the proportional response. If there is no
error, there is no corrective response.

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 5
Control Engineering
PID controller:
The proportional term:
The proportional term produces an output value that is proportional to the current error value. The
proportional response can be adjusted by multiplying the error by a constant Kp, called the proportional
gain constant.
The proportional term is given by:
-A high proportional gain results in a large change in the output for a given change in the error. If the
proportional gain is too high, the system can become unstable.
-In contrast, a small gain results in a small output response to a large input error, and a less responsive or
less sensitive controller. If the proportional gain is too low, the control action may be too small when
responding to system disturbances.
Tuning theory and industrial practice indicate that the proportional term should contribute the bulk of
the output change.

Fig: Response of PV to step change of SP vs time, for three values of Kp


(Ki and Kd held constant)

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 6
Control Engineering

PID controller:
Integral term:

Term I accounts for past values of the SP − PV error and integrates them over time to
produce the I term.
If there is a residual SP − PV error after the application of proportional control, the integral
term seeks to eliminate the residual error by adding a control effect due to the historic
cumulative/collective value of the error.
When the error is eliminated, the integral term will cease/finish/stop to grow. This will result
in the proportional effect diminishing as the error decreases, but this is compensated for by
the growing integral effect.

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 7
PID controller: Control Engineering
Integral term:
The contribution from the integral term is
proportional to both the magnitude of the error and
the duration of the error. The integral in a PID
controller is the sum of the instantaneous error
over time and gives the accumulated offset that
should have been corrected previously. The
accumulated error is then multiplied by the integral
gain (Ki) and added to the controller output.
The integral term is given by

The integral term accelerates the movement of the


process towards setpoint and eliminates the
residual steady-state error that occurs with a pure
proportional controller. However, since the integral
term responds to accumulated errors from the past,
it can cause the present value to overshoot the
setpoint value. Fig: Response of PV to step change of SP vs time, for
three values of Ki (Kp and Kd held constant)

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 8
Control Engineering

PID controller:
Derivative term:

Term D is a best estimate of the future trend of the SP − PV error, based on its current rate of
change. It is sometimes called "anticipatory/preventive/defensive control", as it is effectively
seeking to reduce the effect of the SP − PV error by exerting a control influence generated by
the rate of error change. The more rapid the change, the greater the controlling or damping
effect.

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 9
Control Engineering
PID controller:
Derivative term:
The derivative of the process error is calculated by
determining the slope of the error over time and
multiplying this rate of change by the derivative gain
Kd. The magnitude of the contribution of the derivative
term to the overall control action is termed the
derivative gain, Kd.
-Derivative action predicts system behavior and thus
improves settling time and stability of the system.
-An ideal derivative is not causal, so that
implementations of PID controllers include an
additional low-pass filtering for the derivative term to
limit the high-frequency gain and noise.
-Derivative action is seldom/rarely used in practice
though – by one estimate in only 25% of deployed
controllers– because of its variable impact on system
stability in real-world applications.
Fig: Response of PV to step change of SP vs
time, for three values of Kd (Kp and Ki held
constant)

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 10
Control Engineering
PID controller tuning Method Advantages Disadvantages

methods: Manual tuning No math required


Requires experienced
personnel.

Process upset, some trial-and-


Ziegler–Nichols Proven method;
error, very aggressive tuning.
In electronics, gain is a measure of the ability
of a two-port circuit (often an amplifier) to
increase the power or amplitude of a signal Consistent tuning; computer-
from the input to the output port by adding automated control system
energy converted from some power supply to design (CAutoD) techniques;
the signal. may include valve and sensor Some cost or training
Software tools
analysis; allows simulation involved.
The process of experimentation for obtaining before downloading; can
the optimum values of the controller support non-steady-state
parameters (kp, ki, kd) with respect to a (NSS) tuning.
particular process is known as controller
tuning. Some math; only good for
Cohen–Coon Good process models.
first-order processes.
Tuning a control loop is the adjustment of its
control parameters. Can be used for auto tuning;
amplitude is minimum so this The process itself is inherently
Åström-Hägglund
method has lowest process oscillatory.
upset

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 11
Control Engineering

PID controller manual tuning:


Effects of different gains on system parameters like rise time, setting time etc are given below. You have to
remember this effects during PID controller gain tuning.

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 12
Control Engineering

Gain tuning process of different controllers (manual tuning):

1. P controller:
Apply a small value of Kp.
Apply step input.
Gradually increase the Kp value.
--------------

PD controller: Kp, Kd

PI (proportional plus integral) controller: Kp, Ki

PID controller: Kp, Kd, Ki

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 13
Control Engineering
PID controller Ziegler–Nichols tuning method:

Steps to find out Ku and Tu for closed loop:


1. I and D controller are set to zero
2. Create a small disturbance in the loop by changing the set point.
Adjust the proportional, increasing and/or decreasing, the gain until the oscillations have
constant amplitude.
3. Record the gain value (Ku) and period of oscillation (Pu=Tu). (select ku and Tu values at constant amplitude and oscillation

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 14
Control Engineering

Laplace Transformation

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 15
Control Engineering

Laplace transformation:
The Laplace transform is an integral transform named after its discoverer Pierre-Simon
Laplace. It takes a function of a positive real variable t (often time) to a function of a
complex variable s (frequency).

The Laplace transform is a frequency-domain approach for continuous time signals


irrespective of whether the system is stable or unstable. The Laplace transform of a function
f(t), defined for all real numbers t ≥ 0, is the function F(s), which is a unilateral transform
defined by

where s is a complex number frequency parameter


s = σ + j ω, with real numbers σ and ω.

-The real parts of s give information about the stability and damping/time constants.
-The imaginary parts give information about the frequencies of vibration.

The Laplace transform of a function is a complex function of a complex variable.

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 16
Control Engineering

Purpose of Laplace transformation:


-The Laplace transform converts the governing differential equations of a system or its
components into simple algebraic form allowing the controls engineer to describe the
system.

-The Laplace derived algebraic expressions can also be interpreted graphically in the
complex s-plane root locus diagram. The roots of the closed loop transfer function (poles
and zeros) at a given set of gains (the proportionality constant on a given functional block
expression) appear on the root locus diagram and enable a visual understanding of closed
loop system behavior.

-At the most basic level, poles in the left half plane represent stable decaying response to
input commands.

-Poles on the vertical axis represent sustained oscillation and

-Poles in the right half plane represent unstable continuing increase in system output.
Dept. of Mechanical and Production
Ahsanullah University of Science and Technology Engineering 17
Control Engineering

Laplace transformation formulas:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 18
Control Engineering
Examples:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 19
Control Engineering
Examples:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 20
Control Engineering
Inverse Laplace transformation :

Laplace transform converts the function into frequency domain which is easy to evaluate.

By taking the inverse laplace transform of the transfer function ( ratio of Laplace of output
to the laplace of input ), we can obtain the time response of the given system.

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 21
Control Engineering
Inverse Laplace transformation theorems:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 22
Control Engineering
Examples:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 23
Control Engineering
Examples:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 24
Control Engineering
Examples:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 25
Control Engineering
Example3:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 26
Control Engineering

Transfer function of a differential equation:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 27
Control Engineering

Transfer function of a differential equation:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 28
Control Engineering

Characteristic equation:

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 29
Control Engineering

Transfer function of a differential equation: Example1

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 30
Control Engineering

Solve differential equation: transfer function--- Example2

2) Produce transfer function of the differential equation and use that transfer function in
simulink
k d 2x k dx
 2 n  kx  F (t )
n dt
2 2
n 2
dt
n 2
∑F=ma Multiply both side by
c k
F(t)-cv-kx=ma
d 2x dx n 2

ma+cv+kx=F(t)  2 n   n
2
x  F (t )
dt 2 dt k
m d2x/dt2 +c dx/dt + kx=F(t) Laplace transform ation :
Let, n 2
s X(s)  2 n sX ( s )  n X ( s ) 
2 2
ωn=√(k/m), undamped natural frequency (rad/s) F ( s)
k
Cc= 2√(mk), critical damping coefficient n 2
 (s  2 n s  n ) X(s) 
2 2
=2m ωn F (s)
k
ξ= C/Cc, damping ratio=actual damping/critical damping n 2
Damping coefficient, c= 2m ωn ξ 
X(s)
 G(s)  2 k
s  2 n s  n
2
F ( s)

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 31
Control Engineering

Example3

Dept. of Mechanical and Production


Ahsanullah University of Science and Technology Engineering 32

You might also like