94
Standards Certification Education & Training Publishing Conferences & Exhibits 1 pH Control Solutions Ascend Chocolate Bayou Plant Seminar March 10, 2011

pH Control Solutions - Greg McMillan

Embed Size (px)

DESCRIPTION

Presented by Greg McMillan at Ascend Chocolate Bayou Plant Seminar March 10, 2011

Citation preview

Page 1: pH Control Solutions - Greg McMillan

1

Standards

Certification

Education & Training

Publishing

Conferences & Exhibits

pH Control Solutions

Ascend Chocolate Bayou Plant Seminar March 10, 2011

Page 2: pH Control Solutions - Greg McMillan

2

Introduction of Presenter• ISA Presenter

– Gregory K. McMillan ( E-mail: [email protected] ) – Greg is a retired Senior Fellow from Solutia/Monsanto and an ISA Fellow.

Presently, Greg contracts as a consultant in DeltaV R&D via CDI Process & Industrial. Greg received the ISA “Kermit Fischer Environmental” Award for pH control in 1991, the Control Magazine “Engineer of the Year” Award for the Process Industry in 1994, was inducted into the Control “Process Automation Hall of Fame” in 2001, was honored by InTech Magazine in 2003 as one of the most influential innovators in automation, and received the ISA “Life Achievement  Award” in 2010. Greg is the author of numerous books on process control, his most recent being Essentials of Modern Measurements and Final Elements for the Process Industry and Advanced Temperature Measurement and Control - 2nd Edition. Greg has been the monthly “Control Talk” columnist for Control magazine since 2002. Greg’s expertise is available on the web site: http://www.modelingandcontrol.com/

Page 3: pH Control Solutions - Greg McMillan

3

Source

Page 4: pH Control Solutions - Greg McMillan

4

ISA Automation Week - Oct 17-20

Call for PapersDeadline is March 28 !

Page 5: pH Control Solutions - Greg McMillan

5

Legends Cutler and Liptak Give Keynotes Legends Cutler and Liptak Give Keynotes

Page 6: pH Control Solutions - Greg McMillan

6

Key Benefits of Seminar

• Recognition of the opportunity and challenges of pH control• Alerts to important implementation considerations• Awareness of modeling and control options• Understanding the root causes of poor performance• Prioritization of improvements based on cost, time, and goal• Insights for applications and solutions

Page 7: pH Control Solutions - Greg McMillan

7

Section 1: pH Opportunity and Challenge

• Extraordinary Sensitivity and Rangeability• Deceptive and Severe Nonlinearity• Extraneous Effects on Measurement• Difficult Control Valve Requirements

Page 8: pH Control Solutions - Greg McMillan

8

Top Ten Signs of a Rough pH Startup

Food is burning in the operators’ kitchen The only loop mode configured is manual An operator puts his fist through the screen You trip over a pile of used pH electrodes The technicians ask: “what is a positioner?” The technicians stick electrodes up your nose The environmental engineer is wearing a mask The plant manager leaves the country Lawyers pull the plugs on the consoles The president is on the phone holding for you

Page 9: pH Control Solutions - Greg McMillan

9

Extraordinary Sensitivity and RangeabilitypH Hydrogen Ion Concentration Hydroxyl Ion Concentration0 1.0 0.000000000000011 ` 0.1 0.00000000000012 0.01 0.0000000000013 0.001 0.000000000014 0.0001 0.00000000015 0.00001 0.0000000016 0.000001 0.000000017 0.0000001 0.00000018 0.00000001 0.0000019 0.000000001 0.0000110 0.0000000001 0.000111 0.00000000001 0.00112 0.000000000001 0.0113 0.0000000000001 0.114 0.00000000000001 1.0

aH = 10-pH

pH = - log (aH)

aH = *g cH

cH * cOH = 10-pKw

Where:aH = hydrogen ion activity (gm-moles per liter)

cH = hydrogen ion concentration (gm-moles per liter)

cOH = hydroxyl ion concentration (gm-moles per liter)

g = activity coefficient (1 for dilute solutions)pH = negative base 10 power of hydrogen ion activitypKw = negative base 10 power of the water dissociation constant (14.0 at 25oC)

Hydrogen and Hydroxyl Ion Concentrations in a Water Solution at 25oC

Page 10: pH Control Solutions - Greg McMillan

10

5

5.5

6

6.5

7

7.5

8

8.5

9

0 10 20 30 40 50 60 70 80 90 100

Temp (C)

pH 5

pH 6

pH 6.5

pH 7

pH 7.5REAL pH 8

pH 9 pH 10

Measured pH

Effect of Water Dissociation (pKw) on Solution pH

Page 11: pH Control Solutions - Greg McMillan

11

Temperature Comp Parameters

Solution pH Temperature Correction

Isopotential Point Changeable for Special pH Electrodes

pH / ORP Selection

Preamplifier Location

Type of Reference Used

Ranging

AMS pH Range and Compensation Configuration

Page 12: pH Control Solutions - Greg McMillan

12

Reagent Titration Curves

0.00000000

2.00000000

4.00000000

6.00000000

8.00000000

10.00000000

12.00000000

14.00000000

0.00000000 0.00050000 0.00100000 0.00150000 0.00200000

Wt Frac Base

pH Calculated pH

Reagent Titration Curves

3.00000000

4.00000000

5.00000000

6.00000000

7.00000000

8.00000000

9.00000000

10.00000000

11.00000000

0.00099995 0.00099996 0.00099997 0.00099998 0.00099999 0.00100000 0.00100001 0.00100002 0.00100003 0.00100004 0.00100005

Wt Frac Base

pH Calculated pH

14

12

10

8

6

4

2

0

pH

Reagent / Influent Ratio

11

10

9

8

7

6

5

4

3

pH

Reagent / Influent Ratio

Despite appearances there are no straight lines in a titration curve (zoom in reveals another curve if there are enough data points - a big “IF” in neutral region)

For a strong acid and base the pKa are off-scale and the slope continually changes by a factor of ten for each pH unit deviationfrom neutrality (7 pH at 25 oC)

As the pH approaches the neutral point the response accelerates (looks like a runaway). Operators often ask what can be done to slow down the pH response around 7 pH.

Yet titration curves are essential for every aspect of pH systemdesign but you must get numerical values and avoid mistakessuch as insufficient data points in the area around the set point

Nonlinearity - Graphical Deception

Page 13: pH Control Solutions - Greg McMillan

13

Figure 3-1b: Weak Acid Titrated with a Strong Base

0.00

2.00

4.00

6.00

8.00

10.00

12.00

14.00

0.000 0.500 1.000 1.500 2.000

Reagent / Influent

pH Calculated pH

Weak Acid and Strong Base

pka = 4

Figure 3-1c: Strong Acid Titrated with a Weak Base

0.00

2.00

4.00

6.00

8.00

10.00

12.00

14.00

0.000 0.500 1.000 1.500 2.000

Reagent / Influent

pH Calculated pH

Strong Acid and Weak Base

pka = 10

Figure 3-1e: Weak 2-Ion Acid Titrated with a Weak 2-Ion Base

0.00

2.00

4.00

6.00

8.00

10.00

12.00

14.00

0.000 0.500 1.000 1.500 2.000

Reagent / Influent

pH Calculated pH

Multiple Weak Acids and Weak Bases

pka = 3

pka = 5

pka = 9

Nonlinearity - Graphical Deception

Slope moderatednear each pKa

pKa and curve changes with temperature!

Figure 3-1d: Weak Acid Titrated with a Weak Base

0.00

2.00

4.00

6.00

8.00

10.00

12.00

14.00

0.000 0.500 1.000 1.500 2.000

Reagent / Influent

pH Calculated pH

Weak Acid and Weak Base

pka = 4

pka = 10

Page 14: pH Control Solutions - Greg McMillan

14

Reagent Savings is Huge for Flat Part of Curve

pH

Reagent to Feed Flow Ratio

Reagent Savings Original

set point

Optimum set point

4

10

Oscillations could be due to non-ideal mixing, control valve stick-slip. or pressure fluctuations

Page 15: pH Control Solutions - Greg McMillan

15

Effect of Sensor Drift on Reagent Calculations

pH

Reagent to Feed Flow Ratio

4

10

6

8

FeedforwardReagent Error

FeedforwardpH Error

Sensor Drift

pH Set PointInfluent pH

The error in a pH feedforward calculationincreases for a given sensor error as theslope of the curve decreases. This resultCombined with an increased likelihood ofErrors at low and high pH means feedforwardCould do more harm than good when goingfrom the curve’s extremes to the neutral region.

Flow feedforward (ratio controlof reagent to influent flow) workswell for vessel pH control if there are reliable flow measurements with sufficient rangeability

Feedforward control always requires pH feedback correction unless the set point is on the flat part of the curve, use Coriolis mass flow meters and have constant influent and reagent concentrations

Page 16: pH Control Solutions - Greg McMillan

16

Double Junction Combination pH Electrode

W W

W

W

W

WW

W

W

W

Em

R10R9 R8R7

R6

R5

R4

R3

R2

R1

Er

E5

E4

E3

E2

E1

outer gellayer

inner gellayer

secondjunction

primary junction

solution ground

Process Fluid

silver-silver chlorideinternal electrode

silver-silver chlorideinternal electrode

potassium chloride (KCl) electrolyte in salt bridge between junctions

7 pH buffer

Ii

High acid or base concentrations can affect glass gel layer and reference junction potentialIncrease in noise or decrease in span or efficiency is indicative of glass electrode problemShift or drift in pH measurement is normally associated with reference electrode problem

Process ions try to migrate into porous reference junctionwhile electrolyte ionstry to migrate out

Nernst Equationassumes insideand outside gellayers identical

Measurementbecomes slow from a loss ofactive sites ora thin coatingof outer gel

Page 17: pH Control Solutions - Greg McMillan

17

Life Depends Upon Process Conditions

25 C 50 C 75 C 100 CProcess Temperature

Months

>100% increase in life from new glass designsfor high temperatures

High acid or base concentrations (operation at the extremes of the titration curve) decrease life for a given temperature. A deterioration in measurement accuracy and response time often accompanies a reduction in life. Consequently pH feedforward control is unreliable and the feedforward effect and timing is way off for such cases.

Page 18: pH Control Solutions - Greg McMillan

18

New High Temperature Glass Stays Fast

0

50

100

150

200

0 50 100 150 200

minutes

mV

New GlassOther

Glass electrodes get slow as they age. High temperatures cause premature aging

Page 19: pH Control Solutions - Greg McMillan

19

What is High Today may be Low Tomorrow

AB A

B A

BpH

time

Most calibration adjustments chase the short term errors shownbelow that arise from concentration gradients from imperfectmixing, ion migration into reference junction, temperature shifts, different glass surface conditions, and fluid streaming potentials.With just two electrodes, there are more questions than answers.

Page 20: pH Control Solutions - Greg McMillan

20

Control Valve Rangeability and Resolution

pH

Reagent FlowInfluent Flow

6

8

Influent pHB

A

Control BandSet point

BEr = 100% * Fimax * ---- Frmax

Frmax = A * Fimax

BEr = ---- A

Ss = 0.5 * Er

Where:A = distance to center of reagent error band on abscissa from influent pHB = width of allowable reagent error band on abscissa for control band Er = allowable reagent error (%)

Frmax = maximum reagent valve capacity (kg per minute)

Fimax = maximum influent flow (kg per minute)

Ss = allowable stick-slip (resolution limit) (%)

Page 21: pH Control Solutions - Greg McMillan

21

Speed of Response Seen by pH Loop

pH

Reagent FlowInfluent Flow

6

8

10

12

2

4

pH2

pH1

pH3

Fastest process response seen byLoop at inflection point (e.g. 7 pH)

Slow

Slow

(1) Excursion from pH1 to pH2 acceleration makes response look like a runaway to loop(2) Excursion from pH2 to pH3 deceleration is not enough to show true process time constant(3) Batch neutralizers without reagents consumed by reactions lack process self-regulation

that causes an integrating response aggravating overshoot from acceleration.

Apparent loss of investment in large well mixed volume can be restoredby signal characterization of pH to give abscissa as controlled variable!

Page 22: pH Control Solutions - Greg McMillan

22

Key Points

• pH electrodes offer by far the greatest sensitivity and rangeability of any measurement. To make the most of this capability requires an incredible precision of mixing, reagent manipulation, and nonlinear control. pH measurement and control can be an extreme sport

• Solution pH changes despite a constant hydrogen ion concentration because of changes in water dissociation constant (pKw) with temperature, and activity coefficients with ionic strength and water content

• Solution pH changes despite a constant acid or base concentration because of changes in the acid or base dissociation constants (pKa) with temperature

• Titration curves have no straight lines A zoom in on any supposed line should reveal another curve if there are sufficient data points

• Slope of titration curve at the set point has the greatest effect on the tightness of pH control as seen in control valve resolution requirement. The next most important effect is the distance between the influent pH and the set point that determines the control valve rangeability requirement

• Titration curves are essential for every aspect of pH system design and analysis• First step in the design of a pH system is to generate a titration curve at the

process temperature with enough data points to cover the range of operation and show the curvature within the control band (absolute magnitude of the difference between the maximum and minimum allowable pH)

Page 23: pH Control Solutions - Greg McMillan

23

Key Points

• Accuracy and speed of response of pH measurements stated in the literature assume the thin fragile gel layer of a glass electrode and the porous process junction of the reference electrode have had no penetration or adhesion of the process and are in perfect condition at laboratory conditions

• Time that glass electrodes are left dry or exposed to high and low pH solutions must be minimized to maximize the life of the hydrated gel layer

• Most accuracy statements and tests are for short term exposure• Long term error of pH measurements installed in the process is an order of

magnitude greater than the error normally stated in the literature • pH measurement error may look smaller on the flatter portion of a titration

curve but the associated reagent delivery error is larger • Cost of pH measurement maintenance can be reduced by a factor of ten by

more realistic expectations and calibration policies• Set points on the steep portion of a titration curve necessitate a reagent control

valve precision that goes well beyond the norm and offers the best test to determine a valve’s actual stick-slip in installed conditions

• Reagent valve resolution (stick-slip) may determine the number of stages of neutralization required, which has a huge impact on a project’s capital cost

• Approach to the neutral point looks like a runaway due to acceleration • Batch processes have less self-regulation and tend to ramp• Batch processes can have a one direction response for a given reagent

Page 24: pH Control Solutions - Greg McMillan

24

Section 2: Modeling and Control Options

• Virtual plant and imbedded process models• Minimization of capital investment• Cascade pH control• Online identification of titration curve• Batch pH control• Linear reagent demand control• Adapted reagent demand control• Smart split range point• Elimination of split range control• Model predictive control

Page 25: pH Control Solutions - Greg McMillan

25

Virtual Plant Setup

Advanced Control Modules

Process Module for Bioreactor or Neutralizer

Virtual PlantLaptop or Desktop

or Control System Station

Configuration and Graphics

Page 26: pH Control Solutions - Greg McMillan

26

Virtual Plant: http://www.processcontrollab.com/Recorded Deminars: http://www.modelingandcontrol.com/deminar_series.html

Virtual Plant Access

Free State of the Art Virtual Plant Not an emulation but a DCS

(SimulatePro) Independent Interactive Study Structural Changes “On the Fly” Advanced PID Options and Tuning

Tools Enough variety of valve, measurement,

and process dynamics to study 90% of the process industry’s control applications

Learn in 10 minutes rather than 10 years

Online Performance Metrics Standard Operator Graphics & Historian Control Room Type Environment No Modeling Expertise Needed No Configuration Expertise Needed Rapid Risk-Free Plant Experimentation Deeper Understanding of Concepts Process Control Improvement Demos Sample Lessons (Recorded Deminars)

A new easy fast free method of access is now available that eliminates IT security issues and remote access response delays

Page 27: pH Control Solutions - Greg McMillan

27

Case History 1- Existing Control System

Mixer

AttenuationTank

AY

AT

middle selector

AY

splitter

AC

AT

FT

FT

AT

AY

ATAT AT

AY

ATAT AT

Mixer

AY

FT

Stage 2Stage 1

middle selector

AC

Waste

Waste

middle selector

FuzzyLogic

RCAS RCAS

splitter

AY

filter

AYROUT

kicker

Page 28: pH Control Solutions - Greg McMillan

28

Case History 1 - New Control System

Mixer

AttenuationTank

AY

AT

middle selector

AY

splitter

AT

FT

FT

AT

AY

ATAT AT

AY

ATAT AT

Mixer

AY

FT

Stage 2Stage 1

middle selector

Waste

Waste

middle selectorRCAS RCAS

splitter

AY

filter

AYROUT

kickerAC-1 AC-2

MPC-2

MPC-1

Page 29: pH Control Solutions - Greg McMillan

29

Case History 1 - Opportunities for Reagent Savings

pH

Reagent to Waste Flow Ratio

Reagent Savings

2

12

Old Set Point

New Set Point

Old RatioNew Ratio

Page 30: pH Control Solutions - Greg McMillan

30

Case History 1 - Online Adaptation and Optimization

Actual PlantOptimization(MPC1 and MPC2)

Tank pH and 2nd Stage Valves

Stage 1 and 2 Set Points

Virtual Plant

Inferential Measurement(Waste Concentration)

and Diagnostics

Adaptation(MPC3)

Actual Reagent/Waste Ratio

(MPC SP)

ModelInfluent Concentration

(MPC MV)

Model Predictive Control (MPC)For Optimization of Actual Plant

Model Predictive Control (MPC)For Adaptation of Virtual Plant

Virtual Reagent/Influent Ratio

(MPC CV)

Stage 1 and 2 pH Set Points

Page 31: pH Control Solutions - Greg McMillan

31

Case History 1 - Online Model Adaptation Results

Adapted Influent Concentration(Model Parameter)

Actual Plant’sReagent/Influent

Flow Ratio

Virtual Plant’sReagent/Influent

Flow Ratio

Page 32: pH Control Solutions - Greg McMillan

32

Case History 2 - Existing Neutralization System

Water93%

Acid

50%

Caustic

Pit

Cation Anion

To EO

Final acid

adjustment

Final caustic

adjustment

AT

Page 33: pH Control Solutions - Greg McMillan

33

Case History 2 - Project Objectives

• Safe• Responsible• Reliable

– Mechanically– Robust controls, Operator friendly– Ability to have one tank out of service

• Balance initial capital against reagent cost• Little or no equipment rework

Page 34: pH Control Solutions - Greg McMillan

34

Case History 2 - Cost Data

• 93%H2SO4 spot market price $2.10/Gal• 50% NaOH spot market price $2.30/Gal

2k Gal 5k Gal 10k Gal 20k Gal 40k Gal

Tank $20k $30k $50k $80k $310k

Pump $25k $35k $45k $75k $140k

Page 35: pH Control Solutions - Greg McMillan

35

Case History 2 - Challenges

• Process gain changes by factor of 1000x• Final element rangeability needed is 1000:1• Final element resolution requirement is 0.1%• Concentrated reagents (50% caustic and 93% sulfuric)• Caustic valve’s ¼ inch port may plug at < 10% position• Must mix 0.05 gal reagent in 5,000 gal < 2 minutes• Volume between valve and injection must be < 0.05 gal • 0.04 pH sensor error causes 20% flow feedforward error• Extreme sport - extreme nonlinearity, sensitivity, and

rangeability of pH demands extraordinary requirements for mechanical, piping, and automation system design

Page 36: pH Control Solutions - Greg McMillan

36

Really big tank and thousands of miceeach with 0.001 gallon of acid or caustic

or

modeling and control

Case History 2 - Choices Case History 2 - Choices

Page 37: pH Control Solutions - Greg McMillan

37

Case History 2 - Tuning for Conventional pH Control Case History 2 - Tuning for Conventional pH Control

Page 38: pH Control Solutions - Greg McMillan

38

Gain 10x larger

Case History 2 - Tuning for Reagent Demand Control Case History 2 - Tuning for Reagent Demand Control

Page 39: pH Control Solutions - Greg McMillan

39

Embedded Process Model for pH

Page 40: pH Control Solutions - Greg McMillan

40

Slope

pH

Titration Curve Matched to Plant

5/15/2008 Titration Curve Slope

0

5

10

15

20

2 3 4 5 6 7 8 9 10 11 12

pH

Slo

pe

Slope

Page 41: pH Control Solutions - Greg McMillan

41

Signal characterizers linearize loop via reagent demand control

AY 1-4

AC 1-1

AY 1-3

splitter

AT 1-3

AT 1-2

AT 1-1

AY 1-1

AY 1-2

middlesignal

selector

signalcharacterizer

signalcharacterizer

pH set point

Eductors

FT 1-1

FT 1-2

NaOH Acid

LT 1-5

Tank

Static Mixer

Feed

To other Tank

Downstream system

LC 1-5

From other Tank

To other Tank

Modeled pH Control System

Page 42: pH Control Solutions - Greg McMillan

42

Start of Step 2(Regeneration)

Start of Step 4(Slow Rinses)

One of many spikes of recirculation pH spikes from stick-slip of water valve

Tank 1 pH for Reagent Demand Control

Tank 1 pH for Conventional pH Control

Influent pH

Conventional pH versus Reagent Demand Control

Page 43: pH Control Solutions - Greg McMillan

43

Feed

Reagent

Reagent

ReagentThe period of oscillation (4 x process deadtime) and filter time(process residence time) is proportional to volume. To preventresonance of oscillations, different vessel volumes are used.

Small first tank provides a faster responseand oscillation that is more effectively filtered by the larger tanks downstream

Big footprintand high cost!

Traditional System for Minimum Variability

Page 44: pH Control Solutions - Greg McMillan

44

Reagent

Reagent

Feed

Reagent

Traditional System for Minimum Reagent UseTraditional System for Minimum Reagent Use

The period of oscillation (total loop dead time) must differ by morethan factor of 5 to prevent resonance (amplification of oscillations)

The large first tank offers more cross neutralization of influents

Big footprintand high cost!

Page 45: pH Control Solutions - Greg McMillan

45

Tight pH Control with Minimum Capital Investment

Influent

FC 1-2

FT 1-2

Effluent AC 1-1

AT 1-1

FT 1-1

10 to 20 pipe

diameters

f(x)

*IL#1

Re

ag

en

t

High Recirculation Flow

Any Old TankSignal

Characterizer

*IL#2

LT 1-3

LC 1-3

IL#1 – Interlock that prevents back fill ofreagent piping when control valve closes

IL#2 – Interlock that shuts off effluent flow untilvessel pH is projected to be within control band

Eductor

Page 46: pH Control Solutions - Greg McMillan

46

Linear Reagent Demand Control

• Signal characterizer converts PV and SP from pH to % Reagent Demand– PV is abscissa of the titration curve scaled 0 to 100% reagent demand– Piecewise segment fit normally used to go from ordinate to abscissa of curve– Fieldbus block offers 21 custom spaced X,Y pairs (X is pH and Y is % demand)– Closer spacing of X,Y pairs in control region provides most needed compensation– If neural network or polynomial fit used, beware of bumps and wild extrapolation

• Special configuration is needed to provide operations with interface to:– Operator sees loop PV in pH and enters loop SP in pH– Operator can change mode to manual and change manual output– Operator sees both reagent demand % and PV trends

• Set point on steep part of curve shows biggest improvements from: – Reduction in limit cycle amplitude seen from pH nonlinearity– Decrease in limit cycle frequency from final element resolution (e.g. stick-slip)– Decrease in crossing of split range point– Reduced reaction to measurement noise– Shorter startup time (loop sees real distance to set point and is not detuned)– Simplified tuning (process gain no longer depends upon titration curve slope)– Restored process time constant (slower pH excursion from disturbance)

Page 47: pH Control Solutions - Greg McMillan

47

Cascade pH Control to Reduce Downstream Offset

M

AT 1-2

Static Mixer

Feed

AT 1-1

FT 1-1

FT 1-2

Reagent

10 to 20pipe

diameters

Sum FC 1-1

Filter

Coriolis MassFlow Meter

f(x)

AC 1-1

AC 1-2

PV signalCharacterizer

RSP

f(x)

Flow Feedforward

SP signalcharacterizer

Trim of Inline Set Point

IntegralOnly

Controller

Linear ReagentDemand Controller

Any Old Tank

Page 48: pH Control Solutions - Greg McMillan

48

Full Throttle (Bang-Bang) Batch pH Control

Batch Reactor

AT 1-1

10 to 20 pipe

diameters

Filter

Delay

Sub Div

Sum

Dt

Cutoff

PastDpH

Rate ofChangeDpH/Dt

Mul

Total System Dead Time

Projected DpHNew pH

Old pH

Batch pH End Point

Predicted pHReagent

Section 3-5 in New Directions in Bioprocess Modeling and Control shows how this strategy is used as a head start for a PID controller

Page 49: pH Control Solutions - Greg McMillan

49

Linear Reagent Demand Batch pH Control

Batch Reactor

AC 1-1

AT 1-1

10 to 20 pipe

diameters

f(x)

Master Reagent DemandAdaptive PID Controller

Static Mixer

AC 1-1

AT 1-1

10 to 20 pipe

diameters

Secondary pHPI Controller

Signal CharacterizerUses Online

Titration Curve

FT 1-1

FC 1-1

FQ 1-1

FT 1-2

Online Curve Identification

Influent #1

Reduces injection and mixing delays and enables some crossneutralization of swings between acidic and basic influent. It issuitable for continuous control as well as fed-batch operation.

Influent #2

Page 50: pH Control Solutions - Greg McMillan

50

Adapted Reagent Demand Control

Neutralizer

AC 1-1

AT 1-1

10 to 20 diameters

f(x)

Master Reagent DemandAdaptive PID Controller

Static Mixer

AC 1-1

AT 1-1

10 to 20 diameters

Secondary pHPI Controller

Signal CharacterizerUses Online

Titration Curve

FT 1-1

FC 1-1

FQ 1-1

FT 1-2

Online Curve Identification

Influent

Reduces injection and mixing delays and enables somecross neutralization in continuous and batch operations

Page 51: pH Control Solutions - Greg McMillan

51

Recently Developed Adaptive Control

• Anticipates nonlinearity by recognizing old territory– Model and tuning settings are scheduled per operating region– Remembers what it has learned for preemptive correction

• Demonstrates efficiency improvement during testing– Steps can be in direction of optimum set point– Excess reagent use rate and total cost can be displayed online

• Achieves optimum set point more efficiently– Rapid approach to set point in new operating region

• Recovers from upsets more effectively– Faster correction to prevent violation– More efficient recovery when driven towards constraint

• Returns to old set points with less oscillation – Faster and smoother return with less overshoot

Page 52: pH Control Solutions - Greg McMillan

52

• For a first order plus deadtime process, only nine (9) models are evaluated each sub-iteration, first gain is determined, then deadtime, and last time constant.

• After each iteration, the bank of models is re-centered using the new gain, time constant, and deadtime

First Order Plus Deadtime Process

Estimated Gain, time constant, and deadtime

Multiple Model parameterInterpolation with re-centering

Changing process input

sKe DT

1

Gain

Tim

e C

onst

ant

Dead time

1

2

3

First Order plus Dead Time Model Identification

Changes in the process model can be used to diagnose changesin the influent and the reagent delivery and measurement systems

Page 53: pH Control Solutions - Greg McMillan

53

Model and tuning is scheduled based on pH

Scheduling of Learned Dynamics and Tuning

Page 54: pH Control Solutions - Greg McMillan

54

Adaptive Control Efficiently Achieves Optimum

hourly cost of excess reagent

hourly cost of excess reagent

total cost ofexcess reagent

total cost ofexcess reagent

pH

pH

Page 55: pH Control Solutions - Greg McMillan

55

Adaptive Control Efficiently Rejects Loads

hourly costof excess

hourly cost of excess

pH

total costof excessreagent

total cost of excessreagent

pH

Page 56: pH Control Solutions - Greg McMillan

56

Adaptive Control is Stable on Steep Slopes

pH

pH

Page 57: pH Control Solutions - Greg McMillan

57

Smart Split Range Point

222

111 S

KK

KKS

pv

pv

21 100 SGS

)100(2211

111 G

KKKK

KKS

pvpv

pv

G = split range gap (%)Kv1 = valve 1 gain (Flow e.u. / CO %)Kv2 = valve 2 gain (Flow e.u. / CO %)Kp1 = process gain for valve 1(PV e.u. / Flow e.u.)Kp2 = process gain for valve 2(PV e.u. / Flow e.u.)S1 = 1st split ranged span (PV e.u.)S2 = 2nd split ranged span (PV e.u.)

Page 58: pH Control Solutions - Greg McMillan

58

Smart Split Range Point

Neutralizer

AC 1-1

AT 1-1

PID Controller

Large(Coarse)

Small(Fine)

Splitter

Split RangeBlock

Reagent

For large valve 4x small valve flow:

PID Small LargeOut Valve Valve

0% 0% 0%20% 100% 0%20% 100% 0%100% 100% 100%

Smart in terms of valve gaincompensation but not smartin terms of valve sensitivity !

Page 59: pH Control Solutions - Greg McMillan

59

PID Valve Sensitivity and Rangeability Solution 1

Neutralizer

AC 1-1a

AT 1-1

PID Controlleror PIDPlus withsensitivity limit

Large(Coarse)

Small(Fine)

AC 1-1b

Proportional only Controlleror PIDPlus withsensitivity limit

Reagent

Page 60: pH Control Solutions - Greg McMillan

60

PID Valve Sensitivity and Rangeability Solution 2

Neutralizer

AC 1-1

AT 1-1

PID Controlleror PIDPlus withsensitivity limit

Large(Coarse)

Small(Fine)

ZC 1-1

Integral only Controlleror PIDPlus withsensitivity limit

Reagent

Page 61: pH Control Solutions - Greg McMillan

61

MPC Valve Sensitivity and Rangeability Solution

manipulated variables

Small (Fine)Reagent Valve SP

NeutralizerpH PV

Small (Fine)Reagent Valve SP

cont

rolled

va

riab

le

MPC Large (Coarse)Reagent Valve SP

cont

rolled

va

riab

le

null

Model Predictive Controller (MPC) setup for rapid simultaneous throttling of a fine and coarse control valves that addressesboth the rangeability and resolution issues. This MPC canpossibly reduce the number of stages of neutralization needed

http://www.controlglobal.com/articles/2005/533.htmlhttp://www.modelingandcontrol.com/2009/03/application_notes.html

Page 62: pH Control Solutions - Greg McMillan

62

MPC Valve Sensitivity and Rangeability Solution MPC Valve Sensitivity and Rangeability Solution

Page 63: pH Control Solutions - Greg McMillan

63

MPC Valve Sensitivity and Rangeability Solution

Page 64: pH Control Solutions - Greg McMillan

64

MPC Valve Sensitivity and Rangeability Solution

Successive Load Upsets Process Set Point Change Trim Valve Set Point Change

CriticalProcess Variable

CoarseValve

TrimValve

Page 65: pH Control Solutions - Greg McMillan

65

MPC Maximization of Low Cost Reagent

manipulated variables

High Cost FastFeed SP

Critical PV(normal PE)

Low Cost SlowFeed SP

(lowered PE)

contr

olled

vari

able

Maximize

MPC Low Cost SlowFeed SP

null

opti

miz

ati

on

vari

able

Page 66: pH Control Solutions - Greg McMillan

66

MPC Maximization of Low Cost Reagent

Page 67: pH Control Solutions - Greg McMillan

67

MPC Maximization of Low Cost Reagent

Riding Max SPon Lo Cost MV

Riding Min SPon Hi Cost MV

Critical CV

Lo Cost Slow MV

Hi Cost Fast MV

LoadUpsets

Set PointChanges

LoadUpsets

Set PointChanges

Low Cost MV Maximum SP Increased

Low Cost MV Maximum SP Decreased

Critical CV

Page 68: pH Control Solutions - Greg McMillan

68

MPC Maximization of Low Cost Reagent

manipulated variables

SupplementalReagent Flow SP

Cheap Reagent Flow PV

Neutralizer pH PV

Acidic Feed Flow SP

Supplemental Reagent

Valve Position

con

trolled

v

ari

ab

lecon

str

ain

t

vari

ab

le

MPC

disturbance variable

Acid Feed Flow SP

null

op

tim

izati

on

v

ari

ab

le

nullMaximize

Note that cheap reagent valve is wide open and feed is maximized to keep supplemental reagent valve at minimum throttle position for minimum stick-slip

Page 69: pH Control Solutions - Greg McMillan

69

Key Points

• More so than for any other loop, it is important to reduce dead time for pH control because it reduces the effect of the nonlinearity

• Filter the feedforward signal to remove noise and make sure the corrective action does not arrive too soon and cause inverse response

• The effectiveness of feedforward control greatly depends upon the ability to eliminate reagent delivery delays

• If there is a reproducible influent flow measurement use flow feedforward, otherwise use a head start to initialize the reagent flow for startup

• The reliability and error of a pH feedforward is unacceptable if the influent or feed pH measurement is on the extremities of the titration curve

• Use a Coriolis or magnetic flow meter for reagent flow control • Every reagent valve must have a digital valve controller (digital positioner)• Except for fast inline buffered systems, use cascade control of pH to reagent

flow to compensate for pressure upsets and enable flow feedforward • Linear reagent demand can restore the time constant and capture the investment

in well mixed vessels, provide a unity gain for the process variable, simply and improve controller tuning, suppress oscillations and noise on the steep part of the curve, and speed up startup and recovery from the flat part of the curve

Page 70: pH Control Solutions - Greg McMillan

70

Key Points

• Changes in the process dynamics identified online can be used to predict and analyze changes in the influent, reagent, valve, and sensor

• New adaptive controllers will remember changes in the process model as a function of operating point and preemptively schedule controller tuning

• Use inline pH control, mass flow meters, linear control valves, and dynamic compensation to automatically identify the titration curve online

• Use gain scheduling or signal characterization based on the titration curve to free up an adaptive controller to find the changes in the curve

• Batch samples should be taken only after the all the reagent in the pipeline and dip tube has drained into the batch and been thoroughly mixed

• Use a wide open reagent valve that is shut or turned over to pH loop based on a predicted pH from ramp rate and dead time to provide the fastest pH batch/startup

• Use online titration curve identification and linear reagent demand pH control for extremely variable and sharp or steep titration curve

• Use an online dynamic pH estimator to provide a much faster, smoother, and more reliable pH value, if the open loop dead time and time constant are known and there are feed and reagent coriolis mass flow meters

• Use linear reagent demand model predictive control for dead time dominant or

interacting systems and constraint or valve position control

Page 71: pH Control Solutions - Greg McMillan

71

Section 3: Plant Design and Maintenance

• Common Problems with Titration Curves• Effect of Measurement Selection and Installation• Options to improve accuracy and maintenance• Effect of piping design, vessel type, and mixing pattern• Implications of oversized and split ranged valves • Online Troubleshooting

Page 72: pH Control Solutions - Greg McMillan

72

Common Problems with Titration Curves

• Insufficient number of data points were generated near the equivalence point • Starting pH (influent pH) data were not plotted for all operating conditions• Curve doesn’t cover the whole operating range and control system overshoot• No separate curve that zooms in to show the curvature in the control region• No separate curve for each different split ranged reagent• Sequence of the different split ranged reagents was not analyzed• Back mixing of different split ranged reagents was not considered• Overshoot and oscillation at the split ranged point was not included• Sample or reagent solids dissolution time effect was not quantified• Sample or reagent gaseous dissolution time and escape was not quantified• Sample volume was not specified • Sample time was not specified• Reagent concentration was not specified • Sample temperature during titration was different than the process temperature • Sample was contaminated by absorption of carbon dioxide from the air • Sample was contaminated by absorption of ions from the glass beaker• Sample composition was altered by evaporation, reaction, or dissolution • Laboratory and field measurement electrodes had different types of electrodes • Composite sample instead of individual samples was titrated • Laboratory and field used different reagents

Page 73: pH Control Solutions - Greg McMillan

73

• Inherently ignores single measurement failure of any type including the most insidious PV failure at set point

• Inherently ignores slowest electrode• Reduces noise and spikes particularly for steep curves• Offers online diagnostics on electrode problems

– Slow response indicates coated measurement electrode – Decreased span (efficiency) indicates aged or dehydrated glass electrode– Drift or bias indicates coated, plugged, or contaminated reference electrode

or high liquid junction potential– Noise indicates dehydrated measurement electrode, streaming potentials,

velocity effects, ground potentials, or EMI• Facilitates online calibration of a measurement

Middle Signal Selection Advantages Middle Signal Selection Advantages

For more Information on Middle Signal Selection see Feb 5, 2010 post http://www.modelingandcontrol.com/2010/02/exceptional_opportunities_in_p_11.html

Page 74: pH Control Solutions - Greg McMillan

74

Online Diagnostics for Cracked Glass

Reference Electrode Glass

ElectrodeSolution Ground

3K 0-5 M

Cracked Glass!

Reference - Joseph, Dave, “What’s the Real pH of the Stream”, Emerson Exchange 2008

• Cracked Glass Fault– pH Glass electrode normally has high impedance of 50-150 Meg-ohm– Glass can be cracked at the tip or further back inside the sensor– Recommended setting of 10 Megohm will detect even small cracks

Page 75: pH Control Solutions - Greg McMillan

75

Online Diagnostics for Coated Sensor

Coated Sensor!

Reference Electrode

Glass ElectrodeSolution

Ground

40k 150 M

• Coated Sensor Detection Can– activate sensor removal and

cleaning cycle– place output on hold while

sensor is cleaned

Reference - Joseph, Dave, “What’s the Real pH of the Stream”, Emerson Exchange 2008

Page 76: pH Control Solutions - Greg McMillan

76

Temperature Comp Parameters

Solution pH Temperature Correction

Isopotential Point Changeable for Special pH Electrodes

pH / ORP Selection

Preamplifier Location

Type of Reference Used

Ranging

AMS pH Range and Compensation Configuration

Page 77: pH Control Solutions - Greg McMillan

77

Impedance Diagnostics On/Off

Reference Impedance

Warning and Fault Levels

Reference Zero Offset

Calibration Error Limit

Glass Electrode Impedance

Warning and Fault Levels

Glass Impedance Temp Comp

(Prevents spurious errors due to Impedance decrease with Temperature)

AMS pH Diagnostics Configuration

Page 78: pH Control Solutions - Greg McMillan

78

Live Measurements and Status

Calibration Constants from Last Calibrations

Buffer Calibration Type & Buffer Standard Used

Sensor Stabilization Criteria Zero Offset Beyond this Limit will create a Calibration Error

If you want to know more about Buffer Calibration, hit this button…

AMS pH Calibration Setup

Page 79: pH Control Solutions - Greg McMillan

79

AMS pH Auxiliary Variables Dashboard

Page 80: pH Control Solutions - Greg McMillan

80

Horizontal Piping Arrangements

AE

AE

AE

AEAEAE

5 to 9 fps to minimize coatings0.1 to 1 fps to minimize abrasion

20 to 80 degreesThe bubble inside the glass bulbcan be lodged in tip of a probe that is horizontal or pointed up or caught at the internal electrodeof a probe that is vertically down

pressure drop foreach branch mustbe equal to to keep the velocities equal

Series arrangement preferred to minimize differences in solids, velocity, concentration, and temperature at each electrode!

10 OD10 OD

20 pipe diameters

20 pipe diameters

static mixer or pump

flush

drain

flush

drain

throttle valve toadjust velocity

throttle valve toadjust velocity

Page 81: pH Control Solutions - Greg McMillan

81

Vertical Piping ArrangementsA

E AE

AE

AE

AE

AE

5 to 9 fpscoating abrasion

10 O

D1

0 O

D

0.1 to 1 fps

holeorslot

Orientation of slot in shroud

throttle valve toadjust velocity

throttle valve toadjust velocity

Series arrangement preferred to minimize differences in solids, velocity, concentration, and temperature at each electrode!

Page 82: pH Control Solutions - Greg McMillan

82

Options for Maximum Accuracy

• A spherical or hemi-spherical glass measurement and flowing junction reference offers maximum accuracy, but in practice maintenance prefers:– A refillable double junction reference to reduce the complexity of installation and

the need to adjust reference electrolyte flow rate – This electrode is often the best compromise between accuracy and maintainability.

– A solid reference to resist penetration and contamination by the process and eliminate the need to refill or replace reference particularly for high and nasty concentrations and pressure fluctuations – This electrode takes the longest time to equilibrate and is more prone to junction effects but could be right choice in applications where accuracy requirements are low and maintenance is high.

• Select best glass and reference electrolyte for process • Use smart digital transmitters with built-in diagnostics• Use middle signal selection of three pH measurements

– Inherent auto protection against a failure, drift, coating, loss in efficiency, and noise (see February 5, 2010 entry on http://www.modelingandcontrol.com/ )

• Allocate time for equilibration of the reference electrode• Use “in place” standardization based on a sample with the same

temperature and composition as the process. If this is not practical, the middle value of three measurements can be used as a reference. The fraction and frequency of the correction should be chosen to avoid chasing previous calibrations

• Insure a constant process fluid velocity at the highest practical value to help keep the electrodes clean and responsive

Page 83: pH Control Solutions - Greg McMillan

83

Wireless pH Transmitters Eliminate Ground Spikes

Wired pH ground noise spike

Temperature compensated wireless pH controlling at 6.9 pH set point

Incredibly tight pH control via 0.001 pH wireless resolution

setting still reduced the number of communications by 60%

Page 84: pH Control Solutions - Greg McMillan

84

Wireless Bioreactor Adaptive pH Loop TestWireless Bioreactor Adaptive pH Loop Test

Page 85: pH Control Solutions - Greg McMillan

85

Enhanced PID Algorithm PID integral mode is

restructured to provide integral action to match the process response in the elapsed time (reset time set equal to process time constant)

PID derivative mode is modified to compute a rate of change over the elapsed time from the last new measurement value

PID reset and rate action are only computed when there is a new value

If transmitter damping is set to make noise amplitude less than sensitivity limit, valve packing and battery life is dramatically improved

Enhancement compensates for measurement sample time suppressing oscillations and enabling a smooth recovery from a loss in communications further extending packing -battery life

+

+

+

+

Elapsed Time

Elapsed Time

TD

Kc

Kc

TD

http://www2.emersonprocess.com/siteadmincenter/PM%20DeltaV%20Documents/

Whitepapers/WP_DeltaV%20PID%20Enhancements%20for%20Wireless.pdf

Link to PIDPlus White Paper

Page 86: pH Control Solutions - Greg McMillan

86

Flow Response - Enhanced vs. Traditional PID

Traditional PID Sensor PV

Enhanced PID Sensor PV

Page 87: pH Control Solutions - Greg McMillan

87

pH Response - Enhanced vs. Traditional PID

Enhanced PID Sensor PV

Traditional PID Sensor PV

Page 88: pH Control Solutions - Greg McMillan

88

Failure Response - Enhanced vs. Traditional PID

Traditional PID Sensor PV

Enhanced PID Sensor PV

Page 89: pH Control Solutions - Greg McMillan

89

Everyday Mistakes in pH System Design

M

Mistake 7 (gravity flow)

AT 1-1

AT 1-3

AT 1-2

Mistake 4 (horizontal tank)

reagentfeed tank

Mistakes 5 and 6(backfilled dip tube &injection short circuit)

Mistake 11 (electrode in pump suction)

Mistake 8 (valve too far away)

Mistake 9 (ball valve with no positioner)

Mistake 10 (electrodesubmerged in vessel)

Mistake 12 (electrode too far downstream)

Mistake 3 (single stage for set point at 7 pH)

Influent (1 pH)

Mistake 1: Missing, inaccurate, or erroneous titration curveMistake 2: Absence of a plan to handle failures, startups, or shutdowns

Page 90: pH Control Solutions - Greg McMillan

90

Mixing Pattern and Vessel Geometry Implications

Stagnant Zone

Stagnant Zone

MFeed

Reagent

AT 1-3

Short Circuiting

Stagnant Zone

PlugFlow

Page 91: pH Control Solutions - Greg McMillan

91

Oversized Reagent Valves are a Big Problem

dead band

Dead band

Stick-Slip is worse near closed position

Signal (%)

0

Stroke (%) Digital positioner

will force valve shut at 0% signal

Pneumatic positionerrequires a negative % signal to close valve

The dead band and stick-slip is greatest near the closed position so valves that ride the seat from over sizing or split ranged operation create a large limit cycle

Dead band is 5% - 50%without a positioner !

Limit cycle amplitude is operating point dependent and can be estimated as:stick-slip (%) multiplied by valve characteristic slope (pph/%) and by titration curve slope (pH/pph)

Page 92: pH Control Solutions - Greg McMillan

92

Key Points

• The time that glass electrodes are left dry or exposed to high and low pH solutions must be minimized to maximize the life of the hydrated gel layer

• Most accuracy statements and tests are for short term exposure before changes in the glass gel layer or reference junction potential are significant

• The pH measurement error may look smaller on the flatter portion of a titration curve but the associated reagent delivery error is larger

• The cost of pH measurement maintenance can be reduced by a factor of ten by more realistic expectations and calibration policies

• The onset of a coating of the glass measurement electrode shows up as a large increase in its time constant and response time

• The onset of a non conductive coating of the reference electrode shows up as a large increase in its electrical resistance

• Non-aqueous and pure water streams require extra attention to shielding and process path length and velocity to minimize pH measurement noise

• Slow references may be more stable for short term fluctuations from imperfect mixing and short exposure times from automated retraction

• The fastest and most accurate reference has a flowing junction but it requires regulated pressurization to maintain a small positive electrolyte flow

• The best choice might not be the best technical match to the application but the electrode with the best support by maintenance and operations and vendor

Page 93: pH Control Solutions - Greg McMillan

93

Key Points

• For non abrasive solids, installation in a recirculation line with a velocity of 5 to 9 fps downstream of a strainer and pump may delay onset of coatings

• For abrasive solids and viscous fluids, a thick flat glass electrode can minimize coatings, stagnant areas, and glass breakage

• For high process temperatures, high ion concentrations, and severe fouling, consider automatic retractable assemblies to reduce process exposure

• When the fluid velocity is insufficient to sweep electrodes clean, use an integral jet washer or a cleaning cycle in a retractable assembly

• The control system should schedule automated maintenance based on the severity of the problem and production and process requirements

• pH measurements can fail anywhere on or off the pH scale but middle signal selection will inherently ride out a single electrode failure of any type

• Equipment and piping should have the connections for three probes but a plant should not go to the expense of installing three measurements until the life expectancy has been proven to be acceptable for the process conditions

• The more an electrode is manually handled, the more it will need to be removed• A series installation of multiple probes insures the electrodes will see the same

velocity and mixture that is important for consistent performance• Wireless pH control of static mixers with enhanced algorithm can provide a

exceptional setpoint response and measurement failure protection

Page 94: pH Control Solutions - Greg McMillan

94

Key Points

• A system considered to be well mixed may be poorly mixed for pH control • To be “well mixed” for pH control, the deviation in the reagent to influent flow

from non ideal mixing multiplied by the process gain must be well within the control band

• Back mixing (axial mixing) creates a beneficial process time constant and plug flow or radial mixing creates a detrimental process dead time for pH control

• The agitation in a vessel should be vertical axial pattern without rotation and be intense enough to break the surface but not cause froth

• The actual equipment dead time is often larger than the turnover time because of non ideal mixing patterns and fluid entry and exit locations

• Horizontal tanks are notorious for short circuiting, stagnation, and plug flow that cause excessive dead time and an erratic pH response

• The dead time from back filled reagent dip tubes or injection piping is huge• To provide isolation, use a separate on-off valve and avoid the specification of

tight shutoff and high performance valves for throttling reagent • Set points on the steep portion of a titration curve necessitate a reagent control

valve precision that goes well beyond the norm and offers the best test to determine a valve’s actual stick-slip in installed conditions

• Reagent valve stick-slip may determine the number of stages of neutralization required, which has a huge impact on a project’s capital cost