# LT Spice Bode Plot

#### kalemaxon89

Joined Oct 12, 2022
264
I simulated this circuit on LTSpice.

From the calculations I get this transfer function:
Vo(s)/Vi(s) = 1/( sCR+(Rload+R)/Rload ) = 1/( 1/10000*s+6/5 ) (by choosing Rload = 5h, R = 1k, C = 100nF)
In the simulation I gave as input a step function to find the final value (Which turns out to be the same as I calculated).

1) If I want to plot the bode diagram, do I have to put a sine wave in the input or a step function also okay?
By maintaining a step function, I get:

The problem is that on wolframalpha I get:

I am probably doing something wrong on LTSpice ... I attach the file for your suggestion.

#### Attachments

• 786 bytes Views: 4

#### ericgibbs

Joined Jan 29, 2010
19,079
hi k89,
If you want to see a 'true' dB plot, you should use AC=1 not 3, try it.
E

#### LvW

Joined Jun 13, 2013
1,772
1) If I want to plot the bode diagram, do I have to put a sine wave in the input or a step function also okay?
By maintaining a step function, I get:
* If you command an ac analysis (Bode plot) the program does react upon an ac source only.
That means: The step function will be completely ignored because it applies for the time analysis only.

* When choosing Vac=3V you must display dB(Vout)/dB(Vin). For Vac=1V it is sufficient to diplay dB(Vout) only.

#### kalemaxon89

Joined Oct 12, 2022
264
* If you command an ac analysis (Bode plot) the program does react upon an ac source only.
That means: The step function will be completely ignored because it applies for the time analysis only.

* When choosing Vac=3V you must display dB(Vout)/dB(Vin). For Vac=1V it is sufficient to diplay dB(Vout) only.
hi k89,
If you want to see a 'true' dB plot, you should use AC=1 not 3, try it.
E
View attachment 320699

1) With AC 3, If I do as @LvW suggests, at DC it doesn't start from 0dB the curve:

2) From the graph of @ericgibbs I noticed the changing of the dB at DC, rightly now it is 0dB and not 8dB as in the wrong simulation picture in my main post. However, this does not explain why at 10kHz I have -15dB while on wolframalpha I have -3dB about

#### crutschow

Joined Mar 14, 2008
34,827

R1 and R2 form a voltage divider which gives a -1.5dB attenuation at DC (or at frequencies well below the corner frequency).

LTspice references the Bode plot gain to 1V, so that's why 1V is normally used to give 0db for a gain of 1.

#### kalemaxon89

Joined Oct 12, 2022
264

R1 and R2 form a voltage divider which gives a -1.5dB attenuation at DC (or at frequencies well below the corner frequency).

LTspice references the Bode plot gain to 1V, so that's why 1V is normally used to give 0db for a gain of 1.
With Laplace, I get this transfer function: Vo/Vi = 1/[sC + (Rload+R)/(Rload*R)] = 1/[s*100n + 6/5k]

Here is the Bode diagram of the circuit with R=1k, C=100nF and Rload=5k:

1) Using wolframalpha:

2) Using LTSpice: (simulation of @ericgibbs)

Why here at 10kHz there are -15dB (-13dB attenuation from the -2dB at DC) while on wolframalpha at 10kHz attenuation I have from 57dB (-3dB attenuation from the DC) ??

#### ericgibbs

Joined Jan 29, 2010
19,079
Hi k89,
I have double-checked the LTS sim, it looks OK.

E

#### Attachments

• 1.2 MB Views: 3

#### crutschow

Joined Mar 14, 2008
34,827
Why here at 10kHz there are -15dB (-13dB attenuation from the -2dB at DC) while on wolframalpha at 10kHz attenuation I have from 57dB (-3dB attenuation from the DC) ??
There seems to be a factor of 10 error in the transfer function you simulated.
The calculated -3dB corner frequency of the circuit is 2kHz but your wolframalpha plot shows it at 10kHz.