Dinamic PID?

Hi everyone!

We are building a multicopter its going to fullfill several functions. So, the payload its going to change on every mode the drone will be used. The PID to carry 3kg payload on the bottom for example its not going do be the same to carry on only the camera.

So the question is if there is any way to setup several PID setup, and change them depending on the payload, may be with a button on the RC.

Thanks!

I guess you at least need a lua script or companion computer to write the parameters?
But I’m not sure what happen if the PID changed mid-air

1 Like

The best would be to find PIDs that works for the all payload weight range. I tuned copters that works fine from 0 to 13kg payloads

1 Like

You dont want to change the PIDs. PIDs are (simplistically) how Arducopter controls the motors and props - you dont want to change that relationship.

Tune with the minimum take off weight to find the best PIDs, then adjust these to suit your payload:
ATC_ACCEL_P_MAX x (min_TOW / max_TOW)
ATC_ACCEL_R_MAX x (min_TOW / max_TOW)
ATC_ACCEL_Y_MAX x (min_TOW / max_TOW)

If you are using normal RC control you can also put ATC_INPUT_TC on a transmitter knob or switch to soften the RC input per payload. Typical values are 0.2 to 0.3 for larger multirotors.
Use RC channel 6 on your radio, and set:
TUNE,45
TUNE_MAX,0.15
TUNE_MIN,0.3

Also experiment with ATC_ANG_LIM_TC

1 Like

You may be able to set up something in scripting based on a 3 position transmitter switch, or the old fashioned way: have a few of different .param files you load for different payloads.
You don’t have ALL parameters in the file, just the few you need to change. They are essentially a text file in this format:
ATC_ACCEL_P_MAX,118884
ATC_ACCEL_R_MAX,114126
ATC_ACCEL_Y_MAX,11715.34
…so very easy to create and manage.

1 Like

thanks every one! We will try the solutions given here.

Have a nice week!