Jump to content
mapper

Share your Math Channel List

Recommended Posts

I like to start a thread where everyone can add his Math channels, so a database is built. 

Please only post Math channels with short explanation in this thread. 

To keep it simple any discussion must be done in other threads. 

 

Boost error channel = Target Boost - MAP

Boost error parameter can then be used to control an electric Blowoff 

Brake bias = (rear+ front break press)/ rear break press

Front Wheelspeed Difference = LF wheel speed - RF wheel speed

Used to tune your LSD differential settings

 

Slip right = nondriven-wheelspeed - RR wheelspeed

Setup an Aux and turn on a driver warning light on the right side of the dash. So Driver knows right rear wheel is spinning faster ( eg. attention after a curb). Add the same function another for left. Then it looks like this :-)  from 3.00min

 

Boost error channel = Target Boost - MAP

Boost error parameter can then be used to control an electric Blowoff 

Brake bias = (rear+ front break press)/ rear break press

Front Wheelspeed Difference = LF wheel speed - RF wheel speed

Used to tune your LSD differential settings

 

Slip right = non-wheelspeed - RR wheelspeed

Setup an Aux and turn on a driver warning light on the right side of the dash. So Driver knows right rear wheel is spinning faster ( eg. Attention after a curb) to another function for left. Then it looks like this :-)  from 3.00min

 

Boost error channel = Target Boost - MAP

Boost error parameter can then be used to control an electric Blowoff 

Brake bias = (rear+ front break press)/ rear break press

Front Wheelspeed Difference = LF wheel speed - RF wheel speed

Used to tune your LSD differential settings

 

Slip right = non-wheelspeed - RR wheelspeed

Setup an Aux and turn on a driver warning light on the right side of the dash. So Driver knows right rear wheel is spinning faster ( eg. Attention after a curb) to another function for left. Then it looks like this :-)  from 3.00min

 

Share this post


Link to post
Share on other sites

So this afternoon I sat at the simulator and started mucking about with a few ideas.
I wanted to calculate my average speed based on some event, I used a digital input latching on.
In the UK we have average speed camera zones, you get snapped at the start and end and they do a distance over time calculation. Often you'll get slowed down by a Karen in an X5 not paying attention, I've always been curious how much I could safely speed up again to catch back up to 50 mph average over the trip.

You can do this in log analysis with the statistics view, but this is obviously operating at runtime.

So there's a few things here I've done that aren't documented yet, yes they will be.

The first is that maths channels can do reassignment, x = x + 1 etc

The next is that they're evaluated at 1000 Hz

Lastly I know of a few built in functions too.

I figured out two methods, of averaging, the first could be used not only for wheel speed, but for really any parameter, lambda, throttle position, you could use another maths function to find lambda, vvt, boost, etc error then feed that function into this one and have an average of error over some time period.

This one uses this algorithm:

newAverage = oldAverage + (newSample - oldAverage)/sampleNumber

image.png

the cnt function is a real good cnt function, it counts 1 per cycle (so 1 per millisecond) while c is greater than or equal to 1, so if you feed it a status which evaluates to 0 OFF and 1 ON, then you're away. If you want to use this for Anti-Lag active we might have to get a bit imaginative about an offset, iirc Anti-Lag OFF = 0, ON = 1, Active = 2...etc

I had to add a +1 to cnt because on the first cycle it's 0 and that's div by 0, plus the first cycle is the 1st sample too.

The 2nd method I came up with was to calculate distance, which of itself is a useful function, then calculate distance/time, again using that good cnt function:

image.png

Again using reassignment in the Distance function, multiply speed by 1/100th of a second, of a minute, of a hour to get distance travelled per millisecond (rate is 1kHz), I multipled by status to simply switch it on and off. This gives me km.

distance a over time, divide by the same multi as above gets us back to an average.

You don't need to use 8dp for this, I was just using it while getting my exponents sorted.

My functions agree with each other and track to my expectations, but if you spot an error in my maths then shout out :D

edit: unfortunately this is all in kph as I started running out of characters to add the mph multiplier, I've spoken with engineering and we'll see if we can get the length increased, 2.77e-7 helped a lot, but still lost a bit to parenthesis too.

 

Share this post


Link to post
Share on other sites

My ideas:

Pump safety

Fit a speed sensor onto a dry sump pump.

Pump speed / engine speed

If the number goes out of bounds you pump has jammed or belt has broken. So you can see a fault before oil pressure needs to drop.

Coolant capacity %

Will experiment with this but essentially

( ECT - IAT) / (rad temp) x100

So will fiddle with this a bit and try get a number that represents your remaining cooling capacity even when ECT is stable. So you dont need to see ECT climb to know youre nearing saturation point. 

Could be handy for EWP logic.

 

L/100km & km/l 

Self explanatory. Need modelled fuel

 

BSFC

Need a dyno that outputs a hp figure connected with canbus. Also modelled fuel. But can tune an engine for best bang for buck. Which is otherwise difficult to see. But good for endurance cars etc.

 

Ignition time to 14 adtc

(Ign adv + 14) / rpm 

Shows time period to reach where peak combustion pressure should happen.

So could use as an axis on a table that trims your ign timing with afr variations, leaner mix needs more timing and vice versa.

But it would be nice if there was just an option to show timing as miliseconds anyway as this makes simple trim tables way more useful across a large rpm range 

 

 

Share this post


Link to post
Share on other sites

VE Corrected = ( Lambda / Lambda Target ) * Fuel Table

For open loop mode. 

VE Corrected = ( ( Lambda / Lambda Target ) * Fuel Table ) * ( (100 + CL Lambda Fuel Corr. ) / 100 ) 

Should be working for closed loop + open loop modes. I will confirm later.

Share this post


Link to post
Share on other sites
15 hours ago, Laimis said:

VE Corrected = ( Lambda / Lambda Target ) * Fuel Table

For open loop mode. 

Not to take anything away from you post, I love to see these ideas coming through - but Im just mentioning this in case you werent already aware of the "quick trim" function that has been around since the G4, it will do this same basic calculation and apply the result to the fuel table for you (you still need to manually type in the measured value though).  If you have a log open and the fuel map on the same page, click on the cell in the fuel map that you want to adjust, then hit the M key, it will grab the target lambda from the lambda target table, you enter the measured lambda from the log and it will apply the correction to that cell for you.

Share this post


Link to post
Share on other sites
17 hours ago, Adamw said:

Not to take anything away from you post, I love to see these ideas coming through - but Im just mentioning this in case you werent already aware of the "quick trim" function that has been around since the G4, it will do this same basic calculation and apply the result to the fuel table for you (you still need to manually type in the measured value though).  If you have a log open and the fuel map on the same page, click on the cell in the fuel map that you want to adjust, then hit the M key, it will grab the target lambda from the lambda target table, you enter the measured lambda from the log and it will apply the correction to that cell for you.

Yes sir, totally aware of this function and Mixture Map, etc. But i thought its still nice to see in the log how far off your fuel map is.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...