Failsafe in case of an FMU crash for an Airplane

Hello,

I am currently testing the 1.6.5 release of the PX4 autopilot for a fixed wing aircraft. In the normal flight mode everything works fine. When simulating a crash of the FCU the OVERRIDE flag in the PX4io is correctly set to true. Therefore the plane can be still controlled in the manual mode. When switching to the manual mode all control surfaces are controllable but the right aileron which is connected the output MAIN2.

I already tried to do some debugging but was not able to find the reason for this behaviour. The mixer loaded in the px4io driver looks good.

Setup:
PX4 Firmware version: v1.6.2
QGC Version: v3.2
Airframe: Bormatec Maja

That’s odd, does MAIN 1 respond correctly for both roll and pitch stick movements?

I’m going to give this a try with a different configuration and make sure it’s still working.

Yep, MAIN 1 responds correctly, as well as all other outputs.

For clarity can you go through the other outputs? What about flaps?

The airframe I use is the Bormatec Maja but the actual plane is an EasyGlider which has no flaps. But I will check the output tomorrow.

So in the normal mode (where the FMU is working) the outputs MAIN 1 through MAIN 5 are working properly. When I kill the FMU MAIN 1 and MAIN 3 through MAIN 5 are working.

Ok that’s fine. This is the mixer the Bormatec Maja is using. https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/mixers/AAERTWF.main.mix

I don’t have an explanation for why it’s MAIN 2, but if I counted correctly there are 9 outputs in this mixer and I’m not sure how the PX4IO handles that.

Are you able to test mixer changes? I’d be interested to know if dropping the last three makes a difference. https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/mixers/AAERTWF.main.mix#L86-L96

You could also try dropping airbrakes from each of the ailerons here. https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/mixers/AAERTWF.main.mix#L24

If there’s no change we’ll need to dive into debugging the PX4IO.

Thanks, removing the airbrakes from the ailerons was the solution.

I did some more testing by changing the index of the airbrakes input. By using a value of 4 or lower for the airbrakes the mixer still works, meaning the control surfaces are set according to the mixer and the RC input. By choosing a value of 6 or higher the problem with the right aileron

However, while testing I discovered another issue. When the FMU crashes in the stabilized mode all servos get set to their default position and cannot be controlled anymore. But if it crashes in the manual mode the servos will respond to the RC input after a crash of the FMU.

1 Like

I figured it out. In the stabilized mode the manual override is not allowed. However, this means that the plane will crash for sure if the FMU dies in the stabilized mode. By allowing the manual override the pilot could at least attempt to save the plane. I opened an issue for the activation of the manual override and one for mixer.

Hmm, I wonder how intentional that is. It seems like you’d want the servos to go to the failsafe values unless you were already in manual (then continue in manual mode). You should also be able to switch into manual mode in that state. Is the px4io capable of interpreting mode switches? I need to review the code.

Do you want to open a pull request for the mixer change? The airbrakes channel isn’t used anywhere in the controllers.

Yeah, I will open a PR for the mixer changes.

During testing and an FMU crash I was not able to switch from the stabilized to the manual mode.