Main Content

uavWindTurbulence

Generate wind turbulence for UAV platform with discretized Von Kármán velocity spectra

Since R2024a

    Description

    The uavWindTurbulence value object uses the discretized Von Kármán spectral representation to generate turbulence for a UAV platform by passing band-limited white noise through appropriate forming filters. You can choose the mathematical representation of the Von Kármán turbulence from US Military Specification MIL-F-8785C, MIL-HDBK-1797, and MIL-HDBK-1797B. For more information, see Algorithms.

    The object discretizes the Von Kármán spectral representation with a rate similar to the UAV scenario UpdateRate property. To simulate wind turbulence in a UAV scenario:

    1. Create the uavWindTurbulence object and set its properties.

    2. Attach the wind model to a UAV platform by using the addWind function.

    3. Obtain the wind velocity from the UAV scenario by using the windVelocity function, and the wind angular rate using the windAngularRate while the UAV scenario is running.

    Note

    Simulating a UAV scenario that contains a uavWindTurbulence object requires Aerospace Toolbox.

    Creation

    Description

    turbulenceWind = uavWindTurbulence creates a wind turbulence object with default property values.

    turbulenceWind = uavWindTurbulence(Name=Value) specifies properties using one or more name-value arguments. For example, uavWindTurbulence(StartTime=10) sets the wind start time to 10 seconds.

    example

    Properties

    expand all

    You can modify these value object properties before you add the uavWindTurbulence value object to the UAV platform using addWind function.

    Wind start time, specified as a nonnegative scalar. This value is relative to the simulation start time of the UAV scenario. Units are in seconds

    Example: 2

    Data Types: double

    Wind stop time, specified as a nonnegative scalar. This value is relative to the simulation start time of the UAV scenario. If specified as inf, the wind gust continues until the UAV scenario simulation ends. Units are in seconds

    Example: 5

    Data Types: double

    Military reference, specified as"MIL-F-8785C", "MIL-HDBK-1797", or "MIL-HDBK-1797B". The military reference affects the application of turbulence scale lengths in the lateral and vertical directions.

    Angular rate signs, specified as one of these options:

    • "Von Karman (+q +r)" — Positive vertical and lateral angular rate spectra.

    • "Von Karman (+q -r)" — Positive vertical and negative lateral angular rate spectra.

    • "Von Karman (-q +r)" — Negative vertical and positive lateral angular rate spectra.

    Data Types: string

    Wind speed at a height of 6 meters above ground, specified as a nonnegative scalar in m/s.

    Data Types: double

    Wind direction at a height of 6 meters above ground, specified as a nonnegative in degrees clockwise from north.

    Data Types: double

    Probability of the turbulence intensity being exceeded, specified as "2x10^-1", "10^-1", "10^-2 - Light", "10^-3 - Moderate", "10^-4", "10^-5 - Severe", or "10^-6"

    Data Types: string

    Turbulence scale length above 2000 feet, specified as a real scalar. This length is assumed constant.

    Data Types: double

    Wingspan, specified in meters.

    Data Types: double

    Noise sample time at which the unit variance white noise signal is generated, specified in seconds.

    Noise sample time must be an integer multiple of the scene sample time.

    Data Types: double

    Random noise seeds, specified as a vector of the form [ug vg wg pg] which generates the turbulence for each of the three velocity components and the roll rate.

    Data Types: double

    Examples

    collapse all

    Create a UAV scenario with default parameters.

    scene = uavScenario;

    Create a UAV platform. Specify the trajectory to 80 meters north of scenario origin for 80 seconds.

    distance = 80;
    duration = 80;
    platform = uavPlatform("UAV",scene,Trajectory=waypointTrajectory([0 0 -50;distance 0 -50],[0 duration]));

    Create a turbulence wind object which starts at 20 seconds. Add the wind object to the UAV platform.

    turbulenceWind = uavWindTurbulence(StartTime=20, BandLimitedNoiseSampleTime=1/scene.UpdateRate);
    addWind(platform,turbulenceWind);

    Set up the scenario.

    setup(scene);
    
    % Create arrays of zeros to store longitudinal, horizontal, and vertical wind velocity
    uw = zeros(scene.UpdateRate*duration, 1);
    vw = zeros(scene.UpdateRate*duration, 1);
    ww = zeros(scene.UpdateRate*duration, 1);
    
    % Create arrays of zeros to store x position of the UAV
    xpos = zeros(scene.UpdateRate*duration, 1);
    
    % Start a counter index
    idx = 1;

    Run the scenario. Obtain the vertical wind velocity at each time step.

    while scene.CurrentTime <= duration
        % Obtain resultant wind velocity
        vel = windVelocity(platform);
        
        % Obtain UAV position
        [motion,lla]=read(platform);
        
        % Obtain UAV X position
        xpos(idx) = motion(1);
    
        % Obtain wind velocities
        uw(idx) = vel(1);
        vw(idx) = vel(2);
        ww(idx) = vel(3);
    
        % Increment counter index
        idx = idx + 1;
    
        % Advance the scenario time step
        advance(scene);
    end
    

    Plot the wind velocities against distance.

    tiledlayout(3,1)
    
    nexttile
    plot(xpos,uw)
    title("Longitudinal Wind Velocity")
    xlabel("Distance (m)")
    ylabel("Wind Velocity (m/s)")
    
    nexttile
    plot(xpos,vw)
    title("Lateral Wind Velocity")
    xlabel("Distance (m)")
    ylabel("Wind Velocity (m/s)")
    
    nexttile
    plot(xpos,ww)
    title("Vertical Wind Velocity")
    xlabel("Distance (m)")
    ylabel("Wind Velocity (m/s)")

    Figure contains 3 axes objects. Axes object 1 with title Longitudinal Wind Velocity, xlabel Distance (m), ylabel Wind Velocity (m/s) contains an object of type line. Axes object 2 with title Lateral Wind Velocity, xlabel Distance (m), ylabel Wind Velocity (m/s) contains an object of type line. Axes object 3 with title Vertical Wind Velocity, xlabel Distance (m), ylabel Wind Velocity (m/s) contains an object of type line.

    More About

    expand all

    Version History

    Introduced in R2024a