URGENT!! why doesn't my PSPICE code work??

Discussion in 'The Projects Forum' started by yoyo1987, May 4, 2014.

  1. yoyo1987

    Thread Starter New Member

    Apr 24, 2014
    17
    0
    I am trying to create the circuit in the image attached
    I wrote the following code:

    *Fitzhugh Nagumo
    I1 0 1 PULSE(0 0.5mA 1NS 1NS 1NS 1NS 2ms)
    L1 0 2 30H
    R1 1 2 7500ohm
    R2 1 0 3174ohm
    C1 1 0 16.67nF
    G1 1 0 value={-0.000037037*(v(1)**3)+0.00002167*(v(1)**2)}
    .tran 0 10ms
    .probe
    .end

    my problem is G1 isn't responding properly (it's giving me 0Amp) (and I think that because of that, also L1 and R1 are not working either)

    can someone please help me?? THIS IS URGENT!!!
     
  2. Experimentonomen

    Member

    Feb 16, 2011
    331
    46
    Try to build it up in LTspice as a schematic than trying to write the pspice code manually.
     
  3. yoyo1987

    Thread Starter New Member

    Apr 24, 2014
    17
    0
    what is LTspice?
    I tried to build the schematic in Orcad, the problem is I couldn't get the VCCS to send I=-0.000037037*v^3+0.00002167*v^2 (the gain can't be a variable)
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    This is what LTspice gives, and the netlist is
    C1 c 0 16.67n
    R1 c N001 7k5
    L1 N001 0 30
    R2 c 0 3k174
    B1 0 c I=-3.7037e-5*(v(c)**3)+2.167e-5*(v(c)**2)
    I1 0 c PULSE(0 0.5m 1n 1n 1n 1n 2m)
    .tran 10m
    .backanno
    .end

    Edit: I'm not familiar with Pspice, but can you designate a node simply as '1' ? In LTspice it would be 'N001' by default.
     
    Last edited: May 4, 2014
  5. yoyo1987

    Thread Starter New Member

    Apr 24, 2014
    17
    0
    the graph is similar to what I got, but please check the current that comes out of the VCCS, it's not supposed to be 0 (also check the current on L1,R1)
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    The graph shows the current is not zero; it's peaking at 80fA. Granted, not much above zero ;), but the cap voltage which it's a function of is only 60uV peak.
    I(L1) peaks at ~195pA.
     
Loading...