Hi @sharmarahul999 ,
The problem is that if you want to find “optimal” parameters defined by some criterias that you have to choose yourself (such as rise time, settling time and overshoot) using some techniques such as pole placement, etc. , you need an accurate mathematical model of your vehicle… This is called “System Identification” and it is quite challenging and time consuming to get a model good enough to design a controller.
Most of the time, PID controllers are just “hand tuned” because it is much simpler and quicker (and can give better results than a controller tuned on a poor model).
The best way to start is always to tune bottom-up. For most multicopters, this is the rate loop. But for this type of design, it is crucial to build a good control allocator (mixer) in order to linearize as much as possible the system.
In point of fact, based on aerodynamic control surfaces, the lift generated that gives side control is highly nonlinear and a PID controller is good at stabilising linear (or almost linear) systems. The airflow, mainly generated by the main rotor has to be included in the control surfaces mixing too. During motion, the airflow will be increased but you can try to ignore that for now and limit the maximum speed/angle to keep that contribution small.
In summary, your control allocator has to:
- Include a lift model of the control surfaces (a simple model can be linear and the saturation has to occur before the stall region)
- Take the motor RPM into account (or at least the normalised pwm signal)
An option could be to attach the drone on a multi-axes thrust bench and create lookup tables.