I've develop a quadrotor (only simulation on my PC using ROS) and the feedback controller resumes more or less the following structure:
where you can think that process is the dynamic movement of the quadrotor (motion equations), the inner loop is the attitude controller (it just sets the orientation about all 3 axis) and the outer loop is the position controller that takes care where the quadrotor actually is. Why are they separated? Because in many papers I found out that the attitude controller (pitch, roll, yaw) need to run at higher frequency then any other controller in the system. The position controller instead needs to run at lower frequency.
The following picture is a better explanation of my description. Don't be scared...it is more simpler than one could think:
Now I did it as in the paper. BUT I discovered that my quadrotor was really unstable and I spent days and days trying to correct the gains of the controller without getting a stable system. My intuition said to me that maybe they are running at wrong frequency, so I put a different frequency values for the position controller being sure it is not a multiply of the main frequency (something like 1000Hz and 355 Hz for example.)
Lately I removed the timer in my program (C++) and let the position controller run at the same frequency as the attitude controller just because I run out of ideas and suddenly worked everything nice.
So here is my question. What should I consider when my system has an outer/inner controllers? How to be aware of that?
Regards and happy new year!!!