Download PI Control - Advanced Control Design Implement - Lab 2 | ME 6404 and more Lab Reports Mechanical Engineering in PDF only on Docsity!
ME6404 – Fall 2008
Lab 2 – PI Control
Goals:
- Find optimal PI feedback gains for trajectory tracking and point-to-point motion of a velocity controlled mass
- Find optimal gains for moving a suspended payload
- Operate tower crane remotely
Background
The crane trolley position can be modeled as a mass-plus-friction plant under PI velocity control. A block diagram of the system is shown in Figure 1.
Figure 1: Controller Block Diagram.
The transfer function of the system is:
( )
( ) ( ) ms (GP b)s GI
GPs GI V s
Vs G (^2) d
cl (^) + + +
s = = (1)
Proportional Control: With only proportional control (equivalent to setting I=0) the closed loop system is reduced to a first order system. The effects of the proportional gain are shown on the root locus in Figure 2. From the locus it is clear that increasing the proportional gain moves the system pole to the left, thereby creating a faster response. The root locus shows the system will never go unstable. In addition, the final value theorem can be applied to find the steady-state error of the system to a unit step input:
ess = b b + P
From this equation we see that as P increases, the steady-state error approaches zero. The above results might suggest that P can be increased without bound to yield optimal results. However noise and unmodeled dynamics can cause stability issues that prevent very large values of P from being implemented in practice.
+ - P +
I
s
PI
Controller
G
ms + b
Desired Velocity Plant Vd(s)
Actual Velocity V(s)
Im
Re
X b m
Figure 2: Root Locus.
Proportional-Plus-Integral Control: With proportional-plus-integral velocity control the closed loop system is second order, with the transfer function given in (1). The benefit of using integral gain is its ability to eliminate steady-state error. Applying the final value theorem, the steady state error to a step command becomes: ess = 0 (3)
However, integral gain also has its drawbacks. We can use a root locus to plot the closed loop poles as a function of increasing I, as shown in Figure 3. This locus suggests that using integral control can create oscillations. Therefore the proper value of I must be chosen with care.
Setup:
The trajectory used in this study has the form shown in Figure 4.
Figure 4: Trapezoidal Velocity Profile.
The initial deceleration time, tm, will be chosen as 1 sec. The rise time, tr, is 0.2 seconds for the trolley and 0.4 seconds for the bridge.
Objectives:
There are two objectives. First, find the optimal PI gains such that the trolley and bridge track the above velocity profile. It is also desired that the trolley and bridge traverse the same move distance as the above desired command. Second, find the gains that reduce the payload vibration when the system is given the specified trapezoidal velocity profile.
Velocity (%)
tr tm Time (s) tm^ + tr
Im
Re
X b+GP m
X
Figure 3: PI Control Root Locus.
- Keeping the same P gain found above, find the optimal I gain to achieve the best trajectory tracking. The integral gain must lie between 0 and 500 ms. As before, plot the desired velocity, actual velocity, and tracking error. Find the optimal I gain based on the background information and the observed tracking error results. Save all the data from each trial for later analysis and also write down any other observations. This is a qualitative, non-exact process. Approximate the best gain using only 5 trials.
- Repeat steps 1 and 2 for the bridge axis, however the range for the proportional gain is 0 to 10. The range for the integral gain stays the same.
Part 2: Finding optimal gains for control of suspended payload
- Find the optimal P and I gains to move a payload suspended 24 in below the trolley with very low oscillation. These gains are not necessarily the same as those determined in Part 1. Still try to have the trolley follow the desired velocity profile. Run a series of trials to find the gains that you believe will minimize the swing. The limits on the proportional and integral gains are the same as before. For each trial, write down the gains used and the resulting vibration. To ensure that your optimal set of gains is not dependant on the command, run the machine using both long and short tm times. This is a qualitative, non-exact process. Try to find the best gains using only 5 trials. This part will only be performed on the trolley axis.
Data Retrieval Procedure
- Ensure that the yellow ethernet cable is connected to the laptop (This is needed for Matlab to check its license). Then open Matlab and change the current directory to d:\ME
- To analyze the data, type “newerplcdata('download.csv')” and press enter. The program should prompt you for a file name, enter one (e.g. test1) and press enter.
- Plots of the recorded data for the camera on each axis and trolley motion on each axis appear.
- The filename you specified will be created in the current directory. To access this data, use the Matlab command “load XXX”, where XXX is the filename you specified. An array will be loaded with the following data:
payloadswing(bridgeaxis) (rad)
actualbridgevelocity(rpm)
desiredbridgevelocity(rpm)
payloadswing(trolleyaxis)(rad)
actualtrolley velocity(rpm)
desiredtrolley velocity(rpm)
time(s)
- Note that for the velocity data, 120rpm = 100% = .243 m/s (See notes below)
Notes
- There is a non-trivial bug with the velocity (RPM) that the WinCC GUI that halves the actual RPM values which the trolley travels at. To get around this simply multiply your velocity data (after it is downloaded to the laptop) by two.
- Press E<TER after typing the download path on the WinCC GUI. Then press the DOW<LOAD button.
Basic Crane Operation:
- The “Operating Mode” box, in the top right corner of the screen, is used to change the operating mode for each lab module. For now select Standard and press the “Activate Mode” button.
- Beneath the “Operating Mode” box are the “Start” and “Stop” buttons. Push the “Start” button now to turn on the power. Notice that the indicator to the right of these buttons has moved from “Ready” to “Running”. If you ever need to execute an emergency stop, push the “Stop” button.
- Beneath the “Stop” button is the “Shaper” selection box. Select Unshaped. In future labs you will choose various Input Shapers (eg. ZV, ZVD, etc…) using this menu.
- The crane is controlled using the directional buttons on the lower left of the screen. “UP” and “Down” will raise and lower the payload. “CW” and “CCW” will rotate (slew) the crane clockwise and counter-clockwise respectively. “In” and “Out” will move the trolley inward and outward in a radial motion. Experiment with moving the crane now.
- As you move the crane notice that the upper left corner shows a real-time animation of the crane’s configuration. The green-box represents the trolley position and the red-circle is the payload position.
- As you move the crane, also notice the position information indicated in the blue-box in the bottom-middle of the screen. This shows the trolley position in polar coordinates, as well as the payload height and deflection.
- The black areas of the animated sketch indicate the limits of the crane’s motion. If you ever run into these limits the crane will automatically stop. You will then only be allowed to move the crane away from that limit.
Using the Swing Reducer:
- In many of the labs it will be important to zero-out the payload swing before running trials. This is done with the “Swing Reducer” button in the top left. Push the “Start Swing Reducer” button now. The begin moving on its own to zero-out the swing. You cannot move the crane manually while the swing reducer is engaged.
- Underneath the “Swing Reducer” button are 3 entry boxes for the slew position, trolley position, and hoisted height. These numbers are the desired, steady-state position of the crane. The swing reducer will eliminate the swing and return the crane back to this position. Notice that when you initially pushed the “Start Swing Reducer” button the current position of the crane was instantly copied into these boxes.
- If you want to move the crane automatically to a new position, with no swing, enter the corresponding coordinates in the swing reducer boxes. For example, enter a new slewing position (in degrees) in the slew box. As soon as you press enter the crane will move to the new desired position. This only works while the “swing reducer” button is depressed.
Record and Playback Buttons:
- In the bottom right of the screen are the “record” and “play” buttons.
- The “play” button is used to automate the crane. A series of velocity setpoints can be created in Excel and stored in a *.csv file using the filenames shown on the screen. This file can be loaded into the system by pressing the “upload” button. Then the setpoints can be played back automatically using the “play” button.
- The “record” button will be used in every lab. It is used to record the position data of the crane and payload.
- Push the “record” button now. You will notice that the recording light turns on and the recording timer starts counting. When the counter reaches the limit shown on the screen it will automatically stop. The sampling rate is also shown. You can manually stop the recording before it reaches the limit by pushing the recording button again. Push the record button now to stop recording.
- After you finish recording the data must be downloaded to the computer. This is accomplished by pushing the “download” button.
Ending the session:
- When you finish driving the crane press the “Stop” button. It is important that you turn off the crane after every lab session so it does not stay on for long periods.
- Then click Disconnect in the top left of the browser window. Do this now.