Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Extended PID (Long Term Average)

Pages: [1] 2
Author Topic: Extended PID (Long Term Average)
cintakc
Member
Posts: 1661
Post Extended PID (Long Term Average)
on: September 26, 2016 (GMT)

Hi, piemmm
There is a need to add to the program the opportunity to create the look of a long-term averaging.
For example:
I created an external PID “Kilometers Per Litre”, and “Litres Per 100 Kilometer”
I want the same the devices with long-term averaging
you have the same program already implemented this algorithm for devices with OBD2 protocol
The big request for you to consider my suggestion positively.
It may be in the form of new formulas or as a new type of device.

SpideRMaN
Member
Posts: 96
Post Re: Extended PID (Long Term Average)
on: September 26, 2016 (GMT)

Thanks cintakc

this is very interesting for all that like me depend soley on extended pids

@Piemmm, your help is very much appreciated, thanks

piemmm
Administrator
Posts: 6629
Post Re: Extended PID (Long Term Average)
on: September 27, 2016 (GMT)

One of those things that sounds simple, but is quite difficult to implement in the PID editor :)

I’ll see what I can do, may not appear immediately.

Next question, what kind of averaging strategy?

cintakc
Member
Posts: 1661
Post Re: Extended PID (Long Term Average)
on: September 27, 2016 (GMT)

Hi
averaging strategy is the same as you have done for OBD protocol

piemmm
Administrator
Posts: 6629
Post Re: Extended PID (Long Term Average)
on: September 27, 2016 (GMT)

Ok. May put a number of options in there (time based, point based, etc)

I’ll need to sort out nested functions in the equation parser first, then I should be able to get this feature in relatively quickly after that

cintakc
Member
Posts: 1661
Post Re: Extended PID (Long Term Average)
on: September 27, 2016 (GMT)

ISO 15765-4

“Vitz Injector(Port)”,”Inject.time”,”21F3″,”C*0.128″,”0″,”32″,”ms”,”7E0″
“Vitz RPM”,”RPM”,”210C”,”(A*64)+B/4″,”0″,”16000″,”rpm”,”7E0″
“Vitz SPD”,”SPD”,”210D”,”A”,”0″,”250″,”km/h”,”7E0″
“Vitz LPH”,”Vitz LPH”,””,”((VAL{Vitz RPM})/2)/60*VAL{Vitz Injector(Port)}*0.0024*10.8″,”0″,”50″,”L/h”,”7E0″
“Vitz L/100″,”Vitz L/100″,””,”100/(VAL{Vitz SPD})*VAL{Vitz LPH}”,”0″,”50″,”L/100″,”7E0″
“Vitz km/L”,”Vitz km/L”,””,”100/(VAL{Vitz L/100})”,”0″,”100″,”km/L”,”7E0″

So I tried to limit discrete changes RPM – 16rpm, SPD -4km/h
“Vitz RPM”,”RPM”,”210C”,”(A*64)+(B&192)/4″,”0″,”16000″,”rpm”,”7E0″
“Vitz SPD”,”SPD”,”210D”,”A&252″,”0″,”250″,”km/h”,”7E0″

changes in values occur several times per second, and the readings are changing very often and is not possible to have time keep track of indications

SAP72
Member
Posts: 10
Post Re: Extended PID (Long Term Average)
on: September 27, 2016 (GMT)

Quote from cintakc on September 26, 2016
I created an external PID “Kilometers Per Litre”, and “Litres Per 100 Kilometer”
I want the same the devices with long-term averaging
you have the same program already implemented this algorithm for devices with OBD2 protocol

Hello, piemmm. This is a very interesting and necessary idea. The huge request, if possible, to implement it in the new update. Thank you.

SpideRMaN
Member
Posts: 96
Post Re: Extended PID (Long Term Average)
on: September 27, 2016 (GMT)

Hi piemmm,

I noted you added * Equation parser now supports nested functions in 116 (not yet in beta stream)

Can it be used for what cintakc asked above please?

Thanks

piemmm
Administrator
Posts: 6629
Post Re: Extended PID (Long Term Average)
on: September 27, 2016 (GMT)

Hi!

No, not yet – I had to sort out a couple of issues in the equation parser first. The next bit (the average stuff) is next after that, though requires some work as you may want to have several averages in the same equation (so I have to implement a little storage for this)

It will appear in the changelog and be very obvious when I’ve done it :-)

SpideRMaN
Member
Posts: 96
Post Re: Extended PID (Long Term Average)
on: September 27, 2016 (GMT)

Thanks and keep up the good work :)

piemmm
Administrator
Posts: 6629
Post Re: Extended PID (Long Term Average)
on: September 28, 2016 (GMT)

All done – there are 3 functions added in the next beta TAVG(), AVG() , and RAVG() – have a look at the changelogs first post on how to use them.
The work done in getting this to work now enables the ability to have more complicated functions in the pid editor

(Side note to another poster on here: Another post was supposed to be here, but it looks like there was a problem, so the post didn’t make it to this thread for some reason which I’m looking into, but I got the post (booleans, etc) – complicated to implement in a single box, I’m looking at alternative options which may be better!)

F-150Torqued
Member
Posts: 437
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

@piemmm

That was me. My post was too large – and had characters that screw up the post. So I deleted it, and am converting to JPG so I can link to it on my server. I had several ideas.

F-150Torqued

cintakc
Member
Posts: 1661
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

Quote from admin on September 28, 2016
All done – there are 3 functions added in the next beta TAVG(), AVG() , and RAVG()
Great! Thank you.

cintakc
Member
Posts: 1661
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

Syntax Error: AVG(10:NaN)

piemmm
Administrator
Posts: 6629
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

Hi

What is the original equation used? When being validated, 1’s are used for the variables. If there is a divide by 0, then NaN will appear

cintakc
Member
Posts: 1661
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

whether it is possible to apply a formula
AVG(10:(100/(VAL{Vitz SPD})*VAL{Vitz LPH}))

piemmm
Administrator
Posts: 6629
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

Should be possible. I’ll get that sorted out.

cintakc
Member
Posts: 1661
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

also can not create external PID: AVG(10:VAL{x})
AVG(10:(VAL{Vitz L/100})

and more information for you, I have created a type of instrument avgense it in the list of external PID red when I edit the formula without avgense, it stays red, it may be you need to know

piemmm
Administrator
Posts: 6629
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

That’s all good – these examples all help.

The NaN is definitely as a result of a divide by 0 (ie: when your speed is 0, then 100/0 is basically an infinite loop and an divide by zero is raised)

The parser should prevent implausible numbers like ‘infinity’ from being pushed through the app…. but I can see where you’re coming from on the equation so need to have a little think. infinite numbers are inconvenient to handle

cintakc
Member
Posts: 1661
Post Re: Extended PID (Long Term Average)
on: September 29, 2016 (GMT)

You can use the speed vehicle formula (A + 1) km / h
In some cars it was made

You can use the speed vehicle formula (A + 0.4) km / h
rounded to the nearest whole number in the device settings

Pages: [1] 2
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.07 seconds.

  Follow me on twitter