Experiment PC

Embed Size (px)

Citation preview

  • 8/12/2019 Experiment PC

    1/8

    Experiment PC: Process Control

    Introduction

    The aim of the experiment is to investigate the control of water level in a process vessel by means ofa float switch, differential level switch and a pressure sensor. The characteristics of differentalgorithms for controlling water level using a pressure sensor will be also investigated. These controlmethods include, proportional, proportional + integral, proportional + derivative, and proportional+integral +derivative (PID). Finally a design for a PID controller for effective control of the water levelin the vessel, with minimal offset, oscillation or overshoot will be made. Proportional-integral-derivative (PID) control is the most common generic control loop feedback mechanism used inindustrial control systems. In this investigation all parameters such as pump speed and valve cycletime are controlled directly from a computer using the range of algorithms (on/off, timeproportioned and PID). Sensor output are also displayed and recorded.

    Proportional-Integral-Derivative (PID) Control

    The purpose of the controller is to ensure that some Process Variable (PV) returns to a set point (SP)after a disturbance, by the adjustment of a Manipulated Variable (MV). In this investigation, PV willbe the water level and the MV is the ratio of time open to time shut over a control period (cycletime) for the solenoid valves. The main solenoid valve being controlled will be the one connected tothe inlet. The following features will be necessary to control in response to a disturbance.

    Offset : the difference between the steady state PV and the SPResponse time : How long the PV takes to reach steady stateOvers hoot : Whether the PV goes past the SPOscillation : Whether the PV achieves a non-oscillating steady state, whether it oscillates about a. about a mean value and whether the oscillations die away.

    An ideal response will be zero offset, a very short response time and no oscillation. In the pursuit toachieve this, three correcting terms are used, these are the namesake of the PID control scheme.The proportional, integral and derivative terms are summed to calculate the output u(t) of the (PID)controller. The formula for this is:

    => Proportional term=> Integral term=> Derivative term

    Kc => Proportional Band, a tuning parameterTi => Integral TimeTd =>Derivative Timee => Error (Set Point Process Variable)t => Time or instantaneous time (the present)

    The proportional term means that the output change is proportional to the current error magnitude.The Proportional Band is the Percentage change in input (i.e. error) necessary to give 100% changein output (MV). Therefore a high proportional band K c imples a low controller gain. The Integral termmeans that a change in output is proportional to both the magnitude of the error and its duration.The intergral term is controlled by the integral time T I . The derivative term T d contributes a changethat is proportional to the rate of change of the error and may be viewed as a prediction of future

  • 8/12/2019 Experiment PC

    2/8

    errors. K c, Ti , and T d are all constants which are individually adjusted by the controller, to achieve thedesired response. This is called process tuning.

    Apparatus

    To carry out the investigation a process control unit, shown in Figure 1, designed to demonstrate avariety of computer-based single control loop systems is used. The key

    Figure 1: figure showing process control unit

    Flow of water

    Water flows in to the vessel via the valve SOL1, which is either open or closed for a specified fractionof a Cycle time. The water flows out of the vessel via a permanently open valve SOL2. SOL3 is adrainage valve which can be opened when resetting the level to make the process quicker. When

    SOL1 and SOL2 are both open, the level in the vessel rises. The level switches simply send a signal(via the PC) to either open or close the valve, triggered as the water level passes the switch device.

    Mains

    Drain. s

    s

    s

  • 8/12/2019 Experiment PC

    3/8

    Hazard Analysis

    Personal protection equipment such as gloves, goggles and a lab coat should be worn at all points.Ensure that the water coming from the mains is open to ensure that the gear pump doesnt run dry.If the pump runs dry it could overheat and get destroyed. Wipe off any spillages as soon as they

    happen so that no one can slip and fall.Procedure

    Exp1: ON/OFF control using a floating switch

    1. On the lid of the process vessel, loosen the locking nut at the top of the level switch andadjust the height of the switch to approximately 200mm as indicated on the level scale.Tighten the locking nut.

    2. Select Level (Float) Switch in the On/Off Solenoid 1 box on the left of the screen. Thereshould be an audible click as the valve opens, and water should begin to flow into theprocess vessel. Open the SOL2 drain valve by clicking the SOL2 toggle button to 1.

    3. When the water level is at about 140 mm, begin data logging. The large process vessel fillswith water until the fluid level reaches the level switch. You will note the action of the levelswitch as the fluid level rises stays relatively constant. Continue data logging for a period ofthree minutes. Click the stop icon to finish data logging.

    4. Without restarting data logging, open the SOL3 drain valve. You will notice that the waterlevel will start dropping and the float switch wont be able to maintain the level.

    5. Select Controller in the On/Off Solenoid 1 box on the left of the screen. Click the Controlbutton to open the PID Controller window. Select Off in Mode of Operation then Apply.Close the PID controller window. Allow the tank to drain until the level is about 140mm,then close the SOL2 drain valve by clicking the SOL2 toggle button to 0.

    6.

    Save your results file as an Excel 5.0 spreadsheet. The data will be saved as Run 1 - makesure as you proceed that you keep a record of what each Run was.

    Exp2: ON/OFF control using a differential level switch

    1. Lower the differential switch electrodes so that the blue-topped rod is at 20mm and the red-topped rod is at 40mm.

    2. Start data logging and Select Differential Level in the On/Off Solenoid 1 box on the left ofthe screen. There should be an audible click as the valve opens, and water should begin toflow into the process vessel.

    3. While still data logging, move the upper (red) electrode and adjust the level to 25mm andcontinue to record data for three more minutes.

    4. Repeat steps 5 to 7 of Exp 1 to reset and save the file as run 2.

    Exp3: PID level control using a level sensor

    3a: Proportional only

    1. In the Automatic Operation panel, enter a Set Point of 200mm, a Cycle Time of 10 secs(these two will remain fixed throughout) and a Proportional Band of 10%. Leave the otherparameters at zero. Click Automatic in Mode of Operation, and then Apply. Open the SOL2drain valve by clicking the SOL2 toggle button to 1.

    2. Begin data logging. Continue logging for three minutes, observing behaviour on the real-timegraph. Finish data logging. Select Off in Mode of Operation, and then Apply. Allow the tankto drain until the level is about 140mm, then close the SOL2 drain valve by clicking the SOL2toggle button to 0.

  • 8/12/2019 Experiment PC

    4/8

    3. Repeat the first two steps for the following values of Proportional Band: 5%, 2% and 1%.4. Save the results.

    3b: Proportional + Intergral

    5. Repeat steps 1 and 2 using a Proportional Band of 2% and an Integral Time of 5 secs then 20secs and lastly 50 secs. Leave Derivative Time at zero. Observe the effect of the Integralelement.

    6. Save your results file again, remembering to keep a record of what each Run was.

    3c: Proportional + Derivative

    7. Repeat 3 to 5 using a Proportional Band of 2%, and a Derivative Time of 1 sec and 5 secs.Leave Integral Time at zero. Observe the effect of the Derivative element. Save your resultsfile again.

    3d: Proportional + Integral + Derivative

    8. Try to set the Proportional Band, Integral Time and Derivative Time simultaneously toachieve a control which has minimal offset and oscillation and as short as possible aresponse time.

    9. Record this reading then turn of the controller and drain the tank.

    ResultsGraphs can be found in the appendix.

    Discussion

    As shown in Figure 2 When using the float level switch the water level rapidly increases for oneminute then it stayed constant when it reached the set point. The float-level switch is a verticalprobe with a moving float on a short shaft which rises with water level until it closes the circuit. Themovement is very small therefore the oscillations will be very small. As shown in Figure 3 with thedifferential switch the water level rapidly increase for then it begins to oscillate between the twodifferent levels of the electrodes. When the electrodes where brought closer the oscillations weremuch smaller. The differential level switch is made up of a pair of electrodes and a fixed earth rod (ametal ruler). The switch works by measuring the conductance between the electrodes and the earthrod. The conductance though the air is different to that though water so the when both electrodesare touching the water the conductance level measured will be different. So however far apart theelectrodes are will be the oscillations measured.

    Figure 4 shows that the lower the proportional band, the faster the water level reaches a steadylevel. The water level does however have a lower offset the higher the proportional band, but moreoscillations are present. By looking at the equation in the introduction, it can be noted that theproportional level sensor measures the difference between the set point and water level, with thedifference being the error. Proportional gain is the constant used to adjust the error. Increasing theproportional gain increases the speed of the control system response to the error. However, whenthe proportional gain is too large, the water level will begin to oscillate. The oscillation can increaseover time depending on the value of the proportional gain.

    Figure 5 shows that when using proportional and integral control, the higher the integral time, thewater level has much less offset, but there is added overshoot at the start. The integral level sensor

  • 8/12/2019 Experiment PC

    5/8

    measures both the magnitude of the error and the duration of the error. The integral termaccelerates the value of the water level towards the set point and eliminates the residual steady-state error that occurs with a pure proportional controller. However, since the integral termresponds to accumulated errors from the past, it can cause the present value to overshoot the setpoint value.

    Figure 6 shows that the lower the derivative time the smaller the oscillations when steady state isreached. The derivative level sensor decreases output if the water level increases rapidly. It isproportional to the rate of change of the water level. A higher derivative time means a fastercontrol system response to changes in error.

    Tuning is the process of setting an optimum gain for proportional, integral and derivative. In order toachieve an optimum gain a trial and error method was used by using various settings to find anoptimum gain. The settings for integral and derivative were set to zero and the proportional bandwas decreased until the water level oscillates at the desired water level. Once the desiredproportional band is set, the integral term is increased to stop the oscillations. Once the proportional

    and integral terms are set the derivative term is increased until the water level doesnt overshootabove the set point. Figure 7 shows the attempt to make a perfect controller, which was found tohave a proportional band of 1%, an integral time of 50 seconds and derivative time of 1 second.

    Conclusion

    The results show that differential and floating level sensor are relatively good methods of controlbut they are both manual methods of control because you have to physically move the sensors, sothey may not be the best for some applications. This third experiment was done to obtain the bestway to control the water level in a pressure vessel using proportional band, integral time and

    derivative time. The results showed that the optimum setting to achieve the set point (withoutovershoot or oscillations) was a proportional band of 1%, integral time of 50 seconds and derivativetime of 1 second. At these settings the water level rapidly rose to the set point (200mm), with asmall overshoot and minimal oscillation at 200mm water level.

    References

    1. Experiment brief information in the introduction2. http://en.wikipedia.org/wiki/PID_controller - information in the discussion

    Nomenclature

    Millimetre mm Time seconds- s Proportional Band, a tuning parameter- K p Integral time- T i Derivative time - T d Error (set point Process variable)- e Time (or instantaneous time)- t

    http://en.wikipedia.org/wiki/Overshoot_(signal)http://en.wikipedia.org/wiki/PID_controllerhttp://en.wikipedia.org/wiki/PID_controllerhttp://en.wikipedia.org/wiki/PID_controllerhttp://en.wikipedia.org/wiki/Overshoot_(signal)
  • 8/12/2019 Experiment PC

    6/8

    130

    140

    150

    160

    170

    180

    190

    200

    00:00 00:43 01:26 02:10 02:53 03:36

    W a t e r L e v e

    l ( m m

    )

    Time (seconds)

    Process Control with Float Switch

    Float Switch

    173

    183

    193

    203

    213

    223

    233

    00:00 00:43 01:26 02:10 02:53 03:36 04:19 05:02 05:46

    W a t e r L e v e

    l ( m m

    )

    Time (seconds)

    Process Control with Differential Level Switch

    Differential Level

    Switch

    Appendices:

    The graphs below show water level versus time for the various stages.

    Figure 2: Graph showing the relationship between water level and Time for the float switch.

    Figure 3: Graph showing the relationship between water level and Time for the Differential levelswitch.

  • 8/12/2019 Experiment PC

    7/8

    120

    130

    140

    150

    160

    170

    180

    190

    200

    210

    00:00 00:43 01:26 02:10 02:53 03:36

    W a t e r L e v e

    l ( m m

    )

    Time (seconds)

    Process Control with Proportional Level Sensor

    Proportional 10%

    Proportional 5%

    Proportional 2%

    Proportional 1%

    140

    150

    160

    170

    180

    190

    200

    210

    220

    00:00 00:43 01:26 02:10 02:53 03:36

    W a t e r L e v e

    l ( m m

    )

    Time (seconds)

    Process Control with Proportional + Integral Level Sensor

    Integral 5s

    Integral 20s

    Integral 50s

    Figure 4: Graph showing the relationship between water level and Time for the Proportional levelsensor.

    Figure 5: Graph showing the relationship between water level and Time for the proportional +integral level sensor.

  • 8/12/2019 Experiment PC

    8/8

    140

    150

    160

    170

    180

    190

    200

    00:00 00:43 01:26 02:10 02:53 03:36

    W a t e r L e v e

    l ( m m

    )

    Time (seconds)

    Process Control with Proportional + Derivative Level Sensor

    Derivative 1s

    Derivative 5s

    150

    160

    170

    180

    190

    200

    210

    220

    00:00 00:43 01:26 02:10 02:53 03:36

    W a t e r L e v e

    l ( m m

    )

    Time (seconds)

    Process Control with optimum Proportional + Intergral + Derivative Level

    Sensor

    Prop 1%, Inter 50s, Der 1s(Optimum)

    Prop 2%, Inter 50s, Der 1s

    Figure 6: Graph showing the relationship between water level and Time for the proportional +derivative level sensor.

    Figure 7: Graph showing the relationship between water level and Time for the proportional +integral + derivative level sensor.