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

Click For Summary
SUMMARY

The discussion focuses on plotting the frequency response of a power supply circuit using Spice OPUS. The user provided a netlist that includes components such as the LM317 voltage regulator and various diodes (1N4007). The initial attempt at frequency response analysis resulted in erroneous voltage readings exceeding 6000V, while the expected output was approximately 29V. The resolution involved adding the AC directive to the source definition to correctly perform frequency domain analysis.

PREREQUISITES
  • Familiarity with Spice OPUS simulation software
  • Understanding of AC analysis in circuit simulation
  • Knowledge of power supply design principles
  • Experience with netlist creation and modification
NEXT STEPS
  • Learn how to implement AC directives in Spice OPUS simulations
  • Explore frequency response analysis techniques in circuit design
  • Study the behavior of the LM317 voltage regulator under varying frequencies
  • Investigate common mistakes in Spice simulations and how to troubleshoot them
USEFUL FOR

Electrical engineers, circuit designers, and hobbyists interested in power supply design and simulation using Spice OPUS.

ranger
Gold Member
Messages
1,687
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).
 

Similar threads

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