• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
        • Vwsim-users-guide
          • Vwsim-tutorial
          • Vwsim-output
          • Vwsim-input
            • Vwsim-hdl
            • Vwsim-spice
            • Vwsim-input-source-waveforms
              • Vwsim-names
            • Vwsim-build-and-setup
            • Vwsim-commands
        • Isar
        • Pfcs
        • Wp-gen
        • Dimacs-reader
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Vwsim-input

    Vwsim-input-source-waveforms

    SPICE-compatible input source waveforms.

    VWSIM provides various types of waveform generators that are used during simulation to provide a simulation model with current, voltage, and phase sources.

    VWSIM understands four waveform types: Piecewise Linear, Exponential, Sinusoidal, and Pulse. For each of these waveforms, their parameters and the equations generated from these parameters are described below.

    Piecewise Linear (PWL)

    Parameters

    parameter description units
    t1 initial time seconds
    v1 initial val volts, amps, or phase
    ... ... ...
    tn nth time seconds
    vn value at tn volts, amps, or phase

    Equations

    Using the parameters above, a piecewise linear waveform can be described as

    Each pair of values (ti, vi) specifies that the value of the source is vi at time = ti. The value of the source at intermediate values of time is determined by using linear interpolation on the input values. For times after the final time value, the value of the source is the final value.

    Exponential (EXP)

    Parameters

    parameter description default units
    v1 initial value volts, amps, or phase
    v2 pulsed value volts, amps, or phase
    td1 rise delay time 0.0 seconds
    tau1 rise time constant tstep seconds
    td2 fall delay time td1+tstep seconds
    tau2 fall time constant tstep seconds

    Equations

    Using the parameters above, an exponential waveform can be described as

    time equation
    0 v1
    td1 v1+(v2-v1)(1-e^(-(time-td1)/tau1))
    td2 v1+(v2-v1)(1-e^(-(time-td1)/tau1))+(v1-v2)(1-e^(-(time-td2)/tau2))

    Sinusoidal (SIN)

    Parameters

    parameter description default units
    vo offset volts, amps, or phase
    va amplitude volts, amps, or phase
    freq frequency 1/tstop hz
    td delay 0.0 seconds
    theta damping factor 0.0 hz
    phi phase delay 0.0 degrees

    Equations

    Using the parameters above, a sinusoidal waveform can be described as

    time equation
    0 to td vo + va * sin((pi * phi/180))
    td to tstop vo + va * e^(-(time-td)* theta) * sin(2 pi * (freq * (time-td)) + pi * phi/360)

    Pulse (PULSE)

    Parameters

    parameter description default units
    v1 initial value volts, amps, or phase
    v2 pulsed value volts, amps, or phase
    td time delay 0.0 seconds
    tr rise time tstep seconds
    tf fall time tstep seconds
    pw pulse width tstep seconds
    per period tstep seconds

    Equations

    Using the parameters above, a pulse waveform for a single pulse with no period can be described as

    time equation
    0 v1
    td v1
    td+tr v2
    td+tr+pw v2
    td+tr+pw+tf v1
    tstop v1

    If a period is specified, a train of pulses is generated. Each pulse in the train will start at td + (k*per) until tstop is reached.

    Note: the minimum value for per is tr+tf+pw.