Integration Question -- Acceleration to Velocity to Displacement

I have been trying to get from ground reaction force(GRF) to position using MATLAB. For example:

I have GRF data and am using the equation F = ma to get to acceleration

a = F/m, where F is GRF and m is body mass

I am having a problem getting to velocity from here. I fit the acceleration using a polynomial fitting function (polyfit) and integrated this polynomial (polyint), but the values seem off.

Is there another way to do this?? Thank you!

Reply to
jpopovich
Loading thread data ...

ground reaction force(GRF) ??????

Reply to
BobK207

Some questions: How are you fitting the polynomial? Are you integrating between the correct limits? What exactly are you defining as a "ground reaction force"? (I've never heard that term before, and I imagine most other engineers haven't either).

Why don't you post your Matlab code so we can see what you're trying to do?

Dave

Reply to
dave.harper

My apologies..."Ground Reaction Force (GRF)" is force collected from a forceplate set into the floor. It collects force and moments in x,y,z directions.

I have GRF and Time data. To get to acceleration I use the equation F=ma. From this, a = F/m, where F is GRF and m is body mass

The GRF is represented in Newtons and looks like a bell-shaped curve (as step on and step of).

Because I have difficulty with the actual numeric integration, I tried using polyfit, polyval, and polyint to fit the data, create values and integrate, respectfully.

p_fit = polyfit(time, acc, 9);%9th order polynomial - returns 10 coefficients of polynomial

acc_fitted = polyval(pf, time);%fitted acc data

p_int = polyint(pf);%integrates the polynomial p_fit - returns 11 coefficients from p_fit value.

velocity = polyval(p_int, time);%gives values for velocity

p_int2 = polyint(p_int);%integrates p_int polynomial - returns 12 coefficients

position = polyval(p_int2, time);

The other code I tried is: velocity = cumtrapz(acceleration)*(1/sampling_rate);%

Please pardon my choice of variable names, but I am new to Matlab and programming. Is this correct?? Thank you.

Reply to
jpopovich

GRF is the Force collected from a force plate in the ground, that provides force in x,y,z directions. I hope this helps clarify. Thank you.

Reply to
jpopovich

I haven't tried to figure out why your curve fitting approach isn't working but direct integration of the force data should work. See if this MATLAB code helps.

% Deriving Position from measured force vs. time F = [1 2 4 7 8 7 4 2 1 0]; %force vector, Newtons t = [0 .1 .2 .3 .4 .5 .6 .7 .8 .9]; %sample times, sec m = 10 % mass, kg

% Trapezoidal numerical integration dv=(1/m)*cumtrapz(t,F);

% ALTERNATE method for determining dv % % % Numerical integration of cubic spline fit % % pp=spline(t,F); % % t2=((1:100)-1)*(t(10)-t(1))/(100-1); % % for i=1:100 % % dV(i) = (1/m)*quad(@(t2)ppval(pp,t2),0,t2(i)); % % %recursive adaptive Simpson quadrature % % %uses an 'anonymous function handle' i.e. "@(t2)ppval(pp,t2)" % % end % % plot(t2,dV,'r',t,dv,'b-o') % Using the data above for F and t , results are nearly identical

% Determine position from velocity % since v_init is taken as zero........ v = dv; ds = cumtrapz(t,v); position change vs. time (and position if s_init is zero)

The results seem sensible although I'm not sure if I understand the dynamics of the problem. The ground plate probably doesn't move so the change in velovity and position must apply to whatever is coming to bear on the plate.

If you still want to go the curve fitting route, I'd be leery of such a high order polynomial. You dont want to force the curve to fit the noise in your measurement data, only the underlying true response.

A
Reply to
Aldo

For varying f or m..... start: A = f/m v = v + A.dt x = x + v.dt Iterate this loop from start: after time dt.

That's the rough n ready approach to numerical integration. Correctly starting from acceleration, through velocity v to displacement x There are slightly fancier approaches to better account for the curvature of A , v and x with time. This is a sketch of how dynamics are numerically simulated in e.g. flight simulators.

Brian Whatcott Altus OK

Reply to
Brian Whatcott

Brian's approach will work & as he says it is a rough n ready approach.

California Dept of Mines & Geology has a strong motion instrumentation program where they record & collect ground motions & building repsonses.

The used to record on film & then digitized visually / manually. I assume they have been swithing over to systems using modern A/D equipement.

They do the integration & double integration of the digitized accel record but they perform an important additional step.

They "correct" the accel record so that the velocity after the event is zero. A zero velocity after the event means your accel record & your integration at least makes sense.

I used to have a copy of an old report documenting the process but I cannot find it.

cheers Bob

Reply to
BobK207

It does not correspond to the actual situation. You have not consider vibrations. Try solve the differential: ax''+ax'+bx=F_i numerical of course, and if you can find the a,b,c experimentally ( from the values which seem off). For certain conditions , the model you use is correct. An elementary handbook on vibrations includes all these. If you can still not find a solution you can even use fem, or whatelse complicated model you can imagine. It depends on what you can measure , and what you want to calculate.

Hmmm!! You can override all these by checking on that bell shaped responses, are solved by formulas like: Force x time = velocity * mass It can be handy in certain situations.

now from experience I would use a device that gets motion data ,instead of force data. In a situation I have seen in practice , guys were measuring force and velocity and displacement using three different devices.

Reply to
nikaggel

Is this a biomechanics project? What sort of velocity are you looking for? Generally the integral of a GRF is not a terribly useful quantity. You will need some kinematic data if you want to find the velocity of the leg.

Reply to
rosshm

Yes, this was an experimentation with looking at different forceplates. We were just looking at velocity for the whole body, not segments. Thank you for the help.

Reply to
jmp

Thank you for the posting...we actually an electromagnetic device to track motion data. Just an experiment with force plates.

Reply to
jmp

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.