MATLAB Answers

0

Digital Signal Filtered: How should I interpret my results?

Asked by Emanuele Aiello on 17 Jan 2019
Latest activity Commented on by Star Strider
on 18 Jan 2019
Hi! I have implemented in MATLAB a digital filter, it is a chebyshev 1 type, fourth order one, Low-Pass with a cut-off frequency of 1 kHz.
Now I want to test my filter using a data transission process, i.e. a sequence of 50 random bits the bit rate is 500 bit/s. Using as input of my filter the signal of fig1. I get as output the one of fig.2. It is correct? How should interpret the result?
fig.2
fig 1.
I obtain also that the two signals, input and output have very similar mean variance and rms? what does it means?

  0 Comments

Sign in to comment.

1 Answer

Answer by Star Strider
on 17 Jan 2019
 Accepted Answer

We do not know what your filter is doing. Is it a highpass, lowpass, or something else?
It appears that the squarewave input in ‘fig 1’ is being lowpass filtered to eliminate the higher frequencies. This significantly reduces the detail in the filtered waveform, so the lower frequencies (and the ‘overshoot’ and ‘undershoot’ transients at both the beginning and end of the square wave pulses) are now visible.
That is my interpretation.

  4 Comments

Show 1 older comment
Yes it is a lowpass filter ... I cannot understand how do you say that is eliminating higher frequencies
A lowpass filter eliminates higher frequencies by design. It only passes frequencies lower than its designed cutoff frequency.
What would you say about the fact they have the same mean variance and rms?
The two signals will have approximately the same mean and RMS values unless your filter removes more of your signal, and especially if it removes the funndamental frequency of your signal. Most of the energy is still in your signal, since higher frequencies usually account for only a small part of it.
ok thank you so much! iously I 'arleady know what does a lowpass filter, my question was focused on how can i notice looking at the output that higher frequencies are removed?Obv
My pleasure.
how can i notice looking at the output that higher frequencies are removed?
Higher frequencies add detail.
Run this to illustrate the effect of adding more frequencies (here ‘harmonics’) to create a squarewave pulse train:
f = 5; % Frequency
t = linspace(0, 4, 5000); % Time Vector
sqwv = @(f,t,N) 4*sum(bsxfun(@rdivide, sin(2*pi*(1:2:N)'*t), (1:2:N)'))/pi;
sqwv8 = sqwv(f,t,8);
sqwv2048 = sqwv(f,t,2048);
figure
plot(t, sqwv2048)
hold on
plot(t, sqwv8)
hold off
grid
legend('2048 Harmonics',' 8 Harmonics')
The third argument (‘N’) of my ‘sqwv’ anonymous function are the number of harmonics to create. I am posting the code rather than a plot image so you can experiment with it. You can also take the fft of the ‘sqwv8’ and ‘sqwv256’ vectors (and any you want to create) to see the frequency content. (With this time vector, the sampling frequency is about 1250 Hz, so the Nyquist frequency will be half of that.)

Sign in to comment.