LTspice - fast NRZ pulses how?

Guest
Does anyone know a trick to make fast random NRZ pulses in LTspice?

I don't want to use the read-from-file option, but would like to
generate them procedurally.

This is for speed and convenience.

The pulses should be rectangular, be 1s (or whatever 1/datarate is)
and be either +1 or -1, with a random probability distribution.
 
You could probably use two independent sources to make a
multiplicative congruental generator.

Something like Va = fraction ( pi * Vb ) and Vb = Va.

You'll have to set up Va to be nonzero when the simulation starts, and
I'm not sure how you would put in a proper time delay between the two
sources.

Then you have a pseudorandom number, to make data, you'll probably
have to sgn() it etc. Probably need a sample & hold to to hold it
still for one bit period.

On Aug 28, 7:55 pm, wavema...@sogetthis.com wrote:
Does anyone know a trick to make fast random NRZ pulses in LTspice?

I don't want to use the read-from-file option, but would like to
generate them procedurally.

This is for speed and convenience.

The pulses should be rectangular, be 1s (or whatever 1/datarate is)
and be either +1 or -1, with a random probability distribution.
 
Thanks! I tried this:

* C:\Program Files\LTC\SwCADIII\nrz_sim\random_nrz_bits.asc
B1 a 0 V = if ( rand( time ) , 1, -1 )
..tran 1000
..backanno
..end

and it seems to work! It's fast too - around 4000 seconds per
second.

How about some other tricks to accomplish the same?



On Aug 29, 1:43 am, batguy <bat...@chemicalanalysis.com> wrote:
You could probably use two independent sources to make a
multiplicative congruental generator.

Something like Va = fraction ( pi * Vb ) and Vb = Va.

You'll have to set up Va to be nonzero when the simulation starts, and
I'm not sure how you would put in a proper time delay between the two
sources.

Then you have a pseudorandom number, to make data, you'll probably
have to sgn() it etc. Probably need a sample & hold to to hold it
still for one bit period.

On Aug 28, 7:55 pm, wavema...@sogetthis.com wrote:

Does anyone know a trick to make fast random NRZ pulses in LTspice?

I don't want to use the read-from-file option, but would like to
generate them procedurally.

This is for speed and convenience.

The pulses should be rectangular, be 1s (or whatever 1/datarate is)
and be either +1 or -1, with a random probability distribution.
 
<wavemaker@sogetthis.com> schrieb im Newsbeitrag
news:791187a7-7416-472a-9f81-4724c2d8e06f@k37g2000hsf.googlegroups.com...
Does anyone know a trick to make fast random NRZ pulses in LTspice?

I don't want to use the read-from-file option, but would like to
generate them procedurally.

This is for speed and convenience.

The pulses should be rectangular, be 1s (or whatever 1/datarate is)
and be either +1 or -1, with a random probability distribution.
Hello,

I recommend a B-source.

V={ampl}*(rand(time*{br}) >=.5)


..param br=533meg
..param ampl=2


The option below enables the eye diagram.

..options baudrate={br} delay=.1n

Setup for a transient simulation.

..tran 0 1u 2n 10p
..options plotwinsize=0


Best regards,
Helmut
 
That's a cool trick.

For grins, I tried B1 a 0 V= pi*v(a) - floor( pi*v(a) ) combined
with a sample & hold.

That worked too, but it's a lot slower.



On Aug 29, 12:13 pm, wavema...@sogetthis.com wrote:
Thanks! I tried this:

* C:\Program Files\LTC\SwCADIII\nrz_sim\random_nrz_bits.asc
B1 a 0 V = if ( rand( time ) , 1, -1 )
.tran 1000
.backanno
.end

and it seems to work! It's fast too - around 4000 seconds per
second.

How about some other tricks to accomplish the same?

On Aug 29, 1:43 am, batguy <bat...@chemicalanalysis.com> wrote:

You could probably use two independent sources to make a
multiplicative congruental generator.

Something like Va = fraction ( pi * Vb ) and Vb = Va.

You'll have to set up Va to be nonzero when the simulation starts, and
I'm not sure how you would put in a proper time delay between the two
sources.

Then you have a pseudorandom number, to make data, you'll probably
have to sgn() it etc. Probably need a sample & hold to to hold it
still for one bit period.

On Aug 28, 7:55 pm, wavema...@sogetthis.com wrote:

Does anyone know a trick to make fast random NRZ pulses in LTspice?

I don't want to use the read-from-file option, but would like to
generate them procedurally.

This is for speed and convenience.

The pulses should be rectangular, be 1s (or whatever 1/datarate is)
and be either +1 or -1, with a random probability distribution.
 

Welcome to EDABoard.com

Sponsor

Back
Top