Adventures in pH Control Greg McMillan CDI Process & Industrial Dave Joseph Rosemount Analytical
Jan 28, 2015
Adventures in pH Control
Greg McMillan CDI Process & Industrial
Dave Joseph Rosemount Analytical
Photography & Video Recording Policy
Photography and audio/video recording is not permitted in any sessions or in the exhibition areas without
press credentials or written permission from the Emerson Exchange Board of Directors. Inquiries should
be directed to:
Thank you.
Greg McMillan
Principal Consultant
Email: [email protected]
33 years Monsanto-Solutia Fellow
2 years WU Adjunct Professor
10 years DeltaV R&D Contractor
BS Engineering Physics
MS Control Theory
Dave Joseph
Sr. Industry Manager
Email: [email protected]
24 years with Rosemount Analytical
BS and MS in Chemical Engineering
Member AIChE
Presenters
4
Key Benefits of Course
Recognize the opportunity/challenges of pH control Learn about modeling and control options Optimize hardware implementation Understand the root causes of poor performance Prioritize improvements based on cost, time, and goal Gather insights for applications and solutions
5
Section 1: Measuring pH
Brief theory of pH Inside a pH sensor The Smart pH sensor Diagnostics
6
Top Ten Signs of a Rough pH Startup
Food is burning in the operators’ kitchen Only loop mode configured is manual Operator puts his fist through the screen You trip over a pile of used pH electrodes Technicians ask: “what is a positioner?” Technicians stick electrodes up your nose Environmental engineer is wearing a
mask Plant manager leaves the country Lawyers pull the plugs on the consoles President is on the phone holding for you
The definition of pHThe definition of pH
pH is the unit of measurement for determining the acidity or alkalinity of a solution.
The mathematical definition of pH is the negative logarithm of the molar hydrogen ion concentration, pH = - log([H+])
pH is measured by various different sensors, most common and economical is the glass electrode/silver reference system.
pH measurement requires periodic maintenance to maintain accuracy.
H+
OH-
H+
H2O
OH-
pH Scale vs Moles/Liter Ion Concentration
pH Hydrogen Ion [H+] Hydroxyl Ion [OH-]
0 Acidic1234567 Neutral891011121314 Basic
1.00.10.010.0010.00010.000010.0000010.00000010.000000010.0000000010.00000000010.000000000010.0000000000010.00000000000010.00000000000001
0.000000000000010.00000000000010.0000000000010.000000000010.00000000010.0000000010.000000010.00000010.0000010.000010.00010.0010.010.11.0
pH Values of Acids and Bases
0
2
4
6
8
10
12
14
1E00 1E-01 1E-02 1E-03 1E-04 1E-05 1E-06 1E-07 1E-08 1E-09 1E-10 1E-11 1E-12 1E-13 1E-14
Hydrogen Ion Concentration (Mole/Liter)
pH
4.0 % Sodium Hydroxide
0.04% Sodium Hydroxide
Milk of Magnesia
0.84% Sodium Bicarbonate
Water @ 25ºC
0.00001% Sulfuric Acid
0.0001% Hydrochloric Acid
0.01% Sulfuric Acid
0.1% Hydrochloric Acid
4.9% Sulfuric Acid
What is pH? – technical stuff
pH = - log([H+]) Kw = [H+]*[OH-] = 1.0x10-14 at 25ºC
pH + pOH = pKw
pH is measured using the Nernst equation E(mV) = Ex + 2.3(RT/F)*log aH+
~ Ex – (S)*pH in simple form
Where Ex = calibration constant 2.3(RT/F) ~ slope (S) in mV/pH units aH+ = activity of hydrogen ion ~ [H+]
Theoretical Response of a pH Sensor (25ºC)
-500
-400
-300
-200
-100
0
100
200
300
400
500
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
pH
mV
Slope of 59.16
mV/pH Unit
Zero mV
at 7 pH
12
pH Sensor Basics
•The pH electrode produces a
potential (in mV’s) proportional
to the pH of the solution.
pH Sensitive
Glass
Fill
Solution
Shield
Glass
Body
Ag/AgCl
Internal
Wire
• The reference electrode potential
must remain stable regardless of
process or time effects
• Internal element- Ag\AgCl
• Electrolyte fill - KCl/AgCl
• Liquid Junctions
13
Inside the pH Glass Membrane...
Glass Matrix
(unaffected)
Leached Layer
Dissolving
Core Glass
Inner Zone
Outer Zone
Alkali Metal Ions
Hydrogen Ions
Anionic Sites
H+
M
H+ H
+
H+
S
S S S
M
M
M M
H+
H+
H+
H+
H+
M M
MLeached Layer
(not to scale)
14
The reference electrode
pH17
AgCl/KCl
Fill
Solution
Ag/AgCl
Internal
Wire
Liquid
Junction
The Reference Cell maintains a
stable potential regardless of the
process pH or changes in the
activities of other ions in solution.
The Liquid Junction completes the
electrical circuit between the pH
measuring electrode and the
reference cell via the process
solution.
The sum of all potentials…
Assuming a preamp with low leakage current, the pH sensor
Ex =
Eoutside of glass (in process solution)
- Einside of glass (in glass fill solution)
- Emeasurement wire (in glass fill solution)
+ Ereference wire (in reference Ag/KCL solution)
+ Ejunction potential (sum of all interface potentials)
Glass fill solution typically formulated to cancel out effects so that 7 pH is 0 mV at any temperature.
16
Double Junction Combination pH Electrode - Circuit Diagram
W
W
W
W
W
WW
W
W
W
Em
R10R9R8
R7
R6
R5
R4
R3
R2
R1
Er
E5
E4
E3
E2
E1
outer
gel
layer
inner
gel
layer
second
junction
primary
junction
solution ground
Process Fluid
silver-silver chloride
internal electrode
silver-silver chloride
internal electrode
potassium chloride (KCl) electrolyte
in salt bridge between junctions
pH fill solution
Ii
High acid or base concentrations can affect glass gel layer and reference junction potential
Increase in noise or decrease in span or efficiency is indicative of glass electrode problem
Shift or drift in pH measurement is normally associated with reference electrode problem
Process ions may
migrate into porous
reference junction
while electrolyte ions
migrate out
Measurement
becomes slow
if glass gets coated
Dehydration, loss of active sites,
chemical attack, and premature
aging reduces efficiency and
makes sensor dramatically slowGel layer is used as a term
for the glass surface that
has water molecules
17
Life Depends On Process Conditions
25ºC 50ºC 75ºC 100ºC
Process Temperature
Months
>100% increase in life
from new glass designs
for high temperatures
High pH conditions decrease glass life at any temperature
Degraded accuracy and response time is also common
Leads to unreliable feedforward control
18
New Glass preserves response time
0
50
100
150
200
0 50 100 150 200
minutes
mV
New Glass
Other
Glass electrodes get slow as they age
High temperatures cause accelerated aging
New glass formulations can resist this effect
After 120 hours exposure at 140ºC
Review: pH Measurement loop
Analyzer
(not part of the sensor)
2. Reference
electrode
Liquid
junction
3.Temperature
element
1. Glass
electrode
4. Solution
ground
What is a SMART sensor?
SMART sensors store calibration data on an embedded chip. SMART sensors record the initial calibration data of the sensor
and all data from the last 5 calibrations They allow trending the performance variables of the sensor to
determine how healthy the sensor is and what work is needed on it before venturing out into the field.
Trended diagnostics enable Plantweb users to take action before the reading is compromised without any intimate knowledge of how a sensor works or what conditions the sensor may have been exposed to.
Results are reduced maintenance and increased measurement uptime.
Smart pH sensor used
in “ Smart ” mode
Smart pH sensor used
in “ Smart ” modeOR
SMART loop: instrument-cable-sensorSMART loop: instrument-cable-sensor
VP8 (or cable)
4-wire Models 56 and 1056
are smart-enabled
2-wire, FF Model 1066 is
smart-enabled
Model 6081pH Smart-enabled
Wireless Transmitter
SMART pH SensorsSMART pH Sensors
Plug and Play- Factory pre-calibrated- Calibrate in lab instead of in field- Can restore to factory values
SMART technology- Automatically trend diagnostics- Capture intermittent sensor problems- SMART signal superimposed on mV signal (like HART)
Simple Migration path- Compatible with previous analyzers- Compatible with previous sensors
Calibration historyCalibration history
Advanced diagnostics Last 5 calibration data
sets for troubleshooting
Calibration data set – diagnosticsCalibration data set – diagnostics
Calibration Data
Time stamp between calibrations
Calibration method
Slope
Offset
Temperature at the time of calibration
Glass impedance
Reference impedance
Current readings!
Calibration HistoryCalibration History
Plug & Play ConveniencePlug & Play Convenience
Conventional approach: Field calibration with buffers
SMART approach: Cal in the lab, Plug & Play in the field
Conventional sensor Field Equipment Smart Sensor Field Equipment
Siemens Water Technologies, WISiemens Water Technologies, WI
• Application: spent caustic, pH ~10-12
• pH sensor: 3500HTVP and 396PVP
• User comment:
“The SMART is somewhat fool proof. I do like the backward compatibility with it,
because initially we had the wrong probes hooked to the wrong boards, and
everything still worked. The SMART features obviously didn't, but the probes
themselves all functioned fine. “
Key Indicators of Sensor Performance Key Indicators of Sensor Performance
Plantweb pH measurements provide a complete
view of the operational parameters:
pH reading
raw sensor output
temperature
reference impedance
Glass impedance
RTD resistance
29
Diagnostics - Broken GlassDiagnostics - Broken Glass
Broken Glass Fault pH Glass electrode normally has high impedance of 50-500 Megohm Recommended setting of 10 Megohm will detect even hairline cracks Glass can be cracked at the tip or further back inside the sensor (and
not easily visible)
150 M-
- -
Reference
ElectrodeGlass Electrode
Solution
Ground
3K 0-5 M-
Broken
Glass!
30
Diagnostics - Coated SensorDiagnostics - Coated Sensor
Coated Sensor Fault (Ref Z Too High) pH Reference electrode normally has low impedance of 1-10 KilOhm Reference coating slowly builds up around the junction Setting of 20 KilOhm should not generally cause false alarms
Coated
Sensor!
- -
Reference
ElectrodeGlass Electrode
Solution
Ground
150 M-3K40k-
31
- -
Reference
ElectrodeGlass Electrode
Solution
Ground
60K 1500 M-
Dry Sensor Fault (Glass Z Too High) pH Glass electrode normally has impedance of 50-500 Megohm When sensor is dry there is no continuity between the electrode(s) and
the solution ground so impedance reading is very high Recommended setting of 1000 Megohm will not cause false alarms
Dry
Sensor!
Diagnostics - Non-Immersed SensorDiagnostics - Non-Immersed Sensor
More Advanced DiagnosticsMore Advanced Diagnostics
pH parameters slope, reference offset, glass, and reference impedances change little over bulk of operational life.
When parameters start to change, they indicate that more frequent calibrations will be necessary.
Diagnostics are at their most powerful when they can be compared to the original properties of the sensor.
Example: a pH slope of 54 may not indicate a problem, but a sudden drop in slope from 58 to 54 may indicate a 9 month old sensor will not last much longer.
Trending the electrode slope, reference offset, and reference impedance will show the first sign of problems.
SMART and Trending DiagnosticsSMART and Trending Diagnostics
SMART pH sensors automatically record their
initial conditions and the last 5 calibrations to
make trending easier.
• Predictive maintenance with reference
Impedance trending
• Determine optimum calibration frequency
and predict probe life with pH slope trending
Max pH error per calibration cycle^mV/ pH Change in Slope59 58.9 58.8 58.7 58.6 58.5 58.4 58.3 58.2 58.1 58 57.9 57.8 57.7 57.6 57.5 57.4 57.3
p̂H 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 1.70.1 # 0.02% # 0.03% # 0.05% # 0.07% # 0.09% # 0.10% # 0.12% # 0.14% # 0.15% # 0.17% # 0.19% # 0.21% # 0.23% # 0.24% # 0.26% # 0.28% # 0.30%0.2 # 0.03% # 0.07% # 0.10% # 0.14% # 0.17% # 0.21% # 0.24% # 0.27% # 0.31% # 0.34% # 0.38% # 0.42% # 0.45% # 0.49% # 0.52% # 0.56% # 0.59%0.3 # 0.05% # 0.10% # 0.15% # 0.20% # 0.26% # 0.31% # 0.36% # 0.41% # 0.46% # 0.52% # 0.57% # 0.62% # 0.68% # 0.73% # 0.78% # 0.84% # 0.89%0.4 # 0.07% # 0.14% # 0.20% # 0.27% # 0.34% # 0.41% # 0.48% # 0.55% # 0.62% # 0.69% # 0.76% # 0.83% # 0.90% # 0.97% # 1.04% # 1.11% # 1.19%0.5 # 0.08% # 0.17% # 0.26% # 0.34% # 0.43% # 0.51% # 0.60% # 0.69% # 0.77% # 0.86% # 0.95% # 1.04% # 1.13% # 1.22% # 1.30% # 1.39% # 1.48%0.6 # 0.10% # 0.20% # 0.31% # 0.41% # 0.51% # 0.62% # 0.72% # 0.82% # 0.93% # 1.03% # 1.14% # 1.25% # 1.35% # 1.46% # 1.57% # 1.67% # 1.78%0.7 # 0.12% # 0.24% # 0.36% # 0.48% # 0.60% # 0.72% # 0.84% # 0.96% # 1.08% # 1.21% # 1.33% # 1.45% # 1.58% # 1.70% # 1.83% # 1.95% # 2.08%0.8 # 0.14% # 0.27% # 0.41% # 0.55% # 0.68% # 0.82% # 0.96% # 1.10% # 1.24% # 1.38% # 1.52% # 1.66% # 1.80% # 1.94% # 2.09% # 2.23% # 2.37%0.9 # 0.15% # 0.31% # 0.46% # 0.61% # 0.77% # 0.92% # 1.08% # 1.24% # 1.39% # 1.55% # 1.71% # 1.87% # 2.03% # 2.19% # 2.35% # 2.51% # 2.67%1 # 0.17% # 0.34% # 0.51% # 0.68% # 0.85% # 1.03% # 1.20% # 1.37% # 1.55% # 1.72% # 1.90% # 2.08% # 2.25% # 2.43% # 2.61% # 2.79% # 2.97%
1.1 # 0.19% # 0.37% # 0.56% # 0.75% # 0.94% # 1.13% # 1.32% # 1.51% # 1.70% # 1.90% # 2.09% # 2.28% # 2.48% # 2.67% # 2.87% # 3.07% # 3.26%1.2 # 0.20% # 0.41% # 0.61% # 0.82% # 1.03% # 1.23% # 1.44% # 1.65% # 1.86% # 2.07% # 2.28% # 2.49% # 2.70% # 2.92% # 3.13% # 3.34% # 3.56%1.3 # 0.22% # 0.44% # 0.66% # 0.89% # 1.11% # 1.34% # 1.56% # 1.79% # 2.01% # 2.24% # 2.47% # 2.70% # 2.93% # 3.16% # 3.39% # 3.62% # 3.86%1.4 # 0.24% # 0.48% # 0.72% # 0.96% # 1.20% # 1.44% # 1.68% # 1.92% # 2.17% # 2.41% # 2.66% # 2.91% # 3.15% # 3.40% # 3.65% # 3.90% # 4.15%1.5 # 0.25% # 0.51% # 0.77% # 1.02% # 1.28% # 1.54% # 1.80% # 2.06% # 2.32% # 2.59% # 2.85% # 3.11% # 3.38% # 3.65% # 3.91% # 4.18% # 4.45%1.6 # 0.27% # 0.54% # 0.82% # 1.09% # 1.37% # 1.64% # 1.92% # 2.20% # 2.48% # 2.76% # 3.04% # 3.32% # 3.60% # 3.89% # 4.17% # 4.46% # 4.75%1.7 # 0.29% # 0.58% # 0.87% # 1.16% # 1.45% # 1.75% # 2.04% # 2.34% # 2.63% # 2.93% # 3.23% # 3.53% # 3.83% # 4.13% # 4.43% # 4.74% # 5.04%1.8 # 0.31% # 0.61% # 0.92% # 1.23% # 1.54% # 1.85% # 2.16% # 2.47% # 2.79% # 3.10% # 3.42% # 3.74% # 4.06% # 4.38% # 4.70% # 5.02% # 5.34%1.9 # 0.32% # 0.65% # 0.97% # 1.30% # 1.62% # 1.95% # 2.28% # 2.61% # 2.94% # 3.28% # 3.61% # 3.94% # 4.28% # 4.62% # 4.96% # 5.30% # 5.64%2 # 0.34% # 0.68% # 1.02% # 1.37% # 1.71% # 2.05% # 2.40% # 2.75% # 3.10% # 3.45% # 3.80% # 4.15% # 4.51% # 4.86% # 5.22% # 5.57% # 5.93%
2.1 # 0.36% # 0.71% # 1.07% # 1.43% # 1.79% # 2.16% # 2.52% # 2.89% # 3.25% # 3.62% # 3.99% # 4.36% # 4.73% # 5.10% # 5.48% # 5.85% # 6.23%2.2 # 0.37% # 0.75% # 1.12% # 1.50% # 1.88% # 2.26% # 2.64% # 3.02% # 3.41% # 3.79% # 4.18% # 4.57% # 4.96% # 5.35% # 5.74% # 6.13% # 6.53%2.3 # 0.39% # 0.78% # 1.18% # 1.57% # 1.97% # 2.36% # 2.76% # 3.16% # 3.56% # 3.97% # 4.37% # 4.78% # 5.18% # 5.59% # 6.00% # 6.41% # 6.82%2.4 # 0.41% # 0.82% # 1.23% # 1.64% # 2.05% # 2.47% # 2.88% # 3.30% # 3.72% # 4.14% # 4.56% # 4.98% # 5.41% # 5.83% # 6.26% # 6.69% # 7.12%2.5 # 0.42% # 0.85% # 1.28% # 1.71% # 2.14% # 2.57% # 3.00% # 3.44% # 3.87% # 4.31% # 4.75% # 5.19% # 5.63% # 6.08% # 6.52% # 6.97% # 7.42%2.6 # 0.44% # 0.88% # 1.33% # 1.77% # 2.22% # 2.67% # 3.12% # 3.57% # 4.03% # 4.48% # 4.94% # 5.40% # 5.86% # 6.32% # 6.78% # 7.25% # 7.71%2.7 # 0.46% # 0.92% # 1.38% # 1.84% # 2.31% # 2.77% # 3.24% # 3.71% # 4.18% # 4.66% # 5.13% # 5.61% # 6.08% # 6.56% # 7.04% # 7.53% # 8.01%2.8 # 0.48% # 0.95% # 1.43% # 1.91% # 2.39% # 2.88% # 3.36% # 3.85% # 4.34% # 4.83% # 5.32% # 5.81% # 6.31% # 6.81% # 7.30% # 7.80% # 8.31%2.9 # 0.49% # 0.99% # 1.48% # 1.98% # 2.48% # 2.98% # 3.48% # 3.99% # 4.49% # 5.00% # 5.51% # 6.02% # 6.53% # 7.05% # 7.57% # 8.08% # 8.60%3 # 0.51% # 1.02% # 1.53% # 2.05% # 2.56% # 3.08% # 3.60% # 4.12% # 4.65% # 5.17% # 5.70% # 6.23% # 6.76% # 7.29% # 7.83% # 8.36% # 8.90%
3.1 # 0.53% # 1.05% # 1.58% # 2.12% # 2.65% # 3.18% # 3.72% # 4.26% # 4.80% # 5.34% # 5.89% # 6.44% # 6.98% # 7.53% # 8.09% # 8.64% # 9.20%3.2 # 0.54% # 1.09% # 1.64% # 2.18% # 2.74% # 3.29% # 3.84% # 4.40% # 4.96% # 5.52% # 6.08% # 6.64% # 7.21% # 7.78% # 8.35% # 8.92% # 9.49%3.3 # 0.56% # 1.12% # 1.69% # 2.25% # 2.82% # 3.39% # 3.96% # 4.54% # 5.11% # 5.69% # 6.27% # 6.85% # 7.44% # 8.02% # 8.61% # 9.20% # 9.79%3.4 # 0.58% # 1.16% # 1.74% # 2.32% # 2.91% # 3.49% # 4.08% # 4.67% # 5.27% # 5.86% # 6.46% # 7.06% # 7.66% # 8.26% # 8.87% # 9.48% # 10.09%3.5 # 0.59% # 1.19% # 1.79% # 2.39% # 2.99% # 3.60% # 4.20% # 4.81% # 5.42% # 6.03% # 6.65% # 7.27% # 7.89% # 8.51% # 9.13% # 9.76% # 10.38%3.6 # 0.61% # 1.22% # 1.84% # 2.46% # 3.08% # 3.70% # 4.32% # 4.95% # 5.58% # 6.21% # 6.84% # 7.47% # 8.11% # 8.75% # 9.39% # 10.03% # 10.68%3.7 # 0.63% # 1.26% # 1.89% # 2.53% # 3.16% # 3.80% # 4.44% # 5.09% # 5.73% # 6.38% # 7.03% # 7.68% # 8.34% # 8.99% # 9.65% # 10.31% # 10.98%3.8 # 0.65% # 1.29% # 1.94% # 2.59% # 3.25% # 3.90% # 4.56% # 5.22% # 5.89% # 6.55% # 7.22% # 7.89% # 8.56% # 9.24% # 9.91% # 10.59% # 11.27%3.9 # 0.66% # 1.33% # 1.99% # 2.66% # 3.33% # 4.01% # 4.68% # 5.36% # 6.04% # 6.72% # 7.41% # 8.10% # 8.79% # 9.48% # 10.17% # 10.87% # 11.57%4 # 0.68% # 1.36% # 2.04% # 2.73% # 3.42% # 4.11% # 4.80% # 5.50% # 6.20% # 6.90% # 7.60% # 8.30% # 9.01% # 9.72% # 10.43% # 11.15% # 11.87%
= 1% = 2% = 3% = 4% = 5%Change in Process
Beginning Slope - Ending Slope = Slope Change
Slope Change * Maximum Change in Process pH = Maximum pH Deviation
Beginning Slope - Ending Slope = Slope Change
Slope change * Max change in pH = Max mV deviation per
calibration cycle
(Max mV deviation / Beginning Slope) = Max pH error
59mV/pH - 55mV/pH = 4mV/pH * 6pH = 24mV / 59mV/pH = 0.41pH
For a typical application ranging from 4 to 10 pH the error from assuming 59
slope instead of 55 could be 0.41 pH units
>>> need to recalibrate
Using DiagnosticsUsing Diagnostics
Instruments ship with the diagnostics turned off
When enabled, default setpoints will generally be ok
Few false alarms when correctly configured
Some problems may not be detectable with online diagnostics
When in doubt, check with buffers
35
Section 2: Modeling and Control
Virtual plant and embedded process models Online identification of titration curve Minimization of project capital cost Cascade pH control Batch pH control Linear reagent demand control Elimination of split range control Model predictive control
36
Embedded Process Model for pH
37
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
Titration Curves can Vary
Slope moderated
near each pKa
pKa and curve
change 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
38
Nonlinearity can cost big money
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
pH measurement error may look smaller on the flatter portion of a titration curve but the
associated reagent delivery error is larger
39
Slope
pH
Titration Curve Matched to Plant
40
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
middle
signal
selector
signal
characterizer
signal
characterizer
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
41
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 vs. Reagent Demand
42
Feed
Reagent
Reagent
ReagentThe period of oscillation (4 x process dead time) and filter time
(process residence time) is proportional to volume. To prevent
resonance of oscillations, different vessel volumes are used.
Small first tank provides a faster response
and oscillation that is more effectively filtered
by the larger tanks downstream
Big footprint
and high cost!
Traditional System for Minimum Variability
Major overlooked
problem is reagent
Deliver delay from
dip tube design
43
Reagent
Reagent
Feed
Reagent
Traditional System for Minimum Reagent Use
The period of oscillation (total loop dead time) must differ by more
than factor of 5 to prevent resonance (amplification of oscillations)
The large first tank offers more cross neutralization of influents
Big footprint
and high cost!
44
Tight pH Control with Minimum Capital
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#1R
eag
ent
High Recirculation Flow
Any Old Tank
Signal
Characterizer
*IL#2
LT
1-3
LC
1-3
IL#1 – Interlock that prevents back fill of
reagent piping when control valve closes
IL#2 – Interlock that shuts off effluent flow until
vessel pH is projected to be within control band Eductor
45
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 space 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:– See loop PV in pH and signal to final element– Enter loop SP in pH– Change mode to manual and change manual output
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)
46
Cascade Control to Reduce Downstream Offset
M
AT
1-2
Static Mixer
Feed
AT
1-1
FT
1-1
FT
1-2
Reagent
10 to 20
pipe
diameters
Sum
FC
1-1
Filter
Coriolis Mass
Flow Meter
f(x)
AC
1-1
AC
1-2
PV signal
Characterizer
RSP
f(x)
Flow Feedforward
SP signal
characterizer
Trim of Inline
Set Point
Enhanced PID
Controller
Linear Reagent
Demand Controller
Any Old Tank
47
Full Throttle Batch pH Control
Batch Reactor
AT
1-1
10 to 20
pipe
diameters
Filter
Delay
Sub Div
Sum
Dt
Cutoff
Past
DpH
Rate of
Change
DpH/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
48
Linear Reagent Demand Batch pH Control
Batch Reactor
AC
1-1
AT
1-1
10 to 20
pipe
diameters
f(x)
Master Reagent Demand
Adaptive PID Controller
Static Mixer
AC
1-1
AT
1-1
10 to 20
pipe
diameters
Secondary pH
PI Controller
Signal
Characterizer
Uses 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 cross
neutralization of swings between acidic and basic influent. It is
suitable for continuous control as well as fed-batch operation.
Influent #2
49
Conventional Fine and Coarse Valve Control
Neutralizer
AC
1-1
AT
1-1
PID Controller
Large
(Coarse)
Small
(Fine)
ZC
1-1
Integral only Controller
(CV is Implied Fine
Control Valve Position)
CV
ZC speed of response must
be slow and tuning is difficult
Must add feedforward for fast
and large influent disturbance
50
Advanced Fine and Coarse Valve Control
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 addresses
both the rangeability and resolution issues. This MPC can
possibly reduce the number of stages of neutralization needed
51
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
52
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 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 interacting systems and
constraint or valve position control
53
Section 3: Practical Considerations
Causes and Effects of Drift 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
Reference Liquid Junction is a Porous “Membrane”– Diffusion Rate Must Remain Constant to Eliminate Drift– Coating, Pressure (flow) changes, chemical reactions interfere
Drift
Process Inside Sensor
Reference
KCl outH2O in
Other Process
Constituents in
Concentration Gradient Through
Reference Junction (Membrane)
Gradient Through Reference When CleanGradient Through Reference When Coated
Difference in the Gradient between Clean and Coated Causes Offset
55
High Today may be Low Tomorrow
A
BA
BA
BpH
time
With just two electrodes, sometimes there are more questions than answers.
Calibration adjustments chase short term effects such as:
–Imperfect mixing
–Ion migration into reference junction
–Temperature shifts
–Different glass surface conditions
–Fluid streaming potentials…
56
Drift effects on Feedforward control
pH
Reagent to Feed
Flow Ratio
4
10
6
8
Feedforward
Reagent Error
Feedforward
pH Error
Sensor Drift
pH Set PointInfluent pH
The error in a pH feedforward calculation
increases for a given sensor error as the
slope of the curve decreases. This result
combined with an increased likelihood of
errors at low and high pH means feedforward
could do more harm than good when going
from the curve’s extremes to the neutral region.
Flow feedforward (ratio control
of reagent to influent flow) works
well 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
Normal Condition: inlet pH is 5 and setpoint is 7
Sensor drifts to 4.5 causes overfeed of reagent and outlet to be pH 9
57
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
58
Horizontal Piping Arrangements
AE
AE
AE
AEAEAE
5 to 9 fps to minimize coatings
0.1 to 1 fps to minimize abrasion
20 to 80 degrees
The bubble inside the glass bulb
can be lodged in tip of a probe
that is horizontal or pointed up or
caught at the internal electrode
of a probe that is vertically down
pressure drop for
each branch must
be equal 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 to
adjust velocity
throttle valve to
adjust velocity
59
Vertical Piping ArrangementsA
E AE AE
AE
AE
AE
5 to 9 fps
coating abrasion
10
OD
10
OD
0.1 to 1 fps
hole
or
slot
Orientation of slot in shroud
throttle valve to
adjust velocity
throttle valve to
adjust velocity
Series arrangement preferred to minimize differences in solids,
velocity, concentration, and temperature at each electrode!
60
Options for Maximum Accuracy Select best glass and reference electrolyte for process A hemi-spherical glass electrode and flowing junction reference offers
maximum accuracy, but in practice maintenance prefers:– A refillable double junction reference to reduce the complexity of installation – 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 – takes the longest time to equilibrate and is more prone to junction effects.
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 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
Keep process fluid velocity constant at the highest practical value for clean and responsive electrodes
61
Wireless pH Lab Setup
Wireless pH measurements offer
• Best sensor technology for a wide range of process conditions
• Reduced electrical noise from ground issues
• Predictive diagnostics using smart pH sensors
• Convenient platform to establish specific solution temperature compensation,
develop inferential measurements of process concentrations, and relocate the sensor for best results considering velocity, mixing, delay, &
bubbles
62
Wireless pH 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%
63
Wireless Bioreactor Adaptive pH Loop Test
64
Mistakes in pH System Design
M
Mistake 7 (gravity flow)
AT
1-1
AT
1-3
AT
1-2
Mistake 4 (horizontal tank)
reagent
feed 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 (electrode
submerged 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 curve
Mistake 2: Absence of a plan to handle failures, startups, or shutdowns
65
Mixing Pattern and Vessel Geometry
Stagnant
Zone
Stagnant
Zone
MFeed
Reagent
AT
1-3
Short
Circuiting
Stagnant
Zone
Plug
Flow
66
Oversized Reagent Valves
dead band
Dead band
Stick-Slip is worse near closed position
Signal
(%)
0
Stroke
(%)Digital positioner
will force valve
shut at 0% signal
Pneumatic positioner
requires 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)
67
Control Valve Rangeability and Resolution
pH
Reagent Flow
Influent Flow
6
8
Influent pHB
A
Control BandSet point
B
Er = 100% * Fimax * ----
Frmax
Frmax = A * Fimax
B
Er = ----
A
Ss = 0.5 * Er
Where:
A = distance to center of reagent error band on abscissa from influent pH
B = 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) (%)
68
Key Points
The pH measurement error may look smaller on the flatter portion of a titration curve but the associated reagent delivery error is larger
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
A series installation of multiple probes insures the electrodes will see the same velocity and mixture that is important for consistent performance
69
Section 4: Summary
Extraordinary Sensitivity and Rangeability Deceptive and Severe Nonlinearity Extraneous Effects on Measurement Difficult Control Valve Requirements
Look at the titration curve
pH Control is difficult because of nonlinearity:– Large Amounts of chemical cause little change initially.– Small Amounts cause huge changes near equivalence point.
Titration Curves are essential for pH system modeling
0.90000
0.99000
0.99900
0.99990
0.99999
1.00000
1.00001
1.00010
1.00100
1.01000
1.10000
0123456789
1011121314
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1
pH
ml of base added
Equivalence
Point
Not a
pipette!
Rules of thumb: multiple stages
When the process pH must be changed by more than 2 units:
Use Multiple Stages!
Remember that 2 pH units is a factor of 100 in concentration.
Can you accurately dilute a concentrated acid by a factor of 500 in one step?
pH Hydrogen Ion [H+] Hydroxyl Ion [OH-] 0 Acidic 1 2 3 4 5 6 7 Neutral 8 9 10 11 12 13 14 Basic
1.0 0.1 0.01 0.001 0.0001 0.00001 0.000001 0.0000001 0.00000001 0.000000001 0.0000000001 0.00000000001 0.000000000001 0.0000000000001 0.00000000000001
0.00000000000001 0.0000000000001 0.000000000001 0.00000000001 0.0000000001 0.000000001 0.00000001 0.0000001 0.000001 0.00001 0.0001 0.001 0.01 0.1 1.0
Rules: Mixing
If the sensor does not see a representative sample of the process, it won’t measure correctly.
Don’t try to do all the neutralizing in a pipe! pH reagents can be more viscous than water
and require time to mix and react. Static mixers are good for first stage
treatment, especially in feedforward mode. Achieving a good setpoint will usually require
a downstream stabilization tank.
73
Mixing II
A system normally 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
Rules: Holdup time
1. Use sufficient holdup time to balance throughput and efficiency.
2. Prevent short-circuiting by using baffles.
3. Locate tank exit lines to give the reagent the maximum time to react (tanks using heavy pH solutions should overflow, not exit the bottom).
improve performance provide a better location for a feedback
pH loop help prevent overshoot and oscillation
75
Holdup time II
Horizontal tanks are notorious for short circuiting, stagnation, and plug flow that cause excessive dead time and an erratic pH response
To provide isolation, use a separate on-off valve and avoid the specification of tight shutoff and high performance valves for throttling reagent
Rules: Minimize deadtime
Deadtime is the killer of all good control loops.
The response time of a pH sensor depends most on how clean the glass surface is.
Install the sensor in a flowing stream at about 5 feet per second velocity for a self-cleaning action.
Try to minimize extractive sampling since that is another delay and may not provide a representative sample.
77
Deadtime II
The actual equipment dead time is often larger than the turnover time because of non ideal mixing patterns and fluid entry and exit locations
The dead time from back filled reagent dip tubes or injection piping is huge
Rules: Keep your pH sensor clean
The biggest maintenance headache for pH sensors is usually just cleaning them off.
Some sensors are designed to resist coating by providing large reference areas.
Use a retractable sensor when the process cannot be shut down to clean the sensor.
Automatic retraction (and cleaning) devices are available to save on labor costs, but can be expensive.
Rules: Valve selection
Good control valves have a turndown ratio of about 10:1.
Don’t oversize pH control valves! Allow for some hysteresis and
stiction in your valves to prevent overshoot problems.
Don’t try to control too close to the desired setpoint.
pH control obeys the Uncertainty Principle
80
Valve Selection II
Set points on the steep portion of a titration curve require 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
Extreme pH values
pH is a very sensitive measure of acid or base.
When there is a lot of acid or base (i.e. pH over 13 or under 1), there may be more appropriate methods.
Methods based on bulk measurements like electrical conductivity, near infrared, or refractive index may be more accurate since they are linear in concentration.
H+
OH-
H+
H2O
OH-
82
Key Points - Measurement
The time that glass electrodes are left dry or exposed to high pH solutions must be minimized for the best performance from 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 cost of pH sensor maintenance can typically be reduced by a factor of ten with realistic expectations and calibration policies
The first sign of coating on the glass measurement electrode is a large increase in its time constant and response time
The first sign of a non conductive coating on the reference electrode is usually a large increase in its electrical resistance
Non-aqueous and pure water streams require extra attention to shielding, process path length, and velocity to minimize pH measurement noise
83
Key Points - Measurement II
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 requires regulated pressurization to maintain a small positive flow
The best choice might not be the best technical match to the application but the electrode that gets the best support from maintenance, operations, and vendor
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 thicker glass or flat electrode can minimize coatings, stagnant areas, and glass breakage
For high process temperatures, high ion concentrations, and severe fouling, use automatic retractable assemblies to reduce exposure
When the fluid velocity is insufficient to sweep electrodes clean, use an integral jet washer or a cleaning cycle in a retractable assembly
Conclusion
pH is a versatile and powerful analytical technique for characterizing your process
Understanding the nonlinear aspect of pH is key to successful implementation
There’s more to pH control than selecting the “best” pH sensor and tuning a PID loop
Rewards for proper pH management far outweigh the small cost of the installed field equipment
Where To Get More Information
“What’s the Real pH of that Stream?”– http://
www2.emersonprocess.com/siteadmincenter/PM%20Rosemount%20Analytical%20Documents/Liq_Article_61-2111_200503.pdf
Greg’s excellent book– http://
www.amazon.com/Advanced-Measurement-Control-3rd-Edition/dp/1934394432
Emerson Application data sheets– http://
www2.emersonprocess.com/en-US/brands/rosemountanalytical/Liquid/Documentation/ADS/Pages/index.aspx