Saturday, 2 November 2019

The Marvels of Multiplexing

Multiplexing actually allows us to do some amazing things. For instance, without it, your mobiles phones wouldn't work, and you wouldn't be able to watch television or listen to the radio. Basically, the concept of multiplexing is being able to send multiple signals across a signal channel, and being able to isolate those signals at the other end. There are three main forms of multiplexing - Frequency Division, Time Division, and Code Division. We will be looking mainly at Frequency Division and Time Division, though we will touch upon the fourth-dimensional wonder that happens to be Code Division (which is what most of our modern mobile phones operate on). To put it simply, for multiple signals to be able to share the same medium, the medium must be somehow divided to enable the signals to share the same resources.

Frequency division multiplexing is where the signal occupies the same frequency all of the time. This is an analog method where the bandwidth of the medium is greater than all of the bandwidths of the signals combined. Time division multiplexing is where the signal occupies all of the bandwidth of the medium for short intervals of time. This is a digital process where the data rate of the transmission medium is greater than the data rate of all of the signals combined. The following diagram below hopeful will give you a better understanding:

Frequency Division Multiplexing

As indicated above, frequency division multiplexing is where multiple users are separated into a number of frequencies, which do not overlap, in order to send them continuously along with the same medium. This is the system that was used for the original analog television and radio broadcasts. Each of the channels is separated by guard bands to prevent interference. This method was also used on the old circuit switching telephone network. The signals are sent into a multiplexor at one end, separated into their various frequencies, and sent along with the medium to where a demultiplexer at the other end will then separate the signals.

Let us take the example of the telephone again. At one end each of the phones generates a signal and the signals are sent to a modulator that modulates them onto a carrier frequency. These frequencies are then multiplexed into a single composite signal and transmitted over the telephone network.

At the other end of the network, the multiplexed signals are passed into the demultiplexer where the signals are filtered into the original channels. The signals are then passed into a demodulator where the original signal is received and passed through to the receiving telephone.

However, this technique involves analog signalling, and this is more susceptible to noise. So, now that we know what it is, let us do some problems that involve multiplexing.

So, we have this medium with a bandwidth of 12 kHz, and we have three voice signals each with a bandwidth of 4 kHz. So, the medium has a bandwidth between 20 - 32 kHz, so what we do is that we shift each of these voice signals into a different bandwidth as such:

Voice 1: 20 - 24 kHz; Voice 2: 25-28 kHz, Voice 3: 29 - 32 kHz.

We then combine these signals and send them over the physical link, as such:

Now, there is going to be the problem of interference, particularly when we have the multiplexed signals so close together. We can solve this through the use of guard bands. Basically, a guard band is a narrow band to each side of the signals that does not carry any of the signals. As such, the signals are less likely to interfere with each other.

So, say we have five channels, each of them carrying a signal of 100 kHz. How wide a bandwidth do we need if we are going to include a 10 kHz guard band? Well, first of all, we do not need a guard band at either end of the signals at the end, only between two signals. So, there are five signals, and as such there will need to be 4 guard bands between these signals. The bandwidth of the five channels is 100 kHz, and with four guard bands that means we need a total bandwidth of 540 kHz.

Time Division Multiplexing

Well, that seemed easy enough, so let's move onto Time Division Multiplexing and play some number games with them.

So, as mentioned, TDM is used widely in digital communications, and it is where the signals occupy all of the bandwidth but only for short segments of time. As such this allows several connections to be able to share the high bandwidth of a link. The time slots are pre-assigned and the sources are fixed, and a slot is allocated even if there is no data to be assigned to that specific slot. While I've already posted a diagram of the various multiplexing methods, another one won't go astray.

Now, along with these frames, a synchronisation bit is also added at the end of each of the frames. This is to enable the receiver to synchronise each of the frames coming in - basically so that it knows where one frame ends and the end frame begins, so that it can make sure that the divided bits are then placed in their proper place. Without this synchronised bit, the result will end up being a jumbled mess.

One thing that should be noted is that TDM tends to use pulse code modulation to modulate the signals onto a carrier signal to then send onto the line. When the signals are modulated, they are then multiplexed and sent onto the mainline.

So, if we have eight channels, and each of these channels produces 250 characters per second, and each of the characters are 8 bits, what is the data rate of each source? Well, 250 characters of 8 bits each are being produced, so that would be 250*8 which will produce 2000 bps (bits per second). We can reduce that to 2 kbps. 

Now, let us calculate the duration of each character. So, if the source is producing 250 characters per second, then the duration of a single character will be 1/250 s, or 0.004s, or 4 ms (1 ms, is 1/1000th of a second).

Now for the frame rate. So, if the frame carries one character from each source, then 250 frames need to be sent per second. The duration of the frame will be the same as the duration of each single character from a source.

So, as mentioned above, the data rate of a link that carries n connections must be n times the data rate of the connection to guarantee the flow of data. For instance, if three 1 kbps are multiplexed together the transmission rate will be three times the rate of the connection, or 3 kbps.

The data rate of the link is n times faster and the duration is n times shorter.

So, we have a multiplexor that combines 5 10 kbps channels using a time slot of 2 bits. Each frame will have 10 bits, namely because there are 5 channels, and 2 bits are taken from each channel, so 5 x 2 = 10 bits.

Now for the frame rate. Each channel is producing 10 kbps, and each frame is taking 2 bits per frame. this means that there will be 10 000 bits being produced per second, dividing that by two gives us 5000, so the frame rate will need to be 5000 frames per second.

The duration of the frame will be 1/5000, that is 0.0002, or 0.2 ms, or 200 μs.

Now, the bit rate of the link. Since there are 5 channels, of which 2 bits are being taken for each frame, so 5 x 2 = 10. Also, 5000 bits are being produced every second, so 10 * 5000 = 50 000 bps, or 50 kbps.

Now for the duration of the bit, which is 1/50000, which produces 0.00002, which brings us to 20 μs.

Finally, let us calculate the number of bits in each frame. So, there are five channels, and each frame takes two bits from each channel, so 2 x 5 = 10. However, if you were to answer 10 you wouldn't quite be correct, namely because we also need to take into account the single synchronisation bit added to each frame. This, each frame actually has 11 bits. Thus, when we are calculating the bit rate, we need to take into account the synchronisation bit. As such, our calculation above is incorrect. It is 10*5000, but 11 * 5000 = 55000, or 55 kbps. A single bit certainly adds up.

Asynchronous TDM

The problem with the above is that there is the potential for waste. Basically, slots are allocated even if there is nothing to put into the slots. So, what asynchronous, or statistical, TDM does is that it allows for us to eliminate this waste. For instance, with Statistical TDM, time slots will be allocated based on demand. So, when data is received the multiplexor scans the channel to see which channel is producing data and if it is producing data, then it will assign the data to any free slots until the frame is full.

Not surprisingly this way is much more complicated, so can break down during peak periods. Also tends to be used only in low bandwidth Local Area Networks.

Another thing to consider is the Digital Subscriber Line or DSL. This is a system where both digital data, and voice, would be multiplexed over the same line. ADSL indicates that this is done in an asynchronous manner. I still remember when DSL was being rolled out. In much the same what that not everywhere is connected to the NBN, back in the late nineties, when we were moving from dial-up to ADSL, not everywhere actually had ADSL active. That seems to be a very distant memory these days.

Code Division Multiplexing

Here we can now use multiple devices on the same frequencies (using the whole bandwidth) at the same time, but the signals are divided using different codes. Basically, when one is speaking on the phone, it is turned into a digital signal, and when a 1 is transmitted, it is done using a code, while a 0 is transmitted using the inverse of that code. The signal at the receiver's end only picks up the ones with the correct code - any other signals are treated as noise and discarded.

Anyway, to finish off, here is a short video, from Youtube, explaining what DSL actually is:

Creative Commons License

The Marvels of Multiplexing by David Sarkies is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. This license only applies to the text and any image that is within the public domain. Any images or videos that are the subject of copyright are not covered by this license. Use of these images are for illustrative purposes only are are not intended to assert ownership. If you wish to use this work commercially please feel free to contact me at david dot sarkies at internode dot on dot net

No comments:

Post a Comment