paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Changing the main loop frequency on the Tiny


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] Changing the main loop frequency on the Tiny
Date: Tue, 16 Aug 2011 10:07:15 +0200

Hi Andreas,

This airframe uses the XSens with a 100Hz loop. The main control loops "waits" for new AHRS data and runs the control as soon as possible when received. It runs the controls at the AHRS speed, in this case 100Hz (even if that is written nowhere in the airframe: it is implied by the powerfull AHRS_TRIGGERED_ATTITUDE_LOOP)

https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/TU_Delft/skywalker.xml
https://github.com/paparazzi/paparazzi/blob/master/conf/modules/ins_xsens_MTiG_fixedwing.xml

Using the same idea with the faster 200Hz CHIMU you get awe-full camera stabilization for instance. The FBW was also changed about half a year ago to update the servo driver every time new servo data is available and not only at the given 60Hz with 1 loop delay of the FBW. To visibly get even more performace (only with modern digital servo's) you can define less servo's line:173) to update the servo refresh rate: but be carefull as it might damage old analog servo's)

https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/CDW/ChimuTinyFwSpi.xml

Finally: the defines that Felix wrote about are meant to be used when you run the AHRS code in paparazzi. For instance with the XSens it is faster to use only the AHRS_TRIGGERED_MAIN_LOOP than to manually force a 100Hz control loop because the first will run perfectly in sync and thereby have less delays (phase). An example airframe that has an IMU and runs the fast AHRS and Control loop in paparazzi is:

https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/TU_Delft/MicrojetCDW.xml 

Hope that helps:

-Christophe 



On Tue, Aug 16, 2011 at 9:31 AM, Andreas Gaeb <address@hidden> wrote:
Hello,

Am 15.08.2011 19:46, schrieb Felix Ruess:
> Of course you can... just depending on what you use you might need to
> code a bit ;-)
I'll try and go ahead... what is the place where the frequency is set?
is it somewhere in the makefiles?

> I assume you are using an imu that you can read with a higher rate?
> Which one? As a subsystem or module?
yes, I'm using an Xsens MTi-G, with the old style module (which by the
way needs gps.hmsl copied over to gps.lla_pos.alt in ins_xsens.c:509).

I also wrote my own modules for air data sensing, coefficient and thrust
calculation, and the PID algorithm. Basically, I need to run all of them
at the highest possible rate.

> For fixedwings you can set the rates of reading imu, propagation and updates:
>    <configure name="PERIODIC_FREQUENCY" value="120"/> <!-- IMU FREQ -->
>    <configure name="AHRS_PROPAGATE_FREQUENCY" value="120"/>
>    <configure name="AHRS_CORRECT_FREQUENCY" value="60"/>
> Then you can <define name="AHRS_TRIGGERED_ATTITUDE_LOOP"/> to trigger
> the control loops when a new attitude was computed.
this looks interesting, I wasn't aware of these parts of the code
before. Will have to dig into this, maybe its possible to realize
modules with higher periodic frequencies that way. However, as the Xsens
does its own AHRS computations, I don't need to run the estimator on the
Tiny and can save the processor power for other things.

> On Mon, Aug 15, 2011 at 1:49 PM, Prof. Dr.-Ing. Heinrich Warmers wrote:
>> [...]
>> But look to the main time constants.
>> It is only necessary  to be  about 8 times  faster then the lowest time
>> constant in your feedback control system.
the control loop is of minor importance for me. Firstly, I need to get
the real-time PID to run, even if it is only in manual mode.
My problem is that the aircraft's rolling time constant is very small,
so I need to sample (and differentiate) roll rate with high frequency to
separate roll damping from aileron efficiency.

Best regards,

_______________________________________________
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]