Wind Preview-Based Model Predictive Control of Multi-Rotor UAVs Using LiDAR

Autonomous outdoor operations of Unmanned Aerial Vehicles (UAVs), such as quadrotors, expose the aircraft to wind gusts causing a significant reduction in their position-holding performance. This vulnerability becomes more critical during the automated docking of these vehicles to outdoor charging stations. Utilising real-time wind preview information for the gust rejection control of UAVs has become more feasible due to the advancement of remote wind sensing technology such as LiDAR. This work proposes the use of a wind-preview-based Model Predictive Controller (MPC) to utilise remote wind measurements from a LiDAR for disturbance rejection. Here a ground-based LiDAR unit is used to predict the incoming wind disturbance at the takeoff and landing site of an autonomous quadrotor UAV. This preview information is then utilised by an MPC to provide the optimal compensation over the defined horizon. Simulations were conducted with LiDAR data gathered from field tests to verify the efficacy of the proposed system and to test the robustness of the wind-preview-based control. The results show a favourable improvement in the aircraft response to wind gusts with the addition of wind preview to the MPC; An 80% improvement in its position-holding performance combined with reduced rotational rates and peak rotational angles signifying a less aggressive approach to increased performance when compared with only feedback based MPC disturbance rejection. System robustness tests demonstrated a 1.75 s or 120% margin in the gust preview’s timing or strength respectively before adverse performance impact. The addition of wind-preview to an MPC has been shown to increase the gust rejection of UAVs over standard feedback-based MPC thus enabling their precision landing onto docking stations in the presence of wind gusts.


Introduction
Unmanned Aerial Vehicles (UAVs) are being increasingly employed for autonomous operations due to their cost-effectiveness in applications such as aerial inspection, 3-D mapping, search and rescue, delivery, and precision agriculture. Their small size and use in urban environments makes them susceptible to wind gust which can cause significant deviation from their intended flight path. This poses a safety risk to the UAV and its surroundings, particularly in applications such as aerial inspection and delivery. Furthermore, the autonomous nature of their operations entails the need for accurate position control to enable the UAVs to successfully dock onto a charging station. Gust resilience is therefore a necessary requirement for the safe and reliable operations of autonomous UAVs. A powerful method to impart gust resilience to UAVs is through the development of flight control systems that can sense and compensate the disturbance by making real-time adjustments to the UAV's attitude and trajectory to ensure that it remains stable and on course.
Most research on gust rejection of UAVs tackles the problem of wind disturbance by first utilising robust model-based filters or observers to estimate the disturbance acting on the aircraft and then using a suitable feedback controller to provide the necessary compensation. Ref. [1] develops a generalised extended state observer to estimate the wind disturbance and utilise an attitude tracking backstepping controller for disturbance rejection. Refs. [2,3] model the effects of wind on the UAV's dynamics to explicitly estimate the wind velocity acting on the aircraft for disturbance rejection. Refs. [4][5][6][7] propose the use of active disturbance rejection control, where extended state observers are utilised to estimate the total disturbance acting on the aircraft followed by the adjustment of an adaptive feedback controller to reject the effects of the disturbance. Due to the utilisation of observers in all these methods, the wind disturbance needs to propagate throughout the entire system before it is sensed and compensated for. This inevitably adds a delay to the compensation which decreases the potential performance improvement. This becomes more significant for larger UAVs due to their increased actuator lag and slower aircraft dynamics. An alternative to these sole feedback-based methods is preview-based disturbance rejection. Here, future wind disturbance information is used to compute the necessary control compensation either preemptively (to account for delays) or in real-time. A suitable methodology to utilise this preview information for optimal gust rejection is Model Predictive Control (MPC).
MPC was initially widely used in the petro-chemical industry due to its ability to easily handle dynamic constraint manipulation. This allowed the operators to react to rapid changes in the marketplace while keeping the plant at the most economically optimal operating condition [8]. With its ability to easily handle multivariable control applications, MPC started gaining popularity in flight control of UAVs due to the ready access of lighter, faster, and cheaper computers to run numeric algorithms for solving its dynamic optimization problem. Most implementations of MPC in UAVs focused on guidance control [9][10][11][12], where the MPC's dynamic optimization and constraint handling allowed for optimal trajectory generation in dynamic and unknown environments. In Refs. [13,14], the MPC algorithm was leveraged to compute UAV trajectories which optimize both for system dynamics and perception objective that aims to maximize visibility of a point-of-interest to enable reliable vision-based tracking for navigation. Ref. [15] found improvements in trajectory tracking performance under wind disturbances through the use of a non-linear MPC over a linear MPC due to the inclusion of full system dynamics. Refs. [16][17][18][19] estimate the disturbances on the vehicle for offset-free tracking with the MPC. Ref. [18] uses an MPC in the position control loop of a tail-sitter Vertical-Takeoff-Landing (VTOL) UAV where wind is considered as a measurable disturbance and feedforward control is incorporated into the MPC to reject its effects. While MPC with measured disturbance feedforward can improve its gust rejection properties compared to purely feedback based methods, this can be taken a step further by using a preview of the incoming wind for its rejection. Ref. [20] developed an MPC strategy that estimates and stores the wind disturbance information of a leader quadrotor to be used as the disturbance preview for the follower quadrotor thus increasing its disturbance rejection. While this utilises the MPC's future optimization to reject the incoming disturbance, the strategy is limited to situations where past information of steady wind disturbance fields is available and hence is not suitable for the rejection of dynamic wind gusts. In this work, the incoming wind disturbance on a quadrotor UAV is estimated using remote measurements from external ground-based sensors. The remote measurements are then used to predict the future disturbance profile on the aircraft. This preview information is then utilised by an MPC for optimal disturbance rejection over its prediction horizon. The feasibility of this preview-based strategy is mainly limited by the availability of accurate preview information, the possibility for which has increased due to ongoing development of remote wind sensing instruments such as LiDAR.
LiDAR (Light Detection and Ranging) can be broadly split into two types: ranging LiDAR s which are used for surveying/mapping, and atmospheric LiDAR s which can be used to measure wind speed. The latter utilises the Doppler frequency shift of back-scattered light from airborne particles to measure the wind speed. Here in this paper, the term LiDAR is used to exclusively refer to the wind measuring subgroup of LiDAR s. Wind energy was the first major industry to make use of the remote wind sensing capability of LiDAR [21][22][23][24][25], the main idea being to utilise a forward-looking LiDAR mounted on the nacelle of the wind turbines to measure incoming wind disturbances. This preview information is then used by the turbine's blade pitch controller to effectively mitigate against gust loads, decrease turbine fatigue, and increase its power output [23][24][25][26]. The measurement range of these remote sensors also facilitates the study and modelling of air flow in complex terrains and wind farms, Refs. [27][28][29][30] developed a more comprehensive real-time estimation algorithm for dynamic spatial and temporal wind fields in statespace representations using scalar measurements of a LiDAR. This allows for the easier integration of wind field preview for control algorithms of multiple turbines in a wind farm. The use of LiDAR s for aerospace research has steadily grown due to developments in the telecommunication industry, where components such as the optical fibres have allowed for their miniaturisation and improved reliability. Refs. [31,32] investigates the feasibility of the LiDAR based feedforward flight control system to minimise gust loads in high-speed civil transport and flexible aircraft respectively. Ref. [33] looks into both active gust load alleviation control and investigates the characterisation of aircraft wake vortices using airborne LiDAR systems. While LiDAR systems have become more and more compact and portable over the years, their size and weight are still too large for onboard use in most commercial UAVs. Tethered applications of LiDAR systems have been investigated using UAVs. Ref. [34] conducted a proof-of-concept of a tethered UAV-LiDAR system in which the LiDAR unit was kept on the ground and its telescopic transmitter-receiver was mounted to the UAV; The main application of which was to test the system as a wind-measurement platform. Ref. [35] simulates the use of an airborne LiDAR and a H ∞ preview controller during the autonomous landing of a highly flexible fixed-wing aircraft to reject wind disturbances. However, the assumption that the LiDAR unit is kept onboard the aircraft wing limits the study to large scale aircraft and excludes most UAVs. In this paper a ground-based LiDAR unit is proposed to generate the preview needed for disturbance rejection during the takeoff and landing of a quadrotor UAV from its ground station. Here, the LiDAR unit has no physical connection to the autonomous UAV and hence does not limit its flight-envelope. This paper builds on previous work [36], where a prototype LiDAR unit was experimentally verified to predict the incoming wind disturbance at the landing site of UAV. The benefits of a feedforward control strategy were also assessed in this previous work. In the work presented here the disturbance rejection is improved further by incorporating the preview information received from the LiDAR in an MPC formulated for disturbance preview.
The main contributions of this paper include the development of a linear MPC with wind disturbance preview, the analysis of the MPC's performance against varying preview lengths, the verification of the proposed performance benefits through non-linear simulations using experimental LiDAR data, and a preliminary analysis into the robustness of the system against uncertainty in the wind preview information. The remainder of this paper is organised as follows: The methodology, including system architecture, quadrotor modelling, wind preview MPC formulation, and description of the LiDAR-based wind preview system, are provided in Section 2. Results of simulation and analysis work with accompanying discussion are given in Section 3. Finally, Section 4 provides concluding remarks and highlights future work to be carried out.

Control Architecture
The architecture of the wind preview-based MPC is shown in Figure 1. As the LiDAR measurements are line-of-sight (LOS), a scanning procedure is employed to reconstruct the wind vector from its scalar measurements. This upstream wind vector is then fed into the wind predictor block which uses the quadrotor's position within the landing site and a wind propagation model to predict its incoming disturbance. This wind preview is used by the MPC that sits in the outer loop of the aircraft's overall control architecture and sends attitude demands to the inner loop. This cascading of controllers and the placement of the gust rejection control on the outer loop is for the following reasons: • To impart modularity in the overall system and to allow the outer-loop control to be kept off-board the aircraft. This removes any weight constraints for the gust rejection controller and hence makes computational expensive controllers more feasible. • To keep the inner-loop of the quadrotor unmodified and hence minimise the effect the outer-loop controller has on the stability characteristics of the aircraft. This can be further ensured by bounding the output attitude demands of the outer-loop controller. • The identification of the aircraft model required for MPC design becomes easier. The placement of the controller on the outer-loop eliminates the need to identify/model the inner-loop dynamics of the aircraft which tend to be more non-linear. This also adds to the modularity of the gust rejection system as the model identification required for different UAVs becomes quicker.

Quadrotor Simulation Model
A mathematical model of the qaudrotor was developed for MPC design and simulation in this research. The equations of motion used for this model are the standard Newton-Euler equations, the translational component of which is given by: where F b is the total force applied on the rigid body in the aircraft's body-fixed reference frame, m is the mass of the aircraft, V b is its velocity and ω b = p, q, r are its rotational rates, both in the body-fixed reference frame. The rotational motion of the aircraft is defined by: where M b is total rotational moment acting on the aircraft about its body-fixed reference frame; with its components L, M, N corresponding to the total pitch, roll, and yaw moments respectively. I is the inertia matrix of the aircraft, assumed to be constant along with the mass of the aircraft. The translational velocity of the aircraft in the earth-fixed reference frame is obtained by the rotating the translational rates in the body-fixed reference frame using the direction cosine matrix, where φ, θ, ψ are the Euler/Tait-Bryan angles representing the orientation of the aircraft in the earth-fixed reference frame. Here c (·) and s (·) denote the cosine and sine of (·) respectively. Finally, the rotational rates in the earth-fixed reference frame can be obtained through the following rotation: where t (·) denotes tan(·). The aerodynamics of the propeller and the airframe are integrated with the above equations of motion to allow the simulation of the aircraft model. To accurately capture the aircraft response under wind disturbances, the aerodynamics of each propeller is considered individually. The aerodynamic outputs of each propeller are given by where T, H, and Q are the propeller thrust, in-plane horizontal force, and torque respectively. ρ is the air density, A is the area of the propeller disc, Ω is the rotational speed of the propeller, R is its radius. (C T , C H , C Q ) are the propeller coefficients for thrust, horizontal force, and torque respectively. These coefficients are a non-linear function of the aircraft's airspeed, rotational speed of the propeller, and propeller blade characteristics. The expressions for the coefficients and mappings to various incidence angles, rotational speeds, and airspeeds are omitted here for brevity and since they are already detailed in previous related works, Refs. [37][38][39]. The airframe drag for the quadrotor is considered as follows: where C D is the airframe drag coefficient and S x , S y , S z is the surface area of the airframe along each respective axes. The above formulation simplifies the airframe drag and considers the aircraft as a cuboid and only accounts for form drag, ref. [40].
The Draganflyer X-Pro quadrotor, depicted in Figure 2, was used as the simulation aircraft in this research. The mass, inertia, and aerodynamic properties of which are provided in Table 1.  Table 1. Mass, inertia, and aerodynamic properties used to build mathematical model of the Drganflyer XPro quadrotor, ref. [41]. diag(·) denotes a diagonal matrix.

Property Value
Mass (kg) 2.36 Inertia matrix (kg m 2 ) Linear Model for MPC Design The aircraft simulation model described above contains non-linearities due to its aerodynamics and hence needs to be linearised for MPC design. The linearisation procedure was carried out by first trimming the aircraft at zero wind and at hover. The trimming and linearisation process were carried out numerically in MATLAB using the findOp and linmod commands respectively. The linearised model is obtained in a state-space representation with the following structure: where A is the state-matrix, B u is the input matrix due to control input u, B w is the wind effector matrix, w is the three-dimensional wind vector, y is the output vector, and C is the output matrix, and x is the state vector with the following definition: x = x y z u v w φ θ ψ p q r where x, y, z is the position vector of the aircraft in the earth-fixed reference frame and u, v, w = V b , the translational velocity of the aircraft in the body-fixed reference frame. To obtain offset-free position tracking in wind, the attitude states of the aircraft were removed from the outputs, hence y is defined as: This removal of attitude states in the outputs is necessary as the quadrotor holds position in wind with a non-zero attitude. Hence, the MPC should not try to track the attitude states of the quadrotor. It should be noted here that the attitude states are only removed from the tracked outputs of the MPC's internal model and not its states. Full state-feedback is still required for the MPC's prediction, detailed in Section 2.3. The state effector matrices A, B u , and B w were obtained from the linearisation procedure as follows: where g is the acceleration due to gravity, [X u , Y v , Z w ] are the aerodynamic drag derivatives in the respective axes, Z z is the vertical force derivative to height feedback, are the rotational moment derivatives due to attitude, [L p , M q , N r ] are damping terms for the rotational moments, and [Z u 1 , M u 2 , L u 3 , N u 4 ] are the control derivatives. The above input effector matrix, B u , corresponds to a input vector u = u 1 , u 2 , u 3 , u 4 where u 1 is the altitude control input, u 2 is the pitch angle control input, u 3 is roll angle control input and u 4 is the yaw angle control input. The values of these derivatives for the linearised model of the Draganflyer X-Pro are given in Table 2.

Aerodynamic/Control Derivative Value
Forward force due to forward airpseed- 3.6376 Rolling moment due to control input u 3 -L u 3 (N m) 3.6594 Yawing moment due to control input u 4 -N u 4 (N m) 0.0785 Figure 3 shows the architecture of the simulation environment. The control outputs from the MPC are then sent to the individual inner-loop proportional-integral-derivative (PID) controller to track the respective variable. The gains for these controller were determined using Simulink's in-built PID tuner application and are given in Table 3. The error driven outputs of the PID controllers are U 1 the thrust collective, U 2 the pitch differential, U 3 the roll differential and U 4 the yaw differential. These control outputs are then set to a control allocation block that combines and translates each control input into a rotational speed demand for each propeller. The relation between the control output and propeller speed depends on the location of the propeller in the body reference frame of the aircraft. The model used here has been set for the 'X' configuration where the diametrically opposite propellers are placed along the forward and lateral body frame axes with propeller number 1 being placed along forward body axes and the remaining propellers following a clockwise numbering convention. The propeller speeds are then obtained using the following expressions: where Ω (i) denotes the rotational speed of the (i)th propeller. The allocation of propeller speeds in this manner allows for the decoupling of the various control channels. Figure 3 also depicts the use of the Kalman Filter (KF) to estimate the states of the quadrotor for feedback into the MPC. This was required as the access to the rotational rates from the onboard sensors was not possible for the intended aircraft for future flight tests. Furthermore, the use of a KF also allows for the minimization of errors caused by measurement and process noise.

MPC with Wind Disturbance Preview
MPC is a well-established control methodology that has found success in aerospace applications due to its ability to handle complex and nonlinear systems and optimize performance in real time whilst keeping the system within desired operating conditions. The basic principle of MPC is that by repeatedly solving an open-loop optimal control problem, closed-loop control can be applied. Following the measurement of the system state, the control sequence that minimizes some performance measures over a finite time horizon subject to a set of constraints is computed. The first control of the sequence is applied and at the next sampling instant, the process is repeated. Detailed descriptions can be found in standard reference texts [42][43][44].
The general design objective of an MPC is to compute a set of future control inputs for a system to optimize its future behaviour within a finite time horizon. This is defined as the prediction horizon of the MPC. To obtain an estimate of the future response of the system, MPC utilises a mathematical model of the system to be controlled. In this paper, the model detailed in Section 2.2 is used. The future response of the system is estimated by simulating this model forward in time in the length of the MPC's prediction horizon. This prediction is then optimized over the same horizon according to a specific performance criterion and constraints, which are typically defined in terms of minimizing a cost function. In the standard feedback-only configuration, the MPC's control optimization takes into account only the current system outputs to simulate forward in time, hence any future or current disturbance acting on the system needs to be sensed through its effects on the system outputs. This invariably adds a delay in the compensation from the MPC. If future disturbances can be measured or estimated then the MPC's predictive methodology can be leveraged to account for the disturbance within its optimization scheme. This preview driven optimization translates to preemptive control inputs to compensate for the incoming/changing disturbance.
The formulation of a linear MPC with wind disturbance preview will now be discussed. This formulation is built on the standard formulation of MPC for discrete linear timeinvariant systems [44], with the new addition of wind disturbance and wind preview into the MPC. Usually, wind acts as an unknown disturbance input into the system however if the incoming disturbance can be measured and estimated then this preview information can be used within the prediction horizon of the MPC to determine the optimal control inputs. For the discrete-time implementation of the MPC, we define the system as: where A d , B d , C d are the discrete state-space matrices of the quadrotor system and B w is its wind disturbance matrix. x(k), u(k), w(k), and y(k) denote the state, input, wind disturbance and system output vectors at the k th timestep. Denoting the difference in state, output, and control input as follows: and then substituting Equation (1) into the right hand side of Equation (2) we get, Here ∆ y(k + 1) denotes the difference in predicted output of the system at the next timestep (k + 1) formulated in terms of the current state difference ∆ x(k) and the current control and disturbance input differences ∆ u(k) and ∆ w(k). Now defining the predicted state of the system at the (k + j) th timestep based on the current state x(k) as x(k + j|k), the state evolution can then be extended over the entire horizon of the MPC as: where N p and N c are the prediction and control horizons respectively. Now from the predicted states we can obtain the predicted outputs through substitution: Hence all predicted outputs in the above equation are in terms of the current state x(k), the future control inputs ∆ u(k + j) and future wind inputs ∆ w(k + j) where j = 0, 1, · · · N c − 1.
Defining vectors for the future outputs, control inputs and wind inputs: Hence the predicted outputs can be written in the compacted matrix form as: where, This predictive model can now be used along with the wind preview and future control inputs to optimise the future response of the system. For this optimization we define the cost function as: where R s is the vector containing the reference information andR is a diagonal weighting matrix to impart cost on high control efforts. The diagonal terms inR can be modified to tune the closed-loop performance of the system. Substituting Equations (6)-(8) into the cost function and taking the partial derivative w.r.t ∆U gives: The minimum of the cost function J is obtained by equating the above equation to zero, which gives the optimal set of control inputs ∆U as: For the receding horizon control strategy employed in MPC, only the first input of optimised ∆U is sent through to the quadrotor. The prediction and optimisation is then repeated at the next timestep with the updated state of the system. ∆ u(k) = 1 0 0 · · · 0 ∆U Hence the control input into the system is then obtained as:

Constraint Handling for Real-Time Implementation
In MPC methodology, constraints on the system are defined as linear inequalities w.r.t to the decision variable ∆U.
M∆U ≤ γ where M is a matrix defining how the constraints relate to ∆U and γ is a vector containing the numeric limits of the constraints. The MPC optimisation now becomes a quadratic programming problem where the goal is to find the constrained minimum of a positive definite quadratic cost function subject to linear inequality constraints. In this paper, Hildreth's quadratic programming algorithm [45], is used to numerically solve the constrained optimisation. The strength of Hildreth's programming is its ability to find near-optimal solutions during conflicting constraints. Hence, it can automatically recover form ill-conditioned constraint problems. This attribute is key to the safe real-time operation of MPC in flight control systems of UAVs. Detailed implementation of the algorithm in MATLAB is provided in [44].

KF for State Estimation
Due to practical considerations with the intended test aircraft, rotational rate measurements are not available for direct feedback. Hence a discrete-time linear KF was used to estimate the missing states using the available measurements and a linear model of the aircraft. The same linear model and discretisation step used in MPC design is used here. The KF follows a standard formulation, the structure of which is summarised in the following equations:ˆ Equations (12) and (13) represent the KF prediction at current timestep k from the previous state estimateˆ x(k − 1|k − 1), and previous error covariance matrix P(k − 1|k − 1). Hereˆ x(k|k − 1) and P(k|k − 1) represent the a priori estimates for the state vector and error covariance matrix at the current timestep and Q is the process noise covariance matrix. Equation (14) represents the calculation of the Kalman gain K(k), for the current timestep using the a priori error covariance matrix estimate, the output matrix of KF model H, and the sensor noise covariance R. Equations (15) and (16) represent the update step of the KF algorithm which yields the state estimate and error covariance matrix for the current timestep, using the a priori estimates and current measurement vector, z(k). This state estimate is then sent to the MPC for its control calculation. Finally, Equations (17) and (18) represent the projection step of the KF algorithm where the current estimates are projected into the next timestep for the subsequent calculations. Here,ˆ x(k + 1|k) and P(k + 1|k) are known as the a posteriori state estimate and error covariance matrix respectively. As the rotational rates are not directly measured, the measurement vector takes the form: The KF was then configured to estimate the rotational rates using the above measurements by setting its model output matrix, H, to disregard the rotational rates. This is possible as the system model described by matrices A d , B d , B w and H is still observable. The covariance matrices for process noise and sensor noise were fixed at 0.1 and 0.3 respectively in this work. The sensor noise covariance was obtained by using historical data of the quadrotor's sensor measurements while the process noise covariance was obtained heuristically in simulation by looking at the estimation accuracy of the unmeasured states for different process noise covariance values while keeping the sensor noise covariance fixed.

LiDAR for Wind Preview
To measure the incoming wind disturbance an atmospheric wind LiDAR will be used. These LiDAR s use the principle of Doppler effect to estimate the speed of air particles by measuring the Doppler shift in frequency of the back-scattered laser. The LiDAR unit investigated in this research is a prototype version of a miniaturised continuous wave (CW) coherent LiDAR system that utilises the infra-red band for measurement. The wind-speed measurement range of the unit exceeds the flight-envelope of the test vehicle and most commercial quadrotor UAVs. The unit is a class 3 b laser that weighs less than 5 kg and its approximate physical dimensions are 35 cm × 25 cm × 12 cm. Detailed specification of this LiDAR unit is omitted here due to commercial sensitivity.
As the LiDAR unit measures LOS wind speed, a scanning procedure needs to be used along side its use for wind vector reconstruction. A mechanical mount was devised to horizontally scan the laser beam to reconstruct the horizontal wind vector. Once the upstream wind vector is reconstructed a wind propagation model is used to predict the downstream wind disturbance and hence provide the wind preview. Figure 4 depicts the mechanical mount used for the LiDAR scan procedure and illustrates the system architecture of the proposed MPC based gust rejection control system including the various system components used for wind preview generation. Detailed explanation of the various system nodes, methods for wind reconstruction, wind prediction, and their experimental verification has been conducted in previous work [36]. The wind data gathered from these experiments has been used in this paper to allow for more representative simulations.

Results and Discussion
This section looks at the results of the simulations conducted using the aircraft model described in Section 2.2 and the MPC designed using the same. A sample time of 0.1 s was used for the discretisation and the MPC's weighting matrix used was kept as identity for all simulations. Section 3.1 will first look at simulations of the linearised model of the quadrotor with wind-preview-based MPC control, highlighting the performance improvements over an MPC with no disturbance preview. Section 3.2 shows the analysis results of varying preview length in the MPC. Remaining subsections utilise the non-linear model of the quadrotor with the addition of measurement noise, non-linear aerodynamics and experimental wind data; thus allowing for more representative results. Section 3.3 looks at the estimation results of the KF with added noise and the complete system performance, MPC + KF, in the presence of gusts. Section 3.3 looks at simulations using the experimental wind data gathered from the LiDAR as the wind preview for the MPC. Finally, Section 3.5 finishes with a analysis into the robustness of the wind-preview MPC based on system performance in the presence of gusts with uncertainty. MPC's control and prediction horizons were kept fixed at 1 s in all simulations except for those in Section 3.2 where the MPC's horizons were changed according to the wind preview length considered. Figure 5 shows the linear system response to a forward wind disturbance with and without wind-preview compensation in the MPC. The applied wind disturbance is a step input of 10 ms −1 at time t = 2 s. A significant reduction in the quadrotor's position deviation is observed with wind preview. There are also significant reductions in peak pitch rate, pitch angle, and control input magnitude with wind preview. These improvements are accredited to the MPC's preemptive control action in pitch before the arrival of the gust as seen in Figure 5b. This preemptive pitch input start as soon as the gust enters the prediction horizon of the MPC, the window length of which was set to 1 s for this simulation.   Figure 6 plots the MPC's internal prediction of the aircraft's forward position at time t = 1.5 s for the same gust starting at t = 2 s compared against the actual response in aircraft position for the same time range. From Figure 6 we can see that with the addition of the wind disturbance matrix along with wind preview has allowed the MPC to better predict the aircraft's trajectory in wind. Hence it is clear that the MPC's optimisation scheme has deliberately moved the aircraft forward preemptively to minimise its position deviation over the prediction horizon defined. It should also be noted that this optimization accounts for the system lag in reaching the desired pitch attitude due to the model based prediction in the MPC. The following subsection will look into how varying the window length of the MPC's prediction horizon will effect the system response. Figure 7 plots the linear system response to a forward step input in wind (at time t = 10 s) for increasing prediction horizon lengths in the MPC, from T p = 1 s to T p = 10 s. It is assumed here that the length of the wind preview increases alongside the MPC's prediction horizon. From the responses we can see that the most noticeable difference with increasing prediction length is in the position response of the aircraft, albeit the differences are in the cm scale. We can observe that increasing the horizon beyond 1 s also commences an initial backward motion of the aircraft before its forward motion to counter the backward push of the incoming wind. This two-stage preemptive motion of the aircraft results in a lower peak magnitude in position deviation to either side of the position set-point and thus results in a lower variance of the position response of the aircraft. This multi directional preemptive motion of the aircraft is a resultant of the MPC optimisation scheme which aims to minimise the position error of the aircraft from its set-point over the defined prediction horizon. Hence, by first moving the aircraft backwards and then forwards against the headwind, the system can build up momentum to counter the sudden push from the wind while still minimising its position deviation throughout the length of the horizon. The magnitude of this initial backward motion increases with increasing horizon length until T p = 5 s. Increasing the preview length further results in a three-stage preemptive movement of the aircraft where an initial forward movement is followed by a backward motion and then finishing with a forward motion before the wind impacts the aircraft. Doubling the preview length to T p = 10 s showed no noticeable difference to the system response when compared to T p = 5 s.    Table 4 lists the Root-mean-square (rms) values of the aircraft states with and without preview as well as with varying lengths of wind preview in the MPC. Correlating the forward position response of the aircraft in Figure 7 with Table 4, it is clear that the multistage preemptive motion of the aircraft for increasing preview lengths has in fact reduced the rms value of the forward position error.

Non-Linear Model Simulations
All results within this subsection were obtained from simulations of the non-linear aircraft model. To reduce the influence of measurement noise in the system performance with MPC, a KF was used to estimate the aircraft states from the noisy measurements. Figure 8 shows the KF estimation against the true states during a step demand in forward position. White noise with a covariance of 0.3 was added to all measured outputs. Due to practical constraints of the intended test aircraft, the rotational rates of the aircraft were not available for measurement. Hence, the KF was configured to estimate the rotation rates needed by the MPC. Figure 8d shows the estimation of the unmeasured rotational rate during the step input. Figure 9 plots the system response when the aircraft is subjected to a forward gust and the KF estimates are used for MPC feedback. To better understand the benefits of the preview based control, a more realistic gust profile was used in this simulation, see Figure 9a. This gust profile consists of more representative rates in the windspeed variation. The improvement in position holding performance with wind preview is subdued in the non-linear simulation compared to the linear simulation but still significant. The addition of measurement noise and the non-linear aerodynamics in these simulations has contributed to the reduction in performance improvement observed with the linear MPC. However, a 66% improvement in position holding performance is still observed with the addition of wind preview; The aircraft is able to stay within ±20 cm with wind preview compared to ±60 cm without wind preview. The peaks in pitch rate, pitch angle and control input are also slightly reduced with wind preview, however their reductions are not as large as in the linear simulations. This reduction in improvement is mainly due to the more gradual profile of the gust unlike the step disturbance used in the linear case. This highlights that preview based control becomes more beneficial as the disturbance becomes more abrupt or sudden.

Non-Linear Simulations-MPC with LiDAR Data
In the simulations conducted here, the experimental data set gathered from the LiDAR tests conducted in previous work [36] was used. Here, the prediction estimates obtained from the upstream LiDAR measurements were used as the preview input into the MPC while the actual downstream measurement of the corresponding data set was used as the wind distance input into the quadrotor model. This in turn adds the prediction errors and measurement noise of the LiDAR to the MPC, thus allowing for a more representative simulation. Figure 10 shows the histograms of the aircraft's response for the non-linear simulation. The performance improvements in this scenario have diminished when compared with the ideal linear simulations but are still significant. Much like the previous Subsection's simulations, the position hold improvement is the most significant while the improvements in rotational rates, peak attitude and control signals have been subdued. While these simulations indicate that the wind-preview MPC is robust towards real word wind prediction data, the following Subsection will quantify the robustness further.  . Histograms with and without wind preview control when aircraft is subjected to experimental wind data. Vertical axis for all plots is probability density.

Robustness Analysis
System robustness was tested by adding increasing amount of structured uncertainty into the wind preview information used by the MPC in non-linear model simulations. The uncertainty is added into two parameters of the preview information, the magnitude of the incoming gust, ∆ g (%), and its timing, ∆ t (s). Figure 11 shows how each of the parameterised uncertainties is applied on wind preview information. Here system robustness is quantitatively defined as the acceptable margins in either gust strength or timing before the system performance becomes similar to that without wind preview. i.e. the addition of wind preview even with erroneous magnitude and timing has not deteriorated the performance to worse than without the preview. Table 5 shows the results of the uncertainty analysis through the rms values of key system outputs with increasing uncertainty either in the strength of the gust or in its timing. From the analysis we can see that the system can handle up to approx. 120% uncertainty in the magnitude of the preview or approx. 1.75 s uncertainty in its timing before the system performance becomes lower than without wind preview. These results add to the practical feasibility of the wind-preview based MPC. The accuracy of the experimental data gathered in [36] fall well within the margins calculated in the simulations here.

Summary and Conclusions
In this paper wind preview-based Model Predictive Control is proposed to increase the gust resilience of multi-rotor UAVs. A linear MPC with disturbance preview capability was formulated using a mathematical model of a quadrotor. Remote wind sensing instruments such as atmospheric LiDAR can be used to predict the wind profile needed for the wind preview-based MPC. The preview information was used within the MPC to provide optimal disturbance rejection over its prediction horizon. The proposed control architecture places the wind-preview-based MPC off-board the UAV and in the outer-loop attitude channel to eliminate weight and hence computational constraints of the MPC and to minimise the impact on aircraft stability. Simulations were conducted using experimental LiDAR data to assess the performance benefits with the addition of wind preview. Analyses on wind preview length and system robustness were also conducted through simulation.
It was shown that wind preview-based MPC can significantly reduce the position deviation of the UAV under gust and thus improve its tracking performance. Reductions were also observed in translational, rotational rates, and maximum aircraft attitude during the disturbance compensation. This allows for a less aggressive approach to increased gust rejection. This key attribute of wind-preview-based MPC control differentiates it from conventional feedback-based methods where delays in measurement and actuation have to be dealt with larger control signals to achieve the same performance. Gust simulations with varying prediction horizon lengths demonstrate the preemptive nature of the windpreview-based MPC. System robustness was tested in simulation by adding structured uncertainty into the preview information used by the MPC; a 120% or 1.75-s margin was possible in either the preview's magnitude or timing before system performance dropped below that without wind preview.
Although wind-preview MPC provides improved disturbance rejection with lower magnitude control signals, aircraft attitudes, and rates, it requires additional instrumen-tation and increased computation. Hence it should be used for applications where gust resilience is safety critical. This attribute could prove advantageous for UAVs in outdoor 'drone-delivery' applications where aircraft and hence payload orientation are critical for stability and operational constraints. Moreover, electric VTOL aircraft could also leverage this less aggressive control technique to improve passenger comfort during takeoff and landing from gusty environments such as the rooftops of high-rise buildings. Additionally, wind preview-based flight control of UAVs can also reduce the time required to complete tasks where precise position control is required; such as the docking of the aircraft with its charging station. This is again possible due to the preemptive control nature of preview-based systems that yield reduced settling time in the presence of disturbances.

Future Work
The next steps for this research include the experimental validation of the proposed wind-preview-based MPC. System identification tests will be carried out beforehand to obtain the model of the test aircraft that will be used for MPC implementation. The flight test platform and intended aircraft will be the ones used in previous work [36]. Integration of the wind-preview-based MPC into a trajectory planner will also be carried out. This will potentially aid the obstacle avoidance of autonomous UAVs during close proximity inspections in gusty environments. The comparison of preview-based MPC control against other pure feedback-based disturbance attenuation methods is another avenue for future work that will be explored.