Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Example: We have a complex sinusoid St=Aexp(j2pi fct+j phi) For frequency fc = 5

ID: 2079574 • Letter: E

Question

Example: We have a complex sinusoid

St=Aexp(j2pi fct+j phi)

For frequency fc = 500.Hz, what is its period (in milliseconds)?

1/(0.5 kKz) =2 msec

If we want to plot 5 cycles of the sinusoid what is the span of t (in milliseconds)?

5*2msec =10 msec

If we want to plot the sinewave with 50 samples per period what is the time increment t?

t = 2msec/50 =1/25 msec = 0.04 msec

What is the time vector to plot 5 cycles of sinewave with 50 samples per cycle?

t=0:0.04:10

Plot 5 cycles of the 500 Hz sinusoid with 50 samples per cycle. A = 2. phi = /3

A=2; t=0:1/25:10-1/25; phi=pi/3;

s=A*sin(2*pi*t*0.5+phi);

subplot(2,1,1)

plot(t,real(s),'linewidth',2)

hold on

plot(t,imag(s),’r’,’linewidth’,2)

grid on

axis([0 10 -2.5 2.5])

title('Time Series 0.5 kHz Tone')

xlabel('Time (Milliseconds)')

ylabel('Amplitude')

Plot the Signals Nyquist Diagram, (real vs. imaginary parts of the sinusoid’s spectrum).

subplot(2,2,3)

N=length(f_s);

f_s=fftshift(fft(s/N));

plot(f_s,'linewidth',2)

grid on

axis([-1.1 1.1 -1.1 1.1])

axis('square')

title('Nyquist Diagram, Single Real Sinusoid')

xlabel('Real Axis')

ylabel('Imaginary Axis')

Stem the real and Imaginary parts of the signal’s spectrum.

subplot(4,2,6)

ff=(-0.5:1/N:0.5-1/N)*25;

stem(ff,real(f_s),'marker','.','linewidth',2)

grid on

axis([-2.5 2.5 -1 1])

title('Real part Of Spectrum')

xlabel('Frequency (kHz)')

ylabel('Amplitude')

subplot(4,2,8)

stem(ff,imag(f_s),'marker','.','linewidth',2)

grid on

axis([-2.5 2.5 -1 1])

title('Imaginary part Of Spectrum')

xlabel('Frequency (kHz)')

ylabel('Amplitude')

question:

using matlab

Form the sequence xx zeros(1:100), xx(6-1; This is an impulse located at position 5 (first index is 0). Plot the time signal, the Nyquist Spectrum, and the real and imaginary parts of spectrum of xxOn).

Explanation / Answer


A=2; t=0:1/25:10-1/25; phi=pi/3;
s=A*sin(2*pi*t*0.5+phi);
subplot(4,1,1)
plot(t,real(s),'linewidth',2)
hold on
plot(t,imag(s),'r','linewidth',2)
grid on
axis([0 10 -2.5 2.5])
title('Time Series 0.5 kHz Tone')
xlabel('Time (Milliseconds)')
ylabel('Amplitude')

subplot(4,1,2)
N=10;
f_s=fftshift(fft(s/N));
plot(f_s,'linewidth',2)
grid on
axis([-1.1 1.1 -1.1 1.1])
axis('square')
title('Nyquist Diagram, Single Real Sinusoid')
xlabel('Real Axis')
ylabel('Imaginary Axis')
  
subplot(4,1,3)
ff=(-0.5:1/N:0.5-1/N)*25;
p=real(f_s)
stem(ff,p,'marker','linewidth',2)
grid on
axis([-2.5 2.5 -1 1])
title('Real part Of Spectrum')
xlabel('Frequency (kHz)')
ylabel('Amplitude')

subplot(4,1,4)
k=imag(f_s);
stem(ff,k,'marker','linewidth',2)
grid on
axis([-2.5 2.5 -1 1])
title('Imaginary part Of Spectrum')
xlabel('Frequency (kHz)')
ylabel('Amplitude')

Dr Jack
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote