How to Plot Frequency Response of a Power Supply Using SPICE?

Click For Summary
To plot the frequency response of a power supply using SPICE, the user is attempting to analyze the circuit but encounters issues with excessive voltage readings when varying the input frequency. The netlist provided includes components like diodes, capacitors, and an LM317 voltage regulator. The user successfully performs a time domain analysis but struggles with the frequency response due to a missing AC directive in the source definition. After realizing this mistake, they seek assistance for proper frequency response analysis. The discussion highlights the importance of including the AC directive for accurate frequency response results.
ranger
Gold Member
Messages
1,685
Reaction score
2
I'm trying to plot the frequency response of a power supply I've designed. Here
is the netlist (made using Spice OPUS):
Code:
PowerSupply

v1 4 5 dc 0 sin(0 34 60)

D1 4 2 1N4007
D2 0 5 1N4007
D3 5 2 1N4007
D4 0 4 1N4007

c1 2 0 1000u
c2 2 0 100n
cout out 0 100n

radj adj 0 5k
r1 out adj 240

x 2 adj out LM317

.include parts.lib
.control
set units=degree
destroy all

tran 0.01ms 100ms
plot v(4,5) v(out)  vs (time*1000)

destroy all

[b]ac dec 10 60Hz 7000Hz
plot ac1.v(out) vs ac1.frequency[/b]

.endc
.end
The first plot, I'm doing a time domain analysis (this works fine). However, I am having some trouble with varying the frequency of the input. I have bold my attempt at this. But something is definitely wrong here. I get in excess of 6000v when I vary the frequency. When I designed the circuit I was aiming for about 29v (which is what the time domain plot shows).
Can some please assist me in doing a frequency response analysis.

Thanks.
 
Engineering news on Phys.org
Wow, no one here uses spice? Well it was a rather simple mistake. It turns out that to do a frequency response, I need to have the AC directive when defining the source (frequency domain).
 
I am trying to understand how transferring electric from the powerplant to my house is more effective using high voltage. The suggested explanation that the current is equal to the power supply divided by the voltage, and hence higher voltage leads to lower current and as a result to a lower power loss on the conductives is very confusing me. I know that the current is determined by the voltage and the resistance, and not by a power capability - which defines a limit to the allowable...

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
11K
  • · Replies 1 ·
Replies
1
Views
10K
Replies
6
Views
5K