# How do you design Quadcopter PID algorithm?

Just to give a bit a context, here are the equations I'm using for the Angular accelerations.

φ** =(1/Jx)τφ

and

θ** =(1/Jy)τθ

So my plant gains would be

φ**/τφ =(1/Jx) along x axis

and

θ**/τθ =(1/Jy) along y axis

The basic PID structure is

Gain=Kp(Desired-measured)+Ki(integral(Desired-measured))+Kd(Differential(Desired-measured)

Lets just say my plant gain for angular accl around x axis is φg and my PID gain is Pg. To obtain a controller, do I do

(φg)(Pg)=open loop gain=L

and for closed loop L/(1+L).

My question is, am I right about what I'm doing and do I upload the algorithm in time domain form or frequency domain form (Silly question as frequency domain is for analysis but my only control experience is purely theory and entirely focused on analysis using root locus and nyquist)

• Are you simulating this system at all? That would definitely be the best place to start. Feb 25 '15 at 17:12
• What are $Jx$ and $Jy$ in your equations?
– Paul
Feb 26 '15 at 0:48
• moment of inertia Feb 26 '15 at 21:17