Professional Documents
Culture Documents
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
2
An example of Open loop control
A microwave oven uses Open loop control;
it turns itself off after a pre-set time regard-
less of whether the food intended to be
heated is still frozen or has already dried out.
Disturbance
Disturbance
Fout(t)
p(t)
w(t) Open u(t) Valve F(t) y(t)
Process
Setting value loop control Control (actu ator) Process input Actual value
(command) (response)
(input value) (output value)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
3
An example of Compensation control
Throttle
Pressure
Fout,meas (t)
me nt
Disturbance
Disturbance
period of time the
Fout(t)
pmeas (t)
p(t)
measurement errors pile
u(t) F(t) y(t)
up and the desired level w(t)
Compen-
sator
Valve
(actu ator)
Process
Control Process input Actual value
cannot be kept. Setting value
(command)
(response)
(output value)
(input value)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
4
An example of Closed loop control
Setting
+ value
Controller
Disturbance
Disturbance
Fout(t)
p(t)
In its simplest form w(t) + e(t) u(t) F(t) y(t)
Valve
the controller can be Setting value
(command) -
Error
Controller
Control (actuator) Process input
Process
Actual value
(response)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
5
Controller
Relay logic
PID-controller
Advanced controllers
Ÿ Fuzzy
Ÿ Adaptive
Ÿ Model predictive w(t) + e(t) u(t) y(t)
Controller System
Ÿ Optimal Setting value
(command) -
Error Control Actual value
(response)
Ÿ Neural networks (input value) (output value)
Ÿ Etc.
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
6
PID-controller
Setting
w(t) value
dt D
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
7
PID-controller w(t) Setting
value
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
8
PID-controller
Variations of PID-controller are
P-controller, PI-controller and PD-controller
All of these can be realized with PID-controller by suitable setting
values of gain parameters KP, KI, KD and/or time constants TI and TD.
Setting
w(t) Setting
value
w(t) value
P P
+ +
+ I + I
+ +
D D
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
9
Parameters of PID-controller
Setting
w(t) value
Derivative term (D) monitors the rate of change of error e(t) and tries
to resist the change of the error value. This term stabilizes the system,
but it is sensitive to delays and high frequency noise.
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
10
Effect of PID-controller parameters
Increasing the values of controller parameters (P, I, D) have the
following effect on the system characteristics, here presented with the
gains KP, KI, KD.
Parameter Rise time Overshoot Settling time Steady state error Stability
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
11
Effect of PID-controller parameters
When the error e(t) 10
9
increases stepwise in uD(t)
8
an open loop control, uI(t)
7
the controller
Amplitude (L)
6
parameters (P, I, D)
5
produce following
4
responses.
3
2
1
0
0 1 2 3 4 5 6 7 8 9 10
t (s)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
12
Tuning PID-controllers
In 1942 J.G. Ziegler and N.B. Nichols developed two experimental
methods for tuning PID-controllers.
First method is often called Ultimate Cycling Method and it is used with
closed loop systems (i.e., feedback systems), and the another, often
called Process Reaction Curve Method is in turn used with open loop
systems (i.e., systems without feedback).
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
13
Ziegler-Nichols tuning method
The first method (used in the Laboratory Exercise)
is implemented as follows:
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
14
de
Ziegler-Nichols tuning method u = K P e + K I ò e dt + K D
dt
Using the experimentally defined values of KP,crit and Tcrit the gains
(KP, KI, KD) of the controller can be calculated as follows
Controller Kp KI KD
P 0.50ž KP,crit - -
PI 0.45ž KP,crit 1.2ž Kp / Tcrit -
PD 0.80ž KP,crit - Kp ž Tcrit / 8
PID 0.60ž KP,crit 2ž Kp / Tcrit Kp ž Tcrit / 8
Pessen rule 0.70ž KP,crit 2.5ž Kp / Tcrit 0.15 ž Kp ž Tcrit
Small overshoot 0.33ž KP,crit 2ž Kp / Tcrit Kp ž Tcrit / 3
No overshoot 0.20ž KP,crit 2ž Kp / Tcrit Kp ž Tcrit / 3
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
15
æ 1 de ö
Ziegler-Nichols tuning method u = K P çç e + ò e dt + TD ÷÷
è TI dt ø
P 0.50ž KP,crit - -
PI 0.45ž KP,crit 0.83ž Tcrit -
PD 0.80ž KP,crit - 0.125ž Tcrit
PID 0.60ž KP,crit 0.50ž Tcrit 0.125ž Tcrit
Pessen rule 0.70ž KP,crit 0.40ž Tcrit 0.150ž Tcrit
Small overshoot 0.33ž KP,crit 0.50ž Tcrit 0.333ž Tcrit
No overshoot 0.20ž KP,crit 0.50ž Tcrit 0.333ž Tcrit
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
16
Criteria regarding the quality of the control
Defined from the step response (see Figure in following pages)
Dead time td
The time that after a stepwise change in system’s setting value w is required for the process output y
to start changing.
Rise time tr
The time that after a stepwise change in system’s setting value w is required for the process output y
to first reach its new steady-state value at certain accuracy. E.g., 95 % rise time refers to the time that
passes before output y first reaches 95 % of its new steady-state value. Likewise 10–90 % rise time
refers to the time that passes when output y changes from 10 % of its new steady-state value to 90 %
of its new steady-state value. In addition to these, also 5–95 % rise time is used.
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
17
Criteria regarding the quality of the control
Defined from the step response (see Figure in following pages)
Overshoot
The ratio of difference between output y’s first maximum and its new steady-state value to its new
steady-state value (= a/b in following Figure). Sometimes this characteristic is marked with Mp,
maximum percentual overshoot.
Damping ratio
The ratio of difference between output y’s first maximum and its new steady-state value to the
difference between output y’s second maximum and its new steady-state value (= c/a in following
Figure).
Settling time ts
The time that after a stepwise change in system’s setting value w is required for the process output y
to reach and remain inside a band whose width is equal to ±5 % of the total change in y (sometimes
also other bandwidths are used, e.g., ±1 %, ±2 %).
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
18
Criteria regarding the quality of the control
Defined from the step response (see Figure in following page)
Time period T
The time between output y’s two successive peaks (e.g., first and second maximum) or valleys.
Oscillation frequency f
The frequency that the system oscillated with (= 1/T).
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
19
Criteria regarding the quality of the control
Step response
1.6 In Figure’s case:
Time when setting value w is changed
0.2
10–90 %
Rise time tr
0
0 1 2 3 4 5 6
2nd order system and time delay 1 s
Time t (s) - Nominal frequency 1 Hz
Dead time td - Relative damping 0.2
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
20
Test system in laboratory
Position servo
Velocity servo
System
Ÿ Hydraulic power unit
Ÿ Proportional valve
Ÿ Differential cylinder
Ÿ Load
Ÿ Transducers
- Pressures p1 and p2
- Position x and velocity x&
- Force F
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
21
Real-time operating system – Simulink
Real-Time™
Simulink Real-Time™ is a software by MathWorks which enables
running Simulink® and Stateflow ® models in target (slave) computer
and realizing hardware-in-the-loop (HIL) simulations, rapid prototyping
of feedback control systems and other real-time applications. It
includes a driver library, real-time core and an interface between host
and target computers for real-time monitoring, parameter tuning and
data retrieving.
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
22
Real-time operating system – Simulink
Real-Time™
Fast measurement process in target machine
Ÿ Independent operating system → no interruptions, e.g., by Windows
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
23
Real-time operating system – Simulink
Real-Time™
Software Possible control loop
application Parameter
developed in updating Control
Host computer
(measurement, Target
control, Host
(Simulink
simulation) is (Windows Process
downloaded to
Real-Time™
etc.)
Target kernel)
computer. Data Measurement
Development of Measurements, Process receives
software and contro and controls and the
control of process possible real-time process quantities
simulations can be measured
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
24
Controlled quantity:
Simulated system Rotational
velocity of mass Feedback:
Rotational
Velocity servo velocity of mass
w
U
Actuator:
Hydraulic
motor
Control
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
25
Load: Fluid and its inertia:
Characteristics of the - inertia
- static torque
- spring-mass-system
→ oscillation tendency
simulated system
w
U
Hydraulic motor:
- Leakage (pressure dependent) Piping between valve
- Friction torque (pressure dependent) and actuator:
- Friction torque (rotational velocity - elasticity of fluid
dependent)
- Friction torque (constant) Control
- Modelled using Wilson-model
PID-controller
Proportional directional control valve:
- Finite operational velocity
(reaction time ca. 10 ms, 0 → 100 %)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
26
Restrictions in the simulated system
Restricted quantities:
- Power (limiter: system’s electric motor)
- Pressure (limiter: system’s pressure controller in pump)
- Flow rate (limiter: pump’s displacement and rotational velocity)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
27
System’s Natural frequency – without control
Proportional directional control valve closed Testing the natural frequency
- Setting value → feedback
Stiffness (hydraulic spring constant) of the rotation system - Torque load as impulse
4Vk,2rad K
kH = K = bulk modulus of fluid Jt
2 p Vk, rad + 2Vpipe
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
28
Tuning and Experimenting in Laboratory
Tune with Ziegler-Nichols method and make experiments
Ÿ Seek the value of gain KP (P-term) that results into the simulated system oscillating
with constant amplitude (= critical gain KP,crit)
► The stiffness and natural velocity of cylinder system are at lowest when the piston is
in the middle of its movement range!
Ÿ Write down the values of KP,crit and corresponding time period Tcrit
Ÿ Tune following controllers using these parameter values and Ziegler-Nichols tuning table
► P-controller
► PI-controller
► PID-controllers (Z-N parameter values + testing with different values of PID parameters E)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
29
Research Assignment 2, Problem B.5
Table 1 presents empirical qualitative knowledge on how the increase
of the control parameter values affect on the quality of the control.
Compare tabulated information with the measurement and simulation
results gained with position and velocity servos. Comment, which
control and tuning methods produced good results and which poor
when the following properties are striven for
a) small steady state error
b) short rise time
c) short settling time
d) small overshoot
Present one sentence justification for both control cases separately. Also comment
whether the gained results were consistent with the information presented in Table 1.
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
30
More to study and ponder
By changing the values of model parameters it is possible to study,
e.g., which kind of effect does the
Ÿ change of velocity range (high " low) have on the stability of the
velocity servo
Ÿ change of load (inertia or static torque) have on the system
Ÿ change of valve’s time constant have on the system
Ÿ transducer’s noise have on the system
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
31
Experiments and their results
Characteristics Critical P PI PID PID PID PID
gain
KP,crit
Rise time 95 %
Overshoot
Damping ratio
Settling time 5 %
Time period
Steady-state error
Notes:
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
32
Dynamics of the test system
Velocity Position
control control
wmeas
Measured value
Actual value
(response)
(output value)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
33
Dynamics of the test system
Control Spool Piston Piston
command position velocity position
w + e u xv x
PID
Setting value Error
(command) -
(input value) Controller Valve dynamics System’s Integrator
dead time Cylinder
Velocity Position
control control
wmeas
Measured value
Actual value
(response)
(output value)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
34
Dynamics of the test system
Control Spool Piston Piston
command position velocity position
w + e u xv x
PID
Setting value Error
(command) -
(input value) Controller Valve dynamics System’s Integrator
dead time Cylinder
Velocity Position
control control
wmeas
Measured value
Actual value
(response)
(output value)
p& 1 =
Ke
(q V,1 - Ax& ) Ke = efficient bulk modulus of the system
V0 = volume of cylinder chambers
V0
x& = piston velocity
p& 2 = e (q V, 2 + Ax& )
K A = piston area under pressure
V0
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
35
Dynamics of the test system
Equation of motion for cylinder piston where
m = movable mass
ma = m&x& = Fp,1 - Fp,2 - Fμ Fp,1 = pressure force affecting piston in cylinder’s plus chamber
Fp,2 = pressure force affecting piston in cylinder’s minus chamber
Fm = friction force of the cylinder (piston and piston rod seals)
Velocity Position
control control
wmeas
Measured value
Actual value
(response)
(output value)
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
36
Dynamics of the test system
Hydraulic natural frequency wH
Control Spool Piston Piston
command position velocity position
w + e u xv x
PID
Setting value Error
(command) -
(input value) Controller Valve dynamics System’s Integrator
wH = Measu re-
me nt
Measu re -
me nt
mV0 Velocity
control
Position
control
wmeas
Relative damping z
Measured value
Actual value
(response)
(output value)
1 æ m (0 .5 K C + C V ) bV 0 ö
z = w H çç + ÷÷
2 è A2 2K e A2 ø
22.11.2016
Department of Mechanical Engineering / Engineering Design / Mechatronics / Fluid Power
37
LAST SLIDE