Thursday, June 5, 2014

Outer Loop Position Controller

With the attitude and altitude controllers now in place, we decided to implement an outer loop controller that controls the x-position of the quadrotor. The assumptions underlying the controller are 1) the yaw and roll angles are zero, 2) we have perfect control of the pitch angle thanks to the inner loop attitude controller, and 3) the magnitude of the net thrust equals that of the quadrotor's weight. These are some pretty bold assumptions, but they are good for a first implementation.

I ended up using a PD controller because, under the above assumptions, the plant became a double integrator. I made two modifications to the controller
1) The output pitch angle reference cannot have a magnitude greater than 45 degrees (so that the system does not deviate too far from hover equilibrium)
2) When the error in x-position jumps, the derivative term is ignored

The controller computes the desired reference pitch angle from the x-position error and error time derivative, and it feeds the reference pitch angle into the attitude controller. It's a pretty simple concept.

First, I tested the system with a step input for the x-position with a magnitude of 5 meters. Here are the results:

x-position (left) and pitch angle (right) responses for a step input


The position controller is able to track the position in this case. I am not sure why there are so many spikes in the pitch angle reference.

Here are my position controller results for a sinusoidal reference trajectory with an amplitude of two meters:



x-position (left) and pitch angle (right) responses for a sinusoidal input







 


The controller has a harder time tracking a sinusoidal reference trajectory. I am still not sure why the pitch angle response is so rough.

I was not expecting this controller to work exceptionally well, but it worked better than I expected. At this point, the controller lies on so many faulty assumptions that exceptional performance is an unrealistic expectation. In the future, I would like to investigate nonlinear control approaches to this system.

No comments:

Post a Comment