LTSpice: how to setup sinusoidal or exponential voltage source?
Why not using an Arbitrary Behavioral Voltage?
In LTspice, you can enter the equations directly by adjusting the V=F(...)
to V=10*sin(24*time) + 14
and for the other source with V= 12 + 15*exp(-200*time)
.
(Note you should use "time", not "t" )
Adding to R.Joshi's answer regarding the exponential voltage source :
For the exponential voltage source, it's a bit trickier, since the usual parameters aren't the ones you're used to. LTspice seems to be using these equations :
When t is between the Rise Delay and the Fall Delay: $$ V(t) = V_{initial}+(V_{pulsed}-V_{initial})*(1-e^{-\dfrac{t-T_{Rise Delay}}{\tau_{Rise}}}) $$ This assumes the Rise Delay is lower than the Fall Delay. If that's not the case, swap the Rise Delay and Rise Tau for the Fall Delay and Fall Tau.
When t is larger than both delays :
$$V(t) = V_{initial}+(V_{pulsed}-V_{initial})*(1-e^{-\dfrac{t-T_{Rise Delay}}{\tau_{Rise}}}) \\-(V_{pulsed}-V_{initial})*(1-e^{-\dfrac{t-T_{Fall Delay}}{\tau_{Fall}}})$$
Of course, when t is lower than both delays, the voltage source outputs the initial voltage.
Here is how you would set up the parameters for your source :
To add phase to your sine voltage source in LTSpice, use Phi[deg]. Cosine is basically sine with a phase. phase of 180° will completely invert your signal.
DC Offset adds a DC level to your sine wave signal e.g. 1V DC Offset means your sine wave will "oscillate" around 1V rather than 0V.
Frequency is the number of cycles the sine wave will complete in a second.
Tdelay adds delay before starting the source.
I would say you experiment with these values and you will learn alot more. LTSpice is free to use and it should not take you long to setup basic circuit with a resistor and source to play around with these values.
v(t) = 10*sin(24t) + 14
V = A * sin(2 * pi * F * t) + DC_OFFSET
for the signal above the amplitude is 10. frequency is part before the t (time) inside the bracket.
24 = 2*pi*F
24/(2*pi) = F