The goal of this practicum is to design a proportional control system that will provide your robot with the ability to track desired depths and meet transient response specifications.
You will use the simulator that you used in LabVIEW in practicum 1B to validate your control system. Instead of controlling the simulated robot motor with a PWM signal (like you did in P1B), you will control the motor with a P control system.
You will then incorporate your simulated proportional control system into your actual robot, and validate the system is functional in our test tank.
n/a
N/A
P control, block diagrams and corresponding equations
Save VI’s after completing Section 5
Turn in Submission Sheet (found on Canvas)
VDSim_ControlFA24.vi - found on Canvas
Dry tested ROV
Find the file named "E79_F24_5ABFA24.llb" in the folder named “Resources/Practicums/” on Canvas. The VI has been modified to take a desired position instead of a direct PWM value. Make sure to input the parameters of you're system like
Mass (found in practicum 1C from the force measurement stand)
Buoyancy force (also found in practicum 1C from the force measurement stand. Remember that the buoyancy force should approximately cancel out the gravitational force for a neutrally buoyant robot)
Drag coefficient (calculated in problem set 3B based on step response of your robot from practicum 2D).
The magnitude of all these numbers should be positive going into the simulator. Your acceleration equation in the VI already takes care of signs.
If you've misplaced the values for your robot, check with a prof or proctor. Type these values into the vi front panel and save the file. Do not run the vi until you have these values set.
Determine the natural frequency ωn and damping ratio ζ as functions of KP for the new closed loop system. To do this, you will need to start with your governing equation that you derived based on lumped element mechanical modeling.
However, your control effort is really in the form of PWM, and you need to add a coefficient to convert from PWM into thrust. In order to calculate the thrust, fT(t), from the PWM control effort , Kp(zdes - z(t)), you will be using this equation:
where α is the absolute value of the slope from your PWM to thrust curve from practicum 1C, which allows you to convert from PWM to thrust. The conversion from PWM control effort to thrust has been done for you in the .vi that was provided to you. You do not need to alter the vi.
Draw a block diagram assuming neutral buoyancy add it to your Submission sheet. (Question 1)
In this case, fB is the buoyancy force that should cancel out the mg term. One way to determine the natural frequency and damping ratio is to substitute your control law into the governing equation, take the Laplace transform, and find the transfer function relating Z(s) to Zdes(s). The result should be a second order transfer function from which you can extract the natural frequency and damping ratio.
Predict the step response of the system for three different values of KP and fill in the “predicted” columns of the Table 5.1 on the next page. Calculate the percent overshoot and rise time as functions of natural frequency and damping ratio. Recall (from Module 2 videos 10 & 11) that the maximum percent overshoot MP can be calculated from as:
and the rise time tr as:
The arctangent can be calculated with Excel using the atan2 function, rather than the atan function.
NOTE: atan2 takes two arguments (atan2(x,y) where atan2(x,y) = atan(y/x)). Also the denominator (x) should be the negative term to get positive results. A negative numerator (y) goes clockwise on the radian circle.
If you are using other software, be sure to use a version of the arctangent function that produces an output like that of atan2 so that the calculations will be correct.
Validate the step response predictions of the system for three different values of KP . For each KP, run your simulator (we suggest stepping between 0 and 10 m), open and analyze the data in your Write to Measurement file, and fill in Table on the next page. Add a completed table to your submission sheet. (Question 2)
Design two systems, i.e. select a proportional control gain KP. One that minimizes the rise time of the system while ensuring MP is less than 20% and another where the system is critically damped. Have an instructor check your gain and simulated step responses. (Question 3)
Screenshot the position vs time graphs for the simulated responses and add it to your submission sheet. (Question 4,5)
Your goal for the test tank room is to validate that our robot systems can track a desired depth.
Before getting in the queue, you'll need to complete the following
Write down your pressure sensor calibration values (practicum 2D)
Write down your mystery resistor value for the temperature sensor (practicum 4B)
Dry test completed last week
Once you have completed these, get in the queue for the test tank - make sure you show that you have completed the items above to the proctor.
Upon arriving in the test tank room, ask an instructor or proctor which station you will be using.
Set the VI parameters in the console for your robot specific parameters in the Calibration box.
Depth calibration entry field based on your pressure sensor calibration curve
Mystery resistor value based on your temperature sensor circuit resistor
Then, set the proportional gain K_P to be 250 using the Kp entry field.
Have your robot track a desired depth of 0.2 m by typing 0.2 into the desired depth entry field. The robot will only track depth if the proportional feedback is turned on, so be sure that you are in proportional mode and not constant mode. Watch the robot and the depth chart on your VI to make sure the robot is actually tracking to the desired depth. Then enter a step change in the desired depth from 0.2m to 1m. Observe the robot's step response. Make sure you observe a full step response with the robot reaching steady state. There may be some small oscillations around the steady state depth. Make sure your data is being written to a file and that the data makes sense.
Your goal is to collect step response data for three unique K_P values. Start with K_P = 250 and then repeat your data collection for two additional K_P values. One must be for a K_P leading to an underdamped system, and the other can be for a K_P of your choosing (if you already identified the K_P for the critically-damped system in Section 5, then use that).
In this section, you will analyze the data you logged during your test tank deployment. From your test tank data, construct a plot of depth versus time for each Kp value. Overlay the desired depth versus time input step on the plot. Report these plots in your submission sheet (Question 6)
REMINDER: The VI timer starts when you click run, but the time doesn’t start recording to the output file until you’ve chosen the name and directory for the output file. Because of this, the time column in the output file generated from the VI will have a near 0 number in the first row, then it will jump a couple of seconds in the next row and begin recording time normally from there. When you are looking at your data, delete the first row (with the near 0 time), then make a new column where you calculate the difference between the first recorded time after the jump and the current time in each row in order to get the elapsed time starting from 0.
Draw a block diagram with included disturbance force -mg+fb. (Question 7)
Measure the steady state error, i.e. (zdes – z), where z is depth, for each of your step responses.
Find the impact of disturbances (buoyancy and mass) on your transfer function. Using the transfer function of the system including disturbances from buoyancy and mass, find the analytical steady state error for the different values of K_P. Use the full expression for Z(s), similar to what was shown in the second to last slide of Tutorial 22, and find e = zdes – z. Note that you can use the final value theorem. How does your analytical error compare to your measured values? How does your simulated compare to measured? (Question 8-9)
Tools Per Station
Laptop computer with LabVIEW
Power Supply
Function Generator
Oscilloscope
Practicum 2C Cable
2 x H20 Bath
Thermometer
Tubing
Graduated Cylinder
Meter stick
Software
VDSim.vi
DoubleIntegration.vi
AccelCalc.vi
Materials Per Kit
1 x Thermistor
1 x Main PCB
1 x Breakout PCB
1x Motor
1 x Pressure sensor