paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Optimized current estimate


From: afishindouban
Subject: Re: [Paparazzi-devel] Optimized current estimate
Date: Sat, 31 May 2014 15:59:48 -0700 (PDT)

Hi Felix, Sorry to reply on this old thread. I have a simple question.

where I can define the battery capacity, for show in GCS how many percentage
energy consumed.

As I know, 
First we should defind in airframe configuration as you mention below.
Second we can show BAT.energy value in GCS.
Am I right ? Is there any place show percentage remian ? Or I have the make
calculation GCS configuration ?

It is not a critical issue to have that infomation to show in GCS, but I
would like to know if it is possible.


flixr wrote
> Hi Reto,
> 
> thats nice!
> I added that to electrical: http://bit.ly/ekcAP1
> 
> You can change the default non-linearity of 1.2 by defining
> CURRENT_ESTIMATION_NONLINEARITY in your airframe file.
> <section name="BAT">
>     
> <define name="MILLIAMP_AT_FULL_THROTTLE" value="20000" unit="mA"/>
>     
> <define name="CURRENT_ESTIMATION_NONLINEARITY" value="1.3"/>
> ..
> </section>
> Cheers, Felix
> 
> On Fri, Feb 25, 2011 at 10:11 PM, Reto Büttner &lt;

> reto.buettner@

> &gt; wrote:
>>
>> Hi guys,
>>
>> the linear current estimate used in standard paparazzi code is very
>> imprecise. It can be calibrated for a certain operating point to work
>> satisfactory. But with different flight patterns it remains very
>> imprecise, as the current curve is very non-linear. I use a
>> superellipse as an approximate (electrical.c):
>>
>> float x;
>> float a;
>> float b;
>> float n;
>>
>> #if defined MILLIAMP_AT_FULL_THROTTLE && defined COMMAND_THROTTLE
>>   /* electrical.current = ((float)commands[COMMAND_THROTTLE]) *
>> ((float)MILLIAMP_AT_FULL_THROTTLE) / ((float)MAX_PPRZ); */
>>      a = 1;
>>      b = (float)MILLIAMP_AT_FULL_THROTTLE;
>>      n = 1.2; /* This defines nonlinearity (1 = linear) */
>>      x = ((float)commands[COMMAND_THROTTLE]) / ((float)MAX_PPRZ);
>>   /* electrical.current = x * b; */ /* linear */
>>      electrical.current = b - pow((pow(b,n)-pow((b*x/a),n)), (1/n));
>> /* Superellipse */
>> #endif
>>
>> I got good results in many real flights including various flight
>> patterns. The deviation to the precisely measured recharged energy is
>> less than 5%. Now I really can use the full battery capacity without
>> requiring a current sensor.
>>
>> If someone else could test this, maybe make the code a bit prettier
>> and integrate it into electrical.c on git.
>>
>> Cheers,
>> Reto
>>
>> _______________________________________________
>> Paparazzi-devel mailing list
>> 

> Paparazzi-devel@

>> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
> 
> _______________________________________________
> Paparazzi-devel mailing list

> Paparazzi-devel@

> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel





--
View this message in context: 
http://lists.paparazziuav.org/Optimized-current-estimate-tp4201p15586.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.



reply via email to

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