This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECE 101  Linear Systems, Winter 2009 Lab # 6 Solutions (send comments/questions to kquest@ucsd.edu) In this MATLAB exercise the effects of aliasing on a periodic discrete function are explored. Assume you are given the continuous function x ( t ) = sin( t ). with CTFT ( j ) = j ( (  ) (  )) It can be sampled at a period T = 2 / s , yielding x p ( t ) = X n = x ( nT ) ( t nT ) with CTFT p ( j ) = 1 T X k = ( j (  k s )) We can attempt to recover the original function x ( t ) by passing x p ( t ) through the ideal filter H ( j ) = 1 for   &lt; s / 2 otherwise Thus, r ( j ) = p ( j )[ u ( + s / 2) u (  s / 2)] yielding r ( j ) = ( /j )( (  ) ( + )) for   &lt; s / 2 ( /j )( (  + k s ) ( +  k s ))  (2 k 1) s / 2  &lt;   &lt;  (2 k + 1) s / 2  for k = 1, 2, ... Inverting the transform yields x r ( t ) = sin( t ) for   &lt; s / 2 sin(( k s ) t )  (2 k 1) s / 2  &lt;   &lt;  (2 k + 1) s / 2  As expected, if the condition for the sampling theorem is satisfied ( &lt; s / 2), then the original function x ( t ) is recovered. If the condition is violated, aliasing occurs. 1 Problem 7.1(ab), BDS In order to demonstrate the above points using MATLAB, start by defining the continuous function x ( t ) = sin( t ), with frequency = 2 (1000), and then sampled at a period T = 1 / 8192 for N = 8192 samples. We obtain x [ n ] = x ( nT ) = sin( nT ) for n = 0, 1, 2, ..., N 1. The first 50 samples of x [ n ] are displayed in the following figure as well as the linear interpolation of x ( t ). As can be seen, 10 20 30 40 5010.5 0.5 1 n x[n] = 2 (1000) 1 2 3 4 5 6 x 10310.5 0.5 1 t x(t) the linear interpolation is a good approximation of the original sine function. 2 Problem 7.1(c), BDS Before doing this part, a little background information will help in the un derstanding of the MATLAB function CTFTS. First, when given a discrete, periodic, function such as x [ n ], the DTFS can be calculated using the MATLAB routine fft. The length of the input vector x [ n ] must be N , where N is an integer multiple of the fundamental period of x [ n ]. For example, for part a and b of this problem x [ n ] = sin[ Tn ] = sin 2 1000 8192 n = sin...
View
Full
Document
This note was uploaded on 02/24/2010 for the course ECE ECE25 taught by Professor Bill lin during the Spring '09 term at UCSD.
 Spring '09
 bill lin
 Aliasing

Click to edit the document details