lab procedure - edge.rit.eduedge.rit.edu/edge/p13630/public/finaldocuments/lab procedure.d… ·...

28
Lab Procedure Overview The lab is designed to take place over three consecutive lab sessions, each being three hours long. Instructions regarding how to setup and use the cart are detailed in the Operating and Instructions and Tutorial handbook listed at the end of the lab. Test Plan Disturbances 1. Head pressure from switching tanks 2. Control Valve 3. Needle Valve 4. Pipe length with pressure drop Control 1. P (simulated noise) 2. PI (simulated noise) 3. PID (simulated noise) 4. Human vs. Computer 5. Level Controller on Tank 6. Different type of Pump Lab Design Lab 1 (~3 hours) The first session is designed to be a basic introduction to the system, LabVIEW, PID control, and noise. The objective of this session is to demonstrate the power of control systems and their advantage over manual control. Students will attempt to control a scenario manually while collecting data. They will repeat this process with P, PI, and PID control. Next, students will compare their manual control data to P, PI, and PID control. The students will repeat this process with disturbances in the system. The disturbances will be from one of four sources, or a combination

Upload: others

Post on 02-Sep-2019

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Lab Procedure

OverviewThe lab is designed to take place over three consecutive lab sessions, each being three

hours long. Instructions regarding how to setup and use the cart are detailed in the Operating and Instructions and Tutorial handbook listed at the end of the lab.

Test Plan Disturbances1. Head pressure from switching tanks 2. Control Valve 3. Needle Valve 4. Pipe length with pressure drop

Control1. P (simulated noise) 2. PI (simulated noise) 3. PID (simulated noise) 4. Human vs. Computer 5. Level Controller on Tank 6. Different type of Pump

Lab Design

Lab 1 (~3 hours)

The first session is designed to be a basic introduction to the system, LabVIEW, PID control, and noise. The objective of this session is to demonstrate the power of control systems and their advantage over manual control. Students will attempt to control a scenario manually while collecting data. They will repeat this process with P, PI, and PID control. Next, students will compare their manual control data to P, PI, and PID control. The students will repeat this process with disturbances in the system. The disturbances will be from one of four sources, or a combination of these sources. The disturbance sources are: head pressure from switching tanks, pipe length with a pressure drop, control valve, or needle valve.

Scope: Introduce LabVIEW, PID control, and noise basics to students. Objective: Prove the necessity of control systems and their advantage over manual control. Deliverables: Manual Data vs. P, PI & PID Data

Introduction to system and LabVIEW controls Human vs. Computer control (P, PI & PID) Human vs. Computer control (P, PI & PID with noise) Average data and compare

Page 2: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Lab 2 (~3 hours)

The second session is designed to provide a deep understanding of PID control, and each of its individual elements. The objective of this session is for the complete PID equation to be understood, along with how to manipulate its components to achieve desired effects. An analytical analysis of the PID equation will ultimately lead to the introduction of the proportional constant, integration constant, and derivative constant. Students will take data and note differences between P, PI, and PID control for a given scenario. This process will be repeated with noise. Students will then be presented with an open-ended portion near the end of the lab. They will be tasked to vary levels of noise in order to find the limit of the control system. Next, they will vary the PID constants to learn of their practical effects on the system and their own limitations.

Scope: Provide a deep understanding of PID control and each of its individual elements. Objective: The complete PID equation is understood, as well as the role each piece plays in a control system. The understanding of how to manipulate PID control and the effect of noise. Deliverables: Data of a control scenario with P, PI & PID control with an explanation of differences. Repeat except with noise. Data illustrating the limits of the system with noise. Data showing the improvement of a control scenario by manipulating PID constants.

In depth explanation of PID control Differences in P, PI & PID control with actual flow Differences in P, PI & PID control with actual flow and noise Vary levels of noise and see impact on control Vary Kp, Ki & Kd terms and see impact on control

Page 3: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Lab 3 (~3 hours)

The third and final session is designed to focus on noise management and to provide a final test for the students. The objective is to provide insight in real-world methods of managing noise. Methods of eliminating noise will be discussed, along with their purpose. Students will run a scenario in which they average data to reduce noise and improve their signal to noise ratio. Their final task is to do one of two things. Students will either develop another method to eliminate noise and demonstrate its effectiveness; or they will be given a complex scenario that must be controlled with no outside guidance. Time permitting; the students will present their findings to the rest of the class.

Scope: Provide knowledge of noise management. A final scenario to challenge and test students’ prowess of PID control. Objective: Provide insight in real-world methods of managing noise. Verify that the students have mastered a basic understanding of PID control. Deliverables: A new method for eliminating noise, or parameters used to properly control the scenario.

Methods of eliminating noise Averaging data (filter noise) Have students develop other methods to eliminate noise Have students create a PID control for a given scenario (flow rate/noise/pressure drop) Share with class what was done/learned on this cart

Page 4: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

P13630 - Metered Flow Loop Cart Operating Instructions and Tutorial

Revision 1.0 December 10, 2013

Page 5: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Acknowledgements

The P13630 group would like to acknowledge Kodak, Paul Gregorius, Christiaan Richter, and Steve Possanza for their endless supply of patience, components, time,

space, and most importantly, knowledge.

Page 6: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Basic Set up For Operation

1. Before powering on the system first ensure there is water and air supplied to the cart. To add water simply fill the two reservoirs on the cart to half capacity using standard tap water. Tank 1 is on the top level in the front of the cart to the right. Tank 2 is on the bottom level in the front of the cart to the left.

2. Ne

xt hoop up the red air hose from the left side of the pressure regulator to an air hook-up in the lab. To connect the tube to the air hook-up simply push the tube into the open hole. Turn on the air by rotating the handle so that it is perpendicular to the floor. Turn off the air by returning it to its original position parallel to the floor.

Figure 1 Reservoir Tank Locations

Tank 1

Tank 2

Page 7: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

3. For full operation of the control valve at least 20 PSI must be present in the system. Verify there is enough

pressure by checking the gauge on the bottom of the pressure regulator. To change the pressure adjust the valve on the top of the regulator.

Figure 2 Pressure Regulator

Figure 3 Air Hook-up

Page 8: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Initial Power Up

1. Begin by ensuring both the electrical box and blue flow transmitter and plugged into the wall.

a. The electrical box has a black power cable on the lower right side (when facing the door of the box) of the box.

Figure 4 Pressure Gauge

Page 9: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

b. The blue flow transmitter has a light gray power cable that connects underneath the transmitter.

Figure 6 Flow Transmitter Power

2. Power on the cart by flipping the switch on the lower right side of the electrical box. Up corresponds to on and down corresponds to off as indicated on the switch itself.

3. Ensure that power has been applied to the circuit. Do so by opening the door to the drive box. The door is held shut by two metallic latches on the top and bottom right of the box. Disengage the latches by pulling them towards you and moving them to the right.

Figure 7 Power Switch

Page 10: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

4. If everything has been powered on correctly there will be green lights on the 5V and 24V power supply and the drive screen will be illuminated with numbers. Clear the drive by pressing the ESC button three times until the Drive reads “0.0” on the display.

5.

Connecting the system to Labview

1. Open the file “Metered_Flow_Labview_FINAL.” There will be two screens. Minimize the block diagram then go to the front panel. The screen should appear as it does in Figure 11 below.

24V5V

Drive

Figure 9 Electrical Power Lighting

Figure 10 Initialized Drive

Page 11: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

2. Next open the file “Metered_Flow_Close_Port” and go to its front panel. This file can be used to open and close the ports for serial communication with the control system. This is a way to reset the system completely and get to a steady state when running multiple tests.

3. Next, locate the USB cables that come out of the bottom right side of the electrical box. There are two cables used for this cart. The cable with the zip tie around it is used for the pressure control components. The cable with no zip tie is used for the pump speed control. Grab the cable with no zip tie and plug it into the computer. A red light should illuminate in the electrical box on the breadboard used for pump control when the cable is plugged in. Go to My Computer -> system properties -> device manager to see a list of all hardware attached to the computer. Click on Ports (COM & LPT) to see a list of devices connected to

Figure 11 Main Labview Program Front Panel

Figure 12 Close Port Front Panel

Page 12: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

your computer. Find the number of the port associated with the Silicon Labs CP210x USB to UART Bridge component. Note the number of the port that has been assigned to the port. In figure 13 this number is COM7.

4. Go back to the main Labview programs front panel. Where it says Pump Speed Resource click the drag down box and hit refresh. Click the drag down box again and select the number of the port that was shown in the device manager window.

5. Repeat step 3 with the remaining USB cable to find the COM Port to be used for the pressure control components.

6. Repeat step 4 but click on the drag down box for Pressure & Valve Resource and select the number found in the device manager for the new USB cable.

Figure 13 COM Port Discovery for USB Cables

Page 13: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Introduction to the Labview Interface

1. Real-time display of current flow rate. Flow is given in grams/minute and updates approximately 10 times/second.

2. Real time display of current pressure in the system. Pressure is given in PSI and is accurate to the nearest tenth of a PSI. The red signal indicates the pressure in the system directly after the needle valve and the white signal indicates the pressure in the system directly before the needle valve.

3. The manipulate data button is used to toggle on and off the PID control of the system. When the button is to the right the system will fully operate and maintain control based on the setpoint. When the button is to the left the Labview interface will simply act as a data acquisition module and will send no new speeds to the pump. When the system operates in this mode sources of noise such as the needle valve and control valve can be used to affect the system without the system attempting to correct and get back to the setpoint value.

1

43

2

6

5

7

9 8

10

11

Figure 14 Main Labview Program Front Panel 2

Page 14: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

4. The setpoint is a value in grams/minute that the system will attempt to settle at. Since the max flow of the pump is roughly 1500 grams/minute the setpoint should never be set higher than 1500. Also, depending on the type of control, there may be significant overshoot in the response of the system. Allow sufficient overhead when choosing a setpoint so that the system will respond correctly.

5. These are the P, I, and D inputs for the control system. Vary the constants to obtain different results.

6. These boxes show the P, I, and D response of the system in real time.

7. This white arrow is used to start the program once everything is initialized and ready.

8. This button is used to stop the program when it is in progress.

9. These boxes represent which COM port is being used for which aspect of the control system. Mixing up the COM ports is a common mistake and will result in the system not functioning.

10. These boxes represent errors found in the Labview code. All error messages and be deciphered by searching National Instruments Labview website.

11. This slide is used to control the positioning of the control valve. The slide goes from 0-100 where 0 represents the control valve being completely open and 100 represents the control valve being completely shut. Closing the control valve completely will abruptly stop any flow through the system and can be potentially harmful to the pump. It is recommended to never move the slide past 80% when in the middle of controlling the flow.

Sources of Noise in the System

1. One source of noise in the system in the needle nalve on the front of the cart. It is controlled manually and increases or decreases pressure in the system based on its position. This pressure drop directly affects the flow through the system.

Page 15: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

2. Turning the needle valve clockwise will lower it decreasing the flow through the system. Turning it counter-clockwise will raise it, increasing the flow through the system. The valve is not very sensitive until the final two full turns. At this point the flow drops dramatically for a small change in the valve. Take caution not to completely stop the flow through the system when using the needle valve.

3. Another source of noise in the system in the control valve seen in Figure 16 below.

4. The control valve affects the flow by changing the acting much like a needle valve. The added benefit of the control valve is that it is pneumatically controlled and can change position based on inputs from the Labview interface. To change how open or closed the valve is simply slide the pointer shown in bullet point 11 of Figure 14 to the right or left. Sliding the pointer to the right will close the valve. Sliding the pointer to the left will open the valve. Be careful not to completely shut the valve while water is flowing through the system as it may harm the pump.

5. Figure 17 shows a close up of the valve open/close indicator. When the pointer is at the top the valve is completely open. When the pointer is at the bottom the valve is completely shut. For example in Figure 17 the valve is completely open.

Figure 16 Control Valve

Page 16: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

6.

Another

source of noise comes into effect when the reservoir for water is switched in real time. This is due to the fact that the reservoirs are at different heights on the cart. To begin switching tanks first change the outlet flow direction. This is achieved by turning the Swagelok valve on the top right of the cart. When the arrow points to the left the top reservoir is being used. When the arrow points the right the bottom reservoir is being used. In Figure 18 below the top reservoir is currently in use.

Figure 17 Control Valve Open/Close Indicator

OPEN

CLOSED

Figure 18 Reservoir Selection Valve

Page 17: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

7. After the correct tank has been chosen open the shutoff valve in front of the tank you would like to draw water from. To open the valve slide up the metallic ring and rotate the handle clockwise. If the handle is parallel to the flow, the valve is open. If the handle is perpendicular to the flow, the valve is shut. In Figure 19 the valve is open.

8. Next, shut the valve for the reservoir that is not currently in use by lifting the metallic ring and rotating the handle counter-clockwise.

9. Be careful to follow steps 6 through 8 in order so that one valve is open at all times. Failure to do so may harm the pump.

Figure 19 Reservoir Shutoff Valve

Metallic Ring

Page 18: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Running a Simple PID Test in Labview

1. Start by going to the close port Labview front panel. Select the COM port being used for the pump control USB cable. Press the white run arrow. Repeat this for the COM port being used for the pressure control USB cable.

2. Go to the main Labview program front panel. In the P constant, I constant, and D constant boxes enter the number for the desired PID coefficients and press enter. For this test set the P constant to 0.9, the I constant to 0.9, and the D constant to 0.1.

3. Next set the setpoint to 0 grams/minute and press enter.

4. Slide the control valve % closed slide all the way to the left to ensure the valve is completely open.

5. Make sure the manipulate data button is to the right so that the Labview program will function correctly. Simply click the button to change the position if it is currently to the left.

6. Press the white run arrow to begin collecting data. The graphs should begin to automatically collect values for the pump speed and pressure values. At first the values may seem sporadic but that is because the time and flow rate scales are currently off.

7. Next press the green button on the drive inside the electrical box to enable control through the drive. The red light next to run should turn on as seen in Figure 20 below.

8. The numbers on the display will show

the signal

being sent to the motor in hertz. This number will range from 0-60 with 60 being the maximum frequency. Even though the setpoint of the Labview program is zero there may be some small value shown on the display due to noise in the system. Verify the display shows almost zero and contine.

Figure 20 Drive in Run Mode

RUN Indicator

Start ButtonStop Button

Speed

Page 19: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

9. Now change the setpoint to 600 grams/minute and press enter. The top graph will begin to show the control of the pump happening in real time while the bottom should show a change in the pressure of the system.

10. Collect data until the graph settles down after approximately 40 seconds then press the stop button on the Labview program. The pump will continue to spin at its current rate until the red stop button is pressed on the drive. Press that button now as well. The red light next to run should turn off and the display will show “0.0” again. The graph should appear similar to Figure 21 below.

11. To prepare the cart for another round of constants begin by going back to the close port front panel and repeating step 1. Closing the COM ports in this way ensures that no communication errors will occur with the control system for the next tests.

12. Next repeat steps 2-8 except this time set the P constant to 0.5, the I constant to 0.2, and the D constant to 0.0 so that the system will respond differently than the previous test.

13. Again change the setpoint to 600 and wait approximately 30 seconds until the system has reached its steady state value.

14. Go down to the control valve % closed slide and move the pointer to about halfway which corresponds to the control valve being 50% closed. Verify on the control valve itself that the indicator has changed position to approximately halfway.

15. Notice how the system will respond automatically to the “noise” introduced to the system in the form of a pressure change caused by the control valve. After the system has gotten back to steady state (~20 seconds) move the control valve % closed all the way back to the left, opening the valve.

16. The flow rate will change as the system was previously working harder to pump water when the valve was partially closed. The flow rate should go up momentarily then return to steady state after approximately 20

Figure 21 Labview Example Plot 1

Page 20: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

seconds as seen in Figure 22 below. Press the stop button on Labview and the red stop button on the front of the drive again.

17. For the final test repeat steps 11 and 12 and keep the PID constants the same as in step 12.

18. Again change the setpoint to 600 grams/minute and wait approximately 20 seconds for the system to reach steady state.

19. Next press the manipulate data button so that it moves to the left. This will keep the pump flowing at its current speed and continue to collect data.

20. Again go down to the control valve % closed slide and move the slide over to 50% closed. Notice that the flow rate drops significantly but makes no attempt to correct itself.

21. After about 15 seconds move the control valve % closed slide over to 0% closed and the flow rate will begin to gradually climb back up to the set point.

22. This will take a while. After 30 seconds press the manipulate data button again to turn on the controlling aspect of the Labview program. This will return the system back to steady state if it has not yet reached the setpoint.

23. Finally change the setpoint to 0 grams/minute and the system flow rate will drop down to zero very quickly. Notice how the rise and fall times of the flow rate are much quicker when the system is being controlled. Press stop on Labview and then the red stop button on the drive to finish the test. The graph should appear similar to Figure 23 below.

Figure 22 Labview Example Plot 2

Page 21: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Powering Down the Cart

1. To power down the system first flip the power switch seen in Figure 7 to the off (down) position. The lights inside the electrical box will stay on for approximately 20-30 seconds due to capacitors inside the power supplies that store charge. The drive display will display a fault code indicating that power has been disconnected from the drive. This is alright since disconnecting power is what just happened. Wait until all the lights are completely off, then shut the electrical box.

2. Next disconnect the USB cables from the computer, coil them up, and place them on the cart outside the electrical box.

3. Disconnect the black and grey power cables seen in Figures 5 and 6 respectively to remove power from the electrical system and flow transmitter.

4. Next, flip the handle on the lab air hook-up from Figure 3 so that it is once again perpendicular parallel to the floor. You should be able to hear the air flow stop. Verify on the pressure regulator gauge from Figure 4 that the pressure in the system is 0 PSI.

5. Remove the red air hose from the lab air hook-up by pushing up on the grey ring protruding from the supply while pulling down on the red hose itself. Coil this tube up and place it on the cart as well.

Figure 23 Labview Example Plot 3

Page 22: Lab Procedure - edge.rit.eduedge.rit.edu/edge/P13630/public/FinalDocuments/Lab Procedure.d… · Web viewTo add water simply fill the two reservoirs on the cart to half capacity using

Future Experiments

The possibilities for future experiments with the cart are nearly endless thanks to its robust and modular design. In addition to variations on the tests detailed in this document the other sources of noise including the needle valve and reservoir change can be used in conjunction with the control valve or individually to disrupt the flow in many different ways.

The response of the system can be monitored and evaluated based on its transient specifications such as rise time, overshoot, and settling time to determine the best methods of process control. An unlimited combination of PID constants can be used to demonstrate various methods of control. The constants can also be manipulated to create a system that is uncontrollable and will instead oscillate around a setpoint Ad infinitum.

The system can also be controlled manually by inputting a setpoint and then turning off the manipulate data button in Labview. Students can then adjust the position of the needle valve to change the flow rate until a given set point is reached. This can be used to demonstrate the importance and necessity for process control systems.

Lastly, the inclusion of the microprocessors and Labview environment allow the system to continually be changed, improved, and updated each year with new software to get even more out of the chosen hardware. For example, with some changes to the Labview environment, a few subtle adjustments to the processors, and changes to the operating parameters of the drive, the system could use the control valve to implement PID control instead of the drive itself.