To PID or not to PID

I am working on a project where I am not sure whether I should use PID control or not. Any suggestions would be greatly appreciated.

I have a hopper on load cells. There is an auger at the bottom that is mechanically connected to a PD pump. I need to control mass flow. I have specified a weigh transmitter that will give me both current total weight and rate of change (over ControlNet). The reason that I spec'd the rate of change was that I was hoping that it would give me more accurate information. My thought was that it would be faster to have the transmitter do the filtering / averaging than to have the PLC do it with the total weight information and doing a moving average.

I am having second thoughts on the need for PID control (well actually just PI). I am trying to make this as accurate as possible and am worried about the dead time that I will have due to the delay in waiting for "good" data. Also, I am thinking that the response is not going to be anything like a

1st order lag with dead time and would be straigh proportional. Is the delay in waiting for "good" data consider dead time, seeing as how it is not related to the process?

Does this make sense? Does anyone have any experience with anything similar?

Thanks again for any help!!

Reply to
cbolwerk
Loading thread data ...

Do you mean a pump with it's own PD loop, or a pneumatic displacement pump, or what?

I only know of two times when it's a good idea to use a moving average inside a control loop:

  1. When you're sampling at some high rate and you need to filter and decimate to a lower rate. Averaging N high-speed samples before sampling every Nth sample works very well.
  2. When someone is holding a gun to your head, and they'll put it down long enough for you to run away if only you put in a moving average filter (and before they check for loop performance).

I sincerely hope you meant a regular old low-pass.

Any delay inside your loop is dead time. If the delay is in the measurement that just means that you'll be doing the wrong thing for a while before you figure it out.

It sounds like what you're doing is loading the hopper in batches, then dispensing material at a steady rate -- is this correct? If this is the case then I would consider doing what you're doing.

I would also consider using the weight and weight rate-of-change signals to implement PD control in the PLC, using a falling target. Each time the hopper gets loaded I would measure the weight in the hopper and set the target weight to just that amount in the PLC. Then I would decrease the target weight in the PLC at my desired mass-flow rate. My control term would be (desired weight - measured weight) * kp - (measured d/dt weight) * kd. Theoretically you're doing the same thing as the PI control on d/dt weight, but it may have practical advantages.

Reply to
Tim Wescott

Does the PD in "PD pump" mean Positive Displacement? What do you mean by Auger - is that the PD device? Is so then flow is proportioanl to the pump speed. Just set the speed, possibly modifying for the density if that can vary. That will then set mass flow. No need to use the vessel weight at all.

Reply to
Francis

...

Just set a course straight NNExE. Don't bother so find our which way you're _actually_ headed.

Jerry

Reply to
Jerry Avins

Reply to
Francis

Francis,

"NNExE" = North North East by East.

It seems Jerry was making a smart remark about your method to indirectly measure the flow using pump speed.

You stated: "Just set the speed, possibly modifying for the density if that can vary". Although the OP didn't state what product he was dealing with, with all but a few, it isn't all that easy to accurately measure _density_ on the fly - a weight measurement will be required somewhere to get mass flow.

HTH, Cameron:-)

Reply to
Cameron Dorrough

Ah, thought it was North East etc, but could not figure out the x Anyway, smart remarks don't help. "cbolwerk" are you there? You started it! What do you mean by Auger? Does PD Mean positive displacement? Does the density vary? Am I on completely the wrong path here? Cheers

Reply to
Francis

An auger is like an Archimedes' Screw, but generally used for solids conveying.

formatting link
'_screw Andy

Reply to
Andrew Corson

Yep, I'm here. Didn't mean to cause such a ruckus.

Yes, the PD means positive displacement. The product is meat. The auger is to feed the pump. The density should be consistent.

Actually, I thought about the same thing because it is a positive displacement pump. Could I just eliminate the PID and the weigh transmitter (maybe just use it as verfication). After all, open loop control is always more stable than closed loop control, right?

For a given speed, I would know the volume per revolution being pumped. Knowing the specific gravity of the product, I should be able to figure out mass, right?

To answer an earlier question, one of the reasons that I was looking at doing a moving average was because I expect that there will be a lot of noise on the signal. I wasn't sure that filtering alone would do the trick. There are a couple of other auger motors on the hopper, near the top, to force the meat down into the bottom auger that then feeds the pump. Of course the problem with this is that I then have to have enough samples before I can close the loop. Also, how to start up from a stop.

Thanks to all for the replies. I really appreciate all the help and discussion.

(Sorry for not quoting original messages, but I am using Google groups and I haven't figured that out yet.)

Reply to
cbolwerk

I can see how my remark might seem offensive; it was certainly brusque. I apologize for any offense.

NNExE is "north-northeast by east", a compass direction. My point was that in a well designed system, one measures the result. Assuming, without a confirming measurement, that the command is carried out is at best unwise. The constant-displacement pump is indeed a good source of flow information _provided_ that there is an accurate way to measure the pump's actual speed and be assured that its seals don't leak.

Jerry

Reply to
Jerry Avins

Averaging is a poor way to low-pass filter.

Clock "show options" and reply from there.

Jerry

Reply to
Jerry Avins

So, what is the best way of doing a low-pass filter, on the analog card itself, or in the PLC program?

Reply to
cbolwerk

wot he said

and beware of 'pump slippage'

in the specs there will be an allowable pressure gain for no slip operation

if you exceed this you will need to measure the output to see xxactly what is being out put

otherwise volume and pump speed are reasonably proportional

I would process in the sensor as you suggest and use PD to drive pump motor controller

Reply to
fulliautomatix

I don't know your PLC or how to program it. I'm sure it can be done, but it may be ugly and the manufacturer may not know how. (Why back when, TI told us that you can't program a shift register with ladder logic, and "proved" why not. After I did it, they published my solution without attribution.)

If a moving average filter is the best you can do and it's good enough, go with it. I made my remark because you seemed to think that a moving average filter was somehow _better_ than a low-pass filter. In fact, it _is_ a low-pass filter, but a poor one given its delay.

You can put a state-variable or switched-capacitor analog filter IC on your analog board with good results. You should have some kind of low-pass before the sampler anyway, to avoid aliasing. Doing both anti-aliasing and noise reduction in one swoop makes sense to me. Let's see what Tim Wescott thinks about it.

Jerry

Reply to
Jerry Avins

Well, since you ask...

There is one, moderately narrow application where you will find me using a moving average filter, and that is when I am sampling at a high rate then filtering and decimating. In that case if I'm decimating by a ratio of N I'll add up N samples and take the sum as my lower-rate sample. This works well because the nulls of the "moving average" filter fall on the sample rate and it's harmonics, so nothing gets aliased down to DC.

Your analog board should have an anti-aliasing filter on it. If you are designing the board and use a switched-capacitor filter you'll need to remember that being a switched device it has its own aliasing and you may or may not need to preceed it with a small anti-aliasing filter.

I'm still sticking to my original suggestion; in fact I'm off to expound on it.

Reply to
Tim Wescott

Don't be -- it means you asked a good question.

Yes, open-loop control is always stable given a stable plant. It sounds like if there are any variations that need to be guarded against at all it's going to either be density changes in the meat or wear in the pump.

If you set up your PLC to record the weight of the hopper at the start of the batch, the weight close to the end, and the running time, then you'll be able to get a good estimate of the actual mass flow rate. If you really want to get into programming the PLC you could collect a few statistics at each step and get a linear fit of the weight vs. time -- that would give you the closest estimate of the rate of change of mass, without ever using a differentiator.

You could then use this actual mass flow estimate in one of three ways: you could just have the PLC publish it as a statistic, you could use it as an alarm to indicate equipment problems or quality problems with the meat, or you could update a PI loop once each hopper load. This latter would do nothing to protect you against minute-to-minute changes in meat density or pump characteristics, but it would be outstanding at compensating for any issues with pump wear -- and you could still raise an alert if the mass flow vs. pump speed ratio indicated something seriously wrong.

Reply to
Tim Wescott

Tim Wescott wrote in news: snipped-for-privacy@corp.supernews.com:

I've also had problems with clock bleed-through with switched-cap filters, and often put a simple RC filter on the output, as high in frequency above my pass-band as I can and still deal with the transients. In fairness, I haven't used switched caps in some time, so the latest greatest might not have this problem.

Scott

Reply to
Scott Seidman

You took the words out of my mouth. (Actually, I got sidetracked and swallowed them.) The way you put it is specific. I'll be general.

If a system's components are almost good enough to be run open loop, than using a background supervisory controller usually works well. In navigation, dead reckoning works well in the short turn, but an occasional position fix is a Very Good Thing. Controlling this way doesn't eliminate the need for transducers that can sense the result of an action, but it simplifies the plan of action and nearly always guarantees stability.

Jerry

Reply to
Jerry Avins

On 29 Jun 2005 18:51:10 -0700, "cbolwerk" proclaimed to the world:

Evidently that is what is being taught in school now but open loop is also never as accurate. You are trading accuracy for stability. The only reason a PID system is not stable is because it is not set up properly, the process changes or a component in the system starts to stick. A PID system should be set as insensitive as possible to allow for changes in process or failure.

If accuracy is not an issue, then open loop good.

Be well,

HoP

The preceding message represents personal opinions and/or advice that may prove incorrect or harmful. But then maybe not. Feel free to disregard.

------- Words have no Warranty ------ ------- No View without Merit ------

Reply to
HoPpeR© trading at 1492¥

On Thu, 30 Jun 2005 08:36:25 -0700, Tim Wescott proclaimed to the world:

Tim, this is good. I designed something very similar some years ago on an extruder in a rubber plant using a TI PLC. Basically what I did and you propose is to have the machine self-calibrate or conversely to self check it's calibration and alarm if it is out of tolerance. This is not that easy to do with the PLCs that I had available to me at that time. I do not know how the programming language has changed in the past few years. Ladder logic was not good for this. Originally I was using an Atcom PLC which used I/O oriented programming similar to GW Basic. Using that, it was a matter of writing a conditional statement in an output line.

BTW what I was using this for was to detect air entrapment in the product in addition to automatically adjusting the cutter timing so that they got the proper weight plug for the mold.

Be well,

HoP

The preceding message represents personal opinions and/or advice that may prove incorrect or harmful. But then maybe not. Feel free to disregard.

------- Words have no Warranty ------ ------- No View without Merit ------

Reply to
HoPpeR© trading at 1492¥

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.