# Filtering in the Frequency Domain In this blog, I will be showcasing two simple applications derived from the Convolution Theorem:

1. Analyzing a signal and applying a filter in the frequency domain.
2. Generating a custom filter in the frequency domain.

The Convolution Theorem states that convolution in the time domain is equivalent to multiplication in the frequency domain and vice versa. When we convolve two signals, we are essentially filtering a signal.

Let us look at this mud pulse signal in Figure 1.

. Figure 1. Mudpulse signal.

There seems to be a lot of electrical noise interference. If we take the Fourier transform or look at the frequency contents of our signal, we can see there are large frequency components around 0.84, 1.68, and 2.55 Hz shown in Figure 2. Those frequency components are probably noise contaminating our signal. Figure 2. FFT of mudpulse signal.

Let us zero out those frequencies or apply notch filters to our signal. We can do this by masking out this signal in the frequency domain and applying an inverse Fourier transform to obtain our filtered time domain signal. Figure 3 shows our frequency mask and Figure 4 shows our masked frequency signal.  Figure 4. FFT of mudpulse signal after applying mask.

After converting our masked frequency signal back to the time domain, we can now clearly see our mudpulse signal show in Figure 5. Figure 5. Filtered mudpulse signal.

In the frequency domain, it is easy to see we are just removing the frequency component corresponding to noise in our mudpulse signal, but what is happening in the time domain?

By defining a frequency mask, we are designing our own custom filter. If we take the inverse Fourier transform of our frequency mask, we can see our frequency mask is just a simple FIR filter show in Figure 6. If we convolve this filter and our mudpulse signal, we get the same filtered mudpulse signal shown in Figure 5. Figure 6. Generated filter from frequency mask.

### Recent Posts:  What skills and experiences should we be looking for in new hires and what kind of [..] Here at Erdos Miller, we all strive for the same goal, and that is to provide our [..] Assumptions: Machine has a Nvidia CUDA Core GPU (such as a GeForce) with installed [..] When comparing different algorithms, we typically look at space and time complexity, [..] A Proportional Integral Derivative controller (PID Controller) is a closed loop [..] Python is not really the first language that comes to mind when thinking about GUI [..]