PID: In there be dragons!


Written by Greg Gimlick
Helicopters
Column
As seen in the Fall 2018 issue of
Park Pilot.


>> PID is an abbreviation that strikes fear in the hearts of most RC helicopter pilots who are using flybarless control systems. Some say it means “programming includes demons,” but it’s actually short for proportional integral derivative.

My intent is to introduce PID in watered-down layman’s terms. If you’re an engineer who is familiar with PID, you will probably cringe, but this isn’t meant for you—keep that in mind when you write in to pin my ears back. I put in the formula just for you!

The purpose: The three components of PID work together to stabilize our helis. Flybarless control units are three-axis gyros, and each axis has its own PID settings. You can’t change one without affecting the others, but you can sometimes adjust one without adjusting the others. In reality, they are all connected and play individual roles to stabilize our aircraft.



A screenshot of the Baseflight cross-platform configuration tool for the Baseflight flight control system (available on the Chrome webstore at chrome.google.com/webstore/category/extensions) and the PID setting screen for one of Greg’s quadcopters. The flight controller in a helicopter would be done the same way if it requires Baseflight for adjustment.


Think of the process as a closed loop (which it is) where there is movement on a particular axis. A sensor reads that and sends a message to the flight controller, where the error is read and a correction is sent to the particular servo controlling that function. This happens at an astronomical speed, repeatedly, every second. P, or proportional gain, determines the strength of the correction. D, or derivative gain, damps out oscillation such as tail wagging. I, or integral gain, increases accuracy by reducing drift.



The special Spektrum AR636A receiver/flight controller (spektrumrc.com) on Greg’s Blade Fusion 270 heli uses an aluminum bottom case half that is affixed to a cushioned mount to alleviate vibration.


The P gain acts like a spring—the tauter the spring, the firmer the correction. Like a spring, there’s no damping. D gain adds that damping (think shock absorber), while I gain keeps it coming back to zero.

One of the best descriptions of what PID does, comes from an interview with Gary Wright in the August 2014 “RC Helicopters” column in Model Aviation:

“Simply stated, if it’s not stable, your P gain may be wrong. If it’s not consistent, like a tail whipping when doing pirouettes in forward flight, your I gain is not right. If it bounces or rebounds on stops, or doesn’t stop precisely, your D gain is probably incorrect.”

Gary is a helicopter master. I encourage you to look the article up in the archives on ModelAviation.com to read his take on PID.



Cleanflight (cleanflight.com) is another interface app to adjust PIDs, depending on the flight controller that is used.


The other gem from Gary is:

“If you study the PID algorithm (it won’t be difficult to find on the internet), you’ll see how it utilizes the three gains: proportional to know the amplitude of corrective action that’s needed; integral to maintain consistency of rate over time; and derivative to refine the stops.”

The man says more in a sentence than I can get across in two pages!



The Fusion 270 employs a telemetry-based text generator for accessing the PID settings to make changes or to check the present settings.


The bottom line: Maybe I should use bottom lines because there are several things to keep in mind before you start mucking around to change the PID values.

• Write down the initial PID factory settings before ever making a change.

• Vibration is a hidden demon that can affect flight controllers. Proper mounting is paramount, along with the careful balancing of all components. Any vibration can be interpreted as movement on one of the axes and confuse the corrective action of the flight controller.

• Depending on the flight controller manufacturer, a factory reset will either return you to the original setup or wipe all of the settings clean and give you a blank slate.

• Helicopters, such as those from Blade (bladehelis.com), come with a generic setting that is optimized for the general purpose for which the machine was intended and provide a proven baseline from which it can be modified. This depends on your particular style and expertise. Try the factory settings before making changes.

• Read the manual for your particular flight controller!

• Not all manufacturers use the same nomenclature or scale for PID numbers.

• Make one change at a time, see what it does, and then decide on the next action.

• Familiarize yourself with the method used by your flight controller to make changes. Some can be done through the transmitter, while others require the use of a software interface and laptop.

• P gain is often referred to as the master and the one to be adjusted first.

Wrap up: This is a subject that many people who are smarter than I argue ad nauseum. Try to get a basic understanding by reading some of these references:

• Jim Ryan’s “Heli Talk” column in the July 2016 issue of Electric Flight.

• Alex’s Secrets of the PID on RCTodayShow.com (rctodayshow.com/tech-topics/ten-minute-tips/alexs-secrets-of-the-pid).

• PID Basics by David Buxton on RCHelicopterFun.com (rchelicopterfun.com/pid-basics.html).



This is the screen on Greg’s Spektrum DX9 where changes to the PID would be made. Carefully read and follow the manual’s instructions. Be sure to copy the original settings before making changes.


Don’t get so wrapped up in PID tuning that it takes away from your enjoyment of flying the helicopter. A basic understanding of the relationship is all that’s required. Slowly read the manual then reread it. Most problems can be solved by going through the troubleshooting guide for your particular machine and following the steps laid out there.

-Greg Gimlick
maelectrics@gimlick.com




Article: 

Add your thoughts to the article

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.