Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to slow the rise & fall time or 'average' the output from a process controller, the output is currently 4-20mA but can be 0-10V if desired.

It's for a temperature control on a very unstable process, the items respond very quickly to temp changes and the controller (PID) cannot find a steady state, it tends to swing the output too far either way when it really needs a slow and steady rise or fall.

Many people have tried PID tuning but the process is too unstable, it has (and needs) a very large heat input and the products have little or no heat mass (sheets of paper), the heat input is large as the process can handle thick card requiring massive heat input or thin paper requiring less input, it is also speed / exposure time dependant.

Is there a cost effective way of averaging or smoothing the output in a control loop setup like this? The signal is isolated from the process by an LDR/Led optocoupler. I have had some luck in slowing the fall time by placing a cap across the Led/resistor but this has no effect on the rise time.

I have not modelled or measured as I am doing this real-time, yes the LDR is a CDS cell and I'm not sure how to check if it is linear or not. I will have a look tomorrow if I get a chance. The system is very unstable and a P only controller was no better.

share|improve this question
Have you modeled / measured the system response? Does "P-only" control work? Adding another pole to the loop seems like a recipe for more instability. – markrages Feb 22 '11 at 16:28
Have you measured the linearity of the LDR/LED combination? If this is nonlinear, it will reduce your control system performance. – markrages Feb 22 '11 at 16:36
Is your LDR is a CDS cell? – markrages Feb 22 '11 at 16:37
Yes it's a CDS cell. – user3118 Feb 22 '11 at 19:23
CDS cells have a memory effect, where it takes some time for them to return to resistance after seeing some light. This nonlinearity will make your control system difficult. – markrages Feb 22 '11 at 20:26

An op amp lossy integrator is a standard way to process this sort of thing. Or other low pass op amp filters. There are tons. I would worry about stability.

share|improve this answer
Stability can't be much worse than it is now. I'm trying to figure out what an integrator would to my signal, seems a common circuit. Also seems to invert so that would need addressing. – user3118 Feb 22 '11 at 20:26

So you have an arrangement something like

PID_outputs --> heater --> paper --> temperature sensor --> PID_inputs

Adding something to electrically "smooth" or "filter" between the output of the temperature sensor and the PID inputs may make things worse -- it adds some latency, which often makes oscillation worse, and you never really know the "real" temperature of the paper.

Perhaps it would be better to physically "smooth" the actual temperature at the paper, by adding some insulation around the heater-paper-sensor system. (This makes the paper take longer to cool down).

Perhaps it would be better to physically "smooth" the actual temperature at the paper, using a larger thermal mass (perhaps a sheet of metal) between the heater and the paper. (This makes the paper take longer to heat up and cool down).

Do any of the tips listed at http://reprap.org/wiki/Temperature_control work for you?

share|improve this answer
Thanks for that, its working better now that i have aimed the sensor at the edge of the stack instead of at a single sheet, the mass is helping to smooth things a bit. Ithas been running for some weeks now and is very much better than the original fixed input system. – user3118 Mar 28 '11 at 6:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.