Process Identification Based New Relay Feedback Experiment€¦ · PROCESS IDENTIFICATION BASED ON...
Transcript of Process Identification Based New Relay Feedback Experiment€¦ · PROCESS IDENTIFICATION BASED ON...
-
Process Identification Based on a New Relay Feedback Experiment
Micheile Desarmo
A thesis submitted in confonnity with the requirements
for the degree of Master of Applied Science
Graduate Depart ment of Chernical Engineering & Appiied Chemistry
University of Toronto
@Copyright by Michelle Desarmo(1998)
-
National Li brary u*I of Canada Bibliothèque nationale du Canada Acquisitions and Acquisitions et Bibliographie Services services bibliographiques
395 Wellington Street 395. nie Wellington Ottawa ON K1A ON4 OttawaON KIAON4 Canada Canada
The author has granted a non- L'auteur a accordé une licence non exclusive licence allowing the exclusive permettant à la National Library of Canada to Bibliothèque nationale du Canada de reproduce, loan, distribute or selI reproduire, prêter, distribuer ou copies of this thesis in microform, vendre des copies de cette thèse sous paper or electronic formats. la forme de microfiche/film, de
reproduction sur papier ou sur format électronique.
The author retains ownership of the L'auteur conserve la propriété du copyright in this thesis. Neither the droit d'auteur qui protège cette thèse. thesis nor substantial extracts from it Ni la thèse ni des extraits substantiels may be printed or otherwise de celle-ci ne doivent être imprimés reproduced without the author's ou autrement reproduits sans son permission. autorisation.
-
To rny parents
-
PROCESS IDENTIFICATION BASED ON A NEW RELAY FEEDBACK EXPERIMENT
Master of Applied Science, 1998, by Michelie Desarmo,
Graduate Department of Chernical Engineering and Applied Chemistry,
University of Toronto
Abstract
A novel identification experiment based on relay feedback is proposed which automaticdy
generates a nonperiodic binary process input signal by interniittently placing additional
dynamics into the relay feedback loop. The input signal is rich in frequency content, per-
rnitting identification of a multiple-point frequency or step response model from a single
experiment. The Frequency Sampling Filter (FSF) model is used to fit the models to the
relay generated data using a least squares estimator. A recursive version of this algorithm
has been incorporated into a prototype software application that combines the new relay
experirnent with on-iine FSF mode1 identification. The prototype has been applied to a
pilot-scale, stirred t d heater process to demonstrate the new method in practice.
-
Acknowledgement s
1 wish to express my sincere thanks to the many people who have supported me in various
ways during this project. 1 would especially like to acknowledge the foUowing people:
* My supervisor, Dr. William Cluett, for his guidance throughout my work at U of T, and also for his bancial support.
* Dr. Liuping Wang for her advice and extraordinary enthusiasm.
9 Feilow members of the Process Control Group for many interesthg conversations and
lots of advice. Special thanks to:
- Alex Kalafatis for sharing his LabVIEW knowledge.
- Joe Tseng for being on cd1 every time the cornputers did something unexpected.
- Sophie McQueen for al1 her help with my presentations.
- Female members of the group for their fiiendship, and for organizing extracur-
ricular fun.
AU of my fiiends, for their inspiration.
Penny Seymour for fond memories of my experience as a TA in the first year lab.
My family for a l l the love, support and encouragement that they have given me
throughout my education.
-
Contents
Abstract iii
Acknowledgements iv
List of Tables vii
List of Figures x
Nomenclature xi
1 Introduction 1 . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Motivation and Thesis Objectives 1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Literature Review 3 . . . . . . . . . . . . . . . . . . . . 1.2.1 The Astrorn-~a&ünd autotuner 3
. . . . . . . . . . . . . . . . . . 1.2.2 A survey of autotuning applications 5 . . . . . . . . . . . . . . . . . . . 1.2.3 Describing function approximation 6
1.2.4 Alternative methods and improvements to the DFA . . . . . . . . . 7 . . . . . . . . . . . . . . . . . . . . . 1.2.5 Transfer func tion identification 9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Outline of the Thesis 10
2 Ekequency and Step Response Identification fkom Relay Data 11 . . . . . . . . . . . . . . . . . . . . . 2.1 Frequency Sampling Filter Algorithm 11 . . . . . . . . . . . . . . . . . . . . 2.1.1 Frequency sampling filter mode1 12
. . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.2 Step response models 14 . . . . . . . . . . . . . . . 2.1.3 Formulation of the least squares problem 15 . . . . . . . . . . . . . . . 2.1.4 PRESS statistic for mode1 order selection 16
. . . . . . . . . . . . . . . . . . . . . . . . . 2.1.5 FSF/PRESS algorithm 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 A New Relay Experiment 18
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Relaydynamics 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Proposed experiment 19 . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Experimental design 20
2.3 Application of the FSF Algorithm to Relay Feedback Data . . . . . . . . . 23 . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 The desired input spectrum 23
. . . . . . . . . . . . . . . . 2.3.2 Properties of the FSF correlation matrix 25
-
2.3.3 Choice of the parameter N . . . . . . . . . . . . . . . . . . . . . . . 27 2.4 Experimentalresults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3 F'urther Design Issues and Case Studies 31 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2 Characteristics of Processes with High Criticai Frequencies . . . . . . . . . 31 3.3 The Muence of Delay on the FSF Spectrurn . . . . . . . . . . . . . . . . . 35
3.3.1 First order processes . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.3.2 Second order processes . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.3.3 EffectofrelayparametersontheFSFSpectnun . . . . . . . . . . . 40
3.4 A Modification to the New Experiment . . . . . . . . . . . . . . . . . . . . 41 3.5 Guidelines for Adjusting N for the FSF Mode1 . . . . . . . . . . . . . . . . 45 3.6 Noise M o d e h g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.7 BacklashEffects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.8 Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.8.1 First order models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.2 Second order models 60
4 On-Line Identification and Experimental Results 68 4.1 Recursive Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.1.1 Formulation of the recursive least squares problern . . . . . . . . . . 70 4.1.2 Updating the covariance matrix via RUD factorkat ion . . . . . . . 70
4.2 The Recursive FSF Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4.2.1 An alternative representation of the FSF mode1 . . . . . . . . . . . . 71 4.2.2 Recursive estimation of the FSF mode! . . . . . . . . . . . . . . . . 73 4.2.3 Initialization of the RLS algorithm . . . . . . . . . . . . . . . . . . . 76
4.3 A Prototype Software Application for On-Line Identification . . . . . . . . 77 4.3.1 Codevalidation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
4.4 Experimental Case Study on a Pilot Scale Stirred Tank Heater . . . . . . . 83 4.4.1 Operat ing conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 4.4.2 Results of experiment # 1 . . . . . . . . . . . . . . . . . . . . . . . . 85 4.4.3 Results of experirnents # 2 and 3 . . . . . . . . . . . . . . . . . . . . 91 4.4.4 Remarks on practical issues . . . . . . . . . . . . . . . . . . . . . . . 99
5 Conclusions and Recornmendations 105 5.1 Contributions of the Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.2 Recommendations for Future Work . . . . . . . . . . . . . . . . . . . . . . . 107
A The Relationship Between the Batch and Recursive FSF filters 111
-
List of Tables
4.1 S u m m q of Parameters/Options on the Interface . . . . . . . . . . . . . . . 80 4.2 Srimmary of Experiment # 3. the Tl plus delay experiment . . . . . . . . 94
-
List of Figures
1.1 The Basic Relay Feedback Experiment . . . . . . . . . . . . . . . . . . . . . 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 The Relay Block 4
. . . . 1.3 Sample Data fkom the A s t r o m - ~ a ~ ~ l ü n d Autotuner: d = f 2, E = 0.5 6
Schematic Diagram of the FSF Mode1 . . . . . . . . . . . . . . . . . . . . . 13 . . . . . . . The Influence of Additiond Dynamics on Excitation F'requency 19
Block Diagram of the Proposed Experiment . . . . . . . . . . . . . . . . . . 20 Comparison of Data Generated fkom the New and Standard Relay Experiment 21 New Relay Experiment Applied to Two Different Models with Identical Input Sequences: [O O 1 1 1 0 1 0 1 O O 11 . . . . . . . . . . . . . . . . . . . . . . . 24 A Typical FSF Input Spectrum Obtained from the Proposed Experiment: input sequence [O 0 0 1 1 1 1 0 0 11 . . . . . . . . . . . . . . . . . . . . . . 26 Experimental Resdts for the STH . . . . . . . . . . . . . . . . . . . . . . . 29 Identification Results for the STH . . . . . . . . . . . . . . . . . . . . . . . 30
3.1 New Experiment Applied to Two First Order Models with Different Dead- times (input sequence [O O 0 1 1 1 1 0 0 1 0 1 1 1 O]) . . . . . . . . . . . . .
3.2 A Comparison of FSF Spectra for Data in Figure 3.1 . . . . . . . . . . . . . 3.3 The Effect of Deadtirne on the F'requency Response of First Order Relay
Dynamics (AU time constants are 100 sec . The FSF Erequencies are shown by o.*.xt+.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 A Comparison of the Observed and Ideal Normalized Period for First Order Modek . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.5 A Comparison of the Observed and Ideal Normalized Period for Second Order Critically Damped Models . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6 The Effect of Hysteresis on the UItimate Period . . . . . . . . . . . . . . . . 3.7 Block Diagram of the Modified Relay Experiment . . . . . . . . . . . . . . . 3.8 Met hodology for the Additional Delay Experiment . . . . . . . . . . . . . . 3.9 Simulation Results for Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10 Identification Results for Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . 3.11 Simulation Results for Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12 Identification Results for Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . 3.13 Simulation Results for Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . .
viii
-
3.14 Identification Results for Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.15 Simulation Results for Case 3b
3.16 Identification Results for Case 3b . . . . . . . . . . . . . . . . . . . . . . . . 3.17 The Effect of Normalized Deadtirne on the Magnitude of the Process Output 3.18 Simulation Results for Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 3.19 Identification Results for Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . 3.20 Simulation Resuits for Case 5
3.21 Identification Results for Case 5 . . . . . . . . . . . . . . . . . . . . . . . . . 3.22 Simulation Resuits for Case 6 . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 3.23 Identification Results for Case 6
4.1 The Main Control Panel of the Prototype Interface . . . . . . . . . . . . . . 4.2 The Identification Control Panel of the Prototype Intexface . . . . . . . . . 4.3 Cornparison of the LabVIEW (RLS) and MATLAB (batch LS) Fkequency
Response Estimates: 6 settling tMes of undifferenced data, N = 600. n = 11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.2 sec samphg
4.4 Schematic Diagram of the Stirred Tank Heater Pilot Plant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Input/Output Data for T2
4.6 On-line Identification Results for T2 Using Three Settling Time Estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( n = l l )
4.7 On-Iine FSF spectrum for T2 (N = 259, n = 11) . . . . . . . . . . . . . . . 4.8 On-line Identification Results for T2 Using Three Mode1 Orders . . . . . . . 4.9 On-line FSF spectrum for T2 (N = 259, n = 13) . . . . . . . . . . . . . . . 4.10 Convergence of the T2 Model with Time (N = 259, n = 11): 1 - 6 settling
times of data = o,x.",+,solid,dotted, respect ively . . . . . . . . . . . . . . . 4.11 Input/Output Data for Tl (no additional delay) . . . . . . . . . . . . . . . 4.12 Cornparison of Input Signal Fkequency Content for Two Processes . . . . . 4.13 Convergence of the Tl Model with Time (N = 221 . n = 11): 1 - 5 settling
times of data = o,x,",+,solid, respectively . . . . . . . . . . . . . . . . . . . 4.14 Input/Output Data for the Tl Plus Additional Delay Experiment: see Table
4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15 On-line Identification Results for the Tl Plus Additional Delay Experiment
(see Table 4.2; continued in Figure 4.16): solid, dotted lines are the estimated step responses fkom differenced. non-differenced data respectively . . . . .
4.16 On-line Identification Results for the Tl Plus Additional Delay Experiment (see Table 4.2; continued from Figure 4.15): solid. dotted lines are the esti- mated step responses from dinerenced. non-differenced data respectively .
4.17 On-line Identification Results for T2: automatically estimated set t ling tirne. N=190 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.18 On-he Identification Results for Tl: automatically estimated settling time. N=44 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.19 Biased and Unbiased Relay Data: Two runs of Experiment #1 . . . . . . .
-
4.20 On-iine Identifkat ion Results for T2. DBerencing can be advantageous when baddash effects are signincant. Input/Output data shown in Figure 4.19 . . 103
-
Nornenclat ure
e-t E
limit cycle amplitude real part of the kth fiequency response coefficient: G(gWk ) imaginary part of the kth fiequency response coefficient, G(eJWk) relay amplitude addi tional delay added to the feedback loop diagonal mat rk in the RUD factorization of P(t) kth diagonal of the FSF covariance matrix (FSF spectrum) convent ional residuals PRESS residuals sum of squared prediction errors m t h step response coefficient discrete process fiequency response at frequency wk cont inuous t ime process t ransfer func t ion discrete time process transfer funct ion it h impulse response coefficient kth FSF fiIter FSF integer hannonic number RLS update gain ul t imate gain FSF mode1 order process settling time, in units of sampling i n t e d s the DFA ideal switching period associated with FSF fkequency wi RLS covariance matrix frequency response weighting function tirne, in units of sarnples process settling time, in units of time process input at time, t unit upper triangular matrix in the RUD factorization of P( t ) disturbance at tirne, t dist urbance vector predicted process output generated using without data at time,t process output at time, t process output vector backwxds shift operator delay to time constant ratio
-
T d process deadtirne
DFA DFT FFT FIR FSF Model PEI Controuer PRESS RBS RLS RUD Factorization STH
c04wk) sin(wk) sampling interval relay hysteresis widt h FSF parameter vector (Bequency response parameten) FSF parameter vector estimated without using data at time,t standard deviation of the noise process t ime constant kth FSF filter output at tirne, t phase angle, in rad, at frequency W, FSF regressor vect or (6lt ered input signal) FSF filter (RLS formulation) associated with the imaginary part of the kth frequency response coefficient FSF filter (RLS formulation) associated with the real part of the kth fkequency response coefficient frequency, in rad/sec kth FSF fkequency, in rad
Describing Function Approximation Discrete Fourier Transform Fast Fourier Transform Finite Impulse Response F'requency Sampling Filter Model Proportional Integral Derivative Controuer PRediction Error Sum of Squares Random Binary Signai Recursive Least Squares Recursive UD factorization Stirred Tank Heater
-
Chapter 1
Introduction
1.1 Motivation and Thesis Objectives
In the early eighties, Astrom and Hagglünd (19840) proposed the use of relay feedback
combined with a describing function approximation (DFA) as a simple means to estimate
the critical fkequency response of a process. The key idea behind this work was that the
relay experiment can be used as a meam to automatically excite a process at its critical
frequency. When combined with the DFA, the relay proved to be a very efficient way to
obtain process information that could be directly applied to PID controller design. Since
1984, many variations and refmements to the original method have been developed and
used in a number of applications, including autotuning of P D controllers (Astrom and
Hagglünd, 1984h Leva, 1993; Kim, 1995; Khan, 1995), initialization of adaptive controllers
(Hagglihd and Astrom, lggl), process identification (Li et al., 1991; Sallé and Astrom, 1991)
and process monitoring (Belanger and Luyben, 1996; Chiu and Ju, 1997).
Astrom and Hagglünd's approach was particularly successhil because. although the in-
formation generated by the experiment is Limited, very Little a pn'ori knowledge is required
to conduct the experiment and the data is simple to analyse and readily applicable to fa-
miliar PID controller designs (e.g. Ziegler and Nichols, 1942). The relay experiment is
attractive not o d y because it is easy to understand and implement, but also because it is
a closed loop experiment that maintains the process near its operating point. The main
limitation of current relay methods is that the generated input/output data is dominated
by a single fkequency. This means that the input spectrum is not diverse enough to permit
more than one or two fkequency response points on the process Nyquist plot to be accurately
-
ident ified.
The literature on relay feedback applications relies almost exclusively upon the use of a
describing funct ion approximation, which est imates a single fkequency response point based
on the assumption that the relay data has a dominant k t harmonic component. Although
this is oRen a reasonable assumption, for cases as common as a first order process, this
assumption has b e n shown to cause significant estimation errors (Friman and Waller, 1995)-
Regardless of accuracy, the DFA is limited by the fact that it yields oniy one frequency
response point per relay experiment. A direct consequence of this limited information is
that applications have been restricted to certain control strategies (eg. PID tuning using
specified gain/phase margins). In other words, the amount of information generated leaves
Little room for flexibility in controller design.
In order to obtain a more flexible model, it is necessary to gather more process infor-
mation by performing a series of dinerent relay experiments. Those who have attempted to
constntct more generdy applicable models, such as transfer hc t ions , have identified dif-
ferent fiequency response points fkom several relay experiments, and then used these points
to fit a parametric model. Selecting a model structure complicates the modelling process
by requiring the user either to impose an a prior i model structure' or to fit several types
of models and develop a detailed procedure for deducing which is the "true" model. This
means that the predictive capability of modeis generated by these methods is often com-
prornised by mode1 structure mismatch, in addition to the accuracy limitations inherited
from the DFA.
Despite this body of work, the Literature suggests that there is still a need in industry
for a simple experiment that can produce a more accurate and more complete model of the
process. Response tests that use random binary input signals are an alterriative means of
obtaining data for process identification. The non-periodic nature of these signals implies
that there is enough multifrequency information in a single experiment to construct a more
complete hequency response model. Unfortunately, a prior i knowledge of the process is
required to design such an input signal with the correct fiequency content. Also, if a
predesigned input signal is applied in an open loop experiment, there is a risk that the
process variable will drift outside the desired operating region.
-
Thus, the main objectives of this thesis are:
To develop a single, relatively simple relay feedback experiment which WU provide
rich multifrequency excitation that is suitable for the purpose of identifjring a general
purpose process model (e-g. a frequency and/or step response model).
To examine the use of the Frequency Sampling Filter (FSF) model structure and a
least squares estimator as a means to improve upon the accuracy of the DFA while at
the same time developing a general purpose model.
To achieve both of the above objectives while minirnizing the amount of a priori
information required fiom the user. In other words, the objective is to automaticdy
ob t ain an appropriate mult iikequency input signal, while requiring no more process
information than that required by the basic relay experiment (i.e. the sign of the
process gain). With respect to the chosen FSF mode1 structure? only an estimate of
the process settling time is required. Work will be done to detennine whether this
information can be automaticdy determined horn the relay feedback data.
1.2 Literature Review
1.2.1 The Astrom-EIagglünd autotuner
Ziegler-Nichols (1942) controller tuning rules are based upon knowledge of the ultimate
gain and ultirnate period of the process. Such information was originally obtained by using
proportional control wit h a gradually increasing gain to induce a Limit cycle in the process
output. This method was time consuming and risked operation on the verge of instability.
Astrorn and Hagglünd (1984a) proposed relay feedback as an alternative to this trial and
error method. They identified the critical point with a describing function approximation
for the relay, and directly applied this information to a Ziegler-Nichols P D controller design.
The block diagram in Figure 1.1 shows the basic relay feedback experiment, known as the
A s t r o m - ~ a ~ ~ l ü n d Autotuning experiment.
This experiment automatically excites the process neai- its critical frequency (conditions
for the existence and stability of relay limit cycles have been presented by Astrom and
Hagglünd (1984a) and Hang and Astrom (1988)). The relay block is shown in more detail
in Figure 1.2. The principle idea behind the operation of the reiay is that it creates a
3
-
Figure 1.1: The Basic Relay Feedback Experiment
Feedback Erxor
Process Input
Figure 1.2: The Relay Block
-
periodic binary input signal, u, whose amplitude, f d: is determined by the sign of the
feedback error, e. That is, the input signal switches are triggered by the zero crossings of
the feedback error, In order to minimine correlation with high hequency noise, the relay
is t-ypicdy implemented with a hysteresis of width E , which is generally set to be about
three times the estimated standard deviation of the noise. Therefore, to trigger a switch,
the feedback error must move beyond the zero crossing by a significant amount relative to
the noise Ievel,
1.2.2 A survey of autotuning applications
Many applications have been developed to exploit the relay's ability to autornatically gen-
erate speci£ic fkequency information that is directly applicable to simple controller designs.
Autotuning of PID controllers is one such area in which variations on the autotuning exper-
iment proposed by Astrom-EIagglünd have played a signincaot role. For example, Palmor
et al. (1995) have extended the Astrom-~agglünd autotuning experiment to multivariable
processes. In contrast to sequential autotuning methods (Luyben, 1987; Shen et al.: 1996),
Palmor's method allows al1 loops to be sirnultaneously closed under relay feedback. Since
the multivariable situation gives rise to infinitely many possible critical points (depending
on the ratio of the relay amplitudes in each loop), they have concentrated on developing an
iterative method for identibing the desired critical point from a user-specified parameter
that indicates the relative importance of the loops. The methods developed by Leva (1993) :
Kim (1995) and Khan (1995) have combined the relay with additional dynamic elements
such that the process is autornatically excited a t frequencies other tban the critical fre-
quency. In the case of Kim's method, a simple autotuner was proposed which uses a delay
element to operate the process at a specified phase margin. The dtimate gain and period
are directly used as PI parameters, without the need for W h e r application of tuning rules.
A more complex iterative scheme was developed by Leva, who used a low-pass filter and a
variable delay element to design a phase margin specified PID controller. Khan used two
relay experiments (with and without an integrator) in order to obtain hequency response
information at two different frequencies. fiequency domain tiining rules were subsequently
applied to these data points to determine suitable PID controller parameters. A more
complex tuniag method, designed to improve the performance of an existing controller,
-
Figure 1.3: Sample Data from the Astrom-~a&ünd Autotuner: d = f 2, c = 0.5
2.5
2
1.5-
was suggested by Schei (1992; 1994). Here, the relay is applied around the wcisting closed
loop system in two separate experiments (with and without an integrator in the loop). A
discrete transfer function is identified Çom the generated data and is then combined with
specifications on the maximum amplitude of the sensi t ivi ty and complementary sensi tivi ty
functions to yield new PID controller parameters.
- - - - - - -
I 1 I I 1 1 1 I I I 1 I 1 I I I
1 1 I I l 1
1.2.3 Describing function approximation
I 1 I I 1 I - 2 - - - L - - - - l !----a 1 , - -
-2.5 t 1 1 I I O 10 20 30 40 50 60 70
Time (sec)
Some typical relay feedback data is shown in Figure 1.3. It is generaily assumed that
the relay generates a periodic square wave output of amplitude, d, with a dominant first
harmonie component which corresponds to the ultimate period of the process. The limit
cycle induced in the process output variable is assumed to be a sinusoidal signal with the
same period. With these key assumptions, and a measurement of the output lirnit cycle
amplitude, a, the DFA provides a simple way to estimate the ultimate gain of the process:
The DFA is based upon a Fourier series expamion of the relay output. Consider the
square wave relay output, which is an odd function. This signal has harmonic components
at odd multiples of the fundamental frequency. The energy associated wit h each harmonic
6
-
decreases rapidly, giving rise to the assumption that the fundamental fkequency component
dominantes. The Fourier series expansion of the process input signal ~ ( t ) is written as:
The harmonic terms are then assumed to be negligible:
Similady, the limit cycle of the process output, y(t), is approximated as a sinusoid which
lags the input by -n rad:
y ( t ) zz -asin(wt) (1.4)
The ratio of these two sinusoids produces an estimate of the process response at the funda-
mental frequency:
Assuming that the fundamental fkequency of the limit cycle is equal to the critical frequency,
the negative inverse of the process response provides an estimate of the ultimate gain of the
process (Equation 1.1).
1.2.4 Alternative methods and improvements to the DFA
There are limitations associated with the use of the DFA. Firstly, for cases as cornmon
as a first order plus delay process, the key assumptions of the DFA break down (notice,
for example, that the process output response in Figure 1.3 is not very sinusoidal). As a
result, a great deal of research has focused on improving the accuracy of DFA. In addition,
the DFA is limited by the fact that it can only iden te one frequency response point per
experiment. The DFA's simplicity and popularity seem, in many cases, to have encouraged
research with the aim to reduce, rather than emphasize, harmonic frequencies which could
have otherwise been used to fit more complete modek.
Li et al. (1991) have reported convergence dificulties when attempting to fit transfer
h c t ion modeis wit h DFA generated frequency response est imates. Their convergence
probiems were attributed to the inherent inaccuracy in the DFA. In fact, Friman and Waller
7
-
(1995) recently reported that errors as large as 30% in the ultimate gain and 20% in the
ultimate per-iod codd result from anaiysing relay feedback data wit h the DFA. These authors
have eliminated the assumption of a dominant first harmonic by pretreating the signal with
an expression which isolates the first harmonic component of the output. Estimates of
the critical bequency were &O improved with the development of an iterative experiment,
which replaces the relay with a saturathg gain element in order to minimixe the phase
Iag contribution of higher harmonies. Sung and Lee (1995) have also improved the DFA
accuracy by modifying the experiment. They propose that a dit her signal be added to the
relay signal such that unwanted harmonic fkequencies are reduced. Hang et al. (1993) have
examined the effects of disturbances on the Iimit cycle and DFA estimate, and suggested
methods for disturbance detection and self-correction.
Severai papers have taken the opposite approach to improving the DFA accuracy. Rat her
t han changiag the experiment to improve the DFA accuracy, many have instead selected an
alternative data analysis method for the basic relay experiment. For instance. Astrom and
Hagglücd (Astrorn, 1988: Hagglünd and Astriim, 1991) have modified their original method
by applying waveform analysis to the process output and directly estimating a transfer
function modeI. This method is intended primarily for f is t order systems, since they are
most likely to violate the DFA assumption that the h s t harmoaic component is dominant.
However, it has been observed (Sallé and Astrom, 1991) that this metho$ is sensitive to
noise and difficult to apply to high order systems. Others, such as Chang et al. (1992) have
replaced the DFA with analytical expressions for the limit cycle. Wang et al. (1997) have
taken an approach similar to Chang et. al., but developed the method for use with a biased
relay experiment so that steady state gain information can also be obtained. Huang et al.
(1 996) point out t hat, while simple autot uning met hods are reasonable for Ziegler- Nichols
t uning , the performance of model-based controllers and integral performance cri teria are
sensitive to inaccurate estimates of the delay to time constant ratio. In this case, 6rst order
plus delay parameters are more accurately estimated using time domain expressions for a
biased relay experiment .
The Discrete Fourier ~ a n s f o n n (DFT) is an alternative which has been applied by
Lundh and Astrom (1994) in automatic initialization of adaptive control systems. Fast
Fourier Transform (FFT) methods are suggested by Chiu and J u (1997) for fkequency do-
-
main based performance monitoring of the complementary sensitivity funct ion. Khan (1995)
fit pararnetric transfer function models wit h fkequency response points t hat were ident ified
by ushg Frequency Samphg Filters to isolate the k t harmonic fiequency response of the
relay experhent.
1.2.5 Transfer fimction identification
Fitting a transfer function model normally requires an estimate of severai frequency response
points. Since the Astrom-~aglünd Autotuning experirnent provides oniy one point, the
identification literature contains many papers that look at ways to generate additional
frequency informat ion. These met hods collect mdtifi-equency data via a series of modified
relay experiments, each of which alter the excitation frequency through the placement of
different, known dynamics inside the feedback loop. For example, Haggliind and Astrom
(1991) have suggested the possibility of identifying multiple points on the Nyquist curve
through the addition of an integrator into the relay feedback loop. Individuai fkequency
response points are sequentially identified through repeated application of the DFA to each
periodic data set, and a transfer function may then be fit using these points.
In a few cases (Sdé and Astrom, 1991; Shen et al., 1996; Wang et al., 1997), unsym-
metrical or biased relay data has b e n used to provide additiond information about the
gain. Sallé and Astrom (1991) presented the method of moments as a means of estimating
the steady state gain fiom unsymmetrical, periodic relay data. The Dual Input Describing
Function, which is an extension of the DFA, has also been used for this purpose by Shen
et. al. Given unsymrnetricai periodic data, two frequency response points may be identified
(i.e. the gain and critical point). Considering that deadtirne is often estimated fiom the
initial process response, there can be enough information to fit a transfer function model
from a single modified relay experiment.
Luyben (1987) extended the A s t r o m - ~ a ~ ~ l ü n d autotuner to the multivariable case for
nonlinear distillation colilmns. This work required oniy one relay experiment, but assumed
that the process gain was aiready known, or could otherwise be obtained. This method
was developed further (Li et al., 1991), such that the gain requirement was replaced by
information korn a second relay experiment where additional delay was added to the loop.
In both of these papers, a series of possible model structures were applied to the data. Each
-
rnodel then had to be evaluated and compared with other models to deterrnine which was
best.
The above methods produce more useful transfer models, but require the user to either
impose a model structure (Wang et al., 1997; Sailé and Astrom, i W l ) , or to fit a whole
range of modeh (Luyben, 1987; Li et al., 1991; Chang et al., 1992) and then develop some
method for evaluating which one is the %ruen model. The main disadvantage with this
approach to m o d e h g is that, in addition to errors which may have ben introduced by the
DFA, and the effort involved in selecting the model structure, there is dways further risk
of inaccuracy due to model structure mismatch.
1.3 Outline of the Thesis
The remainder of this thesis is organized as follows. Chapter 2 discusses the role of the FSF
algorithm in the development of a new multifrequency relay experiment. Key design issues
surrounding the new identifkation procedure are explained in Chapter 3, where a selection
of simulation case studies are provided. A recursive least squares (RLS) implementation of
the FSF algorithm is introduced in Chapter 4. Hem, a prototype designed with LabVIEW
software, is also presented. This program combines the new relay experiment with the RZlS
algorithm to provide a methodology for on-line step response identification. Experimental
results obtained by applying this prototype to a pilot-scale stirred tank heater are also
included. Finally, conclusions and recommendations are given in Chapter 5.
-
Chapter 2
Frequency and Step Response Identification from Relay Data
An automated, closed loop approach to frequency domain identification is introduced in this
chapter. Frequency domain rnodel parameters, fkom which a step response model may be
constructed, are estimated via the Frequency Sampling Filter (FSF) algorit hm developed
by Goberdhansingh et al. (1992). The FSF algorithm combines a standard least squares
estimator with the FSF model structure, and requires a multifiequency spectrum of input
excitation which, for a large class of systems, rnay be generated automatically by a modified
relay experiment . This chapter is organized such that Section 2.1.1 describes the FSF/PRESS identin-
cation algorit hm. Section 2.2 explains the deveIopment of the proposed relay experiment
which places additional dynamic elements into the feedback loop in order to create a broad
spectrurn of excitation. Section 2.3 deah with the issues surrounding application of the FSF
algorithm to data obtained fiom the new experiment.
2.1 Frequency Sampling Filter Algorithm
The FSF model, fmt introduced to the area of process ident *cation by Bit mead and Ander-
son (l98l), is obtained fiom a Linear transformation of the familiar Finite Impulse Response
(FIR) model. Therefore, any linear, time invariaot process which may be described by N
F R coefficients rnay be represented equivalently by N fkequency response coefficents. The
FSF model is comprised of a series of N pardel band-pass filters which act on the process
input signal. The filter outputs are then weighted by their corresponding fiequency re-
-
sponse coefficients and summed to form a predidion of the process output. The FSF model
carries two important advantages over the FIR model. Firstly, the fkequency domain repre-
sentation allows for truncation of high bequency parameters, which often have a negligible
contribution to the ove rd process step response. In most cases, the reduced FSF model
order is much smaller thaa that of the equivalent FIR model. Secondly, the remaining
FSF model parameters are often estimated more accurately because truncation of the high
fkequency parameters improves the condit ioning of the least squares estimation problem.
2.1.1 F'requency sampling filter model
Consider a linear, time invariant, stable process which may be described by an Nth or-
der FSF or FIR model. For a stable process with settling time
characterized by the impulse response coefficients of the process
N-L
where r-' is the backward shift operator and for a given sampling
order, N, is selected as N = T,,JAt. It is assumed that hi O for
Tset, the FIR model is
i n t e d , At, the model
al1 i 2 N
The FSF model is derived by substitut ing the following inverse discrete Fourier transform
(DFT) into Equation 2.1:
Interchanging the siimmation signs and noting t hat
we c m describe the FSF model as
where r ~ k = 27rklN rad, k = O, f 1 , . . . , f ( N - 1)/2- A generd process model which describes the relationship between the input signal, u(t)
and the process output, y (t) , is t herefore
-
Figure 2.1: Schematic Diagram of the FSF Model
The schematic diagram of the FSF model structure in Figure 2.1 illustrates how the
input signal, u(t) , passes through N parallel band pass filters and is weighted by the process
frequency response, G(eJWk ) , at each filter% centre frequency, wk. The sum of t hese weighted
frequency components forms the prediction of the process output, y (t ) .
An important advantage of using the FSF model structure over the FIR model is that
the transformation fiom the time domain (Fm) to the frequency domain (FSF) pemits truncation of the mode1 order. When dealing with the fiequency domain model; a reduction
in the number of parameters corresponds to the exclusion of high fiequency filters. Model
reduction in this sense is beneficial, since we are only considering stable processes, whose
high fiequency response is strongly attenuated and often subject to an unfavourable signal
to noise ratio. The reduced FSF model is written as foliows:
Here, we have introduced the effective model order, n, with the assurnption that ~ ( d " )
is negligible for 9 < Ikl 5 9. The issue of how to determine the best model order is
-
addressed later in this chapter, when the PRESS algorithm is introduced.
2.1.2 Step response models
In process control applications, it is often desirable to express the process response as a step
response model, rather than a frequency response model. A step response model is e a d y
obtained by substituting Equation 2.2 into the definition of the step response coefficients,
gm, m = O, l..., N - 1:
Interchanging the summaticns, and not ing t hat
the step response coefficients may be expressed as a weighted s u m of the fiequency response
coefficients:
where
Wang and Cluett (1997) have shown that reduction of the FSF model order is justified by
examining the contribution of the high fiequency parameters to the overall step response
model. For the zero fiequency, S(0, m) linearly increases from 1/N to unity as m goes
fkom O to (N - 1). For k > 0, the step response weighting hinction, S(k , m), can be broken into two separate terms which operate on the real and imaginary parts of G(eJ").
The magnitude of both the red and imaginary weighting functions decreases as frequency
(k) increases. Clearly then, G(elwo), is the most important parameter, and subsequent
higher kequency response parameters becorne less and less significant. The fact that the
step response weighting functions de-emphasize the high fkequency parameters allows for a
significant reduction in the FSF model order without a significant loss of accuracy.
-
2.1.3 Formulation of the least squares problem
Consider again Figure 2- 1, the block diagram of the FSF model structure. The set of filter
outputs at sampiing instant t form the elements of the data vector #(t) , d e h e d as
for the reduced FSF model. More specificdy,
where 4k(t) represents the output of the kth FSF filter, Hk(z):
A weighted sum of the elements in 4 provides a prediction of the process output as
foUows. A general process model may be written as
where v(t) represents the disturbance effect. The process may be expressed as a reduced
FSF model by combining Equation 2.14 with Equations 2.6, and 2.12:
If the data set spans M sampling intervals, then Equation 2.14 may be expressed in
matrix form as:
Y = @ Q + V
w here,
-
Therefore, a standard least squares estimator, based on the data matrix, a, and the process output signal, Y, yields a set of n parameters which correspond to each 6iter7s
contribution to the overall step response. These weights are contained in the parameter
vector, 8, and are simply the frequency response coefficients, G(e""k), which collectively
describe a kequency response model of the process.
Equation 2.16 is thus solved for 0 by minimizing the sum of squared prediction errors,
This yields the standard least squares solution of the FSF parameter vector:
2.1.4 PRESS statistic for mode1 order selection
The PRediction Error Sum of Squares ( P R E S S ) statistic is used as an indicator of model
quality. It is defined by 1 w - 1
PRESS = 1 e2, where e,t are the PRESS residuals:
The PRESS residuals, e-t7 are computed boom &, the FSF parameter vector which
waç estimated by excluding the data y ( t ) and $(t). This data is excluded from the analysis
to ensure that y ( t ) and ij(t) will be independent of each other, a property of the PRESS
which is essential for model validation. By contrast, the conventional residuals are defined
Since y(t) and &(t) in this case are dependent variables ( y ( t ) and $(t) are used to estimate
8), the conventional residuals are merely an indication of the quality of the model fit for
16
-
the rnodelling data set and do not imply anything about the model's overd predictive
capabiiity. The PRESS statistic is evaluated for a range of Werent FSF model orders,
and the reduced model order, n, is chosen such that the PRESS is minimiad. Wang and
CIuett (1996) have shown that computation of the PRESS residuals is simple when using
an orthogonal decomposition algorit hm.
2.1.5 FSF/PRESS algorithm
With the standard least squares algorithm in Equation 2.22, it shouid be noted that the
parameter estimates WU be consistent if the disturbanceo v ( t ) , and input. u(t ) : are uncor-
related. This is generdy not the case for closed loop experiments. However, in the case of
a relay experiment, a hysteresis is typicdy included in the relay to remove this correlation.
This technique wiil usudy work if the disturbance is stationary. However, in the presence of
drift ing disturbances, correlation may be present , causing bias in the parameter estimates.
For these reasons an extension of the original algorithm proposed by Goberdhansingh et al.
(1992) was developed by Patel et al. (1997). This algorithm is an iterative version of the
FSF/PRESS algorithm which simultaneously estimates process and disturbance modeis.
The algorithm is outlined as follows:
Step 1: Prefilter the inputfoutput data with the inverse of the curent noise mode1 (skip
this step the first time through)
Step 2: Estirnate the FSF parameters using the prefiltered data (similar to the original
algorit hm)
Step 3: Estimate a new noise model £iom the residuals
Step 4: Repeat steps 1 through 3, until the model has converged
Since this algorithm includes proper data prefiltering, the resulting model is assumed
to be unbiased. This dows statisticd confidence bounds to be calculated based on the
cowiance of the parameter estimates. Based on the assumption that the fltered residuals
are white, Cluett et al. (1997) have derived expressions for the confidence bounds around
the model estimate within which the true fkequency and step response lie.
-
2.2 A New Relay Experiment
In Chapter 1, it was mentioned that additional dynamic elements could be introduced into
the relay feedback loop to influence its behaviour. Relay dynarnics wil l now be reviewed,
and used to motivate the development of a new relay feedback experiment to create a
nonperiodic, multifrequency input signai that is well suited to the estimation of an FSF
model. This experiment is simple to implement, requiring almost no prior knowiedge of
the process to be identiiied. It should be noted, that with the new experiment, model
estimation is not restricted to the FSF model structure. The data generated kom the new
experiment could be used with any other model structure.
2.2.1 Relay dynamics
To try and obtain mcre information than just the critical point of the process, many varia-
tions on the Astrom-~a&ünd autot uning experiment have been proposed to provide addi-
t ional hequency informat ion. T hese met hods typicaily involve a modioied relay experiment ,
in which the excitation fiequency is altered through the introduction of a known dynamic
element into the feedback loop.
Figure 2.2 illustrates how some common dynamic elements inauence the fiequency of
the process response. The standard relay experiment excites the process at its critical point,
which is located at the intersection of the Nyquist plot and the negative real a&. This
corresponds to a phase iag of 180 degrees. In practice, a hysteresis is normally included in
the relay to avoid random switches generated by the output noise. The hysteresis produces
excitation at a slightly lower frequency than that observed with a pure relay. Similarly,
the use of additional delay (ive. in addition to the natural deadtime of the process) in the
feedback loop also shifts the frequency response to a point below the critical frequency. Both
delay and hysteresis allow the excitation fiequency to be lowered arbitrarily. according to
how much hysteresis or deiay is applied. In contrat, the addition of an integrator produces
a f ied 90 degree phase shift, such that the identified point always lies at the intersection
of the negative imaginary axis and the Nyquist plot.
-
Standard Relay Hysteresis rn Delay A Integrator 4
Figure 2.2: The Infiuence of Additional Dynamics on Excitation F'requency
2 - 2 2 Proposed experiment
Both the standard relay and integrator plus relay experiments are attractive because they
are able to generate fiequency information at specific points on the Nyquist plot. Therefore,
in the development of the new experiment it was decided that the standard relay and inte-
grator plus relay experiments would be combined in order to ensure a good rnultifrequency
input signal that did not require prior knowledge of the process. The fixed phase shift
obtained from an integrator ensures that the low fkequency range is targeted. While other
dynamics (e. g. delay, hysteresis) could be used to accomplish similar effects, it is difEcult
to determine in advance the quantity of delay /hys teresis required to produce the desired
effect.
In a standard relay experiment, the switches are triggered by zero-crossings of the error
signai. When an integrator is introduced to the loop, the relay is instead triggered by
zero crossings of the integrated error signal. The proposed experiment combines t hese two
individual experiments by alternating between the two different paths indicated by the
dashed lines in Figure 2.3. In other words, the new input signal is generated by alternating
-
Figure 2.3: Block Diagram of the Proposed Experiment
between having some input switches triggered by the feedback error, and ot hers triggered
by the integrat ed feedback error.
The overall effect of turning the integrator on and off (Le. alternating between the
integrated and non integrated paths) is to create a nonperiodic input signal and, in a sense?
"sweep" through a portion of the Nyquist plot (see, for example, Figure 2.4(a)). This input
(relay output) is seen to be a binary signal which consists of a combination of faster pure
relay switches and slower integrated relay switches, plus some transient switches of ~ s y i n g
lengths. The standard relay experiment predominantly yields information about only a
single fkequency because the data ( s e Figure 2.4(b)) is periodic. On the other hand, the
new relay experiment yields a data set that contains information at several hequencieso and
is suitable for anaiysis with the FSF algorithm.
2.2.3 Experirnental design
At fist glance, the new input appears to be much like a random binary signal (RBS).
However, in the new experiment, the relay output is automaticdy triggered according to
the process response. In fact, the experirnental design reduces to the specification of when
20
-
tirne(s8c)
(a) Nonperiodic Data Erom the New Experiment
(b) Periodic Data fkom the Standard ReIay Experiment
Figure 2.4: Cornparison of Data Generated fkom the New and Standard Relay Experiment
-
and when not to apply an integrator. Ln other words, the user is only required to specify a
sequence of boolean values which indicate whether or not the integrator is present during a
particular switching interval. Letting 1 denote the presence of the integrator, and O denote
the absence of the integrator, a sample input sequence is [O O O 1 1 1 1 1 O 1 1 O 1 O 1 O O].
For the most part, any input sequence is reasonable, so long as it contains a mixture
of zeros and ones. That having been said, there are a few guiding principles. Recall,
that the main objective behind the input sequence is to automaticdy produce a process
input signal with a bmad spectrum (Le. a nonperiodic signal), and emphasis on the lower
hequencies. Conventional relay experiments give only one fkequency point because they
discard transient data and analyse only the periodic portion of the data set. The new
relay experiment instead tries to maximize transients which create a diverse multifiequency
spectnun. The new experiment ais0 places an emphasis on obtaining good low fkequency
information, which is important for obtaining a step response mode1 with an accurate
estimate of the steady state gain.
For exampIe, a series of consecutive integrated switches can, on its own, provide a
great deal of fiequency information. The reôson for this is that, during the first three to
six integrated switches, there is a transient period where the switching interval gradually
increases. The initial switches therefore provide a range of middle and hîgh fiequency
information and when the transient dies away, a low fiequency limit cycle results. Hence,
to emphasize the lower fkequencies, it is necessaq to ieave the integrator in the loop for
at least three to six switching intewctls. Zn the absence of the integrator, the transient
period is brief (usuaily no more than about two switches) and the relay quickly settles into
a high kequency limit cycle. Series of non-integrated switches should therefore be present,
but perhaps fewer in nirmber, due to the fact that they produce only a smaU amount of
transient data, and generally provide less important high frequency information. Additional
diversity in the switching intervals can be obtained by alternating frequently between the
two possible feedback paths. The feedback path is changed only as the error or integrated
error signal crosses the hysteresis Limits. When this changeover occurs there will be a
discontinuity in the signal used to trigger the relay. This can create some extra variation
in the switching frequency and further enrich the input spectrum.
A set of input sequence guidelines are now presented to siimmarize the above ideas. Note
-
that these guidelines are not based on any prior knowledge of the process to be identified,
but rather, they are based on the idea that, for stable processes, it is generally desirable
both to create a wide range of spectral information, and to emphasize the low fkequency
components that are essential for a reliable estimate of step response model.
Input Sequence Guidelines:
* Empbasize the presence of the integrator
rn Avoid long series of non-integrated switches (no more than three switches in a row)
rn Use long series of integrated switches (three to six switches in a row)
0 Include a series of mixed switches (i. e. [ 1 O 1 O O 11)
2.3 Application of the FSF Algorithm to Relay Feedback Data
The conventional approach to analysing periodic relay data involves application of the DFA
to identify a single point on the Nyquist plot. As described in Section 1.2, this type of
approach to obtaining a transfer h c t i o n model may involve several relay experiments and
may be subject to various assumptions, approximations, and model fitting criteria. Since the
data collected from the new experiment contains signincant multifrequency information, the
DFA is no longer an appropriate anaiysis tool. However, through direct application of the
FSF algorithm from Section 2.1.1, a frequency response model may be accurately identilied
and used to construct a versatile step response mode1 of the process. The only information
required to construct the FSF model is an informative data set and an estimate of? N : the
process settling time. This section will verify that the modified relay experiment is able to
automatically provide the informative data set.
2.3.1 The desired input spectrum
The new experiment automatically generates the process input signal by using the re-
lay to detect appropriate switching intervals £rom the observed process response. Fig-
ure 2.5 presents simulation data fiom two ditferent processes using the same input sequence:
[O O 1 1 1 O 1 O 1 O O 11. The shape of the two data sets are very similar, t hough experiment
(b) runs about three times longer than experiment (a). Clearly, each process in conjunction
23
-
- O 10 20 30 40 50 60
time (sec)
(a) Process ModeI: G(s) = &
-21 I , I I I O 50 100 150 200
time (sec)
e-l. (b) Proceis Model: G(s) =
Figure 2.5: New Relay Experiment Applied to Two Different Models with Identicai Input Sequences: [O 0 1 1 1 0 1 0 1 0 0 11
-
with the relay experiment has created an input signal specific to the time scde of its own
dynamic response. The question rem- as to whether or not the generated input signal
fkom this generic input sequence produces a range of fkequency information that is desirable
with respect to ident-g an accurate FSF model.
R e c d from Section 2.1.1 that the key parameters of the FSF
set of harmonic fkequencies
27r 47r 67r Sn (n - l )?r wk = O? &-, &-, k-, *-?. . . *
cet Tse t Tse t Tset T'et
model correspond
radltime
to the
(2.28)
The first few FSF frequencies are most significant in terms of their contribution to the
process step response. Moreover, in terms of control applications, a good estimate of the
process frequency response at w t = O (i.e. the steady state gain) is important. The ideal
FSF input signal is therefore one which has good kequency content at each wk in Equation
2.28, and ernphasizes the spectral components which correspond to the centre frequencies
of the first few filters.
Consider the Nyquist plot of Figure 2.2, whieh previously iilustrated the fkequency
response points that are identifiable under relay feedback with and without additional dy-
namics in the loop. Notice that the point identified by the integrator-plus-reIay experiment
is always Iocated at the intersection with the negative imaginary axis, and the point identi-
fied by the pure relay is located at the intersection with the real axis. It has been observed
through a number of case studies (Chapter 3) that the centre fkequency of the first FSF
Hter, wl = 2n/TSet, often falls in the neighbourhood of the negative imaginary axis. Inte-
grated switches therefore serve to emphasize low frequency content in the frequency range
picked up by the first filter. Higher FSF frequencies, which are distributed dong the Nyquist
plot towards the negative real axis and beyond, correspond to the fkequency information
obtained fkom transients and plain relay switches.
2.3.2 Properties of the FSF correlation matrix
In order to obtain an accurate mode1 it is essential that the data set be informative at aU of
the "important" frequencies. F'ortunately, the correlation matrix, a* a, offers an indication as to the quality of the input excitation. Recd that the kth col- of the data matrix, @
(see Equation 2.19), corresponds to the output of the kth FSF filter, whose centre frequency
-
I k Ith Fitîer
Figure 2.6: A Typical FSF Input Spectrum Obtained fiom the Proposed Experiment: input sequence [O O O 1 1 1 1 O 0 11
is wk. The diagonal elernents of @*a are representative of the amount of input signal energy at each of the important FSF fiequencies because they are proportional to ( U ( e J W k ) ( * , the
periodiogram of the input signal at those fiequencies (Wang and Cluett, 1997) :
A plot of these diagonal elements (the "FSF spectrum") provides an approximation of
the input signal spectnun at the fkequencies Wk7k = 07kll&Z, ... ? i ~ ( n - 1)/2. The FSF
spectrum will prove to be a useful indicator which can be used to assess and, if necessq,
shape the input signal in order to obtain the desired fiequency content.
A standard relay experiment generates periodic, first harmonic dominant process input
data. In this situation, there is not enough diversity in the input spectrum to support more
than about one or two pairs of FSF filters. The input signal in this case would produce a
@*@ matrix with essentially only one dominant diagonal element.
In contrast, the new experiment7s input spectrum is rich over a wide range of fkequencies.
Figure 2.6 illustrates the shape of a typicd FSF spectnrm that results kom a mixed input
sequence. Strong spectral components in the low and middle fkequency range, corresponding
to large diagonal elements in the @*@ matrix (especially at the filters corresponding to
-
lkl = l? 2)? con6rm that the excitation is broadly distributed.
2.3.3 Choice of the parameter iV
The nature of the FSF mode1 applied in this work ailows the user to fit a mode1 with only
a minimum amount of prior knowledge about the process. The only required information
in this approach is an estirnate of N (the settling time in units of sampling intervals).
More importantly, this single piece of information is only required after the data has b e n
collected, allowing the user to adjust this parameter off-line to find the %estr results.
Another approach is to try and estimate N directly fiom the experiment itseif. The
reader will r e c d fiom Section 2.2.3 that the integrator plus relay switches have a long
transient period that often settles, after several switches, into a E t cycle with a period
of approximately N sampling instants (fiequency of 2x /N rad). A reasonable starting
estimate of N/2 can therefore be taken as the duration of the third or fourth consecutively
integrated relay switching intenml.
2.4 Experimental results
Thus fa., the new identifcation method has b e n motivated and discussed in a qualitative
sense. Preliminary results are presented here to summarize the above discussion and demon-
strate the method's capabilities via an experimental case study. This example is intended
simply as an illustrative result. huther simulation work and experimental results will be
presented in Chapters 3 and 4 to provide a more thorough evaluation of the method.
The new relay experiment was performed on a pilot scale stirred tank heater (STH)
apparatus (see Chapter 4 for more details on the STH process). This process consists of
a continously stirred water tank which contains steam coils. Cold water enters the tank,
is heated by the s t e m coils, and is then purnped out through a long piece of piping. A
Ievel controller maintains the tank level at a steady d u e (22cm in this experiment) by
manipulating the inlet water flowrate. The STH has approximately first order plus delay
dynarnics, where the manipulated input is the steam valve position, and the process output
is the temperature of the water exiting the tank, measured by a thermocouple placed in
the outlet pipe. Experimental results were obtained by setting the relay amplitude and
hysteresis width to be d = f 5% and t = 0.25"C, respectively. The input sequence was
-
[ i l 1 i O l l O O ] .
Figure 2.7 shows the input/output data fkom t his expriment. Approximately three
settling t h e s of data were coilected for analysis with the FSF/PRESS algorithm described
in Section 2.1.5. The settling tirne of the STH was initiaily estimated as N = 600 sec, based on the duration of the third consecutive integnted switching interval, which begins
at about t = 350 sec (the k t switch was so rapid that it was neglected). This estimate of
N yielded a step response estimate that seemed to settle out a Little faster than 600 sec,
and so N was adjusted to 570 sec. The diagonal elements of the correlation matrix (see
Figure 2.7(b)) were exaLzLined to evaluate the frequency content of the input signal. The
FSF spectrum seems to have a desirable peak in the Low frequency range, as well as good
information at aU fiequencies. The mode1 was restricted to a maximum of eieven filters
(n = 11). The fkequency and step response models shown in Figure 2.8 were found to be in
good agreement with expectations based upon past experience with the process. The 99%
confidence bounds on step response also indicate that the mode1 is reasonably accurate.
It is &O interesting to note that, in Figure S.B(a), the FSF fkequencies, wl and wl, are
located quite close to the negative imaginaq and negative real axes, respect ively. This shows
t hat one of the key assumptions of the experimental developrnent holds for t his process (i.e.
that the integrator plus relay and standard relay experiments generate information in these
regions). En ter- of the step response developrnent, these kequencies are two of the most
important components of the input signal. The transient data, obtained by combining
the relay and relay plus integrator experiments into one new meriment: &O provides
additional information about the gain and higher kequencies. The results show t hat , overail,
the new relay experiment provides good excitation for step response identification in this
case.
-
1 1 1 1 I L
O 200 400 600 800 Io00 1200 1400 1600 Time (sec)
(a) Input/Output Data
t 2 3 4 I k Ith Aller
(b) The FSF Spectrum
Figure 2.7: Experirnental Results for the STH
-
I 1 I L I I 1
O 0.1 0.2 0.3 0.4 0.5 0.6 Red
(a) Fkequency Response Model (Nyquist plot)
(b) Step Response Model
Figure 2.8: Identification Results for the STH
-
Chapter 3
Further Design Issues and Case St udies
Introduction
This chapter will address some firrther design issues for the new relay experiment, such as
the effects of deadtime, noise modelling, and choice of the FSF parameter, N. Each of these
issues will be separately motivated and discussed. The ha1 part of this chapter presents
several illustrative case studies, from which many of the key design issues were originally
ident ified.
3.2 Characteristics of Processes with High Critical F'requen-
The relay signal is triggered according to how quickly or slowly the process variable responds
to the input signal. It is this characteristic of the relay which provides us with a closed
loop experiment, and produces an input signal that depends on the particular process under
examination. The new relay input experiment has been designed to generate oscillations
which occur at the crossover frequency and at the fkequency where the Nyquist curve in-
tersects the negative imaginary axis. For some processes, the new experiment will generate
very fast oscillations t hat may not be useful for obtaining an accurate step response model.
One class of systems that produce this kind of behaviour are fist order plus delay processes
where the deadtime is s m d relative to the time constant.
Consider the simulation results presented in Figure 3.1. These data sets were obtained
using the same input sequence on two s i d a r first order models. Note that the time con-
-
-2 1 I I I 1 1 O 200 400 600 800 1ûûû 1200 1400
Time (sec)
-21 t I I 1 O 500 1000 1500 2000 2500
Time (sec)
Figure 3.1: New Experiment Appiied to Swo Fust Order Models with Dinerent Deadtimes (input sequence [O O O 1 1 1 1 O O 1 0 1 1 1 O])
-
Figure 3.2: A Cornparison of FSF Spectra for Data in Figure 3.1
-
Figure 3.3: The
5 sec deadtirne 25 sec deadtirne 70 sec deadtime
-0.8 I 1 -0.5 O 0.5 1
Real
Effect of Deadtime on the F'requency Response of First Order Relay Dy- namics (AU time constants are 100 sec. The FSF frequencies are shown by o,*,x,+.)
stants for these two processes are identical (100 sec) and their settling times are close (525
and 570 sec). The only difference between these models is the amount of deadtime. Based
on the assumption that the relay switching intenml is related to the time scale of the process.
it might be expected that these two experiments would yield similar data and, therefore,
similar FSF spectra. Yet, a comparison of the two data sets in Figure 3.1 shows a remark-
able difference between the duration of the two experiments. Also notice the Merence in
the shape of the two graphs of Figure 3.2, which show the distribution of input energy across
the FSF filters. Figure 3.2(b) (the more sluggish process) has most of its energy at the h s t
and second pair of filters, while Figure 3.2(a) has more energy at the second and third pairs
of filters. The overall energy distribut ion is also quite different. The input energy generated
by the slow process is concentrated at the low kequencies, wMe the faster process creates a
spectrum that is richer across a wider range of fkequencies. Obviously, the only factor that
can account for this unexpected behaviour is the amount of deadtime in the process.
The reason for this is that the crossover fiequencies for these processes are very different ,
and therefore yield very dinerent relay generated excitation. This effect is studied more
closely in Figure 3.3. These plots represent the frequency response of a first order process
with w i n g amounts of deadtime. As a reference, the location of the first several FSF
-
frequencies have been indicated on each plot. As deadtime decreases fkom 70 to 5 sec,
the crossover frequency moves kom the neighbourhood of w:! to the neighbourhood of wzs-
The case with no deadtime at ail, WU not oscillate under relay feedback because, even at
very high fkequencies, a pure k t order process never attains a phase lag of 180 degrees.
Since deadtime contributes to the phase lag, it is instrumental in determinhg the crossover
frequency. As deadtime increases, the crossover is pushed to a lower frequency range, and
the new relay input signal behaves more idedy with respect to the frequency content that
is desired for step response identiiication. In addition, the magnitudes of the Nyquist plots
in Figure 3.3 also predict that processes with high critical fiequencies will tend to respond
to a relay experirnent with s m d output amplitudes.
Clearly then, there is a concern that a fust order process with srnail deadtime might
generate an input signal that is deficient in low Erequency information. It is therefore
necessary to consider these processes in more detail, with the idea of modifjring the relay
experiment so that it wiU provide good low fkequency excitation for this special case.
3.3 The Influence of Delay on the FSF Spectrum
3.3.1 First order processes
The previous example has shown that process deadtime is an important factor in deter-
mining the type of input excitation obtained from the new reIay experiment. This section
analyses the iduence of delay in more detail. More specifically, the following results will
demonstrate that it is ac tudy the nonnalizeà deadtirne, R, defined as the ratio of the
deadtime and the time constant, which determines the fkequency content of the excitation
obtained fkom the new experiment . Consider a first order plus delay process described by the transfer function
The settling time of this process is estimated as
At this stage, we select an arbitrary frequency, W i , definecl by
-
where i , referred to as the frequency index, can take on the vdue of any red number.
Combinîng Equations 3.3 and 3.2, fiequency may now be given in terms of the norrnalized
deadtime, R = T&:
The phase shift of the process at this arbitrary frequency is therefore
Clearly, phase shift in this case is a function of two variables: frequency (determined by
i) and normalized deadtime (R). Since a process under relay feedback oscillates with a h e d
phase shift, R is the o d y variable that determines the oscillation frequency index number,
i. Therefore, by taking the phase shift as -r rad, and given R as a property of the process,
Equation 3.9 can be solved for the crosswer fiequency index number. This explains why
the relay swi t ching fiequency is de termined soley by normalized deadt ime. S imilarly, the
frequency index number for the integrator plus relay experiment can be solved from the
following equat ion:
In Sections 2.3.2 and 2.3.1, it was establiçhed that a desirable input signal shodd con-
tain strong information around the first two FSF filters. For the new experiment, i t is
therefore desirable that the fundamental fiequency of the integrator plus relay experiment
will be approximately equd to the fbst FSF frequency. With respect to Equation 3.10, this
means that if the index number, i, for the integrator plus relay experirnent is less than or
approximately equal to one, then the input signal generated by the new experiment wiil
contain sufEcient low fiequency excitation. A range of R d u e s for which this assumption
holds can be established by combining the phase shift of the first FSF frequency,
-
relay+integrator
- - ideal (FSF) period
Figure 3.4: A Cornparison of the Observed and Ideal Normalized Period for First Order Models
with the phase shift of an integrator plus relay experiment (Equation 3.10). That is, an
"ideal" R value is one which satisfies
Although an approximate range of ided R values could be established by solving Equa-
tion 3.12 numerically, we choose here to graphicdiy dernonstrate the range of ideal R values,
for which the actual and desired oscillation periods are similar. Let Pl be the desired oscil-
lation period associated with the fundamental FSF frequency, wl = 27~/T,,~:
A general relationship between R and the desired normalized oscillation period may be
In order to identify the range of R values for which a relay feedback system produces
desirable excitation from the perspective of an FSF model, a number of simulations were
performed using first order models with R values raaging kom O to 2. These simulation
results are shown in Figure 3.4, dong with the dashed curve representing the desired nor-
malized oscillation period that is d e h e d by Equation 3.14. Consider the integrator plus
-
relay curve, compared with that of the desired normalized oscillation period. The curves
intersect at R = 0.6, indicating that for R < 0.6 the relay pius integrator experiment wiil generate an oscillation with a period that is less than the desired period (Le. an oscilla-
tion that is faster than the ided FSF &equency). For R > 0.6, the observed oscillation is slightly slower than the desired FSF fiequency, and thus gives adequate infurmation about
the low frequencies. The fact that the standard relay curve lies beneath the desired curve
for all R dues, confirms that the integrator is essentiai for obtaining good low frequency
informat ion.
Now that R has been isolated as the determining factor for the fiequency content of
the relay signal, it is clear why the FSF spectra varied disproportionately between the two
examples presented at the beginning of this chapter (Figure 3.1). The R values of these
examples were 0.25 and 0.70. Referring back to the spectral distributions in Figure 3.2, it is
ciear that the one with the smaller R value of 0.25 oscillated too quickly and was therefore
not rich in kequency content at the fkst filter. In contrast, the process with the Iarger R
value of 0.70 produced more low kequency information near the centre frequency of the
fkst filter.
3.3.2 Second order processes
Up until now, this chapter has dealt exclusively with 6rst order processes. If desired,
the andysis could be extended to include other types of processes such as second order
systems. This is not necessary though because higher order processes typically react to
change with a more sluggish initial response than fnst order systems. For instancet before
delay effects have even been included, the phase versus fkequency profile of a pure second
order model drops off much faster than it does for a first order model. This means that the
critical fkequency of a high order process is naturdy located in a lower fkequency range-
Therefore, it is not surprising that most processes are not nearly as sensitive to deadtirne
issues as in the h s t order case.
To c o b this statement, consider the observed and ideal periods for the criticdy
damped second order case, which can be derived similady to the first order case above.
By redefining the process settiing tirne as Tset x 77 + Td, Equations 3.14 and 3.12 can be
-
relay + integrator
- - ideal (FSF) period
01 I 0 Y 1 I I I 1 O 0.2 0.4 Ob 0.8 1 1.2 1.4 1.6 1.8 2
Nomaiiied Deadtirne, R
Figure 3.5: A Cornparison of the Observed and Ideal Normalized Period for Second Order Critically Damped Models
redefined for a second order criticaily damped process:
The results in Figure 3.5 show that, for this case. the h t FSF fkequency fi& between the
standard relay and relay plus integrator curves for a.li values of R examined. Except for
very s m d R values, the integrator plus relay oscillations will occur at a kequency t hat is
slightly lower than desired. Thus, for ahost all cases, the critically damped second order
model wiil generate good data for identification of an FSF model.
While it is important to recognize the issues presented in this chapter, it should be
emphasized that a large class of processes will satisS. the spectral guidelines as they were
presented in Section 2.3.2. However, for special cases where the critical frequency is high.
there is sometimes a need to consider a modified experiment which can enhance the low
frequency region of the input spectrum.
-
3.3.3 Effect of relay parameters on the FSF Spectrum
In practice, it is desirable to avoid any correlation between the process input and the noise.
Therefore, the hysteresis widt h is normdy selected to be about three times the standard
deviation of the noise. In addition, the relay amplitude is usually rninimixed in order to avoid
disniption in the plant. However, it is important to consider that, if the amplitude is too
s m d , there wiil be a poor signal to noise ratio and the presence of valve nodinearities may
becorne significant. Therefore, the relay amplitude should be set as srnail as is reasonably
possible given the constraints.
Fortunately, a conservative choice of relay parameters can often prove beneficial in terms
of providing sdiicient low fkequency e x i t at ion. The combinat ion of small relay arnplit ude
and large hysteresis width pushes the limit cycle to a lower fkequency. This effect is most
pronounced in processes that actually require additionai low fkequency excitation. As an
illustration of this effect, the simulations used to generate Figure 3.4 have been rerun with
an increased hysteresis width and are presented along with the original results in Figure
3.6. It is clear fiom the figure that an increased hysteresis width produces a noticeably
slower relay limit cycle for processes with small R values. As R increases, or if an integrator
is added, the effect of hysteresis becomes almost negligible. Consequently, it is generally
recommended that the relay parameters be chosen conservatively, so that for process with
srnail R values, the low frequency information wiil be enhanced.
These recommendations are confirmed in theory by the DFA of a relay of amplitude, d?
and hysteresis width, é:
The negative reciprocal of the DFA is a straight line parallel to the real axis:
The operating point of the limit cycle is located at the intersection of the process Nyquist
curve and t his line. The imaginazy part of Equation 3.18 t herefore determines the phase shift
created by the combined effect of the hysteresis and relay amplitude. Therefore, decreasing
the relay amplitude and/or increasing the hysteresis width is a simple way to enhance the
low frequency region of the spectrurn.
-
Figure 3.6: The Effect of Hysteresis on the Ultimate Period
3.4 A Modification to the New Experiment
As illustrated above, a conservative choice of relay parameters can help a process with a
small R value with respect to obtaining sufficient low frequency excitation. However, since
there are practical limits on how much these parameters can be adjusted, it is also worth
considering a modScation to the new relay experiment. A modified experiment is now
proposed which d o w s the excitation frequency to be manipulated via the addition of a
user-specified delay block into the feedback loop (see the block diagram in Figure 3.7). The
delay block is placed after the relay, in series with the process, so that the relay sees a
modified "process" (indicated by the dashed box in the block diagram) with an R value
that is larger than that of the real process. Fkom an identification perspective, the data
used to construct the FSF mode1 is still the actud process input and output signals.
A general approadi to implementing the modified experiment is given in the flowchart
of Figure 3.8. It is proposed that a few settling times of data be initially collected according
to the original proposal for the new relay experiment (i.e. no delay block is present). At
this point, the data may indicate whether or not additional delay is required. If the data
seems rich enough in low frequency information, the experiment may continue as usual.
Otherwise, the initial part of the data set may provide good medium and high fiequency
information, and the remaining part of the experiment can focus on using the delay block
-
Figure 3.7: Block Diagram of the Modified Relay Expriment
to obtain more low fkequency information.
There are several qualitative characteristics that are indicative of a process which might
benefit Çom the modified experiment. Rapid switching of the relay output is the most
obvious indicator. In this case, a s m d process output amplitude would indicate that,
either the process gain is quite small, or the switching frequency is too fast. For example, in
the case of a first order process, a switching frequency that is too fast c m often be identihed
by the sawtooth-like shape of the process response. If a good prior estimate of the settling
time is available, then the FSF spectrum itself will indicate any weak frequency components.
Finally, if the tail end of the estimated step response mode1 seems to wander or appears
"droopy" , then the spectrum may not have enough low frequency information. A drooping step response may &O be an indicator that the settling time estimate has been chosen too
large; but if it is reduced, and the step response still does not settle out properly, then the
relay is likely switching too fast and not generating sufficient low frequency information.
If needed, the delay block should be added such that the delayed integrator plus relay
switching in tends are approximately one half to one quarter of the settling t ime. Since this
-
I Start the new relay expriment with the basic mixed input sequence (Le. something like [ 1 1 1 1 0 0 1 0 1 ..-] ) 1 *
After 1 or 2 settiing times of data are coltected check to see if more Iow frequency information is necessary: - is the input switching npidly? does the p m e s s response have a srnail amplitude and resernble a choppy sawtooth signal? - is it known chat the process has a smdI amount of delay relative to the time constant?
1
Decrease amplitude andfor increase hysteresis. Cs Iow frequency information still needed?
YES
Continue with the mixed input sequence until enough data has k e n collected.
NO
With the inregraior acrivared. invoduce additional defay for 3 or 4 switches. Adjust delay until: - the switching interval is mughly half the settling time. - the pmcess output amplitude increases. and appears Iess choppy or sawtooth-Iike
If the delay is satisfactory. but more data is still required. then hold the additional delay constant. while returning to the mixed input sequen