PVSC Improves PLC Programming Using Real-Time Dynamic Simulation Paul Cavanagh, P.E. Passaic Valley...
-
Upload
corey-jordan -
Category
Documents
-
view
213 -
download
0
Transcript of PVSC Improves PLC Programming Using Real-Time Dynamic Simulation Paul Cavanagh, P.E. Passaic Valley...
PVSC Improves PVSC Improves PLC Programming UsingPLC Programming Using
Real-Time Dynamic Real-Time Dynamic SimulationSimulation
Paul Cavanagh, P.E.Passaic Valley Sewerage Commissioners
ISA WWAC SymposiumAugust 2009
BackgroundBackground
Passaic Valley Sewerage Passaic Valley Sewerage CommissionersCommissioners
• Owns and Operates a 330 mgd wastewater treatment plant in Newark, NJ
– remove 93% of BOD
– remove 94% of TSS
– peak dry weather flows of 400 mgd
– peak wet weather flows of 550 mgd
• Treats about 25% of NJ’s Wastewater
– 15% industrial by volume
– 50% industrial by strength
PVSC’s Control System PVSC’s Control System RequirementsRequirements
• Balance plant flow between select units
• Maintain a Constant Upstream Channel Level
• Respond quickly to flow disturbances and rain events
Mixed Liquor Channel LevelMixed Liquor Channel Level
• Maintain a constant stable level for scum collector
• Quickly correct for disturbances and prevent overflows
Secondary Clarifier Settling Secondary Clarifier Settling TanksTanks
• Evenly Split the flow between the 12 units
• Ability to turn off control to select units
• Minimize the movements of the Flow Control Valves
The ProblemThe Problem
Existing PLC Flow Balance and Level Existing PLC Flow Balance and Level Control was not meeting its Control was not meeting its
RequirementsRequirements• The controls were slow to correct
for a disturbance such as a rain event
• Stability problems that got worse during peak plant flows
• Control to individual units could not be shut off
• Many Flow Control Valves were constantly opening and closing 1% to 3% every minute
• Tuning attempts only had a minimal effect
The Channel Level ControlThe Channel Level ControlResponds Slowly and is UnstableResponds Slowly and is Unstable
WorseDuring
High Flows
Many Flow Control Valves WereMany Flow Control Valves WereConstantly Hunting Back and ForthConstantly Hunting Back and Forth
As a Result of the Problems …As a Result of the Problems …
• … the System was kept in manual most of the time– Distribution of solids was uneven making
blanket levels more difficult to control– The Scum Collector weir level would need to
be frequently adjusted– The risk of overflow into an empty tank was
always present
But Modifying the Control Program on But Modifying the Control Program on the Running System is Problematicthe Running System is Problematic
• Need to wait for a rain event to test the changes– Uncertainty would remain as not all rain
events are exactly alike
• The new program could fail when no one is looking– A units settling could be disturbed and solids
would be discharged– The channel could overflow
So PVSC chooses to try…So PVSC chooses to try…
Real-Time Dynamic SimulationReal-Time Dynamic Simulation
• Build a model of that captures most of the real-time dynamic interaction between the channel level and the flow control valves and test the PLC program on the model
• Make changes to the PLC Program and after proving the program against simulated disturbances install the changes in the field
Developing the Dynamic Developing the Dynamic ModelModel
of the Channel and Valvesof the Channel and Valves
How Do You Build How Do You Build a Dynamic Simulator?a Dynamic Simulator?
Identify the Dynamic Components Blocks• Resistors
– Valves, Orifice, Restrictions– Line Equation
• Capacitors (Integrators)– Tanks, Reservoirs, Valve Actuators– Integrates the flow
• Inductors (Differentiator)– Pipes, Conduits, – Differentiates the flow
• Transfer Function– A convenient way of representing a dynamic system
Fluid ResistorsFluid Resistors• A Fluid Resistors are like
Electrical Resistors except …– For Electrical Resistors the
Electric Current changes linearly with Electric Voltage (Ohm’s Law)
– For Fluid Resistors the Fluid Current typically changes non-linearly with Fluid Pressure (Bernoulli’s Equation)
• Flow Control Valves behave like variable fluid resistors
• Use a straight line equation for an ideal flow control valve
Fluid CapacitorsFluid Capacitors• A Fluid Capacitor is like
and an Electrical Capacitor except …– An Electrical Capacitor
stores electric energy– A Fluid Capacitor stores
fluid mass
• An open tank or reservoir is a fluid capacitor
• Integration of the flow entering/exiting the capacitor + an initial valve produces a pressure or head
Fluid InductorsFluid Inductors
• A Fluid Inductor is like an Electrical Inductor except …– An electric current through
an electric inductor is sustained by its magnetic field.
– A fluid current through a fluid inductor is sustained by the inertia of the mass of fluid in motion.
• Long pipes or conduits are examples of fluid inductors.
• Differentiate the change in flow through the inductor to find the change in pressure across the inductor.
Transfer FunctionsTransfer Functions
• Laplace Transform Transfer Function– 1st Order– 2nd Order– nth Order
• Captures the input/output dynamics in one block
Using VisSim/OPCUsing VisSim/OPC
• PVSC staff used VisSim software to build and run its dynamic simulations.
• VisSim is a computer software application that provides a visual block diagram language for modeling and simulation of complex nonlinear dynamic systems. Its fast execution lets you run models in real-time.
• The OPC (OLE for Process Control) is an add-on to VisSim. The VisSim model use OPC to read and write data on the PLC.
• With VisSim/OPC you can run a virtual plant for testing and developing the PLC code.
Modeling the Mixed Liquor Modeling the Mixed Liquor ChannelChannel
• Modeled it like a fluid capacitor – it integrates the difference between the flow in and flow out of the channel into the gallons in the channel.
• The surface area of the channel is used to convert the volume of gallons in the channel into an elevation level.
• Limit the Integration for the real world boundaries
• The Elevation of the Upstream Weirs (104 feet)
• The Elevation of the Downstream Weirs (99 feet)
• Use the channel level to supply the pressure across the valves
• 0 to 5 feet of water
PVSC’s Channel Level Model in PVSC’s Channel Level Model in VisSimVisSim
Modeling a Flow Control Modeling a Flow Control ValveValve
3 Steps Were Used• Determined the dynamic valve
position by integrating the open and close signals and adding the result to the initial position
• Treated the valve like a variable fluid resistor that is effected linearly by the position and by the square root of the level
– Used straight line equation for steady state flows response to position
– Biased that equation by the square-root of the head pressure across the valve (creates the observed non-linear effect)
• Used a transfer function to capture the lag response
Step 1 - Valve Position Step 1 - Valve Position CalculationCalculation
Step 2 - Steady State Flow Step 2 - Steady State Flow CalculationCalculation
Valve Flow Increases With Valve Flow Increases With Channel LevelChannel Level
Step 3 - Lag Response Step 3 - Lag Response CalculationCalculation
PVSC’s Complete Flow Control Valve PVSC’s Complete Flow Control Valve ModelModel
The Complete Plant ModelThe Complete Plant Model
The OPC InterfaceThe OPC Interface
Human Machine Interface to the Human Machine Interface to the ModelModel
Improvements Made From Testing Improvements Made From Testing PLC Program with the Dynamic PLC Program with the Dynamic
SimulatorSimulator
Changes in Channel Level Changes in Channel Level Control ProgramControl Program
Old ProgramOld Program• Moving Average Filter of
Channel Level• Channel Level Control
Bias Multiplied Flow Set Point
• Proportional – Integral Control for of channel level
New ProgramNew Program• Exponential Average
Filter of Channel Level• Channel Level Control
Bias Added to Flow Set Point
• Proportional Only Control of channel level (system is self integrating)
Changes to Flow Balance Changes to Flow Balance Control ProgramControl Program
Old ProgramOld Program• PID block calculates
Position• Manipulates valve to a
calculated position• Large 2% position deadband• Proportional-Integral Control
of each Tank’s Flow• All operating tanks needed to
operate• Cannot Balance without level
meter
New ProgramNew Program• PID block calculates
Change of Position• Manipulates valve for a
calculated time• Small 1 second deadband • Proportional Only Control of
each Tanks’ Flow• Any combination of tanks
can be put in manual• Can Balance without level
meter
Comparison of Channel Level Program Comparison of Channel Level Program ResponseResponse
Total Flow Changed from 360 to 600 mgd
Comparison of Flow Balance Level Comparison of Flow Balance Level ResponseResponse
Total Flow Changed from 360 to 600 mgd
Comparison of Valve Position Comparison of Valve Position ManipulationManipulation
Total Flow Changed from 360 to 600 mgd
The Simulation Shows thatThe Simulation Shows thatthe New Program Provides:the New Program Provides:
• Much Faster and Very Stable Level Control – prevents overflows of upstream weirs– helps the operation of the channels scum collector
• Much Faster and Very Precise Flow Splitting– produces more even solids distribution
• A Significant Reduction in Valve Movements – saves on valve maintenance and repair
Running New PLC Program Running New PLC Program
On the Real SystemOn the Real System
New PLC Program Worked New PLC Program Worked Immediately!Immediately!
Conclusions about Conclusions about Using Dynamic SimulationUsing Dynamic Simulation
• Dramatically improves PLC programming
• Can be faster in the long run than waiting for real disturbances
• Much Safer than Testing code on the actual system
• Provides new insight into the mechanics of the process which can lead to further improvements
Special Thanks to:Special Thanks to:
• The Commissioners• Bryan Christiansen• Sheldon Lipke• Phil Habrukowich• Tom Wasilewski• Jerry Oselador• Loukas Koufodontes
ResourcesResources
• BooksBooks– Modeling Engineering Systems by Jack W. Lewis– Instrument Engineers' Handbook: Process control and
optimization by Béla G. Lipták– Engineer In Training Reference Manual by Michael R.
Lindberg, PE
• Web SitesWeb Sites– http://www.vissim.com/– http://blog.prosig.com/
DemonstrationDemonstration