How to remove high frequency components and remove noise in frequency deviation using basic filters.

2 views (last 30 days)
I am trying to track fundamental frequency variations in the signal z given below. The fundamental frequency can be tracked by simply computing the angle differences at two consecutive time steps, as given in code below. In this code, the fundamental frequency is set to constant 50hz, which means the deviation should be close to zero.
My question is, what is the best way to remove the high frequency content in the frequency deviation signal. Would be great if you can suggest me a filter. I am new to filters so I have a little knowledge about filter design. Any hep would be much appreciated. Thanks Kubski.
clc; clear all; close all;
fs=1200; ts=1/fs; t=0:ts:1-ts; N=length(t);
fz=50; % center frequency of the measured signal
z=1.0*cos(2*pi*fz*t+10)+0.03*cos(2*pi*3*fz*t+20)+0.02*cos(2*pi*5*fz*t+30)+0.05*cos(2*pi*4*fz*t+30);
plot (t,z);ylabel('Voltage magnitude');
load ('x.mat');
for k=2:N
phi(k)=atan2(x(2,k),x(1,k));
delf(k)=(phi(k-1)-phi(k))/(2*pi*ts);
end
figure; plot(t,phi);ylabel('Angle');
figure; plot(t,delf);ylabel('freuqnecy deviation');

Answers (0)

Community Treasure Hunt

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

Start Hunting!