1 / 45

PVSC Improves PLC Programming Using Real-Time Dynamic Simulation

PVSC Improves PLC Programming Using Real-Time Dynamic Simulation. Paul Cavanagh, P.E. Passaic Valley Sewerage Commissioners ISA WWAC Symposium August 2009. Background. Passaic Valley Sewerage Commissioners. Owns and Operates a 330 mgd wastewater treatment plant in Newark, NJ

terry
Download Presentation

PVSC Improves PLC Programming Using Real-Time Dynamic Simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PVSC Improves PLC Programming UsingReal-Time Dynamic Simulation Paul Cavanagh, P.E. Passaic Valley Sewerage Commissioners ISA WWAC Symposium August 2009

  2. Background

  3. Passaic Valley Sewerage Commissioners • 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

  4. PVSC’s Control System Requirements • Balance plant flow between select units • Maintain a Constant Upstream Channel Level • Respond quickly to flow disturbances and rain events

  5. Mixed Liquor Channel Level • Maintain a constant stable level for scum collector • Quickly correct for disturbances and prevent overflows

  6. Secondary Clarifier Settling Tanks • Evenly Split the flow between the 12 units • Ability to turn off control to select units • Minimize the movements of the Flow Control Valves

  7. The Problem

  8. Existing PLC Flow Balance and Level Control was not meeting its Requirements • 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

  9. The Channel Level ControlResponds Slowly and is Unstable Worse During High Flows

  10. Many Flow Control Valves WereConstantly Hunting Back and Forth

  11. 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

  12. But Modifying the Control Program on the 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

  13. So PVSC chooses to try… Real-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

  14. Developing the Dynamic Modelof the Channel and Valves

  15. How Do You Build 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

  16. Fluid 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

  17. Fluid 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

  18. Fluid 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.

  19. Transfer Functions • Laplace Transform Transfer Function • 1st Order • 2nd Order • nth Order • Captures the input/output dynamics in one block

  20. Using 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.

  21. Modeling the Mixed Liquor Channel • 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

  22. PVSC’s Channel Level Model in VisSim

  23. Modeling a Flow Control Valve 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

  24. Step 1 - Valve Position Calculation

  25. Step 2 - Steady State Flow Calculation

  26. Valve Flow Increases With Channel Level

  27. Step 3 - Lag Response Calculation

  28. PVSC’s Complete Flow Control Valve Model

  29. The Complete Plant Model

  30. The OPC Interface

  31. Human Machine Interface to the Model

  32. Improvements Made From Testing PLC Program with the Dynamic Simulator

  33. Changes in Channel Level Control Program Old Program New 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) • Moving Average Filter of Channel Level • Channel Level Control Bias Multiplied Flow Set Point • Proportional – Integral Control for of channel level

  34. Changes to Flow Balance Control Program Old Program New 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 • 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

  35. Comparison of Channel Level Program Response Total Flow Changed from 360 to 600 mgd

  36. Comparison of Flow Balance Level Response Total Flow Changed from 360 to 600 mgd

  37. Comparison of Valve Position Manipulation Total Flow Changed from 360 to 600 mgd

  38. The Simulation Shows thatthe 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

  39. Running New PLC Program On the Real System

  40. New PLC Program Worked Immediately!

  41. Conclusions about Using 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

  42. Special Thanks to: • The Commissioners • Bryan Christiansen • Sheldon Lipke • Phil Habrukowich • Tom Wasilewski • Jerry Oselador • Loukas Koufodontes

  43. Resources • Books • 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 Sites • http://www.vissim.com/ • http://blog.prosig.com/

  44. Demonstration

  45. The End Paul Cavanagh, PE pcavanagh@pvsc.com http://www.pvsc.com/

More Related