0% found this document useful (0 votes)
5 views

16/12/18 13:26 C:/Users/Usuario/Onedr... /Iso8041Weight.M 1 of 1

This MATLAB code implements a weight filter according to ISO 8041 to process acceleration signals. It defines filter parameters and cutoff frequencies for three different weight filters (wk, wd, wh) according to the ISO standard. The code applies a series of Butterworth filters to the input signal to implement high-pass, low-pass, a v transition, and upward step filtering.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

16/12/18 13:26 C:/Users/Usuario/Onedr... /Iso8041Weight.M 1 of 1

This MATLAB code implements a weight filter according to ISO 8041 to process acceleration signals. It defines filter parameters and cutoff frequencies for three different weight filters (wk, wd, wh) according to the ISO standard. The code applies a series of Butterworth filters to the input signal to implement high-pass, low-pass, a v transition, and upward step filtering.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

16/12/18 13:26 C:\Users\Usuario\OneDr...\ISO8041weight.

m 1 of 1

% This code is an extetion of the proposed by ISO 8041


% Iplemented by Sergio Custodio - [email protected]
% December, 10, 2018.

function[y]=ISO8041weight(a,fs,iweight)
%a = Aceleration signal
%fs = Samply rate
%iweight = 1 (wk), 2 (wd), 3 (wh)
% wk wd wh
f1 = [0.4 0.4 10^0.8]; f1 = f1(iweight);
f2 = [100 100 10^3.1]; f2 = f2(iweight);
f3 = [12.5 2 100/(2*pi)]; f3 = f3(iweight);
f4 = [12.5 2 100/(2*pi)]; f4 = f4(iweight);
Q4 = [0.63 0.63 0.64]; Q4 = Q4(iweight);
f5 = [2.37 inf inf]; f5 = f5(iweight);
Q5 = [0.91 1 1]; Q5 = Q5(iweight);
f6 = [3.35 inf inf]; f6 = f6(iweight);
Q6 = [0.91 1 1]; Q6 = Q6(iweight);
k = [1 1 1]; k = k(iweight);

w3 = 2*pi*f3;
w4 = 2*pi*f4;
w5 = 2*pi*f5;
w6 = 2*pi*f6;
nyq = fs/2; %Nyquist frequency

[b1,a1] = butter(2,f1/nyq,'high'); %High pass


[b2,a2] = butter(2,f2/nyq,'low'); %Low pass

%determine parameters for a v transition


B3 = [1/w3 1]*k;
A3 = [1/w4/w4 1/Q4/w4 1];
[b3,a3] = bilinear (B3,A3,fs);
% determine parameters for upward step
if f5==inf
b4 = 1;
a4 = 1;
else
B4 = [1/w5/w5 1/Q5/w5 1]*w5*w5/w6/w6;
A4 = [1/w6/w6 1/Q6/w6 1];
[b4,a4] = bilinear (B4,A4,fs);
end
%Apply filter to input signal vector x (output to signal vector y)
y = filter(b2,a2,a); % Apply low-pass band limiting
y = filter(b1,a1,y); % Apply high-pass band limiting
y = filter(b3,a3,y); % Apply a v transition
y = filter(b4,a4,y); % Apply upward step

You might also like