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!!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
cbolwerk wrote:

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.
--
-------------------------------------------
Tim Wescott
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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.
--
Francis
www.controldraw.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Francis wrote:
...

Just set a course straight NNExE. Don't bother so find our which way you're _actually_ headed.
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Did you answer the questions I raised? Probably only "cbolwerk" who started the thread can do that. If what I suggested (that the PD pump speed sets the flow) is right, then you have no better way of measuring the flow. The PD pump speed is probably as good a measurement of the flow as you will get. (It would be far more accurate short term than weight changes) That is not "Don't bother so find our which way you're _actually_ headed." What did you mean by NNExE? (Tried googling it too) Was your comment slightly offensive ?

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

probably
headed."
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:-)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Francis wrote: <snip>

</snip>
An auger is like an Archimedes' Screw, but generally used for solids conveying.
http://en.wikipedia.org/wiki/Archimedes '_screw
Andy
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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.)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
cbolwerk wrote:

Averaging is a poor way to low-pass filter.

Clock "show options" and reply from there.
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jerry Avins wrote:

So, what is the best way of doing a low-pass filter, on the analog card itself, or in the PLC program?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
cbolwerk wrote:

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
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jerry Avins wrote:

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.
--
-------------------------------------------
Tim Wescott
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
cbolwerk wrote:

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.
--
-------------------------------------------
Tim Wescott
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Wescott wrote:

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
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
proclaimed to the world:

Well if you think about what you just said this is still a PID system with the integral set very small. Actually I guess it could be set large but just cut off most of the time. The effect would be the same.
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 ------
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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 ------
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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 ------
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
HoPpeR trading at 1492 wrote:

Actually open loop control always _retains_ the stability characteristics of the plant -- you can't stabilize an unstable plant with open-loop control, and you can't destabilize a stable plant. As soon as you add feedback then you move the system poles around (in a linear system), and that affects stability.
What closed loop control does for you is allow you to take a plant that is inaccurate by itself, measure it with something cheap and accurate, and drive the plant accurately with the measurement.
You can do this in reverse, too. The most interesting closed-loop system I work on is a rate-integrating gyro that's used as a rate sensor. The way this is done is that the gyro is built with very quick, accurate torquers to force the gyro to precess. The rate measurement is done by servoing the gyro wheel to the center of it's travel, then reporting the command to the torquer.
--
-------------------------------------------
Tim Wescott
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.