mageshms / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

stable mode PID control #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Control equation of arducopter for stable mode is like this:

control_XXXX = D . ( P . error ( t0 ) + I . Sum ( error ( t ) ) - Omega )

This is making PID adjustment difficult. It will be easier to adjust If we 
write the equation like

control_XXXX = P . error ( t0 ) + I . Sum ( error ( t ) ) - D . Omega

My proposal is to change

control_XXXX = STABLE_MODE_KP_RATE_PITCH*err_XXXX;

to

control_XXXX = stable_XXXX - STABLE_MODE_KP_RATE_XXXX*ToDeg(Omeg[1]);

Original issue reported on code.google.com by oncukaya...@gmail.com on 28 Sep 2010 at 8:45

GoogleCodeExporter commented 8 years ago
Hi Oncukayalar,
Have you tried this proposed equation yourself with success?  Does it make the 
PID tuning easier as you suggest?
Greetings,
Hein

Original comment by lohnieh@gmail.com on 28 Sep 2010 at 6:52

GoogleCodeExporter commented 8 years ago
Hi Hein,

I will try it this weekend.

Original comment by oncukaya...@gmail.com on 29 Sep 2010 at 8:44

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hein,

I tried the proposed code. Quad flied well with default PID values. I did not 
need to adjust values (I solved oscillations with putting a gyro tape under the 
APM).

If you will try the code please remember P and I values are 1.2 times lower 
than the default code. D is unchanged. For example

P = 4.8 in the propose code is P = 4.0 in the default code.

It only helps to uncouple PI and D values.

Best regards,

Oncu

Original comment by oncukaya...@gmail.com on 2 Oct 2010 at 12:41

GoogleCodeExporter commented 8 years ago
We updated our Wiki pages and now you can find more information about how PID 
controls are done inside software

http://code.google.com/p/arducopter/wiki/Quad_FlightTips

Original comment by jphelirc on 7 Oct 2010 at 1:21

GoogleCodeExporter commented 8 years ago

Original comment by jasonshort on 8 May 2011 at 7:25