1pH Control SolutionsAscend Chocolate Bayou Plant Seminar March 10, 2011
2 Introduction of PresenterISA PresenterGregory K. McMillan ( E-mail:Greg.McMillan@Emerson.com )  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/
3Source
4ISA Automation Week - Oct 17-20Call for PapersDeadline is March 28 !
5  Legends Cutler and Liptak Give Keynotes
6Key Benefits of SeminarRecognition of the opportunity and challenges of pH controlAlerts to important implementation considerationsAwareness of modeling and control optionsUnderstanding the root causes of poor performancePrioritization of improvements based on cost, time, and goalInsights for applications and solutions
7Section 1: pH Opportunity and ChallengeExtraordinary Sensitivity and RangeabilityDeceptive and Severe NonlinearityExtraneous Effects on MeasurementDifficult Control Valve Requirements
8Top Ten Signs of a Rough pH StartupFood 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 you9Extraordinary Sensitivity and RangeabilitypHHydrogen Ion ConcentrationHydroxyl 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.0Hydrogen and Hydroxyl Ion Concentrations in a Water Solution at 25oCaH = 10-pHpH = - log (aH)aH =  g * cH	cH* cOH = 10-pKwWhere: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)
10Effect of Water Dissociation (pKw) on Solution pHMeasured pHpH 10pH 9pH 7.5REAL pH 8pH 7pH 6.5pH 6pH 5
11  AMS pH Range and Compensation ConfigurationpH / ORP SelectionPreamplifier LocationType of Reference UsedRangingTemperature Comp ParametersSolution pH Temperature CorrectionIsopotential Point Changeable for Special pH Electrodes
121412108pH6420111098pH76543Nonlinearity - Graphical DeceptionFor 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.Reagent / Influent RatioDespite 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)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 pointReagent / Influent Ratio
13Weak Acid and Strong Basepka = 4Multiple Weak Acids and Weak BasesWeak Acid and Weak Basepka = 9pka = 10pka = 5pka = 3pka = 4Nonlinearity - Graphical DeceptionStrong Acid and Weak Basepka = 10Slope moderatednear each pKapKa and curve changes with temperature!
14  Reagent Savings is Huge for Flat Part of Curve10pH4Reagent to Feed      Flow Ratio Reagent  SavingsOptimum set pointOriginal set pointOscillations could be due to non-ideal mixing, control valve stick-slip. or pressure fluctuations
15  Effect of Sensor Drift on Reagent Calculations 10pHFeedforwardpH Error8pH Set Point6Influent pH4Sensor DriftReagent to Feed      Flow Ratio 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 rangeabilityFeedforwardReagent ErrorFeedforward 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
16WWWWWWWWDouble Junction Combination pH Electrode EmR3ErR4solution groundsilver-silver chlorideinternal electrodeMeasurementbecomes slow from a loss ofactive sites ora thin coatingof outer gelE4secondjunctionR5potassium chloride (KCl) electrolyte in salt bridge between junctionsprimary junctionR6E5inner gellayersilver-silver chlorideinternal electrodeNernst Equationassumes insideand outside gellayers identicalE3Wouter gellayerR27 pH bufferE2Process ions try to migrate into porous reference junctionwhile electrolyte ionstry to migrate outR1WIiE1Process FluidR10R9R7R8High 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
17Life Depends Upon Process ConditionsMonths>100% increase in life from new glass designsfor high temperatures25 C50 C75 C100 CProcess TemperatureHigh 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.
18New High Temperature Glass Stays FastGlass electrodes get slow as they age.  High temperatures cause premature aging
19What is High Today may be Low TomorrowMost 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.BAABABpHtime
20Control Valve Rangeability and ResolutionpH8Set pointControl Band6            BEr = 100% * Fimax*----           	               FrmaxFrmax = A * Fimax          BEr = ----          ASs = 0.5 * ErWhere: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) (%)Influent pHBReagent FlowInfluent FlowA
21pH12pH310Slow8Fastest process response seen byLoop at inflection point (e.g. 7 pH)pH26pH142Reagent FlowInfluent FlowSlow  Speed of Response Seen by pH LoopExcursion from pH1 to pH2 acceleration makes response look like a runaway to loopExcursion from pH2 to pH3 deceleration is not enough to show true process time constantBatch 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!
22Key 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 sportSolution 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 contentSolution pH changes despite a constant acid or base concentration because of changes in the acid or base dissociation constants (pKa) with temperatureTitration curves have no straight lines A zoom in on any supposed line should reveal another curve if there are sufficient data pointsSlope 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 requirementTitration curves are essential for every aspect of pH system design and analysisFirst 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)
23Key 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 conditionsTime 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 layerMost accuracy statements and tests are for short term exposureLong term error of pH measurements installed in the process is an order of magnitude greater than the error normally stated in the literaturepH measurement error may look smaller on the flatter portion of a titration curve but the associated reagent delivery error is largerCost of pH measurement maintenance can be reduced by a factor of ten by more realistic expectations and calibration policiesSet 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 conditionsReagent valve resolution (stick-slip) may determine the number of stages of neutralization required, which has a huge impact on a project’s capital costApproach to the neutral point looks like a runaway due to accelerationBatch processes have less self-regulation and tend to rampBatch processes can have a one direction response for a given reagent
24Section 2: Modeling and Control OptionsVirtual plant and imbedded process modelsMinimization of capital investmentCascade pH controlOnline identification of titration curveBatch pH controlLinear reagent demand controlAdapted reagent demand controlSmart split range pointElimination of split range controlModel predictive control
25Virtual Plant SetupConfiguration and GraphicsVirtual PlantLaptop or Desktopor Control System StationAdvanced Control ModulesProcess Module for Bioreactor or Neutralizer
26Virtual Plant AccessFree 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)Virtual Plant:    http://www.processcontrollab.com/Recorded Deminars: http://www.modelingandcontrol.com/deminar_series.htmlA new easy fast free method of access is now available that eliminates IT security issues and remote access response delays
27FuzzyLogicWasteRCASRCASmiddle selectorROUTkickerAYAYACACsplittersplitterATATATAYAYAttenuationTankAYmiddle selectormiddle selectorfilterFTFTAYAYStage 2Stage 1ATATATATATATWasteMixerMixerFT  Case History 1- Existing Control System
28MPC-1MPC-2WasteRCASRCASmiddle selectorROUTAC-1AC-2kickerAYAYsplittersplitterATATATAYAYAttenuationTankAYmiddle selectormiddle selectorfilterFTFTAYAYStage 2Stage 1ATATATATATATWasteMixerMixerFT  Case History 1 - New Control System
2912pHOld Set PointNew Set Point2Reagent to Waste      Flow Ratio New RatioOld RatioReagent  Savings  Case History 1 - Opportunities for Reagent Savings
30Model Predictive Control (MPC)For Optimization of Actual PlantStage 1 and 2 Set PointsActual PlantOptimization(MPC1 and MPC2)Tank pH and 2nd Stage ValvesInferential Measurement(Waste Concentration)and DiagnosticsStage 1 and 2 pH Set PointsActualReagent/Waste Ratio(MPC SP)VirtualReagent/Influent Ratio(MPC CV)Virtual PlantAdaptation(MPC3)ModelInfluent Concentration(MPC MV)Model Predictive Control (MPC)For Adaptation of Virtual Plant  Case History 1 - Online Adaptation and Optimization
31  Case History 1 - Online Model Adaptation ResultsActual Plant’sReagent/InfluentFlow RatioVirtual Plant’sReagent/InfluentFlow RatioAdapted Influent Concentration(Model Parameter)
3293%Acid50%CausticWater AT Cation  AnionTo EOFinal causticadjustmentFinal acidadjustmentPit  Case History 2 - Existing Neutralization System
33  Case History 2 - Project ObjectivesSafeResponsibleReliableMechanicallyRobust controls, Operator friendlyAbility to have one tank out of serviceBalance initial capital against reagent costLittle or no equipment rework
34  Case History 2 - Cost Data93%H2SO4 spot market price		$2.10/Gal50% NaOH spot market price	 	$2.30/Gal
35  Case History 2 - ChallengesProcess gain changes by factor of 1000xFinal element rangeability needed is 1000:1Final element resolution requirement is 0.1%Concentrated reagents (50% caustic and 93% sulfuric)Caustic valve’s ¼ inch port may plug at < 10% positionMust mix 0.05 gal reagent in 5,000 gal < 2 minutesVolume between valve and injection must be < 0.05 gal 0.04 pH sensor error causes 20% flow feedforward errorExtreme sport - extreme nonlinearity, sensitivity, and rangeability of pH demands extraordinary requirements for mechanical, piping, and automation system design
36  Case History 2 - ChoicesReally big tank and thousands of miceeach with 0.001 gallon of acid or causticormodeling and control
37  Case History 2 - Tuning for Conventional pH Control
38Gain 10x larger  Case History 2 - Tuning for Reagent Demand Control
39  Embedded Process Model for pH
40  Titration Curve Matched to PlantpHSlope
41signalcharacterizer AY 1-3pH set pointSignal characterizers linearize loop via reagent demand control AC 1-1NaOHAcid AY 1-2 LC 1-5 LT 1-5 FT 1-1 FT 1-2middlesignal selectorsignalcharacterizersplitter AY 1-4Feed AY 1-1To other Tank AT 1-2 AT 1-1 AT 1-3TankEductorsFrom other TankStatic MixerTo other TankDownstream system  Modeled pH Control System
42One of many spikes of recirculation pH spikes from stick-slip of water valveInfluent pHTank 1 pH for Reagent Demand ControlTank 1 pH for Conventional pH ControlStart of Step 4(Slow Rinses)Start of Step 2(Regeneration)Conventional pH versus Reagent Demand Control
43Traditional System for Minimum VariabilityThe 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.    ReagentReagentReagentFeedSmall first tank provides a faster responseand oscillation that is more effectively filtered by the larger tanks downstreamBig footprintand high cost!
44Traditional System for Minimum Reagent UseReagentThe period of oscillation (total loop dead time) must differ by morethan factor of 5 to prevent resonance (amplification of oscillations) FeedReagentReagentBig footprintand high cost!The large first tank offers more cross neutralization of influents
45 FC 1-2 AC 1-1 LC 1-3Tight pH Control with Minimum Capital InvestmentIL#1 – Interlock that prevents back fill ofreagent piping when control valve closesIL#2 – Interlock that shuts off effluent flow untilvessel pH is projected to be within control bandEductorHigh Recirculation FlowReagentAny Old TankSignalCharacterizer LT 1-3 f(x) FT 1-1*IL#2Effluent AT 1-1*IL#1 FT 1-2Influent10 to 20 pipediameters
46Linear Reagent Demand ControlSignal characterizer converts PV and SP from pH to % Reagent DemandPV is abscissa of the titration curve scaled 0 to 100% reagent demandPiecewise segment fit normally used to go from ordinate to abscissa of curveFieldbus 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 compensationIf 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 pHOperator can change mode to manual and change manual outputOperator sees both reagent demand % and PV trendsSet point on steep part of curve shows biggest improvements from: Reduction in limit cycle amplitude seen from pH nonlinearityDecrease in limit cycle frequency from final element resolution (e.g. stick-slip)Decrease in crossing of split range pointReduced reaction to measurement noiseShorter 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)
47 FC 1-1 AC 1-1 AC 1-2MCascade pH Control to Reduce Downstream OffsetLinear ReagentDemand ControllerFlow Feedforward FT 1-1RSPSumTrim of Inline   Set PointReagent f(x) AT 1-1 Filter f(x) FT 1-2Static Mixer  PV signalCharacterizer  SP signalcharacterizerFeedCoriolis MassFlow Meter10 to 20pipediametersAny Old TankIntegralOnlyController AT 1-2
48Full Throttle (Bang-Bang) Batch pH ControlBatch pH End PointPredicted pH CutoffSumReagentRate ofChangeDpH/DtProjected     DpHPastDpHNew pH Sub Div MulOld pH DelayDtTotal System  Dead TimeBatch Reactor Filter AT 1-110 to 20 pipediametersSection 3-5 in New Directions in Bioprocess Modeling and Controlshows how this strategy is used as a head start for a PID controller
49 AC 1-1 AC 1-1 FC 1-1 FQ 1-1Linear Reagent Demand Batch pH Control FT 1-1Secondary pHPI ControllerInfluent #1 AT 1-1Online Curve  IdentificationStatic Mixer10 to 20 pipediameters FT 1-2Influent #2 f(x)Batch Reactor Signal CharacterizerUses OnlineTitration CurveMaster Reagent DemandAdaptive PID Controller AT 1-110 to 20 pipediametersReduces 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.
50 FT 1-1Secondary pHPI Controller AC 1-1 AC 1-1 FC 1-1 FQ 1-1Influent AT 1-1Online Curve  IdentificationStatic Mixer10 to 20 diameters FT 1-2 f(x)Neutralizer Signal CharacterizerUses OnlineTitration CurveMaster Reagent DemandAdaptive PID Controller AT 1-110 to 20 diameters  Adapted Reagent Demand ControlReduces injection and mixing delays and enables somecross neutralization in continuous and batch operations
51   Recently Developed Adaptive ControlAnticipates nonlinearity by recognizing old territoryModel and tuning settings are scheduled per operating regionRemembers what it has learned for preemptive correctionDemonstrates efficiency improvement during testingSteps can be in direction of optimum set pointExcess reagent use rate and total cost can be displayed onlineAchieves optimum set point more efficientlyRapid approach to set point in new operating regionRecovers from upsets more effectivelyFaster correction to prevent violationMore efficient recovery when driven towards constraint  Returns to old set points with less oscillation Faster and smoother return with less overshoot
52Multiple Model parameterInterpolation with re-centeringEstimated Gain, time constant, and deadtimeChanging process inputFirst Order Plus Deadtime ProcessGain12Time Constant3Dead time  First Order plus Dead Time Model IdentificationFor 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 deadtimeChanges in the process model can be used to diagnose changesin the influent and the reagent delivery and measurement systems
53  Scheduling of Learned Dynamics and TuningModel and tuning is scheduled based on pH
54total cost ofexcess reagentpHhourly cost of excess reagenttotal cost ofexcess reagentpHhourly cost of excess reagent  Adaptive Control Efficiently Achieves Optimum
55total costof excessreagentpHhourly cost of excesstotal cost of excessreagenthourly costof excesspH  Adaptive Control Efficiently Rejects Loads
56pHpH  Adaptive Control is Stable on Steep Slopes
57    Smart Split Range PointG 	= 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.)
58 AC 1-1  Smart Split Range PointReagentSmart in terms of valve gaincompensation but not smartin terms of valve sensitivity !Small(Fine)Large(Coarse)SplitterSplit RangeBlockFor large valve 4x small valve flow:PID	Small	LargeOutValveValve0%	0%	0%20%	100%	0%20%	100%	0%100%	100%	100%NeutralizerPID Controller AT 1-1
59 AC 1-1a AC 1-1b  PID Valve Sensitivity and Rangeability Solution 1 ReagentLarge(Coarse)Small(Fine)NeutralizerPID Controlleror PIDPlus withsensitivity limit AT 1-1Proportional only Controlleror PIDPlus withsensitivity limit
60 AC 1-1 ZC 1-1  PID Valve Sensitivity and Rangeability Solution 2 ReagentSmall(Fine)Large(Coarse)Integral only Controlleror PIDPlus withsensitivity limitNeutralizerPID Controlleror PIDPlus withsensitivity limit AT 1-1
61MPC Valve Sensitivity and Rangeability SolutionModel 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  neededhttp://www.controlglobal.com/articles/2005/533.htmlhttp://www.modelingandcontrol.com/2009/03/application_notes.html
62  MPC Valve Sensitivity and Rangeability Solution
63  MPC Valve Sensitivity and Rangeability Solution
64  MPC Valve Sensitivity and Rangeability Solution
65  MPC Maximization of Low Cost Reagent
66  MPC Maximization of Low Cost Reagent
67Riding Max SPon Lo Cost MVRiding Min SPon Hi Cost MVCritical CVCritical CVLoadUpsetsLoadUpsetsLow Cost MV Maximum SP  Increased Low Cost MV Maximum SP  Decreased Set PointChangesSet PointChangesLo Cost Slow MVHi Cost Fast MV  MPC Maximization of Low Cost Reagent
68  MPC Maximization of Low Cost Reagent manipulated     variablesdisturbance     variable   SupplementalReagent Flow SP Acid Feed   Flow SPCheap Reagent     Flow PVMPCcontrolled  variableNeutralizer   pH PVoptimization      variableAcidic Feed  Flow SPMaximizenullnullconstraint   variableSupplemental     Reagent Valve   PositionNote that cheap reagent valve is wide open and feed is maximized to keep supplemental                 reagent valve at minimum throttle position for minimum stick-slip
69Key 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 nonlinearityFilter the feedforward signal to remove noise and make sure the corrective action does not arrive too soon and cause inverse responseThe effectiveness of feedforward control greatly depends upon the ability to eliminate reagent delivery delaysIf there is a reproducible influent flow measurement use flow feedforward, otherwise use a head start to initialize the reagent flow for startupThe 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
70Key Points Changes in the process dynamics identified online can be used to predict and analyze changes in the influent, reagent, valve, and sensorNew adaptive controllers will remember changes in the process model as a function of operating point and preemptively schedule controller tuningUse inline pH control, mass flow meters, linear control valves, and dynamic compensation to automatically identify the titration curve onlineUse gain scheduling or signal characterization based on the titration curve to free up an adaptive controller to find the changes in the curveBatch samples should be taken only after the all the reagent in the pipeline and dip tube has drained into the batch and been thoroughly mixedUse 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/startupUse online titration curve identification and linear reagent demand pH control for extremely variable and sharp or steep titration curveUse 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 metersUse linear reagent demand model predictive control for dead time dominant or interacting systems and constraint or valve position control
71Section 3: Plant Design and MaintenanceCommon Problems with Titration CurvesEffect of Measurement Selection and InstallationOptions to improve accuracy and maintenanceEffect of piping design, vessel type, and mixing patternImplications of oversized and split ranged valves Online Troubleshooting

pH Control Solutions - Greg McMillan

  • 1.
    1pH Control SolutionsAscendChocolate Bayou Plant Seminar March 10, 2011
  • 2.
    2 Introduction ofPresenterISA PresenterGregory K. McMillan ( E-mail:Greg.McMillan@Emerson.com ) 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/
  • 3.
  • 4.
    4ISA Automation Week- Oct 17-20Call for PapersDeadline is March 28 !
  • 5.
    5 LegendsCutler and Liptak Give Keynotes
  • 6.
    6Key Benefits ofSeminarRecognition of the opportunity and challenges of pH controlAlerts to important implementation considerationsAwareness of modeling and control optionsUnderstanding the root causes of poor performancePrioritization of improvements based on cost, time, and goalInsights for applications and solutions
  • 7.
    7Section 1: pHOpportunity and ChallengeExtraordinary Sensitivity and RangeabilityDeceptive and Severe NonlinearityExtraneous Effects on MeasurementDifficult Control Valve Requirements
  • 8.
    8Top Ten Signsof a Rough pH StartupFood is burning in the operators’ kitchen
  • 9.
    The only loopmode configured is manual
  • 10.
    An operator putshis fist through the screen
  • 11.
    You trip overa pile of used pH electrodes
  • 12.
    The technicians ask:“what is a positioner?”
  • 13.
    The technicians stickelectrodes up your nose
  • 14.
  • 15.
    The plant managerleaves the country
  • 16.
    Lawyers pull theplugs on the consoles
  • 17.
    The president ison the phone holding for you9Extraordinary Sensitivity and RangeabilitypHHydrogen Ion ConcentrationHydroxyl 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.0Hydrogen and Hydroxyl Ion Concentrations in a Water Solution at 25oCaH = 10-pHpH = - log (aH)aH = g * cH cH* cOH = 10-pKwWhere: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)
  • 18.
    10Effect of WaterDissociation (pKw) on Solution pHMeasured pHpH 10pH 9pH 7.5REAL pH 8pH 7pH 6.5pH 6pH 5
  • 19.
    11 AMSpH Range and Compensation ConfigurationpH / ORP SelectionPreamplifier LocationType of Reference UsedRangingTemperature Comp ParametersSolution pH Temperature CorrectionIsopotential Point Changeable for Special pH Electrodes
  • 20.
    121412108pH6420111098pH76543Nonlinearity - GraphicalDeceptionFor 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.Reagent / Influent RatioDespite 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)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 pointReagent / Influent Ratio
  • 21.
    13Weak Acid andStrong Basepka = 4Multiple Weak Acids and Weak BasesWeak Acid and Weak Basepka = 9pka = 10pka = 5pka = 3pka = 4Nonlinearity - Graphical DeceptionStrong Acid and Weak Basepka = 10Slope moderatednear each pKapKa and curve changes with temperature!
  • 22.
    14 ReagentSavings is Huge for Flat Part of Curve10pH4Reagent to Feed Flow Ratio Reagent SavingsOptimum set pointOriginal set pointOscillations could be due to non-ideal mixing, control valve stick-slip. or pressure fluctuations
  • 23.
    15 Effectof Sensor Drift on Reagent Calculations 10pHFeedforwardpH Error8pH Set Point6Influent pH4Sensor DriftReagent to Feed Flow Ratio 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 rangeabilityFeedforwardReagent ErrorFeedforward 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
  • 24.
    16WWWWWWWWDouble Junction CombinationpH Electrode EmR3ErR4solution groundsilver-silver chlorideinternal electrodeMeasurementbecomes slow from a loss ofactive sites ora thin coatingof outer gelE4secondjunctionR5potassium chloride (KCl) electrolyte in salt bridge between junctionsprimary junctionR6E5inner gellayersilver-silver chlorideinternal electrodeNernst Equationassumes insideand outside gellayers identicalE3Wouter gellayerR27 pH bufferE2Process ions try to migrate into porous reference junctionwhile electrolyte ionstry to migrate outR1WIiE1Process FluidR10R9R7R8High 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
  • 25.
    17Life Depends UponProcess ConditionsMonths>100% increase in life from new glass designsfor high temperatures25 C50 C75 C100 CProcess TemperatureHigh 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.
  • 26.
    18New High TemperatureGlass Stays FastGlass electrodes get slow as they age. High temperatures cause premature aging
  • 27.
    19What is HighToday may be Low TomorrowMost 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.BAABABpHtime
  • 28.
    20Control Valve Rangeabilityand ResolutionpH8Set pointControl Band6 BEr = 100% * Fimax*---- FrmaxFrmax = A * Fimax BEr = ---- ASs = 0.5 * ErWhere: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) (%)Influent pHBReagent FlowInfluent FlowA
  • 29.
    21pH12pH310Slow8Fastest process responseseen byLoop at inflection point (e.g. 7 pH)pH26pH142Reagent FlowInfluent FlowSlow Speed of Response Seen by pH LoopExcursion from pH1 to pH2 acceleration makes response look like a runaway to loopExcursion from pH2 to pH3 deceleration is not enough to show true process time constantBatch 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!
  • 30.
    22Key Points pHelectrodes 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 sportSolution 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 contentSolution pH changes despite a constant acid or base concentration because of changes in the acid or base dissociation constants (pKa) with temperatureTitration curves have no straight lines A zoom in on any supposed line should reveal another curve if there are sufficient data pointsSlope 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 requirementTitration curves are essential for every aspect of pH system design and analysisFirst 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)
  • 31.
    23Key Points Accuracyand 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 conditionsTime 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 layerMost accuracy statements and tests are for short term exposureLong term error of pH measurements installed in the process is an order of magnitude greater than the error normally stated in the literaturepH measurement error may look smaller on the flatter portion of a titration curve but the associated reagent delivery error is largerCost of pH measurement maintenance can be reduced by a factor of ten by more realistic expectations and calibration policiesSet 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 conditionsReagent valve resolution (stick-slip) may determine the number of stages of neutralization required, which has a huge impact on a project’s capital costApproach to the neutral point looks like a runaway due to accelerationBatch processes have less self-regulation and tend to rampBatch processes can have a one direction response for a given reagent
  • 32.
    24Section 2: Modelingand Control OptionsVirtual plant and imbedded process modelsMinimization of capital investmentCascade pH controlOnline identification of titration curveBatch pH controlLinear reagent demand controlAdapted reagent demand controlSmart split range pointElimination of split range controlModel predictive control
  • 33.
    25Virtual Plant SetupConfigurationand GraphicsVirtual PlantLaptop or Desktopor Control System StationAdvanced Control ModulesProcess Module for Bioreactor or Neutralizer
  • 34.
    26Virtual Plant AccessFreeState of the Art Virtual Plant
  • 35.
    Not anemulation but a DCS (SimulatePro)
  • 36.
  • 37.
    Structural Changes“On the Fly”
  • 38.
    Advanced PIDOptions and Tuning Tools
  • 39.
    Enough varietyof valve, measurement, and process dynamics to study 90% of the process industry’s control applications
  • 40.
    Learn in10 minutes rather than 10 years
  • 41.
  • 42.
    Standard OperatorGraphics & Historian
  • 43.
    Control RoomType Environment
  • 44.
    No ModelingExpertise Needed
  • 45.
    No ConfigurationExpertise Needed
  • 46.
    Rapid Risk-FreePlant Experimentation
  • 47.
  • 48.
    Process ControlImprovement Demos
  • 49.
    Sample Lessons(Recorded Deminars)Virtual Plant: http://www.processcontrollab.com/Recorded Deminars: http://www.modelingandcontrol.com/deminar_series.htmlA new easy fast free method of access is now available that eliminates IT security issues and remote access response delays
  • 50.
    27FuzzyLogicWasteRCASRCASmiddle selectorROUTkickerAYAYACACsplittersplitterATATATAYAYAttenuationTankAYmiddle selectormiddleselectorfilterFTFTAYAYStage 2Stage 1ATATATATATATWasteMixerMixerFT Case History 1- Existing Control System
  • 51.
    28MPC-1MPC-2WasteRCASRCASmiddle selectorROUTAC-1AC-2kickerAYAYsplittersplitterATATATAYAYAttenuationTankAYmiddle selectormiddleselectorfilterFTFTAYAYStage 2Stage 1ATATATATATATWasteMixerMixerFT Case History 1 - New Control System
  • 52.
    2912pHOld Set PointNewSet Point2Reagent to Waste Flow Ratio New RatioOld RatioReagent Savings Case History 1 - Opportunities for Reagent Savings
  • 53.
    30Model Predictive Control(MPC)For Optimization of Actual PlantStage 1 and 2 Set PointsActual PlantOptimization(MPC1 and MPC2)Tank pH and 2nd Stage ValvesInferential Measurement(Waste Concentration)and DiagnosticsStage 1 and 2 pH Set PointsActualReagent/Waste Ratio(MPC SP)VirtualReagent/Influent Ratio(MPC CV)Virtual PlantAdaptation(MPC3)ModelInfluent Concentration(MPC MV)Model Predictive Control (MPC)For Adaptation of Virtual Plant Case History 1 - Online Adaptation and Optimization
  • 54.
    31 CaseHistory 1 - Online Model Adaptation ResultsActual Plant’sReagent/InfluentFlow RatioVirtual Plant’sReagent/InfluentFlow RatioAdapted Influent Concentration(Model Parameter)
  • 55.
    3293%Acid50%CausticWater AT Cation AnionTo EOFinal causticadjustmentFinal acidadjustmentPit Case History 2 - Existing Neutralization System
  • 56.
    33 CaseHistory 2 - Project ObjectivesSafeResponsibleReliableMechanicallyRobust controls, Operator friendlyAbility to have one tank out of serviceBalance initial capital against reagent costLittle or no equipment rework
  • 57.
    34 CaseHistory 2 - Cost Data93%H2SO4 spot market price $2.10/Gal50% NaOH spot market price $2.30/Gal
  • 58.
    35 CaseHistory 2 - ChallengesProcess gain changes by factor of 1000xFinal element rangeability needed is 1000:1Final element resolution requirement is 0.1%Concentrated reagents (50% caustic and 93% sulfuric)Caustic valve’s ¼ inch port may plug at < 10% positionMust mix 0.05 gal reagent in 5,000 gal < 2 minutesVolume between valve and injection must be < 0.05 gal 0.04 pH sensor error causes 20% flow feedforward errorExtreme sport - extreme nonlinearity, sensitivity, and rangeability of pH demands extraordinary requirements for mechanical, piping, and automation system design
  • 59.
    36 CaseHistory 2 - ChoicesReally big tank and thousands of miceeach with 0.001 gallon of acid or causticormodeling and control
  • 60.
    37 CaseHistory 2 - Tuning for Conventional pH Control
  • 61.
    38Gain 10x larger Case History 2 - Tuning for Reagent Demand Control
  • 62.
    39 EmbeddedProcess Model for pH
  • 63.
    40 TitrationCurve Matched to PlantpHSlope
  • 64.
    41signalcharacterizer AY 1-3pHset pointSignal characterizers linearize loop via reagent demand control AC 1-1NaOHAcid AY 1-2 LC 1-5 LT 1-5 FT 1-1 FT 1-2middlesignal selectorsignalcharacterizersplitter AY 1-4Feed AY 1-1To other Tank AT 1-2 AT 1-1 AT 1-3TankEductorsFrom other TankStatic MixerTo other TankDownstream system Modeled pH Control System
  • 65.
    42One of manyspikes of recirculation pH spikes from stick-slip of water valveInfluent pHTank 1 pH for Reagent Demand ControlTank 1 pH for Conventional pH ControlStart of Step 4(Slow Rinses)Start of Step 2(Regeneration)Conventional pH versus Reagent Demand Control
  • 66.
    43Traditional System forMinimum VariabilityThe 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. ReagentReagentReagentFeedSmall first tank provides a faster responseand oscillation that is more effectively filtered by the larger tanks downstreamBig footprintand high cost!
  • 67.
    44Traditional System forMinimum Reagent UseReagentThe period of oscillation (total loop dead time) must differ by morethan factor of 5 to prevent resonance (amplification of oscillations) FeedReagentReagentBig footprintand high cost!The large first tank offers more cross neutralization of influents
  • 68.
    45 FC 1-2AC 1-1 LC 1-3Tight pH Control with Minimum Capital InvestmentIL#1 – Interlock that prevents back fill ofreagent piping when control valve closesIL#2 – Interlock that shuts off effluent flow untilvessel pH is projected to be within control bandEductorHigh Recirculation FlowReagentAny Old TankSignalCharacterizer LT 1-3 f(x) FT 1-1*IL#2Effluent AT 1-1*IL#1 FT 1-2Influent10 to 20 pipediameters
  • 69.
    46Linear Reagent DemandControlSignal characterizer converts PV and SP from pH to % Reagent DemandPV is abscissa of the titration curve scaled 0 to 100% reagent demandPiecewise segment fit normally used to go from ordinate to abscissa of curveFieldbus 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 compensationIf 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 pHOperator can change mode to manual and change manual outputOperator sees both reagent demand % and PV trendsSet point on steep part of curve shows biggest improvements from: Reduction in limit cycle amplitude seen from pH nonlinearityDecrease in limit cycle frequency from final element resolution (e.g. stick-slip)Decrease in crossing of split range pointReduced reaction to measurement noiseShorter 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)
  • 70.
    47 FC 1-1AC 1-1 AC 1-2MCascade pH Control to Reduce Downstream OffsetLinear ReagentDemand ControllerFlow Feedforward FT 1-1RSPSumTrim of Inline Set PointReagent f(x) AT 1-1 Filter f(x) FT 1-2Static Mixer PV signalCharacterizer SP signalcharacterizerFeedCoriolis MassFlow Meter10 to 20pipediametersAny Old TankIntegralOnlyController AT 1-2
  • 71.
    48Full Throttle (Bang-Bang)Batch pH ControlBatch pH End PointPredicted pH CutoffSumReagentRate ofChangeDpH/DtProjected DpHPastDpHNew pH Sub Div MulOld pH DelayDtTotal System Dead TimeBatch Reactor Filter AT 1-110 to 20 pipediametersSection 3-5 in New Directions in Bioprocess Modeling and Controlshows how this strategy is used as a head start for a PID controller
  • 72.
    49 AC 1-1AC 1-1 FC 1-1 FQ 1-1Linear Reagent Demand Batch pH Control FT 1-1Secondary pHPI ControllerInfluent #1 AT 1-1Online Curve IdentificationStatic Mixer10 to 20 pipediameters FT 1-2Influent #2 f(x)Batch Reactor Signal CharacterizerUses OnlineTitration CurveMaster Reagent DemandAdaptive PID Controller AT 1-110 to 20 pipediametersReduces 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.
  • 73.
    50 FT 1-1SecondarypHPI Controller AC 1-1 AC 1-1 FC 1-1 FQ 1-1Influent AT 1-1Online Curve IdentificationStatic Mixer10 to 20 diameters FT 1-2 f(x)Neutralizer Signal CharacterizerUses OnlineTitration CurveMaster Reagent DemandAdaptive PID Controller AT 1-110 to 20 diameters Adapted Reagent Demand ControlReduces injection and mixing delays and enables somecross neutralization in continuous and batch operations
  • 74.
    51 Recently Developed Adaptive ControlAnticipates nonlinearity by recognizing old territoryModel and tuning settings are scheduled per operating regionRemembers what it has learned for preemptive correctionDemonstrates efficiency improvement during testingSteps can be in direction of optimum set pointExcess reagent use rate and total cost can be displayed onlineAchieves optimum set point more efficientlyRapid approach to set point in new operating regionRecovers from upsets more effectivelyFaster correction to prevent violationMore efficient recovery when driven towards constraint Returns to old set points with less oscillation Faster and smoother return with less overshoot
  • 75.
    52Multiple Model parameterInterpolationwith re-centeringEstimated Gain, time constant, and deadtimeChanging process inputFirst Order Plus Deadtime ProcessGain12Time Constant3Dead time First Order plus Dead Time Model IdentificationFor 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 deadtimeChanges in the process model can be used to diagnose changesin the influent and the reagent delivery and measurement systems
  • 76.
    53 Schedulingof Learned Dynamics and TuningModel and tuning is scheduled based on pH
  • 77.
    54total cost ofexcessreagentpHhourly cost of excess reagenttotal cost ofexcess reagentpHhourly cost of excess reagent Adaptive Control Efficiently Achieves Optimum
  • 78.
    55total costof excessreagentpHhourlycost of excesstotal cost of excessreagenthourly costof excesspH Adaptive Control Efficiently Rejects Loads
  • 79.
    56pHpH AdaptiveControl is Stable on Steep Slopes
  • 80.
    57 Smart Split Range PointG = 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.)
  • 81.
    58 AC 1-1 Smart Split Range PointReagentSmart in terms of valve gaincompensation but not smartin terms of valve sensitivity !Small(Fine)Large(Coarse)SplitterSplit RangeBlockFor large valve 4x small valve flow:PID Small LargeOutValveValve0% 0% 0%20% 100% 0%20% 100% 0%100% 100% 100%NeutralizerPID Controller AT 1-1
  • 82.
    59 AC 1-1aAC 1-1b PID Valve Sensitivity and Rangeability Solution 1 ReagentLarge(Coarse)Small(Fine)NeutralizerPID Controlleror PIDPlus withsensitivity limit AT 1-1Proportional only Controlleror PIDPlus withsensitivity limit
  • 83.
    60 AC 1-1ZC 1-1 PID Valve Sensitivity and Rangeability Solution 2 ReagentSmall(Fine)Large(Coarse)Integral only Controlleror PIDPlus withsensitivity limitNeutralizerPID Controlleror PIDPlus withsensitivity limit AT 1-1
  • 84.
    61MPC Valve Sensitivityand Rangeability SolutionModel 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 neededhttp://www.controlglobal.com/articles/2005/533.htmlhttp://www.modelingandcontrol.com/2009/03/application_notes.html
  • 85.
    62 MPCValve Sensitivity and Rangeability Solution
  • 86.
    63 MPCValve Sensitivity and Rangeability Solution
  • 87.
    64 MPCValve Sensitivity and Rangeability Solution
  • 88.
    65 MPCMaximization of Low Cost Reagent
  • 89.
    66 MPCMaximization of Low Cost Reagent
  • 90.
    67Riding Max SPonLo Cost MVRiding Min SPon Hi Cost MVCritical CVCritical CVLoadUpsetsLoadUpsetsLow Cost MV Maximum SP Increased Low Cost MV Maximum SP Decreased Set PointChangesSet PointChangesLo Cost Slow MVHi Cost Fast MV MPC Maximization of Low Cost Reagent
  • 91.
    68 MPCMaximization of Low Cost Reagent manipulated variablesdisturbance variable SupplementalReagent Flow SP Acid Feed Flow SPCheap Reagent Flow PVMPCcontrolled variableNeutralizer pH PVoptimization variableAcidic Feed Flow SPMaximizenullnullconstraint variableSupplemental Reagent Valve PositionNote that cheap reagent valve is wide open and feed is maximized to keep supplemental reagent valve at minimum throttle position for minimum stick-slip
  • 92.
    69Key Points Moreso than for any other loop, it is important to reduce dead time for pH control because it reduces the effect of the nonlinearityFilter the feedforward signal to remove noise and make sure the corrective action does not arrive too soon and cause inverse responseThe effectiveness of feedforward control greatly depends upon the ability to eliminate reagent delivery delaysIf there is a reproducible influent flow measurement use flow feedforward, otherwise use a head start to initialize the reagent flow for startupThe 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
  • 93.
    70Key Points Changesin the process dynamics identified online can be used to predict and analyze changes in the influent, reagent, valve, and sensorNew adaptive controllers will remember changes in the process model as a function of operating point and preemptively schedule controller tuningUse inline pH control, mass flow meters, linear control valves, and dynamic compensation to automatically identify the titration curve onlineUse gain scheduling or signal characterization based on the titration curve to free up an adaptive controller to find the changes in the curveBatch samples should be taken only after the all the reagent in the pipeline and dip tube has drained into the batch and been thoroughly mixedUse 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/startupUse online titration curve identification and linear reagent demand pH control for extremely variable and sharp or steep titration curveUse 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 metersUse linear reagent demand model predictive control for dead time dominant or interacting systems and constraint or valve position control
  • 94.
    71Section 3: PlantDesign and MaintenanceCommon Problems with Titration CurvesEffect of Measurement Selection and InstallationOptions to improve accuracy and maintenanceEffect of piping design, vessel type, and mixing patternImplications of oversized and split ranged valves Online Troubleshooting
  • 95.
    72Common Problems withTitration CurvesInsufficient number of data points were generated near the equivalence point Starting pH (influent pH) data were not plotted for all operating conditionsCurve doesn’t cover the whole operating range and control system overshootNo separate curve that zooms in to show the curvature in the control regionNo separate curve for each different split ranged reagentSequence of the different split ranged reagents was not analyzedBack mixing of different split ranged reagents was not consideredOvershoot and oscillation at the split ranged point was not includedSample or reagent solids dissolution time effect was not quantifiedSample or reagent gaseous dissolution time and escape was not quantifiedSample volume was not specified Sample time was not specifiedReagent 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 beakerSample 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
  • 96.
    73 MiddleSignal Selection AdvantagesInherently ignores single measurement failure of any type including the most insidious PV failure at set pointInherently ignores slowest electrodeReduces noise and spikes particularly for steep curvesOffers online diagnostics on electrode problemsSlow response indicates coated measurement electrode Decreased span (efficiency) indicates aged or dehydrated glass electrodeDrift or bias indicates coated, plugged, or contaminated reference electrode or high liquid junction potentialNoise indicates dehydrated measurement electrode, streaming potentials, velocity effects, ground potentials, or EMIFacilitates online calibration of a measurementFor more Information on Middle Signal Selection see Feb 5, 2010 posthttp://www.modelingandcontrol.com/2010/02/exceptional_opportunities_in_p_11.html
  • 97.
    743K0-5 MReference ElectrodeGlassElectrodeSolution Ground Online Diagnostics for Cracked GlassCracked Glass!Cracked Glass FaultpH Glass electrode normally has high impedance of 50-150 Meg-ohmGlass can be cracked at the tip or further back inside the sensorRecommended setting of 10 Megohm will detect even small cracksReference - Joseph, Dave, “What’s the Real pH of the Stream”, Emerson Exchange 2008
  • 98.
    7540k150 MCoated Sensor!GlassElectrodeSolution GroundReference Electrode Online Diagnostics for Coated SensorCoated Sensor Detection Canactivate sensor removal and cleaning cycleplace output on hold while sensor is cleanedReference - Joseph, Dave, “What’s the Real pH of the Stream”, Emerson Exchange 2008
  • 99.
    76 AMSpH Range and Compensation ConfigurationpH / ORP SelectionPreamplifier LocationType of Reference UsedRangingTemperature Comp ParametersSolution pH Temperature CorrectionIsopotential Point Changeable for Special pH Electrodes
  • 100.
    77 AMSpH Diagnostics ConfigurationGlass Electrode Impedance Warning and Fault LevelsImpedance Diagnostics On/OffReference Impedance Warning and Fault LevelsReference Zero OffsetCalibration Error LimitGlass Impedance Temp Comp(Prevents spurious errors due to Impedance decrease with Temperature)
  • 101.
    78 AMSpH Calibration SetupLive Measurements and StatusCalibration Constants from Last CalibrationsBuffer Calibration Type & Buffer Standard UsedSensor Stabilization CriteriaZero Offset Beyond this Limit will create a Calibration ErrorIf you want to know more about Buffer Calibration, hit this button…
  • 102.
    79 AMSpH Auxiliary Variables Dashboard
  • 103.
    80AEAEAEAEAEAE HorizontalPiping Arrangementsflushthrottle valve toadjust velocitypressure drop foreach branch mustbe equal to to keep the velocities equaldrain20 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 down20 pipe diameters 5 to 9 fps to minimize coatings0.1 to 1 fps to minimize abrasionstatic mixer or pumpthrottle valve toadjust velocityflush10 OD10 ODSeries arrangement preferred to minimize differences in solids, velocity, concentration, and temperature at each electrode!20 pipe diametersdrain
  • 104.
    81AEAEAEAEAEAE VerticalPiping Arrangementsthrottle valve toadjust velocitythrottle valve toadjust velocityOrientation of slot in shroudabrasioncoating0.1 to 1 fps5 to 9 fpsholeorslot10 OD10 ODSeries arrangement preferred to minimize differences in solids, velocity, concentration, and temperature at each electrode!
  • 105.
    82Options for MaximumAccuracy 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 diagnosticsUse middle signal selection of three pH measurementsInherent 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 electrodeUse “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 calibrationsInsure a constant process fluid velocity at the highest practical value to help keep the electrodes clean and responsive
  • 106.
    83 Wireless pHTransmitters Eliminate Ground SpikesIncredibly tight pH control via 0.001 pH wireless resolution setting still reduced the number of communications by 60%Temperature compensated wireless pH controlling at 6.9 pH set pointWired pH ground noise spike
  • 107.
  • 108.
    85++Elapsed Time++Elapsed Time 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)
  • 109.
    PID derivative modeis modified to compute a rate of change over the elapsed time from the last new measurement value
  • 110.
    PID reset andrate action are only computed when there is a new value
  • 111.
    If transmitter dampingis set to make noise amplitude less than sensitivity limit, valve packing and battery life is dramatically improved
  • 112.
    Enhancement compensates formeasurement sample time suppressing oscillations and enabling a smooth recovery from a loss in communications further extending packing -battery lifeTDKcTDKcLink to PIDPlus White Paperhttp://www2.emersonprocess.com/siteadmincenter/PM%20DeltaV%20Documents/Whitepapers/WP_DeltaV%20PID%20Enhancements%20for%20Wireless.pdf
  • 113.
    86 FlowResponse - Enhanced vs. Traditional PID Enhanced PID Sensor PVTraditional PID Sensor PV
  • 114.
    87 pHResponse - Enhanced vs. Traditional PID Enhanced PID Sensor PVTraditional PID Sensor PV
  • 115.
    88 FailureResponse - Enhanced vs. Traditional PID Enhanced PID Sensor PVTraditional PID Sensor PV
  • 116.
    89M EverydayMistakes in pH System DesignMistake 1: Missing, inaccurate, or erroneous titration curveMistake 2: Absence of a plan to handle failures, startups, or shutdownsreagentfeed tankMistake 7 (gravity flow)Mistake 3 (single stage for set point at 7 pH) Mistake 8 (valve too far away) AT 1-3Mistake 12 (electrode too far downstream) Mistake 10 (electrodesubmerged in vessel)Mistake 9 (ball valve with no positioner) AT 1-1Influent (1 pH)Mistake 4 (horizontal tank) Mistakes 5 and 6(backfilled dip tube &injection short circuit) AT 1-2Mistake 11 (electrode in pump suction)
  • 117.
    90Stagnant ZoneStagnant ZoneMReagentFeedPlugFlowShortCircuitingStagnant Zone AT 1-3 Mixing Pattern and Vessel Geometry Implications
  • 118.
    91 OversizedReagent Valves are a Big ProblemLimit 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)Dead band is 5% - 50%without a positioner !Dead bandPneumatic positionerrequires a negative % signal to close valveStroke (%)Digital positionerwill force valve shut at 0% signalStick-Slip is worse near closed position0Signal (%)dead bandThe 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
  • 119.
    92Key Points Thetime 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 layerMost accuracy statements and tests are for short term exposure before changes in the glass gel layer or reference junction potential are significantThe pH measurement error may look smaller on the flatter portion of a titration curve but the associated reagent delivery error is largerThe cost of pH measurement maintenance can be reduced by a factor of ten by more realistic expectations and calibration policiesThe onset of a coating of the glass measurement electrode shows up as a large increase in its time constant and response timeThe onset of a non conductive coating of the reference electrode shows up as a large increase in its electrical resistanceNon-aqueous and pure water streams require extra attention to shielding and process path length and velocity to minimize pH measurement noiseSlow references may be more stable for short term fluctuations from imperfect mixing and short exposure times from automated retractionThe fastest and most accurate reference has a flowing junction but it requires regulated pressurization to maintain a small positive electrolyte flowThe 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
  • 120.
    93Key Points Fornon 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 coatingsFor abrasive solids and viscous fluids, a thick flat glass electrode can minimize coatings, stagnant areas, and glass breakageFor high process temperatures, high ion concentrations, and severe fouling, consider automatic retractable assemblies to reduce process exposureWhen the fluid velocity is insufficient to sweep electrodes clean, use an integral jet washer or a cleaning cycle in a retractable assemblyThe control system should schedule automated maintenance based on the severity of the problem and production and process requirementspH measurements can fail anywhere on or off the pH scale but middle signal selection will inherently ride out a single electrode failure of any typeEquipment 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 conditionsThe more an electrode is manually handled, the more it will need to be removedA 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
  • 121.
    94Key Points Asystem 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 controlThe agitation in a vessel should be vertical axial pattern without rotation and be intense enough to break the surface but not cause frothThe 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 hugeTo 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