Thread Starter

Miguel Borges

According to Liptak, in the latest edition of his book "INSTRUMENT ENGINEERS' HANDBOOK", noisy process signals should be smoothed or averaged.
A mathematical formula is presented which depends on 2 parameters: the sampling period and the filter time constant (Tau). "Tau" relates how far
back in time data are to be averaged. My question is, how to choose an initial value for the filter time constant before to tune a process control
loop where there are noisy process variables? I'd like to get some technical references on that subject (if any) as well.

Miguel Borges

Eng. Miguel Joao Borges Filho
Research and Development Center of Petrobras
Industrial Basic Design Division
Cidade Universitaria - Quadra 7 - Ilha do Fundao
Rio de Janeiro - RJ - BRASIL

Bill Sandidge


Here are some seat-of-the pants tips:

Look at the time factors in your system from a relative standpoint - are they roughly equal (harder) or magnitudes of order different (maybe easier). Look at Lag time from control action to process response, acceptable settling time to setpoint and noise frequency.

How long is the lag between control action and
process response? If it is "long" (as in many temperature control loops) compared to the noise
frequency you'll have more room to work. Filters
"slow down" the process signal; if you slow it
down too much your controller may end up chasing
its tail (oscillating) because it is responding
faster than the signal is settling.

There is a simple rule in control systems called
"causality". Basically you cannot respond to
something that hasn't happened yet. The longer
the filter time the longer you have to wait to
react - meaning you have to slow your controller's
response time with a longer integral time.

This isn't a problem if you can tolerate a longer
settling time to setpoint. Generally the more time
you allow your system to coast to the setpoint the
easier it is to tune, the more filtering you can
apply and the smoother it will control.

A filter time setting in the range of the integral
time is bad news - the integral term winds up while waiting for the process signal to respond. The controller ends up "chasing" the process, always lagging a little behind.

If you need fast response you are going to have to
back off on the filtering or it will interact with
the controller's settings.

If you need derivative (heating/cooling?) you have
to watch out for noise. Large derivitive times tend to cause noisy, erratic output that can wear out actuators in no time. Loops like flow and pressure however rarely need any derivative action. Turn off derivative if you can.

I have a reactor temp control loop with a two minute lag time. Nothing happens for at least two minutes after a change in output. Also we have to accept a long settling time as any overshoot destroys the batch. I have about a six second filter on the process. The noise has about a one- or two-second period so six seconds is good enough; any more serves no purpose and potentially interferes with the controller.
Any less and the large derivative time makes the
output swing wildly - 20% to 40% up and down every
couple of seconds!

Bottom line - give yourself as much room to work as you can by using a little less gain (more proportional), a longer integral time and as short a derivative time as you can.

Check out the article "PID Tuning: It's the Method, Not the Rules" in the Dec 1994 issue of Intech magazine if you can.

If you want, email me a description of your application and I might be able to give you some more concrete answers.

Bill Sandidge
Instrumentation Design, Inc.
Atlanta, GA
[email protected]

Johan Bengtsson

the filter time constant should preferably be at least two times the sampling period and less than one fith of the proocess main time constant.
This range can be extended to 1.3 times the sampling period and half the process main time constant if special care is taken.

This leads to the following:
how high filter time constant do you need to get a smooth enough signal? And how is that compared to the process time constant?

(btw. if there is a conflict between the two rules for high and low limit your sampling period is too long)

I would do like this:
1. Set some reasonable filter time that gives you smooth enough curves to have something to measure at.
2. Determine the process main time constant
3. Verify that the filter time is less than or equal to the process time constant / 5, if not - the time constant you measured is higher than the real process since the filter have affected the measurement

Once you have the process time constant it should be no problem to decide a suitable filter time.

If you need a too high filter time you may need to have a filter with a higher degree, this can be done by putting two (ore more) filters after each other using the same formula. A quick rule of thumb (not necessarily the best mathematically) is that the individual filter
time constants have to be at least 1.3 (preferably 2) times the sampling time and the sum of the filters time constant should be less
than the process time constant. In this case you may also need to consider using other types of
filters, like a median filter or some similar.

Normally one filter does the job great enough.

/Johan Bengtsson

P&L, the Academy of Automation
Box 252, S-281 23 H{ssleholm SWEDEN
Tel: +46 451 49 460, Fax: +46 451 89 833
E-mail: [email protected]
Filtering signal:
There is nothing wrong in the replies. But !
But what ?
What kind of noise ? process , signal, sampling.
Sampling noise in numerical PID: resample your scan rate adequatly.
Signal noise: correct it.
Process noise: after solving the two first one then treat that one;
1. If the numerical drivative is a three term one: forget it in the tuning.
2. The numerical P & I do provide significant amount of filtering.
3. At this point in the chirurgy, if some form of noise still remains, then it is process noise.
Little leaway is on hand. Signal filtering.
Time constant is auckward in numerical.
Numerical filtering consist in accumulating samples, spaced in time and apply on each sample a factor. The summation of these factored samples
is the filtered signal over the period of all the samples considered. The process repeats indefinitely. The smoothed signal may be refiltered, but only very little, otherwise the delay in response is in the legs.
Filtering over a closed loop should be considered abnormal, because the PID is selfiltering.
A typical process noise is the flow measurement.
On open loops (not doing control), some filtering is advisable.
Hi I need help on PID Tuning. Has anyone in here solved on the PID tuning based on mathematical optimisation algorithmic approched? let say i have a PID controller which is Gc=(q0 + q1z-1 + q2z-2)/(1-z-1) where q0 = K(1 + T/2Ti + Td/T) q1 = -K(1 - 2Td/T - T/2Ti) q2 = KTd/T How do i use ITAE (Integral Time Absolute Error) cost of measure to find the value of q0,q1,q2. by minimising ITAE criterion. the criterion can be expressed as S = integral of k |ek| Thanks in advance any worked examples or solutions will a great help

Friedrich Haase

Moin gberaj, optimization like ITAE or other more complex work fine. Unfortunately there is no simple mathematical solution for the controller parameters. Many years ago I have simulated the plant and the controller, calculated the cost function and an overall search algorithm modified the controller parameters to obtain the optimum solution. Took a lot of CPU time those days. I also successfully used something similar in real-time. Regards Friedrich Haase