EET ATOMATIC CONTROL SYSTEM LAP

profileAyn12
Lab5AB-BallInTube.docx

Laboratory Exercise 5 Part 1

Ball in Tube – PID Control

Introduction

There are two parts to this lab. Week 1 will discuss instrument linearity as well as manual control of the process. Week 2 will discuss auto-tuning and the process of controlling the ball for various step increments in auto mode.

Equipment Setup

Ball in tube setup consist of tube and ball itself, laser sensor, which will be used to read the ball height into the controller. Fan at the base of the tube, this is what will be connected to the PID’s output. PID logic will reside in the PLC.

The figure below is the ball-in-tube setup. At right is the display. In the middle is the PLC, then the tube with laser at top and fan at bottom. The power supply pictured at left is not used. Note – instead of the HMI panel we will use PC as our HMI.

\\FSS10CV03.UTAD.UToledo.Edu\L-Volumes$\wevans\Desktop\DSC_0469.JPG

Figure 1 Equipment Setup - Ball in Tube Setup

Procedure – Week 1

There are two different relationships in this portion of the lab. One involves the laser and the ball’s position. The other involves the PWM output of the fan and the height of the ball in the tube.

In each case, the input or (x) variable can be manipulated and the output or (y) variable observed. This lab involves determining the linearity for each of the relationships.

The procedure involves going from the low value to high value in small increments and from high to low in small increments. If the output value saturates (goes to 100%), all remaining input values may be skipped.

1. Collect values of output (y) for laser input vs values of input (x) of ball height (from yardstick). To do this, set the mode to PWM (auto) and adjust output % from 0 to 100 in increments of 10. Then repeat from 100 to 0 in increments of 10.

2. Collect values of output (y), ball height vs values of input (x) or PWM %.

PWM % represents a number for the percent of time the pulse to the motor is on. To do this, set the mode to manual and adjust the output % in 1% intervals starting at 10%. There will be a point at which the ball takes off. This threshold will then allow the ball to reach the top without further adjustment. Then move from high values to low values. You will see a relationship that is different when the ball is at the top and the percent is lowered.

3. Graph of Laser Output vs Ball Position:

You may want to use the graph at the end of the lab report or generate the graph automatically using XLS (in scatter x-y mode).

4. Graph of Ball Height vs PWM%:

You may want to use the graph at the end of the lab report or generate the graph automatically using XLS (in scatter x-y mode).

5. Use the system in auto (PID PWM) to control the height of the ball. Set the set-point to a height and observe the ball’s movement. Move the Setpoint (PID) from a low value such as 20% to a higher value such as 60%. Describe movement of the ball as it moves to 60% height.

6. Now switch to manual (Manual PWM) and try to control the height to the same height as in the auto mode. Describe the movement of the ball in this mode. Is it harder to control to a set height?

7. Switch the system back to auto and hold your hand over the tube so as to cause a restriction (but letting some air through). What happens when controlling the ball to a set height?

If you hold your hands on the vents for a much longer time, what results are observed? Do not hold your hand near the fan at the bottom of the tube!!!

8. Do the same procedure of holding your hands on the vents with the system in manual. What happens to the ball’s position when controlling the ball to a set height?

9. Now vary the set-point from a high percent to a lower percent while in auto mode. This is the reverse of the step function above. Move the set-point from 60% to 20% and observe and record the graph for the negative step function.

10. Vary the set-point by a great amount while in auto. Set the set-point at 10% and then enter a step to 90%. Record the results. Are these results different than those previously recorded? If they are greatly different, reduce the step to a lesser percent to determine at what point the results seem to be more like the step function from 20 to 60%.

11. Reverse the process and set the step to 10% from 90%. This is the reverse step. Record the results.

More Questions:

1. Are the Laser Output vs Ball Position and the Ball Height vs PWM% relationship linear?

2. Is linearity necessary to have an automatic operation?

3. Write out the mathematical equation for PID output in relation to Gain, Ti and Td?

4. Was hysteresis observed in this lab?

1.

The primary screen for the Lab is:

The three function keys are labeled with the following:

F1 - Output Control – screen control to pick the screen above

F2 – Graphs – screen control to pick the graph screen – next page

F3 – PID Param – screen control to pick second screen – next page

The PID PWM button toggles between the manual and automatic mode of the PID controller. When in manual, the button says Manual PWM and the student can enter the percent output of fan to control the air speed. Air speed is controlled in this mode by entering a number in percent in the blue tab Output PWM on the next screen.

Manual

To change the height in manual, set the button above to Manual PWM and on the second screen, set the blue tab to a percent from 0 to 100.

This sets the output to a percent on of the 24 V power supply to the fan. The figure below shows various percent on times for the fan.

Use the following screen to change tuning parameters for the block:

Appendix 1 – Portions of the Program in the PLC

Open the project ‘PID’ from the zipped PID file. Then from the Portal View, go to lower left corner and click ‘Project View’.

From this view, follow your instructor’s instructions for compiling and downloading your project to the PLC and HMI attached to your station:

You will see in the project tree a main (OB1) and Cyclic interrupt (OB30) program. In OB30 is the PID block. From this block you can observe the PID block and its response. Click on the figure in the upper right corner of the PID block and the box at the bottom of the page will appear.

The status of the controller may be controlled from this screen or from the HMI. Either will give the same results:

The procedure for download and going online will be given by the instructor. The screen below is part of this procedure:

Laboratory Exercise 5 Part 2

Ball in Tube – PID Control

Introduction

Last week, we looked at the instrument linearity as well as manual control of the process. In Week 2, we will explore tuning and the effect of P, I and D parameters on the control process when operating PID controller in auto mode.

Procedure – Week 2

1. In Automatic mode, we will experiment with the parameters values for P, I, and D. With all parameters at their default good value introduce a step for the auto mode from 30% to 70% and observe the process. Note the settling time, overshoot.

2. Next, consider only the effect of removing a parameter, one at a time. Delete the D parameter while keeping the P and I. Report the stability of the auto controller to a step response with the D parameter removed.

3. Do the same with the - I (Integral) term leaving only the P (Proportional) term. Report the stability of the auto controller to a step response with the I and D parameters removed.

4. Restore the I and D parameters to their original values and, with the device in auto mode, decrease each parameter, one at time, to 50% of its original value. First decrease the D parameter and introduce a step. Then restore the ‘D’ parameter to original value and reduce the I. Finally restore the ‘D’ and ‘I’ parameters to original value reduce the P to 50%. Report the stability of the auto controller to a step response as each variable is reduced.

5. Repeat the process (Step 4) at 10% values of P, I and D parameters. Report the stability when each variable is reduced to 10% of its original value.

6. Use the parameters for your machine and fill out the PID equation for your controller’s PID output.

Questions:

1. What effect does the Gain, Ti and Td has on PID’s output?

2. Is it possible to have a control of the process using PID controller with only gain and Ti term? If so, why?

3. What improvements can be made to the equipment setup in order to achieve more accurate height control?

9

Set to value from

0 to 100%

Set to value from 0 to 100%

25% On

50% On

75% On

0

24 V

24 V

24 V

0

0

25% On 50% On 75% On

0

24 V

24 V

24 V

0

0