PID Controller Tuning: A Short Tutorial - Instructables

Transcription

PID Controller Tuning: A Short TutorialJinghua ZhongMechanical Engineering, Purdue UniversitySpring, 2006

OutlineThis tutorial is in PDF format with navigational control. Youmay press SPACE or , or click the buttons in the lower rightcorner to move to the next slide. Clicking on the outlineditems will take you directly to that section.Goals and ObjectivesWhat are we going to learn?IntroductionWhat is a PID controller?Why do we want to learn the PID Controller?Tuning RulesHow does the PID parameters affect system dynamics?The Ziegler-Nichols tuning rule

What are we going to learn?The goal of the tutorial is for you to learn about the PIDcontroller and a few basic tuning rules of it. After taking thislesson, you will be able to1. relate PID controller parameters to step responsecharacteristics of the controlled system, and2. apply the famous Ziegler-Nichols tuning method to comeup with an initial set of working PID parameters for anunknown system.

What is a PID controller?A PID controller is a simple three-term controller. The lettersP, I and D stand for:IIIP - ProportionalI - IntegralD - DerivativeThe transfer function of the most basic form of PID controller,as we use in ME475, isC (s) KP KIKD s 2 KP s KI KD s sswhere KP Proportional gain, KI Integral gain and KD Derivative gain.

PID Controller structureIn this tutorial, we assume the controller is used in aclosed-loop unity feedback system. The variable e denotes thetracking error, which is sent to the PID controller. The controlsignal u from the controller to the plant is equal to theproportional gain (KP ) times the magnitude of the error plusthe integral gain (KI ) times the integral of the error plus thederivative gain (KD ) times the derivative of the error.Zdeu KP e KI edt KDdt

Why learn the PID controller?Because PID Controllers are everywhere! Due to its simplicityand excellent if not optimal performance in many applications,PID controllers are used in more than 95% of closed-loopindustrial processes.1 It can be tuned by operators withoutextensive background in Controls, unlike many other moderncontrollers that are much more complex but often provide onlymarginal improvement. In fact, most PID controllers are tunedon-site. Although we are learning all the theories in ME475 todesign the controller, the lengthy calculations for an initialguess of PID parameters can often be circumvented if weknow a few useful tuning rules. This is especially useful whenthe system is unknown.1Astrom K. J. and Hagglund T. H., “New tuning methods for PIDcontrollers”, Proceedings of the 3rd European Control Conference, 1995

How do the PID parameters affect systemdynamics?We are most interested in four major characteristics of theclosed-loop step response. They are1. Rise Time: the time it takes for the plant output y to risebeyond 90% of the desired level for the first time.2. Overshoot: how much the the peak level is higher thanthe steady state, normalized against the steady state.3. Settling Time: the time it takes for the system toconverge to its steady state.4. Steady-state Error: the difference between thesteady-state output and the desired output.

How do the PID parameters affect systemdynamics?The effects of increasing each of the controller parameters KP ,KI and KD can be summarized asResponse Rise TimeKPDecreaseKIDecreaseKDNTOvershoot Settling Time S-S creaseDecreaseNTNT: No definite trend. Minor change.You may want to take notes of this table. It will be useful inthe later part of the lesson.

How do we use the table?Typical steps for designing a PID controller are1. Determine what characteristics of the system needs to beimproved.2. Use KP to decrease the rise time.3. Use KD to reduce the overshoot and settling time.4. Use KI to eliminate the steady-state error.This works in many cases, but what would be a good startingpoint? What if the first parameters we choose are totallycrappy? Can we find a good set of initial parameters easilyand quickly?

The Ziegler-Nichols tuning rule to the rescueZiegler and Nichols conducted numerous experiments andproposed rules for determining values of KP , KI and KD basedon the transient step response of a plant.They proposed more than one methods, but we will limitourselves to what’s known as the first method ofZiegler-Nichols in this tutorial. It applies to plants with neitherintegrators nor dominant complex-conjugate poles, whoseunit-step response resemble an S-shaped curve with noovershoot. This S-shaped curve is called the reaction curve.

Using the reaction curve methodThe S-shaped reaction curve can be characterized by twoconstants, delay time L and time constant T , which aredetermined by drawing a tangent line at the inflection point ofthe curve and finding the intersections of the tangent line withthe time axis and the steady-state level line.

The Ziegler-Nichols Tuning Rule TableUsing the parameters L and T , we can set the values of KP ,KI and KD according to the formula shown in the table below.You may want to take notes of the table as we will use it laterin the quiz.ControllerPPIPIDKPTL0.9 TL1.2 TLKI00.27 LT20.6 LT2KD000.6TThese parameters will typically give you a response with anovershoot about 25% and good settling time. We may thenstart fine-tuning the controller using the basic rules that relateeach parameter to the response characteristics.

SummaryThis concludes the instruction part of our tutorial. We learnedtwo things about PID controllers.1. Relationships between KP , KI and KD and importantresponse characteristics, of which these three are mostuseful:IIIUse KP to decrease the rise time.Use KD to reduce the overshoot and settling time.Use KI to eliminate the steady-state error.2. The Ziegler-Nichols tuning rule (reaction curve method)for good initial estimate of parameters.Enough of theories and rules now, let’s move on to somehands-on experience!

The goal of the tutorial is for you to learn about the PID controller and a few basic tuning rules of it. After taking this lesson, you will be able to 1. relate PID controller parameters to step response characteristics of the controlled system, and 2. apply the famous Ziegler-Nichols tuning method to come