Introduction to PID control . Anytime you adjust how you do something based on previous results, you are forming your own control loop . Anytime you adjust how you do something based on previous results, you are forming your own control loop. For example, when you want to drive your car at 6. But what happens when you start driving up a hill? The car slows because the torque to move a car at 6. Your foot, the speedometer, and your brain have formed a control loop. American cars have offered automated speed control loops — also known as cruise control — since 1. Similarly, modern industrial controls are often required to regulate processes as part of a control loop. The controller receives a setpoint request from the programmer and compares it to a measured feedback. The setpoint can be thought of as where I want to be and feedback can be thought of as where I really am. The difference between the setpoint and feedback is called the error . The job of the controller is to eliminate the error — so where I am is where I want to be. How do PID loops work? PID is an acronym for the mathematical terms Proportional, Integral, and Derivative. Proportional means a constant multiple. A number is said to be a proportion to another if there exists a constant n such that y = nx. This n can be positive or negative, greater or less than one. To make the formula more accurate by PID controller standards, proportion is given by KP and the x term is the control loop error . In the case of controller PID that is the sum of error over time: y = . Interpreted by a PID controller: All three of these PID controller components create output based on measured error of the process being regulated. If a control loop functions properly, any changes in error caused by setpoint changes or process disturbances are quickly eliminated by the combination of the three factors P, I, and D. DC Motor Speed: Digital Controller Design. Key MATLAB commands used in this tutorial are. According to the DC Motor Speed: PID Controller Design page. Once the PID controller has the process variable equal to the setpoint, a good PID controller will not vary the output. You want the output to be very steady.
A PID Controller For Lego Mindstorms Robots. The basic PID program described above has a dT of about 0.015 seconds, which should be fast enough. What is a Temperature Controller? PID Temperature Controllers / PID Temperature Controller / D Compact PID Controllers and Meters. Let us now analyze how each contributes to performance. Proportional factor. The proportional factor is easiest to understand: The output of the proportional factor is the product of gain and measured error . Hence, larger proportional gain or error makes for greater output from the proportional factor. Setting the proportional gain too high causes a controller to repeatedly overshoot the setpoint, leading to oscillation. The downside to a proportional- only loop is that when error becomes too small, loop output becomes negligible. Therefore, even when the proportional loop reaches steady state, there is still error. The larger the proportional gain, the smaller the steady state error — but the larger the proportional gain, the more likely the loop is to become unstable. This dilemma leads to inevitable steady- state error called offset. Integral factor. Think of the integral factor as a basket in which the loop stores all measured error (. Remember that error can be positive or negative, so sometimes error fills the basket (when positive error is added to positive error or negative error is added to negative) and sometimes it empties the basket — as when positive error is added to negative, or vice versa. When the integral factor functions properly in the control loop, the basket is nearly empty. Even when error is so small that the proportional factor is no longer effective, the integral is still hard at work, collecting error until it is large enough to matter — as part of the integral's function is to eliminate steady- state offset. In fact, most control loop action at steady state is due to the integral factor. Controllers that feature integral reset prove it: Resetting the integral when a loop is in steady state causes controller output to momentarily drop to zero as the integral “basket” is emptied. The downside to the integral factor is that it strongly contributes to controller output overshoot past the target setpoint. The shorter the integral time, the more aggressively the integral works. Derivative factor. The derivative factor is the least understood and used of the three factors. In fact, a majority of PID loops in the real world are really just PI loops. That does not negate the fact that there are certain applications in which the derivative plays a very important role. The proportional corrects instances of error, the integral corrects accumulation of error, and the derivative corrects present error versus error the last time it was checked. In other words, the derivative is looking at the rate of change of the error . The more error changes or the longer the derivative time, the larger the derivative factor becomes. The effect of the derivative is to counteract the overshoot caused by P and I. When the error is large, the P and the I will push the controller output. This controller response makes error change quickly, which in turn causes the derivative to more aggressively counteract the P and the I. A properly used derivative allows for more aggressive proportional and integral factors. Larger derivative time makes the derivative more aggressively dampen P and I. Controllers: How they work. How a PID controller works is a pretty easy concept to understand. The PID controller looks at the current value of an error . The controller continues to apply the correction until change is seen on the feedback. Depending on the error calculation update rate (which in turn may depend on how often the loop feedback is read) the corrective action can be adjusted at a fast rate — for instance, the analog feedback on some variable frequency drives is updated every 1. The job of a PID controller is to force feedback to match a setpoint. Sometimes error between feedback and setpoint is caused by a setpoint change, but in most applications the setpoint is not adjusted much. More often, error in a loop is caused by disturbances in measured feedback. In our beginning example, the disturbance of cruise- control regulation was a hill encountered on a road over which a car travels. Other examples of disturbances are double doors opening in a building where pressure is regulated, or people showering while a control loop works to regulate the connected water- tank level. Techniques for fine tuning. Tuning a control loop is the adjustment of its control parameters (gain/proportional band, integral gain/reset, derivative gain/rate) to optimum values for a target response. Tuning is part of loop design, usually required if the system oscillates too much, responds too slowly, has steady- state error, or is unstable. One must be careful when determining whether a PID needs tuning or not: Always check hardware first, as it could be the problem and not the controller that needs tuning. A PID most likely needs tuning if. On the other hand, problems may have nothing to do with the PID loop tuning if a control valve sticks, measurement taps are plugged, sensors are disconnected, or if a control valve is stripped out from high- pressure flow. Some systems have interactions of widely varied strengths — and there is no single definition of “best tuned” that applies to all loops, so no single method optimizes all loops. The optimum behavior in a process or setpoint change depends on the application. Some processes must not allow overshoot of a process variable, while others must minimize energy expended in reaching a new setpoint. Generally, response must be stable and systems must not oscillate for any combination of conditions and setpoints. Tuning of loops is further complicated by process response time, as it may take minutes or hours for a setpoint change to produce a stable effect. Some processes also exhibit nonlinearity, so parameters that work well at full- load conditions don't work when starting from no- load. Several methods are available for tuning a PID loop; the choice of method largely depends on whether or not the loop can be taken offline for tuning, and the system response speed. If the system can be taken offline, the best tuning method often involves subjecting the system to a step change in input, measuring output as a function of time, and using this response to determine control parameters. If the system must remain online, one tuning method is to first set I and D values to zero and increase P until loop output oscillates — then increase I until oscillation stops, and increase D until the loop is acceptably quick in reaching its reference. A fast PID loop tuning usually overshoots slightly to reach the setpoint more quickly. Another is known as the Ziegler- Nichols method, introduced by John G. Ziegler and Nathaniel B. Nichols of Taylor Instruments in 1. This technique also involves setting I and D gains to zero and then increasing P gain until the loop output starts to oscillate. Document critical gain Kc and the oscillation period of the output Pc before adjusting P to 0. Kc, I to 0. 4. 5 Kc, and D to 0. This proven online method is adequate for loops where quarter- wave decay is acceptable. In fact, most industrial facilities no longer tune loops with manual calculation, but use tuning and loop optimization software. These software packages gather data, develop process models, suggest optimal tuning, and even develop tuning by gathering data from reference changes. This can be done both on and offline. It may also include valve and sensor analysis, and simulation before downloading. The only drawbacks: Software is somewhat costly and involves some training. The analytical approach involves mathematics. PID loop tuning induces an impulse in the system, and then uses the controlled system's frequency response to design PID loop values. In loops with response times of several minutes, mathematical loop tuning is recommended because trial and error can literally take days just to find a stable set of loop values. Optimal values are harder to find, but can save a company huge amounts of money. Commercial software is available from several sources, and can easily pay for itself if a PID loop runs large or expensive processes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2016
Categories |