Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PID time constants
#1
Does anybody have an idea about the lenght of time constants involved in
PID regulation? I'm specifically referring to Integral action.

Briefly, for Integral action: at each tick, the difference between setpoint and
sensor value is evaluated and such error is added up to formerly calculated
values, probably eliminating the oldest one.

This algorithm should contrast backgroud sources of error (wind?) that
Derivative action doesn't detect (or not much) because those are not
that abrupt (betweek one tick and another, error has a small value).


So, the question is: what's the tick frequency? Can it be trimmed?

My experience is about Ardupilot for Pixhawk but any other information
is welcome.

In this context there is parameter ATC_RAT_RLL_FLTD defined "Roll axis rate
controller derivative frequency in Hz"  that seems to control Derivative
action tick. But nothig like that exists for Integral action.

I find relatively easy to trim for Derivative action parameters. For Integral
is a mess mainly because it is almost impossible to have the same background
conditions.


Thank you.
Reply
Login to remove this ad | Register Here
#2
I had a prod around in the code, but I just don't know enough about Ardupilot. The hardware definitions have the frequency of the MCU, but it sounds like the various clocks are scaled off the back of that. I did find this post that makes it look like it's 480Hz for Pixhawk 1 and 2.

https://discuss.ardupilot.org/t/control-...ency/16914

I'd be very surprised if it's possible to run the different elements of the PID loop at different frequencies - at least not out-of-the-box. It would make a real mess of the scheduler.

The ground is for dead people.
Reply
#3
(16-May-2022, 10:20 AM)Banelle Wrote: I had a prod around in the code, but I just don't know enough about Ardupilot. The hardware definitions have the frequency of the MCU, but it sounds like the various clocks are scaled off the back of that. I did find this post that makes it look like it's 480Hz for Pixhawk 1 and 2.

https://discuss.ardupilot.org/t/control-...ency/16914

I'd be very surprised if it's possible to run the different elements of the PID loop at different frequencies - at least not out-of-the-box. It would make a real mess of the scheduler.

In the meantime, thanks to lemonyLeprosy indications, I've found one page from Oscar Liang that is very interesting:

https://oscarliang.com/best-looptime-flight-controller/

The key points are:
- the sampling frequency
- the regulation loop frequency
- the various filters set-up

All that combined, make the matter rather hard.

As I pointed out, the relevant issue is to reproduce the same background conditions, of
course. Wind cannot be driven.  You change, you fly .. and you do not know.
[-] The following 1 user Likes Electronic's post:
  • Lemonyleprosy
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Tutorial understand PID TUNING in 2minutes or less. Or your money back roger74 15 4,185 19-Nov-2020, 06:49 AM
Last Post: romangpro
  Tutorial PID tuning cheatsheet voodoo614 7 48,847 18-Jul-2020, 12:03 AM
Last Post: voodoo614
  Tutorial Taranis two switch arm and PID adjustment oyvinla 8 13,765 10-Sep-2018, 01:04 AM
Last Post: chupo_cro


Login to remove this ad | Register Here