Sine Waves. Notation s 0 … s n … s N or s(0), … s(n), … s(N) Sketch the following digital...
-
Upload
alicia-stevens -
Category
Documents
-
view
215 -
download
3
Transcript of Sine Waves. Notation s 0 … s n … s N or s(0), … s(n), … s(N) Sketch the following digital...
Sine Waves
Notation
• s0… sn … sN or s(0), … s(n), … s(N)
• Sketch the following digital signals:• δ (n) = 1, n = 0
= 0, otherwise
• u (n) = 1, n >= 0
= 0, n < 0
• x (n) = an
– (for a = 1; 0<a<1; a>1, and a=-1; -1<a<0; a<-1)
Sine Wave Generation
• Point P moves at f Hz (cycles/s) duration of 1cycle T = 1/f
• There are N samples in one rotation of the point P
• sn = r sin(n) , where n refers to the nth sample time
• We have:
ss
ns
nn
πfnTrF
πfnrsFNf
N
πnrs
N
n
π
θ
2sin2
sin
2sin
2
snT is simply an array of sample times
Sine Wave Generation in MATLAB
function sig = makesine (f, fs, timelen)
t = 0:(1/fs):timelen-(1/fs);
sig = sin(2*pi*f*t);
plot (t, sig);
grid;
Sampling when 2
sFf
Phase
• π/2 rad (90°) phase shift in sampling
Aliasing• What happens as we decrease the sampling rate?
Conclusion
• We cannot recover signal components >Fs/2– Nyquist Theorem
• If analog signal has frequency components >Fs/2, they will cause distortion by appearing
as aliases– Must use anti-aliasing filter before sampling