I am currently working on a drone swarm project using MicoAir H743 flight controllers. I am running into a persistent issue where the drone exhibits uncommanded altitude “step-ups” while flying in Position mode.
The drone flies perfectly stably for the first few minutes, but then begins to pulse the throttle, climbing about 0.5m-1m every 1.5 seconds. During these step-ups, my throttle stick is commanding a descent (or is at zero), but the thrust setpoint from the flight controller surges.
The flight controller knows it is climbing. There are no “phantom drops” in the logs; the GPS, Barometer, and Local Z position all accurately reflect the climb, meaning the flight controller is intentionally commanding the climb. Switching from Position mode to Loiter/Hold and back instantly fixes the issue for a short time.
Here is what I have definitively ruled out through process of elimination across two completely different physical drones:
Collision Prevention (Obstacle Avoidance): I have TOFSense/TFmini LiDARs, but CP is disabled (CP_DIST = -1).
RC Packet Loss: I initially suspected ELRS/MAVLink bandwidth issues, but the exact same behavior occurs on a clean, dedicated CRSF link.
Vibration Aliasing: The vibration metrics are high (20-25 for both independent drones), but this vibration is consistent throughout the entire flight. The altitude steps only happen after a few minutes. Also, because the EKF correctly tracks the climb, it doesn’t seem like the estimator is being tricked by vibration aliasing.
Below are the details and logs from my two most recent tests:
Setup: Completely new drone, new location (zero magnetic interference), NO companion computer connected.
Parameters:EKF2_REQ_SACC = 0.5. Throttle was artificially limited to 50% for safety.
Notes: Very stable flight profile initially. The incremental steps appeared again around the 4:00 minute mark. When it happened, my throttle command on the remote was at 0. I switched to Hold mode, commanded a descent, and the drone landed smoothly. Because of the 50% throttle limit, the altitude jumps were smaller than in Test 1.3.
My Question:
If the EKF is healthy, vibration aliasing isn’t causing a phantom drop, and Collision Prevention is off, what else could be causing this?
Hi friend, I had a similar issue and posted about it a few days ago (here). I was flying in Altitude mode. Right after takeoff the drone was stable, but after about a minute it started to climb, not pulsing, just slowly and continuously, until I activated the kill switch because it wasn’t responding to my descend commands on the radio. At the time, I didn’t think about switching flight modes, that might have saved my drone.
I also had high vibration levels, but like yours they were consistent during the whole flight. Besides that, I’m starting to think vibration might be aliasing the estimated velocity and making the vertical position unstable.
I am going to attempt a softer mounting method and then re-test for vibration. I cannot think of anything else that could be the issue. I will also add a downward LIDAR to see if that prevents any estimate drift due to vibration.
I also had high vibration levels, but like yours they were consistent during the whole flight. Besides that, I’m starting to think vibration might be aliasing the estimated velocity and making the vertical position unstable.
Exactly. High vibration causes aliasing and is the primary cause for this behavior.
I am going to attempt a softer mounting method and then re-test for vibration
I recommend hard mounting and setting up digital notch filters with ESC RPM feedback. Soft-mounting is tricky because your spring mass damper system will always have a natural resonant frequency susceptible to excitation. Although on larger vehicles you may need to use an isolation system to avoid clipping.
Thank you for your advice, I tried the softer mounting and the vibrations are still very much present as you can see in the log.
The downward lidar did prevent the altitude steps, but thats just a temporary solution. I will definitely attempt the filtering method, I didnt know that was an option!
I see the DNF only works for the gyro, but my accelerometer vibration metrics are too high. The gyro only gives angular rate information so the vibrations shouldnt cause an altitude estimate error right?
DNF will not help you much until your vibration problem is fixed, it’s primarily used for filtering a narrow-band frequency, usually caused by your motors/props (motor fundamental frequency and blade pass frequency). Inspect your setup closely. Read here for more info:
Bad vibration like yours corrupts all IMU data, bad IMU data will corrupt the estimator, and it will eventually cause incorrect position estimates and thrust commands such as yours. Gyro is primarily used for calculating attitude, attitude is used to transform raw accel, if gyro data is bad then vertical acceleration (for example) will be bad. All your flight logs, including your recent log, show strong signs of very bad vibration. Your raw acceleration overlaps, your raw gyro is very noisy, your Acceleration Power Spectral Density plots showed strong yellow energy spread across all frequencies, there isn’t really a narrow band frequency that DNF can filter out. read here for more info. You shouldn’t fly with this many signs of bad vibration.
If you use plotjuggler on your recent flight log and look at vehicle_angular_velocity (post filtered gyro), sensors_combined gyro (raw gyro), the post filtered is just as noisy as the raw data, the default filtering can’t filter out this level of vibration, DNF won’t either.
And this plot is what the estimator thinks is the vehicle’s vertical acceleration is (filtered and fused), this isn’t normal where only thrust is commanded or during hold mode, the estimator will eventually react to this. There is likely stable flight initially and then instability later because these errors accumulate over time.
Thank you for the detailed response, I appreciate it.
I will have a good look at the sources you provided, I initially didn’t have a reference for how much is “normal” as this is my first real exposure to DIY drones.
@emarcphera
Your analysis is quite good and complete for his case, but some of your arguments may not apply to my case, I think. Could you please help me?
I also think vibration could be the main cause of my problem, but when looking at the Acceleration Power Spectral Density I can see a clear correlation with my Motor Output. Could this mean that the DNF might work in my case?
Both graphs are below, as well as the Flight Review and the link to my posted issue.
marceloroberti Hello, Sorry for a late response , you’ll need to figure out if your motor/blade noise is getting through to the gyro and resulted in altitude drift. I’ll take a further look at your post and logs, and give my analysis there, eventually.
This is a pretty good guide on Gyro filtering and DNF with PX4: