Connect with us


Discussion in 'Electronic Design' started by rush3k, Feb 2, 2007.

Scroll to continue with content
  1. rush3k

    rush3k Guest


    I have a 3 nodes in circuit, and I'll like to apply a signal to each
    of them in a random manner while observing the output.

    Is there a way to make the SPICE RND function do this?

  2. D from BC

    D from BC Guest

    I posted a similiar question some time ago:

    I did a short cut and just stung together a bunch of sine generators
    at strategic frequencies and amplitudes.
    D from BC
  3. Tom Bruhns

    Tom Bruhns Guest

    I'm not quite clear on what you mean by "in a random manner." Do you
    mean each signal is a (pseudo)random value, or that each signal is on
    or off at a point in time determined by a random draw? Or perhaps you
    mean something else.

    I use LTSpice; its random function is certainly up to either task,
    though the second is easier, especially if you are willing to divide
    time into equal segments. You get a different random number,
    uniformly distributed between 0 and 1, from LTSpice's rand(x)
    function, for each different value of integer(x). That is to say, if
    you get y1 for rand(x), you will get y1 if you ask for rand(x) again
    with the same x, or with any x with the same integer part. You will
    get a different y for each different integer value of the argument.
    So you can do something like rand(1e6*time) to get a new random value
    each microsecond of your simulation. You can use SW components and
    boolean functions to generate on and off states of the switches as you
    desire--or you can multiply your signals by some function of the
    random value--or.... For example, "B 0 1 V=rand(1e6*time)>0.4"
    generates 1 volt 60% of the time, and 0 volts 40% of the time, divided
    into microsecond long chunks. Repeating the simulation gives the same
    result; add a large integer to the argument for rand to get a
    different set of random values.

  4. Le Fri, 02 Feb 2007 13:32:52 -0800, rush3k a écrit :
    Random word should neer used at random.
    Time-dependent or Frequency-dependent sources is merely achieved with
  5. rush3k

    rush3k Guest

    Yes, the link sheds some light on another way I could run the
    simulation and still get desired effects. Thanks!
  6. rush3k

    rush3k Guest

    Thanks for the reply Tom. LT/SwitcherCAD Spice has some interesting
    capabilities. However, its the nodes of the circuit that are to be
    chosen in a random manner. The amplitude and frequency of the signal
    is going to be fixed. So say I have 50 nodes numbered 1,2,3,...,49,50
    in my netlist, I want to be able to apply the signal randomly to each
    of these nodes (23, 1, 38, 24, 51 ... etc) for a period of time. I
    have figured the RND function in SPICE is not able to do this .. so
    I'll probably use some BATCH programming or a PERL script with my
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day