-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elevator example, test and docs #63
Conversation
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
|
||
// Rotate elevator counter-clockwise when looking from starboard, which | ||
// causes the vehicle to pitch down | ||
cmdMsg.set_elevatorangleaction_(0.27); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the stall angle of the foil is 0.17 radians as defined here:
<alpha_stall>0.17</alpha_stall> |
One additional assertion could be that the vehicle will never go passed 40 degrees pitch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @arjo129 @chapulina,
Here are notes regarding the LRAUV control surfaces along with a plot of their lift/drag coefficients as a function of angle of attack. As you can see, the control surfaces are still generating lift with minimal drag throughout the nominal operation range of the fins (+/- 15 degrees). Drag increases past the nominal range. As Arjo pointed out, alpha stall is found at the edge of the linear range around +/-0.17 rad (or ~9.7 deg).
LRAUV control surfaces:
area: Surface area of the link.
122 cm^2 for one fin.
a0: The initial "alpha" or initial angle of attack. a0 is also the y-intercept of the alpha-lift coefficient curve.
0.0 degrees
cla: The ratio of the coefficient of lift and alpha slope before stall. Slope of the first portion of the alpha-lift coefficient curve.
C_{L\alpha} = 4.13 (alpha in radians)
cda: The ratio of the coefficient of drag and alpha slope before stall.
The coefficient of drag at alpha =0 is 0.03. The ratio drag/aoa is given below. Please see Coeffs.png.
C_{D\alpha} = .04/.2 = .2 (alpha in radians)
cp: Center of pressure. The forces due to lift and drag will be applied here.
(3.7, 7.9) cm as shown in the attached diagram OriginalFin.png. This moves as a function of aoa, as show by the attached diagram cp.png. Note that cp.png is referenced to mean chord length, not the root chord length.
forward: 3-vector representing the forward direction of motion in the link frame.
[1 0 0]
upward: 3-vector representing the direction of lift or drag.
[0 0 -1]
alpha_stall: Angle of attack at stall point; the peak angle of attack.
9.5 degrees (.17 rad)
cla_stall: The ratio of coefficient of lift and alpha slope after stall. Slope of the second portion of the alpha-lift coefficient curve.
-1.1 (alpha in radians)
cda_stall: The ratio of coefficient of drag and alpha slope after stall.
.030 (alpha in radians)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh good point. I see on the controller's config that the rudder angle limit is 15 deg (0.261799 rad), which matches the joint limits. The only stall angle that I found on MBARI's code was the tailcone's stall angle, which is 30 deg. Do you remember where the elevator and rudder stall angles that we're using on lift-drag were taken from? We should document it.
If angles beyond stall result in unreasonable behaviour (at least with our lift-drag plugin), maybe we should limit the joint there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the above plot. Ben sent it to us on slack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the values for the coeffs in the plugin came from the notes above. These notes are from Rob McEwen, our controls engineer. The lrauv-application already limits the angle of the fins to +/- 15 deg, and that's the range we operate with in the field. I guess it's worth noting that the plot above is for the angle of attack and not the fin angle. Still, plenty of lift should be generated past the alpha stall — I think that's also shown in this Gazebo tutorial: http://gazebosim.org/tutorials?tut=aerodynamics&cat=physics
It might be worth revisiting the coeffs values since there might be a gap between Rob's understanding and what we're doing with these values in the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Hmm.. are these in the vehicle frame? X velocity magnitude is about right but I'd expect the sign to be positive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, oops — I see there in the world frame!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So liftdrag plugin, should theoretically be giving the correct force values up to +/- 15 degrees. The liftdrag doesn't support any Cp other than Cp (0 0 0). It might be worth using the force visualizations to see whats actually going on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I captured the gist of this conversation in #78
Signed-off-by: Louise Poubel <[email protected]>
FYI, the source for calculating lift drag for the control surfaces in the MBARI sim can be found here: https://bitbucket.org/mbari/lrauv-application/src/master/Source/simulatorModule/Simulator.cpp#lines-852 |
@arjo129 , are there any other changes you'd like to see in this PR? I believe I've addressed all your comments. |
So I went on to study why our vehicle is slowly floating up at low velocities: At 3 rads^-1, elevator pitch =0.26 The vehicle floats up, I was wrong about the hydrodynamics as it is always acting in the correct direction opposing the general direction of motion. The issue may be due to hydrostatics. Now look at the forces at high velocities: This is at 30rads^-1, pitch =0.26 For some reason we have a non-zero force from the rudder... Note: I am unable to reproduce the oscilatiions here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with approving this PR as I don't think the issues highlighted by @chapulina have much to do with the odd behaviour at low velocities.
Interesting, does the vehicle have any yaw then?
You mean the "skipping" from #78? Interesting, I have to check if it's my setup then. Does the vehicle stabilize at a downwards pitch for you then? |
Part of #48
I checked manually that the behaviour doesn't seem to be entirely correct though. I'd expect a positive angle of attack to generate lift on the back of the vehicle, so it tilts forward and goes down when propelled forwards. But at low thrust, the vehicle is going up. The higher the thrust, the more it arches downwards. In all cases though, the oscillation of death is present (probably related to #49 ).
elevator = 0.26 rad, prop omega = 3.0 rad/s
elevator = 0.26 rad, prop omega = 10.0 rad/s
elevator = 0.26 rad, prop omega = 30.0 rad/s
This is the value used in the testUpdate
At @arjo129 's suggestion I used a lower angle of attack on the test, which has less oscillation for higher prop omegas:
elevator = 0.15 rad, prop omega = 30.0 rad/s