Question

In: Electrical Engineering

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

Solutions

Expert Solution

Hello,
          Please find the answer attached as under. Please give a thumbs up rating if you find the answer useful! Have a rocking day ahead!

****** Matlab Code *******

Fs = 2e3;                                               % sampling freq
t = 0:1/Fs:(200e-3);                                    % time base
f1 = 14;                                                % frequencies of the pulses
f2 = 55;
pulsewidth1 = (40/100)*(1/f1);                          % ON periods
pulsewidth2 = (35/100)*(1/f2);
pulseperiods1 = [0:Fs*200e-3]*(1/f1);                   % time periods
pulseperiods2 = [0:Fs*200e-3]*(1/f2);
x1 = pulstran(t,pulseperiods1,@rectpuls,pulsewidth1);
x2 = pulstran(t,pulseperiods2,@rectpuls,pulsewidth2);
subplot(2,1,1);
plot(t,x1+x2);
xlabel('Time (s)');
title('Pulse without noise');

var = 1/100;
y = x1+x2+sqrt(var)*randn(size(t));
subplot(2,1,2);
plot(t,y);
xlabel('Time (s)');
title('Pulse with noise');

********* Output *********


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...
Write the code in assembly language to generate two square waves of frequency 1KHZ with 50%...
Write the code in assembly language to generate two square waves of frequency 1KHZ with 50% duty cycle and 10KHZ with 50% duty cycle using P1.0 and P1.1 using timer0 and timer1 simultaneously. Don't use instruction overhead. use timer interrupts to implement the functionality use Xtal=12MHZ
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.
Square waves of 200 and 301 Hz are sounded together. How many beats are heard? Write...
Square waves of 200 and 301 Hz are sounded together. How many beats are heard? Write out the harmonics of each tone and indicate harmonics that might beat with harmonics of the other tone. Do the same for sawtooth waves at these frequencies. Can second order beats be explained as beats between harmonics of the two tones?
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.
Generate a baseband message signal m(t) to be a square waveform of duration 120 msec and...
Generate a baseband message signal m(t) to be a square waveform of duration 120 msec and amplitude 1 V. The sampling frequency is - = 10 . Use a carrier of amplitude 1 and frequency 600 Hz and perform the following modulation/demodulation operations: 1. DSB-SC a. modulation of the message signal m(t) b. coherent demodulation, assuming that the local carrier @ the receive-side is perfectly synchronized in frequency and phase with the transmit-side carrier. c. lowpass filtering of the demodulated...
5. What are two methods to generate single-side band AM signal. If the modulating signal (message)...
5. What are two methods to generate single-side band AM signal. If the modulating signal (message) has DC omponent, which method you will choose? Why? could you please answer this in a complete brief explanation?
Two speakers spaced a distance 1.5 m apart emit coherent sound waves at a frequency of 680 Hz in all directions. The waves start out in phase with each other.
Two speakers spaced a distance 1.5 m apart emit coherent sound waves at a frequency of 680 Hz in all directions. The waves start out in phase with each other. A listener walks in a circle of radius greater than 1 m centered on the midpoint of the two speakers. At how many points does the listener observe destructive interference? The listener and the speakers are all in the same horizontal plane and the speed of sound is 340 m/s....
Two in-phase loudspeakers emit identical 1000 Hz sound waves along the x-axis. What distance should one...
Two in-phase loudspeakers emit identical 1000 Hz sound waves along the x-axis. What distance should one speaker be placed behind the other for the sound to have an amplitude 1.90 times that of each speaker alone?
7. Write a C program to generate a 16kHz PWM signal that has 40% duty cycle...
7. Write a C program to generate a 16kHz PWM signal that has 40% duty cycle using Timer2 of an ATMega8 microcontroller.   8. Consider a push button switch SW0 connected to pin INT0 external interrupts of an ATMega8 AVR. 8 LEDS are connected to port PB0-PB7 on the same AVR. These LEDS are connected such a lit LED displays that the output port is on logic level 1. On start-up, TASK1 is executed and continue indefinitely. If the push-button switch...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT