Connect with us

LTSpice Math Ops?

Discussion in 'CAD' started by George Steber, Jan 29, 2004.

Scroll to continue with content
  1. Hi,,

    I admit I don't use LTS much but wanted to try the wav file input
    feature not available in PSpice student version and try some signal
    processing.. But I couldn't find the comparable math blocks like
    "integrator", "multiplier" in LTSpice as they are in PSpice. I could
    probably cobble something together using Laplace E block. Am I missing
    something here with LTSpice and math operations?


    PS. Yes, I downloaded the latest LTSpice today.
  2. Hello George
    I also don't know why these functions are not documented in the help pages.
    The function sdt() or the equivalent idt() are for integration and
    ddt() is for the derivative.
    These functions can be used only in a .TRAN simulation.

    All the other functions are specified in
    Help->LTSPICE->Circuit Elements->B. Arbitr....

    V1 1 0 SINE(1 1 50)

    With E-source, symbol "epoly" in folder "misc" folder

    E1 n1 0 value={idt(V(1))} or E1 n1 0 value={sdt(V(1))}

    E2 n2 0 value={ddt(V(1))}

    E3 n3 0 value={V(1)*V(1)}

    The same with B-source, symbol "bv" in root folder

    B1 n1 0 V=idt(V(1)) or B1 n1 0 V=sdt(V(1))

    B2 n2 0 V=ddt(V(1))

    B3 n3 0 V=V(1)*V(1)

    Best Regards,

    LTSPICE news group
  3. George,
    For a multiplier you can use a behavioral source
    and give it a value of V=V(x)*V(y), where x and y
    are nodes in the circuit. The special fuction
    "modulate" might also be of use. See the example
    FSK modem in example/Eduational/PLL.asc. For an
    integrator, you can also use the a behavioral
    source but use the Verilog type functions idt()
    or idtmod() in the expression. For integration,
    it will understand the PSpice synonym sdt() for
    idt(). FYI, there's also an independent users'
    group at

  4. Hi Mike and Helmut,

    Thanks for the info. Last night I found the behavioral source (even before I
    saw the email <grin>) and it works fine. I used the Laplace transform to do
    integrations and some filtering Very slooooow. Took over an hour to
    integrate just over a hundred msec. Finally dropped the Laplace and made my
    own filters with op amps. Much much faster. I'm probably telling you
    something you already know.... don't use Laplace if you can find another way
    to do it!!!

    Thanks for the tips on integration and differentiation. The idt() for
    integration looks good but sdt() for integration is confusing as "s" normally
    implies differentiation. I must say too that it would be much clearer to me
    and students that are not "spice" experts to simply have the "math" blocks
    available. Just MHO.

    Pleased to report the wav file input works fine as a source.

  5. Mike,

    Forgot to mention that I tried the Yahoo site and tried to register several
    times but it wouldn't allow it. Perhaps it's just me <grin>. I guess I'll
    just stay here in this group for now.

  6. Hello George,
    726 users have successfully become member of this group.
    You are one of the first who has a problem.
    I simply made a Yahoo e-mail account when I registered myself.
    Maybe that helps.

    Best Regards,
  7. Hello George,
    what Laplace functions have you used?
    There is a pitfall with high pass functions. The Laplace in (LT-)SPICE
    requires that H(s) is 0 for s->infinity.
    It's just a few symbols. You could make a nice set of symbols for all users
    and upload it to the LTSPICE group. They should look compatible to the
    symbols used in general Control Loop Software.

    Best Regards,
  8. Hi Helmut,

    Regarding the Laplace functions I used, they were basically low pass functions
    like k/(s+a) and they worked well but very slowly. You can't make an integrator
    this way ( like k/s) since spice has a problem with it. By letting "a" get small
    you could approximate one to a good degree if desired. Because of speed problems
    though I don't recommend using it. Thanks for your help.

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