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
MS5611 throttle oscillations #3823
Comments
iNavFlight/inav#4 is the only bit of information on the current defaults that I could find. |
A small (albeit pessimistic) update: I've just tried the following:
But I have the impression that things got worse. Here's a video with 4 attempts to switch baro hold on: It behaves exactly the same way on both aircraft I tried it on (F4 on the left, F7 on the right; the video is from the F7 with the RunCam Split). What's the next step here? Should I try e.g. |
Betaflight 3.2.2 |
@noviuk Thanks for the update! That's a very interesting finding. I'll test it ASAP. However, at the first glance, I find it really puzzling that the velocity PID can have an impact on the stability of the altitude PID. I would expect the velocity PID to only come into play in GPS hold mode (and I never got that far in Betaflight due to severe magnetometer calibration issues and GPS issues). What I have been trying was only altitude hold, without GPS or anything that could possibly be related to velocity. If the velocity PID can indeed resolve the altitude PID oscillation problems, that definitely sounds like a bug. Using altitude hold without GPS should have nothing in common with the velocity PID, because there's no notion of velocity in that mode (and the drone may not even have a GPS installed). As for the response to throttle in altitude hold mode, I already filed a bug for that: #3824 The problem is (at least in my case) that leaving the throttle steady appears to engage altitude hold, but moving it a little bit causes the FC to switch (for a moment, perhaps 1 second or so) back to direct throttle input, which may be quite a sudden and surprising change. All the DJI-style and Hubsan-style drones use the throttle as a derivative of altitude while in altitude hold mode, i.e., centering it means a derivative equal to 0 (keep the same altitude) and minimum or maximum throttle yield the maximum rate of descent or climb, respectively. This makes the throttle response of Betaflight in altitude hold mode somewhat counter-intuitive. (Admittedly, centering the throttle wouldn't be easy on a common transmitter, because it doesn't have a spring-loaded throttle stick. So one may need to configure a switch to center it and/or create a large dead zone activated by a switch. Both should be easy to set up in Deviation (which I use) or OpenTX.) |
I'm interested to see how the range finder support coming in 3.3 works in relation to this issue. I've got an indoor area with a tether to safely test behaviour. The lightweight lidar modules are supposed to be very reliable and I've got bluetooth MSP to track the sensor in flight. I'll run some tests this weekend and report back. |
This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week. |
Automatically closing as inactive. |
@noviuk I've tested the recommended settings on 3 different builds and I can confirm that the following indeed works without strong oscillations:
However, baro hold is still next to unusable in Betaflight due to #3824. Basically there are severe issues with the throttle channel interpretation that make the baro hold cruising experience painful. There seems to be a large deadband around the throttle position at the moment the baro hold gets activated and moving the throttle outside the deadband instantly sets throttle to that particular position (instead of something relative to the automatic stable hold position). And that in turn only lasts for a short while; the baro control over throttle resumes after a few seconds. This means that the baro hold works, to a limited extent, but there's simply no way to use it for climbing or descending in a graceful semi-automated way. To get at least stable baro hold cruising without the need to worry about moving the throttle while applying yaw, I set up a switch that blocks my throttle at exactly 50%, regardless the stick position. I assumed that the baro hold would eventually kick in once it gets activated, but it only really worked on one of the 3 builds while the other ones ended up with throttle positions so surprising that I had to deactivate the mode quickly. All in all, it would be nice if the baro hold had more of a DJI-style or Hubsan-style behavior. |
An ancient bug about altitude hold throttle oscillations has been closed, but it looks like the problem still persists. At least I'm seeing it on this aircraft running yesterday's master. Switching to baro mode causes fast throttle oscillations (~2Hz I'd say) that tend to be severe enough to activate my battery alarm even with an almost full battery. Should I try to increase
d_alt
or decreasep_alt
? The (default) settings that I'm using at the moment:I hypothesized that the sound of the propellers could resonate with the barometer and throttle changes could feed back into the control loop, but surrounding the barometer with a thick layer of foam doesn't help; I'm still getting throttle oscillations so strong that the altitude hold mode is basically unusable. Tuning recommendations would be very helpful. (And maybe some of them should become defaults.)
(I'd be very interested to try how iNav handles altitude hold, but my attempts to run it haven't progressed much thus far.)
The text was updated successfully, but these errors were encountered: