Elec 6601
Elec 6601
ELEC 6601
Name ID Project
Syeda Shawlin Monjur 40257281 01
2
Objective:
This project demonstrates two key properties of the Fourier Transform (FT)
for a random complex-valued signal x[n]x[n]x[n]. The main goals are:
Problem Statement
Given a random complex-valued signal x[n], where the real and imaginary
parts are independently drawn from a uniform distribution over the range
[0,1], we define:
F(xe[n]) = Re{X(e^jω)}.
F(x∗[−n]) = X∗(e^jω).
3
Methodology
xe[n]=1/2(x[n]+x∗[−n]).
Its Fourier Transform Xe(e^jω) was computed, and its magnitude was
compared to the real part of the original Fourier Transform Re{X(e^jω)}.
Results
shown in the plot (see Figure 1), the magnitude of ∣Xe(e^jω)∣ (blue line)
was compared to the real part of the original Fourier Transform. As
aligns closely with the real part of X(e^jω) (red dashed line),
confirming that:
F(xe[n]) = Re{X(e^jω)}.
confirms that:
F(x∗[−n]) = X∗(e^jω).
Conclusion
5
Both parts of the problem have been successfully demonstrated. The key
properties of the Fourier Transform for a random complex-valued signal
were verified as follows:
Appendix
N = 1024;
n = 0:N-1;
X = fft(x);
X_e = fft(x_e);
real_X = real(X);
figure;
subplot(2,1,1);
freqs = (0:N-1) * (2*pi/N);
plot(freqs, abs(X_e), 'b', 'DisplayName', '|X_e(e^{j\omega})|');
hold on;
plot(freqs, abs(real_X), 'r--', 'DisplayName', 'Re{X(e^{j\omega})}');
title('Part I: Fourier Transform Comparison');
xlabel('\omega');
ylabel('Magnitude');
legend;
grid on;
x_conj_time_rev = conj(flip(x));
X_conj_time_rev = fft(x_conj_time_rev);
X_conj = conj(X);
subplot(2,1,2);
plot(freqs, abs(X_conj_time_rev), 'b', 'DisplayName', '|X^*(-e^{j\omega})|');
hold on;
plot(freqs, abs(X_conj), 'r--', 'DisplayName', '|X^*(e^{j\omega})|');
title('Part II: Fourier Transform Comparison');
xlabel('\omega');
ylabel('Magnitude');
legend;
grid on;
Introduction:
The random signal x[n] is generated, and the DTFT is computed using
MATLAB to demonstrate these properties.
Methodology:
3. Property Verification:
Results:
Real and Imaginary Parts: The real part of X(e^jω) was verified to
be even, as demonstrated in Figure 1. The imaginary part was
confirmed to be odd by comparing the original with its negated
version.
∠X(e^jω)\ is odd, as seen by the close match between the phase and
Phase: The lower subplot of Figure 2 demonstrates that the phase
Conclusion:
These results align with the theoretical expectations for the Fourier
transform of a real-valued signal, confirming the correctness of the
analysis.
Appendix
N = 40;
n = 0:N-1;
x = rand(1, N);
X = zeros(1, N);
for k = 1:N
X(k) = sum(x .* exp(-1j * frequencies(k) * n));
end
XR = real(X);
XI = imag(X);
magnitude_X = abs(X);
is_even_magnitude = all(abs(magnitude_X - circshift(magnitude_X, N/2)) < 1e-10);
phase_X = angle(X);
is_odd_phase = all(abs(phase_X + circshift(phase_X, N/2)) < 1e-10);
figure (1);
11
subplot(2, 1, 1);
plot(frequencies, XR, 'b', 'DisplayName', 'Real Part');
hold on;
plot(frequencies, circshift(XR, N/2), 'r--', 'DisplayName', 'Circshift Real Part');
title('Real Part of X(e^{j\omega})');
xlabel('\omega');
ylabel('Magnitude');
legend;
grid on;
subplot(2, 1, 2);
plot(frequencies, XI, 'b', 'DisplayName', 'Imaginary Part');
hold on;
plot(frequencies, -circshift(XI, N/2), 'r--', 'DisplayName', 'Negated Circshift Imaginary Part');
title('Imaginary Part of X(e^{j\omega})');
xlabel('\omega');
ylabel('Magnitude');
legend;
grid on;
figure (2);
subplot(2, 1, 1);
plot(frequencies, magnitude_X, 'b', 'DisplayName', '|X(e^{j\omega})|');
hold on;
plot(frequencies, circshift(magnitude_X, N/2), 'r--', 'DisplayName', '|X(e^{-j\omega})|');
title('Magnitude of X(e^{j\omega})');
xlabel('\omega');
ylabel('Magnitude');
legend;
grid on;
subplot(2, 1, 2);
plot(frequencies, phase_X, 'b', 'DisplayName', 'Phase of X(e^{j\omega})');
hold on;
plot(frequencies, -circshift(phase_X, N/2), 'r--', 'DisplayName', 'Negated Circshift Phase');
title('Phase of X(e^{j\omega})');
xlabel('\omega');
ylabel('Radians');
legend;
grid on;
12
Introduction
2. Perform the convolution of x[n] and h[n] and plot the resulting signal
y[n]=x[n]∗h[n].
Methodology
We used MATLAB to define the two signals, compute their convolution, and
calculate their Fourier Transforms. The steps are as follows:
5. Use the FFT (Fast Fourier Transform) to compute the Fourier Transforms
X(e^jω), H(e^jω), and Y(e^jω), and plot their magnitudes for
verification.
13
Results
Signal x[n]:
Signal h[n]:
Figure: 1
Figure: 2
Magnitude of X(e^jω):
15
Magnitude of H(e^jω):
Magnitude of Y(e^jω)=X(e^jω)H(e^jω):
The plots of ∣Y(e^jω)∣ verify that the convolution in the time domain
corresponds to the multiplication of the Fourier Transforms in the
frequency domain.
16
Figure: 3
Conclusion
Appendix
n = -10:20;
figure;
subplot(2,1,1);
stem(n, x_n, 'filled');
title('Signal x[n]');
xlabel('n');
ylabel('x[n]');
grid on;
subplot(2,1,2);
stem(n, h_n, 'filled');
title('Signal h[n]');
xlabel('n');
ylabel('h[n]');
grid on;
figure;
stem(n_conv, y_n, 'filled');
title('Convolution of x[n] and h[n], y[n] = x[n] * h[n]');
xlabel('n');
ylabel('y[n]');
grid on;
17
figure;
subplot(3,1,1);
plot(omega, abs(fftshift(X)));
title('Magnitude of X(e^{j\omega})');
xlabel('\omega');
ylabel('|X(e^{j\omega})|');
grid on;
subplot(3,1,2);
plot(omega, abs(fftshift(H)));
title('Magnitude of H(e^{j\omega})');
xlabel('\omega');
ylabel('|H(e^{j\omega})|');
grid on;
subplot(3,1,3);
plot(omega, abs(fftshift(Y)));
title('Magnitude of Y(e^{j\omega}) = X(e^{j\omega}) H(e^{j\omega})');
xlabel('\omega');
ylabel('|Y(e^{j\omega})|');
grid on;