EE535 - PROJECT 2
Ethernet Collision Simulation Applet




4. Collision Detection Simulation

The following Java applet performs a simulation of the shape of one or two trains of five manchester pulses that are transmitted from both ends of a transmission line. A receiver in the middle point of the line will observe the line, and upon reception of some signal, will make a decision on whether a collision occurred on the line or not.

The applet takes as input parameters the length of the line in meters, the attenuation in dB/meter and the voltage threshold for detection of the collision. If the user presses the button to transmit two pulses, the two of them will cross each other at the center of the transmission line and their amplitudes will add up.

Collision Detection Algorithm

Whether a collision occurred or not is decided by computing a local average of the voltage level on the line in the vicinity of the computer station that is checking for collisions. The applet simulates this averaging method by computing the arithmetic average of all the pulses that cross the middle point of the transmission line. In the case of a collision, the pulses of the two trains of manchester codes will add up to some unusual voltage value that will get averaged.

This average is then compared against the threshold entered by the user to determine if a collision occurred or not.

5. The Applet

This java applet simulates two transmitters at the end points of a transmission line, sending both a train of five Manchester encoded "1" bits (please refer to the virtual text book chapter on Manchester encoding). The line is terminated at both ends with its charateristic impedance, equal to 50 Ohms.

At the top part of the applet window there is a user interface to allow the user to specify the values of the line length in meters, the threshold in volts, and the attenuation in dB/m.

Two different scenarios can be simulated with this applet:

  1. One transmitter.
  2. Two transmitters.

In the first case, the applet displays the train of pulses traveling down the transmission line, and showing the effect of the line attenuation. The second case presents two such waveforms, starting at oposite ends of the transmission line. The two trains of pulses cross each other at the center point of the line, and their voltages get added.

In both cases, the applet computes the local average of the five pulses measured at the center point. This average is compared to the threshold entered by the user (displayed as a horizontal white line in the applet). When the average of the pulses is below the threshold, the applet reports that no collision was detected. If the average is higher than the threshold, then it reports a collision.



Fri Feb 21 14:59:25 EST 1997

Back to the Ethernet Collision Simulation Applet
Project Homepage. HW2 - Spring 97.

Back to the WPI EE535
Telecommunications and Transmission Technologies
Course Homepage