Why Your Controller Fails in Wind Disturbance

A controller may look stable in an ideal aircraft simulation, but become oscillatory or fragile when wind gusts are introduced. This problem shows why high-altitude flight systems must be tested against real atmospheric disturbance, not only clean textbook conditions.

Problem Setup

Ideal Aircraft Controller vs Real Atmospheric Disturbance

In many early simulations, the aircraft is tested in a clean environment: no gusts, no atmospheric uncertainty, no actuator limits, and no energy constraint. Under those assumptions, a simple controller may appear stable.

But high-altitude flight systems do not operate in perfect conditions. A HAPS aircraft, UAV, or long-endurance platform is continuously exposed to wind shear, gusts, changing density, and slow environmental drift.

Core problem: the controller is designed for the ideal model, but the aircraft flies in the disturbed model.

This page compares the same controller under two cases:

Simplified Longitudinal Model

States: Velocity, Altitude, and Pitch

The aircraft is represented using a simplified 2D longitudinal model. This is not a full aircraft dynamics model, but it is enough to demonstrate the main control insight.

$$ x = \begin{bmatrix} V \\ h \\ \theta \end{bmatrix} $$

where:

The controller tries to maintain a target altitude by commanding pitch. The simplified model is:

$$ \dot{V} = -D(V) + w_V(t) $$ $$ \dot{h} = V\sin(\theta) + w_h(t) $$ $$ \dot{\theta} = K(h_{target} - h) - c\theta $$

The terms \(w_V(t)\) and \(w_h(t)\) represent wind disturbance effects. When there is no wind, these terms are zero.

Ideal Case: No Wind

The Controller Looks Stable

In the ideal case, the wind disturbance is removed:

$$ w_V(t) = 0, \qquad w_h(t) = 0 $$

The aircraft responds smoothly. Altitude error decreases, pitch remains bounded, and velocity changes gradually.

What the clean simulation suggests: the controller is stable, the aircraft tracks altitude, and the design appears acceptable.

But this conclusion is incomplete because the simulation has not tested disturbance rejection.

Add Wind Gust Disturbance

Step Gusts and Sinusoidal Gusts

Wind can enter the model as a sudden gust or as a repeated oscillatory disturbance. Both are useful for testing controller robustness.

Step Gust

$$ w(t) = \begin{cases} 0, & t < t_g \\ W, & t \geq t_g \end{cases} $$

A step gust represents a sudden change in wind condition. This is useful for testing how quickly the controller recovers.

Sinusoidal Gust

$$ w(t) = W\sin(2\pi f t) $$

A sinusoidal gust represents repeated atmospheric excitation. This is useful for identifying oscillatory behaviour and resonance-like response.

Compare Responses

No Wind vs Wind Disturbance

The important comparison is not whether the controller works once. The important comparison is whether it remains stable when the environment changes.

Behaviour No Wind With Wind
Altitude tracking Smooth convergence Deviation and oscillation
Pitch response Bounded and damped Repeated correction or overshoot
Velocity Nearly steady Disturbed by gust input
Controller confidence Looks safe Fragility becomes visible
Interactive Simulator

Run the Aircraft With and Without Wind

Use the sliders to change controller gain, wind strength, gust frequency, aircraft damping, and simulation time. The simulator plots altitude, pitch, velocity, wind input, and a simple stability indicator.

Choose wind case:









Why the Controller Fails

The Disturbance Was Not in the Design Model

The controller was tuned for the clean model:

$$ \dot{x} = f(x,u) $$

But the real system behaves more like:

$$ \dot{x} = f(x,u) + d(t) $$

where \(d(t)\) represents wind, gusts, unmodelled dynamics, and environmental uncertainty.

If the controller is only tested on \(f(x,u)\), then the simulation proves only that the controller works in the ideal world. It does not prove that it will reject disturbance.

Important: stable tracking in a no-wind simulation is not the same as robust control.
Engineering Interpretation

Why This Matters for HAPS and High-Altitude Flight

HAPS aircraft and long-endurance platforms operate for long durations in the atmosphere. They are not judged only by short-term stability. They must remain controllable under wind, energy limits, and slow environmental changes.

1. Wind Disturbance Changes the Plant

The aircraft is not only responding to its controller. It is also responding to the surrounding air mass. Wind can change the effective airspeed, flight path, altitude rate, and pitch demand.

2. High Gain Is Not Always Better

Increasing gain can improve response in the ideal case, but it can also amplify oscillations under gusts. A strong controller can become aggressive and fragile.

3. Damping Is Essential

Damping reduces oscillation and helps the aircraft recover from disturbance. Without enough damping, gusts can keep exciting the system.

4. Real Control Must Include Disturbance Rejection

A realistic design should test no-wind, step gust, sinusoidal gust, sensor noise, actuator limits, and energy constraints.

HAPS/aircraft systems cannot be judged only in ideal conditions.
Python Implementation

Reproducing the Same Idea in Python

The same model can be reproduced using a simple time-marching simulation.

import numpy as np
import matplotlib.pyplot as plt

dt = 0.05
t_final = 100
t = np.arange(0, t_final, dt)

h_target = 1000
V = np.zeros_like(t)
h = np.zeros_like(t)
theta = np.zeros_like(t)

V[0] = 25
h[0] = 950
theta[0] = 0

K = 0.03
damping = 0.30
wind_strength = 5
gust_frequency = 0.10

def wind_gust(time):
    return wind_strength * np.sin(2*np.pi*gust_frequency*time)

for k in range(len(t)-1):
    error = h_target - h[k]
    wind = wind_gust(t[k])

    theta_dot = K*error - damping*theta[k]
    V_dot = -0.01*(V[k] - 25) + 0.03*wind
    h_dot = V[k]*np.sin(theta[k]) + wind

    theta[k+1] = theta[k] + theta_dot*dt
    V[k+1] = V[k] + V_dot*dt
    h[k+1] = h[k] + h_dot*dt

plt.plot(t, h)
plt.axhline(h_target, linestyle="--")
plt.xlabel("Time (s)")
plt.ylabel("Altitude (m)")
plt.show()
Takeaway

A Controller Is Not Robust Until It Is Tested Against Disturbance

This problem shows why ideal simulations can be misleading. A controller may look stable in a clean model, but fail once wind disturbance is introduced.

Ideal simulation

Useful for first validation, but incomplete.

Wind disturbance

Reveals oscillation, altitude error, and controller fragility.

Real-world control

Requires disturbance rejection, damping, and robustness testing.

Controllers designed without disturbances are fragile.

This page becomes the foundation for the next high-altitude flight problems: solar and battery energy management, long-endurance efficiency, wind-field path correction, and fault-tolerant control under sensor and actuator limits.