2
\$\begingroup\$

I want add the following value 5e^(-25/2t)u(t) as a Vin to my circuit in LTSpice. However I don't know how to do this - can someone help?

\$\endgroup\$
1
\$\begingroup\$

Another option is using a Behavioral Voltage Source with

V=if( time<0, 0, 5*exp(-12.5*time) )

This allows you to implement \$u(t-t_0)\$ as well.

\$\endgroup\$
  • \$\begingroup\$ Heh, I was thinking the same thing but you beat me to it. \$\endgroup\$ – Voltage Spike Nov 13 '19 at 20:06
1
\$\begingroup\$

Use a voltage b-source with this:

V = 5*exp(-12.5*time)

U(t) is not needed because it is a step input and goes to 1 as soon as the simulation starts (at t=0 the b-source is considered on)

If you wanted a time offset (like 0.3s for the step function going from 0 to 1) then use an if statement)

V=if(time<0.3,0,5*exp(-12.5*(time-0.3)))

enter image description here

enter image description here

\$\endgroup\$
1
\$\begingroup\$

You can get very close using just the built-in EXP source

From the Help file:

Syntax: Vxxx n+ n- EXP(V1 V2 Td1 Tau1 Td2 Tau2)

Time-dependent exponential voltage source

Name Description Units 
V1   Initial value V 
V2   Pulsed value V 
Td1  Rise delay time sec 
Tau1 Rise-time constant sec 
Td2  Fall delay time sec 
Tau2 Fall-time constant sec 

For times less than Td1, the output voltage is V1. For times between Td1 and Td2 the voltage is given by

V1+(V2-V1)*(1-exp(-(time-Td1)/Tau1))

For times after Td2 the voltage is given by

V1+(V2-V1)*(1-exp(-(time-Td1)/Tau1))-(V2-V1)*(1-exp(-(time-Td2)/Tau2))

If you make Tau1 very short, and Td2 - Td1 maybe 5 or 6x Tau1, you get very close to the exponential pulse you want:

enter image description here

enter image description here

In any practical circuit, the fact that this model has a non-zero rise time will not cause any significant difference in the results compared to using the ideal exponential pulse. And if it does, it's likely that the results from this model are closer to reality than from the model using zero rise time.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.