Gain Scheduling Control Simulator Back
Control Engineering

Gain Scheduling Control Simulator

Control a nonlinear plant whose gain changes with the operating point. Switch between fixed-gain and scheduled control and move the operating point to watch the actual loop gain, the deviation from the design value and the estimated overshoot update in real time — and feel why scheduling is needed.

Parameters
Operating point (scheduling variable)
%
A directly measured quantity — airspeed, level, throughput
Plant gain at low operating point
Process gain at operating point 0%
Plant gain at high operating point
Process gain at operating point 100%
Design (nominal) proportional gain Kdesign
Controller gain tuned at the nominal operating point 50%
Controller strategy
Fixed-gain, or scheduled control that tracks the operating point
Results
Plant gain at current point
Controller gain Kc
Actual loop gain
Loop-gain deviation (%)
Estimated overshoot (%)
Performance consistency
Operating envelope — plant gain, controller gain, loop gain

The horizontal axis is the scheduling variable, 0–100%. The plant gain (blue) rises across it. With the fixed strategy the controller gain (orange) is flat; with the scheduled strategy it mirrors the plant gain, so their product — the loop gain (green) — stays flat.

Loop gain vs operating point
Estimated overshoot vs operating point
Theory & Key Formulas

$$K_{plant}(s)=K_{low}+(K_{high}-K_{low})\,\frac{s}{100}$$

The plant gain varies linearly with the scheduling variable s [%]. Klow and Khigh are the process gains at operating points 0% and 100%.

$$K_c=K_{design}\cdot\frac{K_{plant,nominal}}{K_{plant}}\ \Rightarrow\ K_c\,K_{plant}=\text{const}$$

The scheduled controller gain Kc is adjusted inversely to the plant gain, relative to the plant gain at the nominal operating point 50%, Kplant,nominal. This keeps the loop gain Kc·Kplant constant.

$$\zeta=\zeta_{nom}\sqrt{\frac{K_{design}\,K_{plant,nominal}}{K_c\,K_{plant}}},\qquad M_p=e^{-\pi\zeta/\sqrt{1-\zeta^{2}}}$$

Modelling the closed loop as second-order, the damping ratio ζ scales with the inverse square root of the loop gain (nominal damping ζnom=0.6). The overshoot Mp follows from ζ. Because scheduling keeps the loop gain constant, the response stays consistent across the whole operating range.

What is Gain Scheduling?

🙋
I keep seeing "gain scheduling" in control textbooks. Roughly speaking, what does the method actually do?
🎓
Roughly, it means "switch the controller's gains depending on the operating point". Most real plants are nonlinear — their process gain changes with where they are operating. An aircraft's aerodynamics change drastically with speed and altitude, a tank changes with level, a chemical reactor changes with temperature. A controller perfectly tuned at one operating point performs poorly the moment you move it elsewhere. So gain scheduling changes the gains to suit the operating point.
🙋
I see. But can't I just freeze the gain at one value? I'd be tempted to pick an average value.
🎓
That doesn't work well. Pick "Fixed-gain control" on the left and move the operating-point slider. Where the plant gain is low, the loop gain is small and the response is sluggish; where it is high, the loop gain is excessive and the overshoot grows. With the defaults, the loop gain reaches 60% above the design value at operating point 100%. Compromising on an average value only gives you mediocre performance at both ends. That's the limit of a fixed gain.
🙋
So what changes when I switch to scheduled control?
🎓
Switch to "Gain-scheduled control" and move the operating point again. See how the controller gain Kc changes inversely with the plant gain? If the plant gain doubles, Kc is halved. Then the loop gain — their product — stays constant. With a constant loop gain, the damping ratio and overshoot are nearly the same across the whole range. When the "Loop gain vs operating point" chart becomes a flat horizontal line, that's the proof scheduling is working.
🙋
Clever. But how does Kc know "the current operating point"? Does it measure the plant gain directly?
🎓
Good question. The plant gain itself is hard to measure. So instead you measure a "scheduling variable" — a quantity that represents the nonlinearity well and can be measured directly and quickly. For flight control it's airspeed or dynamic pressure; for a tank, the level; for an engine, the speed or load. In practice you store gains tuned for several operating points in a table, then look up and interpolate the table using the measured scheduling variable. That's why it's called a "schedule".
🙋
Is it different from adaptive control? Both seem to change the gain automatically.
🎓
They look similar but differ. Adaptive control observes the plant's response during operation and estimates and adjusts the gains. Gain scheduling does all the design beforehand at each operating point, then during operation simply looks up the predetermined gains using the scheduling variable. So its behaviour is predictable and easy to verify. The reason almost every aircraft flight control system uses gain scheduling is exactly that predictability and ease of certification — it's a solid, overwhelmingly common method in practice.

Frequently Asked Questions

Gain scheduling is a very widely used practical method for controlling a nonlinear plant whose characteristics — especially its gain — change with the operating point. A set of controller gains, each tuned for a particular operating point, is prepared in advance, and these gains are continuously switched and interpolated based on a directly measured scheduling variable (airspeed for an aircraft, level for a tank, throughput for a process). This keeps the loop gain constant across the whole operating envelope so that the closed-loop response stays consistent.
When the plant gain and speed change with the operating point, a fixed-gain controller can only be well tuned at one point. Where the plant gain is low the response becomes sluggish, and where the plant gain is high the loop gain becomes excessive and the response turns oscillatory or even unstable. With this tool's defaults (gainLow=1, gainHigh=4), a fixed-gain controller reaches a loop gain 60% above the design value at operating point 100%. Gain scheduling makes the controller gain inversely proportional to the plant gain to keep the loop gain constant.
Ideally the scheduling variable (1) represents the plant's nonlinearity well, (2) can be measured directly, quickly and reliably, and (3) is an exogenous quantity not strongly affected by the control input. Typical choices are airspeed or dynamic pressure and altitude for flight control, level itself for tank level control, reaction temperature for a chemical reactor, and speed or load for engine control. Choosing the wrong scheduling variable means the gains no longer track the true operating point, and the benefit of scheduling is lost.
Common pitfalls are: (1) interpolation between operating points that is too coarse, so the loop gain drifts between the tuned points; (2) a fast-varying scheduling variable, which breaks the assumption behind the frozen linear design done at each point; and (3) stability that is guaranteed at each operating point but must still be checked for the trajectory as the operating point moves. In practice you place the operating points densely enough, limit the rate of change of the scheduling variable, and verify with simulations over the full envelope.

Real-World Applications

Aircraft flight control: This is the most classic and representative use of gain scheduling. Because an aircraft's aerodynamics change greatly with airspeed, dynamic pressure, altitude and weight, the gains of the flight control law are managed in tables indexed by these quantities. At low speed and high altitude the control surfaces are weak; at high speed and low altitude they are too effective and prone to oscillation. Scheduling secures consistent handling and stability margins across the entire flight envelope, from take-off through cruise to landing. Its predictability and ease of certification make it standard on both civil and military aircraft.

Process control (tank level and flow): In level control the tank cross-section may not be constant and the outlet valve characteristic may be nonlinear, so the level itself is used as the scheduling variable to switch PID gains. In chemical reactor temperature control the reaction rate varies exponentially with temperature, so switching to gains tuned for each temperature range is standard practice. For extremely nonlinear systems such as pH control, gain scheduling is almost mandatory.

Engine and powertrain control: Automotive engines and gas turbines have response characteristics that change strongly with speed, load and intake. To control them consistently from idle to high speed, the speed or load is used as the scheduling variable to switch actuator control gains. Electric-vehicle motor control uses similar scheduling because torque response changes across the speed range.

Wind turbines and robotics: A wind turbine's blade aerodynamics change with wind speed, so the pitch control gain is scheduled on wind speed. In a robot arm, the moment of inertia and gravity load change with posture, so the joint angles are used as scheduling variables to adjust each joint's gains. The wider the range of motion and the stronger the nonlinearity, the more valuable gain scheduling becomes.

Common Misconceptions and Pitfalls

The most common misconception is "if it is stable at every operating point, the whole system is stable". Gain scheduling performs a linear design at each frozen operating point and interpolates between them. But the system while the operating point is moving is no longer a frozen linear system. As long as the scheduling variable moves slowly (the "slow variation" assumption holds), the per-point designs are valid; but if the variable moves fast, the system can be unstable overall even though it is stable at each point. In practice you cap the rate of change of the scheduling variable and always run time-response simulations over the full envelope to verify.

Next is the complacency that "a few operating points are enough". This tool uses a simple model where the plant gain varies linearly, but a real nonlinear plant's gain curves strongly with the operating point. Spacing the operating points too coarsely lets the loop gain drift away from the design value between the tuned points, degrading the response in those intervals. The stronger the nonlinearity, the more densely the operating points must be placed. The choice of interpolation scheme (linear interpolation versus piecewise constant) also affects how smoothly the loop gain varies and should be considered at design time.

Finally, the confusion that "gain scheduling and adaptive control are the same". Adaptive control observes the plant during operation and estimates and updates its parameters, whereas gain scheduling finishes all the design beforehand and during operation merely looks up gains using the scheduling variable. Because it is not observation-based, it cannot automatically cope with unknown changes in characteristics such as ageing or faults. In return, its behaviour is fully predictable and easy to verify and certify. Gain scheduling is chosen in fields like aerospace, where safety guarantees are paramount, precisely for that predictability. The two are not competitors but methods to be used according to the requirements.

How to Use

  1. Set operating point range (opNum, opRange) to define your nonlinear plant's nominal and boundary conditions—typical aerospace applications span altitude 0–12 km affecting air density and aerodynamic gain
  2. Configure gain scheduling via glNum/glRange (low-gain table) and ghNum/ghRange (high-gain table) to create piecewise-linear gain maps across the operating envelope
  3. Enter proportional controller gain kpNum/kpRange, then toggle between fixed-gain and scheduled modes to observe Controller gain Kc, actual loop gain, and overshoot variance across the full operating range

Worked Example

Aircraft pitch-rate control with plant gain varying 0.8–2.2 rad/s/V across altitude. Set opRange = 0–12 km; glNum = 3 gains at low altitude (0.8, 1.1, 1.4 rad/s/V); ghNum = 3 gains at high altitude (1.6, 1.9, 2.2 rad/s/V). Fixed-gain Kc = 0.5 V/rad yields overshoot 8% at 2 km but 34% at 10 km altitude. Scheduled gain Kc = 0.45 at low altitude, 0.23 at high altitude maintains overshoot within 9–11% across entire envelope, reducing performance consistency deviation from 18% to 2%.

Practical Notes

  1. Gain scheduling mitigates nonlinearities in marine thruster control where propeller gain doubles from slow-speed 0.3 to high-speed 0.6 rad/s/N—fixed PID alone causes oscillation at cruise
  2. Monitor Loop-gain deviation (%)—values exceeding 15% indicate insufficient scheduling resolution; add intermediate gain breakpoints
  3. For thermal processes, verify glRange and ghRange bracket actual operating gain; undersized tables leave portions uncompensated