2019-05-14 16:58:45 +02:00
|
|
|
function [velocity] = voltageToVelocityL22(voltage, time, gain)
|
|
|
|
% voltageToVelocityL22 -
|
|
|
|
%
|
|
|
|
% Syntax: [velocity] = voltageToVelocityL22(voltage, time, gain)
|
|
|
|
%
|
|
|
|
% Inputs:
|
|
|
|
% - voltage - Measured voltage
|
|
|
|
% - time - Time vector
|
|
|
|
% - gain - Gain of the voltage amplifier in dB
|
|
|
|
%
|
|
|
|
% Outputs:
|
|
|
|
% - velocity -
|
|
|
|
|
|
|
|
s = zpk('s');
|
|
|
|
|
|
|
|
S0 = 88; % Sensitivity [V/(m/s)]
|
|
|
|
f0 = 2; % Cut-off frequnecy [Hz]
|
|
|
|
|
|
|
|
S = S0*(s/2/pi/f0)/(1+s/2/pi/f0);
|
|
|
|
|
2019-05-14 17:55:59 +02:00
|
|
|
voltage = detrend(voltage);
|
|
|
|
|
2019-05-14 16:58:45 +02:00
|
|
|
velocity = lsim((S*10^(gain/20))\1, voltage, time);
|