17
Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift 1. Vad blir bithastigheten för följande signaler? En signal där en bit varar i 1 millisekund? 1.1 En signal där en bit varar i 2 microsekunder? 1.2 Solution 1. If a bit occupies 1 millisecond = 10 -3 seconds, then a second is occu- pied by 1 10 -3 = 10 3 bits = 1 kbps. Answer: 1 kbps 1.1 If a bit occupies 2 microseconds = 2 × 10 -6 seconds, then a second is occupied by 1 2×10 -6 =0.5 * 10 6 bits = 500 kbps. Answer: 500 kbps 1.2 Uppgift 2. Hur länge varar en bit i följande signaler? En signal med bithastighet 100 kbps? 2.1 En signal med bithastighet 2 Mbps? 2.2 1

Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Övning 1ETS052 Datorkommuniktion - 2014

Kodning och multiplexering

September 5, 2014

Uppgift 1.Vad blir bithastigheten för följande signaler?

En signal där en bit varar i 1 millisekund?1.1

En signal där en bit varar i 2 microsekunder?1.2

Solution 1.If a bit occupies 1 millisecond = 10−3 seconds, then a second is occu-pied by 1

10−3 = 103 bits = 1 kbps.

Answer: 1 kbps

1.1

If a bit occupies 2 microseconds = 2× 10−6 seconds, then a second isoccupied by 1

2×10−6 = 0.5 ∗ 106 bits = 500 kbps.

Answer: 500 kbps

1.2

Uppgift 2.Hur länge varar en bit i följande signaler?

En signal med bithastighet 100 kbps?2.1

En signal med bithastighet 2 Mbps?2.2

1

Page 2: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Solution 2.If bits are produced/received at a rate of 100 ∗ 103 = 105 per second,then one bit occupies 1

105= 10−5 seconds = 10 microseconds.

Answer: 10 microseconds

2.1

If bits are produced/received at a rate of 2×106 per second, then onebit occupies 1

2×106= 0.5× 10−6 seconds = 0.5 microseconds.

Answer: 0.5 microseconds

2.2

Uppgift 3.Antag att vi ska skicka en bitsekvens som består av 10 nollor. Koda sekvensenmed följande linjekodningstekniker:

NRZ3.1

Manchester3.2

Differential Manchester3.3

Solution 3.

2

Page 3: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

In a NRZ (Non-Return-to-Zero) modulated transmission ones andzeros are a represented by a specific output level, constrained to aspecified duration.

+

-

Vout

0 1

time

As a consequence, unless you know when the transmission started andthe duration a bit occupies, you will be unable to distinguish betweenmultiple consecutive bits of the same sign. In a communication sy-stem, both receiver and transmitter thus need to be synchronized.

Answer:

0 0 0 0 0 0 0 0 0 0

+

-

Vout

time

3.1

3

Page 4: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

In a Manchester modulated signal, each bit i demarked by an outputtransition during the allocated bit duration (symbol) as opposed to aconstant level seen in NRZ modulation. In the figure below a zero isrepresented by a falling edge, while a one is represented by a risingedge.

+

-

Vout

0 1

time

As each bit infers a output level transition, with Manchester coding,each bit can be identified without prior clock synchronization. Nevert-heless, both receiver and transmitter needs to agree on which transi-tion to represent which bit. Moreover, In this case, we are dealing witha sequence of all zeros, the signal is thus modulated with all fallingedges for each bit. Manchester coding has a relative low throughputcompared to more complex modulation schemes and is today mainlyused in systems such as 10BASE-T ethernet (IEEE 802.3) and NFC.

Answer:

0 0 0 0 0 0 0 0 0 0

+

-

Vout

time

3.2

As you will see in Problem 5, Differential Manchester coding dealswith transitions between symbols rather than output levels withina symbol. A sequence with all zeros is represented by the absenceof symbol transitions, and the waveform is therefore identical to theMachester coded one in problem 3b.

Answer:

0 0 0 0 0 0 0 0 0 0

+

-

Vout

time

3.3

4

Page 5: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Uppgift 4.Vågformen i nedanstående bilder är Manchesterkodade binära sekvenser.Avkoda dem!

4.1

4.2

4.3

Solution 4.When applying the Manchester modulation scheme presented in Solution 3.2to the observed sequence, we arrive at the bit sequence presented in Solutions4.1, 4.2, and 4.3.

Following the above convention yields.

0 1 0 0 1 1 0 0 0 1

+

-

Vout

time

Answer: 0100110001

4.1

5

Page 6: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Following the above convention yields.

1 1 0 0 1 1 0 1 1 0

+

-

Vout

time

Answer: 1100110110

4.2

Following the above convention yields.

1 0 0 0 0 1 1 1 0 0

+

-

Vout

time

Answer: 1000011100

4.3

Uppgift 5.Gör om avkodningen i Uppgift 4 om bitsekvenserna istället är kodade medDifferential Manchester!

Solution 5.As opposed to Manchester coding, Differential Manchester coding only re-presents transitions between 0→ 1.

+

-

Vout

time

0 1

time

+

-

Vout

0 1

As such, several transitions represent just as many ones. A single transi-tion followed by a consecutively repeated symbol represents a one followed byzeros, until the next transition. As such, the absence of a transition signifiesa zero.

6

Page 7: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

0 1 0 1 0 0

+

-

Vout

time

Transition Transition

When observing an arbitrary waveform, as we do not know whether it is acontinuation of the previous symbol or a transition, the first bit is inherentlyunknown.

? 0 1 0 0

+

-

Vout

time

Observed waveform

As you can see in the figure above, we do not know if first symbol is zerothat transitions into a one, or the tail of a sequence of transitions representingseveral ones. Differential Manchester is used because a transition is less likelyto be misinterpreted than a individual symbols by the receiver, given a noisychannel. Differential Manchester encoding is predominantly used in magneticand optical storage.

Following the above convention yields.

? 1 1 0 1 0 1 0 0 1

+

-

Vout

time

Answer: 110101001

5.1

7

Page 8: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Following the above convention yields.

0 1 0 1 0 1 1 0 1

+

-

Vout

time

?

Answer: 010101101

5.2

Following the above convention yields.

? 1 0 0 0 1 0 0 1 0

+

-

Vout

time

Answer: 100010010

5.3

Uppgift 6.Antag att vi ska skicka den binära sekvensen 0101110.

Skissa vågformen om Manchesterkodning används.6.1

Skissa vågformen om Differential Manchesterkodning används.6.2

Antag i båda fallen att den första signalen är en övergång från hög nivå tilllåg, oavsett om det är en datasignal eller klocksignal.

Solution 6.Following the convention established in Problem 4.

Answer:

0 1 0 1 1 1 0

+

-

Vout

time

6.1

8

Page 9: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Following the convention established in Problem 5. The first symbolis to illustrate the state of the signal.

Answer:

0 1 0 1 1 1 0

+

-

Vout

time

6.2

Uppgift 7.En fysisk länk har fem förbindelser som multiplexeras med FDM. Varje för-bindelse kräver en kanal med en bandbredd pa 4 000 Hz. Mellan varje kanalmåste 200 Hz finnas för att undvika interferens. Bestäm den minimala band-bredden for länken.

Solution 7.Being it a wireless, an optical, or an electrical link, in FDM (FrequencyDivision Multiple access) the entire or a portion of that mediums frequencyspectrum bandwidth is divided into channels, see the figure below. Moreover,this is one approach for accommodating multiple connections in a commonlink, where the transmitter (Tx) and receiver (Rx) are transmitting and re-ceiving in the same allocated frequency range, channel. In most FDM basedcommunication systems, a frequency guard interval is introduced to separatethe channels, see the figure below. This is to ensure that any leakage fromone channel is not interfering with its adjacent channels. The guard intervaldoes not carry any intentional information. Note that guard intervals areonly needed to separate the channels in the medium, and not the channelsfrom beyond the frequency range of the medium. Unless there is anothercommunication link at a frequency range above or below, in which case, aguard interval is introduced between the links. However, this is not takeninto account when referring the bandwidth of the observed link.

9

Page 10: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Ch

1

Ch

2

Ch

3

Ch

4

Link bandwidth (Hz)

Tx 1

Tx 2 Tx 3

Tx 4Rx 2

Rx 2

Rx 3

Rx 4C

h 1

Ch

2

Ch

3

Ch

4

Link bandwidth (Hz)

Tx 1 Tx 4Rx 2 Rx 3

Tx 2 Tx 3Rx 2 Rx 4

In this instance, it is specified that each channel needs a bandwidth of4000 Hz = 4 KHz with a guard interval of 200 Hz = 0.2 kHz. Since thereare five channels, we need four guard intervals to separate them. Moreover,this leaves us with a total link bandwidth of 5× 4 kHz + 4× 0.2 kHz = 20.8kHz. See the figure below.

Ch 1

Ch 5

...

Lin

k b

an

dw

idth

(H

z)

4 khz

0.2 khz

2.8 kHz

Answer: 20.8 kHz

Uppgift 8.Antag att tre förbindelser frekvensmultiplexeras på en länk som har en totalbandbredd pa 7900 Hz. Vilken blir den maximala bandbredden per förbin-delse, om det mellan varje kanal måste finnas ett outnyttjat frekvensbandpa 200 Hz?

Solution 8.In this example we are allocated a total link bandwidth of 7900 Hz = 7.9kHz. It is specified that the link will carry 3 channels and that the channelsshall be separated by unused frequency space, or guard intervals of 200 Hz= 0.2 kHz each. Since there are three channels, they will be separated by atotal of 2 guard intervals. See the figure below.

10

Page 11: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Ch 1

Ch 3

...

2.5 khz

0.2 khz

7.9 kHz Ch 2L

ink b

an

dw

idth

(H

z)

Subtracting the sum of the two guard intervals of 0.2 kHz each from thetotal allocated link bandwidth leaves us with the remaining bandwidth forthe sum of the three channels, 7.9 kHz - 2×0.2 kHz = 7.5 kHz. Furthermore,as there are three channels, each channel can be allowed a bandwidth of 7.5

3kHz = 2.5 kHz.

Answer: 2.5 kHz

Uppgift 9.Antag att 100 förbindelser ar multiplexerade med STDM och varje förbin-delse skickar 14,4 kbps.

Vilken är den minsta bithastighet som länken måste klara av (ignorerasynkroniseringsbitar)?

9.1

Antag att endast 70 förbindelser skickar data samtidigt. Hur stor an-del av bandbredden är outnyttjad?

9.2

Solution 9.

11

Page 12: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

In a Synchronous TDM (Time Division Multiplexing) system, eachsub-link is assigned a reoccurring time slot at a constant frequencyon the multiplexed link. The capacity of the multiplexed link is sharedproportionally amongst sub-links. For example, as illustrated in thefigure below, if the main link has a capacity of 3 Mbit and is sharedindiscriminately amongst the three sub-links, they will each a accessto a throughput of 1 Mbps.

SD

TM

Link 1

Link 2

Link 3

1 Mbit

3 Mbit

Furthermore, it is specified that each each of the 100 sub-links havea capacity of 14,4 kbps. In order to ensure that the each sub-linkscapacity is atleast maintained, the multiplexed link needs to have mi-nimum capacity of 100× 14.4 kbps = 1.44 Mbps.

Answer: 1.44 Mbps

9.1

In a Synchronous TDM system, unused time slots are left unused if asub-link has nothing to transmit. See the figure below.

SD

TM

Link 1

Link 2

Link 3

As such, if only 70 out of 100 sub-links have information to transmit,then 30 % of the congruent time slots are left unused.

Answer: 30%

9.2

Uppgift 10.Antag att fyra förbindelser multiplexeras med STDM. I varje tidslucka fårdet plats ett ASCII-tecken. Vad kommer att skickas på länken om sändarnavill skicka följande tecken: sändare 1: T E G; sändare 2: A; sändare 3: C D;sändare 4: E F I L?

12

Page 13: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Solution 10.It is given that each character occupies a time frame. Since the links carry dif-ferent quantities of data, there will be vacant time slots. See the figure below.

SD

TM

D

F

A

C

E

Link 2

Link 3

Link 4

E TLink 1

L I

G

Frame 4 Frame 3 Frame 2 Frame 1

TACEEDFGIL

Assuming that the sender on each link starts to send their letters simulta-neously, the first frame will contain the first letter transmitted on each link.The subsequent frame will contain the second letter, if any. Moreover, in thisinstance 6 out of 16 frames will go unused, resulting in a link utilization of1016 = 62.5%.

Answer:

TACEEDFGIL

Uppgift 11.Vad kommer att skickas på länken i Uppgift 10 om statistisk multiplexeringanvänds istället och alla förbindelser har samma prioritet?

Solution 11.In a Statistical TDM system, the multiplex fills each subsequent and squallsized time slot with the next available frame from the buffer. In other words,if a sub-link has nothing to send in this time frame the multiplexer will try tofill that time slot with data from the next sub-link that has data to send inthe multiplexers buffer. Consequently, this ensures that all slots are utilized,given that there is data to send. See the figure below.

13

Page 14: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

SD

TM

D

F

A

C

E

Link 2

Link 3

Link 4

E TLink 1

L I

G

TACEEDFGIL

As such, compared to Synchronous TDM, Statistical TDM will not trans-mit the intermediate vacant time frames.

Answer:

TACEEDFGIL

Uppgift 12.Figuren nedan visar en multiplexor for STDM. Antag att en ram innehåller3 tidsluckor, varje tidslucka rymmer 3 bitar och varje ram börjar med ensynkroniseringsbit (alternerande mellan 0 och 1). Svara på följande frågor:

STDM

300 kbps

300 kbps

300 kbps

Hur blir bitströmmen ut från multiplexorn?12.1

Vad är bithastigheten på den utgående länken?12.2

Hur lång tid varar en bit på den utgående länken?12.3

Hur många ramar skickas per sekund?12.4

Hur lång tid varar varje ram?12.5

14

Page 15: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Solution 12.The described Synchronous TDM system combines three sub-links of 300kbps each. A frame starts with a synchronization bit, followed by three timeslots of 3 bits each, resulting in a frame size of 10 bits. See the figure below.

Sync

Link 1 Link 2 Link 3

The three streams are congruent, as a result there are no vacant timeslots in the resulting Synchronous TDM transmission. When applyingthe frame structure in the figure below to the specified bit streams,assuming that the first sync bit is 0, the resulting first frame will havethe following content:

0 1 0 1 0 0 0 1 1 1

Link 1 Link 2 Link 3

Time

As you can see the time slot is occupied by the first 3 bits from Link1, followed by three consecutive bits each from Link 2 and Link 3respectively. The following frame will start with the sync bit set to 1,prefixed to the following three consecutive bits from each Link.

Answer:01 0 10 0 01 1 111 1 11 0 00 0 101 1 01 1 10 0 011 0 11 1 11 0 1

12.1

It is specified that each sub-link has a capacity of 300 kbps, as suchthe multiplexed link should have a capacity of at least 3×300 kbps =900 kbps. However, the sync bit in each multiplexed frame of 9 databits add one bit of overhead. As a result instead of sending 9 bits weare now sending 10 bits per frame. The link thus needs 10

9 ≈ 11%extra capacity in addition to what is expect of the sub-links to main-tain the oncoming traffic from the sub-links and to accommodate thesync bit. Moreover, applying the additional capacity needed to theminimum multiplex link capacity yields, 10

9 × 900 kbps = 1000 kbps= 1 Mbps.

Answer: 1 Mbps

12.2

15

Page 16: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

In Solution 12.2 we concluded that the multiplexed link needs tohave a minimum bandwidth of 1Mbps. Furthermore, each one of thebits transmitted on the multiplex link would have to occupy at least1

10∗6 = 10−6 seconds = 1 microsecond.

Answer: 1 microsecond

12.3

Using what we deducted in Solution 12.3, if one bit occupies 1 micro-second, then a frame of 10 bits will occupy 10 microseconds. Conse-quently, one second is occupied by 1

10×10−6 = 105 = 100000 frames.

Answer: 100 000

12.4

As deducted in Solution 12.4, if one bit occupies 1 microsecond, thena frame of 10 bits occupy 10 microseconds.

Answer: 10 microseconds

12.5

Uppgift 13.Figuren nedan visar en demultiplexor for STDM. Antag att en ram innehåller3 tidsluckor, varje tidslucka rymmer 4 bitar och att inga synkroniseringsbitaranvänds. Svara på följande frågor:

STDM

9 Mbps

Vad blir bitströmmarna ut från demultiplexorn?13.1

Vad är bithastigheten för varje utgående länk?13.2

16

Page 17: Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och ......Övning 1 ETS052 Datorkommuniktion - 2014 Kodning och multiplexering September 5, 2014 Uppgift1. Vadblirbithastighetenförföljandesignaler

Solution 13.The observed bit stream consists of 24 bits and can thus be brokendown into 2 frames, each consisting of 3 time slots carrying 4 bitseach. See the figure below.

1000000101 1110000011 0001

SD

TM

Link 1

Link 2

Link 3

000110 11

00000101

0000 1110

Frame 1Frame 2

Time

Frame 1Frame 2

As there are no synchronizations bits in the stream, each frame cantrivially be broken down and separated into each sub-links time slotsand then reassembled, as illustrated in the figure above.

Answer:Link 1

Link 2

Link 3

000110 11

00000101

000 11100

13.1

The main line is demultiplexed into three congruent sub streams. Thespecified frame only carries data, we can thus conclude that each re-sulting sub-link is is feed data at a rate of 9

3 = 3 Mbps.

Answer: 3 Mbps

13.2

17