Calculating acceleration of unsprung mass

Discussion and support for i2 Standard and i2 Pro applications

Calculating acceleration of unsprung mass

Postby CAPMAGIC on Tue Oct 04, 2011 7:56 pm

Hi there,

I need to calculate the acceleration of unsprung mass per wheel. I do have a linear potentiometer on every wheel to measure deflection.

For my formula I need the delta value between two measured values. How do I code this?

Greetings
Julian
CAPMAGIC
 
Posts: 11
Joined: Thu Apr 28, 2011 6:49 pm

Re: Calculating acceleration of unsprung mass

Postby PaulGM on Thu Oct 06, 2011 8:50 am

Julian,

If you are assuming that the corner package has had a force applied to it directly, then the acceleration of that unsprung mass is simply the second derivative of position (or the derivative of velocity, whichever you already have setup).

Unfortunately, you don't really know (without platform-condition calculations and some other sensors) whether the corner is being compressed/elongated due to platform movement or due to gravity/bump force acting on the unsprung mass in the corner package. For example, if the car is braking then the front corners will be compressed and you would see a vertical acceleration from your calculations, but in reality they have not vertically accelerated (the sprung mass of the main vehicle body has accelerated downwards).

Could you explain what you mean by needing a "delta value between measured values"? What are you trying to accomplish?
PaulGM
 

Re: Calculating acceleration of unsprung mass

Postby Holmz on Thu Oct 06, 2011 11:39 pm

PaulGM wrote:Julian,
...
Could you explain what you mean by needing a "delta value between measured values"? What are you trying to accomplish?


I m pretty sure he means d/dt(P) - so "a numerically derived derivative of position" to get velocity and then d/dt(V) - or d^2/dt(P) to get the numerical derivative of acceleration.

If I was not too lazy to boot into windows I would look up the how you do that in i2.
But I am interested how you do that in i2 as well.
User avatar
Holmz
 
Posts: 521
Joined: Fri Dec 19, 2008 6:19 pm
Location: Australia and the USoA

Re: Calculating acceleration of unsprung mass

Postby PaulGM on Fri Oct 07, 2011 3:44 am

Both integrals and derivatives are included in i2 as Functions in the Math Expression Editor. I do not know what method i2 uses to calculate derivatives internally, but one of the Software Engineers from Australia may pipe in on this thread if they see it.

As for calculating derivative estimates manually (near the limit, at the minimum sample step), you cannot do this in the Channel Maths, as you can only reference the Nth sample (not the Nth-1 or Nth+1 sample). You have to write your own Function in VB or C# and they will show up in the list of Functions; any solving method you choose can be used in this case.
PaulGM
 

Re: Calculating acceleration of unsprung mass

Postby CAPMAGIC on Fri Oct 07, 2011 7:53 pm

Hi,

thanks for the answers. What I was looking for is "derivative".

Holmz is right with his interpretation. That's what I meant. :)

Greetings
Julian
CAPMAGIC
 
Posts: 11
Joined: Thu Apr 28, 2011 6:49 pm

Re: Calculating acceleration of unsprung mass

Postby PaulGM on Sat Oct 08, 2011 10:17 am

My apologies, the term I'm used to seeing is "Difference Quotient."

The above answer stands, in that a Difference Quotient at any step size will need to be calculated by a custom function.
PaulGM
 

Re: Calculating acceleration of unsprung mass

Postby Holmz on Sat Oct 08, 2011 4:06 pm

PaulGM wrote:My apologies, the term I'm used to seeing is "Difference Quotient."

The above answer stands, in that a Difference Quotient at any step size will need to be calculated by a custom function.


Thanks Paul-
I will dig out those .dll motes and do this in the next week or two.
~Holmz
User avatar
Holmz
 
Posts: 521
Joined: Fri Dec 19, 2008 6:19 pm
Location: Australia and the USoA

Re: Calculating acceleration of unsprung mass

Postby PaulGM on Tue Oct 11, 2011 4:46 am

Holmz,

No worries. If you have any questions with writing the Plugins or Functions, please post them here and I will try and answer them in a timely manner.

You may already be aware, there is also sample code available in the installation directory for i2 Pro (the absolute directory will be something like Program Files\Motec\i2\1.0\Samples\Maths\). You may have to include a Motec DLL in the code with a slightly different name than the one already present (I believe the old reference was to "Interpreter.DLL" and it should be to "Analysis.DLL" now) to get them to work.

When you add the Functions or Plugins, make sure that you run i2 as an Adminstrator (not just your user account, but actually run the software as Administrator). With Functions, you will have to restart i2 to get them in the Maths listing.

Paul
PaulGM
 

Re: Calculating acceleration of unsprung mass

Postby Holmz on Tue Oct 11, 2011 11:41 am

PaulGM wrote:Holmz,

No worries. If you have any questions with writing the Plugins or Functions, please post them here and I will try and answer them in a timely manner.

You may already be aware, there is also sample code available in the installation directory for i2 Pro (the absolute directory will be something like Program Files\Motec\i2\1.0\Samples\Maths\). You may have to include a Motec DLL in the code with a slightly different name than the one already present (I believe the old reference was to "Interpreter.DLL" and it should be to "Analysis.DLL" now) to get them to work.

When you add the Functions or Plugins, make sure that you run i2 as an Adminstrator (not just your user account, but actually run the software as Administrator). With Functions, you will have to restart i2 to get them in the Maths listing.

Paul


Thanks Paul..

HDD died over he weekend. :oops:

Q1> How does one put in things like Coefficient of Aero drag or other constants and pick those up in the .dll call?
Q2> Does the .dll run the number for the entire file duration, or just the windowed data?

I'll have more no doubt...
User avatar
Holmz
 
Posts: 521
Joined: Fri Dec 19, 2008 6:19 pm
Location: Australia and the USoA

Re: Calculating acceleration of unsprung mass

Postby PaulGM on Wed Oct 12, 2011 7:58 am

Holmz,

Funny you mention the HDD; I just lost a motherboard and am in the process of setting up another workstation here in the office. Until I'm up and running again I won't actually be able to test my own statements, but here is what I know from previous experience:

1. When experimenting with i2 Constants previously, I've found that the software treated them like normal channels that were (pardon the wordplay) constant. In other words, a constant of something like "Spring Rate = 400 lbs/in" is just going to be a channel which is 400 for the duration of the Outing (which, in i2, refers to a collection of laps categorized by a single run on the track; you can see where Outings begin and end programatically or just opening multiple files in i2 and looking at how the "Data" window organizes them). In the Function/Plugin code, the method which selects Input channels from the current dataset should have access to the constant by name.
2. The loop written into the sample code's Evaluation method, by definition, covers the entire outing. If it didn't, you would have to replace any non-numeric values with a specific string (which I believe is "N/A" or "Invalid"). If there is any value in the channel over the course of the outing that i2 doesn't like, it will not display the channel at all and list an error in the Channel Status. I cannot test right now to see if those strings will work, but you can try both; either that, or just enter a 0 anywhere you don't care to evaluate a calculation.

Sorry that I cannot test these statements right now to confirm their accuracy, but I will do so as soon as my workstation is set up again.
PaulGM
 

Next

Return to i2 Data Analysis Software

Who is online

Users browsing this forum: No registered users and 3 guests