RTL Throttle Oscillations (With flight logs)

We had an unusual problem while flight testing our hexacopter and can’t quite decide on the cause of the problem. We’re hoping some of you pros out there might look this over and make some suggestions.

Our system is APM2.6 running FW version 3.1.2. It is on a DJI S800 hexacopter frame.

Long Story:

We powered and armed the hex on the worktable to ensure the ESC calibration took. Then we disarmed it and without disconnecting the battery we moved it to the launch site. We got a dialog box that stated that the home position failed to update, and because we were outside our established geofence (with home at the worktable), the device went into immediate failsafe and RTL. Its still sitting on the ground because we hadn’t throttled yet. However the attempts to disable it with the RCTx didn’t work (at the time we didn’t know it was in RTL). Mistakenly, the pilot blipped the throttle which initiated RTL and the hexacopter powered up suddenly and began its ascent to the 30 meter target alt for RTL.

We understand that much of it. The problem we don’t understand is that on the way up and on the way down, the throttle out value was pulsing, causing the motors to pulse. About 1/2 Hz. Up down, up down, sometimes to maximum throttle out. This caused an oscillation in altitude for the entire flight. After it hit its 30 meter mark, it started a descent, which was smoother but not perfect. When it touched the ground it immediately jumped back up to 10 meters. 2nd time it touched down it jumped back up again. This time it started wobbling and came down hard enough to pop the battery off, thus ending the flight (and breaking two arm joints)

We can’t decide exactly what happened. We did notice that the targetAlt value on the HUD is jumping around like crazy, up and down. We noticed that the barometer altitude shows negative several times in the beginning and has large jumps during the in-flight oscillations (17 meter jumps, whereas the vehicle itself did not seem to be jumping that much). There is disagreement among us whether the barometer is causing the problem or not. We are just not sure.

What would cause the large jumps in target Alt? That seems like it should be set to 30 meters during the ascent and 10 meters ( and then land) on the descent. We did note that the RCTx throttle stick was at zero most of the time. Could this have caused the target Alt problems? It says the throttle setting will change the target alt. This is the only explanation we have been able to somewhat agree upon, but it still doesn’t explain why the altitude was jumping around.

Any ideas? Thoughts to consider?

Sorry for the really long explanation. Hopefully someone can help!

Thanks in advance!

I should also state that we have a 3D printed dome over the APM (which is outside its plastic case) to protect the barometer from sunlight and the rest of the system from light rain.

Furthermore, the next day we flew an identical aircraft (System #2) with geofence disabled and had no problems. The only difference is a small piece of foam on the 2nd aircraft over the barometer that is not on the first. We noticed a small improvement in altitude hold on the 2nd aircraft when we placed the foam. I am skeptical that the lack of foam was causing such wild, rapid oscillations in the first system during this event though. There was no such wild oscillation in the 2nd aircraft before the foam was placed.

Again, sorry for all the details. Never know what is important!

Fortunately you had IMU logging enabled for the flight. Have a look at your X, Y and Z vibration levels. Your X and Y levels are not good, but your Z levels are horrendous. That’s almost certainly the cause of your vertical oscillations. Get them down to the levels specified in the Wiki for vibration control and your craft will fly rock solid. You have mounted your APM on Zeal tape or equivalent? If not, that’s step one.

Thank you for your quick response. It is very much appreciated.

Respectfully, while we believe that the vibrations may have contributed to the problem, we do not think they caused the problem. There are several reasons we think this:

  1. The same system has flown before with no problems. The only difference is that we swapped out the APM for a new one (same HW version, update version from 3.0.2 to 3.1.2). Before the APM swap, the vehicle behaved very well.
  2. Likewise, the 2nd system is identical in every way, and it flies “rock solid” (with FW 3.1.2). We pulled logs off the 2nd aircraft while it was hovering and, to our eyes, looks very much the same.
  3. The system is damped on rubber dampers, between the electronics board and the frame, and the frame is isolated from the motors with more rubber dampers.
  4. After the hex reached its RTL altitude, it began its descent. The descent was much smoother than the ascent. During this period, if you analyze the vibration profile, it appears to be within the tolerances listed in the wiki. I agree that we might be able to improve it, but I think that the vibration is less the problem, and there was something else causing the issue.

Nor does the vibration explain the wild swings in the barometer that we recorded. The aircraft was never ascending/descending by over 10 meters in any of its oscillations, which the barometer output suggests. While we recognize that the GPS sample rate and vertical resolution are very low and therefore likely not going to give us a perfect recreation of the flight, it should still show altitude changes of between 10 and 17 meters as the barometer does. It would appear to us as though the barometer is actually the main fault in the system.

Our target_alt displayed on the HUD was bouncing around at about the rate of the oscillations. I can’t find “targetAlt” in the logs for graphing, but if you replay the mission, you can see it bouncing around on the HUD replay. How is that figure calculated? How is it used?

Also, something I’ve experienced on my own hex before is that if I throttle really hard and switch over into alt-hold within a couple seconds after take-off, the APM has a difficult time finding the right throttle at which to hover, and oscillations occurred. Never as bad as our experience last Wednesday, but definitely oscillating. If I fly in stabilize for a dozen seconds or so, before switching to alt-hold, the vehicle never oscillates. Does the APM take time to “learn” the throttle setting required for hover? Seems like the throttle PIDs should be able to stabilize faster than that, and under most conditions it performs really well. But in the case where I throttle hard on takeoff and switch immediately to ALT-HOLD, it causes instability in altitude. I wonder if the same problem occurred here, where we accidentally took off in RTL, which ramped the motors up very quickly and accelerated up very fast. Maybe the APM just didn’t have time to lock into a good throttle setting before being required to control the throttle settings, and if the barometer was misreading and the vibrations added to the problem…?

Any thoughts?

Again thank you for your response. We appreciate any thoughts you have.

I recently was testing a custom tricopter with 16" props turning slowly. Very rigid arms. It would not hold altitude in AltHold or Loiter. It moved up and down 10 meters or more. Logs showed heavy Z axis vibration, like yours. I tried everything I could think of to damp it out, including a double layer of Zeal tape. The motors and props were well balanced and high quality. I had never seen such bad altitude holding before, and the copter was essentially useless to me for photography. To my eyes there was no visible vibration.

Before I put it on a shelf and built a new frame, I thought it would be interesting to try 14" props. To my surprise it flew rock solid, with very low vibes. Apparently the 16" props were setting up some sort of unexpected resonance with the frame. So I lose a minute or two flight time with the smaller props, but it now flies great.

My point is vibrations can occur from unexpected places. Your log is showing unacceptable Z axis vibration. You mention you changed out the APM, so perhaps there’s something flaky with that unit, or something is resonating inside it. Whatever the cause, your APM thinks it’s vibrating, and if it thinks that you will have terrible altitude holding. Sorry, I wish I could be more helpful than that.