Control Loop Investigations Peter Thomas Control Specialists Ltd ExperTune User Conference Austin Texas April 2007 www.controlspecialists.co.uk Control Loop Investigations Bridging the gap between Industrial Processes and the Programmable Systems that control them. www.controlspecialists.co.uk 1
Background Established 1989 - British Standards Institute (BSI) ISO9001:2000 Tick IT registered Certified Suppliers of FDA / GAMP Validated Control Systems for AstraZeneca -international Pharmaceutical Manufacturer Approved Solutions Partner (Sales, Support & Training) of ExperTune Inc. Experience of working in Oil, Pharmaceuticals, Chemicals, Glass, Food and Water. Control Loop Investigations An overview of control loop investigations. Common control issues. A practical example. 2
The Main Stages of a Control Loop Investigation Control Loop Report Site Assessment Loop Tuning Control Software Review Process Modeling (when required) Analysis of Data Open Loop Testing Site Assessment Controllers +J Sensors -1 +1 Valves -J Process Familiarisation Assessment of installation / current settings. Process Review of documentation Discussion with users. 3
Factors affecting a process control loop Design Configuration Setpoint Changes Wrong PID values Controller Sensor Range Location Sampling Filtering Noise Sizing Linearity Hysteresis Stiction Valve Process Interactions Non-Linearities Disturbances Software Review A line-by-line analysis of the control-specific sections of the software. Control strategies and implementation. Code commenting and modularisation. Reconciliation with software documentation 4
Open Loop Testing Process type identification Process signature PG, TC, DT Identification of process gain variations Hysteresis analysis Noise analysis Process interactions. Process Modelling When required, the creation of bespoke computer models to simulate the response of the process can dramatically reduce loop tuning time. Offline demonstration of system response before implementation. Reduces tuning time. Allows offline problem analysis. Written in using Visual Basic. 5
Loop Tuning Controller Sensor PID settings to fit the process. Input Filtering Derivative Gain Measurements taken from process determine PID values Valve Bumpless-Transfer options Process Loop Analysis Process type identification Process signature PG, TC, DT Identification of process gain variations Hysteresis analysis Noise analysis Process interactions. 6
Control Loop Report A final report containing the results of the investigation & recommendations A formal record of the findings. Can act as a baseline response document to assist in identifying the cause of problems in the future. Helps avoid similar problems in the future Control Loop Investigations An overview of control loop investigations. Common control issues. A practical example. 7
Software The following are typical examples of the findings of a software review on control systems:- Incorrect handling of PID blocks within PLC s Many parameters left set to their default, factory-set values. Lack of Process Variable (PV) filtering facilities. Poor commenting / modularisation. A lack of understanding of interaction between control systems and processes. Incorrect implementation of control strategies e.g. cascade, feed forward, split range controllers etc. Installation The following are examples of some issues that have been encountered during control analysis at various sites: Valve hysteresis Valve stiction / resolution Incorrect measurement filtering Poor location of instrumentation. Deadtime-dominant loops that could have been avoided. 8
Valve Hysteresis Valve hysteresis or backlash occurs when the valve is required to change direction. It generally gets worse with time and valve wear. It results in poor control and loop performance. Can result in well controlled loops going out of control. The hysteresis on actuated valves with positioners should be less than 1%. Low hysteresis actuators are available. One of the most common cause of problems. Controller output Process Variable Valve Resolution / Stiction Valve resolution determines the minimum possible flow changes. Stiction will effectively reduce the resolution. Stiction should not be apparent in new valves. Often results from packing being too tight. Although valves maybe sized correctly their resolution may be such that their minimum movement results in the flow change standard being breached. This should be considered at the design stage and if necessary fine/coarse control specified. 9
Measurement Filtering Measurements should be setup with the minimum necessary filtering: Insufficient filtering will result in noisy readings that make it necessary to detune control loops Excessive filtering will hide process variable spikes and are likely to lead to problems with other control loops e.g. ph. There is often a temptation to over filter measurements in an attempt to meet the necessary criteria. Software filters should allow easy modification of values and enable nuisance alarms to be eliminated. Instrument location You can t control what you can t measure!! Insufficient mixing of chemicals. Sensor not in contact with the process. The presence of noise on the process signal. Unreliable readings. Problems due to Deadtime. 10
% Step Response Analysis CONTROL OUTPUT (OP) DT TC As the ratio of DEADTIME (DT) to TIME CONSTANT (TC) increases, control becomes more and more difficult PROCESS VARIABLE (PV) Try to ensure that DT is about half of TC TIME Why is deadtime important? Pu = Deadtime * Time Constant Pu < 1 Control better the closer it gets to 0 Pu = 1 Control will be OK Pu > 1 Controller will have to be detuned Pu >>1 Normal PID will find this very difficult. * - Note, deadtime is also dependent upon the controller scan rate 11
Common Issues Summary and Recommendations Software, control strategies and supporting documentation should be clearly specified and reviewed prior to commissioning. Valves are the most common source of control problems. Deadtime dominant loops should be avoided. Input filtering needs to be carefully considered to prevent problems with other loops. Control Loop Investigations An overview of control loop investigations. Common control issues. A practical example. 12
Overview A major refurbishment project had recently been completed to protect against cryptosporidium and provide sludge treatment facilities. On completion of the commissioning it became apparent that the filter level and ph control loops were not meeting the required performance criteria. Additional flow increases were also required and it was planned to remove the static mixer in order to achieve the required flow rate. CSL were asked to assess the filter level and ph control loops and investigate the possibility of using downstream measurements to control the ph. Site Assessment Actuators installed upside down making configuration difficult. Sample lines coiled on the floor resulting in different line lengths. Valve resolutions close to compromising the acceptable response to disturbances. Ineffective implementation of fine/coarse control. The project documentation varied from sparse to very detailed but with the latter suffering from inconsistencies and repetitions. In reading these documents, it was difficult to determine whether or not the original user requirements had been satisfied. 13
Software Review No PID controller used for level control. Non-conventional valve driving control algorithm. Software overly complex, poorly commented and difficult to support. Software-specific documentation sparse. ph Control Loop 14
Control Loop Schematic Static Mixer Closed Loop As Found Tests on ph 9.5 9.4 9.3 9.2 9.1 9 Final ph (Q53507) Mealbank ph (Q53503) Mealbank ph (Q53504) 8.9 8.8 8.7 8.6 8.5 11:15:00 11:30:00 11:45:00 12:00:00 12:15:00 12:30:00 12:45:00 13:00:00 15
Open Loop Tests on ph Loop Open Loop Tests on ph Loop Noisy signal, poor mixing? 16
Open Loop Tests on ph Loop output step Open Loop Tests on ph Loop poor valve resolution? 17
Open Loop Tests on ph Loop differing deadtimes why? Open Loop Tests on ph Loop 18
Lime Dosing Analysis - poor Control Lime Flow (m³/h) 50 45 40 35 Lime Flow (m³/h) 30 25 Lime Flow (m3/hr) 20 11:15:00 11:30:00 11:45:00 12:00:00 12:15:00 12:30:00 12:45:00 13:00:00 Pressure Loop Analysis - unusual jumps in PV 50 0.6 45 0.5 40 0.4 35 0.3 Lime Flow (m³/h) Lime Pressure (bar) 30 25 Lime Flow (m3/hr) Lime Pressure (Bar) 0.2 0.1 20 11:15:00 11:30:00 11:45:00 12:00:00 12:15:00 12:30:00 12:45:00 13:00:00 0 19
Pressure Loop Analysis Low Limit set @ 50% 55 0.6 50 0.5 45 0.4 40 35 0.3 Lime Flow (m³/h) PU113001 Speed (%) Lime Pressure (bar) 30 25 20 Lime Flow (m3/hr) Lime Pressure (Bar) Pump Speed (%) 11:15:00 11:30:00 11:45:00 12:00:00 12:15:00 12:30:00 12:45:00 13:00:00 0.2 0.1 0 Re-tuning of the Lime Dosing Loop and reduction of PIC low output limit 70 0.8 60 0.7 50 0.6 40 30 0.5 Lime Flow (m³/h) PU113001 Speed (%) Lime Pressure (bar) 20 10 0 Lime Flow (m3/hr) Lime Pressure (Bar) Pump Speed (%) 14:30:00 14:45:00 15:00:00 15:15:00 15:30:00 0.4 0.3 0.2 20
Modelling ph Loop The system was modelled in Visual Basic using the downstream ph measurement. The performance of the system was modelled prior to making any changes to simulate the control performance that could be expected. Analysis with ExperTune PID Loop Optimizer 21
Retuning of ph Loop 9 8.9 8.8 8.7 8.6 8.5 Mealbank ph (Q53503) ph setpoint 8.4 8.3 8.2 8.1 8 9:30 9:45 10:00 10:15 10:30 10:45 11:00 11:15 11:30 11:45 12:00 12:15 12:30 Report on ph Loop 22
ph Loop Summary Investigations revealed that associated loops were not controlling correctly, thereby affecting the ph loops. Improving the lime flow and pressure control loops allowed the ph loop to be tuned with confidence. Note that where a small valve resolution is required a fine/coarse control strategy should be considered. Although fine/coarse control valves were present on the lime dosing line the control strategy did not utilise them effectively. Tests were conducted using the downstream ph measurement. The ph loops were retuned with the downstream ph measurement. A 24 hour test was conducted showing significant improvement in ph control and the asset standard was met. Filter Level Control Loop 23
Filter Level Control INLET OUTLET Filter Level Control W A S H M O D E T O O N L I N E T R A N S I T I O N L O G I C A _ S T A R T _ F W ( L A D D E R 1 4 0 ) Y E S S T A R T E n a b le d? O P E N I N L E T V A L V E A V 0 4 ( B 1 5 : 0 / 0 ) C L O S E O U T L E T V A L V E A V 0 6 A ( B 1 5 : 0 / 1 ) C L O S E O U T L E T V A L V E A V 0 6 B ( B 1 5 : 0 / 2 ) C L O S E B / W A S H V A L V E A V 0 7 A ( B 1 5 : 0 / 3 ) C L O S E B / W A S H V A L V E A V 0 7 B ( B 1 5 : 0 / 4 ) C L O S E D R A I N V A L V E A V 0 8 ( B 1 5 : 0 / 5 ) C L O S E A I R S C O U R V A L V E A V 1 0 0 A ( B 1 5 : 0 / 6 ) C L O S E A I R S C O U R V A L V E A V 1 0 0 B ( B 1 5 : 0 / 7 ) Y E S L E V E L ( N 4 0 : 0 ) < S E T P O I N T ( N 2 9 : 1 1 )? N O S T A R T F I L L T I M E R ( T 4 : 8 2 ) S T A R T 0-3 0 m i n D E L A Y T I M E R ( T 4 : 8 3 ) N O Y E S T 4 : 8 2 E X P I R E D? C L O S E I N L E T V A L V E A V 0 4 ( B 1 5 : 0 / 0 ) R A I S E A L A R M - T O O L O N G T O F I L L Y E S T 4 : 8 3 E X P I R E D? O P E N I N L E T V A L V E A V 0 4 ( B 1 5 : 0 / 0 ) O P E N O U T L E T V A L V E A V 0 6 A ( B 1 5 : 0 / 1 ) * O P E N O U T L E T V A L V E A V 0 6 B ( B 1 5 : 0 / 2 ) * * F O R C E O P E N F O R 8 s ( T 4 : 6 6 ) O N G O I N G I N T O S E R V I C E B E F O R E E N A B L I N G L E V E L C O N T R O L N O E X I T 24
Filter Level Control INLET OUTLET RETURN FROM BACKWASH 1. FILL - OPEN INLET / CLOSE OUTLET 2. SETTLE - CLOSE INLET / CLOSE OUTLET 3. BALANCE - OPEN INLET / OPEN OUTLET 4. ENABLE LEVEL CONTROL Filter Level Control L E V E L (F 2 0 2 :0 ) L A D D E R 2 0 0 R U N G 1 F IL T E R L E V E L O U T P U T V A L V E P U L S E L O G IC (F IL T E R _ 0 1 _ 0 8 _ D 2.1.R S S ) S U B S E T P O IN T (F 2 0 2 :2 ) L A D D E R 2 0 0 R U N G 3 M U L T G A IN 1 (F 2 0 3.3 ) L A D D E R 2 0 0 R U N G 5 L E V E L (F 2 0 2 :0 ) P V n A D D O N d e m a n d in m S L A D D E R 2 0 0 R U N G 2 F 2 0 9.9 S U B L E V E L (F 2 0 2.1 ) P V n -1 D IF F E R E N C E C A L C U L A T E D EVERY 30s (T48) M U L T L A D D E R 2 0 0 R U N G 4 IF P U L S E > 5 0 0 m S (N 2 0 1.2 ) T H E N P U L S E = 5 0 0 m S E L S E IF P U L S E < 3 0 0 m S (N 2 0 1.1 ) T H E N P U L S E = 0 E N D IF N 2 0 1.0 L A D D E R 2 0 0 R U N G S 7-1 1 G A IN 2 (F 2 0 3.4 ) 3 0 0 m S - 5 0 0 m S O N P u ls e < - 3 0 0 m S > + 3 0 0 m S 3 0 s O F F P E R IO D (T 4 8 ) P U L S E C L O S E (O :5 /3 v ia B 1 1 :3 /8 ) P U L S E O P E N (O :5 /2 v ia B 1 1 :3 /9 ) 25
Filter Level Control INLET OUTLET RETURN FROM BACKWASH 1. FILL - OPEN INLET / CLOSE OUTLET 2. SETTLE - CLOSE INLET / CLOSE OUTLET 3. BALANCE - OPEN INLET / OPEN OUTLET 4. ENABLE LEVEL CONTROL Filter Level Control INLET 3500 3000 2500 2000 1500 OUTLET 1000 500 0 1 406 811 1216 1621 2026 2431 2836 3241 3646 4051 4456 4861 RETURN FROM BACKWASH 1. FILL - OPEN INLET / CLOSE OUTLET 2. SETTLE - CLOSE INLET / CLOSE OUTLET 3. BALANCE - OPEN INLET / OPEN OUTLET 4. ENABLE LEVEL CONTROL 26
Level Loop Recommendations Use a conventional PID controller. If possible change the actuator for a 4-20 ma input, otherwise implement an incremental output algorithm within the PLC software. Use a different set of PID values immediately after the backwash to minimise disturbances when bringing the filter back on line (the inlet and outlet valve balancing is critical). General Summary and Recommendations (Control System Investigations) Control problems are often complex and the result of unresolved issues on other loops. All aspects of the control loop should be considered including software, instrumentation and the process itself. Control system strategies and associated software should be reviewed before approval. The importance of correct installation of instrumentation, valve sizing, valve resolution and the adverse effects of hysteresis on control should be considered during the specification phase of a project. Baseline, open-loop, responses should be performed after commissioning to aid on-going support of the system. 27
General Summary and Recommendations (Documentation) In reading the control system documentation, it was difficult to determine whether or not the original user requirements had been satisfied. The documentation produced for a given system varies from sparse to very detailed but with the latter often suffering from inconsistencies and repetitions. The use of traceability matrices and improvements to the existing documentation management system would help to resolve these issues. GAMP (Good Automated Manufacturing Practice) is a useful guide in this respect. Bridging the gap between Industrial Processes and the Programmable Systems that control them. www.controlspecialists.co.uk 28