Level and Flow

From Chemical Engineering @ UP wiki
Revision as of 18:46, 12 December 2016 by Michael Stephens (Talk | contribs) (Updated Wiki to include work done on Level and Flow rig during recommission for CML 2016)

Jump to: navigation, search
The level and flow control rig

Introduction

This rig is an interactive level and flow system consisting of two manipulated variables and two controlled variables (2x2 MIMO system) that can be used to investigate a number of alternative APC configurations. This rig is very robust and easy to operate but does require some maintenance on occasion to ensure that all pipe connections and seals are in a good condition.

Previous Projects

This section describes some of the previous projects that was done on the level and flow rig to give you an idea of what has been done and where you can find the results obtained. Most important data contained in this section is information about what models were used/developed (if you want to reuse models) and what control strategies were employed (if you want to compare your results to something specific).

Michael Stephens, 2016

Wire instrumentation The level transmitter, flow transmitter and the control valve receivers were connected, via the Junction Box, to the SNAP modules on the OPTO brain SNAP rack. The wiring is connected to the field instruments using the field rail and connected from the Junction Box to the OPTO brain using the Trunking on the roof of the lab. The Opto Brain was connected to the LAN and tests were done to ensure the two Opto brains are connected to the Network.

Calibrate Instrumentation The level transmitter is calibrated using the optoEIEIO software by relating the position of the level to a mA current signal. The flow transmitter was calibrated by using the current signal, in mA, using the optoEIEIO software and the digital readout which displays the flow rate in $gpm$. The accuracy of the digital read ou on the flow meter was tested using the level meter and was found to be accurate. The control valves were calibrated by using the adjust screw on both control valves to adjust the position of the stem so that when a 20mA signal is sent to the control valves the orange valve (reverse acting) corresponds to fully open and the green valve (direct acting) corresponds to fully closed.

'Step testing Step tests were conducted on the system by moving the position of the valves. Each step test was completed by moving one of the valves, keeping the other constant, and recording the time response to level and flow using Matlab. It was found that the level takes approximately 100 times longer to respond than the flow response with the level also having much larger time delays. The step tests confirmed the presence of non-linearities in the system.

Maintenance The following maintenance was completed on the system:

  • Mounted the Junction Box to the wall
  • Built stand for delay unit
  • Repaired flow meter
  • Repaired the gas lines to the control valves
  • Replaced wires on all transmitters and receivers

Jean-Pierre Cronje, 2015

Modeling: A first principle approach was used to model the level and flow rig.
A system of ordinary differential equations was derived and solved using numerical integration (Euler explicit method). The system's stiff nature necessitated very small integration intervals to ensure numerical stability. The fitting friction factors were adjusted heuristically to ensure that the model matches actual changes in output variables when the input variables are perturbed. These were the only parameters used to "tune" the model.

Control Strategy: Inspecting the open loop step response of the system to determine degree of interaction between the input-output variable pairs, showed that there is some interaction between the orange valve (pneumatic valve in line with the flow measurement) and flow, and significant interaction between the green valve and level. Despite the interactive nature of this system, conventional PI control (velocity form) was used successfully.

OPC Interface: With the continued drive to migrate to open source software, it was deemed beneficial to make use of the following setup to establish communication between the the OPTO22 Ethernet B3000 Brain and the controller (PC).

  • KEPServerEX V5 with OPTO Driver (Trial) was used as OPC Server to receive OPC communication requests from OPC Clients. The trial limitation restricts communication to a 2 hour time limit, requiring services to be restarted before communication can resume. This limitation was not restrictive, as most of the runs were completed within a 2 hour time frame. KEPServerEX V5 is only available for Windows operating systems, but performs well on a virtual machine (only VirtualBox was tested). Tags were created on the OPC Server corresponding to the points on the specific SNAP module. EU[X] is the address for the engineering value of point [X]. The point numbers can be retrieved from the OPTO Web interface accessed from 137.215.116.239 (OPTO B3000 Ethernet brain's static IP).
  • OpenOPC 1.2.0 for Python was used as the OPC Client and the convenient Python interface enabled an easy interface between the Python based controller, historian and trending. It should be noted that OpenOPC is platform independent (works on Windows, Linux and MacOSX), but requires that a OpenOPC Gateway Service is running on a Windows machine elsewhere on the network (or virtual machine) to act as a proxy for all OPC calls. OpenOPC requires Pyro 3.15 to be part of your Python environment.

Maintenance:

  • 04FV001 was replaced due to an irreparable spindle leak.
  • Various compression fittings were replaced due to broken gripper rings.
  • O-rings were replaced on compression fittings where they were absent.

Norbertin Nkoghe Eyeghe, 2012

Rig Modifications: The various modifications and updates that were done on the Level & Flow rig were as follows:

  • The pressure regulator device, supplying pressure to the rig was changed as the previous one was not working.
  • Level indicator measuring scale(with paper tape) were put up on the level measuring tank. The level scale varies from bottom (0) to top (22).
  • The flow meter was opened and the inside wire connections were solded, as it was not working in the early stage of the project.
  • The Flow meter was stuck with super glue so as to keep it still during operation and avoid noise in the process level measurement.
  • A T-junction fitting was added on the pipe connected to the orange valve so that it could service any other rig if need for that be. The slug flow rig used it as it experienced some issues with its own valve.

Control Strategy: The control strategy investigated was that of a linear MPC controller implementation on the rig. The intended objective for this project was to investigate the impact that the rig charateristics of deadtime, interaction and occurence of unmeasured disturbance could have on the rig. That objective had not quite successfully achieved as the controller tuning used seemed not to be adequate for proper closed loop simulation of the rig to be observed.

Matlab interface: The matlab interface was updated from those of previous projects. It was created so as to switch from openloop operation to closed loop operation by merely changing the positions of the switches on the Simulink model. It was named: LevelFlow_MPC_2012_final. All communication with the OPTO22 ENET B3000 brain (OPTO1)were working well at the time of the project.

  • Alternatively, the rig intrumentation can be connected to the OPC server in the aim testing the brain activity by entering the following:
  • IPAddress:ItemType.Pointnumber.
  • As an example: connecting all intrumentation wired to the SNAP module on position 0 on the rack1 of OPTO1, one could type. 137.215.116.239:state.0 and observe if the ETD indication of the brain is blinking to say there communication with the brain. The connection to the control valves wired to the SNAP on position1 would be: 137.215.116.239:EU.1 . State is used for digital point and EU for analog point. Refer to the brain user guide/manual on the OPTO link on the ragnarok wikipage for more info.

Controller implementation:The designed controller was, in the end, implemented to the system derived continuous model and simulations were simply run from within MATLAB.

Identification of rig model: The rig model was derived from the MATLAB System Identification Toolbox. The rig step test data were used to fit a model that was then converted to a continuous transfer function.

Shown Breytenbach, 2011

Control Strategy: Implement a theoretical controller. The time based controller uses the maximum amount of tank capacity to ensure that the least amount of changes are made to the flow.

Matlab interface: A new matlab interface was created as the old one did not work on the new version of matlab. This included the following files:

  • FlowLevel.m - OPTO22 interface file.
  • waitforreal.m - real time clock for simulink.
  • Rig_live.mdl - simulink interface that receives inputs between 0 -100% and gives output in 0-100% for the level and gpm or L/min for the flow.

Controller implementation: The controller was implemented successfully and all communications worked correctly. The controller performed as expected during the test.

Other notes: The system showed high interaction between the two contol loops. System parameters:

  • Max flow (both valves): 8.4L/min.
  • Max flow (one valve): 7.3L/min.
  • Tank capacity: 10.9L
  • Dimensions: 24cm(diameter) x 24cm

Lizette Verster, 2010

Control Strategy: Dynamic Matrix Control using Aspen DMCplus software. The control objective was to maintain the level and flow rate between specified lower and upper limits while gradually driving the level to a set point.

Model Identification: Manual step testing (open loop). Identified models with Aspen DMCplus Model. The model chosen was a finite impulse response (FIR) model with the time to steady state at 10 minutes.

Models: Convolution models in the time domain. Medium Quality - models relating level to control valve position was very good but not so for the models relating flow rate to control valve position.

Francois Pieterse, 2009

Control Strategy: Model Predictive Control making use of ranged control algorithm to minimise MV move effort and optimiser to determine economic operating point.

Model Identification: Manual step testing. Identified models with Honeywell Profit Design Studio.

Models: Linear. Transfer function Matrix. Low Quality.

Rig Problems

As with any design, there are a couple of fundamental problems with the design of the level and flow rig. This section is used to document these problems that, should the need to ever rebuild the rig arise, the persons responsible can have a complete list of all the pitfalls of the previous design so that they can attempt to correct them.

- There was no way to drain the system. A valve to drain the system was included to allow one to remove/replace equipment without causing a spill.

- The level probe was not fixed to the tank 04TK001 that resulted in significant noise in the measurements since the probe was free to move and the discharging flow into the tank resulted in significant turbulence around the level probe. To remedy this positioners were mounted to ensure the level probe remains in position. A false bottom was also installed in the tank to minimise saturation of the level measurements.

- The pumps are different. Technically you shouldn't put different sized pumps in parallel although the pumps may have similar charachteristics even though they have different physical sizes.

- The pumps cannot be blocked in or isolated individually. At the time this comment was added the small pump was broken and alot of the head delivered by the big pump was dicipated by recirulating flow through the small pump. The ideal solution is using check valves although this may be unecesarily expensive. Hand valves to block out a pump in the event of failure should be included.

- Upon re-commissioning of the rig after an extended shutdown period it is required to prime the system to achieve flow through the dead time element and into 04TK001. This can be achieved by closing gate valve 04FV001 and filling 04TK003 half with water, stopping the pumps and opening both the control valves fully, 04CV001 and 04CV002. Thereafter the system can be filled with water from the feed pipe into the dead time element. Ensure all other gate valves are in the appropriate position to purge all the air from the system. Upon completion open 04FV001 and start the pumps with a full system.