-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Inav 8.0 RC3 Airplane bumpiness #10536
Comments
Try adjusting the following settings which may be affected by changes in 8.0: set See also #9471. |
Okay. I'll try to check in a week, weather permitting. |
It would be nice to add this description when switching from previous versions to the new one. |
Are these universal settings or do have to select the settings for each aircraft yourself? |
Yes, it seems to have been missed and should be added, probably to the Important Changes section @mmosca.
Hard to say. I've used the same settings as yourself for PID on a conventional plane and flying wing and not really noticed any pitch instability. I also increased |
Before we merge the changes in #10541 I would really like to see a blackbox log of that flight. I am hesitant to change the altitude PIDs too low as usually no one tunes them afterwards and too soft values can result in issues with WP missions or Autoland. |
The current altitude PIDS are for altitude control based on position though whereas the altitude control in 8.0 is now based on vertical velocity instead. It uses the same PID controller but with velocity error rather than position error. The basic PID tuning factors: inav/src/main/navigation/navigation.c Line 4961 in 4389286
were corrected to take account of this by changing them from 10 to 100. This is based on the technical difference in required values that falls out from switching from position to velocity and also on what seemed to work from testing. The basic tuning factors weren't fine tuned any further. So it's likely the current default PIDs could be better tuned compared to previously. Reducing P fits in with what @Jetrell found from testing and others so it shouldn't be too much of an issue. It would be useful if @kasatka60 could test with lower P values to see if it helps fix the issue in this case confirming this is what's wrong. Is the Dolphin a bit pitch sensitive, seems to be the plane that others have had issues with ? |
Inav 7.1.2 |
Alright guys in this case lets see the blackbox and @kasatka60 ideally you fly with current values one more time, then with the changed values as breadoven said. Just to 100% exclude any PIDFF tuning issue. Its the fast oscillation in your clip above that throws be off a bit. Especially as no one else noted that issue so far. If the new defaults for vertical velocity pids work well and don't lack of precision (it would be bad if we have a 5m altitude error that takes 1km to correct), I am fine. I wish I had known about the necessary default changes to do more focus testing beforehand. |
@kasatka60 Just inquiring. Did this value
@b14ckyy Lets not loose track of the fact this controller operates on a different method.. No need for the sarcasm. Its disrespectful towards @breadoven's work. |
Sorry it was not meant to be sarcastic. Just somewhat exaggerated. I understand that the method needs new values. I just want to mess these defaults up based on a plane that is completely out of tune elsewhere and make it worse for everyone else. I am all in for good values but they should be flown and tested on at least well autotuned planes. Then we can still tweak them somewhat conservative from there. But they should not cover up a completely messed setup. |
Values obtained as a result of autotune. |
Thanks @kasatka60 Being that autotune can set such a drastic difference in feedforward and likely rates too, on the same model, is interesting to see. That would mean any small oscillations from over tune of the |
Mate you are interpreting too much into here. I am talking about the Setup of the poster that apparently has a completely out of tune setup. Such a case should not be the reference. So my question here is, if not answered already. Have all your tests in the last 12 months been stable and precise on the current defaults or did you have to reduce them to values close to here: #10541 ? The main reason why I wanna know that is, because for years we set The bigger problem is also, that everyone who Upgrades from 7.1 with a diff, will keep the values from the old preset, even if you change the firmware defaults. As a result, imho this parameter should have been renamed to PS: I skipped through the video posted above. I can't tell for sure what FM was active most of the time but I see possibly a lot of flying in Angle mode and a swinging pitch axis. So after pitch changes the plane waves up and down a few times and then settles. This is an indicator of a overtuned FF. Can only say for sure with the logs. I had that phenomenon myself especially on my Dart250 since a speed stall due to angle of attack from strong pitch authority can sometimes be unnoticed on a swept forward. So the control output is high but the actual resulting pitch rate stays low in that stall situation. This tunes rates too low and FF too high resulting in what we see. |
Fair enough.. I just figured you would have read about it all. There is plenty of conversation between breadoven and myself in that PR.. But you must not have. No problems then 👍
Many things changed over the year, as we become more aware of possible causes. That was why its merge was held off for so long. |
@mmosca OK mate I think based on Jetrells report and based on the fact that I also had no issues in my tests with the Configurator preset values of 25 and 35 (the new default would be in the middle) on 5 different planes, I think we can merge the default value change in #10541 I will also remove that value from the presets in configurator. We should add a Upgrade note to the release notes that in case of Oscillation issues, the pilot should reduce that value. Alternatively we rename it as mentioned above? |
You're right that adding new And don't forget that if you add I don't think this is too big an issue so long as people are aware the PID settings might need adjusting if copied across from a previous version. |
Fair enough. In the end only No-Tail Planes are 5 points above firmware default after the change and I guess in most cases it won't even be a problem if the plane is overall tuned well. Planes with tail are 5 points below FW default. I edit the preset, add a note to the release notes and we are good to go. And for the @kasatka60: When you fly your dolphin again to create a blackbox log, reduce the FF value for pitch to 160 (just a guess on my end based on past experiences) for the second flight and see if its better. We can then compare the logs with your current values and with reduced FF to see if the tune gets better. |
I spent most of my time flying on cruis mode. |
Good to know, so the bumpiness shown above was just occasionally then? Probably after a "harsh" correction? |
I haven't adjusted anything yet. I transferred the diff settings. |
I ordered a memory card. I'll try flying in rain and snow and write down the logs. Just don't swear. |
OK so reducing P to 30 doesn't fix the issue. Also I assume the 3rd test was using a I did notice though that you have fw_d_pitch = 5 whereas I have it always set to the default of 0. Don't know if this makes much of a difference. You'd think it might help damp the oscillation but maybe not, D seems a little unpredictable sometimes. And a value for FF of 160 still seems a little high perhaps. The defaults are 70 for a wing without a tail and only 50 for the general setting. |
I'll try to flash the firmware again and set it up again. After all, others fly fine, but I'm the only one with glitches. |
Maybe I'm not using autotune correctly? |
I tested the mini talon on default settings, so far it flies stably. I haven't done autotune yet. |
I haven't noticed any problems at high speed on other planes, but I'll try to double check. |
Gusty wind. |
@lowknifedge Can you check my PID settings? |
I'm still getting this issue too on my Crosswind Mini. Acro fine - Nav modes have violent pitch oscilation. My settings are: Pitch rate 100 nav_fw_pos_z_p = 30 I've attached a log from my most recent flight. |
Here's a flight video: |
Additional info to @CrunkleFloop's flight: |
You need to reduce Can you also post a Diff so other settings can be checked. Can't help but think there's too much pitch/throttle coupling with these twin motor planes which is part of the problem, i.e. |
I have doubts about that. Due to throttle smoothing, in his log. the throttle just changes by about +/-5% during the oscillations. I saw you have a PR open with a potential fix. Can we test that or is there still stuff to do? |
The output to the motor goes from 57% to 86% during the oscillations from the log. Although it is pitching almost +-20 degs so maybe this is to be expected. I take it this is a twin motor plane ? It's odd how this pitching issue affects some planes and not others especially so with this plane given it's a conventional T tail. The PR can be tested. Should be able to use the last run output https://github.com/iNavFlight/inav/actions/runs/12679674437/artifacts/2404155623 It's mainly setting changes, adjustment has been added for |
Thanks for looking into. I'll drop nav_fw_pos_z_d to 3. Yes control smoothness was set at 2 so I'll increase that to 5. I should add that my DVR footage is through a gimbal so there's an element of damping in the footage which is why it looks a little odd. Diff all attached |
Yes it's a big twin, 1600mm and weighing about 2.8kg AUW |
Thinking about it again there may be issues on twin motor planes possibly because they fly faster. I noticed that there is no https://github.com/iNavFlight/inav/blob/master/docs/INAV_Wing_Tuning_Masterclass.pdf The description in the settings is plain confusing but I use values of 20 to 40. You also might need to set |
@breadoven Fixedwing uses PID throttle attenuation and boost, either side of the breakpoint. @CrunkleFloop Its noticeable from the log, that its producing considerable vibrations. Which is normal to a degree for twins over singles.. And yours being 8 or 9" props at a guess, is more expected.. But the vibrations seen by the (nav)acc and the gyro, for props that size, appear to be at least second order, from the frequency they are appearing at.. And are inducing considerable harmonics on the accelerometer.. More than I see on many 7" copters. Also, because the H743 now uses HAL for SDIO card logging. It should be able to handle debugging.. Before your next flight, can you set |
Funny you should mention that as I was noticing the Jello in the footage which it's never done before. The props were balanced (on a Du-Bro balancer) a while ago so I'll re-check them as something has certainly changed. |
OK that Wiki properly describes how the tpa settings work. Not entirely sure boosting the PIDS below the breakpoint would benefit things in this case but it doesn't affect the planes I've tested that have breakpoints of 1400 and I think the main issue here is simply the D term. Not entirely sure why it seems to be so much more sensitive using velocity rather than position other than velocity, and therefore the error, fluctuates much more rapidly than position . I'm thinking that it makes sense to increase the D term correction factor from 200 to 300 and also increase the default D term setting accordingly for #10541, back to the previous default of 10 which would give an equivalent setting of around 3 with the 8.0 RC3 build. At least that will give reasonable headroom for useful adjustment. |
@kasatka60 If you test again using 8.0 RC4 can you do it using 7.1.2 settings. It would be useful to check that this issue is fixed for anyone copying across a 7.1.2 Diff to 8.0. |
So, here are three (log #3) is corrupted logs from today. LOG00009.TXT - diff all from 7.1.2 |
I looked at log 9 and 10 so far and that looks great already. on log 10 during loiter it holds altitude with less than 1m error. And that was before the re-tune. Edit: Log 12 also looks very solid. would be nice to have the DVR as well if you have. But from the log i just see very small fluctuations that seem to be air current changes. |
@breadoven I'll try this weekend if the weather doesn't get worse. |
The last logs for 8.0 RC4 look pretty good. No obvious instability and the altitude drift looks pretty limited also, possibly even better than before using position although that did depend on how well tuned it was. Still think this can be improved further with improvements to the estimated vertical velocity and better filtering to reduce overcontrol in response to rapid vertical velocity changes. But that can be for a later release. |
Here are logs from this morning's flight on RC4 using a 7.1.2 Diff all. Much much better however it still goes into oscillation at higher throttle so I'm guessing TPA still required here. Still seems to have vibration despite balanced props so I need to look further into that. Interestingly the flight behaviour after the oscillation was very unsettling and unstable, it may be that the battery shifted during the roller-coaster section of the flight though. I'm currently making a new arrangement to hold the battery firmly in place in all flying styles. https://drive.google.com/file/d/1nNUap7gjIcSJQDwsJSj8VYyeHb4cPvQp/view?usp=sharing |
Wow thanks for the detailed explanation Marc, you're very clever at all this stuff! I'm trying to learn it as I go. |
Based on your tune I suggest to reduce FF on pitch down to 110, that should be fine. for TPA try a Breakpoint Throttle value of 1600 as you have a high cruise throttle value and a TPA value of 50%, You can then go either higher in 10% steps if it still oscillates or lower of it does not oscillate or feels over-aggressive at low throttle. |
Went out again, much much better, still oscillates at higher airspeed but nothing like before. I'll bump up the TPA value to 60% https://drive.google.com/file/d/1I5KzqUy9grIV_kHIpO7cSaZhxxhFAOid/view?usp=sharing |
Can you for another flight please reduce the log rate to 25%? regarding your tune. From the start it looks much better. Setpoint and gyro are on track very very close. At high speed its still quite a bit off. I would suggest to go directly to 70% TPA. Edit: btw fly also in acro a bit with just a few pitch and roll maneuvers at different speeds. @breadoven although the last log is a bit harder to read due to the damage, I think the new velocity based altitude controller can't handle high speeds very well. After his autotune it was also much better with the setpoint/gyro tracking even with the 50% TPA but still starts to oscillate. Nothing that can't be tuned out but maybe something to consider in the future as higher speeds also result in higher vertical speed on the same AoA change. |
Thanks for your help. No idea why looptime was set to 500, I've now set it to 1,000 and dropped logging rate to 25% TPA set at 70 now. On to the next flight! |
my concern is just that even after the H7 and F765 SD card fixes, 1000Hz logging rate is right on the edge and might not work with some or many SD cards. 500Hz should be more reliable but now you have 250Hz that should be just fine on any card. And is sufficient for what we want to analyze. |
Copied the settings (diff all) from inav 7.1.2 and pasted them into inav 8.0 RC3.
In navigation modes the plane flies unstably.
https://youtu.be/n69w9CDaM8Q
(OSD is a little out of sync)
There is no SD card on board.
Maybe I configured something incorrectly when transferring the settings?
INAV_7.1.2_cli_DOLPHIN_20241215_124916.txt
INAV_8.0.0_cli_DOLPHIN_20241215_150820.txt
The text was updated successfully, but these errors were encountered: