1
$\begingroup$

Assume that I have an object in 3D, and I want to have a controller that stabilizes its orientation (also referred to as "attitude").

To be sure we are clear:

  • attitude is measured in "degrees" or "radians"
  • attitude rate is measured in "degrees/s" or "radians/s"

The controller is made of two cascaded control loops:

  • attitude controller: the error controlled by this controller is the difference between the reference attitude and the real attitude
  • attitude rate controller: the error controlled by this controller is the difference between the reference attitude rate and the real attitude rate

The attitude controller is made only of a P term, and therefore it is not hard to tune. However, the attitude rate controller has all three terms P, I, and D.

I am using the well-known Ziegler-Nichols method to tune the attitude rate controller. However, I am not sure that theoretically, what I am doing is correct.

My question is: is it possible to tune the P, I, and D terms of the attitude rate controller while observing the step response by giving a command in attitude? To apply this procedure, should I provide an attitude rate command instead? (The main problem is I cannot give an attitude rate command because my object would start to rotate and this is not practical). FYI and for completeness: my object is a drone, but I don't think it matters too much regarding my question.

$\endgroup$
1
  • $\begingroup$ You said, The main problem is I cannot give an attitude rate command because my object would start to rotate and this is not practical, but then what are you expecting is going to happen if you give a step command for attitude? $\endgroup$
    – Chuck
    Mar 26 '20 at 14:26
0
$\begingroup$

You can operate the quadcopter with a poorly tuned attitude rate PID, log relevant quantities, build a model from the data, and finally use the model to tune the PID iteratively.

Suppose that such an inner PID delivers voltage commands to the propellers. You could instruct the quadcopter to safely perform a bunch of maneuvers and at the same time log/acquire the data you will then use to build the model. Candidate data will consist of pairs of voltage and measured speed samples.

The key point here is to control the quad such that the acquired dataset will be informative enough to support the subsequent identification stage. To this end, alternate low and quick maneuvers with different amplitudes. Anyway, since the inner and outer loops will be operational, the quad will fly safely.

Using those data you can perform closed-loop identification via the Predicted Error Method (PEM). Typical PEM based approaches resort to the well-known ARX, ARMAX, BJ, OE structures.

Once done with the model, you could tune your PID based on such knowledge by employing standard methods like pole placement, loop shaping and the like. If you use MATLAB, there exist automatic techniques for that.

Iterate through this process multiple times until you get acceptable performance.

Better off giving up with Ziegler-Nichols methods to adhere to model-based design instead.

You may find this webinar very much interesting.

$\endgroup$
2
  • $\begingroup$ When using loop shaping one does not necessarily have to fit a model. Instead one could also use measure the frequency response function and use that directly to design the controller in the frequency domain. $\endgroup$
    – fibonatic
    May 31 at 10:46
  • $\begingroup$ That's correct, finonatic, as the loop shaping technique relies on the frequency response of the system. Nonetheless, it's difficult to sample the response on a wide range of frequencies, and coming up with a model will help us interpolate the missing gaps better than not relying on this regularization term. $\endgroup$ May 31 at 11:34

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .