2
$\begingroup$

I'm new to signal processing and I'm learning on my own. Therefore I might ask questions not worthwhile your time.

At the moment I'm trying to figure out the concept of a lowpass filter. Using matlab I created a complex signal x:

x = rand(1,1000)+rand(1,1000) .* 1i

And i created a filter Num with the fdatool, the specifications of Num are :

Fs = 1000;  % Sampling Frequency

Fpass = 460;             % Passband Frequency
Fstop = 500;             % Stopband Frequency
Dpass = 0.057501127785;  % Passband Ripple
Dstop = 0.0001;          % Stopband Attenuation
dens  = 20;              % Density Factor

From what I understood I had to do now. I tried to do the Convolution of Num and x in the frequency domain by multiplication of the vectors. Step by Step I did this:

  1. First I padded Num to the same length that x has.
  2. Then I multiplied x and Num, to get y= Num * x;

Now y should have nearly no frequencies above 500, right? If I check the signal there doesn't seem have happened a lowpass filtering.

$\endgroup$

1 Answer 1

4
$\begingroup$

It appears you're getting a bit lost between the time and frequency domains. If "Num" is the numerator of an FIR filter (as it appears), these are the coefficients (or impulse response) of your filter. The impulse response as a signal exists in the time domain.

If you want to perform a filtering operation using this impulse response (or filter kernel as some call it), you should perform a convolution (conv) between it and the signal you wish to filter in the time domain.

--

The impulse response you've created has an equivalent frequency domain response (which you will have seen in fdatool). The time domain convolution described above is equivalent to multiplying this frequency-domain response by the frequency-domain representation of your input signal.

Since your signal x is complex I assume you mean it to a frequency-domain representation of some 'noise' signal. This representation in itself is strange, and it doesn't represent a 'white' noise signal, but a purely random arrangement of frequency and phase that I find it difficult to conceive.

If you want to observe low pass filtering I would suggest the following:

  1. Create a pure real (no 'i' component) noise signal in the time domain using rand (remember that rand produces values in the range 0->1, you will need to scale and shift it to create a signal in the range -1 -> 1). This signal will in theory be purely white, and hence have a flat magnitude response in the frequency domain (i.e. it would be a straight line).

  2. Convolve this signal with your filter impulse response.

    You could consider this operation to be equivalent to multiplying the response of your filter (that you saw in FDATool..) by the frequency domain of the input signal (which is effectively constant). The result should be a scaled version of your familiar low-pass filter response (although some other effects such as the trade-offs in your filter design come into play).

The output of this procedure is still in the time domain, so if you perform an FFT or some other transform to convert to the frequency domain, you can then plot it, and observe the low-pass filtering effect.

Good luck for your learning :)

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.