Fixed wing attitude controller on Simulink

I was trying to implement the attitude controller of the px4 on Simulink and I ran into some problems. we modeled most of the controller except the mix and servo parts

that what we have done so far

does anyone have any idea how to integrate it into the Simulink model?
thanks in advance

1 Like

I have encountered the same problem and looking for a solution as well

1 Like

That part is called “control allocation” aka in terms of PX4 firmware “mixing”. You can just pass it if you only want to simulate in Simulink just for academic purposes. In that case you can assume that $\dot{omega}_{sp}^{b}=u$.

In theory, that part is only a mapping between control algorithm and the actuators. In the ideal case is just a matrix However when there are constraints in the actuators, some optimization techniques are used. See for instance:


thanks a lot for the clarification