[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paparazzi-devel] motor current calculation ?
From: |
Reto Büttner |
Subject: |
Re: [Paparazzi-devel] motor current calculation ? |
Date: |
Tue, 26 Oct 2010 13:28:11 +0200 |
Hi Chris,
as you mention correctely the current is very non-linear in respect to
the throttle. In paparazzi this is simpified and approximated using a
linear function. The energy estimate works pretty well if it is tuned
to a certain working point and you have similar flight patterns.
If you need a more precise current estimate that works on various
working points I recommend to use a superellipse instead of a linear
function. See: http://en.wikipedia.org/wiki/Superellipse
I cannot give you code for this, as I have not implemented it yet myself.
Good luck,
Reto
2010/10/26 Chris <address@hidden>:
> Hi.
> I was watching my plane's current draw at various throttle levels and it
> looks like the calculation is a bit off.
> When the throttle is at 50% the current draw is ~25% of the:
> <define name="MILLIAMP_AT_FULL_THROTTLE" value="40000"/>
> It is logical since at 50% rpm the propeller only produces 25% of it's full
> rpm power.
> Here is what i used instead in main_fbw.c file (broken down for clarity):
> #if ((! defined ADC_CHANNEL_CURRENT) && defined MILLIAMP_AT_FULL_THROTTLE)
> #ifdef COMMAND_THROTTLE
> float percent_throttle =
> (float)commands[COMMAND_THROTTLE]/(float)MAX_PPRZ;
> percent_throttle *= percent_throttle;
> fbw_current_milliamp = Min((percent_throttle *
> (float)MILLIAMP_AT_FULL_THROTTLE), 65000);
> // fbw_current_milliamp = Min(((float)commands[COMMAND_THROTTLE]) *
> ((float)MILLIAMP_AT_FULL_THROTTLE) / ((float)MAX_PPRZ), 65000);
> #endif
> # endif
>
> Is this correct or i am doing something wrong?
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>