paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Time step consistency on AR.Drone 2


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] Time step consistency on AR.Drone 2
Date: Thu, 8 May 2014 23:58:31 +0200

Unlike normal 512Hz paparazzi code, the ardrone has a 200Hz IMU and runs 200Hz control when ahrstriggeredmainloop is defined. The IMU-board has no crystal and its rate might be +/-3% off.

On May 8, 2014 6:09 PM, "Eric Poppe" <address@hidden> wrote:
Hi all,

I have a question about running Paparazzi on the AR.Drone 2 in raw mode. For my master thesis I am developing a new control method for the attitude stabilization of the AR.Drone 2. If anyone is interested I can send some more details about it. Related to the question the following is important:

My controller uses time scale seperation for the control of the attitude. This means that there are two loops in the controller, the attitude controller which is tracking a desired attitude and demanding an attitude rate, and an attitude rate controller which is tracking the demanded attitude rate.
In the attitude rate controller I am using a PID compensater next to other elements. For the D term of the compensator I need the angular acceleration. I cannot find the angular acceleration in "state.h" so I assume it is not yet calculated. Therefore, in my current code I derive it from the angular velocity, which brings me to my question.

First of all, is it correct that the main frequency (512) defined inĀ  ardrone2_raw.xml is the frequency with which the control loops run? Second, is this accurately done on the AR.Drone board or can I expect the frequency to vary, or is there a way to check the actual loop frequency?

In other words, if I use the following lines to calculate the time derivative of the body rates does this give me what I am looking for:

struct Int32Rates body_accel;
struct Int32Rates rate_diff;
struct Int32Rates prev_body_rate;

struct Int32Rates* body_rate = stateGetBodyRates_i();

RATES_DIFF(rate_diff, *body_rate, prev_body_rate);
RATES_COPY(prev_body_rate, *body_rate);

body_accel.p = rate_diff.p << (F_UPDATE_RES );
body_accel.q = rate_diff.q << (F_UPDATE_RES);
body_accel.r = rate_diff.r << (F_UPDATE_RES);

with body_accel the angular accelerations that I am looking for and F_UPDATE_RES equal to 9, 2^9=512.

I appreciate any help you can provide.

Kind regards,

Eric Poppe

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]