Electronic – LTSpice Frequency variable source

ltspicesimulation

Using LTSpice I'd like to simulate a L-C parallel resonant circuit; I'd like to check its .tran behavior, but I don't know how to simulate a frequency variable voltage source similar to a Frequency Signal Generator in which I turn the frequency value to look for the tuning value.
How can I do ? Is it an example I could use to do it?

Best Answer

Add a B source with a time value in the parameter"

For example put this in for the value of the B-source:

V=0.00205*sin(2 * pi * time * (1 + (2 * time)))

time is a system variable, so you are essentially doing this:

$$ V = A\sin(2\pi t*(1+\beta t))$$

The amplitude can be varied with A and the frequency with \$\beta\$, you can also choose other equations, there are if statements and other neat things you can do to generate a source.

You either have to do math or play with the values to get the starting frequency and ending frequency.

enter image description here