Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Baseline Wander Simulation

Dear Paul,

> I'd like to use your baseline wonder simulation system to make a study
> for the SONET polynomial.  Can you give me the simular and data files? 
> What type of system does it take to run them?  How do you generate the
> 1 Tbit of data? 

The simulation is fairly simple.  It is an awk script that calls the
UNIX random number generator repeatedly and does a finite-timestep
simulation of an RC filter.  To minimize the file size, the value of the
capacitor voltage is sampled every K times and output to stdout.  A
secondary histogram program analyzes at the output stream, computes the
mean, sigma and plots the result. 

Because the scrambler is so large, the source of random numbers is not
relevant.  If the scrambled bits are sufficiently uncorrelated then any
good random number generator will do.  This follows from the known
pseudo-random properties of PRBS sequences and the vanishingly low
probability of any malicious user guessing the scrambler state and
thereby creating a correlated input sequence. 

To save the trouble of simulating every case, we have done an exact
analysis of BLW for random data streams.  If you use the x^43+1
scrambler in SONET, then it should satisfy the random-bit condition.  I
expect no difference in practice between BLW of SONET with (x^43+1) and
64/66 BLW. 

For an RC time constant (tau), a bit time (tbit), and a pk/pk eye opening
(Vpp), and with the condition that (tbit << tau) then the sigma of the BLW 
is very well approximated by:

    sigma(offset) = Vpp * sqrt(tbit/(8*tau))

Attached is an awk script for simulating BLW.  There were two mistakes
in my Dallas presentation.  1) the capacitor was 0.01uF not 0.001uf (I
mentioned this at the meeting), and 2) the RC time constant of the
presented simulation was 200*0.01uf instead of 100*0.01uf (50 Ohm double

With these corrections, I find agreement between simulation and theory
within the expected accuracy of a monte-carlo simulation.

Best regards,
Rick Walker 

--------------------- cut here ------------------------------

# an awk script to computer wander vs coupling capacitor size
# Rick Walker, rick_walker@xxxxxxxxxxx 
# 1/1/2000
# computes the voltage drop across a coupling cap "C" in a 
# 50 Ohm double terminated system:
#                      Vout
#   Vbit -[R=50]---|C|----[R=50]--- Gnd
#    1)  I(t) = (Vb(t) - Vcap(t))/2R
#    2)  Vc(t+delta) = I(t)*delta/C + Vc(t)
#    substituting and solving for Vc(t+delta):
#         Vc(t+delta) = [ del*(Vb(t) - Vc(t)) + 2*R*C*Vc(t) ]  / 2*R*C

awk '
    BEGIN {

	# user-defined simulation parameters:

	NBITS=10000000    	# number of random bits to simulate
	vcap=0;	        	# coupling capacitor voltage
	del=1/(10.3125e9)	# bit time
	R=50			# system impedance (doubly terminated)
	C=0.01e-6		# coupling cap value

	print "title Histogram of eye wander for " NBITS "bits of data"
	print "title 10Gb/s data and single " C "coupling capacitor"
	print "xscale 1 threshold wander [fraction of eye opening]"
	print "yscale 1 histogram count [arbitrary units]"
	for(i=1; i<=NBITS; i++) {

	    # use rand to simulate statistically random bits
	    # with master transition every 66 bits

	    mod = i%66

	    if (mod <= 1) {
		bit = mod-0.5
	    } else {
		bit = int(rand+0.5)-0.5

	    integral += bit
	    vcap += del*(bit - vcap)/(2*R*C)

	    if (i%10000 == 0) {
		print vcap
#| histogram -ga
--------------------- cut here ------------------------------