Model for testing stall recovery and stall effects for Saab 2000


Wolfram Language



Stall Recovery of Saab 2000 by an Autopilot

This example demonstrates the Aircraft library's model for stall and the ability of the autopilot to recover an aircraft from stall. The twin-engine turboprop airliner Saab 2000 is given an extremely low initial velocity, the elevator is deflected to its maximum upward angle and the engines are set to provide zero thrust, resulting in the aircraft stalling just 0.5 seconds after the start of the simulation. At 20 seconds, the control signals to the aircraft are switched to the autopilot outputs to let the autopilot recover the aircraft from stall.

A stall occurs when the flow separates from the upper surface of the wing at high angles of attack. This results in a rapid decrease in the wing lift coefficient and an increase in the drag coefficient. Figure 1 shows the change in the wing lift coefficient as the effective angle of attack increases all the way up to 90 degrees. The effective angle of attack (αeff) is the wing angle of attack when the effect by wing incidence angle, the wing zero-lift angle of attack and the induced angle of attack due to dihedral in sideslip are considered such that at αeff  = 0° the lift coefficient is always zero.

Figure 1: Model for wing lift coefficient in stall. [1]

Figure 2 shows how the increase in drag coefficient is modeled in the library. After the maximum lift coefficient is achieved, the wing drag coefficient starts to follow a sine curve toward the maximum drag coefficient value at αeff  = 90°.

Figure 2: Model for wing drag coefficient in stall. [1]

The first default plot shows the effective angle of attack and lift and drag coefficients of the main wing according to the stall models presented in Figures 1 and 2. The Wing alpha stall angle refers to the angle of attack when the wing lift coefficient stops following the linear lift curve slope, i.e. at the border of the blue and yellow curves in Figure 1, and the Wing alpha for max CL is the angle of attack at which the wing maximum lift coefficient is achieved. During the first 10 seconds of the simulation, it can clearly be seen in this plot how the lift coefficient rapidly starts to decrease as the angle of attack grows beyond the Wing alpha for max CL, whereas the drag coefficient increases due to the flow separation in stall.

The stall of the horizontal tail is also modeled in the library, and the second default plot shows the horizontal tail stall behavior. It should be noted that the horizontal tail lift coefficient does not achieve its maximum value at Horizontal tail alpha for max CL in this example. This is due to the elevator being deflected upward at the beginning of the simulation and thus decreasing the horizontal tail lift coefficient. The maximum lift coefficient for horizontal tail is calculated for an undeflected elevator.

Further explanation about stall and how it is modeled in the library can be found in the documentation for WingBody and HorizontalTail and in section 3.3.3 in Reference [1].


[1]  Erä-Esko, N. (2022). "Development and Use of System Modeler 6DOF Flight Mechanics Model in Aircraft Conceptual Design."
      Available atmodelica://Aircraft/Resources/Documents/EraeEskoThesis.pdf.

Parameters (4)


Value: 8000

Type: Height (m)

Description: Initial altitude


Value: 22.2222222222222

Type: Velocity (m/s)

Description: Initial total velocity


Value: 0

Type: Angle (rad)

Description: Initial pitch angle


Value: 0

Type: Angle (rad)

Description: Initial flight path angle

Components (17)


Type: Ground


Type: World


Type: Saab2000


Type: Switch

Description: Switches between constant zero and autopilot signal


Type: Switch

Description: Switches between constant zero and autopilot signal


Type: Switch

Description: Switches between constant zero and autopilot signal


Type: Switch

Description: Switches between constant zero and autopilot signal


Type: BooleanStep

Description: Boolean step to trigger autopilot


Type: Constant

Description: Constant zero signal to ailerons, rudder and throttle position


Type: From_deg


Type: AutopilotTurboprop


Type: Constant


Type: Constant


Type: Constant


Type: From_deg


Type: Constant


Type: From_kmh