Upload
hugo-leite
View
215
Download
0
Embed Size (px)
Citation preview
8/4/2019 DSM2 1102 week 2
1/4
1
DSM2 week 2 2011
SPFfirst Chapter 4 (p 83-p. 96 ) is finished by the end of the week.
Ex. 1The continuous function x(t) may be written
x(t)=Acos(t+ ) formula 1
x(t) is sampled at fs=1000Hz and x[n] (shown below, fig. 1) is created.
Assume Shannon Sampling Theorem is satisfied and n=0 correspond to t=0.
fig.1
1) Determine 2 values of t where x(t) has max.2) Determine .3) Determine A, and in formula 1 above.
Ex. 2
Three continuous signals s1, s2, s3 is given by
s1=cos( 4002t)
s2=cos( 6002t)
s3=cos(24002t)
Sample frequency fs =1000 samples/second.
1) Determine the normalized radian frequency and the normalized cyclicfrequency f for s1, s2 and s3.
2) Does Shannon Sampling Theorem apply?3) Compute the frequencies of the output signals.
8/4/2019 DSM2 1102 week 2
2/4
2
Ex. 3
1) Suppose that the discrete-time signal x[n] is given by the formula:[]
Sketch the spectrum (as we did last week Ex. 1.2)
2) If the input x(t) is given by the two-sided spectrum representation shownbelow,
7ej/3
7e-j/3
5e-j/2
5ej/2
-3500 -1100 0 1100 3500 f(in Hz)
Determine the discrete-time spectrum for x[n] when fsi=4000 samples/second.Make a plot for your answer, but label the frequency, amplitude and phase of
each spectral component.
3) Using the discrete-time spectrum from part b), determine the analog frequencycomponents in the output y(t) when the sampling rate of the D-to-C converter
is fso=8000 samples/sec. In other words, the sampling rates of the two
converters are different.
Ex. 4
MATLAB supports sound on PC platforms (on platforms with audio devices).
soundsc(y,fs)sends the sampled signal in the vector y to the computers speaker atsample frequency fs.
See MATLAB help soundsc for more information.a) With n=0:4000 try: soundsc(cos(n*0.2*pi),4400).
Which frequency did you hear?
The plot below is titled Spectogram, it is a plot of frequency versus time.
In the interval [0, 0.2[ x(t) is a sinusoid of frequency 500 Hz,
In the interval [0.2,0.4[ x(t) is a sinusoid of frequency 1000 HzIn the interval [0.4,0.6[ ....etc.
8/4/2019 DSM2 1102 week 2
3/4
3
The signal x(t) is sampled with a sampling frequency fs=3200 samples/sec.
b) Create the vector xn and check the sound using soundsc(xn,fs).Did you get the expected result? If not explain why.Help: xn=[x1n x2n ], where x1n=cos(500*2*pi*n*Ts),x2n=cos(1000*2*pi*n*Ts) etc.
c) Try also the MATLAB function specgram(xn,[],fs).d) To avoid aliasing, change the sampling frequency.
Ex. 5
In Ex. 4 the input signal x(t) was a staircase shaped signal. In this problem x(t) is a linear
FM chirp signal: () ()After sampling: [] (()) ()
MATLAB has a linear chirp function:
Y = CHIRP(T,F0,T1,F1) generates samples of a linear swept-frequencysignal at the time instances defined in array T. The instantaneous
frequency at time 0 is F0 Hertz. The instantaneous frequency F1
is achieved at time T1.
Now run the following MATLAB script:% DEMO of aliasing by bej. Just run "aliastest" with sound turned on.
fs=16000;
f1=120; f2=24000;
T=8;
x = chirp(0:1/fs:T,f1,T,f2,'linear');soundsc(x,fs)
specgram(x,256,fs)
1) Determine the max. frequency2) Sketch the spectrogram if fs = 8000 samples/second.3) Calculate (by differentiation) the frequency as function of time of the signal
)2cos( 2tftx m
8/4/2019 DSM2 1102 week 2
4/4
4
Ex. 6
A block diagram representation of a sampling and reconstruction system is given below.
x(t) x[n] y(t)
Ts = 1/fs Ts = 1/fs
Suppose the continuous-time input x(t) to the above system is given as
() () () () () ()1) What sampling rate is required such that no aliasing occurs for x(t)?2) Given fs=10000 samples/second, plot the frequency spectrum for x[n]:
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 f
3) Given that fs=3000 samples/second, plot the frequency spectrum for x[n]:
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 f
Given that
()
4) and fs=10000 samples/second, write a simplified expression for the output y(t) interms of cosine functions.
IdealC-to-D
IdealD-to-C