Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 32 of 39

Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual: Chapter 12 - Control Functions, pages 279 to 283

Pages 279 to 283 of 337, from Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual

The original document is the PDF (4.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the GE Fanuc IC692CPU211D / IC692MDR541C, Fanuc IC692CPU211D / IC692MDR541C, GE IC692CPU211D / IC692MDR541C and GE Fanuc IC693CPU311X

Page 279

12

Determining the Process Characteristics The PID loop gains, Kp, Ki and Kd, are determined by the characteristics of the process being controlled. Two key questions when setting up a PID loop are: 1.

How big is the change in PV when CV changes by a fixed amount, or what is the open loop gain?

2.

How fast does the system respond, or how quick does PV change after the CV output is stepped?

Many processes can be approximated by a process gain, first or second order lag and a pure time delay. In the frequency domain, the transfer function for a first order lag system with a pure time delay is: PV(s)/CV(s) = G(s) = K * e **(–Tp s)/(1 + Tc s) Plotting a step response at time t0 in the time domain provides an open loop unit reaction curve: CV Unit Step Output to Process 1

PV Unit Reaction Curve Input from Process a45709

K 0.632K t0 t0 Tp

Tc

The following process model parameters can be determined from the PV unit reaction curve: K

Process open loop gain = final change in PV/change in CV at time t0 (Note no subscript on K)

Tp

Process or pipeline time delay or dead time after t0 before the process output PV starts moving

Tc

First order Process time constant, time required after Tp for PV to reach 63.2% of the final PV

Usually the quickest way to measure these parameters is by putting the PID block in Manual mode and making a small step in CV output, by changing the Manual Command %Ref+13, and plotting the PV response over time. For slow processes, this can be done manually, but for faster processes a chart recorder or computer graphic data logging package will help. The CV step size should be large enough to cause an observable change in PV, but not so large that it disrupts the process being measured. A good size may be from 2 to 10% of the difference between the CV Upper and CV Lower Clamp values .

GFK-0467M

Chapter 12 Control Functions

12-91

Page 280

12 Setting User Parameters Including Tuning Loop Gains As all PID parameters are totally dependent on the process being controlled, there are no predetermined values that will work, however, it is usually a simple, iterative procedure to find acceptable loop gain.

12-92

1.

Set all the functional block parameters to 0, then set the CV Upper and CV Lower Clamps to the highest and lowest CV expected. Set the Sample Period to the estimated process time constant (above)/10 to 100.

2.

Put block in Manual mode and set Manual Command (%Ref+13) at different values to check if CV can be moved to Upper and Lower Clamp. Record PV value at some CV point and load it into SP.

3.

Set a small gain, such as 100 * Maximum CV/Maximum PV, into Kp and turn off Manual mode. Step SP by 2 to 10% of the Maximum PV range and observe PV response. Increase Kp if PV step response is too slow or reduce Kp if PV overshoots and oscillates without reaching a steady value.

4.

Once a Kp is found, start increasing Ki to get overshooting that dampens out to a steady value in 2 to 3 cycles. This may required reducing Kp. Also try different step sizes and CV operating points.

5.

After suitable Kp and Ki gains are found, try adding Kd to get quicker responses to input changes providing it doesn’t cause oscillations. Kd is often not needed and will not work with noisy PV.

6.

Check gains over different SP operating points and add Dead Band and Minimum Slew Time if needed. Some Reverse Acting processes may need setting Config Word Error Sign or Polarity bits.

Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002

GFK-0467M

Page 281

12

Setting Loop Gains, Ziegler and Nichols Tuning Approach Once the three process model parameters, K, Tp and Tc, are determined, they can be used to estimate initial PID loop gains. The following approach, developed by Ziegler and Nichols in the 1940’s, is designed to provide good response to system disturbances with gains producing a amplitude ratio of 1/4. The amplitude ratio is the ratio of the second peak over the first peak in the closed loop response. 1.

Calculate the Reaction rate: R = K/Tc

2.

For Proportional control only, calculate Kp as Kp = 1/(R * Tp) = Tc/(K * Tp)

3.

For Proportional and Integral control, use Kp = 0.9/(R * Tp) = 0.9 * Tc/(K * Tp) Ki = 0.3 * Kp/Tp

4.

For Proportional, Integral and Derivative control, use Kp = G/(R * Tp) Ki = 0.5 * Kp/Tp Kd = 0.5 * Kp * Tp

5.

where G is from 1.2 to 2.0

Check that the Sample Period is in the range (Tp + Tc)/10 to (Tp + Tc)/1000

Another approach, the “Ideal Tuning” procedure, is designed to provide the best response to SP changes, delayed only by the Tp process delay or dead time. Kp = 2 * Tc/(3 * K * Tp) Ki = Tc Kd = Ki/4 if Derivative term is used Once initial gains are determined, they must be converted to integer User Parameters. To avoid scaling problems, the Process gain, K, should be calculated as a change in input PV Counts divided by the output step change in CV Counts and not in process PV or CV engineering units. All times should also be specified in seconds. Once Kp, Ki and Kd are determined, Kp and Kd can be multiplied by 100 and entered as integer while Ki can be multiplied by 1000 and entered into the User Parameter %RefArray.

GFK-0467M

Chapter 12 Control Functions

12-93

Page 282

12

Sample PID Call The following example has a Sample Period of 100 milliseconds, a Kp gain of 4.00 and a Ki gain of 1.500. The Set Point is stored in %R1 with the Control Variable output in %AQ2 and the Process Variable returned in %AI3. CV Upper and CV Lower Clamps must be set, in this case to 20000 and 400, and an optional small Dead Band of +5 and –5 has been included. The 40 word RefArray starts in %R100. Closing the %M0006 contact enables a pair of BLKMV instructions, which set the initial parameter values by copying constants into the 14 words starting at %R102 (%Ref+2). (Note: to optimize parameters during the tuning process, access parameters by placing the Logicmaster cursor on the PID instruction and pressing the F10 key, which is the Zoom key.) The block can be switched to Manual mode with %M0001 so that the Manual Command, %R0113, can be adjusted. Bits %M0004 or %M0005 can be used to increase or decrease %R0113 and the PID CV and integrator by 1 every 100 millisecond solution. For faster manual operation, bits %M0002 and %M0003 can be used to add or subtract the value in %R0002 to/from %R0113 every PLC sweep. The %T0001 output is on when the PID is OK. Note that some of the registers in the 40-register parameter block are not included either because they are not used in this example, or they are not configurable because they are used by the PLC system. For additional parameter information, see Table 12-8.

12-94

Address

Value

Description

%R0102

+00010

Sample Period

%R0103

+00005

Dead Band +

%R0104

+00005

Dead Band −

%R0105

+00400

Proportional Gain (Kp)

%R0106

+00000

Derivative Gain (Kd)

%R0107

+01500

Integral Gain (Ki)

%R0108

+00000

CV Bias/Output Offset

%R0109

+20000

Upper Clamp

%R0110

+00400

Lower Clamp

%R0111

+00000

Minimum Slew Time

%R0112

+00000

Config. Word

%R0113

+00000

Manual Command

%R0114

+00000

Control Word

%R0115

+00000

Internal SP (Non-Configurable)

Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002

GFK-0467M

Page 283

12

| _____ _____ _____ | %M0006 | | | | | | | - - | | - - - | BLK_| - - - - - - - - - |BLKMV| - - - - - - - - - - - - - - - - - |BLKMV|– | | | | | | | | | CLR_| | INT | | INT | | | WORD| | | | | |%R00100 - |IN | CONST, |IN1 Q| - %R00102 CONST, |IN1 Q| - %R00109 | | LEN | +00010 | | +20000 | | | |00035| | | | | | |_____| CONST, |IN2 | CONST, |IN2 | | +00005 | | +00400 | | | | | | | | CONST, |IN3 | CONST, |IN3 | | +00005 | | +00000 | | | | | | | | CONST, |IN4 | CONST, |IN4 | | +00400 | | +00000 | | | | | | | | CONST, |IN5 | CONST, |IN5 | | +00000 | | +00000 | | | | | | | | CONST, |IN6 | CONST, |IN6 | | +01500 | | +00000 | | | | | | | | CONST, |IN7 | CONST, |IN7 | | +00000 |_____| +00000 |_____| | | _____ |ALW_ON | | %T0001 | - - | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | PID_| - - ( ) - - | | IND | | | | | %R0001 - |SP CV|– %AQ002 | | | | | | | %AI0003 - |PV | | | | |%M0001 | | | - - | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |MAN | | | | | | | %M0004 | | | | - - | | - - - - |UP | | | | | | | %M0005 | | |, - | | - - - - |DN | | |_____| | | %R00100 | _____ |%M0002 | | | - - | | - - - | ADD_| - - - - | | INT | | | | |%R00113 - |I1 Q| - %R00113 | | | | | | | %R0002 - |I2 | | | | | |_____| | | _____ |%M0003 | | | - - | | - - - | SUB_| - | | INT | | | | |%R00113 - |I1 Q| - %R00113 | | | | %R0002 - |I2 | | | | | |_____|

GFK-0467M

Chapter 12 Control Functions

12-95