Comm Tbx.manual

download Comm Tbx.manual

of 114

Transcript of Comm Tbx.manual

  • 8/11/2019 Comm Tbx.manual

    1/114

  • 8/11/2019 Comm Tbx.manual

    2/114

  • 8/11/2019 Comm Tbx.manual

    3/114

    CCopyright 1994 by Ryerson Polytechnic University

    O.M. Zeytinoglu & N.W. Ma

    COMMUNICATIONSYSTEMS II

    ELE 045

    Laboratory Manual

    Ryerson Polytechnic University Department of Electrical and Computer Engineering

  • 8/11/2019 Comm Tbx.manual

    4/114

    4

  • 8/11/2019 Comm Tbx.manual

    5/114

    E L E 0 4 5 C o n t e n t s i i i

    C O N T E N T S . . .

    P R E F A C E . . . . . . . . . . . . . . . . . . . . . . . . . v

    I N T R O D U C T I O N . . . . . . . . . . . . . . . . . . . . 1

    E v a l u a t i o n o f t h e L a b o r a t o r y W o r k . . . . . . . . . . . 3

    H o w t o U s e T h i s M a n u a l . . . . . . . . . . . . . . . . 5

    T y p o g r a p h i c a l C o n v e n t i o n s . . . . . . . . . . . . . . . 7

    E X P E R I M E N T S . . . . . . . . . . . . . . . . . . . . . 9

    R e m a r k s . . . . . . . . . . . . . . . . . . . . . . . 1 1

    E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y . . . . . . . . . . . . 1 3

    E x p e r i m e n t 2 : S t o c h a s t i c P r o c e s s e s . . . . . . . . . . . 2 7

    E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s . . . . . . . . . 3 9

    E x p e r i m e n t 4 : D e t e c t i o n . . . . . . . . . . . . . . . . 5 1

    E x p e r i m e n t 5 : Q u a n t i z a t i o n . . . . . . . . . . . . . . . 6 3

    E x p e r i m e n t 6 : D i g i t a l M o d u l a t i o n . . . . . . . . . . . . 7 7

    E x p e r i m e n t 7 : D i g i t a l C o m m u n i c a t i o n . . . . . . . . . . 8 9

    A P P E N D I C E S . . . . . . . . . . . . . . . . . . . . . . 9 9

    A p p e n d i x A : S i m u l a t i o n E n v i r o n m e n t . . . . . . . . . . 1 0 1

    A p p e n d i x B : C o m m u n i c a t i o n S y s t e m T o o l b o x . . . . . . . 1 0 3

  • 8/11/2019 Comm Tbx.manual

    6/114

  • 8/11/2019 Comm Tbx.manual

    7/114

    E L E 0 4 5 P r e f a c e v

    P R E F A C E . . .

    T h i s m a n u a l h a s b e e n w r i t t e n a s a l a b o r a t o r y r e f e r e n c e f o r t h e f o u r t h

    y e a r e l e c t r i c a l e n g i n e e r i n g c o u r s e t i t l e d E L E 0 4 5 C o m m u n i c a t i o n S y s t e m s

    I I . I n t h e l a b o r a t o r y , t h e s t u d e n t w i l l e n c o u n t e r s e v e n e x p e r i m e n t s w h i c h

    d e m o n s t r a t e p r i n c i p l e s o f c o m m u n i c a t i o n | w i t h s p e c i a l e m p h a s i s o n d i g i t a l

    c o m m u n i c a t i o n | s y s t e m s e x p l o r e d i n t h e l e c t u r e s .

    T h e s t u d y o f r a n d o m s i g n a l s a n d n o i s e i s e s s e n t i a l f o r e v a l u a t i n g p e r -

    f o r m a n c e o f c o m m u n i c a t i o n s y s t e m s . T h e r e f o r e , t h e r s t t w o e x p e r i m e n t s

    p r e s e n t t h e g r o u n d w o r k f o r t h e d e s c r i p t i o n o f r a n d o m s i g n a l s b y i l l u s t r a t i n g

    b a s i c c o n c e p t s f r o m p r o b a b i l i t y t h e o r y a n d s t o c h a s t i c p r o c e s s e s . O t h e r e x p e r -

    i m e n t s d e m o n s t r a t e b i n a r y s i g n a l l i n g f o r m a t s , t r a n s m i s s i o n c h a n n e l c h a r a c -

    t e r i s t i c s , d e t e c t i o n , q u a n t i z a t i o n , a n d d i g i t a l m o d u l a t i o n . I n t h e n a l e x p e r i -

    m e n t t h e s t u d e n t w i l l c o m b i n e a l l e l e m e n t s s t u d i e d i n e a r l i e r e x p e r i m e n t s t o

    d e s i g n a n d s i m u l a t e a c o m p l e t e d i g i t a l c o m m u n i c a t i o n s y s t e m .

    A l l e x p e r i m e n t s d e s c r i b e d i n t h i s m a n u a l a r e b a s e d o n c o m p u t e r s i m u -

    l a t i o n s . T h e y a r e p e r f o r m e d w i t h i n t h e M A T L A B e n v i r o n m e n t , w h i c h i s a n

    i n t e r a c t i v e , m a t r i x - b a s e d s y s t e m f o r s c i e n t i c a n d e n g i n e e r i n g c a l c u l a t i o n s .

    S i m u l a t i o n s c a n m o d e l t h e b e h a v i o u r o f r e a l s y s t e m s w i t h r e m a r k a b l e d e g r e e

    o f p r e c i s i o n . H o w e v e r , i f a n y c o n c l u s i o n s a r e t o b e d r a w n o n r e s u l t s f r o m

    s i m u l a t i o n s t u d i e s , a f e w w o r d s o f c a u t i o n a r e o n o r d e r . F i r s t , t h e s i m u l a -

    t i o n e n v i r o n m e n t m a y c o n s t r a i n w h i c h p h y s i c a l p h e n o m e n a c a n b e p o s s i b l y

    m o d e l l e d . S e c o n d , t h e s i m u l a t e d e n v i r o n m e n t | o r a n y o t h e r d e s i g n |

    i s b u i l t o n a s e t o f f u n d a m e n t a l a s s u m p t i o n s . T h u s , s i m u l a t i o n r e s u l t s a r e

    c o n s i d e r e d r e p r e s e n t a t i v e f o r t h e b e h a v i o u r f o r a r e a l s y s t e m , o n l y , i f t h e s e

    f u n d a m e n t a l a s s u m p t i o n s a r e n o t v i o l a t e d a n d i f t h e s i m u l a t i o n c a p a b i l i t y

    i s n o t e x c e e d e d . I t i s o f u t m o s t i m p o r t a n c e t o b e f a m i l i a r w i t h t h e i n h e r e n t

    l i m i t a t i o n s o f a s i m u l a t i o n e n v i r o n m e n t . A p p e n d i x A i n t r o d u c e s t h e s i m u -

    l a t i o n e n v i r o n m e n t u s e d i n t h e e x p e r i m e n t s a n d p r o v i d e s a n o v e r v i e w o f t h e

    u n d e r l y i n g a s s u m p t i o n s .

    T h e M A T L A B p r o g r a m p r o v i d e s t h e u s e r w i t h a r i c h s e t o f f u n c t i o n s

    t o m a n i p u l a t e a n d p r o c e s s d a t a . I n a d d i t i o n , t h e r e a r e s e v e r a l t o o l b o x e s c o n -

    s i s t i n g o f h i g h l e v e l f u n c t i o n s f o r s p e c i c a p p l i c a t i o n s , s u c h a s t h e C o n t r o l

    S y s t e m T o o l b o x . T h e e x p e r i m e n t s d e s c r i b e d i n t h i s m a n u a l u s e a n e x t e n s i v e

  • 8/11/2019 Comm Tbx.manual

    8/114

    v i P r e f a c e E L E 0 4 5

    s e t o f r o u t i n e s p e r f o r m i n g v a r i o u s t a s k s f r e q u e n t l y e n c o u n t e r e d i n c o m m u -

    n i c a t i o n s y s t e m s . W e c a l l t h i s c o l l e c t i o n o f r o u t i n e s t h e C o m m u n i c a t i o n

    S y s t e m T o o l b o x .

    I n d e s i g n i n g t h e C o m m u n i c a t i o n S y s t e m T o o l b o x , w e a d h e r e d t o t h e

    p r i n c i p l e s o f o r i g i n a l M A T L A B f u n c t i o n s . E a c h f u n c t i o n r e p r e s e n t s a s i m p l e

    a n d g e n e r a l p u r p o s e t o o l . C o m b i n i n g t h e s e a p p a r e n t l y s i m p l e f u n c t i o n s i n

    a t y p i c a l b l o c k d i a g r a m f a s h i o n , w e c a n s i m u l a t e t h e d y n a m i c b e h a v i o u r o f

    c o m p l e x c o m m u n i c a t i o n s y s t e m s w i t h e x t r e m e e a s e . T h e r e a r e o t h e r t o o l s

    b a s e d o n e x i s t i n g M A T L A B r o u t i n e s w i t h t h e i r b e h a v i o u r m o d i e d f o r t h e

    p r e s e n t s i m u l a t i o n e n v i r o n m e n t . Y e t , a n o t h e r s e t o f f u n c t i o n s a r e d e s i g n e d

    a s t o p - l e v e l b l o c k s . T h e y c o o r d i n a t e d a t a o w b e t w e e n s e v e r a l s u b t a s k s

    t o a c h i e v e t h e d e s i r e d i n p u t - t o - o u t p u t m a p p i n g r e p r e s e n t i n g a p a r t i c u l a r

    s y s t e m f u n c t i o n . A s t h e s t u d e n t g a i n s a n u n d e r s t a n d i n g o f h o w t h e i n d i v i d u a l

    s u b t a s k s a r e p e r f o r m e d , t h e u s e o f t o p - l e v e l f u n c t i o n s g r e a t l y s i m p l i f y t h e

    c o m m a n d s y n t a x . I n m o s t c a s e s , o n l y a s i n g l e c a l l h a s t o b e m a d e t o a

    t o p - l e v e l f u n c t i o n w h i c h w i l l r e p l a c e s e v e r a l l i n e s o f c o d e . S u c h a b u i l d i n g

    b l o c k a p p r o a c h b e c o m e s a u s e f u l t o o l i n a n a l y z i n g c o m p l e x s y s t e m s . F o r

    e x a m p l e t h e f u n c t i o n a 2 d r e p r e s e n t s t h e a n a l o g - t o - d i g i t a l c o n v e r s i o n p r o c e s s .

    I t c o n s i s t s o f l o w e r l e v e l r o u t i n e s t h a t p e r f o r m c o m p a n d i n g , q u a n t i z a t i o n a n d

    s o u r c e c o d i n g . F i n a l l y , t h e r e a r e s p e c i a l p u r p o s e f u n c t i o n s w h i c h s i m p l i f y

    s p e c i c t a s k s i n e x p e r i m e n t s , a s s u c h t h e i r i n t e n d e d u s e i s r e s t r i c t e d t o t h i s

    c o u r s e o n l y . A c o m p l e t e l i s t o f f u n c t i o n s i n t h e C o m m u n i c a t i o n S y s t e m

    T o o l b o x i s g i v e n i n A p p e n d i x B .

    I n d e s i g n i n g t h e s e e x p e r i m e n t s o u r i n t e n t i o n h a s b e e n t o p r o v i d e t h e

    s t u d e n t s w i t h e a s y - t o - u s e t o o l s t o s t u d y c o m p l e x c o n c e p t s . H o w e v e r , d u e t o

    l i m i t e d n u m b e r o f h o u r s t h a t c a n b e f o r m a l l y d e v o t e d t o l a b o r a t o r y s e s s i o n s ,

    n o t a l l f u n c t i o n s i n t h e C o m m u n i c a t i o n S y s t e m T o o l b o x a r e u s e d i n t h e e x -

    p e r i m e n t s . W e e n c o u r a g e t h e s t u d e n t t o u s e t h e s e f u n c t i o n s i n a l l a s p e c t s

    o f t h e c o u r s e . F e e l f r e e t o e x p e r i m e n t w i t h t h e s e t o o l s e x t e n d t h e f u n c t i o n -

    a l i t y , i m p r o v e t h e m o r w r i t e y o u r o w n f u n c t i o n s t o c r e a t e y o u r v e r y o w n

    t o o l b o x . S h a r e y o u r c r e a t i v e i d e a s w i t h o t h e r s . R e m e m b e r t h a t l e a r n i n g i s

    a n i n t e r a c t i v e p r o c e s s , a n d i t i s m o r e g r a t i f y i n g i f i t i s d o n e c o l l e c t i v e l y .

    T o r o n t o , O n t a r i o O . M . Z . a n d N . W . M .

    J u l y , 1 9 9 1

  • 8/11/2019 Comm Tbx.manual

    9/114

    I N

    T R O D U C T I O N

  • 8/11/2019 Comm Tbx.manual

    10/114

  • 8/11/2019 Comm Tbx.manual

    11/114

    E L E 0 4 5 I n t r o d u c t i o n 3

    E V A L U A T I O N O F L A B O R A T O R Y W O R K . . .

    L a b o r a t o r y M a n u a l

    A l l r e s u l t s a r e t o b e a c c u m u l a t e d i n t h i s l a b o r a t o r y m a n u a l . A t t h e

    e n d o f t h e c o u r s e y o u w i l l s u b m i t y o u r m a n u a l f o r g r a d i n g . F o r e a c h e x p e r -

    i m e n t , t a b l e s a n d g r a p h s a r e p r o v i d e d t o e n t e r a l l r e s u l t s a n d o b s e r v a t i o n s .

    A l l d a t a w i l l b e e n t e r e d i n a c l e a r f a s h i o n s i n c e o n e o f t h e c r i t e r i a f o r j u d g e -

    m e n t w i l l b e c l a r i t y , h e n c e u s e f u l n e s s o f t h e i n f o r m a t i o n c o n t a i n e d i n t h e

    m a n u a l . I f t h e p r e - a n d p o s t - l a b w o r k i s k e p t w i t h i n t h i s m a n u a l y o u w i l l

    a c c u m u l a t e a c o m p r e h e n s i v e s t u d y g u i d e w h i c h g r e a t l y e n h a n c e s u s e f u l n e s s

    o f t h e l a b o r a t o r y w o r k .

    Y o u m a y a l s o b e a s k e d t o w r i t e a f o r m a l r e p o r t o n o n e o f t h e e x p e r -

    i m e n t s . A f o r m a l r e p o r t w i l l b e e v a l u a t e d o n t h e b a s i s o f c l a r i t y , o n t h e

    c o m p l e t e n e s s o f t a b u l a t e d , g r a p h e d a n d / o r c a l c u l a t e d d a t a , a n d m o s t i m -

    p o r t a n t l y o n t h e c o n c l u s i o n s d r a w n f r o m t h e e x p e r i m e n t .

    P r e - L a b A s s i g n m e n t

    F o r e a c h e x p e r i m e n t , t h e r e w i l l b e a p r e - l a b a s s i g n m e n t c o n s i s t i n g o f

    p r o b l e m s l i s t e d u n d e r t h e p r e - l a b h e a d i n g . T h e p r e - l a b a s s i g n m e n t i s t o b e

    d o n e b y a l l s t u d e n t s i n d i v i d u a l l y a n d t o b e h a n d e d i n a s y o u c o m e i n t o t h e

    l a b o r a t o r y .

    P o s t - L a b A s s i g n m e n t

    A q u e s t i o n t h a t a p p e a r s i n a b o x i n d i c a t e s a p r o b l e m t h a t m u s t b e

    a n s w e r e d i n t h e p o s t - l a b a s s i g n m e n t f o r t h a t p a r t i c u l a r e x p e r i m e n t . T h e s e

    q u e s t i o n s m u s t b e a n s w e r e d i n w r i t i n g a n d s u b m i t t e d t o y o u r i n s t r u c t o r w h e n

    y o u c o m e i n t o t h e l a b o r a t o r y f o r t h e n e x t e x p e r i m e n t .

    P o s t - l a b q u e s t i o n s a r e p l a c e d a t t h e e n d o f r e l e v a n t s e c t i o n s i n t h e

    e x p e r i m e n t p r o c e d u r e . T h e r e f o r e , y o u w i l l h a v e a c h a n c e t o r e a d t h e q u e s t i o n

    t o e n s u r e t h a t y o u h a v e p e r f o r m e d a l l n e c e s s a r y s t e p s a n d t h a t y o u h a v e n o t

    m i s s e d t a k i n g s o m e i m p o r t a n t d a t a . I t i s a l s o r e c o m m e n d e d i f y o u d e v o t e a

    f e w m i n u t e s a t t h e e n d o f e a c h s e s s i o n t o o u t l i n e a n s w e r s t o t h e s e p r o b l e m s

  • 8/11/2019 Comm Tbx.manual

    12/114

    4 I n t r o d u c t i o n E L E 0 4 5

    i n t h e n o t e s p a g e s o f y o u r l a b o r a t o r y m a n u a l . T h i s w i l l a l l o w y o u t o c l a r i f y

    a m b i g u o u s p o i n t s b y c o n s u l t i n g y o u r i n s t r u c t o r .

    G e n e r a l

    U n l e s s j u s t i a b l e c a u s e f o r a b s e n c e i s s h o w n , y o u a r e e x p e c t e d t o b e

    p r e s e n t a n d o n t i m e a t e a c h l a b o r a t o r y s e s s i o n .

    N o l a t e p r e - o r p o s t - l a b a s s i g n m e n t s a r e t o b e a c c e p t e d . I f y o u h a v e

    d i c u l t y i n a n s w e r i n g a n y q u e s t i o n i t i s y o u r r e s p o n s i b i l i t y t o c o n s u l t y o u r

    i n s t r u c t o r b e f o r e t h e d u e d a t e o f y o u r a s s i g n m e n t .

  • 8/11/2019 Comm Tbx.manual

    13/114

    E L E 0 4 5 I n t r o d u c t i o n 5

    H O W T O U S E T H I S M A N U A L . . .

    T h i s m a n u a l i s c o m p o s e d o f t h e t h r e e p a r t s . T h e r s t p a r t i s t h e I n -

    t r o d u c t i o n d e t a i l i n g g u i d e l i n e s t o b e f o l l o w e d i n t h e l a b o r a t o r y . T h e s e c o n d

    p a r t i n c l u d e s p r o c e d u r e s o f a l l e x p e r i m e n t s , a s w e l l a s t h e p r e - a n d p o s t - l a b

    q u e s t i o n s . T h e n a l p a r t c o n t a i n s a p p e n d i c e s w i t h s u p p l e m e n t a r y m a t e -

    r i a l . A p p e n d i x A i s a r e c o m m e n d e d r e a d i n g f o r e v e r y s t u d e n t w h o w a n t s t o

    h a v e a b e t t e r u n d e r s t a n d i n g o f t h e s i m u l a t i o n e n v i r o n m e n t a s i t p r o v i d e s a n

    o v e r v i e w o f t h e u n d e r l y i n g a s s u m p t i o n s . A p p e n d i x B g i v e s a l i s t i n g a n d a

    b r i e f d e s c r i p t i o n o f t h e M A T L A B f u n c t i o n s i n t h e C o m m u n i c a t i o n S y s t e m

    T o o l b o x .

    T h e e x p e r i m e n t s d e s c r i b e d i n t h i s m a n u a l d o n o t r e q u i r e a n y p r e v i o u s

    k n o w l e d g e o f t h e M A T L A B p r o g r a m . A l l p r o c e d u r e s a r e s e l f c o n t a i n e d i n t h e

    s e n s e t h a t a n y s t u d e n t f o l l o w i n g t h e i n s t r u c t i o n s s h o u l d b e a b l e t o c o m p l e t e

    t h e e x p e r i m e n t w i t h e a s e . E x p e r i e n c e w i t h M A T L A B w i l l c o m e i n h a n d y

    i f t h e s t u d e n t w a n t s t o e x p e r i m e n t b e y o n d t h e p r o c e d u r e d e s c r i b e d i n t h i s

    m a n u a l . T h e o n - l i n e h e l p f a c i l i t y w i l l u s u a l l y s u c e i n a c l a s s r o o m s e t t i n g .

    T h e p r o c e d u r e o f e a c h e x p e r i m e n t i s p r e c e d e d b y a s e t o f q u e s t i o n s

    u n d e r t h e p r e - l a b h e a d i n g . T h e s e p r o b l e m s a r e d r a w n f r o m t h e c o u r s e m a -

    t e r i a l r e l e v a n t t o t h e p a r t i c u l a r e x p e r i m e n t . T h e i r i n t e n d e d p u r p o s e i s t o

    p r e p a r e t h e s t u d e n t f o r t h e c o n c e p t s t o b e s t u d i e d i n g r e a t e r d e t a i l d u r i n g

    t h e e x p e r i m e n t . I t i s t h e r e f o r e o f u t m o s t i m p o r t a n c e t h a t t h e s e p r o b l e m s a r e

    a n s w e r e d b e f o r e c o m i n g i n t o t h e l a b o r a t o r y .

  • 8/11/2019 Comm Tbx.manual

    14/114

    6 I n t r o d u c t i o n E L E 0 4 5

  • 8/11/2019 Comm Tbx.manual

    15/114

    E L E 0 4 5 I n t r o d u c t i o n 7

    T Y P O G R A P H I C C O N V E N T I O N S . . .

    T h i s m a n u a l u s e s a n u m b e r o f t y p o g r a p h i c c o n v e n t i o n s :

    I t a l i c f o n t i s u s e d t o i n d i c a t e M A T L A B f u n c t i o n s w h e n t h e y a r e r e -

    f e r r e d t o i n t h e t e x t . I t i s a l s o u s e d t o g i v e s p e c i a l e m p h a s i s . F o r

    e x a m p l e :

    U s i n g t h e M A T L A B f u n c t i o n s g a u s p d f a n d g a u s c d f d i s -

    p l a y t h e p d f a n d t h e c d f o f t h e r a n d o m v a r i a b l e .

    T h e s y m b o l i s i n d i c a t e s t h e M A T L A B p r o m p t t h a t y o u w i l l s e e o n

    y o u r t e r m i n a l a f t e r s t a r t i n g t h e M A T L A B p r o g r a m .

    T h i s f o n t i s u s e d w i t h i n t e x t t o s h o w c h a r a c t e r s o r w o r d s t h a t y o u

    t y p e . V a r i a b l e s o b t a i n e d f r o m i s s u i n g M A T L A B c o m m a n d s a r e r e p -

    r e s e n t e d i n t h i s f o n t . I t a l s o i n d i c a t e s m e s s a g e s o r p r o m p t s f r o m t h e

    s y s t e m t h a t a p p e a r o n y o u r s c r e e n . F o r e x a m p l e :

    C o m p u t e t h e m e a n a n d v a r i a n c e o f t h e r a n d o m s e q u e n c e

    m e a n a b c = m e a n ( a b c ) v a r a b c = v a r ( a b c )

    U s e m e a n a b c a n d v a r a b c t o c o m p u t e m e a n - s q u a r e p o w e r .

    A c a p i t a l i z e d w o r d w i t h i n t e x t i n d i c a t e s a k e y t h a t y o u p r e s s . F o r

    e x a m p l e :

    I f t h e s e c o n d a r g u m e n t t o t h e f u n c t i o n e y e d i a g i s n e g a t i v e ,

    h i t t h e R e t u r n k e y f o r t h e n e x t t r a c e t o b e d i s p l a y e d .

    A q u e s t i o n t h a t a p p e a r s i n a b o x i n d i c a t e s a p o s t - l a b a s s i g n m e n t . I t

    m u s t b e a n s w e r e d i n w r i t i n g a n d s u b m i t t e d w h e n y o u c o m e i n t o t h e

    l a b o r a t o r y f o r t h e n e x t e x p e r i m e n t . S e e a l s o t h e s e c t i o n o n l a b o r a t o r y

    w o r k e v a l u a t i o n . F o r e x a m p l e :

    Q 1 . 2 I f t h e s a m p l e p d f i s b a s e d o n 2 0 0 0 e x p e r i m e n t s , e s t i m a t e

    t h e n u m b e r o f o c c u r r e n c e f o r e a c h f a c e v a l u e .

  • 8/11/2019 Comm Tbx.manual

    16/114

    8 I n t r o d u c t i o n E L E 0 4 5

  • 8/11/2019 Comm Tbx.manual

    17/114

    E X P E R I M E N T S

  • 8/11/2019 Comm Tbx.manual

    18/114

  • 8/11/2019 Comm Tbx.manual

    19/114

    E L E 0 4 5 1 1

    I M P O R T A N T R E M A R K

    A n u m b e r o f g l o b a l M A T L A B v a r i a b l e s a r e e s s e n t i a l f o r t h e f u n c t i o n s i n t h e

    C o m m u n i c a t i o n S y s t e m T o o l b o x t o p e r f o r m a n d t o c o m m u n i c a t e p r o p e r l y .

    T h e M A T L A B f u n c t i o n s t a r t i n i t i a l i z e s t h e s e s v a r i a b l e s t o t h e i r d e f a u l t v a l -

    u e s f o r e a c h e x p e r i m e n t . W h e n e v e r y o u e n t e r t h e M A T L A B w o r k s p a c e , y o u r

    v e r y r s t c o m m a n d l i n e m u s t b e :

    s t a r t

    Y o u w i l l b e t h e n g r e e t e d b y a w e l c o m e s c r e e n a n d b y o t h e r i n f o r m a t i v e m e s -

    s a g e s . P l e a s e m a k e s u r e t h a t y o u i n i t i a l i z e e a c h M A T L A B s e s s i o n

    w i t h t h e s t a r t c o m m a n d .

  • 8/11/2019 Comm Tbx.manual

    20/114

    1 2 E L E 0 4 5

  • 8/11/2019 Comm Tbx.manual

    21/114

    E X P E R I M E N T 1

    P R O B A B I L I T Y T H E O R Y

    O B J E C T I V E S

    I n t h i s e x p e r i m e n t y o u w i l l s t u d y :

    p r o p e r t i e s o f d i s c r e t e a n d c o n t i n u o u s r a n d o m v a r i a b l e s

    u n i f o r m a n d G a u s s i a n r a n d o m v a r i a b l e s i n t e r m s o f t h e i r p r o b a b i l i t y

    d e n s i t y a n d c u m u l a t i v e d i s t r i b u t i o n f u n c t i o n s

    s t a t i s t i c a l m e a s u r e s o f m e a n , v a r i a n c e a n d m e a n - s q u a r e p o w e r .

    R E F E R E N C E S

    1 . A . B . C a r l s o n , \ C o m m u n i c a t i o n S y s t e m s , " t h i r d e d . , M c G r a w - H i l l

    I n c . , N e w Y o r k , 1 9 8 6 , p p . 1 1 8 { 1 4 7 .

    2 . L . W . C o u c h I I , \ D i g i t a l a n d A n a l o g C o m m u n i c a t i o n S y s t e m s , " t h i r d

    e d . , M a c M i l l a n P u b l i s h i n g C o . , N e w Y o r k , 1 9 9 0 , p p . 6 6 0 { 6 8 4 .

    3 . S . H a y k i n , \ A n I n t r o d u c t i o n t o A n a l o g & D i g i t a l C o m m u n i c a t i o n s , "

    J . W i l e y & S o n s I n c . , N e w Y o r k , 1 9 8 9 , p p . 4 0 4 { 4 3 0 .

    P R E - L A B A S S I G N M E N T

    1 . C o n s i d e r a 4 - f a c e d d i e , w i t h t h e f a c e v a l u e s n u m b e r e d 1 t h r o u g h 4 .

    a . D e t e r m i n e t h e s a m p l e s p a c e f o r t h e e x p e r i m e n t w h e r e t h e d i e

    i s r o l l e d o n c e .

    b . I n a n o t h e r e x p e r i m e n t t h e d i e i s r o l l e d 2 0 0 0 t i m e s a n d t h e f o l -

    l o w i n g o u t c o m e s w e r e o b s e r v e d :

    F a c e V a l u e 1 2 3 4

    N u m b e r o f O c c u r r e n c e s 1 1 2 7 8 4 8 6 5 2 3 9

    L e t X b e a r a n d o m v a r i a b l e r e p r e s e n t i n g t h e f a c e v a l u e t h a t i s

    o b s e r v e d a s t h e d i e i s r o l l e d . U s e t h e r e l a t i v e f r e q u e n c y d e n i t i o n

    o f p r o b a b i l i t y t o e s t i m a t e P ( X = k ) k = 1 : : : 4 :

  • 8/11/2019 Comm Tbx.manual

    22/114

    1 4 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y E L E 0 4 5

    c . B a s e d o n t h e p r o b a b i l i t i e s d e t e r m i n e d i n p a r t b , c o m p u t e a n d p l o t

    t h e p r o b a b i l i t y d e n s i t y f u n c t i o n a n d t h e c u m u l a t i v e d i s t r i b u t i o n

    f u n c t i o n o f X .

    d . D e t e r m i n e P ( 1 < X < 5 ) a n d P ( X 5 ) :

    e . D e t e r m i n e P ( X = k ) k = 1 : : : 4 i f t h e d i e w e r e a \ f a i r " d i e .

    2 . L e t U U ( a b ) b e a u n i f o r m l y d i s t r i b u t e d r a n d o m v a r i a b l e d e n e d

    o v e r t h e i n t e r v a l a b ] w i t h a < b :

    a . D e t e r m i n e a n d p l o t t h e p r o b a b i l i t y d e n s i t y f u n c t i o n o f U :

    b . D e t e r m i n e a n d p l o t t h e c u m u l a t i v e d i s t r i b u t i o n f u n c t i o n o f U :

    c . D e t e r m i n e E U ] E U

    2

    ] a n d

    2

    U

    a s a f u n c t i o n o f a a n d b .

    d . F o r a = 2 a n d b = 6 , e v a l u a t e P ( ; 2 < U < 4 ) a n d P ( U = 5 ) :

    3 . C o n s i d e r a n o r m a l r a n d o m v a r i a b l e X N (

    2

    ) f o r s o m e a n d .

    L e t ( z ) b e t h e c u m u l a t i v e d i s t r i b u t i o n f u n c t i o n o f t h e s t a n d a r d n o r -

    m a l r a n d o m v a r i a b l e Z N ( 0 1 ) , w h o s e t a b u l a t e d v a l u e s a r e a v a i l -

    a b l e .

    a . E x p r e s s P ( a < X < b ) a n d P ( X > b ) i n t e r m s o f a b a n d :

    b . F o r = 4

    2

    = 4 = 3 d e t e r m i n e P ( 3 X 5 ) a n d P ( X 5 ) :

  • 8/11/2019 Comm Tbx.manual

    23/114

    E L E 0 4 5 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y 1 5

    P R O C E D U R E

    A . D i s c r e t e R a n d o m V a r i a b l e s

    A . 1 U s i n g t h e f u n c t i o n d i c e , g e n e r a t e r a n d o m s a m p l e s r e p r e s e n t i n g t h e o u t -

    c o m e o f t h e e x p e r i m e n t w h e r e a 4 - f a c e d , f a i r d i e i s r o l l e d 2 , 0 0 0 t i m e s :

    x = d i c e ( 2 0 0 0 , 4 , ' f a i r ' )

    A . 2 C o m p u t e a n d d i s p l a y t h e s a m p l e p r o b a b i l i t y d e n s i t y f u n c t i o n ( p d f ) a n d

    c u m u l a t i v e d i s t r i b u t i o n f u n c t i o n ( c d f ) o f t h e s e q u e n c e x :

    s u b p l o t ( 1 2 1 ) , p d f ( x )

    s u b p l o t ( 1 2 2 ) , c d f ( x )

    S a m p l e e v e n t s r e p r e s e n t i n g t h e o u t c o m e o f a n e x p e r i m e n t w h e r e t h i s

    d i e i s r o l l e d o n c e , a r e o f t h e f o r m f F a c e v a l u e = k k = 1 : : : 4 g . O b -

    s e r v e t h e r e l a t i o n b e t w e e n t h e p d f a n d t h e c d f t h a t c o n v e y i n f o r m a t i o n

    a b o u t t h e s a m p l e e v e n t p r o b a b i l i t i e s i n d i e r e n t w a y s .

    Q 1 . 1 W h y a r e p r o b a b i l i t i e s o f t h e s a m p l e e v e n t s i n t h i s e x p e r -

    i m e n t n o t e q u a l ? I s t h i s r e s u l t e x p e c t e d ? W h a t s h o u l d b e

    d o n e i n s t e p A . 1 , t o i m p r o v e t h i s o u t c o m e ?

    A . 3 U s i n g t h e f u n c t i o n d i c e g e n e r a t e a s e q u e n c e r e p r e s e n t i n g t h e o u t c o m e

    o f a n e x p e r i m e n t w h e r e a 4 - f a c e d , b i a s e d d i e i s r o l l e d 2 , 0 0 0 t i m e s :

    y = d i c e ( 2 0 0 0 , 4 , ' b i a s e d ' )

    A . 4 C l e a r t h e g r a p h i c s s c r e e n a n d d i s p l a y t h e s a m p l e p d f o f t h e r a n d o m

    s e q u e n c e y :

    c l f

    p d f ( y )

    P l o t t h e s a m p l e p d f i n t h e s p a c e p r o v i d e d f o r G r a p h 1 . 1 . C o m p u t e t h e

    s a m p l e c d f a n d s h o w y o u r r e s u l t i n G r a p h 1 . 2 . I n d i c a t e w h i c h p o i n t s

    b e l o n g t o t h e c d f a t t h e j u m p p o i n t s . Y o u c a n v e r i f y y o u r a n s w e r u s i n g

    t h e M A T L A B f u n c t i o n c d f .

  • 8/11/2019 Comm Tbx.manual

    24/114

    1 6 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y E L E 0 4 5

    0 2 4 60

    0.2

    0.4

    0.6

    0.8

    0 2 4 60

    0.2

    0.4

    0.6

    0.8

    1

    Graph 1.1 Graph 1.2

    Q 1 . 2 G i v e n t h a t t h e s a m p l e p d f i s b a s e d o n 2 , 0 0 0 e x p e r i m e n t s ,

    e s t i m a t e t h e n u m b e r o f o c c u r r e n c e f o r e a c h f a c e v a l u e .

    B . C o n t i n u o u s R a n d o m V a r i a b l e s

    U n i f o r m R a n d o m V a r i a b l e

    B . 1 U s i n g t h e f u n c t i o n s u n i f p d f a n d u n i f c d f d i s p l a y t h e p d f a n d c d f o f

    t h e u n i f o r m r a n d o m v a r i a b l e U ( 2 6 ) . S k e t c h t h e p d f a n d t h e c d f :

    s u b p l o t ( 1 2 1 ) , u n i f p d f ( 2 , 6 ) , a x i s ( 0 , 8 , - 0 . 2 , 1 . 2 ] )

    s u b p l o t ( 1 2 2 ) , u n i f c d f ( 2 , 6 ) , a x i s ( 0 , 8 , - 0 . 2 , 1 . 2 ] )

    0 2 4 6 80

    0.1

    0.2

    0.3

    0.4

    0.5

    0 2 4 6 80

    0.2

    0.4

    0.6

    0.8

    1

    Graph 1.3 Graph 1.4

  • 8/11/2019 Comm Tbx.manual

    25/114

    E L E 0 4 5 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y 1 7

    B . 2 I f U U ( 2 6 ) d e t e r m i n e t h e f o l l o w i n g p r o b a b i l i t i e s u s i n g e i t h e r t h e

    p d f o r t h e c d f .

    P ( 0 < U 3 ) P ( 3 < U 5 ) P ( U = 3 )

    T a b l e 1 . 1

    Q 1 . 3 W h y i s P ( U = 3 ) d i e r e n t t h a n P ( X = 3 ) i n s t e p A . 4 ?

    B . 3 L e t ' s p l a y s t a t i s t i c s . G e n e r a t e 5 0 0 s a m p l e s f r o m a U ( 2 6 ) d i s t r i b u t i o n :

    u = u n i f o r m ( 2 , 6 , 5 0 0 )

    C o m p u t e t h e m e a n a n d t h e v a r i a n c e o f t h e r a n d o m s e q u e n c e u :

    m e a n u = m e a n ( u ) , v a r u = v a r ( u )

    C o m p a r e t h e s e r e s u l t s w i t h a n s w e r s f r o m p r e - l a b Q u e s t i o n 2 . C o m -

    m e n t o n a n y d i e r e n c e . C a n y o u p r e d i c t t h e a l g o r i t h m s i n M A T L A B

    f u n c t i o n s m e a n a n d v a r ? D i s p l a y t h e i r c o n t e n t s b y u s i n g t h e M A T L A B

    c o m m a n d t y p e . U s e m e a n u a n d v a r u t o d e t e r m i n e E U

    2

    ] . C h e c k y o u r

    r e s u l t w i t h t h e M A T L A B f u n c t i o n m e a n s q .

    G a u s s i a n ( n o r m a l ) R a n d o m V a r i a b l e

    B . 4 U s i n g t h e M A T L A B f u n c t i o n s g a u s p d f a n d g a u s c d f d i s p l a y t h e p d f

    a n d t h e c d f o f t h e r a n d o m v a r i a b l e G N (

    2

    ) w i t h = m e a n u

    a n d

    2

    = v a r u f r o m s t e p B . 3 . S k e t c h t h e p d f a n d t h e c d f .

    c l g , s u b p l o t ( 1 2 1 ) , g a u s p d f ( m e a n u , v a r u )

    s u b p l o t ( 1 2 2 ) , g a u s c d f ( m e a n u , v a r u )

  • 8/11/2019 Comm Tbx.manual

    26/114

    1 8 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y E L E 0 4 5

    0 2 4 6 80

    0.1

    0.2

    0.3

    0.4

    0.5

    0 2 4 6 80

    0.2

    0.4

    0.6

    0.8

    1

    Graph 1.5 Graph 1.6

    I n d i c a t e t h e h o r i z o n t a l a x i s v a l u e s w h e r e t h e p d f i s a t i t s m a x i m u m

    a n d t h e c d f e q u a l s t o 0 . 5 . C o m p a r e t h e s e v a l u e s w i t h t h e m e a n v a l u e

    o f t h e G a u s s i a n d i s t r i b u t i o n .

    B . 5 D e t e r m i n e t h e f o l l o w i n g p r o b a b i l i t i e s :

    P ( 0 < G 3 ) P ( 3 < G 5 ) P ( G 5 )

    T a b l e 1 . 2

    C o m p a r e t h e s e r e s u l t s w i t h t h o s e i n T a b l e 1 . 1 . T h e G a u s s i a n d i s t r i b u -

    t i o n u s e d t o g e n e r a t e t h e s e r e s u l t s a n d t h e u n i f o r m d i s t r i b u t i o n i n s t e p

    B . 2 h a v e t h e s a m e m e a n a n d v a r i a n c e y e t , t h e r e s u l t s a r e d i e r e n t .

    C a n y o u e x p l a i n ?

    B . 6 L e t X N (

    2

    ) : A s s u m e t h e m e a n v a l u e o f X i s x e d a t = 1 a n d

    2

    2 f 0 : 5 1 2 5 1 0 g . T o o b s e r v e e e c t s o f c h a n g i n g t h e v a l u e o f

    2

    o n

    t h e d i s t r i b u t i o n o f a G a u s s i a n r a n d o m v a r i a b l e , p e r f o r m t h e f o l l o w i n g

    s t e p s :

    c l f

    m = 1 g a u s p d f ( m , 0 . 5 )

    a x i s ( - 1 0 1 0 0 0 . 6 ] ) , h o l d o n

    g a u s p d f ( m , 1 )

    .

    .

    .

    g a u s p d f ( m , 1 0 )

  • 8/11/2019 Comm Tbx.manual

    27/114

    E L E 0 4 5 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y 1 9

    Q 1 . 4 C o n s i d e r t h e e v e n t A = f 0 < X < 2 g w h e r e X N ( 1

    2

    )

    w i t h

    2

    2 f 0 : 5 1 2 5 1 0 g : D e t e r m i n e t h e v a l u e o f

    2

    f o r

    w h i c h P ( A ) i s a m a x i m u m .

    N o w c o n s i d e r c h a n g e s o n t h e c d f :

    c l f

    m = 1 g a u s c d f ( m , 1 0 )

    a x i s ( - 1 0 1 0 0 1 ] ) , h o l d o n

    g a u s c d f ( m , 5 )

    .

    .

    .

    g a u s c d f ( m , 0 . 5 )

    C a n y o u p r e d i c t t h e c d f a s

    2

    b e c o m e s s m a l l e r ? T r y :

    g a u s c d f ( m , 0 . 0 0 0 0 1 )

    W h a t d o e s i t m e a n t o h a v e a p r o b a b i l i t y d i s t r i b u t i o n w i t h v e r y s m a l l

    v a r i a n c e ? T h e c o r r e s p o n d i n g p d f m a y h e l p t o i l l u s t r a t e t h i s p o i n t :

    c l f

    g a u s p d f ( m , 0 . 0 0 0 0 1 )

    a x i s ( 0 2 0 2 0 0 ] )

    W h e r e i n t h i s e x p e r i m e n t d i d y o u o b s e r v e a s i m i l a r p d f ? I f i n t h e l a s t

    s t e p y o u h a d a u n i f o r m l y d i s t r i b u t e d r a n d o m v a r i a b l e w i t h m e a n

    a n d v a r i a n c e 0 . 0 0 0 0 1 , i n s t e a d o f a G a u s s i a n r a n d o m v a r i a b l e , w o u l d

    t h e r e s u l t i n g p d f b e d i e r e n t ?

    B . 7 N o w x t h e v a r i a n c e o f t h e G a u s s i a n d i s t r i b u t i o n a t

    2

    a n d c h a n g e t h e

    m e a n v a l u e s u c h t h a t 2 f ; 4 ; 1 2 5 g .

    c l f

    s = 1 g a u s p d f ( - 4 , s )

    a x i s ( - 8 8 0 0 . 5 ] ) , h o l d o n

    g a u s p d f ( - 1 , s )

    .

    .

    .

    g a u s p d f ( 5 , s )

    W h a t i s t h e e e c t o f c h a n g i n g t h e m e a n v a l u e ? L e t X (

    2

    ) r e p -

    r e s e n t a r a n d o m v a r i a b l e s u c h t h a t X (

    2

    ) N (

    2

    ) : C o m p a r e

    P ( ; 5 < X ( ; 4 1 ) < ; 3 ) a n d P ( 4 < X ( 5 1 ) < 6 ) : Y o u m a y w i s h t o

  • 8/11/2019 Comm Tbx.manual

    28/114

    2 0 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y E L E 0 4 5

    m a k e s o m e o b s e r v a t i o n s o n t h e e e c t s o f c h a n g i n g o n t h e c d f . F i r s t

    c l e a r t h e g r a p h i c s s c r e e n a n d t h e n f o r t h e a b o v e s e t o f a n d

    2

    t r y

    t h e a x i s - s e t t i n g ; 8 8 0 1 ] .

    C . M e a n , V a r i a n c e a n d P o w e r

    C . 1 G e n e r a t e t h e f o l l o w i n g r a n d o m s e q u e n c e s w i t h d i e r e n t m e a n v a l u e s :

    x = g a u s s ( - 5 , 1 , 1 0 0 )

    y = g a u s s ( 0 , 1 , 1 0 0 )

    z = g a u s s ( 5 , 1 , 1 0 0 )

    c l f

    p l o t ( x )

    a x i s ( 1 1 0 0 - 1 0 1 0 ] ) , g r i d o n , h o l d o n

    p l o t ( y )

    p l o t ( z )

    U s i n g e n g i n e e r i n g t e r m i n o l o g y , y o u c a n s a y t h a t m e a n v a l u e c h a n g e s

    t h e d c l e v e l o f t h e w a v e f o r m

    1

    .

    C . 2 G e n e r a t e r a n d o m s e q u e n c e s f r o m G a u s s i a n d i s t r i b u t i o n s w i t h d i e r e n t

    v a r i a n c e v a l u e s :

    a = g a u s s ( 0 , 4 , 1 0 0 )

    b = g a u s s ( 0 , 1 , 1 0 0 )

    c = g a u s s ( 0 , 0 . 5 , 1 0 0 )

    d = g a u s s ( 0 , 0 . 0 1 , 1 0 0 )

    c l f

    s u b p l o t ( 2 2 1 ) , p l o t ( a ) , a x i s ( 1 1 0 0 - 1 0 1 0 ] )

    s u b p l o t ( 2 2 2 ) , p l o t ( b ) , a x i s ( 1 1 0 0 - 1 0 1 0 ] )

    s u b p l o t ( 2 2 3 ) , p l o t ( c ) , a x i s ( 1 1 0 0 - 1 0 1 0 ] )

    s u b p l o t ( 2 2 4 ) , p l o t ( d ) , a x i s ( 1 1 0 0 - 1 0 1 0 ] )

    U s i n g M A T L A B f u n c t i o n s m e a n a n d v a r d e t e r m i n e t h e m e a n a n d v a r i -

    a n c e o f e a c h s e q u e n c e a n d e n t e r y o u r a n s w e r s i n T a b l e 1 . 3 .

    1

    D i s p l a y e d w a v e f o r m s x , y , z a r e n o t i d e n t i c a l a s e a c h c a l l t o t h e M A T L A B f u n c -

    t i o n g a u s s g e n e r a t e s a n e w r a n d o m s e q u e n c e . I f y o u w a n t t o u s e t h e s a m e r a n -

    d o m s e q u e n c e e a c h t i m e y o u m a k e a c a l l t o t h e f u n c t i o n g a u s s , u s e i t i n t h e f o r m

    g a u s s ( m e a n v a l u e , v a r i a n c e , n , s e e d ) a n d p r o v i d e t h e s a m e s e e d v a l u e .

  • 8/11/2019 Comm Tbx.manual

    29/114

    E L E 0 4 5 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y 2 1

    S e q u e n c e M e a n V a r i a n c e M e a n S q .

    a

    b

    c

    d

    T a b l e 1 . 3

    D e t e r m i n e t h e m e a n - s q u a r e p o w e r o f e a c h w a v e f o r m u s i n g t h e r e s p e c -

    t i v e m e a n a n d v a r i a n c e v a l u e s . C h e c k y o u r r e s u l t s u s i n g t h e M A T L A B

    f u n c t i o n m e a n s q .

    Q 1 . 5 I f t h e w a v e f o r m s d i s p l a y e d i n t h i s p a r t w e r e t o r e p r e s e n t

    a n o i s e s i g n a l , w h i c h o n e w o u l d y o u p r e f e r t o e n c o u n t e r

    i n y o u r c o m m u n i c a t i o n s s y s t e m ? I f t h e y w e r e r e p r e s e n t i n g

    n o i s e - f r e e s i g n a l w a v e f o r m s , w h i c h o n e w o u l d y o u p r e f e r ?

    D . D a r t G a m e

    D . 1 T o i l l u s t r a t e t h e s i g n i c a n c e o f m e a n a n d v a r i a n c e , u s e t h e M A T L A B

    f u n c t i o n d a r t , w h i c h s i m u l a t e s a n e x p e r i m e n t w h e r e a d a r t i s t h r o w n

    a t a t a r g e t a t t h e o r i g i n o f t h e p o l a r p l a n e . T h e u s e r c a n s p e c i f y t h e

    m e a n a n d v a r i a n c e o f x a n d y c o o r d i n a t e s w h i c h i n t u r n d e t e r m i n e t h e

    p o i n t o f i m p a c t o n t h e d a r t b o a r d . A g o o d p o i n t t o s t a r t e x p e r i m e n t i n g

    i s :

    m e a n x = 0 . 2 m e a n y = 0 . 2

    v a r x = 0 . 1 v a r y = 0 . 1

    n o d a r t = 2 0

    c l f

    d a r t ( m e a n x m e a n y ] , v a r x v a r y ] , n o d a r t )

    I f y o u w a n t t o h a v e m o r e i n f o r m a t i o n a b o u t t h i s s i m u l a t i o n u s e t h e o n -

    l i n e h e l p f a c i l i t y b y t y p i n g h e l p d a r t . F e e l f r e e t o e x p e r i m e n t w i t h

    v a r i o u s m e a n a n d v a r i a n c e v a l u e s . I n p a r t i c u l a r , i t i s i n t e r e s t i n g t o l o o k

    a t s i m u l a t i o n r e s u l t s a s o n e o r b o t h v a r i a n c e s a r e s e t t o z e r o . T r y t o

    c o r r e l a t e y o u r o b s e r v a t i o n s w i t h o t h e r p a r t s o f t h i s e x p e r i m e n t .

  • 8/11/2019 Comm Tbx.manual

    30/114

  • 8/11/2019 Comm Tbx.manual

    31/114

    E L E 0 4 5 E x p e r i m e n t 1 : P r o b a b i l i t y T h e o r y 2 3

    T h e s a m e a l g o r i t h m c a n b e u s e d t o i n t e g r a t e a n a r b i t r a r y f u n c t i o n f ( x )

    o v e r t h e i n t e r v a l a b ] . T h e e n d p o i n t s ( a f ( a ) ) a n d ( b f ( b ) ) d e t e r -

    m i n e t h e p a r a m e t e r s o f t h e u n i f o r m d i s t r i b u t i o n s f r o m w h i c h t h e X

    a n d Y s e q u e n c e s a r e g e n e r a t e d . T h u s , t h e a l g o r i t h m d e s c r i b e s a s i m -

    p l e m e t h o d o f e v a l u a t i n g t h e i n t e g r a l o f a f u n c t i o n . U s e t h e M A T L A B

    f u n c t i o n i n t e g r a l i n t h e f o r m :

    i n t e g r a l ( ' f ( x ) ' , x m i n , x m a x ] , N )

    t o e v a l u a t e t h e i n t e g r a l o f s o m e s a m p l e f u n c t i o n s . T h e a b o v e c o m m a n d

    d i s p l a y s a m e n u o f f u n c t i o n s f r o m w h i c h y o u c a n m a k e a s e l e c t i o n . O n e

    o f t h e s e l e c t i o n s i n t h e m e n u i s t h e p d f o f t h e s t a n d a r d n o r m a l r a n d o m

    v a r i a b l e . Y o u s h o u l d r e c a l l t h a t t h e r e i s n o c l o s e d f o r m s o l u t i o n f o r t h e

    i n t e g r a l o f t h i s p d f o v e r a n a r b i t r a r y i n t e r v a l | o t h e r w i s e , y o u w o u l d

    n o t h a v e t o r e s o r t t o a t a b l e o f v a l u e s .

    E . 1 I n t e g r a t e t h e p d f o f t h e s t a n d a r d n o r m a l r a n d o m v a r i a b l e n u m e r i c a l l y

    o v e r t h e i n t e r v a l ; 4 4 ] :

    i n t e g r a l ( ' f ( x ) ' , - 4 , 4 ] , 2 0 0 0 0 )

    W h e n t h e m e n u i s d i s p l a y e d , s e l e c t t h e f u n c t i o n r e p r e s e n t i n g f

    X

    ( x ) t h e

    p d f o f t h e s t a n d a r d r a n d o m v a r i a b l e . W h a t d o e s t h i s a n s w e r c o n r m

    a b o u t p d f ' s ? I f y o u w e r e t o i n t e g r a t e f

    X

    ( x ) o v e r ( ; 1 1 ) w h a t s h o u l d

    b e t h e a n s w e r ?

    E . 2 I n t e g r a t e f

    X

    ( x ) o v e r t h e i n t e r v a l 0 1 ] a n d c o n r m t h e a n s w e r u s i n g a

    - f u n c t i o n t a b l e

    1

    .

    E . 3 Y o u c a n a l s o i n t e g r a t e \ a n y " f u n c t i o n o f y o u r c h o i c e . f o r e x a m p l e t o

    i n t e g r a t e c o s h ( x ) o v e r t h e i n t e r v a l ; ] e n t e r :

    i n t e g r a l ( ' c o s h ( x ) ' , - p i , p i ] , 2 0 0 0 0 )

    W h i l e t h i s m e t h o d m a y n o t b e v e r y a c c u r a t e w i t h o n l y 2 0 , 0 0 0 p o i n t s , i t

    i s r o b u s t . T h e a l g o r i t h m c a n a l s o b e e a s i l y e x t e n d e d t o c o m p u t e t h e n -

    d i m e n s i o n a l v o l u m e o f a c l o s e d s u r f a c e o f t h e f o r m f ( x

    1

    : : : x

    n

    ) = K .

    1

    E a c h t i m e y o u u s e t h e f u n c t i o n i n t e g r a l , y o u w i l l r e c e i v e a s l i g h t l y d i e r e n t a n s w e r

    a s t h e f u n c t i o n u s e s a n e w s e t o f N r a n d o m p o i n t s . F o r i m p r o v e d a c c u r a c y a v e r a g e

    t h e s e r e s u l t s .

  • 8/11/2019 Comm Tbx.manual

    32/114

    2 4 E x p e r i m e n t 1 : N o t e s E L E 0 4 5

  • 8/11/2019 Comm Tbx.manual

    33/114

    E L E 0 4 5 E x p e r i m e n t 1 : N o t e s 2 5

  • 8/11/2019 Comm Tbx.manual

    34/114

    2 6 E x p e r i m e n t 1 : N o t e s E L E 0 4 5

  • 8/11/2019 Comm Tbx.manual

    35/114

    E X P E R I M E N T 2

    R A N D O M P R O C E S S E S

    O B J E C T I V E S

    I n t h i s e x p e r i m e n t y o u w i l l w o r k w i t h s a m p l e f u n c t i o n s t h a t w i l l h i g h l i g h t

    b a s i c c o n c e p t s f r o m t h e t h e o r y o f r a n d o m p r o c e s s e s . I n p a r t i c u l a r y o u w i l l :

    s t u d y w i d e - s e n s e s t a t i o n a r i t y a n d e r g o d i c i t y

    e x a m i n e c o r r e l a t i o n a s a m e a s u r e o f r e l a t i o n b e t w e e n r a n d o m p r o c e s s e s

    i n v e s t i g a t e t h e r e l a t i o n s h i p b e t w e e n a r a n d o m p r o c e s s , i t s a u t o c o r r e l a -

    t i o n f u n c t i o n a n d t h e p o w e r s p e c t r a l d e n s i t y f u n c t i o n .

    R E F E R E N C E S

    1 . A . B . C a r l s o n , \ C o m m u n i c a t i o n S y s t e m s , " t h i r d e d . , M c G r a w - H i l l

    I n c . , N e w Y o r k , 1 9 8 6 , p p . 1 5 2 - 1 8 0 .

    2 . L . W . C o u c h I I , \ D i g i t a l a n d A n a l o g C o m m u n i c a t i o n S y s t e m s , " t h i r d

    e d . , M a c M i l l a n P u b l i s h i n g C o . , N e w Y o r k , 1 9 9 0 , p p . 4 4 7 - 4 7 7 .

    3 . S . H a y k i n , \ A n I n t r o d u c t i o n t o A n a l o g & D i g i t a l C o m m u n i c a t i o n s , "

    J . W i l e y & S o n s I n c . , N e w Y o r k , 1 9 8 9 , p p . 4 3 4 - 4 6 4 .

    P R E - L A B A S S I G N M E N T

    1 . L e t t h e r a n d o m p r o c e s s X ( t ) = c o s ( 2 1 0 0 0 t + ) b e d e n e d i n t e r m s

    o f t h e d i s c r e t e - v a l u e d r a n d o m v a r i a b l e s u c h t h a t

    1

    = 0 ,

    2

    = = 2 ,

    3

    = a n d

    4

    = 3 = 2 w i t h e q u a l p r o b a b i l i t y .

    a . D e t e r m i n e t h e m e a n v a l u e E X ( t ) ] , t h e m e a n - s q u a r e v a l u e

    E X

    2

    ( t ) ] , a n d t h e a u t o c o r r e l a t i o n f u n c t i o n R

    X

    ( t + ) .

    b . D e t e r m i n e t h e t i m e a v e r a g e v a l u e s h X ( t ) i a n d h X

    2

    ( t ) i .

    c . I s X ( t ) w i d e - s e n s e s t a t i o n a r y ? I s i t e r g o d i c ?

    2 . D e t e r m i n e a n d s k e t c h t h e p o w e r s p e c t r a l d e n s i t y o f t h e r a n d o m p r o c e s s

    Y ( t ) , i f t h e a u t o c o r r e l a t i o n f u n c t i o n R

    Y

    ( t ) i s g i v e n a s :

    a . R

    Y

    ( ) = ( )

    b . R

    Y

    ( ) = ( )

  • 8/11/2019 Comm Tbx.manual

    36/114

    2 8 E x p e r i m e n t 2 : R a n d o m P r o c e s s e s E L E 0 4 5

    c . R

    Y

    ( ) = ( = T ) w h e r e T = 1 0 m s e c

    d . R

    Y

    ( ) = 1 .

    3 . D e t e r m i n e t h e m e a n a n d t h e m e a n - s q u a r e v a l u e o f t h e r a n d o m p r o c e s s

    Z ( t ) , i f :

    a . t h e a u t o c o r r e l a t i o n f u n c t i o n R

    Z

    ( ) i s g i v e n a s :

    R ( )Z

    3.0

    1.0

    0

    b . t h e p o w e r s p e c t r a l d e n s i t y f u n c t i o n S

    Z

    ( f ) i s g i v e n a s :

    ZS ( f )

    5-5 0f [kHz]

    0.3 mV/Hz

    4 . D e t e r m i n e t h e o u t p u t o f a l t e r w i t h f r e q u e n c y r e s p o n s e

    H ( f ) =

    f

    0

    f

    0

    + j 2 f

    i f t h e i n p u t i s a w h i t e n o i s e p r o c e s s w i t h p o w e r s p e c t r a l d e n s i t y f u n c t i o n

    S

    n

    ( f ) = N

    0

    = 2 . H o w i s t h e p o w e r s p e c t r a l d e n s i t y f u n c t i o n o f t h e o u t p u t

    r e l a t e d t o t h e l t e r f r e q u e n c y r e s p o n s e H ( f ) ?

  • 8/11/2019 Comm Tbx.manual

    37/114

    E L E 0 4 5 E x p e r i m e n t 2 : R a n d o m P r o c e s s e s 2 9

    P R O C E D U R E

    A . W i d e - S e n s e S t a t i o n a r i t y a n d E r g o d i c i t y

    A . 1 G e n e r a t e a l l 4 r e a l i z a t i o n s | s a m p l e f u n c t i o n s | o f t h e r a n d o m p r o c e s s

    X ( t ) d e s c r i b e d i n Q u e s t i o n 1 o f t h e p r e - l a b a s s i g n m e n t . D i s p l a y t h e

    r s t 4 0 0 s a m p l e s o f e a c h r e a l i z a t i o n :

    x = r e a l i z e ( 0 p i / 2 p i 3 * p i / 2 ] )

    s u b p l o t ( 2 2 1 ) , w a v e p l o t ( x ( 1 , 1 : 4 0 0 ) )

    s u b p l o t ( 2 2 2 ) , w a v e p l o t ( x ( 2 , 1 : 4 0 0 ) )

    s u b p l o t ( 2 2 3 ) , w a v e p l o t ( x ( 3 , 1 : 4 0 0 ) )

    s u b p l o t ( 2 2 4 ) , w a v e p l o t ( x ( 4 , 1 : 4 0 0 ) )

    A . 2 R e c o r d t h e v a l u e o f e a c h s a m p l e f u n c t i o n o f X ( t ) f o r t = 0 , 0 . 5 , 1 . 2 5 ,

    2 . 2 , 3 . 4 m s e c . F o r e a c h t , e v a l u a t e t h e e n s e m b l e m e a n a n d t h e e n s e m b l e

    m e a n - s q u a r e v a l u e .

    t m s e c ]

    0 . 0 0 . 5 1 . 2 5 2 . 2 3 . 4

    X (

    1

    t )

    X (

    2

    t )

    X (

    3

    t )

    X (

    4

    t )

    E X ( t ) ]

    E X

    2

    ( t ) ]

    T a b l e 2 . 1

    A . 3 U s i n g t h e M A T L A B f u n c t i o n e c o r r d e t e r m i n e t h e a u t o c o r r e l a t i o n f u n c -

    t i o n R

    X

    ( t

    1

    t

    2

    ) , f o r t h e v a l u e s o f t

    1

    a n d t

    2

    s h o w n i n T a b l e 2 . 2 .

    e c o r r ( x , t 1 , t 2 )

  • 8/11/2019 Comm Tbx.manual

    38/114

    3 0 E x p e r i m e n t 2 : R a n d o m P r o c e s s e s E L E 0 4 5

    O b s e r v e t h a t t

    1

    a n d t

    2

    a r e i n m i l l i s e c o n d s .

    t

    2

    0 . 0 0 . 7 1 . 9 2 . 6

    t

    1

    0 . 0

    0 . 7

    1 . 9

    2 . 6

    T a b l e 2 . 2

    Q 2 . 1 E x p l a i n t h e s y m m e t r y i n T a b l e 2 . 2 . W h y a r e R

    X

    ( 1 : 9 2 : 6 )

    a n d R

    X

    ( 0 : 7 0 ) e q u a l ? H o w c a n y o u e v a l u a t e R

    X

    ( t

    1

    t

    2

    ) f r o m

    t h e p l o t s o b s e r v e d i n p a r t A . 1 ?

    A . 4 D e t e r m i n e t h e t i m e a v e r a g e v a l u e s h X ( t ) i a n d h X

    2

    ( t ) i f o r e a c h

    v a l u e o f . R e c o r d t h e r e s u l t s i n T a b l e 2 . 3 .

    m e a n ( x ( 1 , : ) ) m e a n s q ( x ( 1 , : ) ) ]

    m e a n ( x ( 2 , : ) ) m e a n s q ( x ( 2 , : ) ) ]

    m e a n ( x ( 3 , : ) ) m e a n s q ( x ( 3 , : ) ) ]

    m e a n ( x ( 4 , : ) ) m e a n s q ( x ( 4 , : ) ) ]

    h X ( t ) i h X

    2

    ( t ) i

    1

    2

    3

    4

    T a b l e 2 . 3

    C o m p a r e t h e t i m e a v e r a g e v a l u e s f r o m T a b l e 2 . 3 w i t h t h e e n s e m b l e

    a v e r a g e v a l u e s s h o w n i n T a b l e 2 . 1 . W h a t d o e s t h i s c o m p a r i s o n s a y

    a b o u t t h e e r g o d i c i t y o f X ( t ) ?

  • 8/11/2019 Comm Tbx.manual

    39/114

    E L E 0 4 5 E x p e r i m e n t 2 : R a n d o m P r o c e s s e s 3 1

    A . 5 D i s p l a y t h e t i m e - a v e r a g e a u t o c o r r e l a t i o n f u n c t i o n o f X (

    1

    t ) .

    c l f

    a c f ( x ( 1 , : ) , 1 0 0 )

    I s t h e t i m e - a v e r a g e a u t o c o r r e l a t i o n f u n c t i o n o f X (

    1

    t ) d i e r e n t f r o m

    t h a t o f X (

    3

    t ) ?

    Q 2 . 2 I f X ( t ) i s a n e r g o d i c p r o c e s s , h o w w o u l d y o u e v a l u a t e

    R

    X

    ( 2 : 6 0 : 7 ) u s i n g t h e p l o t f r o m p a r t A . 5 ?

    A . 6 G e n e r a t e a s e c o n d r a n d o m p r o c e s s Y ( t ) = c o s ( 2 1 0 0 0 t + ) d e n e d

    i n t e r m s o f a d i s c r e t e - v a l u e d p h a s e v a r i a b l e s u c h t h a t

    1

    = 0 a n d

    1

    = w i t h e q u a l p r o b a b i l i t y .

    y = r e a l i z e ( 0 , p i ] )

    D i s p l a y b o t h r e a l i z a t i o n s o f Y ( t ) . D e t e r m i n e t h e e n s e m b l e m e a n a n d

    t h e e n s e m b l e m e a n - s q u a r e v a l u e a t t = 1 m s e c a n d t = 1 : 2 5 m s e c .

    s u b p l o t ( 2 1 1 ) , w a v e p l o t ( y ( 1 , 1 : 4 0 0 ) )

    s u b p l o t ( 2 1 2 ) , w a v e p l o t ( y ( 2 , 1 : 4 0 0 ) )

    Q 2 . 3 I s Y ( t ) w i d e - s e n s e s t a t i o n a r y ? I s Y ( t ) a n e r g o d i c p r o -

    c e s s ? P r o v e y o u r a n s w e r s .

    B . C o r r e l a t i o n

    C o r r e l a t i o n m e a s u r e s t h e r e l a t i o n s h i p b e t w e e n t w o s e t s o f d a t a i n t h e s e n s e

    t h a t t h e c l o s e r t h e d a t a s e t s a r e r e l a t e d , t h e l a r g e r w i l l b e t h e a b s o l u t e

    v a l u e o f t h e c o r r e l a t i o n m e a s u r e . O n e o f t h e a p p l i c a t i o n s o f c o r r e l a t i o n i s t o

    e s t i m a t e a r a n d o m q u a n t i t y f r o m o b s e r v a t i o n s m a d e o n a r e l a t e d p a r a m e t e r .

    B . 1 G e n e r a t e 1 , 0 0 0 r e c o r d s , e a c h d e s c r i b i n g t h e a g e , t h e h e i g h t a n d t h e

    w e i g h t o f a p e r s o n b e t w e e n t h e a g e s o f 2 0 a n d 5 0 .

    a = p e r s o n d a t a ( 1 0 0 0 )

  • 8/11/2019 Comm Tbx.manual

    40/114

  • 8/11/2019 Comm Tbx.manual

    41/114

    E L E 0 4 5 E x p e r i m e n t 2 : R a n d o m P r o c e s s e s 3 3

    C . 2 R e p e a t t h e a b o v e s t e p f o r a d i s c r e t e v a l u e d , w h i t e G a u s s i a n p r o c e s s

    B ( t ) t h a t r e p r e s e n t s t h e n u m b e r o f n e w b o r n b a b i e s i n t h e C i t y o f

    T o r o n t o b e t w e e n J u n e 1 a n d A u g u s t 3 1 .

    s u b p l o t ( 2 1 2 ) , n e w b o r n

    Q 2 . 5 W h i c h r a n d o m p r o c e s s h a s h i g h e r c o r r e l a t i o n b e t w e e n i t s

    a d j a c e n t s a m p l e s ?

    C . 3 D i s p l a y t h e t e m p e r a t u r e a n d n e w - b o r n w a v e f o r m s , a n d t h e n o r m a l i z e d

    a u t o c o r r e l a t i o n f u n c t i o n s o f T ( t ) ; E T ( t ) ] a n d B ( t ) ; E B ( t ) ] .

    c l f , s u b p l o t ( 2 1 1 ) , t e m p e r a t u r e ( 0 )

    f i g u r e ( 2 ) , s u b p l o t ( 2 1 1 ) , n e w b o r n ( 0 )

    Q 2 . 6 W h i c h w a v e f o r m u c t u a t e s m o r e r a p i d l y ? R e l a t e y o u r a n -

    s w e r t o t h e r e s u l t s o b s e r v e d i n p a r t s C . 1 a n d C . 2 .

    C . 4 R ( 3 ) q u a n t i e s c o r r e l a t i o n b e t w e e n s a m p l e s o f a r a n d o m p r o c e s s t h a t

    a r e s e p a r a t e d b y t h r e e \ t i m e - u n i t s " . M e a s u r e R ( 3 ) f o r t e m p e r a t u r e a n d

    n e w - b o r n p r o c e s s e s a n d r e l a t e t h e s e v a l u e s t o y o u r a n s w e r i n Q u e s t i o n

    Q 2 . 6 .

    R

    T

    ( 3 ) =

    R

    B

    ( 3 ) =

    Q 2 . 7 I f y o u w e r e a s k e d t o q u a n t i f y t h e c o r r e l a t i o n b e t w e e n t h e

    d a y - t i m e t e m p e r a t u r e s f o r t h e d a y s J u n e 1 0 a n d J u n e 2 8 ,

    w h i c h R

    T

    v a l u e w o u l d y o u u s e ? E x p l a i n w h y t h e a u t o c o r r e -

    l a t i o n f u n c t i o n R

    T

    ( k ) i s a d e c r e a s i n g f u n c t i o n o f k , k > 0 .

    D . A u t o c o r r e l a t i o n F u n c t i o n a n d P o w e r S p e c t r a l D e n s i t y F u n c t i o n

    D . 1 G e n e r a t e 4 , 0 9 6 s a m p l e s f r o m a c o r r e l a t e d r a n d o m p r o c e s s Z ( t ) a n d

    d i s p l a y t h e r e s u l t i n g w a v e f o r m :

  • 8/11/2019 Comm Tbx.manual

    42/114

    3 4 E x p e r i m e n t 2 : R a n d o m P r o c e s s e s E L E 0 4 5

    c l o s e ( 2 ) , c l f

    z = c o r r s e q ( 0 . 8 5 , 4 0 9 6 , 3 , 0 )

    w a v e p l o t ( z )

    D . 2 C o m p u t e a n d d i s p l a y t h e a u t o c o r r e l a t i o n f u n c t i o n R

    Z

    ( ) a n d t h e p o w e r

    s p e c t r a l d e n s i t y f u n c t i o n S

    Z

    ( f ) o f t h e r a n d o m p r o c e s s Z ( t ) .

    c l f , s u b p l o t ( 2 1 1 ) , a c f ( z )

    s u b p l o t ( 2 1 2 ) , p s d ( z )

    C o m p a r e S

    Z

    ( f ) w i t h y o u r a n s w e r t o Q u e s t i o n 2 i n t h e p r e - l a b a s s i g n -

    m e n t .

    D . 3 E v a l u a t e t h e m e a n a n d m e a n - s q u a r e v a l u e o f Z ( t ) u s i n g R

    Z

    ( ) :

    E Z ( t ) ] =

    E Z

    2

    ( t ) ] =

    D . 4 A l s o d e t e r m i n e t h e m e a n - s q u a r e v a l u e o f Z ( t ) u s i n g S

    Z

    ( f ) . T h e m e a n -

    s q u a r e v a l u e i s e q u i v a l e n t t o t h e a r e a u n d e r t h e P S D f u n c t i o n . D u e

    t o s a m p l i n g o f w a v e f o r m s i n t h e M a t l a b s i m u l a t i o n e n v i r o n m e n t , t h e

    m e a n - s q u a r e v a l u e i s e q u a l t o t h e a r e a u n d e r t h e P S D f u n c t i o n m u l -

    t i p l i e d b y a s c a l i n g f a c t o r . T h e s c a l i n g f a c t o r i s t h e n u m b e r o f d a t a

    s a m p l e s d i v i d e d b y t h e s a m p l i n g f r e q u e n c y ( s e e A p p e n d i x A ) . I n t h e

    p r e s e n t e x p e r i m e n t , t h e v a l u e o f t h e s c a l i n g f a c t o r i s 0 . 0 4 0 9 6 .

    E Z

    2

    ( t ) ] = 0 : 0 4 0 9 6 =

    E . W h i t e N o i s e

    T h e P S D f u n c t i o n o f a w h i t e n o i s e p r o c e s s i s a t o v e r t h e e n t i r e s y s t e m

    b a n d w i d t h . A w h i t e n o i s e p r o c e s s , u s e d a s a n i n p u t , w i l l e x c i t e a l l f r e q u e n c y

    m o d e s o f a n \ u n k n o w n " s y s t e m . T h e r e f o r e , c a l i b r a t e d w h i t e n o i s e i s a u s e -

    f u l t o o l i n s y s t e m i d e n t i c a t i o n . F o r e x a m p l e , t o d e t e r m i n e t h e f r e q u e n c y

    r e s p o n s e o f a n u n k n o w n s y s t e m , a s e t - u p s u c h a s s h o w n i n F i g . 2 . 1 c a n b e

    u s e d .

    BLACKBOX BAND-PASS

    FILTER METERRMS POWER

    PASS-BAND ADJUST

    GENERATORWHITE NOISE

    F i g 2 . 1 S y s t e m m e a s u r e m e n t s u s i n g w h i t e n o i s e

  • 8/11/2019 Comm Tbx.manual

    43/114

  • 8/11/2019 Comm Tbx.manual

    44/114

    3 6 E x p e r i m e n t 2 : R a n d o m P r o c e s s e s E L E 0 4 5

    Q 2 . 8 D e t e r m i n e t h e p a s s - b a n d a n d t h e o r d e r o f t h e u n k n o w n

    l t e r r e p r e s e n t e d b y t h e b l a c k b o x f u n c t i o n .

  • 8/11/2019 Comm Tbx.manual

    45/114

  • 8/11/2019 Comm Tbx.manual

    46/114

    3 8 E x p e r i m e n t 2 : N o t e s E L E 0 4 5

  • 8/11/2019 Comm Tbx.manual

    47/114

    E X P E R I M E N T 3

    B I N A R Y S I G N A L L I N G F O R M A T S

    O B J E C T I V E S

    I n t h i s e x p e r i m e n t y o u w i l l i n v e s t i g a t e h o w b i n a r y i n f o r m a t i o n i s s e r i a l l y

    c o d e d f o r t r a n s m i s s i o n a t b a s e b a n d f r e q u e n c i e s . I n p a r t i c u l a r , y o u w i l l s t u d y :

    l i n e c o d i n g m e t h o d s w h i c h a r e c u r r e n t l y u s e d i n d a t a c o m m u n i c a t i o n

    a p p l i c a t i o n s

    p o w e r s p e c t r a l d e n s i t y f u n c t i o n s a s s o c i a t e d w i t h v a r i o u s l i n e c o d e s

    c a u s e s o f s i g n a l d i s t o r t i o n i n a d a t a c o m m u n i c a t i o n s c h a n n e l

    e e c t s o f i n t e r s y m b o l i n t e r f e r e n c e ( I S I ) a n d c h a n n e l n o i s e b y o b s e r v i n g

    t h e e y e p a t t e r n .

    R E F E R E N C E S

    1 . A . B . C a r l s o n , \ C o m m u n i c a t i o n S y s t e m s , " t h i r d e d . , M c G r a w - H i l l

    I n c . , N e w Y o r k , 1 9 8 6 , p p . 3 8 1 { 3 9 1 .

    2 . L . W . C o u c h I I , \ D i g i t a l a n d A n a l o g C o m m u n i c a t i o n S y s t e m s , " t h i r d

    e d . , M a c M i l l a n P u b l i s h i n g C o . , N e w Y o r k , 1 9 9 0 , p p . 1 4 4 { 1 6 5 .

    3 . S . H a y k i n , \ A n I n t r o d u c t i o n t o A n a l o g & D i g i t a l C o m m u n i c a t i o n s , "

    J . W i l e y & S o n s I n c . , N e w Y o r k , 1 9 8 9 , p p . 1 9 7 { 2 0 0 a n d 2 2 7 { 2 3 0 .

    P R E - L A B A S S I G N M E N T

    1 . G i v e n t h e b i n a r y s e q u e n c e b = f 1 0 1 0 1 1 g s k e t c h t h e w a v e f o r m s

    r e p r e s e n t i n g t h e s e q u e n c e b u s i n g t h e f o l l o w i n g l i n e c o d e s :

    a . u n i p o l a r N R Z

    b . p o l a r N R Z

    c . u n i p o l a r R Z

    d . b i p o l a r R Z

    e . m a n c h e s t e r .

    A s s u m e u n i t p u l s e a m p l i t u d e a n d u s e b i n a r y d a t a r a t e R

    b

    = 1 k b p s :

    2 . D e t e r m i n e a n d s k e t c h t h e p o w e r s p e c t r a l d e n s i t y ( P S D ) f u n c t i o n s c o r -

    r e s p o n d i n g t o t h e a b o v e l i n e c o d e s . U s e R

    b

    = 1 k b p s : L e t f

    1

    > 0 b e t h e

  • 8/11/2019 Comm Tbx.manual

    48/114

    4 0 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s E L E 0 4 5

    l o c a t i o n o f t h e r s t s p e c t r a l n u l l i n t h e P S D f u n c t i o n . I f t h e t r a n s m i s -

    s i o n b a n d w i d t h B

    T

    o f a l i n e c o d e i s d e t e r m i n e d b y f

    1

    , d e t e r m i n e B

    T

    f o r t h e l i n e c o d e s i n q u e s t i o n 1 a s a f u n c t i o n o f R

    b

    :

    3 . L e t y ( t ) b e a w a v e f o r m o b s e r v e d a t t h e o u t p u t o f a c o m m u n i c a t i o n s

    c h a n n e l . T h e w a v e f o r m h a s b e e n e n c o d e d u s i n g a p o l a r N R Z l i n e c o d e .

    0 1 2 3 4 5 6 7 8 9 10-1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    Time [xTb sec]

    y ( t ) [ V ]

    T o d i s p l a y a n e y e d i a g r a m , y ( t ) i s f e d t o a s t o r a g e o s c i l l o s c o p e w h e r e

    t h e h o r i z o n t a l s w e e p t i m e i s s e t t o 3 T

    b

    . S k e t c h t h e c o r r e s p o n d i n g e y e

    d i a g r a m .

  • 8/11/2019 Comm Tbx.manual

    49/114

    E L E 0 4 5 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s 4 1

    P R O C E D U R E

    A . B i n a r y S i g n a l l i n g F o r m a t s : L i n e C o d e W a v e f o r m s

    B i n a r y 1 ' s a n d 0 ' s s u c h a s i n p u l s e - c o d e m o d u l a t i o n ( P C M ) s y s t e m s , m a y b e

    r e p r e s e n t e d i n v a r i o u s s e r i a l b i t s i g n a l l i n g f o r m a t s c a l l e d l i n e c o d e s . I n t h i s

    s e c t i o n y o u w i l l s t u d y s i g n a l l i n g f o r m a t s a n d t h e i r p r o p e r t i e s .

    A . 1 Y o u w i l l u s e t h e M A T L A B f u n c t i o n w a v e g e n t o g e n e r a t e w a v e f o r m s

    r e p r e s e n t i n g a b i n a r y s e q u e n c e :

    w a v e g e n ( b i n a r y s e q u e n c e , ' l i n e c o d e n a m e ' , R

    b

    )

    w h e r e R

    b

    i s t h e b i n a r y d a t a r a t e s p e c i e d i n b i t s p e r s e c o n d ( b p s ) .

    I f y o u u s e t h e f u n c t i o n w a v e g e n w i t h t h e r s t t w o a r g u m e n t s o n l y , i t

    w i l l d e f a u l t t o t h e b i n a r y d a t a r a t e s e t b y t h e v a r i a b l e b i n a r y d a t a r a t e ,

    w h i c h i s 1 , 0 0 0 b p s . C r e a t e t h e f o l l o w i n g b i n a r y s e q u e n c e :

    b = 1 0 1 0 1 1 ]

    G e n e r a t e t h e w a v e f o r m r e p r e s e n t i n g b , u s i n g u n i p o l a r N R Z l i n e c o d e

    w i t h R

    b

    = 1 k b p s a n d d i s p l a y t h e w a v e f o r m x .

    x = w a v e g e n ( b , ' u n i p o l a r n r z ' , 1 0 0 0 )

    w a v e p l o t ( x )

    A . 2 R e p e a t s t e p A . 1 f o r t h e f o l l o w i n g l i n e c o d e s :

    p o l a r N R Z ( ' p o l a r n r z ' )

    u n i p o l a r R Z ( ' u n i p o l a r r z ' )

    b i p o l a r R Z ( ' b i p o l a r r z ' )

    m a n c h e s t e r ( ' m a n c h e s t e r ' ) .

    Y o u m a y w a n t t o s i m p l i f y y o u r c o m m a n d l i n e b y u s i n g :

    w a v e p l o t ( w a v e g e n ( b , ' l i n e c o d e n a m e ' ) )

    S i n c e y o u w i l l c o m p a r e w a v e f o r m s a t t h e s a m e R

    b

    , y o u c a n u s e t h e

    f u n c t i o n w a v e g e n w i t h o n l y t w o a r g u m e n t s .

    Q 3 . 1 F o r t h e a b o v e s e t o f l i n e c o d e s d e t e r m i n e w h i c h w i l l g e n e r -

    a t e a w a v e f o r m w i t h n o d c c o m p o n e n t r e g a r d l e s s o f b i n a r y

    s e q u e n c e r e p r e s e n t e d . W h y i s t h e a b s e n c e o f a d c c o m p o -

    n e n t o f a n y p r a c t i c a l s i g n i c a n c e f o r t h e t r a n s m i s s i o n o f

    w a v e f o r m s ?

  • 8/11/2019 Comm Tbx.manual

    50/114

    4 2 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s E L E 0 4 5

    A . 3 P o w e r s p e c t r a l d e n s i t y ( P S D ) f u n c t i o n s o f l i n e c o d e s : G e n e r a t e

    a 1 , 0 0 0 s a m p l e b i n a r y s e q u e n c e :

    b = b i n a r y ( 1 0 0 0 )

    D i s p l a y t h e P S D f u n c t i o n o f e a c h l i n e c o d e u s e d i n p a r t A . 1 :

    p s d ( w a v e g e n ( b , ' l i n e c o d e n a m e ' ) )

    L e t :

    f

    p 1

    : r s t s p e c t r a l p e a k f

    n 1

    : r s t s p e c t r a l n u l l

    f

    p 2

    : s e c o n d s p e c t r a l p e a k f

    n 2

    : s e c o n d s p e c t r a l n u l l

    s u c h t h a t a l l f

    ( : )

    > 0 : R e c o r d y o u r o b s e r v a t i o n s i n T a b l e 3 . 1 .

    R

    b

    = f

    p 1

    f

    n 1

    f

    p 2

    f

    n 2

    B

    T

    u n i p o l a r N R Z

    p o l a r N R Z

    u n i p o l a r R Z

    b i p o l a r R Z

    m a n c h e s t e r

    T a b l e 3 . 1

    L o c a t i o n o f t h e r s t s p e c t r a l n u l l d e t e r m i n e s t r a n s m i s s i o n b a n d w i d t h

    B

    T

    .

    A . 4 T o i l l u s t r a t e t h e d e p e n d e n c e o f t h e P S D f u n c t i o n o n t h e u n d e r l y i n g

    b i n a r y d a t a r a t e , u s e t h e m a n c h e s t e r l i n e c o d e a n d v a r y R

    b

    :

    p s d ( w a v e g e n ( b , ' m a n c h e s t e r ' , R b ) )

    w h e r e R b 2 f 5 k b p s 1 0 k b p s 2 0 k b p s g . Y o u m a y r e p l a c e m a n c h e s t e r

    b y a n y o t h e r l i n e c o d e u s e d i n p a r t A . 1 . O b s e r v e t h e l o c a t i o n o f s p e c t r a l

    p e a k s a n d n u l l s a n d r e l a t e t h e m t o R

    b

    .

    Q 3 . 2 F o r a b a s e b a n d d a t a c o m m u n i c a t i o n s c h a n n e l w i t h u s a b l e

    b a n d w i d t h o f 1 0 k H z , w h a t i s t h e m a x i m u m b i n a r y d a t a

    r a t e f o r e a c h o f t h e l i n e c o d e s e x a m i n e d i n p a r t A . 1 .

  • 8/11/2019 Comm Tbx.manual

    51/114

    E L E 0 4 5 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s 4 3

    B . C h a n n e l C h a r a c t e r i s t i c s

    I n t h i s p a r t y o u w i l l s i m u l a t e c h a r a c t e r i s t i c s o f a c o m m u n i c a t i o n s c h a n n e l .

    CHANNELINPUT OUTPUT

    NOISE

    F i g 3 . 1 C h a n n e l m o d e l

    T h e M A T L A B f u n c t i o n t h a t r e p r e s e n t s t h e c h a n n e l r e s p o n s e i s c h a n n e l

    w h i c h i s c a l l e d w i t h t h e f o l l o w i n g a r g u m e n t s :

    c h a n n e l ( i n p u t , g a i n , n o i s e p o w e r , b a n d w i d t h )

    B . 1 C r e a t e a 1 0 s a m p l e b i n a r y s e q u e n c e b a n d g e n e r a t e a w a v e f o r m r e p r e -

    s e n t i n g b i n p o l a r N R Z s i g n a l l i n g f o r m a t . U s e R

    b

    = 1 k b p s :

    b = b i n a r y ( 1 0 )

    x = w a v e g e n ( b , ' p o l a r n r z ' , 1 0 0 0 )

    F r o m y o u r o b s e r v a t i o n i n p a r t A , d e t e r m i n e t h e t r a n s m i s s i o n b a n d -

    w i d t h B

    T

    o f x :

    B

    T

    = H z .

    B . 2 C o n s i d e r a b a s e b a n d d a t a t r a n s m i s s i o n c h a n n e l w i t h u n i t y g a i n a n d a d -

    d i t i v e w h i t e G a u s s i a n n o i s e ( A W G N ) w h e r e t h e n o i s e p o w e r i s 1 0

    ; 2

    W

    a n d t h e c h a n n e l b a n d w i d t h i s 4 : 9 k H z : T r a n s m i t w a v e f o r m x o v e r t h i s

    c h a n n e l . D i s p l a y t h e c h a n n e l i n p u t a n d o u t p u t w a v e f o r m s :

    y = c h a n n e l ( x , 1 , 0 . 0 1 , 4 9 0 0 )

    s u b p l o t ( 2 1 1 ) , w a v e p l o t ( x )

    s u b p l o t ( 2 1 2 ) , w a v e p l o t ( y )

    E s t i m a t e t h e t r a n s m i t t e d s e q u e n c e f r o m t h e d i s p l a y o f t h e c h a n n e l

    o u t p u t w a v e f o r m .

    ^

    b =

    C o m p a r e y o u r e s t i m a t e w i t h t h e o r i g i n a l s e q u e n c e b .

  • 8/11/2019 Comm Tbx.manual

    52/114

    4 4 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s E L E 0 4 5

    B . 3 E e c t o f c h a n n e l n o i s e o n t h e t r a n s m i t t e d w a v e f o r m : G r a d u a l l y

    i n c r e a s e t h e c h a n n e l n o i s e p o w e r w h i l e k e e p i n g t h e c h a n n e l b a n d w i d t h

    a t 4 : 9 k H z a n d o b s e r v e c h a n g e s i n t h e c h a n n e l o u t p u t .

    s u b p l o t ( 2 1 2 ) , w a v e p l o t ( c h a n n e l ( x , 1 , s i g m a , 4 9 0 0 ) )

    w h e r e s i g m a 2 f 0 : 1 0 : 5 1 2 5 g : A t w h a t n o i s e p o w e r l e v e l , d o e s t h e

    c h a n n e l o u t p u t w a v e f o r m b e c o m e s i n d i s t i n g u i s h a b l e f r o m n o i s e ?

    B . 4 Y o u c a n a l s o o b s e r v e e e c t s o f i n c r e a s i n g c h a n n e l n o i s e p o w e r b y l o o k -

    i n g a t t h e P S D o f t h e c h a n n e l o u t p u t w a v e f o r m .

    b = b i n a r y ( 1 0 0 0 )

    x = w a v e g e n ( b , ' p o l a r n r z ' , 1 0 0 0 )

    c l f , s u b p l o t ( 1 2 1 ) , p s d ( x ) , a = a x i s

    s u b p l o t ( 1 2 2 ) , p s d ( c h a n n e l ( x , 1 , 0 . 0 1 , 4 9 0 0 ) )

    a x i s ( a ) , h o l d o n

    p s d ( c h a n n e l ( x , 1 , 1 , 4 9 0 0 ) )

    p s d ( c h a n n e l ( x , 1 , 5 , 4 9 0 0 ) )

    Q 3 . 3 S i n c e t h e c h a n n e l n o i s e i s a d d i t i v e a n d u n c o r r e l a t e d w i t h

    t h e c h a n n e l i n p u t , d e t e r m i n e a n e x p r e s s i o n t h a t w i l l d e -

    s c r i b e t h e P S D o f t h e c h a n n e l o u t p u t i n t e r m s o f t h e i n p u t

    a n d n o i s e P S D f u n c t i o n s .

    B . 5 E e c t s o f c h a n n e l b a n d w i d t h o n t r a n s m i t t e d w a v e f o r m : D i s -

    t o r t i o n o b s e r v e d i n t h e t i m e d i s p l a y o f t h e c h a n n e l o u t p u t i s d u e t o

    n i t e b a n d w i d t h o f t h e c h a n n e l a n d d u e t o n o i s e . T o s t u d y d i s t o r t i o n

    d u e t o c h a n n e l b a n d w i d t h o n l y , s e t n o i s e p o w e r t o z e r o a n d r e g e n e r a t e

    t h e c h a n n e l o u t p u t w a v e f o r m :

    c l f

    b = b i n a r y ( 1 0 )

    x = w a v e g e n ( b , ' p o l a r n r z ' , 1 0 0 0 )

    s u b p l o t ( 2 1 1 ) , w a v e p l o t ( x )

    s u b p l o t ( 2 1 2 ) , w a v e p l o t ( c h a n n e l ( x , 1 , 0 , 4 9 0 0 ) )

    B . 6 I n v e s t i g a t e e e c t s o f c h a n n e l b a n d w i d t h o n t h e o u t p u t w a v e f o r m .

    s u b p l o t ( 2 1 2 ) , w a v e p l o t ( c h a n n e l ( x , 1 , 0 , b w ) )

  • 8/11/2019 Comm Tbx.manual

    53/114

    E L E 0 4 5 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s 4 5

    w h e r e b w 2 f 3 0 0 0 2 0 0 0 1 0 0 0 5 0 0 g : O b s e r v e t h e d e l a y i n t h e o u t p u t

    w a v e f o r m d u e t o l t e r i n g c h a r a c t e r i s t i c s o f t h e c h a n n e l . P l o t t h e i n p u t

    a n d o u t p u t w a v e f o r m s .

    0 1 2 3 4 5 6 7 8 9 10

    0 1 2 3 4 5 6 7 8 9 10

    x(t)

    y(t)

    y(t)

    y(t)

    y(t)

    y(t)

    4.9 kHz

    3.0 kHz

    2.0 kHz

    1.0 kHz

    0.5 kHz

    Bandwidth

    Time [xTb sec]

    G r a p h 3 . 1

    C . E y e D i a g r a m

    E e c t s o f c h a n n e l l t e r i n g a n d n o i s e c a n b e b e s t s e e n b y o b s e r v i n g t h e o u t p u t

    w a v e f o r m i n t h e f o r m o f a n \ e y e d i a g r a m " . T h e e y e d i a g r a m i s g e n e r a t e d

    w i t h m u l t i p l e s w e e p s w h e r e e a c h s w e e p i s t r i g g e r e d b y a c l o c k s i g n a l

    1

    a n d

    t h e s w e e p w i d t h i s s l i g h t l y l a r g e r t h a n t h e b i n a r y d a t a p e r i o d T

    b

    = 1 = R

    b

    : I n

    t h i s s i m u l a t i o n t h e e y e d i a g r a m i s b a s e d o n a s w e e p w i d t h o f 2 T

    b

    :

    C . 1 G e n e r a t i o n o f E y e D i a g r a m :

    b = 1 0 0 1 0 1 1 0 ]

    1

    T h e c l o c k s i g n a l i s e i t h e r e x t e r n a l l y p r o v i d e d o r d e r i v e d f r o m t h e c h a n n e l o u t p u t .

    I t i s u s e d a s t h e e x t e r n a l t r i g g e r i n p u t t o a s t o r a g e o s c i l l o s c o p e .

  • 8/11/2019 Comm Tbx.manual

    54/114

    4 6 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s E L E 0 4 5

    x = w a v e g e n ( b , ' p o l a r n r z ' , 1 0 0 0 )

    c l f

    s u b p l o t ( 2 2 1 ) , w a v e p l o t ( x )

    s u b p l o t ( 2 2 3 ) , e y e d i a g ( x )

    T h e e y e d i a g r a m f o r t h e w a v e f o r m x r e p r e s e n t s w h a t y o u s h o u l d e x p e c t

    t o s e e f o r a n u n d i s t o r t e d s i g n a l . T o o b s e r v e h o w t h e e y e d i a g r a m i s

    g e n e r a t e d a n d t o o b s e r v e e e c t s o f s i g n a l d i s t o r t i o n a s t h e s i g n a l x i s

    t r a n s m i t t e d o v e r a n i t e b a n d w i d t h c h a n n e l w i t h n o n o i s e c o m p o n e n t :

    y = c h a n n e l ( x , 1 , 0 , 4 0 0 0 )

    s u b p l o t ( 2 2 2 ) , w a v e p l o t ( y )

    s u b p l o t ( 2 2 4 ) , e y e d i a g ( y , - 1 )

    I f t h e s e c o n d a r g u m e n t t o t h e f u n c t i o n e y e d i a g i s n e g a t i v e , y o u h a v e

    t o h i t t h e R e t u r n k e y f o r t h e n e x t t r a c e t o b e d i s p l a y e d . T h i s w i l l a s s i s t

    y o u t o u n d e r s t a n d h o w t h e e y e d i a g r a m i s g e n e r a t e d .

    C . 2 K e y p a r a m e t e r s t o b e m e a s u r e d w i t h a n e y e d i a g r a m a r e s h o w n b e l o w .

    0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

    x 10-3

    -1.5

    -1

    -0.5

    0

    0.5

    1

    1.5x 10

    -3

    Time [sec]

    EYE DIAGRAM

    A

    t*

    B

    C

    E

    slopeD

    F i g 3 . 2 I n t e r p r e t a t i o n o f t h e e y e p a t t e r n

    A t i m e i n t e r v a l o v e r w h i c h t h e w a v e f o r m c a n b e s a m p l e d

    B m a r g i n o v e r n o i s e

    C d i s t o r t i o n o f z e r o c r o s s i n g s

    D s l o p e : s e n s i t i v i t y t o t i m i n g e r r o r

    E m a x i m u m d i s t o r t i o n

  • 8/11/2019 Comm Tbx.manual

    55/114

    E L E 0 4 5 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s 4 7

    t o p t i m u m s a m p l i n g i n s t a n t m e a s u r e d w i t h r e s p e c t t o t h e t i m e

    o r i g i n . I f t h e b i n a r y d a t a p e r i o d i s T

    b

    , t h e n t h e w a v e f o r m w i l l b e

    s a m p l e d a t t t + T

    b

    t + 2 T

    b

    : : : f o r s i g n a l d e t e c t i o n .

    G e n e r a t e t h e e y e d i a g r a m f r o m a p o l a r N R Z w a v e f o r m a t t h e c h a n n e l

    o u t p u t f o r v a l u e s o f n o i s e v a r i a n c e s 2 a n d c h a n n e l b a n d w i d t h b w s h o w n

    i n T a b l e 3 . 2 . R e c o r d t , A a n d B f o r e a c h s e t o f s 2 a n d b w .

    c l f

    b = b i n a r y ( 1 0 0 )

    x = w a v e g e n ( b , ' p o l a r n r z ' , 1 0 0 0 )

    e y e d i a g ( c h a n n e l ( x , 1 , s 2 , b w ) )

    P o l a r N R Z L i n e C o d e

    s 2 b w t A B

    0 . 0 1

    3 0 0 0

    2 0 0 0

    1 0 0 0

    0 . 0 2

    4 0 0 0

    0 . 0 8

    0 . 1 0

    T a b l e 3 . 2

    C . 3 R e p e a t s t e p C . 2 f o r m a n c h e s t e r l i n e c o d e a n d r e c o r d y o u r r e s u l t s i n

    T a b l e 3 . 3 .

    M a n c h e s t e r L i n e C o d e

    s 2 b w t A B

    0 . 0 1

    3 0 0 0

    2 0 0 0

    1 0 0 0

    0 . 0 2

    4 0 0 0

    0 . 0 8

    0 . 1 0

    T a b l e 3 . 3

  • 8/11/2019 Comm Tbx.manual

    56/114

    4 8 E x p e r i m e n t 3 : B i n a r y S i g n a l l i n g F o r m a t s E L E 0 4 5

    Q 3 . 4 W h e n y o u c o m p a r e t h e e y e d i a g r a m s f r o m C . 2 a n d C . 3

    f o r s 2 = 0 : 0 1 a n d b w = 1 0 0 0 , f o r w h i c h l i n e c o d e d o y o u

    o b s e r v e a \ r e a s o n a b l e " e y e d i a g r a m ? E x p l a i n t h e d i e r e n c e

    i n t e r m s o f t h e r e s p e c t i v e l i n e c o d e p r o p e r t i e s .

    C . 4 G e n e r a t e e y e d i a g r a m s a s i n s t e p C . 2 f o r p o l a r R Z a n d u n i p o l a r R Z

    a n d u n i p o l a r N R Z l i n e c o d e s a n d o b s e r v e h o w t h e l i n e c o d e d i c t a t e s

    t h e s h a p e a n d t h e s y m m e t r y o f t h e e y e d i a g r a m .

  • 8/11/2019 Comm Tbx.manual

    57/114

    E L E 0 4 5 E x p e r i m e n t 3 : N o t e s 4 9

  • 8/11/2019 Comm Tbx.manual

    58/114

    5 0 E x p e r i m e n t 3 : N o t e s E L E 0 4 5

  • 8/11/2019 Comm Tbx.manual

    59/114

    E X P E R I M E N T 4

    D E T E C T I O N

    O B J E C T I V E S

    I n t h i s e x p e r i m e n t y o u w i l l i n v e s t i g a t e t h e s i g n a l d e t e c t i o n p r o c e s s b y s t u d y -

    i n g e l e m e n t s o f a r e c e i v e r a n d o f t h e d e c o d i n g p r o c e s s . I n p a r t i c u l a r y o u

    w i l l :

    i n v e s t i g a t e t h e c h a r a c t e r i s t i c s o f m a t c h e d l t e r s

    s t u d y p e r f o r m a n c e o f v a r i o u s r e c e i v e r s t r u c t u r e s b a s e d o n d i e r e n t r e -

    c e i v e r l t e r s b y m e a s u r i n g p r o b a b i l i t y o f b i t e r r o r

    u s e t h e e y e d i a g r a m a s a n i n v e s t i g a t i v e t o o l t o s e t p a r a m e t e r s o f t h e

    d e t e c t i o n p r o c e s s .

    R E F E R E N C E S

    1 . A . B . C a r l s o n , \ C o m m u n i c a t i o n S y s t e m s , " t h i r d e d . , M c G r a w - H i l l

    I n c . , N e w Y o r k , 1 9 8 6 , p p . 3 9 1 { 4 0 0 .

    2 . L . W . C o u c h I I , \ D i g i t a l a n d A n a l o g C o m m u n i c a t i o n S y s t e m s , " t h i r d

    e d . , M a c M i l l a n P u b l i s h i n g C o . , N e w Y o r k , 1 9 9 0 , p p . 4 9 7 { 5 0 4 , 5 2 1 { 5 3 2 .

    3 . S . H a y k i n , \ A n I n t r o d u c t i o n t o A n a l o g & D i g i t a l C o m m u n i c a t i o n s , "

    J . W i l e y & S o n s I n c . , N e w Y o r k , 1 9 8 9 , p p . 5 3 9 { 5 7 3 .

    P R E - L A B A S S I G N M E N T

    1 . A m a t c h e d l t e r i s t o b e d e s i g n e d t o d e t e c t t h e r e c t a n g u l a r p u l s e

    r ( t ) = r e c t

    t ; T

    b

    = 2

    T

    b

    w i t h T

    b

    = 1 m s e c :

    a . D e t e r m i n e t h e i m p u l s e r e s p o n s e o f t h e m a t c h e d l t e r .

    b . D e t e r m i n e t h e o u t p u t o f t h e m a t c h e d l t e r i f r ( t ) i s t h e i n p u t .

    c . R e p e a t p a r t s a a n d b f o r a t r i a n g u l a r p u l s e o f 1 0 m s e c d u r a t i o n .

    2 . L e t Y ( t ) = X ( t ) + n ( t ) , r e p r e s e n t t h e w a v e f o r m a t t h e o u t p u t o f a

    c h a n n e l . X ( t ) i s a p o l a r N R Z w a v e f o r m w i t h u n i t p u l s e a m p l i t u d e a n d

  • 8/11/2019 Comm Tbx.manual

    60/114

    5 2 E x p e r i m e n t 4 : D e t e c t i o n E L E 0 4 5

    b i n a r y d a t a r a t e R

    b

    o f 1 k b p s . n ( t ) i s a w h i t e n o i s e p r o c e s s w i t h P S D

    f u n c t i o n :

    S

    n

    ( f ) = N

    o

    = 2 = 0 : 5 1 0

    ; 4

    W = H z :

    I f Y ( t ) i s a p p l i e d t o a m a t c h e d - l t e r r e c e i v e r :

    a . D e t e r m i n e t h e r m s v a l u e o f n ( t ) a n d t h e p e a k s i g n a l a m p l i t u d e

    a t t h e o u t p u t o f t h e m a t c h e d l t e r .

    b . D e t e r m i n e E

    b

    , t h e a v e r a g e e n e r g y o f X ( t ) i n a b i t p e r i o d .

    c . D e t e r m i n e t h e p r o b a b i l i t y o f b i t e r r o r P

    e

    = Q (

    p

    2 E

    b

    = N

    o

    ) .

    3 . I f Y ( t ) i n Q u e s t i o n 2 i s a p p l i e d t o a R C - l t e r w i t h f r e q u e n c y r e s p o n s e :

    H

    r c

    ( f ) =

    1

    1 + j 2 f R C

    w i t h R C = 1 = ( 2 0 0 0 ) ,

    a . d e t e r m i n e t h e p e a k s i g n a l a m p l i t u d e a n d r m s v a l u e o f t h e n o i s e

    a t t h e l t e r o u t p u t

    b . d e t e r m i n e t h e p r o b a b i l i t y o f b i t e r r o r P

    e

    , i f X ( t ) w e r e t o b e d e -

    t e c t e d b y a r e c e i v e r b a s e d o n t h e R C - l t e r .

  • 8/11/2019 Comm Tbx.manual

    61/114

    E L E 0 4 5 E x p e r i m e n t 4 : D e t e c t i o n 5 3

    P R O C E D U R E

    A . C h a r a c t e r i s t i c s o f M a t c h e d F i l t e r s

    A . 1 G e n e r a t e a r e c t a n g u l a r p u l s e w i t h u n i t p u l s e a m p l i t u d e a n d 1 m s e c

    p u l s e d u r a t i o n .

    r = w a v e g e n ( 1 , ' p o l a r n r z ' , 1 0 0 0 )

    A . 2 D i s p l a y r a n d t h e i m p u l s e r e s p o n s e o f a m a t c h e d l t e r b a s e d o n r .

    s u b p l o t ( 3 1 1 ) , w a v e p l o t ( r )

    s u b p l o t ( 3 1 2 ) , m a t c h ( ' p o l a r n r z ' )

    A . 3 O b s e r v e t h e m a t c h e d l t e r o u t p u t i f r i s a p p l i e d t o i t s i n p u t .

    r m = m a t c h ( ' p o l a r n r z ' , r )

    s u b p l o t ( 3 1 3 ) , w a v e p l o t ( r m )

    D e t e r m i n e t h e t i m e w h e n t h e l t e r o u t p u t r e a c h e s i t s m a x i m u m v a l u e .

    H o w i s t h i s t i m e r e l a t e d t o t h e w a v e f o r m r ?

    Q 4 . 1 H o w w o u l d y o u d e t e r m i n e t h e p e a k a m p l i t u d e v a l u e o f t h e

    m a t c h e d l t e r o u t p u t d i r e c t l y f r o m t h e a b o v e p l o t s ?

    A . 4 R e p e a t p a r t s A . 1 { A . 3 f o r a t r i a n g u l a r p u l s e w i t h 1 0 m s e c p u l s e w i d t h

    a n d u n i t p e a k a m p l i t u d e .

    r = w a v e g e n ( 1 , ' t r i a n g l e ' , 1 0 0 )

    c l f s u b p l o t ( 3 1 1 ) , w a v e p l o t ( r )

    s u b p l o t ( 3 1 2 ) , m a t c h ( ' t r i a n g l e ' )

    r m = m a t c h ( ' t r i a n g l e ' , r )

    s u b p l o t ( 3 1 3 ) , w a v e p l o t ( r m )

    Q 4 . 2 I f t h e t r i a n g u l a r p u l s e w i d t h i s c h a n g e d t o 1 m s e c , d e t e r -

    m i n e t h e p e a k a m p l i t u d e o f t h e m a t c h e d l t e r o u t p u t ?

    A . 5 R e p e a t p a r t s A . 1 { A . 3 f o r a m a n c h e s t e r p u l s e w i t h 1 0 m s e c p u l s e w i d t h

    a n d u n i t p e a k a m p l i t u d e . P r e d i c t t h e m a t c h e d l t e r i m p u l s e r e s p o n s e

  • 8/11/2019 Comm Tbx.manual

    62/114

    5 4 E x p e r i m e n t 4 : D e t e c t i o n E L E 0 4 5

    a n d m a t c h e d l t e r o u t p u t . V e r i f y y o u r p r e d i c t i o n s u s i n g M A T L A B

    f u n c t i o n s .

    A . 6 G e n e r a t e a p o l a r N R Z w a v e f o r m t h a t r e p r e s e n t s t h e 5 - s a m p l e b i n a r y

    s e q u e n c e 1 0 0 1 0 ] . T h e b i n a r y d a t a r a t e R

    b

    i s 1 k b p s a n d t h e p u l s e

    a m p l i t u d e A i s 1 V .

    x 5 = w a v e g e n ( 1 0 0 1 0 ] , ' p o l a r n r z ' , 1 0 0 0 )

    c l f , s u b p l o t ( 2 1 1 ) , w a v e p l o t ( x 5 )

    R e c o r d t h e w a v e f o r m x 5 i n G r a p h 4 . 1 u s i n g t h e a m p l i t u d e s c a l e s h o w n

    o n t h e l e f t .

    -1 0 1 2 3 4 5 6-2

    -1

    0

    1

    2

    Time [xTb sec]

    V o l

    t a g e

    [ V ]

    0

    -0.002

    -0.001

    0.001

    0.002

    G r a p h 4 . 1

    A . 7 A p p l y x 5 t o a m a t c h e d l t e r . R e c o r d t h e m a t c h e d l t e r o u t p u t i n G r a p h

    4 . 1 u s i n g t h e a m p l i t u d e s c a l e s h o w n o n t h e r i g h t .

    s u b p l o t ( 2 1 2 ) , w a v e p l o t ( m a t c h ( ' p o l a r n r z ' , x 5 ) )

    Q 4 . 3 C o n s t r u c t t h e w a v e f o r m a t a m a t c h e d l t e r o u t p u t i f t h e i n -

    p u t i s a u n i p o l a r N R Z w a v e f o r m t h a t r e p r e s e n t s t h e b i n a r y

    s e q u e n c e 1 0 0 1 0 ] .

  • 8/11/2019 Comm Tbx.manual

    63/114

    E L E 0 4 5 E x p e r i m e n t 4 : D e t e c t i o n 5 5

    B . S i g n a l D e t e c t i o n

    B . 1 G e n e r a t e a 1 0 - s a m p l e b i n a r y s e q u e n c e a n d a w a v e f o r m t h a t r e p r e s e n t s

    t h i s b i n a r y s e q u e n c e i n p o l a r N R Z s i g n a l l i n g f o r m a t .

    b 1 0 = b i n a r y ( 1 0 )

    x 1 0 = w a v e g e n ( b 1 0 , ' p o l a r n r z ' , 1 0 0 0 )

    c l f , s u b p l o t ( 2 1 1 ) , w a v e p l o t ( x 1 0 )

    B . 2 A p p l y x 1 0 t o a c h a n n e l w i t h 4 . 9 k H z b a n d w i d t h a n d A W G N w h e r e t h e

    n o i s e p o w e r i s 2 W . D i s p l a y t h e c h a n n e l o u t p u t w a v e f o r m y 1 0 :

    y 1 0 = c h a n n e l ( x 1 0 , 1 , 2 , 4 9 0 0 )

    s u b p l o t ( 2 1 2 ) , w a v e p l o t ( y 1 0 )

    D e c o d e t h e b i n a r y s e q u e n c e f r o m t h e w a v e f o r m y 1 0 :

    d

    b 1 0 =

    B . 3 A p p l y y 1 0 t o a m a t c h e d l t e r . D i s p l a y t h e o u t p u t w a v e f o r m z 1 0 :

    z 1 0 = m a t c h ( ' p o l a r n r z ' , y 1 0 )

    s u b p l o t ( 2 1 2 ) , w a v e p l o t ( z 1 0 )

    L e t T

    b

    b e t h e b i n a r y d a t a p e r i o d . S a m p l e t h e o u t p u t o f t h e m a t c h e d

    l t e r a t k T

    b

    k = 1 : : : 1 0 a n d a p p l y t h e f o l l o w i n g d e c i s i o n r u l e :

    b

    b

    k

    =

    0 i f z 1 0 ( k T

    b

    ) 0

    1 i f z 1 0 ( k T

    b

    ) > 0

    w h e r e

    b

    b

    k

    i s t h e e s t i m a t e d v a l u e o f t h e k t h e l e m e n t o f t h e b i n a r y s e -

    q u e n c e b 1 0 . A p p l y t h i s d e c i s i o