APM 2.5 hardware
APM 2.65 software
Steps:
1) start FG on the ground via Mission Planner.
2) Set plane to Auto
3) I restart FG at same location but at 30,000 ft.
Results: plane does a tight spiral dive to the waypoint altitude, then goes to the waypoint. Ignores Bank max degrees. (it does take into account Pitch Min) And plane oscillates the ailerons rapidly back and forth during the dive.
What I expected/wanted: plane to go towards the waypoint at it's minimum pitch(in this case -80 degrees and circle waypoint at loiter radius(110Meters) and minimum pitch(80degrees) until it reaches the waypoint altitude.
Am using Rascal plane with attached parameters. I did set Bank Max to 15degrees and minimum pitch is -80 degrees. Bank Max has no affect, minimum pitch does affect it.
I may be doing something silly, I just got the HIL stuff working recently.
Attached is the TLog and a screenshot. In the screen shot you can see the YAW stair-step up and the ROLL oscillate.
Lincoln
Tags:
Permalink Reply by Greg Fletcher on October 12, 2012 at 1:30pm What you describe sounds pretty much like this flight , not simulated, but real. It was using an APM. The drop happens at 6:45. Blog post here.
Permalink Reply by Lincoln on October 12, 2012 at 2:32pm Yeah - have talked to him. His doesn't do it in the simulation and he is using the older APM hardware and pinned his gyro's.
I'm pretty sure I have a user-error somewhere, probably a configuration setting. Or maybe a min-pitch below a certain amount is just trouble. The question is what happens in real-life which I won't be able to answer until next week at the earliest.
Lincoln
Lincoln
Permalink Reply by Larry Grater on October 12, 2012 at 2:51pm The flight was done with APM 2.0 that has the MPU6000 gyros. Gyro limits were set to the default 2000 deg/sec. BTW, I did a quick hack on this today and I don't think I exceeded this rate on the way down. The pitch oscillations come out to about 900 deg/sec. It would have been nice to include the IMU health metric in the TM as well as the gyro outputs. A MAJOR blunder.
Simulations were performed with both X-Plane and FG. The FG simulations were successful from drop to landing. The X-Plane aero model doesn't appear to work at altitude, which is unfortunate since more models are available for X-Plane.
You'll get this one figured out.
LG
Permalink Reply by Lincoln on October 12, 2012 at 3:44pm Ok - so I reset everything I could. Original HIL hex file. Reseting, erasing the board, back to the ArduPlane.param file in the auto test directory.
The key is the min-pitch value -- it makes it goes bonkers for anything larger than -50. There must have been something else as well because I did try that before. But with a completely refreshed and new setup that is the situation.
Always seems easy once it is fixed.
Lincoln
Permalink Reply by Søren Kuula on October 20, 2012 at 3:42pm Hi,
Yeah a -80 degrees pitch nose-dive is more like an aerobatic meneuver than something a navigation system can do.
Control surfaces have more effect at high speed, and a resonable PID setup for normal speed will probably overreact in a long dive. Somewhere in the ArduPlane code (ask if you want me to find it again) I have seen that a factor between 0.5 and 2.0 is calculated from the speed of the aircraft and the controls deflections are then scaled by this factor. Maybe one could extend on the 0.5..2.0 interval in order to widen the range of speeds where this works, The limits are hard-coded so recompile will be needed.
Kind regards
Soren
Permalink Reply by Lincoln on October 23, 2012 at 6:20pm Thanks for your comment!
Yeah - I did end up adjusting this part of the code-- I actually extended it to limit the scaler between .005 and .5 when altitude is above 35,000 ft. and greatly magnified the airspeed(8x) and added gps ground speed to the speed scaler. However in simulation the roll rate was still pretty rough when at 80 degree pitch.
Therefore, I ended up not trying to navigate, but simply dive below 35,000ft and then activating the navigation and limit the pitch back to 30degrees or so. I also wish I could add the vertical speed to the speed scaler too. Ultimately it may not matter because at the high altitudes I elected to just set the roll servo to neutral output until I get below the jet stream. When air density is so low it doesn't really matter and terminal velocity is still pretty slow in an unpowered dive;
I am still playing with it -- I wish I could set a roll rate when it is pitched at 80degrees. I would like it to roll about 1 revolution per second on the way down for some more interesting video. I can't seem to figure it out though.
Below is the code out of my modified Attitude.pde around line 19.
if (ahrs.airspeed_estimate(&aspeed)) {
if (aspeed > 0) {
speed_scaler = g.scaling_speed / aspeed;
#if BALLOON_LAUNCH == ENABLED
// ELP BALLOON ############################################################################### ELP
// scaling_speed is set to 15 m/s.
// ELP HAB - adjust speed scaler based on GPS ground speed when above certain altitude. Getting wild fluctuations in simulation above 30,000 feet.
// Iter 1) use both airspeed and say 1/2 GPS ground speed. Or just lock speed scaler to XX above 35,000 feet= 10500meters
// Iter 2) allow scaler to be quite small. .005; boost aspeed factor by 4. now by factor of 8.
if (c_tmp > BALLOON_PID_SCALE_ALTITUDE) {
speed_scaler = g.scaling_speed / (8.0*(aspeed) + 0.5*(g_gps->ground_speed)); // I wish I could add climb_rate;
//speed_scaler = BALLOON_PID_SCALE;
}
#endif
} else {
speed_scaler = 2.0;
}
#if BALLOON_LAUNCH == ENABLED
if (c_tmp > BALLOON_PID_SCALE_ALTITUDE) {
speed_scaler = constrain(speed_scaler, 0.005, 0.5); // allow for very very low PIDS at high speeds. constrain to max 1/2 PID values.
}
else {
speed_scaler = constrain(speed_scaler, 0.3, 2.0);
}
#else
speed_scaler = constrain(speed_scaler, 0.5, 2.0);
#endif
Permalink Reply by Søren Kuula on October 24, 2012 at 12:45am Hi,
Just curiosity - where can you fly so high, and with what kind of power?
Kind regards
Soren
Permalink Reply by Lincoln on October 24, 2012 at 9:05am Using a balloon to take it up, trying to get it to fly back. -- kaymont 600g latex high altitude balloon. Trying to get the plane < 400 grams. So it only has enough engine/battery to maintain level and only turns the engine on below 1000ft. Primarily it is a glider.
BTW I've given up on the dive. New plan is manual on way up; switch to auto at balloon burst-- unlimited loiter waypoint at -30degrees pitch to 1000ft; then it turns on engine and jumps to new waypoint which is a 10 turn loiter at 100ft and landing sequence. I was concerned about losing GPS in the dive and it was too unstable in simulation. Hopefully I will be standing there at the 2nd loiter and will just flip to manual mode and land it myself.
Lincoln
Permalink Reply by Søren Kuula on October 29, 2012 at 8:07am
Permalink Reply by Lincoln on October 29, 2012 at 8:29am
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.1298 members
692 members
7 members
48 members
24 members
© 2013 Created by Chris Anderson.
Powered by
