Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Tools to troubleshoot processes

Michel Ruel P.E.


President, TOP Control Inc
4734 Sonseeahray Drive 49, Bel-Air St, #103
Hubertus, WI 53033 Levis Qc G6W 6K9
USA Canada
mruel@topcontrol.com

KEYWORDS
Process control, Oscillation, Cross Correlation, Auto Correlation, Power spectral density, Statistical
analysis, Loop Tuning, PID controller, Tuning Parameters

ABSTRACT
To identify if tuning parameters are appropriate, it is possible to use steady state data. The tools used
will detect valve problems, oscillations, response time and will provide an estimate of closed loop
response. Other tools will be used to analyze and tune loops; these tools will require process changes.
This paper will present tools using steady state data.

INTRODUCTION
The following tools are available in most process optimization software to troubleshoot processes using
steady state data:
Cross Correlation
Auto Correlation
Power spectral density
Statistical analysis

SAMPLING
Collecting the data is an important step and precautions are essential. The sampling rate should be fast
enough to see what is going on in the loop; the controller needs to sample faster than the loop can move;
hence the sampling time should be faster than the damped period of the loop or faster than the closed
loop time constant. One way to accomplish this and to minimize sampling error is to sample the loop at
a rate of 1/10th to 1/5th of the process dead time (1/10th or faster being preferred) when the loop is
tuned to reject disturbances. If the loop is tuned for set point changes, the sampling time should be faster
than the smallest time constant. Usually the data is collected through the control system; if the
bandwidth is sufficient, it is preferable to collect the data at the same period as it is processed in the
system.

Copyright 2004 by ISA-The Instrumentation, Systems and Automation Society.


Presented at ISA EXPO 2004, Houston, TX; http://www.isa.org
DATA
The streams of data used for analyze should contain enough information by having sufficient length. If
oscillations are suspected, the length should be at least 5 times the longest period. If disturbances occur
regularly, the data analyzed should contain many disturbances. On the other end, if the data analyzed
contains too much information, the problems could be hidden by long quiet periods.
It is important to analyze short and long stream before concluding.

CROSS CORRELATION ANALYSIS


Cross correlation analysis is used to measure interaction between signals and loops. Correlation
determines the degree of similarity between two signals. If the signals are identical, then the correlation
coefficient is 1; if they are totally different, the correlation coefficient is 0, and if they are identical
except that the phase is shifted by exactly 180 degrees, then the correlation coefficient is -1.
For example cross correlation is an efficient tool to match disturbance patterns in two or more signals.
Signals strongly correlated will have a coefficient close to 1 (or –1 if out of phase).
Cross correlation consists in sliding one signal over the other and calculate the correlation factor. This
value will be for d=0; delaying one signal over the other and recalculating the correlation coefficient for
each delay will produce a graphic where the Y value is the correlation coefficient for each delay. The X-
axis will vary from –d to +d where maximum delay is the length of time for the stream of data.
A vs B
If +, both variables
in the same direction
if B, A if AB

Confidence limits

if B, A if A, B
If -, variables
are opposite direction

If -, A is after B If +, B is after A If time window=300s,


cross corr window=-300s to +300s

Figure. 1 Cross correlation graphic


Figure 1 represents a cross correlation graphic. The X-axis goes from – time to + time. The Y-axis varies
from –1 to +1. Confidence limits are usually selected at 95%.
For example, if a flow loop has an impact on a pressure loop, the position on the graphic will represent
the direction of the effect. If the pressure increases when the flow increases, then it will be on the
positive side on the Y-axis. If the flow causes the pressure to increase, then it will be on the left side of
the X-axis; at the opposite, if the pressure causes the flow to increase, it will be on the right side of the
X-axis.
Figure 2 represents cross correlation between Flow and Pressure in a process. A peak appears implying
that these two variables are correlated. Since the peak is positive and on the right side, when flow
increases, Pressure increases and the impact is 199 seconds later.

Copyright 2004 by ISA-The Instrumentation, Systems and Automation Society.


Presented at ISA EXPO 2004, Houston, TX; http://www.isa.org
Flow vs Pressure

Figure. 2 Cross correlation of Flow and Pressure in a plant

AUTO CORRELATION
When the correlation is calculated between a serie and a lagged version of itself, it is called
autocorrelation. A high correlation is likely to indicate a periodicity in the signal of the corresponding
time duration.
Autocorrelation is also a way to determine if future depends on the present (or if present depends on the
past). If the control is perfect, future does not depend on the present. If the control is good, near future
will depend on the present but after a period of time, future is independent of the present.
Autocorrelation plots are useful to determine randomness in a data set. If random, autocorrelation
coefficients should be near zero for any and all time lag. If non-random, then one or more of the
autocorrelations should be significantly non-zero. When observing a process variable, the length of time
needed to be inside confidence limits represents the response time for the closed loop. Hence, without
bumping the process, one can find the response time assuming the disturbances are randomized.
In addition, autocorrelation plots are used in the model identification stage since the autocorrelation
graphic corresponds to the impulse response of the closed loop.
Autocorrelation also emphases the oscillation; the area under the curve is a good indicator of good
control.

Figure. 3 Autocorrelation of a level loop using different tuning sets


Figure 3 is an autocorrelation graphic for a level loop tuned differently. On the left side, the loop is
tuned sluggishly; on the right side, the loop is tuned aggressively. Response times are respectively 1100s
and 450s.

Copyright 2004 by ISA-The Instrumentation, Systems and Automation Society.


Presented at ISA EXPO 2004, Houston, TX; http://www.isa.org
POWER SPECTRAL DENSITY
The power spectral density, PSD, describes how the power (or variance) of a time series is
distributed with frequency. Mathematically, it is defined as the Fourier Transform of the
autocorrelation sequence of the time series. An equivalent definition of PSD is the squared
modulus of the Fourier transform of the time series, scaled by a proper constant term.
If the control is perfect, then all disturbances are instantly rejected, variance is minimized and
the PSD will be white noise. White noise has a PSD where all frequency components have the
same amplitude (equally distributed). In a real world, the control is not perfect and all too fast
frequencies to be rejected by the control loop will have high amplitude. All frequency
components slower than the response time will be attenuated by the control loop.
The PSD of a process variable will be used to verify if oscillations are present and will
determine which frequencies are attenuated by the control loop (if aggressive tuning, some
frequencies will be amplified by the control loop).
If cycling is present, is the cycling sinusoidal? If so, the problem is probably the tuning or the
interaction with other loops. If cycling is coming from an equipment, the oscillations are
probably not sinusoidal; the base frequency should lead to the faulty equipment just by
reasoning … Standard patterns, when recognized, will lead directly to process problems. For
example, with sticky valves, the controller output will have the “saw tooth” shape.
In the frequency domain, the amplitudes of the frequency components will have known ratios;
for example for the saw tooth:
Period Frequency Amplitude Period Frequency Amplitude
(s) (Hz) % (s) (Hz) %
1 1 1 100 0.01 2
0.5 2 1/2 50 0.02 2/2
0.33 3 1/3 33 0.03 2/3
… … … … … …
1/n n 1/n 100/n n 2/n
For example if the controller output with a sticky valve has a period of cycling of 100s and if the
amplitude of the base component is 2%, we will have:

Cumulative Density

Figure. 4 Power spectral density of a pressure loop

Copyright 2004 by ISA-The Instrumentation, Systems and Automation Society.


Presented at ISA EXPO 2004, Houston, TX; http://www.isa.org
Figure 4 is the PSD of a well-tuned loop since the cumulative PSD is continuous. On this graphic, the X-
axis is in seconds (period); it could also be in frequency (rad/s or Hertz). Y-axis (left) here is normalized
and power is expressed in % of total; it could be in engineering units; Y-axis (right) is expressed in %
for the cumulative PSD. X and Y axis are here linear but they could also be logarithmic.
Automatic detection of peaks or cluster of peaks is also available to quickly identify unusual
oscillations.

STATISTICAL ANALYSIS
Statistical analysis is used to measure improvement after an intervention in a process: repairing
equipment, modifying a control strategy, optimizing loop tuning, etc. Comparing before and after
statistics will result in numbers to measure how much control was improved.
Simple statistical values are well known; these statistics are first and second moment:
• First moment:
Average (µ), maximum, minimum, median
Max
Mean
µ=
∑ x i

Range n

Min
Figure. 5 First moment statistics
• Second moment:
Variance (σ2), Standard deviation (σ),Variability
Red = 68%
σ =
2 ∑ ( xi − µ ) 2
Red + Green
95% = 95%
n −1
Red +
68% Green + Blue= 99%

σ= ∑ (x − µ )
i
2

n −1

2 ∗σ
Var = ∗100
µ
-3σ -2σ -1σ Mean +1σ +2σ +3σ

Figure. 6 Normal distribution probability


68% of the observations fall within 1 standard deviation of the mean.
95% of the observations fall within 2 standard deviations of the mean.
99.7% of the observations fall within 3 standard deviations of the mean.

Copyright 2004 by ISA-The Instrumentation, Systems and Automation Society.


Presented at ISA EXPO 2004, Houston, TX; http://www.isa.org
Variability represents the band within 95% of data will be contained; the percentage of
variability is often used to determine how data is spread.
Most processes have a normal distribution (bell curve) when everything is normal. If something
is wrong (faulty equipment, oscillations, bad control, etc.) then the distribution will differ from
the bell curve. For example, in a process where the valve is sticky, the distribution for the
process variable will look like two bell curves since the process moves from one stable point to
another.
Higher order statistics are used to evaluate non-linearities (ex: valve stiction), to find
oscillations and also to determine if the data differ from a normal law.

GOOD TUNING?
What is a good tuning? The evaluation of a control loop performance will differ depending on the goal
for that loop. Independently of the goal for a loop, good control will correspond to :
• Auto Correlation :
quickly inside confidence limits (speed varies with goal)
without oscillations
area under the curve is a good indicator of good control
• Power spectral density :
all frequencies should be equal at high frequency (noise)
graphic should look like grass (all frequencies have equal and small amplitude)
all frequencies below cut-off period should be attenuated
• Statistical analysis
Should be a bell curve if disturbances correspond to normal law
Variance should be small if maintaining PV close to SP is an objective
Figure 7 presents graphics of a flow loop before and after optimization.
Before optimization After optimization
Time data We observe cycling No cycling, close to set point
Statistics Not a bell distribution, Normal distribution, variability is
2 bosses which is probably stiction smaller, so is valve travel and valve
reversals
Autocorrelation Settling time is ~10 minutes Settling time is seconds
Oscillation with a 200 s period No oscillation
Power spectral Almost 50% of power at 200s All frequency components are smaller
density than 2%

Copyright 2004 by ISA-The Instrumentation, Systems and Automation Society.


Presented at ISA EXPO 2004, Houston, TX; http://www.isa.org
Before optimization After optimization
Time data

Distribution
(X axis has a
different scale)

Autocorrelation

Power Spectral
Density

Figure. 7 Flow loop in a refinery, before and after optimization

All the figures in this article were derived from ExperTune software from ExperTune Inc.

Copyright 2004 by ISA-The Instrumentation, Systems and Automation Society.


Presented at ISA EXPO 2004, Houston, TX; http://www.isa.org
REFERENCES
Box, G. E. P., Hunter, W. G., and Hunter, J. S. (1978), Statistics for Experimenters: An Introduction to
Design, Data Analysis, and Model Building, John Wiley and Sons.
Box, G. E. P., and Jenkins, G. (1976), Time Series Analysis: Forecasting and Control, Holden-Day
Instrument Engineers' Handbook Process Software and Digital Networks , 3rd Edition, edited by Bela G
Liptak, CRC Press, Boca Raton FI, 2002), 5.6 Plantwide Control Loop Optimization

ABOUT THE AUTHOR


Michel Ruel is a registered professional engineer, university lecturer and author of several publications
and books on instrumentation and control. Michel has 28 years of plant experience including these
companies: Monsanto Chemicals, Domtar Paper, Dow Corning, Shell Oil, Abitibi-Consolidated, Petro-
Canada, Noranda, Degussa, Alcan, Smurfit Stone, Kruger, Pratt & Whitney and International Paper. He
is experienced in solving unusual process control problems. Michel has presented process control
lectures to over 4,000 engineers and technicians in 6 countries. He translates his experience in a very
user-friendly presentation and teaching style. Michel speaks French and English. He is president of TOP
Control Inc. Michel is as well, an ISA Fellow member.

Copyright 2004 by ISA-The Instrumentation, Systems and Automation Society.


Presented at ISA EXPO 2004, Houston, TX; http://www.isa.org

You might also like