0% found this document useful (0 votes)
24 views6 pages

Signals & Systems Assignment: MATLAB Simulation

Uploaded by

jadichandana123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views6 pages

Signals & Systems Assignment: MATLAB Simulation

Uploaded by

jadichandana123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Signals & systems Assignment

NAME:K.ALEKYA

ROLLN0:22211A0224

FOURIER TRANSFORM OF NON PERIODIC SIGNALS

INTRODUCTION
The Fourier Transform is a mathematical technique that decomposes a function or signal into its

constituent frequencies. It transforms signals between the time domain and the frequency domain,

making it a powerful tool .

There are two main types of Fourier Transform:

1. Forward Fourier Transform: Converts a time-domain signal into its frequency-domain

representation.

2. Inverse Fourier Transform: Converts a frequency-domain representation back into its

time-domain form

MATLAB Simulation

The matlab script that simulates the fourier transform of a Gaussian pulse.It

also plots the time domain signal and its frequency….

MATLAB Code implementation:


A Gaussian pulse in the time domain:

x(t) = e^-t^2 / (2σ^2)Analytical Fourier Transform:


X(f) = σ√(2π)· e^-2π^2 σ^2 f^2

```matlab

% Clear environment

clear; clc; close all;

% Time domain parameters

t = linspace(-1, 1, 1000); % Time vector

sigma = 0.1; % Width of Gaussian

x = exp(-t.^2 / (2 * sigma^2)); % Gaussian pulse

% Plot Time Domain Signal

figure;

plot(t, x, 'b', 'LineWidth', 2);

title('Gaussian Pulse (Time Domain)');

xlabel('Time (s)');

ylabel('Amplitude');

grid on;

% Numerical Fourier Transform (FFT)

dt = t(2) - t(1); % Time step

Fs = 1 / dt; % Sampling frequency

n = length(x); % Number of points

f = (-n/2:n/2-1)*(Fs/n); % Frequency vector


X_fft = fftshift(fft(x)); % Center FFT

X_fft_mag = abs(X_fft); % Magnitude

[17/05, 12:00 am] ChatGPT: X_fft_mag = X_fft_mag / max(X_fft_mag); % Normalize

% Plot Frequency Spectrum - Numerical

figure;

plot(f, X_fft_mag, 'b', 'LineWidth', 2);

title('Frequency Spectrum of Gaussian Pulse (Numerical FFT)');

xlabel('Frequency (Hz)');

ylabel('Normalized Magnitude');

grid on;

% Analytical Fourier Transform

X_analytic = sigma * sqrt(2*pi) * exp(-2*pi^2 * sigma^2 * f.^2);

X_analytic = X_analytic / max(X_analytic); % Normalize

% Plot Comparison

figure;

plot(f, X_fft_mag, 'b', 'LineWidth', 2); hold on;

plot(f, X_analytic, 'r--', 'LineWidth', 2);

title('Comparison: Numerical FFT vs Analytical Fourier Transform');

xlabel('Frequency (Hz)');
label('Normalized Magnitude')

('Numerical FFT ', 'Analytical');

grid on;

RESULT AND ANALYSIS OF OUTPUT


Graph 1: Gaussian Pulse in Time Domain*
- This is the original signal.

- You used a narrow Gaussian (σ = 0.1), centered at t = 0.

- The signal is non-periodic and decays rapidly outside the center.

Graph 2: Frequency Spectrum (Numerical FFT)

- Shows the magnitude of the frequency content.

- The peak is at 0 Hz, meaning the signal is centered in frequency.

- The shape is also Gaussian — matching the expected behavior from theory.

Graph 3: Analytical vs Numerical Comparison

- Overlays the analytical transform with the FFT result.

- Both curves match extremely well — validating your numerical FFT implementation.

CONCLUSION:

* The analytical and numerical methods agree, demonstrating the accuracy of your simulation.

- The Gaussian pulse in the time domain has a Gaussian frequency spectrum.

- The narrower the pulse in time, the wider its spectrum in frequency.

- The FFT output matches the analytical result, proving accuracy.

- Time-Frequency Duality: Narrow time-domain signals lead to wide frequency-domain

representations, and vice versa.

- The FFT output matches the analytical solution, validating both methods.

- This demonstrates the efficacy of numerical techniques (FFT) in signal analysis.

You might also like