# How to get mobility from velocity and force

I have a data of velocity (get from accelerometer) and force data (get from hammer). Now, I need to get mobility from them. I already know that mobility=velocity/force. But I don’t know how code it. I just begin learning about **signal processing** for a week.

# ANSWER

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

I have a background in structural dynamics, not soil mechanics, but this test looks similar enough. You have measurements of acceleration (NOT velocity, unless your accelerometer is doing something it shouldn’t) and force in the time domain. You want to get a mobility measurement in the frequency domain. The basic steps you have to follow are:

1) Convert your time domain measurements to the frequency domain

2) Determine the accelerance of your system (accelerance = acceleration/force)

3) Convert from accelerance to mobility

In more detail:

1) Use FFT to go from time domain to frequency domain. **MATLAB**’s default FFT function is a little annoying to use if your background is not **signal processing**; you have to handle scaling yourself, and you are only going to want the first half of the FFT measurements. The other half are redundant if your signal is real-valued. Do something like this:

`function [X, freqs] = easy_fft(x, fs)`

L = length(x);

NFFT = 2^nextpow2(length(x));

X = fft(x, NFFT);

X = 2/L*X(1:NFFT/2 + 1); % 2/L is the required scaling

freqs = fs/2*linspace(0,1,NFFT/2+1); % Frequency vector

end

Then do

`fs = 1/y(2, 1); % Convert time step to sample rate`

[A, freq] = easy_fft(y(:, 2), fs); % Acceleration

[F, ~] = easy_fft(y(:, 3), fs); % Force

Now you have complex frequency domain vectors A and F. Don’t take the real part of anything, they must be complex.

2) Now get the accelerance. We know that A = HF and want H; in your case the simple element-wise division

**SEE COMPLETE ANSWER CLICK THE LINK**