auto tunning of PIC control loops

Hi, Can someone please explain how "Auto-Tuning" works?

  1. Do you set it "on" and forget about tuning? PID parameters change as requierd over time. Fully automatic operation.
  2. Do you do it once, get PID parameters, set them. and from there on no change to the PID parameters.

I would call the first one auto-tuning and the second PID-tuning. I would expect the first one to be part of the Controller algorithm and the second would be an application external to the loop (wither within the DCS/PLC controller, or remotly within a reomte computer, HMI, Special SW)

Thanks. Oren

Reply to
Oren Yulevitch
Loading thread data ...

The first is generally called "adaptive control". It often works but it's full of pitfalls that your system may fall into at any time. Its a useful technique, but not something where you can just build a controller and expect to have it work anywhere -- you need to understand your system pretty well, understand what you're adapting to and why, and limit your algorithm to prevent embarrassing (or fatal) boo-boos. In over 10 years of implementing full-custom embedded control loops I've only used adaptive control once, in a very limited sense, and even then I left in one mildly embarrassing mistake that had to be fixed later.

The second is called "auto tuning". It often works but It's full of pitfalls. Fortunately your system will only fall into one after you push the "autotune" button, and hopefully you haven't walked away yet so you can fix things. There are many PLCs available with it these days. I believe that most are based on the Ziegler-Nichols but I don't use PLCs so I can only report what I've heard.

Reply to
Tim Wescott

Auto tuning functions in a controller work this way. After you have the controller wired and running in the system, you start autotuning. Using the PID settings you entered or the default settings it "watches" the response of the controlled variable and determines the best PID settings. I do not know the exact algorithms used and I suspect they vary from one manufacture to another. The autotune process may take several hours depending on how fast the system responds to changes. After autotune completes, the new PID settings are automatically set in the controller. The operator can then make changes to those settings to fine tune the system to his needs.

Autotune is not perfect. There are situations where it is not safe either. The controller output may go from zero to FS in a short period of time or oscillate between the two. You should always monitor the system while autotuning and take into account any hazards that may happen if the autotune forces the output to the extremes.

I've used autotune many times. You get the best results by setting the PID as close as you can before starting the autotune and then tweak the settings after the autotune completes. In a few cases where response to an output change is very slow, the autotune fails altogether and PID must be set by hand. This rarely happens if you preset the values close before you start. Conversely if the PID settings are way wrong, autotune rarely works or the system oscillates so badly that the tune aborts.

Again the specifics of how the autotune works varies from manufacture. If you have more specific questions like giving some details of the system or the controller manufacturer and model, I can give you some better answers.

Reply to
A. Paul Montgomery

By convention: 'Auto-tuning' is taken to mean any facility built-into a controller (or possibly into a system that supervises one or more controllers), that is manually initiated by an Engineer to automate the procedure of obtaining PID settings by making test disturbances on the plant, and then recording and analysing the results - in lieu of the Engineer doing it all manually.

In other words: auto-tuning is a manually-initiated one-shot approach and does not, therefore, refer to those many methods of adaptive control that attempt to adapt the controller parameters to changing properties of the controlled-system continually and automatically whilst the controller is in service.

I hope that helps.

Kelvin B. Hales Kelvin Hales Associates Limited Consulting Process Control Engineers Web:

formatting link

Reply to
Kelvin Hales

Hi All, Thank you all for the replied that I received... These are great. I feel that I learned already a lot.

The task I am facing is this. I have an OLD DCS system running about 200 PID loops. About 150 regular ones and aditional 50 in cascade. This system is to be replaced with a new, modern, control system.

PLC or DCS, someone would have to tune all these. If I take a day for each loop hat would make a project of about 10 months.

Is there a way to cut that period? How can I tune all these in a fast way? Which of two aproachs is better, PLC with HMI and dedicated software tool, or a DCS with internal, built-in by the supplier, tool. Can you name a system that you would recomend?

Oren

"Kelvin Hales" ??? ??????: snipped-for-privacy@khace.com...

Reply to
Oren Yulevitch

Oren Yulevitch wrote: (top posting fixed)

I don't get into the store-bought controller market, but:

Is it possible to gather the gains from the existing loops, find the equivalent gains for the new devices, then enter them? Assuming (and it's a big assumption) that there is enough equivalency to be valid this should take you much less than one day per loop, at least once you've gotten the kinks out of the process.

Reply to
Tim Wescott

Why shouldn't there be an equivalency? The plant gains and time constants ( poles and zeros ) will not change just because the controls are changed. Even if one PID uses gains and another uses time constants it is still easy to find the equivalence. I had a customer that used our product to tune a competitors product. I was upset when I heard about that.

Auto tuning consists of two phases.

  1. Systems identification to find the plant transfer function. This is the hard part. If you have this information you can save a lot of money if you don't need to recreate it.
  2. Calculate the feedforward gains as a function of the transfer function and calculating the PID gains as a function of the desired response and plant transfer function. This is easy.

One can tune systems by using a RSLogix trend file to calculate the transfer function. It isn't that hard. Does the current DCS have the ability to graph the PV and control signal as a function of time? To save a 10 months one can afford to hire an expert or take a class to get educated. BTW, one can do a lot better than ZN with just a little effort and knowledge.

Peter Nachtwey Delta Computer Systems, Inc.

Reply to
Peter Nachtwey

Why shouldn't there be an equivalency? The plant gains and time constants ( poles and zeros ) will not change just because the controls are changed. Even if one PID uses gains and another uses time constants it is still easy to find the equivalence. I had a customer that used our product to tune a competitors product. I was upset when I heard about that.

Auto tuning consists of two phases.

  1. Systems identification to find the plant transfer function. This is the hard part. If you have this information you can save a lot of money if you don't need to recreate it.
  2. Calculate the feedforward gains as a function of the transfer function and calculating the PID gains as a function of the desired response and plant transfer function. This is easy.

One can tune systems by using a RSLogix trend file to calculate the transfer function. It isn't that hard. Does the current DCS have the ability to graph the PV and control signal as a function of time? To save a 10 months one can afford to hire an expert or take a class to get educated. BTW, one can do a lot better than ZN with just a little effort and knowledge.

Peter Nachtwey Delta Computer Systems, Inc.

Reply to
Peter Nachtwey

I don't see why you can't just transfer over the tuning settings from the old system's controller to the new system. You have to know your PID control-laws (PID algorithms); because if the new ones are somewhat different than the old ones, ofr if you change instrument ragnes or scales, then the P, I and D settings may need to be translated to their equivalents in the new system. However, once you know how to adjust the settings, you could probably just set-up a spreadsheet to do the lot. It certainly shouldn't be necessary to re-tune all the loops experimentally, from scratch.

Kelvin B. Hales Kelvin Hales Associates Limited Consulting Process Control Engineers Web:

formatting link

Reply to
Kelvin Hales

Most of my work has been replacing old controls with newer control systems. Most DCSs use a "standard" PID algorithm where the tuning of one is the equivilent of the tuning on another--with possible conversion of reset time to reset rate (simple inversion) or proportional band to gain (inversion multiplied by 100). So most likely the tuning of the new control system will be simply reuse of the old tuning. Some loops may take more time; some loops in the old system probably are not tuned correctly now, so the replacement will be a good time to check the tuning and retune a few loops. However, I would doubt if many (if any) loops will take a full day to tune if they are currently working.

I have worked with systems that have auto-tuning features that allow the engineer to start a tuning test, get the tuning parameters proposed by the system, and have them entered into the controller. In general, for most loops this does not save time over the process of starting with the old system's tuning, test it, and make any necessary changes. It may help in a few loops that are particular problems.

As for PLC+HMI vs. DCS, that involves many considerations, such as the amount of engineering and programming time you have available.

John

formatting link

Oren Yulevitch wrote:

Reply to
John Shaw

-snip-

Hey Peter:

I've nearly always had the luxury of working on systems that can be run in the lab, and which respond quickly enough to allow swept-sine measurements. Those which didn't all had plants whose predictability exceeded the control system goals by a good margin, allowing me to do a conservative design on paper, pour the resulting numbers into my algorithms, and call it good.

Combine those two facts with the fact that I'm a bit of a luddite and I've only very occasionally had occasion to use any form of system ID other than swept-sine, and when I have it has never been a critical part of the effort. If I _have_ had to do anything it was at the level of throwing an ARMAX algorithm at the thing and verifying that the estimated plant poles seemed to match my model -- I've never had to use such plant ID as my primary tool for controller design.

Do you have any book and/or web page recommendations that go into this with good depth? Ideally this would be a book that doesn't pull any punches with the math, yet is written with an appreciation for how to make it all work in the real world with all its grease and dirt.

Reply to
Tim Wescott

Tim Wescott wrote in news:5dedneAcheXSbQPeRVn- snipped-for-privacy@web-ster.com:

I seem to have lost track of what "this" you are asking about, but Astrom and Wittenmark, "Adaptive Control" has a good description of the RLS algorithm for system ID, and it doesn't skimp on the math.

System ID doesn't really shine for average run of the mill plants. It's great where the plant is non-linear, or likely to substantially change with conditions. Think of it as sort of a linearization. When you have a complicated high order or nonlinear system, you don't have to identify it within an inch of its life-- you need to identify it well enough to control it. The RLS tools let you model the complicated system as a low-order simple system, so long as the system is free to change with time.

Like many things, sometimes it works reasonably well, sometimes it doesn't. It depends on the wierdities of the system, and what you're trying to make it do. I wouldn't count on using it to exactly cancel a pole, for example.

Reply to
Scott Seidman

The expert in system ID is perhaps Lennart Ljung - his book "System ID Theory for the User" (I think that's more or less the title, as I don't have my copy close at hand) is what you are looking for. However, I must admit that I have not had much practical success with these methods and I'm like Tim who uses frequency response mostly.

fred.

Reply to
Fred Stevens

All things about System Identification.

I have that book, which does go into RLS methods. I was hoping for something that's _just_ about system ID -- unless I'm using the wrong term. I'm looking for methods that one would use if one has a plant that can only be loosely modeled, and must be sufficiently characterized to generate a decent control system.

Reply to
Tim Wescott

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.