VEMS Community Forum

VEMS => Software => Topic started by: GintsK on October 15, 2013, 09:26:41 AM

Title: How to create custom calculated channel in VT?
Post by: GintsK on October 15, 2013, 09:26:41 AM
Hi, VEMS users!
My current need is to create new channel: [(GPSspeed/RPM)*constant]. Is it possible and how?

Gints
Title: Re: How to create custom calculated channel in VT?
Post by: gunni on October 15, 2013, 08:50:27 PM
I belive it is not possible, I have a host of channels I´d like
Like POWER and TORQUE
Title: Re: How to create custom calculated channel in VT?
Post by: GintsK on October 15, 2013, 09:28:12 PM
Probably they are defined in .ini file...
Title: Re: How to create custom calculated channel in VT?
Post by: gunni on October 17, 2013, 04:26:18 PM
I mean channels where you apply numerous math to one or more input channels to recieve a output.

Is this possibly in .ini files?
Title: Re: How to create custom calculated channel in VT?
Post by: VEMS on October 21, 2013, 05:34:01 PM
http://vems.hu/vt/help/gauges/customvaluegauge.html

Regards, Dave
Title: Re: How to create custom calculated channel in VT?
Post by: GintsK on October 21, 2013, 07:04:07 PM
OK... thanks!
My expression then is

"%.3f km/h",gpsSpeed*35.084/rpm

It returns something like gear ratio - should be exact value until gear is changed or clutch pressed.
But due to nature of incoming signals output becomes noisy.

Next - it would be nice to get average from e.g. last 200 samples.
May be someone can help me to create such expression?

Is there way to get freshly created channel in datalog?

Gints
Title: Re: How to create custom calculated channel in VT?
Post by: VEMS on October 21, 2013, 08:53:50 PM
Since the custom value gauge is using already available logged channels as inputs, the custom gauge should also be available when replaying a log.

Regards,  Dave

Title: Re: How to create custom calculated channel in VT?
Post by: gunni on October 21, 2013, 09:34:34 PM
Can it be selected as a channel in the log viewer ?

I made a math channel that creates road speed from tyre size, gear ratio and diff ratio, called it a unique ID but cannot select that ID to create new symbol as it´s not available, the other available custom Id are also not available as selectable symbols.

This would be one of the best possible features if this can be made to work in log viewer.

Thanks Dave.

EDIT .
Ideally being able to make numerous new channels and use them in other math channels would be ideal. Also applied filtering and
if possible "last value" usage.

Title: Re: How to create custom calculated channel in VT?
Post by: GintsK on October 21, 2013, 10:00:54 PM
Quote from: VEMS on October 21, 2013, 08:53:50 PM
Since the custom value gauge is using already available logged channels as inputs, the custom gauge should also be available when replaying a log.

Regards,  Dave
Yes it persists in log replay, but it does not help to read average. Graph line in logviewer would be much more helpful.
Title: Re: How to create custom calculated channel in VT?
Post by: fphil on October 21, 2013, 10:53:29 PM
Quote from: GintsK on October 21, 2013, 07:04:07 PM

It returns something like gear ratio - should be exact value until gear is changed or clutch pressed.
But due to nature of incoming signals output becomes noisy.

Next - it would be nice to get average from e.g. last 200 samples.
May be someone can help me to create such expression?

Why not a set of if applied on the output value which selects the right case/gear ?
Title: Re: How to create custom calculated channel in VT?
Post by: GintsK on October 22, 2013, 06:52:35 AM
Sorry??
Title: Re: How to create custom calculated channel in VT?
Post by: fphil on October 22, 2013, 04:02:28 PM
r= noisy result gear ratio calculus
ei= theoritical gear ratio value for gear i

the set of if is per example

if 0.8*e1< r < 1.2*e1 then gear is gear number one
if 0.8*e1<r<....  then gear is gear number 2
etc...

of course you can do better intervals to avoid ghost cases.

Title: Re: How to create custom calculated channel in VT?
Post by: GintsK on October 22, 2013, 05:52:56 PM
My purpose is not to determine gear, but exact gear or transmission ratio necessary for following performance measurement. Error here means error later.

Gints
Title: Re: How to create custom calculated channel in VT?
Post by: gunni on October 22, 2013, 06:01:44 PM
It´s also excellent to detect slipping clutches or tyres.

I do agree that filtering would be excellent.
Title: Re: How to create custom calculated channel in VT?
Post by: fphil on October 22, 2013, 06:09:30 PM
Alright transmission ratio.
You may do schedule filter or dead band filter as above, with 6, ..., 12 possible transmission ratios. This quantification could filter part of the noise or may easier the data analysis.
Title: Re: How to create custom calculated channel in VT?
Post by: GintsK on October 23, 2013, 10:44:16 AM
I see ready to go solution: if it would be possible to add my new channel to that datalog part what converts to .csv.  - afterwards it is just matter of few clicks to get statistically calculated average.

I believe it about to add just few rows in some .ini file. But how and where?

Gints
Title: Re: How to create custom calculated channel in VT?
Post by: VEMS on October 23, 2013, 10:52:12 AM
Pointer: Search for "[Datalog]" in the ini which matches your firmware, e.g. for 1.2.11 firmware use Vemstune_Install_Dir/config/VemsTune-v3-1.2.11.ini

Regards, Dave
Title: Re: How to create custom calculated channel in VT?
Post by: gunni on October 24, 2013, 12:33:30 AM
Thanks Dave.

I´ll see what I can make work tomorrow in terms of logging and custom math channels.

Any chances on implementing additional math functions? like filtering, integration over time, differentiation against time, previous value comparison
registry creating? Even if it´s only possible in Log viewer and not real time, more important that way anyway, especially with heavy math.

like

integral(channel_name) , and say you have roadspeed as the channel you get distance as the product, or if you have acceleration you get velocity and so on,

or

differentiate ( GPSspeed ) , gives you acceleration and so on .
Title: Re: How to create custom calculated channel in VT?
Post by: VEMS on October 24, 2013, 08:46:37 AM
Gunni, i understand your proposals seems like a nice addition. If you could add a proposal to wiki:

http://www.vems.hu/wiki/index.php?page=VemsTune/WishList

Then we can start with this if time/schedule and priority allows it,

Regards, Dave