Extreme and fast Pitch oscillations in AUTO mode

Hello!

I have built an X8 flying wing plane and I am in the process of tunning it. It flies perfectly in manual mode , in circle mode and in RTL mode. In FBWA mode it is quite sluggish but still flyable.

The main problem I have is the Auto mode. If flies the missions without too many issues, except that sometimes in any wind conditions, the APM makes the plane pitch up and down alternatively. The up and down pitch oscillations are gentle at first but they start to increase getting finally very strong pich oscillations. When this pitch oscillations occur, the plane maintains its height.

The behaviour of the plane with this strong pitch oscillations is similar to the flutter when planes fly too fast but in this case I am sure it is not a flutter problem because I have strong linkages and I also have reinforced the wings. Morover, this problem happens at not very high speeds.

I think that the problem happens usually right before getting a waypoint. When this problem happens I have usually to cancel the AUTO plane mode because it overstresses the frame a lot. This problem has never happened to me in RTL mode, but I haven´t tried RTL too many times. I forgot to say that I don´t have an airpseed sensor installed.

I have tried increasing and decreasing all the PIDs without being able to solve the problem. I don´t really know if it is a PID problem, because it seems strange to me that the plane in FBWA mode is a lot more sluggish turning than in AUTO mode. In AUTO mode the turning bank angles are quite more aggresive.

I have attached a log and tlog for an example flight where this problem happened.

Thanks in advance!

Its it an APM2.6? Are you using the external 3DR Compass and GPS module?

Your LIM_PITCH_MAX value is 1494. So your limiting how much pitch up you can do to about 15 degrees. Not a big deal - the default is 2000 so its only a 5 degree difference. I’m just looking for reasons.

Just noticed your WP_RADIUS is 15. That’s a VERY tight turn for an X8.

I’ll have another look in the morning.

Thanks, Grant.

I’m convinced there is a bug with the ELEVON_MIXING mode that causes this behavior. I had this problem for weeks, and it finally vanished when I switched to ELEVON_OUTPUT. Since the devs have explicitly marked ELEVON_MIXING as deprecated as of 3.3, it should not surprise anyone if serious bugs are creeping into this mode, and lingering.

With some pretty thorough digging, I found a number of other cases of this on DIYDrones and the APM Forums:

diydrones.com/forum/topics/probl … e=activity
viewtopic.php?f=44&t=11572

Everyone else that I found who is complaining about the issue is running ELEVON_MIXING. (Even if they did not explicitly mention this, you can see it in their log files or param files).

I know reconfiguring the radio and trims is a hassle, but it’s worth a shot. If you try it, let us know how it turns out.

(I can’t help you with the sluggishness yet in FBWA yet; I’m still tackling that myself!)

Hello again!

First, thanks a lot for your replies. I have been doing some test changing a lot of parameters.

The first change i did was to increase the RLL2SRV_P gain and the PTCH2SRV_P gain. The values I had were obtained from an AUTOTUNE flight beginning with P gains of 0.8. The AUTOTUNE flight changed me the _I and the _D settings, but it almost didn´t change the _P values. I have now increased the PTCH2SRV_P and the RLL2SRV_D to 1.2.

I have also disabled ELEVON_MIXING and trimmed again. I also changed my WP_RADIUS to 30, and my max pitch to 2000.

I was getting some “Bad compass health” erros, so I changed my GPS and compass for a new one. Both were UBLOX-M8N (non 3DR), but the flight control is a 3DR.

With all that changes done, and then I did another AUTOTUNE flight. The response of the plane in FBW modes has improved a lot, so now the plane is not slugish in this modes. In this modes the plane very well.

After that AUTOTUNE flight, I did another AUTO mission and the oscillations happened again. I have been analyzing my LOGs and I have seen the problem occurs always before reaching a waypoint when fliying against the wind. I have not installed an air speed sensor and from the logs I have seen that when the pitch begins to oscillate hard, the airspeed estimation is allways very low (below 4 m/s). This estimation is logically wrong, but with that aispeed the plane shoud increase the throttle instead of shaking the ailerons hard.

I really don´t know how to correct that. I am thinking on disabling the STALL_PREVENTION, but i don´t think it will solve the problem.

I attach another LOG and PARAM files with all the changes than where the problem of pitch oscillations persists. I had splitted the file in two winrar files because of the limit size of the forum.

I’m disappointed my suggestion did not help, but I appreciate you trying it. I hope I do not re encounter the pitch oscillation problem myself!

Hi nachodcn. You still haven’t answered my original questions.

I really need the dataflash log (.bin) from one of your flights (the second one ideally). I have attached a graph showing what I believe is the problem during your flight.

Thanks, Grant.

Hello again!

As gmorph suggests, there was a lot of difference between the real pitch and the commanded pitch. I thinked this problem could be due to a false airspeed estimation of APM, because when the problem happened, the estimated airspeeds were always too low and not real.

For this reason, I decided to install an airspeed sensor, and the pitch oscillations disappeared. I also increased my P gains and increased LIM_PITCH_MAX to 2000.

The problem now is that my plane was flying perfectly on its first mission with the airspeed installed, but when doing a turn it almost hit the ground. The flying airpseed was fixed for the mission at 15 m/s which I think it is more than enough for the X8 wing, and the first turns were very nice. But suddenly, when doing another turn similar to the others, the plane started to loose height from 100 meters to about 25 meters until I switched to MANUAL mode and recovered the plane before a high speed crashing. It wasn´t a stall problem because the plane is capable of turning much slowly than the programmed speed.

Now I am in a dead end point because I don´t have any idea of what could have caused this problem. The wind speed was only about 4 m/s from the south, and I can´t find any reason for this problem. I attach the LOG and the BIN files of this flight.

Any help would be much appreciated.

Thanks a lot!

I can see the problem occurring but I can’t figure out why. The logs aren’t complete. For instance when I extract the parameters from the logs a bunch of parameters are missing. I can only see 255 parameters. In your previous logs I could see 359 parameters. Note this applies to both your dataflash log and your tlog. They both exhibit the same behaviour. You might want to do a full parameter reset from MissionPlanner just to ensure everything is setup correctly.

Do you have an analogue or digital airspeed sensor? The Digital ones are far superior.

I’ve attached a graph which shows the altitude decreasing in the dive. You can also see the AltErr increasing during the dive which means the autopilot knows the altitude is going wrong. In the graph the NavRoll and NavPitch are what the autopilot calculates should be done and then the Roll and Pitch are what it actually does.

I think your pitch isn’t tuned properly if I had to guess. Its not very smooth and “flaps” a lot perhaps your PTCH2SRV_D is too high at 0.0762? Again I would strongly recommend an autotune.

Sorry I couldn’t be more help.

Thanks, Grant.

First of all, thanks for your help.

I don´t understand why you only see 255 parameters. I attach my param file which has 359 parameters. This param file has the same parameters of the flight which almost crashed, except the PIDs. This PIDs have been obtained after an AUTOTUNE flight. I have done several Autotune flights, but I decided to do another one. In FBW or LOITER modes the plane seems to fly well. The problem is with the AUTO missions.

I am thinking on rising the MIXING_GAIN parameter from 0.6 to 1.0 to try something different but I am not sure if this would be safe.

My Airspeed is Analog as I understand it is the only kind which works with APM 2.6.

Thanks a lot!

Digital airspeed sensors DO work with the APM 2.6. The Digital airspeed sensors are an I2C device and the APM2.6 has I2C - its the port the external compass plugs into. You will need an expander board to plug in both the compass and digital airspeed sensor.
If you read anywhere in any of the official documentation that it says they don’t work let me know and I’ll update it immediately.

You have increased the pitch limits quite a lot doubling the Pitch Max from the default:
Default Your Value
LIM_PITCH_MAX 2000.0000 4000.0000
LIM_PITCH_MIN -2500.0000 -3500.0000

Can you please change your LOG_BITMASK to 65535 so we get ALL the logging information. This is going to fill your APM2 log space much faster so if you have an issue in the air it would be ideal to land immediately and quickly pull the dataflash logs off.

Note your PID values in the parameter file are exactly the same as the previous flight log file which almost crashed. If your expecting them to have changed because you did an autotune flight they aren’t. You might want to double check how to do the autotune to ensure the parameters are being updated correctly.

Thanks, Grant.

Hello!

I have always thought that the I2C Splitter only worked for PIxhawk. In fact, in the official store the splitter only talks about Pixhawk. store.3drobotics.com/products/p … c-splitter Thas is the reason because I installed an analog wind speed sensor.

I have attached a PARAM file slightly different from the one I was using when the plane almost crashed. I attach now the exact PARAM file I was using in that flight. The parameters I posted a few days ago are almost the same as the flight which almost crashed except I have changed LIM_PITCH and I have decreased the RLLSRV_D parameter. In the flight where the plane almost crashed, the LIM_PITCH_MIN and LIM_PITCH_MAX were -3000 and 2000. I have increased this values because to get a leveled flight, my ailerons need to be about 5 milimeters up, and the LIM_PITCH_MAX was only about 1 cm up from the trim at leveled flight. I don´t know It this maximum pitch angle is the same when the plane is leveled than when the plane is turning.

I haven´t flown yet with this new parameters. The problem is that I don´t know still what caused the problem. i don´t know what I did wrong with the AUTOTUNE. I have done several Autotune flights with success. I´ll check that.

Thanks a lot