-
Notifications
You must be signed in to change notification settings - Fork 1.7k
PID Attenuation and scaling
TPA [Throttle PID Attenuation] is what allows aircraft that are optimally tuned in the cruise flight range, based on throttle or airspeed, to dynamically adjust PID gains to prevent control oscillations.
TPA_Rate = percentage of PID attenuation that will occur when the throttle is increased above the TPA Breakpoint.
TPA_Breakpoint = the throttle micro-second value in the curve at which TPA_Rate will begin to be applied. Below that point the PIDs are not attenuated at all.
Firstly, set TPA_Rate = 15
as a starting point.
The PID's should be tuned in the throttle range your copter will comfortably cruise at - e.g. 1300 - 1600uS based on thrust to weight ratio and bank angle.
But once the throttle is moved higher than this point, you may start seeing oscillations. So begin increasing the TPA_Breakpoint to a throttle value just prior to the onset of those oscillations.
Then slowly increase the TPA_Rate value until the oscillations in the higher throttle range are gone.
It may need to be increase even more on powerful freestyle or race quads.
Note - On reverse motor 3D installs, TPA is not recommended.
For airplanes TPA_Rate works in a different way - It not only attenuates PID gains at higher throttle, but also boosts them at lower throttle, allowing for better control when flying or gliding at low speeds with minimal or no throttle.
TPA is expressed as a curve that boosts PIDs below the TPA Breakpoint and attenuates them above the breakpoint.
TPA_Rate = amount of attenuation apply to the PIDs. 100% TPA allows PIDs to be scaled by a factor of [2x boost]
[0.4 reduction]
.
TPA Breakpoint = the point in the throttle curve at which PIDs are not boosted or attenuated.
FW_TPA_TIME_CONSTANT = TPA smoothing and time delay constant, to reflect non-instantaneous speed/throttle response of the airplane.
Tune your PIDs to the throttle range you intend to fly your airplane. nav_fw_cruise_thr is ideal. Set that value as the TPA Breakpoint. e.g. 1400 - 1480uS
Once your P and D gains are tuned, and before you add TPA_Rate. You may notice when flying at lower throttle, your airplane handles more loosely. And when flying at higher throttle (up to full throttle) it begins to oscillate.
You can now start increasing the TPA_Rate value until those oscillations are gone or minimal in the higher throttle/air-speed range. This will also translate to better handling at lower throttle/air-speeds, by boosting the PID gains.
The TPA Time Constant feature uses an asymmetric filter, that effects both increasing and decreasing throttle/speed. Meaning it delays the Removal/Addition of the Attenuation/boost for the selected time period, when the throttle is moved above or below the TPA Breakpoint. Airplanes with low thrust/weight ratio generally need higher time constant for launch. While planes with a lower drag coefficient, also require a higher time constant during speed wash-off; requiring the constant to be balanced to suit your models requirements.
Note
The present airplane implementation has limits. Until air-speed support is introduced, INAV only uses the throttle for attenuation, which is relatively proportional to air-speed. But it can not attenuate the PIDs at lower throttle values if the airplane is placed into a dive, causing the air-speed to increase.
INAV Version Release Notes
8.0.0 Release Notes
7.1.0 Release Notes
7.0.0 Release Notes
6.0.0 Release Notes
5.1 Release notes
5.0.0 Release Notes
4.1.0 Release Notes
4.0.0 Release Notes
3.0.0 Release Notes
2.6.0 Release Notes
2.5.1 Release notes
2.5.0 Release Notes
2.4.0 Release Notes
2.3.0 Release Notes
2.2.1 Release Notes
2.2.0 Release Notes
2.1.0 Release Notes
2.0.0 Release Notes
1.9.1 Release notes
1.9.0 Release notes
1.8.0 Release notes
1.7.3 Release notes
Older Release Notes
QUICK START GUIDES
Getting started with iNav
Fixed Wing Guide
Howto: CC3D flight controller, minimOSD , telemetry and GPS for fixed wing
Howto: CC3D flight controller, minimOSD, GPS and LTM telemetry for fixed wing
INAV for BetaFlight users
launch mode
Multirotor guide
YouTube video guides
DevDocs Getting Started.md
DevDocs INAV_Fixed_Wing_Setup_Guide.pdf
DevDocs Safety.md
Connecting to INAV
Bluetooth setup to configure your flight controller
DevDocs Wireless Connections (BLE, TCP and UDP).md\
Flashing and Upgrading
Boards, Targets and PWM allocations
Upgrading from an older version of INAV to the current version
DevDocs Installation.md
DevDocs USB Flashing.md
Setup Tab
Live 3D Graphic & Pre-Arming Checks
Calibration Tab
Accelerometer, Compass, & Optic Flow Calibration
Alignment Tool Tab
Adjust mount angle of FC & Compass
Ports Tab
Map Devices to UART Serial Ports
Receiver Tab
Set protocol and channel mapping
Mixer Tab
Set aircraft type and how its controlled
Outputs Tab
Set ESC Protocol and Servo Parameters
Modes Tab
Assign flight modes to transmitter switches
Standard Modes
Navigation Modes
Return to Home
Fixed Wing Autolaunch
Auto Launch
Configuration Tab
No wiki page currently
Failsafe Tab
Set expected behavior of aircraft upon failsafe
PID Tuning
Navigation PID tuning (FW)
Navigation PID tuning (MC)
EZ-Tune
PID Attenuation and scaling
Tune INAV PID-FF controller for fixedwing
DevDocs Autotune - fixedwing.md
DevDocs INAV PID Controller.md
DevDocs INAV_Wing_Tuning_Masterclass.pdf
DevDocs PID tuning.md
DevDocs Profiles.md
OSD and VTx
DevDocs Betaflight 4.3 compatible OSD.md
OSD custom messages
OSD Hud and ESP32 radars
DevDocs OSD.md
DevDocs VTx.md
LED Strip
DevDocs LedStrip.md
Programming
DevDocs Programming Framework.md
Adjustments
DevDocs Inflight Adjustments.md
Mission Control
iNavFlight Missions
DevDocs Safehomes.md
Tethered Logging
Log when FC is connected via USB
Blackbox
DevDocs Blackbox.md
INAV blackbox variables
DevDocs USB_Mass_Storage_(MSC)_mode.md
CLI
iNav CLI variables
DevDocs Cli.md
DevDocs Settings.md
VTOL
DevDocs MixerProfile.md
DevDocs VTOL.md
TROUBLESHOOTING
"Something" is disabled Reasons
Blinkenlights
Sensor auto detect and hardware failure detection
Pixel OSD FAQs
TROUBLESHOOTING
Why do I have limited servo throw in my airplane
ADTL TOPICS, FEATURES, DEV INFO
AAT Automatic Antenna Tracker
Building custom firmware
Default values for different type of aircrafts
Features safe to add and remove to fit your needs.
Developer info
INAV MSP frames changelog
INAV Remote Management, Control and Telemetry
Lightweight Telemetry (LTM)
Making a new Virtualbox to make your own INAV
MSP Navigation Messages
MSP V2
OrangeRX LRS RX and OMNIBUS F4
Rate Dynamics
Target and Sensor support
Ublox 3.01 firmware and Galileo
DevDocs Controls
DevDocs 1wire.md
DevDocs ADSB.md
DevDocs Battery.md
DevDocs Buzzer.md
DevDocs Channel forwarding.md
DevDocs Display.md
DevDocs Fixed Wing Landing.md
DevDocs GPS_fix_estimation.md
DevDocs LED pin PWM.md
DevDocs Lights.md
DevDocs OSD Joystick.md
DevDocs Servo Gimbal.md
DevDocs Temperature sensors.md
OLD LEGACY INFO
Supported boards
DevDocs Boards.md
Legacy Mixers
Legacy target ChebuzzF3
Legacy target Colibri RACE
Legacy target Motolab
Legacy target Omnibus F3
Legacy target Paris Air Hero 32
Legacy target Paris Air Hero 32 F3
Legacy target Sparky
Legacy target SPRacingF3
Legacy target SPRacingF3EVO
Legacy target SPRacingF3EVO_1SS
DevDocs Configuration.md
Request form new PRESET
DevDocs Introduction.md
Welcome to INAV, useful links and products
iNav Telemetry
UAV Interconnect Bus
DevDocs Rangefinder.md
DevDocs Rssi.md
DevDocs Runcam device.md
DevDocs Serial.md
DevDocs Telemetry.md
DevDocs Rx.md
DevDocs Spektrum bind.md
DevDocs INAV_Autolaunch.pdf