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

1 visualizzazione (ultimi 30 giorni)
Hi.
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.

Risposta accettata

Mathieu NOE
Mathieu NOE il 29 Ott 2020
hello
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);
figure(1),plot(t,q1,'b',t,q1_smoothed,'r');grid
% moving averaging
n = 11; % must be odd number
q1_smoothed = slidingavg(q1, n)
figure(2),plot(t,q1,'b',t,q1_smoothed,'r');grid

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by