Noise can be viewed as random perturbations on an otherwise constant signal. If there were no noise, the signal value would remain unchanged. However, noise makes the signal fluctuate above and below the true value. Noise may be the result of mechanical vibrations, stray electromagnetic impulses, flow turbulence or any number of causes.
Further, the true value of the signal may be changing in time. The problem is that you can't see the true signal; all you can know is the noisy measurement or a calculated value. Figure 1 illustrates a slowly changing signal being confounded by noise. The true value of the signal is represented by the dashed line, illustrating that it's unknown. The control system can only know the fluctuating marker values, representing the measurement.
The problem is that noise confounds action. For example, between times of 19 and 21, the measurements seem to indicate a significant drop in value, while it's actually rising slowly. We would like to remove noise from signals, variables and action, and averaging is a common way to temper the fluctuation:
However, averaging wasn't possible with analog instruments of yesteryear, and even in the digital age, represents a computational burden of storing many N variables. Filtering is a computationally simpler approach to “averaging” and can be developed a number of ways.
Here is one: Take the most recent X-value out of the sum, and recognize that if the signal is not changing (at steady state), then the past average is a reasonable estimate for the sum.
[sidebar id =1]
The challenge for the user is choosing the right value for the filter coefficient. Filtering doesn't remove noise, it tempers it. So it would seem that more filtering (smaller λ value) is better to see the true signal. However, filtering induces a lag to Xf that masks the reality of an immediate change in the process. As filtering is increased to attenuate noise, the lag is also increased. The lag is undesired. It confounds the controller, and any other action that a person might take when observing a signal.
Figure 2 indicates the impact of three choices of filter coefficients on a signal that makes a step change to a steady value. The true, but unknowable, value is the dashed line, and the markers represent the data. Note that as filtering is increased, fluctuations on Xf are reduced, but the undesirable lag is increased.
Ideal equations for the time-constant for the filter lag (obtained by numerical representation of the ODE) and the variance reduction (obtained by propagation of variance on the filter equation, assuming steady state and un-correlated noise) are:
One could desire a particular variance reduction, then calculate the required λ-value from one equation, and the consequential lag from the other. However, idealizations make the equations approximations; and more realistically, the filter coefficient will be heuristically adjusted online to meet a visual and subjective desire for noise reduction.
[sidebar id =2]
Since process noise amplitude changes with operating conditions (pH, nonlinear signal processing, flow turbulence and many other aspects), expect to readjust the filter coefficient value as changes in measurement signal would indicate. But also realize, the consequent significant changes in the time-constant could affect controller tuning.
Filtering may be effected on the process sensor, data transmission or controller. Be aware of choices that other technicians and operators may make. Tune the controller after the filter coefficient is set.
In filtering, the user needs to understand: 1) the balance of desirables (reduced fluctuation) and undesirables (increased lag); 2) the equation that the device is using; and 3) the impact that the lag may have on controller tuning and performance, and on the interpretation of the process by human observers.