You are on page 1of 25

# EE 448

## Control Systems, Sensors and

Actuators
Lecture 3. Control Techniques
Instructor : Hunh Vit Thng <thang143@gmail.com>
LA
: V Vn Thanh
1

Control techniques
Closed loop control is an essential topic for control
systems, bringing together actuators and sensors with
the control algorithm in software

Introduction
Problem: supplying the same analog voltage (or the same PWM
signal) to a motor does not guarantee that the motor will run at
the same speed under all circumstances!

## Solution: Feedback is everything!

Introduction (cont.)

## C: the controller; P: plant or process; F: sensor measurement

y(t): output of the system;
u(t): output of the controller
r(t): reference signal (input);
e(t): error signal

Introduction (cont.)
Assuming the process/plant P, the sensor F and the controller
C are LTI (Linear Time-Invariant) systems

Closed-loop
transfer function

Control techniques

On-off control
PID control
Adaptive control (LMS, NLMS, RLS algorithms)
Others:
Fuzzy control
Neural Networks based control

On-off control
The power to motor is either switched on or switched off

## On-off control (cont.)

Behavior over time

## Advantage: simplest control method; used in refridgerators,

heater, thermostat, etc.
Disadvantage: the motor control signal is only updated at
fixed time intervals (e.g., 10ms)  hysteresis (tr)
8

## On-off control (cont.)

Use a hyteresis band with 2 desired signals to prevent a high
switching frequency

## Step-response of an on-off controller

Not smooth
Can we improve this?
10

PID Control

11

## PID Control (cont.)

The PID controller algorithm involves three separate constant
parameters, and is accordingly sometimes called three-term
control: the proportional, the integral and derivative values
PID = P + I + D
P = Proportional; I = Integral; D = Derivative
P depends on the present error,
I depends on the accumulation of past errors,
D is a prediction of future errors, based on current rate of
change
The weighted sum of these three actions is used to adjust the
process via a control element
12

## Proportional Controller (P)

The control voltage is directly proportional to the error signal
(error function)

## P controller is only slightly different from on-off controller

Varying the controller gain Kp will change the behavior of
the P controller
13

## Proportional Controller (cont.)

Step response for P controller
Higher Kp  Faster response
Important: Too high Kp
oscillating system!
Require fast response
and stable system
(e.g., Kp = 0.45)

14

## Proportional Controller (cont.)

P controllers equilibrium state is not at the desired velocity
due to control formula
Steady-state error is the difference between desired velocity
and equilibrium-states velocity
Can we reduce the
 Integral controller

15

## Integral Controller (I)

The idea of the I controller is to reduce the steady-state error
of P controller
The I controller is commonly used with the P or PD controller

16

## Integral Controller (cont.)

Define the error function : e(t) =
The formula for PI controller is
Rewrite for 2 independent additive terms for P and I

## How can we compute the integral?

A naive way of implementing the I controller part is to
transform the integration into a sum of a fixed number (for
example 10) of previous error values. These 10 values would
then have to be stored in an array and added for every
iteration.
17

## Integral Controller (cont.)

Proper Implementation:
replace the integral with a sum and use the trapezoidal rule

## Use the term Rn-1 to remove the sum

Substitute KI for

18

## Integral Controller (cont.)

proper implementation of PI control algorithm

## We only need to store

the previous control value Rn-1
the previous error value en-1

19

## Derivative Controller (D)

The idea of using the D controller is to speed up the P
controllers response to a change of input
The D controller is commonly used with the P or PI controller
Recall:
P provides a better step response than on-off controller
I for reducing steady-state error of P
D for speeding up step response of P

## How would the P, PD and PID controllers behave?

20

P, PD and PID

21

PID controller
The full formula for PID controller

## Finally, using the generic notations KP, KI and KD

22

PID controller
A complete PID formula

23

## PID parameter tuning

Find parameters experimentally

24