Neural Network Based Control System Design TOOLKIT

advertisement
Neural Network Based Control System
Design
TOOLKIT
For Use with MATLAB
Magnus Nørgaard
Department of Automation
Department of Mathematical Modelling
Technical Report 00-E-892, Department of Automation
Technical of Denmark
http://kalman.iau.dtu.dk/research/control/nnsysid.html
Reference Text:
M. Nørgaard, O. Ravn, N.K. Pouilsen, L,K. Hansen, Neural Networks for Modelling and
Control of Dynamic Systems, Springer, London, 2003.
Single Input Single Output (SISO)
Time Domain vs. Frequency Domain
Regulators vs. Servos
The primary function of a regulatory system is to maintain a constant
value of the controlled variable or system output even in the event of
severe load inputs.
In processing industries most processes can be considered self
regulating and have many first order time constants in series as well as
a significant dead time between the time the manipulated variable is
changed and any change is detected in the process.
A servo-system is normally subjected to a continuously varying
command signal or set point; its primary function, causing the output
to follow the command signal.
Servo
Controller
+
Compensator

Set
Point
Control
Valve
Process
Transmitter
Output
-
Regulator
Controller
+
Set
Point
Compensator

-
Disturbance
Control
Valve
e
s
Process
Transmitter
Output
Neural Network for Control
Inverted neural network controls have been used principally for servo
applications.
The concept of neural network control is if a neural network model can
be defined for the process, this model can be inverted and the inverted
model can be used for control.
This should be used only when the process is so complex or non linear
that conventional controls, such as PID, cannot be used.
There is a serious word of caution with using this technique. Because
the neural network uses “trained” parameters and not first order
principals, the network will not give guaranteed performance within any
region where it was not trained. Interlocks should be used to safely
shutdown the process in event of any malfunction.
An example of this technique is shown below, a conical
tank level control:
h
a
Volume = 1/3 p r2 h
1/3 p tan2a h
The tank level is a highly non linear process,
the outlet flow being a function of the square
root of the head while the inlet level change is a
function of the inverted square of the head:
Watch out for zero head!
k out
dh
1

Qin 
2
2
dt p tan ah
p tan 2 ah1.5
The inverted neural network and control system
are shown as follows:
y
y(t-1)
ref(t+1)
u(t-2)
Inverse
Model
Process
Neural
Network
u = flow in
h = y(t+1)
An example of the result of a trained network is shown
below
Direct inverse control
2
ref_data
y_data
1.5
1
0.5
0
0
20
40
60
80
Samples
100
120
140
2
u_data
1.5
1
0.5
0
0
20
40
60
80
Samples
100
120
140
In order to avoid model offsets, an improved method
would be to add a PI controller before the network.
The output of this controller should be scaled to the
reference input range. The reset term in the PI controller
will act as a bias to offset network inaccuracies.
y
y(t-1)
PI
Set
Point
ref(t+1)
u(t-2)
Inverse
Model
Process
Neural
Network
u = flow in
h = y(t+1)
Neural Networks as
Compensating Blocks
• ISA article by Dumbie uses a feed forward block in
the output signal to the final controller's setpoint.
• The example: Temperature controller of a tempered
water system with a cold and hot streams mixed.
Total flow and temperature of the combined streams
are the interactive controls.
Fw  Fc  Fh
Fc * Tc  Fh * Th  Fw * Tw
Tw  Tc
Fh  Fw *
Th  Tc
Compensating Feed Forward
Blocks
• The combined temperature in this equation is the
output of the temperature controller Tw'
Multivariable Control Problem
Hot Water Mixer
Flow and Temperature Control
Fh
ctrl
Set
Point
Fw( Tw' - Tc)
-----------------------------(Th - Tc)
Hot Water; Th degR
Tw'
Fh
Fh
Tw
ctrl
Fw
ctrl
Fc
FW
Cold Water; Tc degR
Mixed Stream; Fw
Note that the Tw` is the controller output, that is
scaled the same as the PV or controller input
An alternate to this is to develop a neural network,
inverted, that acts as a feed forward compensating
block
This technique is also used by Rhinehart for
distillation control
Download