Autopilot algorithms
Nodes:nav
sim
com
| Module:shiva
| Parameters:Autopilot
The module provides control loops for navigation and stabilization.
Configuration parameters
-
Autopilot
Control parameters
-
mode
Operation modeoption
[off,local,primary,secondary,failsafe,auxillary]
The priority of data, published by the module. All priorities, except
local
are broadcasting data in network. -
Roll
Roll [deg] to Ailerons [%]
-
tc
Time constantreal
[s]
0.1
Smaller values make it faster to respond, larger values make it slower to respond. The error is divided by this time constant to get the rate setpoint.
-
Kp
Proportional gainreal
2
-
Ki
Integral gainreal
2.5
-
Kd
Differential gainreal
-
Kff
Feed forward gainreal
-
Lp
Rate limitreal
[deg/s]
40
-
Li
Integral limitbyte
[%]
10
-
Lo
Output limitbyte
[%]
100
-
rdiff
Rate limit diffreal
-
ifactor
Integral large error factorword
[deg/s]
-
trim
Regulator output trimming factors.
-
low
Low speed trimreal
[%]
-
high
High speed trimreal
[%]
-
flaps
Flaps trimreal
[%]
-
-
gain
Regulator output gains.
-
low
Low speed gainreal
-
high
High speed gainreal
-
flaps
Flaps gainreal
-
stab
Stability gainreal
This value is the gain multiplier for ailerons control when estimated stability is 1 (unstable). I.e. when parameter set to
0.2
- the ailerons output will be multiplied by0.2
when in stall condition, thus lowering the output value. For reverse ailerons - set parameter to negative, i.e. when set to-0.5
, the ailerons gain will be-0.5
in stall condition, making it reversed, and zero at about0.5
of estimated stability. See chart for details.
-
-
cmd
Setpoint
-
max
Setpoint limitreal
[deg]
45
-
slew
Setpoint slew rate limitword
[deg/s]
40
-
diff
Setpoint limit diffreal
-
offset
Setpoint offsetreal
[deg]
-
-
-
Pitch
Pitch [deg] to Elevator [%]
-
tc
Time constantreal
[s]
0.5
Smaller values make it faster to respond, larger values make it slower to respond. The error is divided by this time constant to get the rate setpoint.
-
Kp
Proportional gainreal
6
-
Ki
Integral gainreal
3.5
-
Kd
Differential gainreal
-
Kff
Feed forward gainreal
-
Lp
Rate limitreal
[deg/s]
40
-
Li
Integral limitbyte
[%]
25
-
Lo
Output limitbyte
[%]
100
-
rdiff
Rate limit diffreal
-
ifactor
Integral large error factorword
[deg/s]
-
trim
Regulator output trimming factors.
-
low
Low speed trimreal
[%]
-
high
High speed trimreal
[%]
-
flaps
Flaps trimreal
[%]
-
stab
Stall condition trimbyte
[%]
The estimated stability value will be multiplied by this factor and subtracted from elevator control [%]. This will make elevator down when in stall condition.
-
-
gain
Regulator output gains.
-
low
Low speed gainreal
-
high
High speed gainreal
-
flaps
Flaps gainreal
-
-
cmd
Setpoint
-
max
Setpoint limitreal
[deg]
20
-
slew
Setpoint slew rate limitword
[deg/s]
10
-
diff
Setpoint limit diffreal
-
offset
Setpoint offsetreal
[deg]
-
-
-
Yaw
Yaw [deg] to Rudder [%]
-
tc
Time constantreal
[s]
2.5
Smaller values make it faster to respond, larger values make it slower to respond. The error is divided by this time constant to get the rate setpoint.
-
Kp
Proportional gainreal
6
-
Ki
Integral gainreal
1.1
-
Kd
Differential gainreal
-
Kff
Feed forward gainreal
-
Lp
Rate limitreal
[deg/s]
40
-
Li
Integral limitbyte
[%]
5
-
Lo
Output limitbyte
[%]
100
-
rdiff
Rate limit diffreal
-
ifactor
Integral large error factorword
[deg/s]
-
trim
Regulator output trimming factors.
-
low
Low speed trimreal
[%]
-
high
High speed trimreal
[%]
-
flaps
Flaps trimreal
[%]
-
-
gain
Regulator output gains.
-
low
Low speed gainreal
-
high
High speed gainreal
-
flaps
Flaps gainreal
-
-
slew
Yaw setpoint slew rate limitword
[deg/s]
-
slip
Slip error to yaw rate proportional gainreal
2
-
-
Bearing
Waypoint to Roll [deg]. L1 controller for trajectory navigation.
-
dist
L1 periodreal
[m]
25
-
damp
Damping factorreal
0.9
-
radius
Waypoint switch radiusword
[m]
50
The waypoint is passed when the distance is lower than this value.
-
trig
Waypoint heading rate switch triggerword
[deg/s]
10
Another way to detect waypoint passed condition, i.e. when the rate of heading to the waypoint is higher than this value - the waypoint is considered as passed.
-
topt
Turn direction optimizationoption
[optimized,shortest]
Enabling this option will optimize turn directions to avoid large bank angle changes. I.e. for U-turns this makes aircraft to continue existing turn maneuver when applicable.
-
-
Airspeed
Kinetic Energy to Pitch (TECS). This controller regulates rate of energy by changing the commanded pitch angle.
-
tc
Time constantreal
[s]
6
Smaller values make it faster to respond, larger values make it slower to respond. The error is divided by this time constant to get the rate setpoint.
-
Kp
Energy rate error gainreal
0.5
The energy rate error is multiplied by this factor to provide pitch angle.
-
Ki
Integrator gainreal
1.1
Trimming for the pitch angle to maintain commanded rate of energy.
-
Li
Integral limitbyte
[deg]
-
weight
Speed vs altitude tecs weighting factorreal
1
This parameter adjusts the amount of weighting that the pitch control applies to speed vs height errors. Setting it to 0 will cause the pitch control to control height and ignore speed errors. This will normally improve height accuracy but give larger airspeed errors. Setting it to 1 will cause the pitch control loop to control speed and ignore height errors. This will normally reduce airspeed errors, but give larger height errors. The value of 0.5 allows the pitch control to simultaneously control height and speed.
-
slew
Speed setpoint slew ratereal
[m/s^2]
1
Commanded airspeed rate of change limit.
-
-
Altitude
Potential Energy to Throttle (TECS). This controller regulates rate of energy by changing the engine throttle.
-
tc
Time constantreal
[s]
10
Smaller values make it faster to respond, larger values make it slower to respond. The error is divided by this time constant to get the rate setpoint.
-
Kp
Energy rate error gainreal
0.3
The energy rate error is multiplied by this factor to provide throttle.
-
Ki
Integrator gainreal
0.1
Trimming gain for the throttle to maintain commanded rate of energy.
-
roll
Roll to energy rate feedforwardreal
Increasing this gain increases the amount of throttle that will be used to compensate for the additional drag created by turning.
-
slew
Vertical speed setpoint slew ratereal
[m/s^2]
1
Commanded vertical speed rate of change limit.
-
-
Engine
RPM to Throttle governor
-
Kp
Proportional gainreal
2.5
-
Kd
Differential gainreal
3.1
-
Ki
Integral gainreal
-
Kff
Feed forward gainreal
0.5
-
rpm
Engine RPM
-
filter
Kalman filter
-
err
Rpm measurement errorword
[rpm]
100
-
proc
Process noisereal
0.2
-
rate
Rpm rate lp filterreal
0.1
-
-
cruise
Cruise rpmdword
[rpm]
This is the RPM setting for cruise speed.
-
max
Maximum rpmdword
[rpm]
This is the engine maximum allowed RPM.
-
min
Minimum rpmdword
[rpm]
This is the engine idle RPM.
-
slew
Rpm setpoint max slew rateword
[rpm/s]
500
Maximum slew rate for the commanded RPM
-
start
Startup rpm slew rateword
[rpm/s]
Maximum slew rate for the commanded RPM on startup procedure
-
-
thr
Throttle setpoint
-
max
Max throttlebyte
[%]
100
This is the maximum throttle that can be used by the regulator. For overpowered aircraft, this should be reduced to a value that provides sufficient thrust to climb at the maximum pitch angle.
-
min
Min throttlebyte
[%]
This is the minimum throttle that can be used by the regulator. For electric aircraft this will normally be set to zero, but can be set to a small non-zero value if a folding prop is fitted to prevent the prop from folding and unfolding repeatedly in-flight or to provide some aerodynamic drag from a turning prop to improve the descent rate. For aircraft with internal combustion engine this parameter should be set for desired idle rpm.
-
slew
Throttle max slew ratebyte
[%/s]
Maximum slew rate for the commanded throttle
-
start
Startup throttle slew ratebyte
[%/s]
10
Maximum slew rate for the commanded throttle on startup procedure
-
-
prop
Prop pitch
-
max
Max prop pitchreal
[%]
100
This is the maximum prop pitch that can be used by the regulator.
-
min
Min prop pitchreal
[%]
This is the minimum prop pitch that can be used by the regulator.
-
slew
Prop max slew ratebyte
[%/s]
Maximum slew rate for the commanded prop
-
start
Prop setting on startupreal
[%]
-
gain
Prop multiplier on low rpmreal
0.1
-
-
glider
Engine Governor RPM to Prop pitch [%]
-
Kp
Proportional gainreal
-
Kd
Differential gainreal
-
Ki
Integral gainreal
-
-
-
Taxi
Taxiways navigation
-
Steering
Yaw [deg] to Steering [%]
-
tc
Time constantreal
[s]
2.5
Smaller values make it faster to respond, larger values make it slower to respond. The error is divided by this time constant to get the rate setpoint.
-
Kp
Proportional gainreal
5
-
Ki
Integral gainreal
0.1
-
Kff
Feed forward gainreal
0
-
Lp
Rate limitreal
[deg/s]
1000
-
Li
Integral limitbyte
[%]
5
-
gain
Steering high speed gainreal
0.1
-
-
Track
Crosstrack [m] to Yaw [deg]
-
dist
L1 periodreal
[m]
6
-
damp
Damping factorreal
1.7
-
trig
Taxiway switch radiusword
[m]
15
-
-
Brakes
Speed to Brakes [%]
-
Kp
Proportional gainreal
10
-
Kd
Differential gainreal
-
-
-
Flaps
Auto flaps control
-
max
Vso flapsbyte
[%]
-
min
Vsi flapsbyte
[%]
-
step
Step in automatic modebyte
[%]
-
takeoff
Takeoff flapsbyte
[%]
-
approach
Approach flapsbyte
[%]
-
final
Final approach flapsbyte
[%]
-
ld
Flaps ld gainreal
Flaps level will affect proportionally the LD ratio when this parameter is set. The corrected LD ratio is used by landing procedure only to estimate landing patterns. F.ex. when set to
0.6
- full flaps will make LD ratio (used by landing procedure) to be 0.6 of estimated LD, but 50% flaps will make LD to be 0.8 of estimated value.
-
-
Hover
Hovering regulators
-
tc
Time constantreal
[s]
4
Smaller values make it faster to respond, larger values make it slower to respond. The error is divided by this time constant to get the rate setpoint.
-
pitch
Velocity X [m/s] to Pitch [deg]
-
Kp
Proportional gainreal
3
-
Ki
Integral gainreal
0.1
-
Kd
Differential gainreal
-
Kff
Feed forward gainreal
-
Li
Integral limitbyte
[deg]
8
-
vel
Speed limitreal
[m/s]
-
-
roll
Velocity Y [m/s] to Roll [deg]
-
Kp
Proportional gainreal
3
-
Ki
Integral gainreal
0.1
-
Kd
Differential gainreal
-
Kff
Feed forward gainreal
-
Li
Integral limitbyte
[deg]
5
-
vel
Speed limitreal
[m/s]
-
-
-
Takeoff
Takeoff procedure
-
mode
Takeoff modeoption
[runway,launcher,helipad]
-
check
Checks to perform before takeoff
-
pwr
Power stateoption
Will cancel takeoff if power is not valid
-
hdg
Heading errorbyte
[deg]
Will cancel takeoff if heading error is more than this value
-
xtrack
Crosstrack errorbyte
[m]
Will cancel takeoff if crosstrack error is more than this value
-
-
run
Takeoff Run phase parameters
-
speed
Max speedbyte
[m/s]
-
pitch
Run phase pitch anglebyte
[deg]
-
-
climb
Takeoff Climbing phase parameters
-
pitch
Liftoff phase pitch anglebyte
[deg]
-
altitude
Liftoff phase altitudebyte
[m]
-
thr
Climbing throttlebyte
[%]
-
-
launcher
Launcher parameters
-
acc
Launcher trigger accelerationbyte
[m/s^2]
-
tdelay
Launcher throttle delayreal
[s]
-
cdelay
Launcher controls delayreal
[s]
-
-
-
Landing
Landing procedure
-
mode
Landing modeoption
[runway,parachute,helipad]
-
agl
Agl correction altitudeword
[m]
-
app
Approach phase parameters
-
Kp
Delta [m] to speed [m/s] gainreal
0.1
-
thr
Approach throttlebyte
[%]
5
-
cap
Energy capacity factorreal
-
airbrk
Distance error[m] to airbrake[%]
-
Kp
Proportional gainreal
-
Ki
Integral gainreal
-
Lp
Proportional limitbyte
[%]
-
Li
Integral limitbyte
[%]
-
Lo
Output limitbyte
[%]
-
bias
Biasbyte
[%]
-
-
-
flare
Flare phase parameters
-
alt
Flare phase altitudebyte
[m]
20
-
pitch
Flare max pitch angle limitreal
[deg]
-
sink
Flare sink ratereal
[m/s]
0.5
-
airbrk
Vertical speed error[m/s] to airbrake[%]
-
Kp
Proportional gainreal
-
Lo
Output limitbyte
[%]
-
-
-
touch
Touchdown phase parameters
-
alt
Touchdown phase altitudebyte
[m]
3
-
pitch
Touchdown max pitch angle limitbyte
[deg]
6
-
VS1G
Stall speed at 1g load factorreal
[m/s]
0
This speed is defined as the one-G stall speed at which the airplane can develop a lift force (normal to the flight path) equal to its weight.
-
-
run
Run phase parameters
-
speed
Speed to trigger run phasebyte
[m/s]
-
acc
Acceleration to trigger run phasebyte
[m/s^2]
-
alt
Altitude check to trigger run phaseoption
-
brakes
Brakes slew rate limitbyte
[%/s]
-
thr
Throttle blockingoption
[cut,override,shutdown,ignore]
-
-
-