Help with Formulas, calculated fields...

Questions specific to Megalogviewer

Moderator: LT401Vette

Post Reply
deezums
Helpful MS/Extra'er
Posts: 63
Joined: Sat Nov 07, 2015 4:50 am

Help with Formulas, calculated fields...

Post by deezums »

I am trying to use megalogviewer scatter plots to log shock damping curves, I have an arduino logging force, velocity and time to a .csv file. I need to do some data filtering on my resutls, I don't have fancy software like matlab but I do have the pro version of megalogviewer.

I'm not exactly sure what all I need to filter out, but I would like to start filtering out all data where acceleration is over a certain amount. To do this I need a custom calculated field, DeltaT = [time] - [time-1]. Why would megalog viewer tell me such a formula is "invalid syntax?" I am copying formulas from this website here, https://www.efianalytics.com/MegaLogVie ... mulas.html
Simple calculations:
deltaRPM=[RPM]-[RPM-1]
interpreted as:
deltaRPM = (Current RPM)-(RPM 1 record back)
If I could figure out why this is not working, I could then do some further math, deltaV = [velocity] - [velocity-1], DeltaV/DeltaT, then filter all values over 1in/s/s or something like that.

Here is a photo of some of my current unfiltered results. This is an upside down (rebound on top) plot of a miata bilstein, which appears to be a digressive valving with the knee somewhere around 1.5in/sec. It seems to me that most all of the garbage points are near the changeover points from compression to rebound, I am logging at about 30ms/33hz which doesn't appear to be fast enough to get a smooth transition. I guess I might need to look into better ADC converters, too.

Image

And here is a picture of the "shock dyno" itself

Image
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Help with Formulas, calculated fields...

Post by LT401Vette »

Is there a time field in your log?
Remember the naming is case sensitive.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
deezums
Helpful MS/Extra'er
Posts: 63
Joined: Sat Nov 07, 2015 4:50 am

Re: Help with Formulas, calculated fields...

Post by deezums »

Thank you for the help!

I'm not sure what I was doing wrong, I think my log might have loaded in wrong. I had a vertical bar before all my headings (|velocity, |force, |time) in MLV that wasn't in the CSV file. Reloading the log managed to get them labeled right, then the formulas started working as expected. Here is a plot with acceleration values over 2.5 in/s/s filtered off.

Image

My data input is force in pounds, both positive and negative for compression and rebound, then the absolute velocity, no negative values there. Would there be an easy way to filter out data near the peaks of the waveform, or where velocity changes from one direction to another? I think if I could find a way to do that I'd have really clean data, but I'm not sure where to even begin with a formula like that. Any advice, please!

I've attached a copy of this "log" if you'd like to take a look.

Thanks!
deezums
Helpful MS/Extra'er
Posts: 63
Joined: Sat Nov 07, 2015 4:50 am

Re: Help with Formulas, calculated fields...

Post by deezums »

I like the way you think, I never would have thought of that! Thanks Andy! It seems you figured out I was logging in milliseconds, I just need to change the code around a bit to fix that. I think my velocity calculation is using milliseconds instead of microseconds, I bet I can make that slightly more accurate...

My histograms tab is greyed out though, I guess I don't have that feature? Another $20 for what looks to be just histograms, really? It's only $10 more than the MS version I already have, but upgrading is $20. Really know how to stick it to the people who supported the software.

I think I'll look into other software packages first.
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Re: Help with Formulas, calculated fields...

Post by whittlebeast »

The Histograms option comes with MLV HD. I use that feature all the time. There is a trace feature where you can pick the number of records that you want to trace. I use that to figure out where you travel thru the data.

Andy
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Re: Help with Formulas, calculated fields...

Post by whittlebeast »

I created a new field called Shock Speed then defined it as

[Velocity]*Abs([Force])/[Force]

Here is what I got that makes more sense to me. I limited the data to 300 records.

http://www.nbs-stl.com/racecardata/MLVH ... %20Inv.png

It is cool seeing the wash stack blow off.

Andy
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Re: Help with Formulas, calculated fields...

Post by whittlebeast »

The thing that is kicking my butt is how do you go from a cool graph to faster lap times? I have enough I/O on my car now to do this on a driving car.

Andy
deezums
Helpful MS/Extra'er
Posts: 63
Joined: Sat Nov 07, 2015 4:50 am

Re: Help with Formulas, calculated fields...

Post by deezums »

That sure is the tricky part! The reason I made this rig was to be able to quantify valving changes because I have no idea how shims relate to slopes. I have a few pairs of extra new-old bilsteins, my plan was to just try as many different arrangements as I can. Probably be making some DIY alignment stands next, still need to find a better shop with flat floors...

I'm more used to shock dyno plots that look like this here, if that helps explain why I'm signing the numbers as I am.

Image

The Bilstein I am testing here is a B8 or NB HD Sport, it seems I might be off a little bit, or bilstein might have changed the valving in the last 10 years since fatcat made that plot. I do have a slight bit of slop in my rod end joints I'd like to resolve, they're messing with the force data after the change from compression to rebound or vice-versa, kinda like backlash, makes things read low for a few datapoints. Might make some bronze bearing'd solid rod ends, upgrade to shoulder bolts instead of these partially threaded bolts.

As to where I'll be starting, I've found a spreadsheet here I'll be using to calculate critical damping percentages for my spring rate and motion ratios. I do have a whole heaps of extra linear potentiometers, I sure would love to figure a way to mount them on my car for reading live data. I guess placing the knee or low speed/high speed changeover velocity depends a lot on the maximum displacement you see in a certain scenario. One step at a time, haha!

https://docs.google.com/spreadsheets/d/ ... =685911964

This sheet comes in part from a user named Beanbag, sometimes on honda-tech, he's where I got this mechanical lever shock dyno idea from originally, plus some pictures of bilstein guts.

If anyone else has any tips for some shortcuts, rather than trying all the things, I'd be all ears!!
Post Reply