Forums

LTspice questions

Started by Bill Bowden June 7, 2012
Does LTspice assume some value of Q when simulating parallel LC
circuits where the resistance of the inductor and ESR of the capacitor
are not specified?  I notice I get different results where the L or C
resistance is not stated, but the simulator works ok and just displays
weird waveforms. It seems to assume something.

Another question I have is how to write a directive to sweep a
bandpass filter from F1 to F2 to get a dB display of the response from
input to output over the frequency range?

Thanks,

-Bill
On Wed, 06 Jun 2012 20:48:34 -0700, Bill Bowden wrote:

> Does LTspice assume some value of Q when simulating parallel LC circuits > where the resistance of the inductor and ESR of the capacitor are not > specified? I notice I get different results where the L or C resistance > is not stated, but the simulator works ok and just displays weird > waveforms. It seems to assume something.
LTSpice supplies a minimum damping resistance to inductors, unless you turn it off in Control Panel/Hacks or override it with a specified value for individual inductors. (Hint: specifying Rs=0 will confuse the simulator in circumstances where there is no external damping, use some value like 1E-18 in such cases.)
> Another question I have is how to write a directive to sweep a bandpass > filter from F1 to F2 to get a dB display of the response from input to > output over the frequency range?
.ac <oct, dec, lin> <Nsteps> <StartFreq> <EndFreq> You need to specify a source of AC 0V. Then plot the voltage at the output node. You can have Bode, Nyquist, or Cartesian plots. RTFM. Try this: TURN OFF WRAPPING! Coupling.asc ------------------ Version 4 SHEET 1 880 680 WIRE -32 96 -64 96 WIRE 96 96 48 96 WIRE 144 96 96 96 WIRE 336 96 272 96 WIRE 448 96 336 96 WIRE 144 128 144 96 WIRE 272 128 272 96 WIRE 336 128 336 96 WIRE 96 144 96 96 WIRE -64 160 -64 96 WIRE 448 160 448 96 WIRE 96 224 96 208 WIRE 144 224 144 208 WIRE 144 224 96 224 WIRE -64 320 -64 240 WIRE 64 320 -64 320 WIRE 144 320 144 224 WIRE 144 320 64 320 WIRE 272 320 272 208 WIRE 272 320 144 320 WIRE 336 320 336 192 WIRE 336 320 272 320 WIRE 448 320 448 240 WIRE 448 320 336 320 WIRE 64 368 64 320 FLAG 64 368 0 FLAG 272 96 V1 SYMBOL ind2 128 112 R0 SYMATTR InstName L1 SYMATTR Value 1m SYMATTR SpiceLine Rser=0 SYMATTR Type ind SYMBOL cap 112 144 M0 SYMATTR InstName C1 SYMATTR Value 2.53303e-9 SYMBOL voltage -64 144 R0 SYMATTR InstName V1 SYMATTR Value AC 1 SYMBOL res 64 80 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName Rg SYMATTR Value 10k SYMBOL ind2 256 112 R0 SYMATTR InstName L2 SYMATTR Value 1m SYMATTR SpiceLine Rser=0 SYMATTR Type ind SYMBOL cap 320 128 R0 SYMATTR InstName C2 SYMATTR Value 2.53303e-9 SYMBOL res 432 144 R0 SYMATTR InstName R1 SYMATTR Value 10k TEXT 96 376 Left 2 !.ac lin 1000 50k 150k TEXT -80 408 Left 2 !.measure tmp max mag(V(V1))\n.measure BW trig mag(V(V1))=tmp/sqrt(2) rise=1 targ mag(V(V1))=tmp/sqrt(2) fall=last TEXT 176 112 Left 2 !K1 l1 l2 {K1} TEXT 80 392 Left 2 !.step param K1 0.01 0.2 0.02 TEXT 312 392 Left 2 !.probe V(V1) TEXT 80 64 Left 2 ;Critical coupling occurs at K1=0.062547893 -- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)
On Wed, 6 Jun 2012 20:48:34 -0700 (PDT), Bill Bowden
<bperryb@bowdenshobbycircuits.info> wrote:

>Does LTspice assume some value of Q when simulating parallel LC >circuits where the resistance of the inductor and ESR of the capacitor >are not specified? I notice I get different results where the L or C >resistance is not stated, but the simulator works ok and just displays >weird waveforms. It seems to assume something. > >Another question I have is how to write a directive to sweep a >bandpass filter from F1 to F2 to get a dB display of the response from >input to output over the frequency range? >
Click Simulate/Edit Simulation Command/AC Analysis and it will create the directive for you. You will have to declare one of your generators as the thing to be swept; Voltage/advanced/sine, fill out the form. There are lots of plot options. -- John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom timing and laser controllers Photonics and fiberoptic TTL data links VME analog, thermocouple, LVDT, synchro, tachometer Multichannel arbitrary waveform generators
On Thu, 07 Jun 2012 06:07:03 -0700, Fred Abse wrote:

> You need to specify a source of AC 0V.
Correction:AC 1V <FX: removes egg from face> -- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)
On Jun 7, 11:54=A0am, Fred Abse <excretatau...@invalid.invalid> wrote:
> On Thu, 07 Jun 2012 06:07:03 -0700, Fred Abse wrote: > > You need to specify a source of AC 0V. > > Correction:AC 1V >
Thanks, I got it working. I was trying to sweep a LC frequency doubler circuit (tuned to second harmonic) and observe the bandwidth at the output. Spice gives me a -60dB result which I guess is the attenuation of the fundamental. I was trying to figure out how far down in amplitude the output at FX2 would be relative to the input at various frequencies. -Bill
> =A0<FX: removes egg from face> > -- > "For a successful technology, reality must take precedence > over public relations, for nature cannot be fooled." > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0(Richard Feynman)