LTspice: simulating op amps with capacitive (MOSFET) load - Page 1
Forum section: electronics / projects

author: ifonlyeverything
author_rank: Regular Contributor
timestamp: November 04, 2022, 05:07:53 pm
content: I'm working on an electronic load project. My goal is a reasonably accurate modulation of 10mA to 5A current flow per FET, with the device under test ranging between 1V to 100V. I want relatively good bandwidth so I can use this to test SMPS response to load. I've read Jay_Diddy_B's post herehttps://www.eevblog.com/forum/projects/yet-another-diy-electronic-load/msg2457405/#msg2457405to help my understanding of stability basics (I'm an amateur with no background in EE or control systems.) Right now I'm using an IRFP250N MOSFET model (SPICE straight from Infineon's website,https://www.infineon.com/cms/en/product/power/mosfet/n-channel/irfp250n/). I've substituted this MOSFET into Jay_Diddy_B's schematic and fiddled around a bit with the compensation network. Everything seems to work fine. I even used the LTspice ".step param" to step through different resistor and capacitor values and LTspice worked great to find solutions and show a Bode plot for every capacitor/resistor combination I input.I want to re-invent the wheel and hopefully learn something, so I chose the ADA4522 op amp because it has better input offset than LT1014 and it's in stock and fairly affordable. I'm having a lot of trouble with performing AC analysis in LTspice: sometimes the calculations solve, other times they calculate indefinitely. As an example, I'm looking at V1 = 3.3 V device under test. I command V3 = 1 mV and it solves quickly. Same with 10 mV. Indefinite calculation or no solution for 50mV. Jump up to 155 mV and it solves. Jump up to 165 mV and indefinite calculation/no solution. Jump up to 265 mV and it solves. Jump to 450 mV and it also solves. Jump to 500 mV and indefinite calculation.My thoughts were to use .step param, similar to what I could do with an LT1014, and analyze for various V1 (DUT voltage) and V3 (commanded current flow) -- but obviously this isn't going to work with an ADA4522 due to so many combinations causing the calculations to hang. Is there something obviously wrong with what I'm doing in LTspice? Or is this just a bad choice of op amp? Or am I running into a limitation of simulation -- should I just prototype this and test with a current limited power supply as my DUT?Example of a successful calculationThe .asc file I'm usingElectronic Load.asc(3.88 kB - downloaded 104 times.)

author: RoGeorge
author_rank: Super Contributor
timestamp: November 04, 2022, 05:33:10 pm
content: If you need LTspice help, please attach the .asc file here, so others can run/fix the same schematic you have.

author: ifonlyeverything
author_rank: Regular Contributor
timestamp: November 04, 2022, 05:39:03 pm
content: Quote from: RoGeorge on November 04, 2022, 05:33:10 pmSorry, edited my post + attached it.

author: RoGeorge
author_rank: Super Contributor
timestamp: November 04, 2022, 05:49:35 pm
content: Seems to be running fine, took 10 seconds or so to run.Attach the one with the faulty simulation you want to be fixed.

author: Kleinstein
author_rank: Super Contributor
timestamp: November 04, 2022, 05:59:19 pm
content: Not all OP-amp models properly include the open loop output impedance and as a consequence the performance with heavy load (inlcluding capacitive) may not be accurate modeled.If in doubt one should run a test jig simulation to check (e.g. ouput impedance for a very high gain amplifier to approximate open loop) and look at the output impedance.

author: ifonlyeverything
author_rank: Regular Contributor
timestamp: November 04, 2022, 06:02:05 pm
content: Quote from: RoGeorge on November 04, 2022, 05:49:35 pmSure. The one attached to this post will calculate indefinitely.Electronic Load Indefinite Calculation.asc(3.88 kB - downloaded 59 times.)

author: RoGeorge
author_rank: Super Contributor
timestamp: November 04, 2022, 07:50:26 pm
content: Either go to LTspice control panel (the hammer icon on the taskbar) and in the tab 'SPICE' check the checkbox 'Skip Gmin Stepping'. Beware many of the settings might be memorized and affect future schematics if you forget to revert them back to their default values.To avoid that, you can add inside the schematic the equivalent spice directive instead of ticking that checkbox, with the last '.op' button on the taskbar add:Code:.options gminsteps=0To find the name of each option, seehttps://ltwiki.org/LTspiceHelp/LTspiceHelp/_OPTIONS_Set_simulator_options.htmSide note, didn't carefully look at the schematic, but R1 seems too small. I would have expect R1 to be rather 500 ohm than a 5 ohm.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 04, 2022, 10:36:36 pm
content: Hi,The simulation works better if you add a negative supply to the ADA4522's negative supply terminal instead of ground. It doesn't need very much -0.1V is enough.To the OP, I suggest you look at this thread:https://www.eevblog.com/forum/projects/dynamic-electronic-load-project/In this thread I show to design the load.Jay_Diddy_B

author: ifonlyeverything
author_rank: Regular Contributor
timestamp: November 05, 2022, 12:00:21 am
content: Quote from: RoGeorge on November 04, 2022, 07:50:26 pmgminsteps=0 appears to have fixed my issues! Appreciate it.Quote from: Jay_Diddy_B on November 04, 2022, 10:36:36 pmI'll have to give that thread an in-depth read tomorrow. Thanks for taking the time to post such a detailed project. Right now I'm just playing around, trying to get a feel/understanding of how this all works. The real test will be making something that works in real life...

author: TopQuark
author_rank: Frequent Contributor
timestamp: November 05, 2022, 11:48:59 am
content: https://www.eevblog.com/forum/projects/gt1mhz-bandwidth-electronic-load/Take a look at my attempt at building a fast load if you are interested.

author: ifonlyeverything
author_rank: Regular Contributor
timestamp: November 05, 2022, 04:09:10 pm
content: Quote from: TopQuark on November 05, 2022, 11:48:59 amI saw that, very cool project. Is such a high bandwidth and slew rate required to test an ordinary SMPS with a <200kHz switching speed? Part of my goal is to use my design to load/response test small DC/DC converter prototypes before I integrate them into a larger project. In terms of commercial electronic load units, I see that the BK 85xx series has a maximum slew rate (at maximum rated current) between 0.5 and 1.0 A/uS. Your design is considerably faster!

author: TopQuark
author_rank: Frequent Contributor
timestamp: November 05, 2022, 04:54:20 pm
content: You are right, I actually haven't had any need to test such high amplitude current pulses at such bandwidth, even after I built my load project, except for the time when I wanted to test the specs of a current probe I bought. These days when I test power supplies, I just use my Siglent SDL1030x-e which can do 2.5A/us, which is plenty.I am sure my DIY load can produce cleaner and faster pulse loads, and I can have whatever current load profiles my arb gen can generate. But at the end of the day, good enough is good enough, and the user experience of a polished piece of equipment is much better than my hacked together load. The final 20% of work in a project takes 80% of the effort, and my interest in the project was diverted elsewhere.One thing to note about the effective bandwidth of a dynamic DC load is, the rise time increases and effective bandwidth decreases with a smaller amplitude pulse, and that's the reason the bandwidth tests were done at the maximum current amplitude I was comfortable with testing. In this respect, the professional load's programmable slew rate setting (independant from the current amplitude) is much more useful and more predictable than saying e.g. my load and do 1us rise time at 20A, but who knows how fast / slow it is at 2A.I did my dynamic load project mostly as a skill building exercise, (and for the ego boost of one-upping Jim Williams' design).

author: ifonlyeverything
author_rank: Regular Contributor
timestamp: November 13, 2022, 02:26:47 pm
content: Does anyone have an example of how constant current and constant power would be implemented in analog hardware -- is this just done with analog multiplier ICs? Or is this always done in software, even in big $$$ electronic loads?