Sie sind auf Seite 1von 4

AIM: To write a matlab program to perform time division multiplexing and demultiplexing of a

message signal.
Theary: TOM or Time Division Mul_
tiplexing is a type of multiplexing used to send multiple
signals over the same shared medium, by assigning each signal a limited time interval to be
sent over the shared medium, then switch to other signal sources, so that each signal is source
takes the medium for a certain interval of time.

pg
Data Flow
) D
M E
u M
X u
X

lime Division Multiplexing

Program:

clc;
c-lose all ;
c lear all ;
1 Signa l generat ion t siganal caken upcc 4p ~
. . . .
x=O :. 5 :-4*pi; t- •'J ene r at. e l s :. s .:. :--. -.:s o .:.. cta _
s igl=8*sin(x);
l =length(sigl); Gere !.- ate 2n d t.. r ai:1 gc.l.s.r Si. g a l
sig2=8*triang(l);
Displa y o f Both Si gn al
subpl ot(2,2,l);
pl ot( sigl);
title( ' S i nu so i dal Sign& l ');
ylabe l ( ' J..mpl i tu -ie- -- > ' );
xlabel(' Ti me -- - > ');
subp l ot (2 ,2,2);
plot (s ig2) ;
title ( ' Tr iangular Si g nal ' );
yla be l ( ' Amp li tude-- - > ' ) ;
xlabel( ' Time--- > ' ) ;
9,; Display o f s ,:;t h Sa mpl ed Si qna l

_s ubpl'ot (2, 2 , 3);


stem (~igl);
title( ' Sampled Sinuso idal Signa l ');
ylabel ( ' Amplitude- -- > ' );
xlabel (' Time -- - > ' ) ;
s ubp l o t(2,2,4);
stem(sig 2 );
ti t l e(' Samp1ed Tr c_; ngu l ar S1 q na l' );
ylabel (' Ampl itu de - - - > ' ) ;
xl abel( ' Time --- > ' );
ll=lengt h (sigl);
12=lengt h (sig2) ;
•t.~ for is l 11
sig(l , ) •sig l (i ) ;
sig( 2 , )=sig2(i) ;
I e'."ld
' r '
,
J tdmsi g•reshape(s1g , 1 , 2 " l l l;
I '
figure
stem(tdmsi g l ;

,
title ( ' I·' • i· , I;
yla~l ( ' l ., -- , . I ;
x labell " -, ,I;
.f .,. ~, l

demux•reshape(tdmsig,2,ll l :
f c i i • l: 11 ' ! '-/"'1 rt I l :j .,..}'-, '"' l "' ,( .. • • () r i'J
si g3(i !•demuxO , !) :
*
•,
s1g 4 (1l • demux\ Z, 1I ;
,-J

• 1
fig ure
't subplot(2 , l , ll
plot (s ig31 ;
,
,
' );
9 t I tle I '
;
ylabel ( '
) ;
xlabel ( '
subpl ot (2 , l , 2)

...
plot 1sig 4 l ;
title\' , .. .,, ,~'J
ylabel(' 1.i· (It' - , ') ;
xlabel\ "." --- ') :
trangular Signal
Slnosoldal Signal
10 ~ -~ - -~ - ~ s ~ -- ~ - --=.--- -~

1 5
') 6

II 4
I o a.
a. E
E <( 2
<( -5

-10 l - -- ~ - - --___J
0 ' - -- ~------'
30 10 20 30
0 10 20 0
time---------->

....- ~
Sinosoldal Signal
10 ~ - ~ -- ~--
I
1
1,
J-~
l
!
a.
E
<(
5

0 JAU-.1...Lil~~LI..LLL...--.-~

-5
" -', --l

i -~
·-~
10 20 30
time-- --------> time--- ->
fh,.- ~
I

Qr rt -
Tdm Sig11al
8
~ a -,
; :,
G)
.,_I -,
~-,
6
(;)

4 l}
Q
(;} '" r
I I 71
2
1I
~·-,
J. ! 0
6.
E
<l: -2
~\
~I-'
I -4

-6 ')

\_,, u
A'J
-8 40 50 60
0 10 20 30
ti me----------->

"I •
f 1...
,. ·~
I

"',;
10 ,--:=7_______.'R~e:_;:c~ov~e:.!.r~ed~S~in~o~so~i~da!!!.l~S~lg~n~a_!__I
.. ----,----

1. 5
:
! 0
a.
-5

25 30
time--------->
a 1--------.--_____.'..R~e;:c~ov~e~re;d~T~r~la~n!!'gu~l!!ar~S~i~gn~a!!_I_ _-------,----~

6
l
i4
a.E
<( 2

0o:;---- - ~5---~----L-----
10 15
---'-
20
-----2~--
25
30
time-------->

Das könnte Ihnen auch gefallen