# Fourier transform of rectangular pulses

• I
• PainterGuy
In summary, Jason found that the Fourier transform of the two rectangular pulses is only correct if the region of convergence for the Laplace transform includes the real number zero. He also used Matlab to plot the result.
PainterGuy
TL;DR Summary
Using Laplace transform to work out the FT of two rectangular pulses. Wanted to know if my work is correct. I did a Matlab code but it didn't produce expected result so wanted to make sure if I worked it out correctly.
Hi,

I was trying to find Fourier transform of two rectangular pulses as shown below. The inverted rectangular pulse has unit height, -1, and lasts from -π to 0. The other rectangular pulse has unit height, 1, and lasts from 0 to π.

I was making use of Laplace transform and its time shifting property to work out the Fourier transform and would like to stick with this method.

Do you think my work is correct? Thank you.

Your final answer should be correct if you did the algebra correctly (which I think you did).

Here is why it worked. If you have some function ##f(t)## with Laplace transform ##F(s)## with some region of convergence, and Fourier transform ##\hat{F}(\omega)##, then ##\hat{F}(\omega) = F(j\omega)## only if the region of convergence for ##F(s)## includes ##\sigma = Real(s) = 0##. The region of convergence for your Laplace transform does include ##\sigma=0## so it satisfies that requirement.

However, if your function was just ##u(t)## then the Laplace transform is ##1/s## with region of convergence ##real(s)>0##, so the Fourier transform is not ##\frac{1}{j\omega}##. Instead, the Fourier transform is ##\frac{1}{j\omega} + \pi \delta(\omega)##. Whenever the region of convergence for ##F(s)## is ##real(s)>0## you should expect the Fourier transform to have things like delta functions in it. If the region of convergence for ##F(s)## is ##real(s)>a>0##, then the Fourier transform does not exist at all; one example is ##u(t) e^t## which has Laplace transform ##\frac{1}{s-1}## with region of convergence ##real(s)>1## .

jason

PainterGuy
jasonRF said:
Here is why it worked. If you have some function ##f(t)## with Laplace transform ##F(s)## with some region of convergence, and Fourier transform ##\hat{F}(\omega)##, then ##\hat{F}(\omega) = F(j\omega)## only if the region of convergence for ##F(s)## includes ##\sigma = Real(s) = 0##.

Thank you for your note on the conversion between Laplace transform and Fourier transform. I do have a question about second para but will ask it later.

I checked my work again and it looked okay.

Anyway, I tried to verify it further using a Matlab code. I used trigonometric form of Fourier transform to plot the result. Please see the note below about the trigonometric form.

I set B(ω) = j{2ω-2ω*cos(πω)}/ω

The following is Matlab code I used. Please note that if you try to run the code, it would produce different warnings but it would work fine.

Matlab:
clear all; close all; clc;

t=linspace(-10,10,12000);

for it=1:12000

f=@(w)(1/pi).*((2.*w-2.*w.*cos(pi.*w))./w).*sin(w.*t(it));
F(it)=integral(f,0,1000);

end

figure('Name','inverse Fourier transform');
plot(t,F,'red');
ylim([-5 5]); % to restrict y axis
hold on;

The plot below was produced using the code above. Note that black dashed lines were drawn by me for clarity. You can see my result is quite weird. I don't think there is a problem with my code but still I cannot figure the problem. In the code I have restricted the y-axis limits. The plot at the bottom, Plot #2, was produced without restricting y-axis.

Plot #1:
Plot #2:

Last edited:
I see an error in your algebra in the original post. I happens when you multiply the numerator and denominator both by ##-j \omega##. Also, if you have access to the symbolic toolbox you can use Matlab to do the analytical Fourier transform. The command is Fourier - on the command line type
>> help fourier

to see examples of how to use it. Likewise ifourier is the inverse Fourier transform. Also, the symbolic step function is called heaviside in Matlab.

PainterGuy
I noticed you obtained the result
$$F(\omega) = j\frac{2\omega\cos \pi\omega - 2\omega}{\omega},$$ and you used that form in your second post. Is there some reason you didn't cancel the common factor of ##\omega##?

I suggest you calculate the Fourier transform of this function directly so you know what you're shooting for using your method. Then you don't have to guess if you ended up with the right result.

hutchphd
jasonRF said:
I see an error in your algebra in the original post. I happens when you multiply the numerator and denominator both by ##-j \omega##.

Thank you for pointing this out. I have fixed the error below.

It worked as well. The following plot was obtained after fixing the error in previous code.

vela said:
I suggest you calculate the Fourier transform of this function directly so you know what you're shooting for using your method.

Thank you for the suggestion. The method is good and I only made an algebraic error, and such an error could occur in the direct Fourier transform as well.

## 1. What is the Fourier transform of rectangular pulses?

The Fourier transform of rectangular pulses is a mathematical tool used to break down a signal into its individual frequency components. It represents the signal in the frequency domain, showing the amplitude and phase of each frequency component.

## 2. How is the Fourier transform of rectangular pulses calculated?

The Fourier transform of rectangular pulses is calculated using the Fourier transform formula, which involves integrating the signal over all time and multiplying it by a complex exponential function. This process is repeated for each frequency component, resulting in a representation of the signal in the frequency domain.

## 3. What is the significance of the Fourier transform of rectangular pulses in signal processing?

The Fourier transform of rectangular pulses is widely used in signal processing to analyze and manipulate signals. It allows us to identify the different frequency components present in a signal and filter out unwanted noise or interference. It is also used in image processing, audio processing, and many other fields.

## 4. Can the Fourier transform of rectangular pulses be applied to non-periodic signals?

Yes, the Fourier transform of rectangular pulses can be applied to both periodic and non-periodic signals. However, for non-periodic signals, the Fourier transform is often referred to as the Fourier transform of a finite energy signal, as the integration is done over a finite time interval instead of over all time.

## 5. Are there any limitations to using the Fourier transform of rectangular pulses?

One limitation of the Fourier transform of rectangular pulses is that it assumes the signal is continuous and infinite in time. In reality, most signals are discrete and have a finite duration. This can lead to inaccuracies in the frequency representation of the signal. Additionally, the Fourier transform cannot accurately represent signals with sharp changes or discontinuities, as it assumes the signal is smooth and continuous.

• Calculus
Replies
4
Views
2K
• Mechanics
Replies
16
Views
892
• Calculus
Replies
12
Views
10K
• Calculus
Replies
7
Views
2K
• Calculus
Replies
3
Views
1K
• Calculus
Replies
2
Views
2K
• Calculus and Beyond Homework Help
Replies
5
Views
544
• Calculus
Replies
4
Views
5K
• Calculus
Replies
5
Views
1K
• Calculus
Replies
8
Views
4K