Math Function: Integral

All information about power management unit
Locked
thokes82
Posts:23
Joined:Sun Apr 17, 2016 10:14 am
Math Function: Integral

Post by thokes82 » Mon Feb 18, 2019 9:45 pm

Hi
Is there a way to look into this math function for future? I would like to integrate pulsewidth over time in order to get a value for total fuel consumption (since reset). It works extremely precise when I do it retrospectively for my logs. Would be nice to have such live feature.
greetings, Thomas

thokes82
Posts:23
Joined:Sun Apr 17, 2016 10:14 am

Re: Math Function: Integral

Post by thokes82 » Thu Feb 21, 2019 9:08 pm

just wanted to check if my question is understandable... injection pulse width, size of injectors and fuel pressure can tell you relatively precisely how much you consume. Integration over time or some sort of Accumulation function can easily create a total consumption number.

Code: Select all

PW=0,010s //10ms
n=100/s     //6000/min 
seq=2       //1 injection per 2 revolution
t=10s        //current time
t0=9s        //previous time (to define interval)
inj_size=5,83333333333333cm³/s  //350cm³/min
cyl=6
cyl*(t-t0)*(n/seq)*PW*inj_size
=17,5cm³

jgm
Posts:78
Joined:Wed Oct 19, 2016 3:59 pm

Re: Math Function: Integral

Post by jgm » Thu Feb 21, 2019 9:46 pm

The infinite accumulation is a lot easier than calculating integral over some time window.

You can do accumulation in the PMU today by adding the number to itself.
Something like this:
n_number = n_number + y
There is one trick to edit such Number. You need to create the Number in TWO steps.
-You need to create empty Number with only the name. Press ENTER.
-Then re-edit it again and type the formula, you can now assign itself to the operation.

But this technique has limitations.
This works well for counting some impulses or doing some basic timers.
If you need to accumulate the real numbers, the precision of the Number is too low.
It's signed integer with 16-bit precision - about -32 000..+32 000

thokes82
Posts:23
Joined:Sun Apr 17, 2016 10:14 am

Re: Math Function: Integral

Post by thokes82 » Thu Feb 21, 2019 11:02 pm

OK, this is getting close. But I will need a refresh rate or some sort of timing indication, right?
What would be the re-calculation frequency of the number?

jgm
Posts:78
Joined:Wed Oct 19, 2016 3:59 pm

Re: Math Function: Integral

Post by jgm » Thu Feb 21, 2019 11:15 pm

Today every Number in the PMU is calculated every 2ms (500 Hz).

thokes82
Posts:23
Joined:Sun Apr 17, 2016 10:14 am

Re: Math Function: Integral

Post by thokes82 » Thu Feb 21, 2019 11:19 pm

Thanks. I'll try something and will post it here...
Greetings! Thomas

thokes82
Posts:23
Joined:Sun Apr 17, 2016 10:14 am

Re: Math Function: Integral

Post by thokes82 » Thu Mar 07, 2019 2:26 pm

Hi,
ok the self summing function works indeed and I come to reasonable numbers for two seconds or so. Then the variables flow over as expected. Do you plan to introduce a proprietary feature? maybe for the ADU? Would really be cool.
Thomas

Locked