Question: #1380

ECET 350 HW Week 2 Complete Solution

ECET 350, HW Week 2

PG 58-62

2a-c, 7, 9a-c, 10ab, 16a-c, 19, 22a-c, 24


2. Determine the Nyquist sampling rate for each of the following analog signals:

  1.  
  2.  
  3.  

Complete code below then verify your answer using MATLAB:

clc; clear all; close all;

% Week 2 HW prob 2

a=____/(2*pi);

FnyquistA=2*a

b=(__________)/(2*pi);

FnyquistB=2*b

c=(__________)/(2*pi);

FnyquistC=2*c

 

FnyquistA =

FnyquistB =

FnyquistC =

 

 

7. Baseband Frequency = 5kHz - 25kHz with a sample rate:

                Draw the graph

  1. 60kHz

 

Verify your answer using MATLAB:

 

  •  

Fs = 60000;

t = 0:1/Fs:1-(1/Fs);

x = cos(10000*pi*t+pi/3)+(sin(50000*pi*t+pi/4));

xdft = (1/length(x))*fft(x);

freq1 = 0:(Fs/length(x)):60000-(Fs/length(x));

freq2 = 60000:(Fs/length(x)):120000-(Fs/length(x));

freq3 = 120000:(Fs/length(x)):180000-(Fs/length(x));

  •  
  •  
  •  
  •  

 

 

  1. 40kHz

 

 

Verify your answer using MATLAB:

 

  •  

Fs = 40000;

t = 0:1/Fs:1-(1/Fs);

x = cos(10000*pi*t+pi/3)+(sin(50000*pi*t+pi/4));

xdft = (1/length(x))*fft(x);

freq1 = 0:(Fs/length(x)):40000-(Fs/length(x));

freq2 = 40000:(Fs/length(x)):80000-(Fs/length(x));

freq3 = 80000:(Fs/length(x)):120000-(Fs/length(x));

  •  
  •  
  •  
  •  

 

 

 

 

9. Determine the locations of the peaks in the sampled spectrum for the following sine waves:

  1. f= 300 Hz, Fs = 1kHz

 

 

Verify your answer using MATLAB:

 

  •  

Fs = 1000;

t = 0:1/Fs:1-(1/Fs);

x = sin(600*pi*t+pi/4));

xdft = (1/length(x))*fft(x);

freq1 = 0:(Fs/length(x)):1000-(Fs/length(x));

freq2 = 1000:(Fs/length(x)):2000-(Fs/length(x));

freq3 = 2000:(Fs/length(x)):3000-(Fs/length(x));

  •  
  •  
  •  
  •  

 

 

  1. f= 600 Hz, Fs = 1kHz

 

 

Verify your answer using MATLAB:

 

  •  

Fs = 1000;

t = 0:1/Fs:1-(1/Fs);

x = sin(1200*pi*t+pi/4));

xdft = (1/length(x))*fft(x);

freq1 = 0:(Fs/length(x)):1000-(Fs/length(x));

freq2 = 1000:(Fs/length(x)):2000-(Fs/length(x));

freq3 = 2000:(Fs/length(x)):3000-(Fs/length(x));

  •  
  •  
  •  
  •  

 

 

  1. f= 1.3 kHz, Fs = 1kHz

 

 

Verify your answer using MATLAB:

 

  •  

Fs = 1000;

t = 0:1/Fs:1-(1/Fs);

x = sin(2600*pi*t+pi/4));

xdft = (1/length(x))*fft(x);

freq1 = 0:(Fs/length(x)):1000-(Fs/length(x));

freq2 = 1000:(Fs/length(x)):2000-(Fs/length(x));

freq3 = 2000:(Fs/length(x)):3000-(Fs/length(x));

  •  
  •  
  •  
  •  

 

 

10. Find the aliased frequencies for the following band-limited signals sampled at 1kHz. For each, draw the spectrum for the sampled signal between -500 and 1500 Hz and indicate whether spectral inversion occurs in the baseband:

  1. Signal band limited between 1100 and 1400 Hz [fig 2.29]

 

  1. Signal band limited between 800 and 950 Hz [fig 2.30]

 

 

 

16. Voltage between -3V and +3V must be digitized. Find the quantized step size when samples are quantized using:

Verify your answer using MATLAB:

  1. 4 bits
  2. 8 bits
  3. 16 bits

clc; clear all; close all;

% Week 2 HW prob 16a

Vmin = -3; Vmax = 3;

Na=4; Nb=8; Nc=16;

R = Vmax - Vmin;

  1.  
  2.  
  3.  

Qa =

         

Qb =

    

Qc =

 

 

19. An analog sample-and-hold signal and its quantized digital counterpart are plotted in Figure 2.3q from Table 2.4. Compute the quantization errors for each of the 10 samples, assuming that the time for the sampler to acquire the signal at each sampling point is negligible.

Error = Quantized – sample

 

n

0

1

2

3

4

5

6

7

8

9

Sample and hold

1.4

 

 

 

 

 

 

 

 

 

Quantized level

1

 

 

 

 

 

 

 

 

 

Errors

-0.4

 

 

 

 

 

 

 

 

 

 

 

Determine the digital codes, the quantized level and quantization error for each sample

Samples from table 2.5, using table 2.6

 

n

Analog Sample(V)

Digital Code

Quantized Level

Range of Analog Inputs (V)

 

Error

0

0.5715

1

0.625

 

0.625

1

4.9575

 

 

 

 

2

0.625

 

 

 

 

3

3.6125

 

 

 

 

4

4.05

 

 

 

 

5

0.9555

 

 

 

 

6

2.7825

 

 

 

 

7

1.5625

 

 

 

 

8

2.75

 

 

 

 

9

2.8755

 

 

 

 

 

22. Find the dynamic range in dB of a quantizer using: 

Verify your answer using MATLAB:

 

  1. 4 bits
  2. 8 bits
  3. 16 bits

clc; clear all; close all;

% Week 2 HW prob 22

%DR=DynamicRange

Na=4;Nb=8;Nc=16;

DRa=20*log10(2^Na)

DRb=20*log10(2^Nb)

DRc=20*log10(2^Nc)

 

DRa =

      

DRb =

      

DRc =

       

 

24. An analog signal between 0 and 1 V must be quantized. The midrange quantization errors must be no greater than 0.1V. How many quantization bits must be used to satisfy this requirement.

Verify your answer using MATLAB:

 

clc; clear all; close all;

% Week 2 HW prob 24 dynamic range

%Qe=R/2^N solve for N

Vmin=0;Vmax=1;

R=Vmax-Vmin;

Qe = 0.1;

%2^N=R/Qe

N=round(log2(R/Qe))

 

 

N =

    

 
Solution: #1360

ECET 350 HW Week 2 Complete Solution

Fs = 60000;
t = 0:1/Fs:1-(1/Fs);
x = cos(10000*pi*t+pi/3)+(sin(50000*pi*t+pi/4));
xdft = (1...

Tutormaster
Rating: A+ Purchased: 11 x Posted By: Tutormaster
Comments
Posted by: Tutormaster

Online Users