Question

In: Electrical Engineering

1. Generate a sine wave with frequency 100 Hz. a. Sample the signal with a sampling...

1. Generate a sine wave with frequency 100 Hz.

a. Sample the signal with a sampling frequency (i) 1000 Hz and (ii) 1050 Hz.

b. For each frequency in Question 1(a), perform DFT for ONE (1) cycle and ONE and a HALF (1.5) cycles of the waveform. Comment on your observation.

Solutions

Expert Solution

clc;clear;
Fs = 1000;
f = 100;
Td = 1/Fs;
t = 0:Td:1/f;
Am = 1;
v = Am*sin(2*pi*100*t);
N = length(v);
subplot(2,2,1)
stem(t,v)
grid on
title 'with Fs = 1000'
xlabel 'Time'
ylabel 'Amplitude'

del_f = (-Fs/2):(Fs/(N-1)):(Fs/2);
X = fftshift(fft(v)/N);
subplot(2,2,2)
plot(del_f,abs(X))
grid on;
xlabel 'Freq'
ylabel 'Amplitude'

%%

Fs = 1010;
f = 100;
Td = 1/Fs;
t = 0:Td:1/f;
Am = 1;
v = Am*sin(2*pi*100*t);
N = length(v);
subplot(2,2,3)
stem(t,v)
grid on
title 'with Fs = 1010'
xlabel 'Time'
ylabel 'Amplitude'

del_f = (-Fs/2):(Fs/(N-1)):(Fs/2);
X = fftshift(fft(v)/N);
subplot(2,2,4)
plot(del_f,abs(X))
grid on;
xlabel 'Freq'
ylabel 'Amplitude'

%%
Fs = 1000;
f = 100;
Td = 1/Fs;
t = 0:Td:(3/(2*f));
Am = 1;
v = Am*sin(2*pi*100*t);
N = length(v);
figure;
subplot(2,2,1)
stem(t,v)
grid on
title 'with Fs = 1000'
xlabel 'Time'
ylabel 'Amplitude'

del_f = (-Fs/2):(Fs/(N-1)):(Fs/2);
X = fftshift(fft(v)/N);
subplot(2,2,2)
plot(del_f,abs(X))

%%
Fs = 1010;
f = 100;
Td = 1/Fs;
t = 0:Td:(3/(2*f));
Am = 1;
v = Am*sin(2*pi*100*t);
N = length(v);
subplot(2,2,3)
stem(t,v)
grid on
title 'with Fs = 1010'
xlabel 'Time'
ylabel 'Amplitude'

del_f = (-Fs/2):(Fs/(N-1)):(Fs/2);
X = fftshift(fft(v)/N);
subplot(2,2,4)
plot(del_f,abs(X))
grid on;
xlabel 'Freq'
ylabel 'Amplitude'

Matlab Result:


Related Solutions

2. Please use Matlab to generate two sine waves of 100 Hz and 10 Hz frequencies,...
2. Please use Matlab to generate two sine waves of 100 Hz and 10 Hz frequencies, respectively. Both sine waves will have a peak value of 1 (peak to peak value of 2). The sampling rate is 1000 Hz (fs = 1000 Hz) and the total data point is 1000 points for each wave. Combine the two sine waves into one. Plot the combined waveform (1 point). Then, perform fft on the combined waveform. Plot the frequency amplitude spectrum from...
there is a sinusoidal message signal (f = 100 Hz). Make amplitude modulation with carrier frequency...
there is a sinusoidal message signal (f = 100 Hz). Make amplitude modulation with carrier frequency of 10KHz. Use three different modulation depths / indices (0.2 /0.60/0.8). Then demodulate this mixed signal (for these three cases) by try to get message signals. (need matlab codes and graphs)
A wave of water behaves like a plane wave with a frequency of 12 Hz breaks...
A wave of water behaves like a plane wave with a frequency of 12 Hz breaks as it passes a sharp barrier between deep and shallow water. The velocity of the wave's propagation in the deep water is 24 cm/s, the angle of the wave reaching the barrier is 60o and the breaking wave angle at the barrier is 40o. a. What is the velocity of propagation of the wave in shallow water? b. What is the wavelength in the...
Use the sine wave and scope in the Simulink library (MATLAB) to generate and observe the...
Use the sine wave and scope in the Simulink library (MATLAB) to generate and observe the following waves: a. ?1 (?) = sin ?? b. ?2 (?) = cos ?? c. ?2 (?) = 0.5 cos ?? d. ?3 (?) = cos (?? − ?) ? = 1 ???/s
An electromagnatic wave is traveling in vacuum with frequency 6.5 x 1014 Hz. The wave has...
An electromagnatic wave is traveling in vacuum with frequency 6.5 x 1014 Hz. The wave has average total energy density of 4.6 x 10-6 J/m3. (a) What is the speed of this wave? (b) What is the wavelength of this wave? (c) What is the maximum electric field of this wave? (d) What is the rms magnetic field of this wave? (e) How much energy does a 2 m2 flat surface (perpendicular to the wave propagation direction) receive in 8...
Design a sine wave generator with adjustable frequency and amplitude. Show circuit diagram please!
Design a sine wave generator with adjustable frequency and amplitude. Show circuit diagram please!
Generate a signal composed of two square waves, the first has a 14 Hz and the...
Generate a signal composed of two square waves, the first has a 14 Hz and the second has a 55 Hz frequency. Both waves are sampled at 2 kHz for 200 ms. Duty cycle for the first wave is 40% while the second’s is 35%. Show the signal with and without adding white Gaussian noise with a variance of 1/100 in matlab
An analog signal, bandlimited to 20 Hz is corrupted by high-frequency noise. The spectrum of the...
An analog signal, bandlimited to 20 Hz is corrupted by high-frequency noise. The spectrum of the noise is from 25 Hz to 35 Hz. The noisy analog signal is sampled at 60 Hz. A digital lowpass filter is to be designed so as to remove the noise from the signal. Find the desired frequency response.
Assume that you have a clock signal with frequency of 50 Hz, and you want to...
Assume that you have a clock signal with frequency of 50 Hz, and you want to divide this signal into a frequency of 1 Hz signal. The counter chips you must use are synchronous decade (MOD 10) counter chips 74160 and synchronous MOD 16 counter chips 74161. Please use the back side of this paper to draw your circuit diagram with all the details. You can use counter frequency division method to step down a higher frequency signal to a...
An acoustic signal is composed of the first three harmonics of a wave of fundamental frequency...
An acoustic signal is composed of the first three harmonics of a wave of fundamental frequency 425 Hz. If these harmonics are described, in order, by cosine waves with amplitudes of 0.630, 0.900, and 0.650, what is the total amplitude of the signal at time 0.825 seconds? Assume the waves have phase angles θn = 0.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT