Hello guys, I´m having trouble designing a controller for my 6dof aircraft
I have linearized the equations of motion of a F16 aircraft obtaining the matrices A,B,C,D of the state-space representation and decoupled into longitudinal and lateral-directional . After this I designed the inner loop with a LQR in order to stabilize it. The figure shows the AoA going back to its trimmed state after a perturbation.
The next step I want to achieve is to command the aircraft to change its state into desired values. For instance, I want its velocity to increase from 504ft/s to 550ft/s. This is done by adding an outer loop plus a PID controller.
BTW, the state vector is x=[Vt,alpha,theta,q,northward displacement, altitude]
and the control vetor u=[throttle, elevator]
Everything until now works perfectly. However, the problem comes now when I try to control another state. Let's say I want its velocity to go from 504 to 550 and the angle of attack from 0.049rad to 0.07rad. After adding another command everything goes to hell, no command is followed.
To sum up, when I give the system 1 command, it follows the command perfectly but when given 2 commands, the simulation doesn't work.
I want to ask how can I solve this problem and if there's another way of designing a controller for the aircraft.
Thank you in advance.