Offer of help with tuning PID loops

I've noticed quite a lot of debate about tuning PID loops. I think I might be able to help since I've got 40 years experience designing autopilots for air vehicle flight control and navigation. I could give general advice on the best ways of using the P, I and D terms for both primary stability and navigation loops. With more info on the application aircraft I could probably come up with suggestions on which gains to use along with trial valuesI think a combination of flight trials and PC-based control system analysis is likely to produce a better result than trials alone.Any takers?
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • George, your last comment about the tuning strategy is a very wise one and should be heeded by all users: tuning to desired input will give a good system response, but this makes no statement at all about the robustness of the controller. A quadrotor that is tuned to behave wonderfully to steering commands might go unstable at the slightest wind gust, simply because the user has found a PID tuning solution with no robustness margin.

    This also highlights the core problem of tuning gains only by flight testing: it is very hard to quantify stability and robustness margins without having some sort of simulation model.

  • Sorry but I should have made clear that my autopilot design experience relates to fixed wing aircraft so  won't be ab;le to help with rotary airframes.

    I should also emphasise that the database I have relates to PID control only. I've established which stability derivatives the PI gains depend on so that the job for the user becomes one of estimating certain stability derivatives (I've developed algortihms for that too).The PID gains then drop out as functions of speed. Robustness is assessed by perturbing the values of the key stability derivatives.

    May I also caution about the use of standard methods of tuning PID loops. They tend to concentrate on obtaining a good response to the desired input. In a flight control cntext, it is just as important to be able to reject unwanted inputs and this changes the PID tuning strategy.

  • Hi,
    i have made a auto-pid tuner (beta version), i used flightgear to stimulate it.
    The tuner wait until the process vibrates and then it computes the params.

     

     

  • George - Do you happen to have any experience with H-infinity controls and Mu-synthesis?

  • Roy, I'm currently in the process of designing and implementing an adaptive controller for my Arducopter. I'm not sure if the APM board is powerful enough, I'm afraid it might not be. But my plan then is to use the Multipilot32 board instead, at least my IMU will be compatible to it.

    A well-tuned adaptive controller will offer equally good control performance across a large range of parameters, meaning vastly different airframes, inertias, and weights. However, while much simpler for the end user, it will require more work from the developer. Anyway, I think a robust adaptive controller will be a very good addition to the Arducopter toolbox.

    In the short term, I think end users would be greatly helped with a very simple simulation of a basic quadrotor system. They should be able to enter parameters of their system and also input PID gains, just to get an approximate idea of the what values yield stable results. Of course there is one problem: people would still need to find out mass and inertia of their system, at least approximately.

  • Hi Simon,
    The pinning is not compatible to the diydrones IMU
    but the maple concept was adapted by Roberto with the MP32 board: http://www.virtualrobotix.com/page/multipilot32-1

    Anyway, an offline solution could be really interesting.
    PID adjustment per testflight always has higher propeller costs than a PC solution would :)
  • George Tarrant writes:

    I think I might be able to help since I've got 40 years experience designing autopilots for air vehicle flight control and navigation.

     

    thank you for your offer. I am new to all this (maiden flight was 3 days ago) and I could probably need some help once the weather clears up and I can gather some data.

     

    Roy Brewer writes (nice name, cheers):

    A more powerful processor may have sufficient horsepower for adaptive control loops or a more robust control schemes. But I suspect the for the AVRs, the off-line approach is best.

    I recently discovered the Maple at sparkfun.com. It's an ARM based Cortex-M3 board (32Bit,  72 MHz, 128k Flash and 20KB SRAM). The board is Arduino compatible (they even provide the same IDE and libraries as the Arduino project).

     

    Compared to the AVR based Arduino and APM, the Maple gives much more performance, Memory at a lower price (Arduino Mega $64.95, Maple $44.95). The Arm might even have a lower power consumption (couldn't be arsed to check that) and therefore lower heat emission.

     

    Cheers,

    -S

  • George ,

    I totally agree.

     

    See my comments here for some interesting papers on the subject: http://www.diydrones.com/profiles/blog/show?id=705844%3ABlogPost%3A...

     

    A more powerful processor may have sufficient horsepower for adaptive control loops or a more robust control schemes. But I suspect the for the AVRs, the off-line approach is best.

     

    - Roy

  • Developer
    Sounds good. The NTUN log of AC2 has a lot of information around navigation which should help. We have a crosstrack algorithm that needs PID tuning to prevent overshoot. I would love to get AC2 riding rails to the waypoints.
  • 3D Robotics
    Thanks, George--that's very generous of you. Also users should note that we have a quite comprehensive guide to PID tuning for ArduCopter here:
    http://code.google.com/p/arducopter/wiki/AC2_Tweaks

    A slightly less comprehensive guide for APM is here:
    http://code.google.com/p/ardupilot-mega/wiki/Tuning
This reply was deleted.