How I can get a cutoff frequency. Also, I wonder how LPF can be applied.

2 views (last 30 days)
I got experimental data from real robot arms.
The attached file is the angular acceleration of each joint.
I would like to apply the cutoff frequency and LPF of this data.
As far as I know, it is done through FFT, but I don't understand well even though I studied. I need your help.
Thank you.

Accepted Answer

Mathieu NOE
Mathieu NOE on 29 Oct 2020
see below some LPF examples suing butterworth and sliding averaging techniques
[num,txt,raw] = xlsread('joint_angular_acceleration_data_1s.xlsx') ;
q1 = num(:,1);
q2 = num(:,2);
q3 = num(:,3);
time = num(:,4); % !! some values are non unique du to rounding effect
samples = length(time);
dt = (time(end)-time(1))/(samples-1);
t = (0:dt:(samples-1)*dt); % new time vector (unique values)
Fs = 1/dt;
% smooth data
% LP butterworth
n = 2;
fc = 0.1*Fs;
[b,a] = butter(n,2*fc/Fs);
q1_smoothed = filter(b,a,q1);
% moving averaging
n = 11; % must be odd number
q1_smoothed = slidingavg(q1, n)

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by