Sine Waves
Notation s 0 … s n … s N 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) = a n –(for a = 1; 0 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 s n = r sin( n ), where n refers to the n th sample time We have: 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
Phase π/2 rad (90°) phase shift in sampling
Aliasing What happens as we decrease the sampling rate?
Conclusion We cannot recover signal components >F s /2 –Nyquist Theorem If analog signal has frequency components > F s /2, they will cause distortion by appearing as aliases –Must use anti-aliasing filter before sampling