Smooooth Operations - Configuration Tips for Analog Blocks
Smooooth OperationsConfiguration Tips for Analog Blocks
Presenters James Beall Principal Process Control Consultant Barbara Kerr Hamilton Senior Industrial Energy Consultant Nikki Bishop Senior Applications Consultant
Introduction Discuss useful features and options of the PID Block Explain how to use BKCAL’s in Cascade Control and explain the various options Identify additional uses of BG and RTO blocks and how to use them Demonstrate examples of these features and options
TOPIC 1: The simple PID block “I don’t understand all I know about this”
PID “Form” Three Common PID Forms – Standard, aka ISA Form (DeltaV default) – Series, aka Classical Form – Parallel Form (not available in DeltaV) Read the fine print…FORM None Selects equation form (series or standard). If Use Nonlinear Gain Modification is selected in FRSIPID_OPTS, the form automatically becomes standard, regardless of the configured selection of FORM.
Series and Standard Forms Error TDS D Output Series P + PV + KC + PROCESS SP + - 1 TR s I I 1 Standard Error = SP - PV TR s OUTPUT P SP + PV KC + PROCESS - TDS D
PID “Form” Choice Prior system experience and/or migration Personal Preference - Standard (RS3, etc) or Series (Provox, etc.) Series is identical to Standard form if Derivative action is NOT used Can impact conversion of tuning constants from previous control system
Convert Series (Classical) to Standard Series is identical to Standard form if Derivative action is NOT used TR should be time/rep; units = seconds TD should be in seconds Be sure to convert to your tuning constant units after form conversion TR Classical + D Series Series + T TD Classical KC Standard = KC Series * TR Classical Series 0 TR Standard = TR Series ++ TTD Series D Classical 0 TR Classical TD Series Series * * TD Classical TD Standard = 0 ( TR Classical + D Series ) ) Series + T TD Classical
Structure: PI on error, D on PV Controller Output – Flow to reactor SP
Structure: I on error, PD on PV Controller Output – Flow to reactor SP
Structure: 2 Degrees of Freedom BETA - determines the degree of proportional action that will be applied to SP changes. – Range = 0-1 – BETA=0 means no proportional action is applied to SP change. – BETA=1 means full proportional action is applied to SP change. GAMMA - determines the degree of derivative action that will be applied to SP changes. – Range = 0-1 – GAMMA=0 means no derivative action applied to SP change. – GAMMA=1 means full derivative action is applied to SP change.
PID “IDEADBAND” (Integral Deadband) Limits the movement of the controller output when the error is less than the IDEADBAND – Integral action stops – Proportional and Derivative action continue – Same Engineering Units as PV Scale Uses: – Mitigates effect of valve “stiction” (but leaves offset) – Allows P-only control if within deadband
PID: Setpoint Processing SP_FTIME: Time constant of 1st order SP filter – seconds – Applies in AUTO, CAS and *RCAS (*not specified in BOL) SP_RATE_DN: Ramp rate for SP decreases SP_RATE_UP - Ramp rate for SP increases – PV units per second – If set to 0.0 then SP is used immediately. – Applies only in AUTO (not CAS or RCAS)
Set Point Limits SP_HI_LIM- The highest SP value (EU’s) allowed. SP_LO_LIM - The lowest SP value (EU’s) allowed. CONTROL_OPTS – allow you to specify if SP Limits to be obeyed in “CAS and RCAS” Can use “Output Limits” of Master loop in cascade pair to limit SP to Slave loop ONLY in CAS and RCAS
Gain Scheduler Provides up to 3 regions of different PID tuning parameters based on a selected state variable (output, PV, error, or “other”) Provides a smooth transition between regions Create PID module using Module Templates: Analog Control/PID_GAINSCHED OR, add function to existing PID module – Expose Gain, Reset and Rate parameters on PID function block – Copy all function blocks from template except the PID FB and link as needed.
FRSIPID_OPTS: Non-linear Gain Modifies the proportional Gain as a function of the error (PV-SP) Makes the tuning more aggressive as the PV is farther from the set point Can create the “error squared” PID function
FRSIPID_OPTS: Non-linear Gain The PID “Gain” is multiplied by “KNL” which has a value between 0 and 1 as a function of the error (SP-PV). Knl Knl=1 Knl=NL_MINMOD e= PV-SP NL_GAP NL_HYST NL_TBAND
FRSIPID_OPTS: Non-linear GainTIP: I typically set NL_HYST = 0 unless it is a for a“valve position controller.
FRSIPID_OPTS: Non-linear Gain GAIN ≥ modified PID gain ≥ GAIN * NL_MINMOD But neither GAIN nor GAIN_WRK show the modified gain value! Caution – Integrating Processes – May cause oscillation at reduced gain – For these applications, the reset time should be based on “Gain*MINMOD” which will result in a larger reset time to prevent oscillations. – Consider using the Gain Scheduler instead (so you can change gain and reset)
FRSIPID_OPTS: Non-linear Gain Caution! PID Form is set to Standard regardless of the configured FORM parameter value – Also, if the Non-linear Gain option is enabled, the STRUCTURE will be “PID on error” regardless of the PID Structure chosen (including 2 degrees of freedom). – So if you move the SP such that the error is outside of NL_GAP+NL_HYST, there will be a “proportional kick” of the output – Test this on your application!
FRSIPID_OPTS: Non-linear Gain “Error2” “Error squared” PID function – error*abs(error) Proportional = error*abs(error)*gain = error* (abs(error)*gain) Proportional = error*(Modified Gain) Non-linear Gain Modified Gain = abs(error)*Gain Settings for E2 Modified Gain Activate NL Gain NL_MINMOD = 0 NL_GAP = 0 NL_TBAND = 100% of PV Span (EU’s) Error NL_HYST = 0
Topic 2: Block Initialization and Options The single most BKCAL_IN and BKCAL_OUT misused and misunderstood How to use it …. connection in DeltaV!! When to fool it….
Don’t Be Frightened by BKCAL’s! Don’t let BKCAL’s scare you away! They are quite useful little “critters” and can make your life a lot easier.
What is a BKCAL? Downstream loop “talks” to the upstream loop and tells it what’s going on. Information such as: – Can the downstream loop receive a setpoint? – If not, why? And where should the upstream output be to match the local downstream setpoint? “Hey there, Mr. “No problem, Mr. “Sound great, Mr. Upstream, I am Downstream. Just Upstream. That not quite ready for tell me what your way, when I am your SP. I’ll let current SP is so that ready for your SP, you know when I I can make my we will be all am ready.” output match.” matched up.”
What’s in a BKCAL? BKCAL_OUT Value – SP (default) – PV (selected in CONTROL_OPTS of downstream PID block) BKCAL_OUT Status : BKCAL_OUT SubStatus : – Bad – NotLimited – Uncertain – LowLimited – GoodNonCascade – HighLimited – GoodCascade – Constant
BKCAL’s and Block Initialization “Ok. Where should my output be to LT FT “bump-less” – match your local setpoint?” neither the setpoint A nor the valve on the flow loop will K f bkcal jump to a new T A T “I am not ready value when placed for your SP right now. I’ll let you in CAScade output know when I am ready.” A T “balance-less” – setpnt operator does not K f have to “line up” T A T level output with F(x) flow setpoint to F(x) change modes
Important Control Options FRSIPID_OPTS CONTROL_OPTS Dynamic Reset Limit Use PV for BKCAL_OUT SP-PV Track in LO or IMAN SP-PV Track in MAN
But what do those things mean? Use PV for BKCAL_OUT – Use this on slave loops to send the actual PV upstream to the master instead of the SP when in CAScade mode. – In AUTO, MAN, IMAN, and LO the SP is still used for the BKCAL_OUT – If used in conjunction with DRL on the master, will prevent reset windup if/when the slave loop cannot make setpoint. SP-PV Tracking – SP will be set equal to PV in the modes selected. – Separate checkboxes for MAN and LO / IMAN. Usually check both.
Output limiting and reset windup Dynamic Reset Limiting on PID block: – BKCAL_IN will be used for reset feedback instead of the internal “OUT” of the PID algorithm. – If BKCAL_IN is not changing, reset cannot “wind”. – Default DeltaV PID blocks use internal “OUT” for reset feedback and the internal reset calculation can continue past the OUT limit Example - Flow loop with cascade setpoint – PID configured with low output limit of 20% – If loop cannot make setpoint, output will clamp at 20% – But internal reset action will continue – Internal PID output will “wind” all the way to 0%
How can you prevent windup? What to do – Set the Anti-Reset Windup (ARW) limits equal to OUT limits • Reset action will return 16X faster than normal – Use Dynamic Reset Limit on PID block • BKCAL_IN will be used for reset feedback instead of internal “OUT” • If BKCAL_IN is not changing, reset cannot “wind”.
Enabling PID External Reset Utilized most often in the primary loop of a cascade Compensates for “unexpected” slow secondary loop response or secondary PV limited before its OUT limited
Anti Reset Windup Standard – Limited conditions in the Slave loop are taken care of through the BKCAL feature – Integral action is turned off in the direction of the limited status Dynamic Reset Limiting – Prevent reset windup with external reset – Select “Dynamic Reset Limit” in FRSIPID_OPTS on the Master loop – Select “Use PV for BKCAL_OUT” in CONTROL_OPTS on the Slave loop
Anti-Reset Windup Limits Improves process recovery from saturation ARW_LO_LIM must be >= OUT_LO_LIM – When OUT is between above numbers, reset action to increase the output is decreased by 16X – Process recovery from low limit is faster until output is > than anti-reset windup limit ARW_HI_LIM must be <= OUT_HI_LIM – When out is between above numbers, reset action to decrease the output is decreased by 16X – Process recovery from high limit is faster until output is < than anti-reset windup limit
Setting ARW limits Default values are 0 and 100 – Units are the same as OUT_SCALE – Set ARW limits are equal to OUT limits or scale as a start Example: – Master loop: OUT_SCALE is 0-25,000 lbs/hr. – Set ARW_HI_LIM = 25,000 Set ARW_LO_LIM = 0
Setting ARW Limits – IMPORTANT! Control Instability – If the ARW limits are “inside” the OUT limits, reset action can be based upon RESET in one direction and RESET∕16 in the other – poor control and loop instability can result. WARNING – Version Upgrade!! – Early DeltaV (V6 and before) this feature did not work – If you violated above guidelines prior to V7, it didn’t cause problems until you upgraded to a later version!
Setting ARW limits Example: ARW_LO_LIM > OUT_LO_LIM PV SP ARW_LO_LIM OUT OUT_LO_LIM Example: ARW_HI_LIM < OUT_HI_LIM – Dampers passes only slightly more flow at 100% than 75% – Set ARW_HI_LIM to 75%, but keep OUT_HI_LIM at 100%
Topic 3: Additional Control Strategies Override Control < PC Valve F(x) FC Characterization FC PT Hot Cold FT FT Water Water TT LT To Reactor
Start Simple – a single PID loop PC PT Hot Cold Water Water TT LT To Reactor
Valve Characterization PC F(x) FC FC PT Hot Cold FT FT Water Water TT LT To Reactor
Output Characterization to Valve Use a “Signal Characterizer” function block to change valve characteristics – Note the best solution is to change valve trim to proper characteristic SGCR •Characterizes IN_1 to OUT_1 •Reverse Char. IN_2 to OUT_2
Output Characterization to Valve See Books On Line for rules for the X and Y curves Set “SWAP_2” = TRUE to provide a “reverse” characterization for the BKCAL signal (The answer in V9.3 and later is “Change X by Y axis on IN-2”.) BOL: The SWAP_2 parameter swaps the X and Y axes used for OUT_2. When the SWAP_2 parameter is True, IN_2 references the CURVE_Y values and OUT_2 references the CURVE_X values. In addition, the IN_2 units change to Y_UNITS and the OUT_2 units change to X_UNITS. IF YOU DON’T SELECT THIS OPTION, IT WILL APPEAR TO WORK BUT THE AO OUTPUT WILL CHANGE DURING A DOWNLOAD!!!
Override Control < PC F(x) FC FC PT Hot Cold FT FT Water Water TT LT To Reactor
Using CTLSL for Override Control One valve – two controllers Example: low pressure override on a flow loop – Master control loop determines flow setpoint – Flow loop determines valve position to control flow as long as header pressure can be maintained. – If header pressure gets too low, pressure override loop “takes over” and determines valve position. The Good News: No Windup – DeltaV “turns off” the integral action if a controller is not the selected controller in a CNTLSL block. No windup! The Bad News: What happens when switching to MAN? – The valve “belongs” to the flow controller – If override is active, you will get a bump when switching to MAN – The fix: pulse flow loop to LO with BKCAL_IN as TRK_VAL when target mode transitions to MAN – Defeat override in MAN using output limits and DRL
Topics 4: BG and RTO blocks RULE #1 NEVER EVER use SUB, ADD, MUL, DIV, or CALC blocks to modify a setpoint RULE #2 When modifying a setpoint ALWAYS use BG or RTO blocks RULE #3 If you break Rules #2 and #3, you MUST provide your own BKCAL values and they MUST include the right status. Good luck with that.
Bias-Gain (BG) Function Block OUT = (SP + IN_1) * Gain
Bias-Gain (BG) Function Block Typical Use of BG Block B/G Boiler 1 PIC B/G Boiler 2 B/G Boiler 3
Make your own PV on a BG block Some bias strategies require a “PV” for BKCAL_OUT Example: – To optimize the use of a lower cost energy source, configure the demand of the higher cost source using a BG block – Higher Cost Demand = Total Energy Demand – Actual Lower Cost Flow Use BG block for higher cost setpoint calculation – Connect OUT of master loop to CAS_IN – Connect (0 - actual MBTU / HR) of lower cost source to IN_1 – This will subtract the actual low cost value from the demand. – Compute the “PV” of the BG block by summing the actual MBTU / HR of each energy source. – Use a CALC block to transfer the correct BKCAL_OUT status and use the “PV” for BKCAL_OUT value.
Bias-Gain Function Block CONTROL_OPTS – “Act on IR” (act on initialization request) • If checked, when Bias/Gain Block transitions from non-automatic to automatic, the current Bias will remain as the SP. • If not checked, when Bias/Gain transitions from non-automatic to automatic, an internal register is used to move from the actual Bias from the current value to the retained Bias SP in the “Balance Time” – “Use BKCAL_OUT With IN_1” – check if the OUTPUT of a Controller goes to IN_1 AND you want it to operate in Cascade with the Ratio Block FRSIBG_OPTS – “Treat IN_1 as wild” –if True, IN_1 is treated as a non-cascade input and if “Use_BKCAL_OUT With IN_1” is True, BKCAL_OUT sub-status will be set to keep cascade closed. Be careful with this one!
Ratio (RTO) Function Block OUT = SP * IN_1 * Gain
Ratio Control Typical Use of RTO Block Main Flow Ratio SP IN1 From RTO Block Operator X OUT SP to Manipulated FIC
Using the PV of a RTO block RTO blocks are not just for ratio control – Use RTO blocks to compute setpoints that require a change in engineering units Example: – The OUT_SCALE of the master loop is in MBTU / HR – The PV_SCALE of the flow loop in is GPM Use RTO block to convert from MBTU / HR to GPM – Connect OUT of master to CAS_IN – Connect the inverse of the heating value to IN_1 – Use GAIN for unit conversion (MLB to GAL and HR to MIN) – Connect actual flow to IN – The PV of the RTO will equal the actual MBTU / HR flow
Business Results Achieved PID block features can be used to significantly improve the performance of your control schemes Providing advanced control strategies that do not bump with mode changes: – Prevents the controls from introducing upsets – Gives the operators confidence in the controls – Allows the operators to react quickly to process issues Preventing reset windup: – Allows the controls to be more responsive when “changing directions” – Allows for more aggressive tuning without instability Bottom line: Better control performance = $$$$
Summary DeltaV has many useful control features of the PID block Block Initialization is essential for good control If there is a connection to CAS_IN… There needs to be a connection from BCKAL_OUT “Easy DeltaV” can get you in trouble with multi cascaded loops unless you take care to connect up the BKCAL’s correctly and check the right CONTROL_OPTS and FRSIPID_OPTS. BG and RTO block are useful for providing much needed BKCAL’s
Where To Get More Information EGUE Exhibit Area – Industry Solutions Group Emerson Process Management Education Services: http://www2.emersonprocess.com/EN- US/brands/edservices/Pages/EducationalServices.aspx Emerson Process Management, Industry Solutions Group DeltaV Books Online Emerson Process Improvement and Optimization Consulting: http://www2.emersonprocess.com/en- US/brands/processautomation/consultingservices/ProcessImprovem entOptimization/Pages/ProcessImprovementOptimization.aspx Ask for a copy of this .FHX and play with the simulation. James.Beall@Emerson.com Barbara.Hamilton@Emerson.com Nikki.Bishop@Emerson.com