5.3.1 PD+Nonlinear Compensation Controller Tuning

Initial testing of the PD plus nonlinear compensation controller produced some unexpected results. Figure 5-16 demonstrates the vehicle tracking a single axis sinusoidal yaw trajectory first using the quaternion based PD controller. After about 35 seconds, the nonlinear controller is activated. At this point, the controller is supposed to compute the torque necessary to more accurately track the desired trajectory. However, as soon as the nonlinear controller is activated the vehicle performance is actually degraded, and the controller commands moment levels about 10 to 30 times larger than those that can be provided by the thruster system. The large and rapidly varying commanded moments worsen tracking errors, as well as consuming large amounts of electrical power, and producing significant wear on the thruster mechanical and electrical systems. This performance is clearly not acceptable.

Figure 5-16 Sinusoidal yaw trajectory tracking results for PD, and PD+NL (after 535 sec) ( =68, =1)

In an attempt to isolate and understand the source of these errors, these results were compared with the results of the same test performed on the hardware in the loop simulator. The same trajectory, controllers, and gains were used, and correspond to the results previously discussed in Subsection 4.7.3 which is repeated again in Figure 5-17 for convenience. Note that the simulated results of the PD controller correlate very well with the results of the actual vehicle performance. Both the simulated and actual vehicles exhibit a maximum error of approximately 6° while tracking the sinusoidal yaw trajectory with the quaternion based PD controller. Thus the model used in the simulator produces quite accurate predictions of PD controller performance.

Figure 5-17 Simulated sinusoidal yaw trajectory tracking results for PD, and PD+NL (after 2726 sec) ( =68, =1)

Once the nonlinear compensation portion of the controller is activated, the behavior of the simulation is very different than that of the actual vehicle. Although the commanded moment does initially jump to a very large value, it quickly falls off to levels similar to those required for tracking the specified trajectory with the PD controller, while the tracking errors are effectively reduced to zero.
One of the most significant differences between the Ranger NBV simulation and the actual vehicle is that in simulation, the estimated attitude corresponds exactly to the actual attitude of the vehicle. In reality, sensor noise, bias, and accelerations cause inaccuracies in the estimated attitude. One source of these commands is the propagation of sensor noise through the nonlinear component of the controller.
In an attempt to reproduce these results in simulation, simulated sensor noise was introduced to the simulator. The noise levels corresponded to those observed in the vehicle state estimate: approximately ±.02° for attitude estimate, and ±.05 rad/sec for angular velocity.

Figure 5-18 Simulated sinusoidal yaw trajectory tracking results for PD and PD+NL (after 1065 sec). Simulation includes simulated sensor noise. ( =68, =1)

With estimation inaccuracies caused by sensor noise added to the simulation, the moment commanded by the nonlinear controller now begins to exhibit some of the saturation and high frequency behaviors observed on the actual vehicle. The angular error does increase slightly as compared to the PD+NL simulation with no noise, but it does not increase to the level observed in actual flight data.
One possible explanation for this discrepancy is the frequency content of the commanded moment. The high frequency component is substantially beyond the bandwidth of the propellers in the thruster system. In other words, the commanded moment changes magnitude and direction much more rapidly than the thruster system can follow. The thrusters thus can not physically generate the commanded torque output, and larger tracking errors result. While the vehicle simulation does model thruster saturation, the thrusters are modeled as having infinite bandwidth, and hence the simulated performance is significantly better than that observed in the experiments.
The control algorithm presented in Section 4.4.2 does not include the dynamics of the thruster system. It assumes, like the simulation, that the actual vehicle thrusters have infinite bandwidth. To improve vehicle performance thus requires modifying the control algorithm to incorporate thruster dynamics, and/or significantly attenuating the impact of noise and torques commanded by the nonlinear controller. Since a major modification of the controller is beyond the scope of this thesis, the approach taken is to reduce the effect of the sensor noise on the commanded moment.
One approach is to reduce the noise introduced to the system by increasing the level of digital filtering applied to the noisy sensor input. Although it seems that this method would improve performance, such a high level of filtering is required to reduce the effect of the noise that the phase lag introduced by the filtering begins to increase angular error beyond the original unfiltered level.

Figure 5-19 Simulated sinusoidal yaw trajectory tracking results for PD and PD+NL (after 2165 sec). Simulation includes simulated sensor noise with digital filtering. ( =68, =1)

Since the tracking error was not reduced by simple filtering, the next step was to gain a better understanding of the source of the large saturated thrust commands. To accomplish this, the various portions of the nonlinear controller were studied to determine which were most effected by sensor noise. Examination of signals within the controller revealed that most of the noise sensitivity in the controller was introduced in the formation of .


or more specifically from the term

.


This makes sense after consideration of the method employed for formulation of . This value describes the rate of change of the estimated attitude error. This change is calculated by taking the first derivative of the estimated attitude using (4.9) in combination with the estimate of the angular velocity. Both of these signals contain noise from the accelerometer triad, the magnetometer triad, and the angular rate sensor triad. On top of this, the resulting derivative is then multiplied by the gain factor which is typically between about 15 and 80. (Figure 5-5)
In view of this, another possible way to reduce the effect of the sensor noise on the nonlinear controller is to reduce . This should in turn reduce the effect of the noise in . This approach was tested on Ranger NBV. The results are shown in Figure 5-20. Unfortunately, this also reduces the proportional gain of the system thus increasing attitude errors.

Figure 5-20 Effects of reducing while tracking a sinusoidal yaw trajectory with a PD+NL controller. The value of is progressively reduced from t = 1515 to t = 2125. (minimum angular error observed at =18, =1)

Note that as is reduced, the effect of the noise in on the commanded moment is also reduced, and is initially accompanied by a reduction of tracking error. Decreasing to a level such that the commanded moments show minimal effect of noise, increases tracking errors due to the decrease in effective proportional gain. The smallest tracking error was observed when had been reduced to about 18 ( =1). Even at this level however, the average tracking error was 5.9° with peaks of about 10°. Additionally, the desired moment is still about 10 times the levels attainable by the thruster system.
Thus while reduction of does reduce the effect of noise in the nonlinear controller, when is decreased to a level at which the noise no longer significantly perturbs the commanded moment, the effective proportional gain is so low that tracking errors increase. An additional possibility suggested by these observations is to reduce the value of only where it is associated with in the nonlinear portion of the controller. This approach allows reduction of the noise produced by this term while still allowing high proportional gain for tight tracking.
The equation for was thus modified as follows.


(5.2)

The constant scales the gain only within the formulation of in the nonlinear feedforward dynamics. Note that here is a constant, not the time varying from (5.1).
With this modification, the same desired trajectory was run again on the actual vehicle starting with the gains that produced the lowest tracking errors from Figure 5-20. The results with = 100 are shown below.

Figure 5-21 Sinusoidal yaw trajectory tracking results for PD and PD+NL (after 1251 sec) using G to reduce noise sensitivity along with tuned lower gains for the nonlinear controller from Figure 5-21 ( =18, =1)

With the modification of the nonlinear control algorithm as shown in (5.2), the tracking error is reduced to 1.8° with a maximum error of 3.5° This performance is better than the optimally tuned PD controller from Figure 5-16. The best PD tracking performance for this same trajectory yielded a 4.1° average tracking error with a maximum error of 6.8°.
drastically reduces the effects of high frequency sensor noise in the moment commanded by the nonlinear controller. Sensor noise, can cause extreme errors in the calculation of . provides a mechanism for effectively trading between errors due to sensor noise and controller inaccuracy.
Not only does reduce the magnitude of the tracking error, but since the high frequency component is no longer evident in the desired moment, the high frequency perturbations caused by the large and rapidly varying thrust commands are essentially eliminated. The thruster motion is now much smoother requiring less electrical power consumption, and producing less wear on the thruster mechanical and electrical hardware.
The nonlinear feedforward dynamics testing described in the remainder of this chapter all use =100 in the formulation of .