PSUD (Power Supply Unit Designer)

Hello there, I'm the author of a freeware package called PSUD2, a simple application for designing linear power supplies.

It's been around since 1998 and has been received a fair amount of use from the DIY audio and ham radio community, amongst others. I'm planning a PSUD3 which will have a new file format and allow some enhancements to be made, some of which I've had to hold back on due to the fixed file format.

Here's some of the ideas that are brewing the lab right now:


  • Integrated diode modeling tool - add points from the data sheet to get the correct parameters
  • Rectifiers as separate files rather than a single rectifier.txt so you don't get a wipeout every time the software is updated
  • Diode parameters stored in the PSU file, makes things easier to share
  • Chart preferences (line colour, width, style) stored in the PSU file so you can have a consistent look that works for you
  • R type block before load (current limit)
  • Stepped resistance load in addition to stepped current source
  • Support for mercury rectifiers

Anything else?

Regards / 73,
Duncan
 
  • Like
Reactions: 1 users
This might not be very helpful, but sometimes I have had reason to doubt the RMS current figures. I can't remember when or where I saw this (which is why this remark is unhelpful to a software developer!). Could you cast your eye over the code for this calculation, just in case you spot something?

Things to think about:
1. NTC thermistor in primary circuit for soft-start
2. Output impedance as a function of frequency (I'm going to guess that this would not be easy, as PSUD works in the time domain)
3. Plot something (e.g. mean output voltage, ripple) vs. something else (e.g. cap value) - would presumably mean repeating several runs while varying something

PSUD2 is extremely useful so we are very grateful to you for developing it and making it available to us.
 
First off, i want to say a big thank you for creating PSUD, words cannot explain how invaluable a tool it has been over the years :up:

I have a request for two changes i would really like to see..

1) Allow split path power supplies. Say you have a CRC filter section, then branch off with two separate RC supplies for the left and right channel. Currently PSUD has no mechanism to allow for this, other than adding in a current tap which does not fully simulate the startup load from the capacitance on each section.

2) Remove the limitation preventing you from putting two capacitors after one another. Currently the system will only except an RC or LC layout after a capacitor. Reason being is some amplifiers have bulk filtering in a CRC layout, then another capacitor locally at the tube. PSUD will not accept this layout as there is no cap or choke between each capacitor.
 
I'll add my grateful appreciation to Duncan's efforts. :up::up::up:

In PSUD2, I've assessed the influence of an NTC by just running a 'cold' sim and then a 'hot' sim, where the NTC resistance at hot and cold is fairly well identifiable, and it just adds to the primary winding resistance if used on the AC side. From a worst-case design perspective that seems to be reasonable.

In PSUD2, I've just added another RC stage, where R is very low resistance, to model two capacitors that are effectively in parallel. The R value can go down to pretty low values without too much sim hassle. Similarly, if I've wanted to add a series resistance value only, then I'll add an RC stage where C is very small.

Perhaps there is some value in whether real power dissipation in a part could be worth adding as a result parameter. That could then be used to assess transient power dissipation from t=0 in say a diode/bridge or resistor, compared to a steady-state value taken from a later simmed time slice.

Would it be 'relatively' easy to add a diode in as a series element after the normal location of the rectifier diodes. A number of enthusiasts seem to want to use a ss rectifier, but then insert a damper valve diode in the DC path so as to allow some time-delayed B+ rise and possibly other reasons.

PS. and some use a hybrid valve and ss bridge, where a common dual diode valve is used for the 'positive' arms of the bridge.
 
Last edited:
Thank you all for the input, it's very much appreciated and all items have been logged on the PSUD to-do list.

Sadly, some of those requests can't be processed simply because the technology in the software won't support them or in other cases because it takes the software way outside of its KISS philosophy. At the outset, I made a conscious decision not to go head to head with SPICE et al, I figured that if users wanted that level of control or complexity they would just use SPICE in the first instance!

However... quite a few things are "do able" so I'll just post a bit commentary here. It's the least I can do seeing as you have been generous with your time to let me know the features you would like to see in PSUD.


  • Can you make the transformer settings easier to make and understand? Maybe a few more paragraphs in a .txt Help file? Yes, this is very much in the ethos of the software and the help files have started being upgraded. I'll try and make the tutorials better with pictures, examples etc. Some of the help has had a rework in recent days, for example it was never clear what the secondary resistance related to on a FW rectifier scenario.
  • This might not be very helpful, but sometimes I have had reason to doubt the RMS current figures. OK, the RMS calculations are basically Root Mean Square in the normal sense - take each point, calculate the square and sum all these squares. To be honest, I'm hoping there isn't much that can go wrong there :) If you are seeing issues, it might be the data that it's trying to "RMS" might have some problems, however I can't answer the question without seeing a bit more of the problem. If something doesn't look/smell right in future, please feel free to take a screen shot and mail it to be and I can investigate.
  • NTC thermistor in primary circuit for soft-start OK, modelling NTCs is quite specialised as you need to get into ambient temperature, thermal models, and that's really outside the PSUD remit. However... what would be possible (and may do the job) is to have a source transformer resistance that moves with time. For example, you might have a transformer primary resistance of 22 ohms. An NTC is in play with 100 ohms cold and 10 ohms hot (I'm just guessing these numbers). The transformer could be set to kick off at 122 ohms and slide down to 32 ohms over N seconds. Not quite a detailed simulation of an NTC thermistor, but it should give the flavour of the thing?
  • Output impedance as a function of frequency (I'm going to guess that this would not be easy, as PSUD works in the time domain) This is the one that I would struggle with. As DF96 concluded correctly, the simulation is worked on a time step model rather than an AC impedance model so there is no way with the present set up to do this. Even if a retrofit of some sort was put in to generate a sparse matrix and feed in the component values to detect the impedance at the output, this would work like SPICE but with one vital difference - inductance in the capacitors would not be modelled so the results would fall apart at higher frequencies anyway. I'm not ruling this one out, just saying that there might be better ways to achieve this outside of PSUD.
  • Plot something (e.g. mean output voltage, ripple) vs. something else (e.g. cap value) - would presumably mean repeating several runs while varying something This sounds very possible. Sweep a component value and plot one of the summary values against it (min/max/diff/mean/RMS). There is a proviso that you would have to put a reporting delay in to achieve some sort of steady state, otherwise the results become a bit meaningless.
  • Allow split path power supplies. Say you have a CRC filter section, then branch off with two separate RC supplies for the left and right channel. Currently PSUD has no mechanism to allow for this, other than adding in a current tap which does not fully simulate the startup load from the capacitance on each section. Can you tell me a bit more about how this would be used in practice? I'm trying to guess that it might be something like loading one channel but not the other and seeing the effect, but probably just best if I ask the question! In terms of putting this in the software it works on blocks feed feed information in both directions, I don't know how a split would work but if I know what the end game is and what you want to achieve that will give me a bit more information to work out how to go about this.
  • Remove the limitation preventing you from putting two capacitors after one another. Currently the system will only except an RC or LC layout after a capacitor. Reason being is some amplifiers have bulk filtering in a CRC layout, then another capacitor locally at the tube. PSUD will not accept this layout as there is no cap or choke between each capacitor. If you have (for example) a capacitor of 220u in the PSU and 10u at the tube, the reason in the real world for doing this is to reduce the impedance of the feed to the tube caused by the resistance or inductance of the cable to the second tube. PSUD won't model those small values without falling over, it could show a C only filter if the previous filter was a RC/LC/C but all it would do in practice is add the two capacitors together to make one block with 230u. That will show the items on a diagram "as built" but it will not model the reason you are doing the two capacitors for (localised impedance reduction). This is best dealt with by SPICE et al and more sophisticated models for capacitors.
  • Hybrid valve and ss bridge, where a common dual diode valve is used for the 'positive' arms of the bridge Yes, the rectifier options are being overhauled for mercury rectifiers so this is a good time to get the hybrid stuff in.
  • Add a diode in as a series element after the normal location of the rectifier diodes This can be added too.
  • Better tutorials / help for beginners Yep, this is a major failing and something which needs to be addressed. Pretty much the same answer as the first line in the table.
  • Real power dissipation in a part could be worth adding as a result parameter Volts and Amps are the current options for output, there is no reason why Watts cannot be added too. I would probably put this as a menu option (show Watts yes/no) so the results panel doesn't get cluttered when you don't actually need it.
  • Keep it running on Windows XP Should be possible, there's nothing Windows 7/8/10 specific in the code.
  • Can it be made web based This is an interesting one. The world seems to be going down a web based route so maybe I should be doing a bit more on this front. To be honest, it's not something I know much about! One of my other software offerings is a Windows software based amateur radio SDR transceiver called KGKSDR. There are people who put the application straight onto the web, so I know it can be done, I just need to find out how...
  • I would like to see a Mac version I don't have an Apple Mac but you would be surprised at how often I get asked about this. I use Virtual Machines here mostly for testing so I will investigate purchasing an operating system to try it out on.
Hope that provides a little bit of explanation. A final beta of PSUD2 has been produced, this is likely to be the last version of PSUD before the betas of major version 3 start appearing. It's at http://www.duncanamps.com/psud2/psud2_beta60_setup.exe

Please keep the ideas coming - apologies that it's just not practical to implement them all, hopefully for the reasons I've explained, however if you don't ask you don't get :)
 
Duncan, what could be useful is to provide a facility to make a new result parameter using existing result parameters and a simple add or subtraction calculation. Then the voltage on each end node of a resistor or choke could be subtracted to measure and display the voltage across the resistor or choke.

Further to the use of an RC stage, it isn't straightforward to get a result for CT lead current in a full-wave rectifier with capacitor input filter. The transformer winding current is only for one side of the winding, so is not the same as the CT lead current.

The work-around I use is to change the simple input C filter to an RC filter where R is minimal (such as 10 milliohm), and then use the resistor current result as the CT lead current. I use that for CT fuse selection.
 
Duncan, what could be useful is to provide a facility to make a new result parameter using existing result parameters and a simple add or subtraction calculation. Then the voltage on each end node of a resistor or choke could be subtracted to measure and display the voltage across the resistor or choke.

Hi Tim, this should be possible - the charting and analysis side is somewhere where I plan to put quite a bit of effort. If I'm going to implement a calculated field then it might as well be the full package (multiply, divide, plus other math functions).

Further to the use of an RC stage, it isn't straightforward to get a result for CT lead current in a full-wave rectifier with capacitor input filter. The transformer winding current is only for one side of the winding, so is not the same as the CT lead current.
Yep, just had a look at this, it's a bug in the reporting of I(T1) which should, by my thinking, show alternative positive and negative peaks. There's then the question of what I(D1) shows, currently half cycles which is correct for the top diode. Maybe it needs a concept of a D2, D3...

The work-around I use is to change the simple input C filter to an RC filter where R is minimal (such as 10 milliohm), and then use the resistor current result as the CT lead current. I use that for CT fuse selection.
OK thanks for working round it for now, I'll actually do a bug fix on PSUD2 this weekend to sort this out. While PSUD3 is being developed, alpha tested and beta tested, I will still be maintaining PSUD2 long term.
 
Here is a problem that is either the program or my ignorance of how to correctly use it. I would prefer that its my ignorance because that means I can fix it.
Please look at the output of these files and notice that the variation of voltage across the load gets LESS if the ESR of the last cap INCREASES. This doesnt make sense to me. By using this technique of high ESR/low capacitance I have simulated power supplies with pico volts of noise. Obviously this is incorrect so I have trouble trusting the program.
The only difference between these three files is the existence and values of the last capacitor.
Hope that you can fix this or explain to me whats going on Duncan. I'm not trying to attack the program at all and am grateful for it. I just am confused as to why I get these results and how can I trust the program to even come close to simulating the true output.
Uriah
 

Attachments

  • psu.zip
    672 bytes · Views: 193
Here is a problem that is either the program or my ignorance of how to correctly use it. I would prefer that its my ignorance because that means I can fix it.
Please look at the output of these files and notice that the variation of voltage across the load gets LESS if the ESR of the last cap INCREASES. This doesnt make sense to me. By using this technique of high ESR/low capacitance I have simulated power supplies with pico volts of noise. Obviously this is incorrect so I have trouble trusting the program.
The only difference between these three files is the existence and values of the last capacitor.
Hope that you can fix this or explain to me whats going on Duncan. I'm not trying to attack the program at all and am grateful for it. I just am confused as to why I get these results and how can I trust the program to even come close to simulating the true output.
Uriah

Values from the file removed.psu and 100mR.psu give the kind of results I would expect. However, the results from 100R don't even stand up to the most basic scrutiny.

I simulated with the following parameters:

  • Frequency: 50Hz
  • Accuracy: Medium
  • Reporting delay: 20S
  • Simulation time: 1000mS
This gave me a voltage on C2 of 118.29V and on C3 of 61.328V

There is a 220mΩ resistor between the two but only 567.85mA flowing through it, for a difference of nearly 60V? At this point Mr. Ohm and Mr. Kirchoff would be scratching their heads. As am I.

The fact that the power supply is modeled with unrealistic / inappropriate values should not change the fact that this should not happen. The internal checks in the software should pick up on this and they don't.

I will investigate, although any fixes will be put into PSUD3 rather than PSUD2 (I can send you an early copy of it which will coexist with PSUD2). We are just about to go away for a long weekend but I can pick this up on Monday.

Thanks for taking the time to let me know about the problem and providing files which duplicated the issue perfectly.

Regards / 73,
Duncan
 
Thanks for confirming my alleged sanity. Even though 100R is silly you will see that increasing ESR at all improves measurements across the load. I found the problem long ago when trying to simulate a snubber across a large cap. I only used the values shown in those 3 files because simulating a .1uf with .001R just takes too long on my computer. At that time, years ago, I figured I just didn't know how to use the program correctly. I ran into the problem again when trying to simulate a "sea of caps" supply with multiple low capacitance capacitors in parallel.
Well enjoy your time and thanks for your response.
 
Just here to say another thank-you Duncan for providing and maintaining this tool - it's brilliant for quick sanity-checks that fall between hand calc and full simulation; and the KISS approach is admirable.

While there's probably a good reason for it in underlying approach, I've noticed it doesn't cope at all well with inductors under 1mH, sometimes not even then ('timestep error' is the output usually). Is this a range that can be extended easily downward ...?

(Yes, I do occasionally play silly-buggers with PSUD in preference to a sim; and thanks, again.)
 

PRR

Member
Joined 2003
Paid Member
> a fair amount of use from the DIY audio

An awful LOT of use. Incredibly handy.

Thank you thank you thank you.

> its KISS philosophy.

Yes, yes. Often I "wish" it did something else. Then I realize what an endless grind that would be.

> make the transformer settings easier

The %regulation was a MAJOR advance on the older version(?). But many users are clueless. True, many users can't be helped. But it was a long time before I saw the "..." button and found those inputs.

Thinking dummy-users: once a voltage and current have been specified you "can" compute VA and estimate a % (30% for <10VA, 5% >100VA). This will not be right for all parts! But it might avoid a recent case where a default winding R was way-way inappropriate, and it was not clear from how the user described the problem.

Also the capacitor ESR can be ballparked from uFd (primarily, V as a secondary correction) (V got from PT ACV and 1.4 or whatever plus a fudge). 2 Ohms may be good for 40uFd(?) but is way-wrong for 50,000uFd.

Preserve user inputs when not stupid. "k" may be proper but "K" should not raise complaint. And it bothers me when 50,000uFd comes back as 50mFd-- I don't think that way (actually remember when uFd was spelt mfd).

Agree that NTC modeling opens major headache. Useful and currently fashionable, but not worth effort IMHO. Design the supply to bang-start without blow-up, then add the NTC as refinement.

Audio range output impedance is, for practical purpose, the output cap. As you say, if more detail is needed, the user probably should be on breadboard.

In past a fair number of others, told to "PSUD!", say "Mac!". Of course now they say unix or ChromeBook or Android. Can't please everybody. HTML4 may be the most universal going-forward, but I have no idea what that would involve.

And BTW, FWIW, FIY: I just discovered a "buglet". I discovered the the results panel can be re-sized (another thing I didn't find over the years). Good! BUT when I resized it to zero (to emphasize the curves), it won't come back! And does not heal on re-start.
Attached image shows the resize cursor doing nothing. Cellfone shot because Windows screen-grab did not show cursor.
Obviously I will fix that by deleting the program and installing a new copy (or beta 6). So don't even look at it. But if you re-use this panel code in III, it is something to look into.

And thank you thank you thank you!
 

Attachments

  • PSUD-stuck.gif
    PSUD-stuck.gif
    116.5 KB · Views: 1,067
Last edited: