PID, in general

Discussion in 'General Electronics Chat' started by strantor, Aug 3, 2011.

  1. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    I have run across PID and tuned PID in various controllers in an industrial setting. I have tuned PID heater controllers. I have tuned PID motor controllers. PID brakes, etc. One thing I have noticed is that sometimes PID doesn't like it's setpoint or other things changed.

    For example, I installed a Variable Frequency Drive to power a payoff reel. The VFD is PID controlled by a dancer (click here for a visual). I set it up and tuned/tested it using a small-ish reel. It worked great for a couple of months; then I was called back because the dancer was oscillating. They were using a much larger reel than what I used to tune it. I did not think this would be a problem, since it is PID's job to compensate for such things . I had to re-tune it to run with the larger reel. Every couple months I have to go back and re-tune it for smaller or larger reels. The reel size change is not a setpoint change, it is a rate change. why is this happening? is it just a flaw in my tune? Is there a "perfect tune" that would enable me to run any size of reel?

    Another, better(setpoint related), example: I have a heating machine with 6 heating zones that are controlled by 6 PID heater controllers (wattlow 985 controllers). I can set them for example to 300 degrees and then perform an autotune. After the autotune, the controllers work great; they will shoot right up to 300 and stay there. However, if I put in a setpoint of 200, they will will shoot up to 250 and then back down 220 and then hunt around 230. If I change the setpoint to 400 they will creep up to 380 and hunt around there. I figured that the autotune feature was subpar and I did the due dilligence of manually tuning all day and it's the same story. It seems I need to autotune for each setpoint, which is crap because in the normal operation of the machine, the operator will change the setpoint several times in a day. why is this happening? It doesn't happen with other heater controllers I have used. Is it a weak PID algorithm specific to these controllers? Could the heaters themselves be designed in such a way that the rate of temperature increase is non-linear (i.e. taking longer to increase from 300 to 400 than it does from 200 to 300), defeating the PID in any controller?
     
  2. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    one must consider the dynamic mass of the process being controlled, and more specific, the ability of the mass to change due to loop corruption or variable loading of parameters.

    Are you working with plastics extrusion?

    the loop dynamics need to work along side the process dynamics. If for instance a drive is asked to operate towards it's max or min operating range, or a sensor is asked the same, non linearities may cause overshoot.

    One thing I've noticed over the years, is that a technician, once satisfied that the job is done, will leave the site, but when the process is 'properly' operating, is when one can learn the most. What types of corrections are being applied during normal operation, and how does that change over the range of operating parameters. The control loop and it's interaction with the process exposes much.

    Is there a catch all tuning? Consider on some process that the processed material may transition form at some point. This may or may not be easily handled by a 'tuned' loop. Operating close to, or continually across the transition point may prove problematic for the loop, unless specifically tuned for that point.

    Consider on a winder/unwinder that the material extensibility may change frequently and quickly. If you've produced the substrate, it may be pointing to a higher than acceptable variable in an upstream process.

    Another case I've worked with is in extrusion where leaking cooling valves created havoc at one temperature range, but were 'overpowered' at another and the loop settled in.

    In general, my suggestion would be to not blame the control, but to observe it's interaction with the process over it's range of variables to discover if it can be tuned to capture all, needs to be shifted, or to tighten the process variables.
     
  3. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    Let me start by saying thank you for this very informative reply. I hope I can reply with as much clarity and detail. You have given me a good amount of things to study.
    Dynamic mass; are you referring literally to physical mass, as in the mass of the spinning reel? I looked up dynamic mass and the definition is "Ratio of applied force to resulting acceleration during simple harmonic motion.". This makes me think maybe you are talking more about the effort required to change the process variable in any process rather than the actual mass of the reel in my example.
    loop corruption; Are you referring to a noisy or badly calibrated signal? In my VFD unwinder example I scoped the dancer signal and there was no noise. In my heater example the thermocouple was steady and temperature was verified by a second thermocouple.
    Variable loading of parameters; I assume by variable loading of parameters you are referring to things such as a full reel in my unwinder emptying over time (requiring more RPM from the unwinder to maintain dancer setpoint). Am I on the right track?

    I have another question on these matters pending your reply.


    That was intuitive; I guess you've been at this a while; Yes. I work in a wire & cable manufacturing facility.

    Are you talking about real-world characteristics of individual sensors and actuators introducing non linearity? I.E. in a perfect world my drive and my sensor are perfectly linear from min to max; would what you are referring to be moot, or am I missing the point?

    I am lucky in that I work in the same plant every day. I am not field service. I get immediate feedback and I get to babysit my machines while they are operating in the real world.

    In the winder example, I blamed the control because it wasn't like that before the VFD was installed. It was my project. the unwinder used to be powered by a single speed motor, with eddy current clutch speed control via a Louis Allis clutch controller. We are required to do at least one project per year and I chose to upgrade this outdated system. It was my first VFD install from start to finish. It looks bad for me because the operators who have been using it for 30yrs are now grumbling about "if it aint broke don't fix it"
     
  4. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    that is correct, but further includes the relationships between process and control. As you are aware, certain processes must be gradually brought into operation. One could say, due to the latency of arriving at operable condition, that the process has 'mass'.

    Loop corruption is anything that prevents the loop from stabilizing. Remember that the process is as much part of the loop as the controls, so an unrecoverable process (broken mechanical parts...) or control (failed components...) is applicable.

    In part, but also includues running a 350 degree heat profile for one product, and possibly a 425 degree profile for another.

    In regards to linearity, a sensor may produce a voltage output linear to it's temp (for instance), but is the rate of response linear. Rate of change of any of the process parameters imply frequency. Although virtually impossible to predict, the PID loop can be a useful tool in analizing the harmonics implied by the many frequencies occuring. By manipulating the process variables and observing the resulting loop action, one can better understand the contribution of that variable

    I've worked with the eddy clutch (on tension winders), and found them dependable. Is your VFD under vector control?

    In my years of working manufacturing, I've learnt that one of the biggest process variables is the operator(s). They are also the largest resource in troubleshooting efforts.
     
  5. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    I don't want to interrupt the good advice and guidance you are getting from GetDeviceInfo. However, I can interject just a couple of general comments, and then step away. Note that my general knowledge of PID control is not as valuable to you as the specific advice related to the systems you are working with.

    As far as nonlinearity, the fact that the PID tuning depends on operating point is almost certainly due to a nonlinearity in the system somewhere. In this case, one either needs to make a general tuning that keeps all operating points stable (which implies non-optimal control), or an adaptive gain PID controller (gains are a function of operating point) could be implemented.

    As far as physical system changes, a similar comment can be made. If the system is tuned to be stable for all component changes, then you can't have optimal control for all cases. At best you can have stability in all cases (hopefully).

    As a side note, my company recently bought a new a thermal chamber which has a fuzzy logic controller, rather than a PID controller. Apparently, the latest temperature and humidity controllers are all using fuzzy logic, whereas all the old systems I grew up were all PID based. Not having to tune the PID gains is a real convenience.

    From a control designer's point of view, PID control is rarely the best control method. It is good if you don't have a detailed system (plant) model, but there is usually a better way to implement control. However, this implies development cost and significant investment of time and money, so it's usually not done. I'm not just talking about fuzzy logic control (which I'm not a big fan of in general), but classical control techniques allow many tricks that go beyond simple PID control. However, PID controllers are very adaptable and can be quickly tuned for a particular case, so it's probably the way you are forced to go. As you are seeing, there is a bit of art and black magic involved.
     
  6. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    eloquently stated.

    'Adaptive' in it's true sense. In the big picture, political skills are handy to manage operators/managers/bean counters. Tough to solve sometimes.
     
    Last edited: Aug 4, 2011
  7. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    Ok guys, I was reading about harmonics, then about latency, then trying to reply to GetDeviceInfo when steveb threw me the fuzzy logic bone, which I chased and ended up in control theory. got all scrambled. I'm not done with this post but I have lots to read up on. I will address the things you pointed out when I have enough knowledge to do so. maybe in a couple of days.

    In the mean time, a new example came up yesterday and today. I have an unpowered undwinder with tension set via air brake controlled by PID controller with dancer (ultrasonic transducer) input. dancer was behaving erratically. I sat there tuning it for hours and the closest thing I could get to a stable tune was a stabilizing tune; I.E. there was still oscillation, but overshoot and undershoot would gradually become less and less, and it would seem like it was on the cusp of steadying out, then it would go all wacky (extreme up and down) again. the wire is being spooled off at a constant rate; nothing is changing. The fact that it looked like it was getting stable makes me think I have some loop corruption. maybe the brake is catching or slipping. what do you think? could it be an unstable tune?
     
  8. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    if it heads toward stability then goes wonky, your loop is likely being corrupted. Moisture in your airlines, binding in linkage/turret, side guides binding, etc.
     
    strantor likes this.
  9. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    I think your ultrasonic transducer might be too slow for the task (or too slow for your loop and the machine inertia).

    Ultrasonics take a mS per foot of distance, both ways, and maybe slower than that due to processing or sedning multiple pings per output update.

    So that could be quite a lot of mS before you get a change in sensor reading that corresponds to the actual machine change.

    Could you change to a much faster sensor like an optical or hall effect sensor?
     
  10. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    This machine is ~20 years old and has been using the ultrasonic sensor the whole time. Only recently did it develop this problem, which also makes me suspect a mechanical wear issue. I didn't know that about the response time, but apparently it's not a crucially limiting factor for the design.

    An optical sensor would be cool. I might replace the ultrasonic sensor with an optical one if I find a problem with the ultrasonic.

    the travel distance from top to bottom is 5ft. can a hall sensor work from 5ft away and return an analog value? I don't know much about them.
     
  11. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,795
    951
    I can't help you with the particular machine you are using, but having had some extreme hair pulling experiences with problematic tuning problems in other systems I thought I might offer some insights.

    IF this tuning involves the setting of multiturn potentiometers and in the past, processes have worked correctly, but are now working for only a short time. THEN investigate the following.

    connect a GOOD voltmeter with high resolution to the pot. in question, so as to read out the control voltage which you arrive at when the tuning is performed and operation is good. Leave it connected(if possible) while the operations run and recheck the values it presents when operations go haywire.

    In the situation I encounterd, the scaling factor for air pressure readouts would change from the calibrated setting after just a few hours. The calibration would be redone and the setting would again change after a short time. The problem turned out to be the multiturn potentiometer itself. The wire winding where it was being set for calibration had suffered from years of tuning across the same small section of its windings. The problem was fixed by adding a small value resistor(high tolerance mil spec type) and forcing the tuning 'spot' to be different for the pot. This placed the wiper arm in a NEW section of the winding and resulted in a stable calibration which stayed steady and showed no signs of drifting off after days of operation. The special 20 turn pot was ordered and replaced with a new one several weeks later as a result of this field service fix / plus troubleshooting verification.

    At least the equipment was able to be put back into service incorporating the odd modification until the parts needed could be installed. This made our customer very happy, because he could continue his work on all the jet engines awaiting certification after servicing and not have to shut down operations until parts arrived.

    Monitoring the settings(if your equipment calibration does indeed operate in this fashion) might tell you whether or not this is a concern in your case. The age of the unit makes me think it is quite possible to be the cause, if so.
     
  12. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    You mean pots that look like this?
    [​IMG]

    Thats a pic of the actual board that I took out. The height one looks especially suspect. I did note while trying to tune it, that I could induce wackiness into it by touching the pots. I changed out the board and the problem remained (minus the wackiness from touching the pots). I definately think that the pots were part of the problem, but there was another problem somewhere else. Whilst taking the whole machine apart, I found that the 4-20mA ultrasonic sensor was putting out 3.2-27.2 mA instead of 4-20mA, so it could have been on it's way out as well. I pulled out the shotgun on this problem. I replaced the entire system with a newer, sleeker system. It was time; these machines have been problematic since day one (so I am told by other guys who have been here for a while). We kept multiple dancer boards, transducers, and sensors in stock because they failed frequently. All of the parts except for the transducer have since gone out of production and it getting very hard to find - last few dancer boards have been ordered used.

    The board in the pic is one of 3 (dancer board, 0-10V>0-60mA signal conditioner board, and custom-made position adjustment board) that controlled the machine. I ripped all 3 out and replaced with this.

    the old transducer (a very high failure rate item; one fails every couple of months between 3 machines) I replaced with this.

    and the ultrasonic sensor I replaced with this.

    It was a mostly straight-forward upgrade, but ran into a couple of areas I had to get creative. The main thing was that the two transducers, old and new, operate backwards from eachother. the old one put out full pressure at 0mA and zero pressure at 60mA, which was good because it would stop if there was a power failure or an open in the 0-60mA signal (signal went through a NC limit switch at the top). I had to put a solenoid directional control valve in air line parallel with the new transducer that would route air to the brake with no power, or to the transducer with power. Also there were a bunch of relays that were designed into the machine to provide digital inputs to the old dancer board which are now obsolete, et. al.

    That's what I've been doing yesterday and today. got it up and running about 30min ago. the new dancer control only took about 2 minutes to tune.
     
  13. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,795
    951
    Those type of pots are even worse about losing their setting. Most like that I have seen were secured by a drop of paint or epoxy after setting.

    I was referring to ones like that pictured below.

    [​IMG]

    But, Good News. You got it working. Congrats. Have a Beer on me. :)
     
    strantor likes this.
Loading...