I'm trying to design a closed-loop guidance system for rockets - something that can be implemented in Kerbal Space Program, for example. To do this, I'm following the design process described in Ashish Tewari's Advanced Control of Aircraft, Spacecraft and Rockets. His approach breaks the system up into a guidance controller for trajectory tracking and 3 attitude controllers for pitch/roll/yaw control:
The controllers are designed with a state space approach. The attitude controllers send gimbal angle commands to the engine to maintain attitude control (zero angle-of-attack), while the guidance controller also has a feedthrough term to make trajectory corrections in order to follow a preset nominal trajectory .
He then demonstrates how to tune each of the controllers individually using LQR, but leaves integrating them as an exercise to the reader.
As a first step, I tried implementing the guidance and pitch controllers individually in Simulink, then combining them as prescribed. However, while the individual performance is very good (as expected), their combined performance is abysmal (see below image). The pitch and guidance controllers' commanded gimbal angles start 'fighting' each other immediately, saturating the gimbal actuator and resulting in zero control over either the trajectory or angle of attack.
With all that said, my questions are:
- Is there a fundamental error with this controller architecture, or is the poor performance I'm getting resolvable with a better controller tuning?** My theory is that the main issue here is that both the guidance and pitch controllers directly feed commands to the gimbal actuator; in other examples of hierarchical control systems, the outer 'guidance loop' only seems to set the setpoint for the inner 'actuator loop' to follow.
- Could this also be a consequence of tuning the controllers individually, then combining them, as opposed to the other way round?** In a controls problem where the linearized system comprises multiple sets of weakly coupled dynamics, can the controllers really be tuned individually with LQR, or do we still need to consider the full system when performing LQR?