Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Key Words: Adaptive control, self-tuning control, unfalsified control, PID control, controller identification.
Controller
J
r'.' - + Skpi + kIi (U+ S Y ) . (3)
the measured data (U,y) was collected. Because the data of filter associated with the i-th cacdidate_controller trans-
(U,y ) may have been collected with a controller other than fer function K i , (i € I). That is, [A;,&, Cj, bi]is a state-
Kj in the feedback loop, the fictitious reference signal r'; is space realization of the system in Fig. 2 with the values
in general not the same as the actual reference signal ~ ( t ) . of (kp,,kl,,k ~ , associated
) with the i-th controller Ki in-
A candidate controller Kj is called causally-left-invertible serted. The state vector is represented by Z i ( t ) .
if a unique values for its fictitious reference signal r'j(t) is
determined by past values of the open-loop data ~ ( t and ) 4. CONTROLLER PARAMETER
y(t). Further details about fictitious reference signals can ADAPTATION
be found in [7]. The main difference between unfalsified control and
other adaptive methods is that one can adjust controller
3. PID CONTROLLER parameters in unfalsified control based on measured data
PID control is used commonly in industrial and alone without any assumptions about the plant. Our algo-
aerospace applications. It is its simplicity and perfor- rithm for tuning PID gains uses only measured past data
mance characteristics that make PID popular. The ideal in adapting its gains. While, in principle, the unfalsified
PID controller can be expressed as U = ( k p + k I / s ) ( r - y ) - control theory allows for the set K to be an arbitrary sub-
SkDy, where k p , kI and kD are non-negative real numbers set of R" where n is the number of controller parameters
called the proportional gain, integral gain, and derivative to be adjusted, we discretize candidate controller set K
gain, respectively. The integral part makes steady-state so that it has only a finite number of elements in order to
tracking of step commands robust and the proportional simplify computations.
and derivative part affect stability and transient behav- At each time T ,the performance specification set TJpee
ior. consists of the set of triples ( T , y , U) satisfying an integral
The ideal PID controller has an improper transfer performance inequality of the form
function. It is hard to exactly implement the derivative
part. Thus, an approximated derivative $& is used in
realization where E is a small number. A PID controller
A
~ ( t=) - p + 1'Tspec(T(t), y ( t ) ,U(t))dt 5 0, vt E 10, TI
(4)
kI SkD where p 2 0 and Tspec(., -,.) are chosen by the designer.
U = (kP + s)(T -Y)- - &S+ 1
Y By Theorem 1, the i-th candidate PID controller K;
is unfalsified at time T by plant data ~ ( t )y(t), , (t E [O,T])
with approximated derivative term is shown in Fig. 1. if, and only if,
Standard PID controllers have gains k p > 0, IEI 2 0 ,
kD 3 0. They are always causally left invertible, which J ( i , t ) _< 0, vt E [O, T]
329
where c) if J ( i , k A t ) > 0 , then delete the controller in-
der element i from I (since Ki has been falsified
J ( i , t )5 -P + J,’ T s p e c ( ~ iY( (t t)),,u(t))dt, V t E [O,
71,
by the measured data up to time k a t ) ; else con-
tinue.
(5) \ - I
u ( t ) , y ( t ) , (t E [O,T]) is measured past plant data, and 3. I f the set I is empty, then terminate algorithm;
?i(t)denotes the fictitious reference signal for the i-th con- else, set the current controller to K;(k), i ( k ) =
troller Kj - see Fig. 2. argmin{J(i, k a t ) , i E I} and increment time (k t
Discretizing time, we may recursively compute each +
k l ) , go to step 1 and repeat.
of the fictitious. reference signals ? i ( k A t ) and its corre-
sponding cost J ( i , k A t ) at each time 7 = k a t . We use If the set I becomes the empty set, the algorithm ter-
MATLAB function c2d.m to discretize the fictitious refer- minates because all controllers in K are falsified. In this
ence signal generating systems depicted in Fig. 2. Eq. (5) case we have to either relax the performance specification
is discretized as or augment the set K with additional controller candi-
dates.
In general, many candidate controllers will be falsified
and discarded even before they are ever inserted into the
feedback loop. Consequently, the algorithm often con-
verges quite quickly. The current controller K;(kAt) re-
mains in the loop so long as it remains unfalsified by the
past data. If at some time k A t the current controller be-
comes falsified by new data ( u ( k A t ) y, ( k A t ) ) , then the
algorithm switches to a new controller K; which we chose
to be the one that has the largest index ; ( k A t ) among the
as yet unfalsified controller candidates Ki in K.
when p = 0.
The adaptation algorithm is as follows and detailed 5. SIMULATION
calculation procedure is described in Section 5. In this section we describe a simulation of PID con-
troller parameter adaptation using unfalsified control the-
ory. The simulation shown was conducted with no distur-
Algorithm 1 (Controller Unfalsification Procedure) bance, no noise and zero-initial conditions, though this is
INITIAL SETTING: not essential.
A The performance specification set Tspecis taken to be
a finite set K of m controller candidates Ki, i E I = the set of ( r ,y , U ) E x Lze x L2e, which for all T 2 0
{I, ..., m}. satisfy the inequality
., .)
performance functional Tspec(., llw1 * ( r - Y)Il; + lb2 * .I13 - 2 7 I11.114 +P (8)
sampling time At. where 11f113 = If(t)12dt, and * denotes the convolu-
tion operator. Design parameters are U (a constant rep-
the values of E, p and u(see Eq.(9). resenting the r.m.s. effects of noise on the cost), and
initial time k = 0. the signals wl and w2 are weighting filters. Therefore,
Tspec(@), Y(t), u(t)) is
initial consistency criterion J ( i ,0) = 0, i = 1 , . . m. e ,
T’pec(r(t),~ ( t ) , ~ (=t ) )
initial controller Km . +
Iwl * ( r ( t )- ?@))I2 Iw2 * u(t)12- u2 - Ir(t)12 (9)
PROCEDURE (at each time r = k a t ) : The simulation is conducted as follows: At each sam-
pling time T = k a t , the data u ( k A t ) and y ( k A t ) are
1. Measure u(lcAt) and y ( k A t ) .
measured. Then, the controller unfalsification procedure
2. For each i E I, (Algorithm 1 ) is invoked to determine which, if any, previ-
ously unfalsified controllers are now falsified based on the
a) calculate i i ( ( k + 1)At) and ? i ( k A t ) using a consistency test
MATLAB c2d.m discretized approximation of J ( i ,k A t ) I0. (10)
Fig. 2, The consistency criterion J”(i,’kAt)is computed based on
b) calculate j ( i ,k a t ) using Eq. (7), and the discrete-time approximation (7) and MATLAB c2d .m
330
04
02
'0 2 4 6 8 10 12 14 16 16 20
. : V I
'0 2 4 6 8 10 12 14 16 18 20
f lT----7
30, 1
="K 0
-lo\
-20 0 2 4 6 8 10 12 14 16 18 20
-
p -5
-10 -
lima (ue)
Figure 3: Plots of signals y(t) and u ( t ) when the states Figure 4: Simulation results showing good transient re-
of the controller are not reset at switching time. Poor sponse with correctly reset controller states
transients with spikes can occur if we fail to properly reset
! !
controller states at switching time.
! !
any discontinuity in either of their respective output sig-
nals, say u p ~ ( tand
) u ~ ( t )This
. assures that the control
signal u ( t ) = u p ~ ( t-) u ~ ( t is) smooth, avoiding abrupt t o 2
changes or high peaks that might otherwise result from d 0 2 4 6 8 Time10(Mc) 12 14 16 16 20
switches in ( k p , k ~ or
) kD, respectively. If we do not reset
the states of the controller at switching time but maintain
them as were before switching, we can see undesirable high Figure 5: Simulation results showing the changes in con-
peaks in the signal u ( t ) and higher overshoot in the signal troller gains
y(t) from the Fig. 3. Therefore, it is important to reset
controller states at switching time in such a way as to
prevent this. The simulation was carried out using Sirnulink. The
The following were used in the simulation: results are as shown in Fig. 4 and Fig. 5, and the Simulink
252 2s 10
model used in simulation is in Fig. 6. The figure shows
unknown plant P(S) = (s-l)(s+t~tloo) two times at which gain switching occurs. The values of
0.01 k p and I(I switch at the first switch time, and at the
wl(s) = w2(s) = 1,2(~+1)3 second switch all three gains k p , kr and kD change. At
step reference signal r ( t ) = 1, Vt 2 0 each switching time, the current controller is falsified and
a new, as yet unfalsified controller is switched into the
all initial conditions at time 0 are zero close loop. The final values of the controller parameters
are k p = 80, kI = 50 and kD = 0.5. The final number of
sampling time At is 0.05 second
unfalsified elements of the set K is 12.
the value of E = 0.01
no noise (a = 0) and zero initial conditions ( p = 0).
6. DISCUSSION
While the simulation shown in Fig. 4 was conducted
KD = {0.6,0.5}, K p = {5,10,25,80,110}, KI = assuming no noise (a = 0) and zero initial conditions
{2,50,100}. Thus, the number of candidate con- ( p = 0), the algorithm is actually fairly robust to noise
trollers in K is 30. and initial state perturbations. However, if the noise or
331
TO worlcspeq
.
I I ........ _.. .
, ,?
., r._ .? .... :.;f-.
I
I
. ,...
~
..................................
I
p;!...;?
,A.;’t: ,:;
i’, ‘\.,,.,.:. ..,...,.
I //
initial conditions are very large, then it may sometimes systems, to nonlinear time-varying plants as well as to
be necessary to use non-zero values for p and/or c in the high-order linear time-invariant plants.
performance specification (8). Irrespective of how complicated the plant may be, the
If a plant is slowly time-varying or subject to occa- PID controllers themselves are not very complicated and
sional abrupt changes, the far past data may not contain we can easily compute the unfalsified controller param-
much information about current plant. In such cases, ei- eters at each time via the recursive procedure described
ther an exponential forgetting factor or a finite-memory in Section 4. A limitation of our procedure is that the
data-window should be introduced. set K of unfalsified controllers may shrink to a null set
While the simulation only shows the result for the case if there are no PID controllers in K that are capable of
in which a step command r ( t ) is the input, the algorithm meeting the performance specification (4).But when this
also works when for inputs other than a step signal. It is is not the case, convergence of the algorithm is typically
important only that the input have sufficient strength and rapid and sure-footed. Our experience with simulations
spectral breadth to allow candidate controllers Ki to be re- has been that convergence is usually so rapid that satis-
liably ordered by the performance specification functional factory transient response is obtained on the first try even
J ( i ,t). with no prior knowledge of the plant.
7. CONCLUSION References
In this paper, we described in detail how to adaptively [l] Astrom, K. J . , and T. Hagglund, “Automatic tuning
tune the parameters of a PID controller in real-time using of simple regulators with specifications on phase and
unfalsified control theory. An advantage of this approach amplitude margins,” Autornatica, v01.20, pp.645-651,
is that no plant model is required. We need only real-time 1984.
measurements of input-output data ( U ,y) from the plant.
Thus we may apply this method to distributed parameter [2] Franklin, G. F., D. J. Powell and M. L. Workman,
332
Digital Control of Dynamic Systems, 3rd ed, Reading,
MA: Addison-Wesley, 1997.
[3] Kosut, R. L., M. K . Lau and S. P. Boyd, “Identifi-
cation of systems with parametric and nonparamet-
ric uncertainty,’’ Proc. 1990 American Control ConJ,
San Diego, CA, May 1990.
[4] Mitchell, T . M., Machine Learning, New York, NY:
McGraw-Hill, 1997.
[5] Nishikawa, Y., N. Sannomiya, T. Ohta and H.
Tanaka, “A methods for auto-tuning of PID control
parameters,” Automatica, v01.20, pp.321-332, 1984.
[6] Safonov, M. G., and T . C. Tsao, “The unfalsified
control concept and learning,” IEEE Trans. Automat.
Contr., vol. 42, no. 6., pp. 843-847, Jun. 1997.
[7] Tsao, T . C., “Set theoretic adaptor systems,” Ph.D.
dissertation, Univ. of Southern California, May 1994.
[8] Younce, R. C., and C. E. Rohrs, “Identification with
nonparametric uncertainty,” Proc. IEEE ConJ on
Decision and Control, Honolulu, HI, Dec. 1990.
[9] Ziegler, J. G., and N. B. Nichols, “Optimum set-
ting for automatic controllers,” Trans. ASME, vo1.64,
pp.759-768, 1942.
333