1

I need my resistor to be a function of a node voltage in order to simulate a battery. I can do this is ngspice by setting R=2*v(1), for example. Is this possible in Xyce (or is there a workaround)?

Sonny
  • 61
  • 1
  • 1
  • 4

1 Answers1

2

Found it. You need to use the B prefix and Ohm's Law.

BRSR    VOCP    A   I = {(v(VOCP) - v(A))/(0.1562*exp(-24.37*v(VSOC)) + 0.07446)}
Sonny
  • 61
  • 1
  • 1
  • 4