## 6 The Controller Design
### The Allocator Design  
The inner-loop controller was designed based on the mature dynamic inverse control law, while the control actuators of the STOVL are abundant. A control allocator is necessary for such a system. This work constructed the control allocator based on the control efficiency. In the low-speed modes, the pitch control moment is generated by the differential speed of the lift fan and the main ducted fan, the roll control moment is given by the differential flow of the two side nozzles, and the yaw control moment is provided by the deflection angle of the thrust vector nozzle. In cruise mode, all the control moments are generated by the aerodynamic control surfaces. These two modes have in common that the command of state variables can be converted to a single actuator of the vehicle in each channel. However, the aerodynamic and the thrust vector control efficiencies vary significantly in the transition modes between them. Single control actuator control will not ensure a consistent stability performance. Thus, the aerodynamic forces and thrust vectors are used together. This brings about the control redundancy, thus requiring a special design of the control allocator. Given that the aerodynamic control surfaces have better reliability, dynamic behavior, and lower energy consumption, the aerodynamic control is prior to the thrust vector control, and the insufficient control efficiency is compensated by the propulsion system. Based on the control efficiency at different dynamic pressures, the virtual control inputs are introduced in the pitch, yaw, and roll channels, combining the aerodynamic actuator commands and the propulsion system commands. This work adopted a frequency-domain-based control efficiency allocation criterion. This method applies a low-pass filter to allocate the low-frequency signals to the aerodynamic control surfaces, and the high-frequency parts are compensated by the propulsion system for attitude adjustment. Then, with the accessible angular acceleration of the actuators and the desired angular rate acceleration, a serial-parallel allocation strategy was designed by the aerodynamic surfaces prior principle, as shown in Figure 20. Therefore, the desired low-frequency angular acceleration treated the aerodynamic control surfaces as the main actuators and the propulsion system as the auxiliary one, which was only activated when the aerodynamic surfaces were saturated. The high-frequency angular acceleration commands were allocated to the remaining aerodynamic control surfaces and the propulsion system based on the control efficiency. Figure 20: Control allocation logic. Take the pitch channel as an example. If the required low-frequency command is less than the maximum elevator efficiency, the low-frequency part is provided by the elevator absolutely, and the high-frequency part is shared by the thrust vector nozzle and elevator parallelly. If the required low-frequency part exceeds the aerodynamic efficiency, the oversized part is compensated by the thrust vector, and the high-frequency part relies on the thrust vector control only. \[\left\{ \begin{array}{l}\delta_{e}=\frac{\hat{q}_{xx}}{M_{\hat{q}_{x}}}\\ n_{\theta}=\frac{\hat{q}_{xx}}{M_{\theta\theta}}\end{array} \right\{ \begin{array}[] {l}\delta_{a}=\frac{\hat{p}_{xx}}{M_{\theta\theta}}\\ n_{\phi}=\frac{\hat{p}_{xx}}{M_{\theta\theta}}\end{array} \right\}\left\{ \begin{array}{l}\delta_{r}=\frac{\hat{p}_{xx}}{M_{\theta\theta}}\\ n_{\phi}=\frac{\hat{p}_{xx}}{M_{\theta\theta}}\end{array} \right. \tag{36}\]  
In Equation (36), \(\delta_{e}\) and \(n_{\theta}\) are the elevator deflection angle and the differential speed of the lift fan and thrust vector nozzle, and \(M_{\delta_{e}}\) and \(M_{n_{\theta}}\) are the pitch channel control efficiency of each actuator. \(\delta_{a}\) and \(n_{\phi}\) are the aileron deflection angle and differential flow of the side nozzles, and \(M_{\delta_{a}}\) and \(M_{n_{a}}\) are their control efficiencies, respectively.