Switching CNC

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

Switching:

Whenever we have multiple devices to connect with each other, the better solution is switching.
A switched network consists of a series of interlinked nodes called switches.
Switches are hardware/software devices that are capable of creating the temporary
connections between two or more devices link to the switch.

There are three methods for switching.


I) Circuit switching
II) Packet Switching
IiI) Message Switching

I) Circuit Switching:
Circuit switching creates a direct physical connection between two devices such as phones. A
circuit switch is a device with n inputs and m outputs that creates a temporary connection
between an input link and an output link. The number of inputs may have different with the
number of outputs.
Circuit Switching use either of two technologies:
1) Space-Division Switches
2) Time-Division Switches

1) Space-Division Switches:
In space-division switching, the path for each communication in the circuit are separated from
each other. There are many technologies used to design the Space Division Switches.

a) Crossbar Switches:
A crossbar switch connects n inputs to m outputs in a grid using transistor at each cross point.
So for connecting n inputs and m outputs there are n x m cross points required.

This factor makes the cross impractical because readings show that in practice fewer then 25% of
the cross points are in use at a given time. The rest are ideal.

b) Multistage Switches:
The solution to reduce the number of the crossbar switch is to use multistage switches, which
combine crossbar switches in several stages.

The design of multistage switch depends on the number of stages and the number of switches
requires in each stage. Normally middle stages have fewer switches than the fist and last stage.
Let us compare the number of cross points in a 9-by-9 single stage crossbar switch with the 15-
by-15 multistage switch.
In a single stage switch, we need 81 cross points (9 x 9).
In the multistage switch, we need
 Three, first stage switches, each with 6 cross points (3 x 2), total of 18 cross-points at the
first stage.
 Two, second stage switches, each with 9 cross points(3 x 3), total of 18 cross-points at the
first stage.
 Three third stage switches, each with 6 cross points (3 x 2), total of 18 cross-points at the
first stage.

So in multistage switching we need only 54 total crosspoints which is 34% less then single stage
switching.
2) Time-Division Switches:
Time-division switching uses time-division multiplexing to achieve switching. There are two
popular methods used in time-division multiplexing:
a) Time-slot Interchange
b) TDM Bus

a) Time-Slot Interchange (TSI):


In TSI, we insert a device called Time-slot interchange (TSI). A TSI changes the ordering of
the slots based on the desired connections. In the figure, it changes the order of data from A, B,
C, D to C, D, A, B. Now at the receiver end demultiplexer separates the slots, it passes them to
the proper output.

TSI consists of RAM (random access memory) with several memory locations. The size of each
location is the same as the size of a single time slot. The RAM fills up with incoming data from
time slots in the order received. Slots are then sent out in an order based on the decisions of
control unit.

b) TDM Bus:
In TDM Bus, the input and output lines are connected to a high speed bus through input and out
put gates. During the data transfer one input gate is closed for a time slots, during the same time
slot, only one output gate is also closed. This pair of gates allows transferring of data from one
specific input line to one specific output line using bus. The control unit opens and closes the
gate accordingly to switching need. For example: in the figure, at the first time slots the input
gate 1 and output gate 3 will be closed; during the second time slot, input gate 2 and output gate
4 will be closed; and so on.

II) Packet Switching:


In a packet switched network, data are transmitted in discrete units of variable length blocks
called packets. Longer transmissions are broken up in to multiple packets. Each packet contains
not only data but also a header with control information (such as priority codes, source and
destination address). The packets are sent over the network node to node. At each node, the
packet is stored then routed according to the information in its header. There are two popular
approaches for packet switching
1) Datagram Approach
2) Virtual Circuit Approach

1) Datagram Approach:
In datagram approach, each packet is treated independently from all others. Packets in this
technology are referred to as datagram. In this approach the datagram reach to their destination
out of order. It is the responsibility of the transport layer to reorder the datagram before passing
them to destination port.

Virtual

2) Virtual Circuit Approach:


In virtual circuit approach, the relationship between all packets belonging to a message or
session is preserved. A single route is chosen between sender and receiver at the beginning of the
session. When data are sent, all packets of the transmission travel one after another along that
route only.

III) Message Switching:


In message switching, a node receive a message, store it until the appropriate route is free and
then send forward.
Note that in message switching, the message are stored and relayed from secondary storage
(disk), while in packet switching the packet are stored and forwarded from primary storage
(RAM).
Multiplexing:
Whenever the bandwidth of the medium linking two devices is greater than the band width needs
of the devices, the link can be shared.
Multiplexing is the set of techniques that allows the simultaneous transmission of multiple
signals across a single link.
In multiplexed system, 1 line share the bandwidth of n link

The four line on the left direct their transmission streams to a multiplexer (MUX), which
combines them in to single stream (many to one). At the receiving end that stream is fed in to a
demultiplexer (DEMUX), which separates the stream back in to its component transmission (one
to many), and direct them in to their corresponding lines.
In figure, the word link refers to the physical path and channel refers to the portion of a link that
carries a transmission between a given pair of line.
There are three techniques for multiplexed the signals
1) Frequency division multiplexing
2) Wave division multiplexing
3) Time division multiplexing
The first two techniques are used for analog signals and third one use for digital signals.

1) Frequency division multiplexing:


In FDM, signals generated by each sending device, modulate at different carrier frequencies.
These modulate signals are then combined in to a single composite signal that can be transported
by the link. Carrier frequency are sufficient to accommodate the modulated signal. Channel must
be separated by unused bandwidth to prevent signal form overlapping.

Multiplexing Process:
FDM is an analog process, here we use telephone as an input device. Each telephone generates a
signal of similar frequency range. In side the multiplexer, these similar signals are modulated on
to different carrier frequencies (f1, f2, f3). The resulting modulated signals are then combined in
to a single composite signal that is sent out over a media link that has enough bandwidth to
accommodate it.
Demultiplexing Process:
The demultiplexer uses a series of filters to decompose the multiplexed signals in to its
component signals. The individual signals are then passed to a demodulator that separates them
from their carriers and passes them to the waiting receiver.

2) Wave division multiplexing:


WDM is designed to use the high data rate capability of fiber optic cable. The optical fiber data
rate is higher than the data rate of metallic transmission cable.
WDM use the same concept as the FDM except that the multiplexing and demultiplexing involve
optical signals transmitted through fiber optic channels.
Combining and splitting of light source are easily handled by prism. Using this technique, a
multiplexer can be made to combine several input beams of light, each containing a narrow band
of frequencies in to one output beam of a wider band of frequency. A demultiplexer can also be
made to reverse the process.
3) Time Division Multiplexing:
Time Division multiplexing (TDM) is a digital process. Instead of sharing a portion of
bandwidth as in FDM, time is shared. Each connection occupies a portion of time in the link

TDM can be implemented in two ways.


a) Synchronous TDM
b) Asynchronous TDM

a) Synchronous TDM:
In synchronous TDM the multiplexer allocates exactly the same time slots to each device at all
times, whether or not a device has anything to transmit. So if there are n device then the number
of time slots are also n. For Example, time slot A is assigned to device A alone and no one can
use it. Each time its allocated times comes up, a device has the opportunity to send a portion of
its data. If a device is unable to transmit or does not have data to send, its time slot remains
empty.
Interleaving:
Synchronous TDM can be understand as two fast rotating switches, one on the multiplexing
side and the other on the demultiplexing side. The switch is synchronized and rotate at same
speed. But in opposite direction. On the multiplexing side as the switch opens in front of a
connection, that connection has the opportunity to send a unit on the path. This process is called
interleaving, on the demultiplexing side, as the switch opens in front of a connection, that
connection has the opportunity to receive a unit from that path.
Synchronization:
For synchronization bits are usually added to beginning of each frame. These bits called framing
bits follow a pattern frame to frame. So that the demultiplexer can be synchronized with
incoming bit pattern. in most cases, this synchronization information consists of 1 bit per frame,
alternating 0 and 1.

b) Asynchronous TDM:
Synchronous TDM does not guarantee that the full capacity of the link is used. Because
whenever the connecting device has nothing to transmit, the corresponding time slot is empty
and that much of the path is wasted. Asynchronous TDM is designed to avoid this type of
wastage. In asynchronous TDM if we have n input lines then the frame contain no more than m
slots where m < n.

Addressing and overhead:


In asynchronous TDM bit in the time slot may be at first from device 1, and in next time slot
may be at third. So for the synchronization in Asynchronous TDM, each time slot carry an
address telling the demultiplexer how to direct the data. This address is only for local use only. it
is attached by multiplexer and discards by the demultiplexer once it has been read. So adding the
address bit to each time slot increase the overhead of an asynchronous system and some what
limits the potential efficiency.
Signals:
When data moves from one node to another, data must be transformed in to electromagnetic signals.
Both data and the signals that represent them can take either analog or digital form. So signals can be of
two types.
1. Analog signal 2. Digital signal

Analog :
Analog refers to something that is continuous- a set of specific points of data and all possible points
between.
Analog signal:
An analog signal is a continuous wave form that changes smoothly over time. An analog signal can have
any value between starting and end range. So analog signal includes infinite number of value along its
path.

Analog signals can be classified as simple or composite. A simple analog signal or a sine wave, can not
be decomposed in to simpler signals. A composite analog signal is composed of multiple sine waves.

Simple analog signal:


The sine wave is the most fundamental form of a periodic analog signal. It is as simple oscillating curve,
its change over the course of a cycle is smooth and consistent, a continuous rolling flow.
The sine wave can be fully described by three characteristics: amplitude, period or frequency and phase.
i) Amplitude:
On a graph, the amplitude of a signal is the value of the signal at any point on the wave. It is equal to the
vertical distance from a given point on the wave form to the horizontal axis. The maximum amplitude of a
sine wave is equal to the highest value it reaches on the vertical axis.
ii) Period or Frequency:
Period refers to the amount of time, in seconds, a signal needs to complete one cycle. Frequency refers
to the number of periods in one second. So the frequency of a signal is its number of cycles per second.

iii) Phase:
The term phase describes the position of the wave form relative to time zero. Phase indicate the status of
the first cycle. Phase is measured in degree or radians (360 degrees is 2π radians).
Encoding and modulating
We must transform the data into signals to send them from one place to another. How the
information is transformed depends on its original format and on the format used by the
communication hardware.
Data Encoding
Encoding is the process of converting data from one form to another.

Digital data to digital signal Digital data to digital signal encoding may be used as the
equipment for encoding digital data into a digital signal. Eg: computer communication using
digital line (eg. ISDN)
Digital data to analog signal may be used as some transmission media, such as optical fibre and
unguided media, will only propagate analog signals Eg: computer communication using voice
(telephone) line.
Analog data to analog signal Analog data and analog signal combination will be used as analog
data in electrical form can be transmitted as baseband signals easily and cheaply. Eg: home
telephone systems.
Analog data to digital signal Analog data to digital signal conversion permits the use of modern
digital transmission and switching equipment. Eg: digital mobile communication systems.

1. Digital to digital encoding


Digital to digital encoding or conversion is the representation of digital information by a digital
signal. In this type of encoding the binary 1 and 0 are translated into a sequence of voltage pulses
that can be transmitted over wire.

Types of Digital to Digital Encoding

1.1 Unipolar :-
It uses only one level of value and polarity . Digital transmission system works by sending
voltage pulses along a medium link usually cable or wire. The polarity of a pulse refers to
whether it is positive or negative.

In this example the 1’s are encoded as a positive value and the 0’s are encoded as the negative
value.

Advantages :-
• Very simple.
Disadvantages :-
• DC component.
• Synchronization.

DC component :- When the voltage level in a digital signal is constant for a while, the
spectrum creates very low frequencies, called DC components, that present problems for a
system that cannot pass low frequencies." Dc is extra energy residing on the line and is
useless.
Note

Synchronization :- when a signal is unvarying, the receiver cannot determine the beginning and
ending of each bit. Therefore, a synchronization problem in unipolar can occur when ever the
data stream includes a long uninterrupted series of 1’s or 0’s. Thereceiver receives a continuous
voltage and receiver determines how many bits are sent by relaying on its clock (bitrelaying bit--
duration), which may not be synchronized with the sender clock.
To correctly interpret the signals received , the receiver’s bit intervals must correspond
exactly to the sender’s bit intervals (the same clock rate).

1.2 Polar :- It uses two levels of amplitude. One is positive and another is negative, so
the DC component problem of unipolar encoding is eliminated.

Types of Polar Encoding

In this encoding technique, the level of the signal is always either positive and negative.
It has two types: NRZ-Level, NRZ-Invert.

Non return to zero(NRZ)


NRZ –L :- In NRZ-L the level of the signal is dependent upon the state of the bit. A positive
voltage usually means the bit is a zero, and a negative voltage means the bit is one or (vice-
versa).
Advantages-Eliminate DC component.
Disadvantages-Lack of synchronization.

Non return to zero(NRZ)


NRZ-I :- In this the signal is inverted if a one is encountered and zero bit is represented by no
change.
Advantages- Synchronization provided by the signal change.
Disadvantages- String of zeros can still cause problems.
Return to zero (RZ) :- RZ uses three values: positive, negative and zero.In this, the signal
changes not between bits but during each bit. A positive voltage means one and negative voltage
means zero and halfway through each bit interval, the signal returns to zero.
one bit is represented by positive-to-zero and a zero bit by negative-to-zero, rather than by
positive and negative alone.

Advantages :-
• Better synchronization.
Disadvantage :-
• It requires two signal changes to encode one bit and therefore occupies more bandwidth.

Biphase
In this method, the signal changes at the middle of the bit interval but does not return to zero.
It can be implemented in two ways:-
 Manchester
 Differential Manchester.
Manchester encoding:- It uses the inversion at the middle of each bit interval for both
synchronization and bit representation. A negative to positive translation represent binary
one and a positive to negative translation represent binary zero. By using the single
translation for a dual purpose, manchester encoding achieves the same level of
synchronization as RZ but with only two levels of amplitude.
Differential Manchester:-In this, the transition at the middle of the bit is used only for
synchronization. The bit representation is shown by the inversion or non inversion at the
beginning of the bit. A transition means binary 0 and no transition means binary 1. It
requires two signal changes to represent binary 0 but only one to represent binary 1.
1.3 Bipolar encoding :-
It uses three levels of voltage or amplitude: positive, negative and zero. The zero level is used to
represent binary zero. The 1’s are represented by alternative positive and negative voltages.
If the first one bit is represented by the positive amplitude, second will be represented by
negative amplitude, third by the positive amplitude, and so on.

Alternate mark inversion :-


Mark means one, so AMI means alternate one inversion. zero voltage represent binary zero
and1’s are represented by alternating positive and negative voltages.
AMI accomplishes two things:
1. DC component is zero.
2. Long sequence of 1s stays syncronization but there is no mechanism to ensure the synchronization
of a long string of 0s.
Bipolar 8 zero substitution:-
In this if 8 zeros come one after another, we change the pattern in one of two ways based on the polarity
of the previous. The difference between B8ZS and AMI occurs whenever eight or more consecutive 0s
are encountered in the data stream. Solution provided by B8ZS is to force artificial signal changes, called
violations, within the zero string.

If the previous 1 bit was positive, the eight 0s will be encoded as zero, zero, zero, positive, negative, zero,
negative, positive.
When receiver finds two consecutive positive changes surrounding three 0s, it recognizes the pattern as
deliberately introduced violation and not an error. It then looks for the 2nd pair of the expected violations.
When it finds them, the receiver translates all eight bits to 0s and reverts back to normal bipolar AMI
mode. If the polarity of the previous 1 bit is negative, then pattern of violation will be same but with
inverted polarities.

High density bipolar-3 :-


In this if four zeros come one after another, we change the pattern based on the polarity of the previous 1
and the number of 1s since the last substitution.
When the no. of 1s since the last substitution is odd, HDB3 Puts a violation in the places of 4th
consecutive zeros.
if the polarity of the previous bit was positive, then the violation is positive.
if the polarity of the previous bit was negative, then the violation is negative.
When the no. of 1s since the last substitution is even, HDB3 Puts violations in the places of both the first
and the fourth consecutive zeros.
if the polarity of the previous bit was positive, both violations are negative.
if the polarity of the previous bit was negative, both violations are positive.
This was introduced by Europe and Japan and earlier was in US.
2. Analog to Digital Encoding
The idea of digitizing analog signal started with telephone system, to provide long distance services. They
digitized the analog signals at the sender. The digital signal thus consists of blocks of n bits. On reception
the signal is converted back to analog at the receiver end.

The problem here is how to translate information from an infinite no of values to a discrete no of values
without sacrificing sense or quality.

2.1 PAM ( Pulse Amplitude Modulation)


This is the first step as this technique takes an analog signal, samples it and generates a series of pulses
based on the result of the sampling. The term sampling means measuring the amplitude of the signal at
equal intervals. In PAM the original signal is sampled at equal intervals.

The reason PAM is not useful to data communication is that it translates original wave form to a
series of pulses, which are of any amplitude.
2.1 PCM ( Pulse Code Modulation)
PCM modifies the pulses created by PAM to create a completely digital signal. So the first step
is PCM quantizes the PAM pulses. Quantization is a method of assigning integral(magnitude)
values in a specific ranges to sampled instances. Each value is translated into its seven-bit binary
equivalent. The eight bit indicate the sign.

The binary digits are then transformed to a digital signal using one of the line encoding.
3 Digital data to analog signals
A modem (modulator-demodulator) converts digital data to analog signal. There are 3 ways to
modulate a digital signal on an analog carrier signal.

1. Amplitude shift keying (ASK): is a form of modulation which represents digital data as
variations in the amplitude of a carrier wave. Two different amplitudes of carrier
frequency represent '0' , '1'.
2. Frequency shift keying (FSK): In Frequency Shift Keying, the change in frequency define
different digits. Two different frequencies near carrier frequency represent '0' ,''1'.
3. Phase shift keying (PSK): The phase of the carrier is discretely varied in relation either to
a reference phase or to the phase of the immediately preceding signal element, in
accordance with data being transmitted. Phase of carrier signal is shifted to represent '0'
, '1'.
0 1 0 0 1 0 1 1 0 0

AM

0 1 0 0 1 0 1 1 0 0

PM

0 1 0 0 1 0 1 1 0 0

FM

Analog to analog signals


It is the representation of analog information by an analog signal. Modulation has been defined as
the process of combining an input signal m(t) and a carrier at frequency fc= to produce a signal
whose bandwidth is usually centred on fc.Analog to analog modulation can be done in three
ways:
4.1 Amplitude modulation (AM)
In AM transmission, the carrier signal is modulated so that its amplitude varies with the changing
amplitudes (voltage level) of the modulating signal. The frequency and phase of the carrier
remain the same; only the amplitude changes to follow variations in the information.
4.2 Frequency modulation (FM)
In FM transmission, the carrier signal is modulated so that its frequency varies with the changing
amplitudes (voltage level) of the modulating signal. The peak amplitude and phase of the carrier
remain the same; only the frequency changes to follow variations in the information.
4.3 Phase modulation (PM)
Due to simpler hardware requirements, PM is used in some systems as an alternative to FM. In
PM transmission, the carrier signal is modulated so that its phase varies with the changing
amplitudes (voltage level) of the modulating signal. The peak amplitude and frequency of the
carrier remain the same; only the phase changes to follow variations in the information. The
analysis and the final result are similar to FM.
Switching:
Whenever we have multiple devices to connect with each other, the better solution is switching.
A switched network consists of a series of interlinked nodes called switches.
Switches are hardware/software devices that are capable of creating the temporary
connections between two or more devices link to the switch.

There are three methods for switching.


I) Circuit switching
II) Packet Switching
IiI) Message Switching

I) Circuit Switching:
Circuit switching creates a direct physical connection between two devices such as phones. A
circuit switch is a device with n inputs and m outputs that creates a temporary connection
between an input link and an output link. The number of inputs may have different with the
number of outputs.
Circuit Switching use either of two technologies:
1) Space-Division Switches
2) Time-Division Switches

1) Space-Division Switches:
In space-division switching, the path for each communication in the circuit are separated from
each other. There are many technologies used to design the Space Division Switches.

a) Crossbar Switches:
A crossbar switch connects n inputs to m outputs in a grid using transistor at each cross point.
So for connecting n inputs and m outputs there are n x m cross points required.

This factor makes the cross impractical because readings show that in practice fewer then 25% of
the cross points are in use at a given time. The rest are ideal.

b) Multistage Switches:
The solution to reduce the number of the crossbar switch is to use multistage switches, which
combine crossbar switches in several stages.

The design of multistage switch depends on the number of stages and the number of switches
requires in each stage. Normally middle stages have fewer switches than the fist and last stage.
Let us compare the number of cross points in a 9-by-9 single stage crossbar switch with the 15-
by-15 multistage switch.
In a single stage switch, we need 81 cross points (9 x 9).
In the multistage switch, we need
 Three, first stage switches, each with 6 cross points (3 x 2), total of 18 cross-points at the
first stage.
 Two, second stage switches, each with 9 cross points(3 x 3), total of 18 cross-points at the
first stage.
 Three third stage switches, each with 6 cross points (3 x 2), total of 18 cross-points at the
first stage.

So in multistage switching we need only 54 total crosspoints which is 34% less then single stage
switching.
2) Time-Division Switches:
Time-division switching uses time-division multiplexing to achieve switching. There are two
popular methods used in time-division multiplexing:
a) Time-slot Interchange
b) TDM Bus

a) Time-Slot Interchange (TSI):


In TSI, we insert a device called Time-slot interchange (TSI). A TSI changes the ordering of
the slots based on the desired connections. In the figure, it changes the order of data from A, B,
C, D to C, D, A, B. Now at the receiver end demultiplexer separates the slots, it passes them to
the proper output.

TSI consists of RAM (random access memory) with several memory locations. The size of each
location is the same as the size of a single time slot. The RAM fills up with incoming data from
time slots in the order received. Slots are then sent out in an order based on the decisions of
control unit.

b) TDM Bus:
In TDM Bus, the input and output lines are connected to a high speed bus through input and out
put gates. During the data transfer one input gate is closed for a time slots, during the same time
slot, only one output gate is also closed. This pair of gates allows transferring of data from one
specific input line to one specific output line using bus. The control unit opens and closes the
gate accordingly to switching need. For example: in the figure, at the first time slots the input
gate 1 and output gate 3 will be closed; during the second time slot, input gate 2 and output gate
4 will be closed; and so on.

II) Packet Switching:


In a packet switched network, data are transmitted in discrete units of variable length blocks
called packets. Longer transmissions are broken up in to multiple packets. Each packet contains
not only data but also a header with control information (such as priority codes, source and
destination address). The packets are sent over the network node to node. At each node, the
packet is stored then routed according to the information in its header. There are two popular
approaches for packet switching
1) Datagram Approach
2) Virtual Circuit Approach

1) Datagram Approach:
In datagram approach, each packet is treated independently from all others. Packets in this
technology are referred to as datagram. In this approach the datagram reach to their destination
out of order. It is the responsibility of the transport layer to reorder the datagram before passing
them to destination port.

Virtual

2) Virtual Circuit Approach:


In virtual circuit approach, the relationship between all packets belonging to a message or
session is preserved. A single route is chosen between sender and receiver at the beginning of the
session. When data are sent, all packets of the transmission travel one after another along that
route only.

III) Message Switching:


In message switching, a node receive a message, store it until the appropriate route is free and
then send forward.
Note that in message switching, the message are stored and relayed from secondary storage
(disk), while in packet switching the packet are stored and forwarded from primary storage
(RAM).

You might also like