Loop compensation and Bode plots?

142 views
Skip to first unread message

Paul Andrews

unread,
Aug 10, 2017, 5:59:27 PM8/10/17
to neonixie-l
Hi,

I decided to try to make my own boost converter. You know. How hard can it be? Anyway I have gone down a rat hole with trying to understand how to calculate R/C values for loop compensation (in the following, bear in mind that I am not an electrical engineer). One chip I am looking at is the LM3478, which happens to have an application note that explains exactly how to do this (http://www.ti.com/lit/an/snva067c/snva067c.pdf). At least that is what it claims, but I worked through it's example and made a Bode plot using the values it shows for the example zeros and pole. But the plot I get looks nothing like the one in the note.

Basically They calculate a couple of zeros and a pole:

wz1 = 133,333 rad/sec 
wz2 = 420,875 rad/sec
wp1 = 833 rad/sec

I set up the equations in spreadsheet and get these same values for their example circuit.

So I put those into an online bode plotter (e.g. http://www.onmyphd.com/?p=bode.plot). And get a plot that doesn't look like their figure 2. 

If anyone is feeling particularly kind could you point out what I am missing?

Thanks - Paul



gregebert

unread,
Aug 10, 2017, 7:01:26 PM8/10/17
to neonixie-l
Have you considered using devices from Linear Technology (now Analog Devices) ? You can run extensive simulations with LTSpice, using accurate models for their ICs (I assume they are encrypted spice models).

I dont do bode plots for any of my designs; instead I rely heavily on spice simulations and run a lot of corner cases, varying component values, etc.  As your design improves, you will see that overall behavior is not sensitive to component values. For example, I'm working on a DCDC converter and I had horrible ringing; changing a capacitor value 2X had a major impact on the ringing. After some other fiddling, even a 10X change in capacitance no longer increases the ringing appreciably.

One thing to really watch-out for is inductor current; make sure you stay well-clear of the saturation current (Isat) spec for the device. If you are using a transformer (coupled inductors) , make sure your circuit works nicely with non-ideal conditions such as finite DC resistance (usually in the datasheet), and non-ideal coupling (K < 1). All kinds of bugs come crawling out of the woods; much easier to deal with them with a simulator than a real circuit on your workbench.

Paul Andrews

unread,
Aug 10, 2017, 7:32:31 PM8/10/17
to neoni...@googlegroups.com
Yes. I've got 3 different linear tech devices on my list. The LM3478 actually has an LTSpice model and the Wurth flex transformer I'm using does too (from TI and Wurth respectively). The circuit I put together simulates just fine, so I'm just trying to increase my level of confidence in it at this point (plus I don't like not being able to do something!). What I haven't done is simulate it with a varying load, yet (although, lets face it, the load isn't going to vary much over a short timescale). I also need to check the current going through the transformer against the specs.
--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/eBV1MATHn34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/b8da15bb-051c-4f48-948a-deb4d20e4482%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nick

unread,
Aug 10, 2017, 10:03:16 PM8/10/17
to neonixie-l
Varying load is easy - parameterise the load and use the .step param [name] list val1,val2... command.

Nick

gregebert

unread,
Aug 11, 2017, 1:07:11 AM8/11/17
to neonixie-l
Make sure to look carefully at corner cases, like max-load at min-input-voltage (typically causes max inductor current).

From the app-note, I see there is a discrete NMOS transistor, and thankfully a single inductor (not transformer), so your modeling is easier. Be very careful about the voltage spikes across the NMOS device; you must never allow Vds to exceed the  max-spec value, which often derates at higher temperature.

There are a lot of devices with low Rds(on); when I say low, I'm talking below 50milliohms, but they often have higher gate-source capacitance and require higher gate-drive voltage. This will put some constraints on the gate-driver. So, tradeoffs need to be made. I'd suggest picking a device with a low-enough Rds(on) such that it's power-dissipation does not cause significant heat-rise with a small heat-sink.

Using the tiny PCB-mounted devices is tricky for thermal reasons; I prefer TO-220 packages or similar.

There's a lot of really good info in the TI datasheet, appnote, and the IRF7807 datasheet. Once you read thru all of that you will have a good understanding. Just be aware the IRF7807 wont give you nixie-level voltages as t's rated for 30V max.

Paul Andrews

unread,
Aug 11, 2017, 8:14:47 AM8/11/17
to neonixie-l
Thanks. I will check.

I wish I had a faster computer. It is taking about 15 mins to do a 8ms simulation ATM. I wonder if there are any online versions? Hmm. I wonder if I could use my own online servers or Amazon cloud? I've never used my own servers for anything other web hosting/svn etc.

gregebert

unread,
Aug 11, 2017, 12:42:40 PM8/11/17
to neonixie-l
You really only need to run until the transients have settled-out.  The design I'm doing now runs at about 50kHz, and it takes 1-2 minutes to reach 15msec. Most of the transient activity ends around 3-4msec, but the runtime isn't a nuisance yet.

Is the simulation running really slow in 1 particular spot ? I see that happen a lot during the initial design, and it's usually caused by increased computations to handle discontinuities. Changing pulses from near-zero rise/fall times to a realistic value, and adding some parasitic series resistance can help. Also, having additional DC-paths around caps and inductors helps; 100Meg resistors in a few spots can work wonders. There is a gmindc parameter that effectively puts resistors to ground everywhere to help with convergence, but I dont use it.


I believe this converter runs up to 1Mhz so if you are running that fast you may not need 8msec. If you do run that fast,  be careful with component selection, as many power inductors undergo self-resonance in the Mhz region (see datasheet), and skin-effect will increase the resistance. And then there's capacitors; aluminum electrolytics are too inductive at that frequency so ceramic is a better option.

Nick

unread,
Aug 12, 2017, 3:52:35 AM8/12/17
to neonixie-l
That doesn't sound right - If you post your stack I'm sure one of us with more LTspice experience may be able to help. The LTspice Yahoo! group is also an excellent resource for advice - the LTspice developers hang out there and that's where the real knowledge is.

Nick
Message has been deleted
Message has been deleted
Message has been deleted

Paul Andrews

unread,
Aug 12, 2017, 9:32:18 AM8/12/17
to neonixie-l
I am using an LM3478 library and a Wurth flex transformer library. I suspect that is where the time is going. I have zipped up the .asc file and the aformentioned libraries (though the Wurth ones were pulled out of the LTSpice library folder, so they are in the wrong place!). Hmm, I guess I can't post replies that have a file attachment? I'll try and stick it somewhere else accessible.

I signed up to the Yahoo group a while ago, but haven't had time to poke around in there since.

Anyhow, this was really supposed to be about the Bode plots for the LM3478, so if you get time to look at my model that would be great, if not, that is OK too - especially given that you would probably have to re-attach the libraries!

BTW - the FET in there is a place-holder. It was a quick pick from the list that came installed with LTSpice. Selecting the FET seems like the hardest part of this as the parameters I am interested in aren't pulled out in the selection criteria at Digikey, and even when I find a candidate I want something that has a spice model. I seem to remember that I bookmarked a page that explained how to create one from the datasheet though. This seems like it would definitely be a topic for the Yahoo group, on the other hand if you guys have a suggestion, I will just go with that - I need to remind myself that this is a learning experience at the moment - I'm not striving for perfection, just something that will meet my own criteria (5V and no more than 1.5V in, roughly 180V, 0.018A out, though l will settle for less!).

Paul Andrews

unread,
Aug 12, 2017, 9:35:41 AM8/12/17
to neonixie-l
I put a file (MyHVPS.zip in the temp folder of our google drive).

Nick

unread,
Aug 12, 2017, 10:50:23 AM8/12/17
to neoni...@googlegroups.com
Hi - Your LM3478 symbol pinout was wrong - you've got pins 5 - 8 flipped...

Its a slow deck for sure - I'll have a play with in in the next couple of days.

Also attached slightly reformatted schematic to compensate for change in the ASY file.

Annoying that the PSPICE model from TI has a different pin order to the IC itself...

Nick
HVPSTransformerLM3478.asc
LM3478_TRANS.asy

Paul Andrews

unread,
Aug 12, 2017, 12:16:53 PM8/12/17
to neonixie-l
I tried running this version, but the simulation window doesn't open and I can't place probes on the circuit. I looked in the .asc file and fixed up the path to the wurth model, but it made no difference. I have no idea how to get that window back.

Also, the values of caps that were uF became odd characters. What version of LTSpice are you using on what OS?

Nick

unread,
Aug 12, 2017, 12:21:42 PM8/12/17
to neonixie-l
LTspice XVII(x64) June 19 2017 version on Windows 10 Pro 64bit.

I always run a very recent version

Maybe the upload somehow corrupted the files.... I'll zip them.

Nick

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Nick

unread,
Aug 12, 2017, 12:56:34 PM8/12/17
to neonixie-l
Uploaded MyHVPS-NMdS.zip

Nick

unread,
Aug 12, 2017, 11:15:20 PM8/12/17
to neonixie-l
In LTspice, if you go to Tools -> Control Panel, the select the Netlist Options tab, in the Style/Convention area click the Convert ... tickbox - that will make your capacitor values look ok - modern versions of LTspice convert "u" in component values to the Greek letter mu (i.e., "micro")

Where did your Wurth transformer model come from? The only ones I could find are from http://katalog.we-online.de/de/pbs/WE-FLEX#vs_ct:1 and don't include the model you are using - which specific transformer is this?

Nick

Paul Andrews

unread,
Aug 13, 2017, 12:40:23 AM8/13/17
to neoni...@googlegroups.com
Hi Nick,

I will check when I get back to my computer.
--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/eBV1MATHn34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.

Paul Andrews

unread,
Aug 13, 2017, 10:29:17 AM8/13/17
to neonixie-l

Paul Andrews

unread,
Aug 15, 2017, 5:48:18 PM8/15/17
to neonixie-l
BTW the zipped model works fne.

Nick

unread,
Aug 16, 2017, 11:24:53 AM8/16/17
to neonixie-l
On Wednesday, 16 August 2017 01:48:18 UTC+4, Paul Andrews wrote:
BTW the zipped model works fne.

That's good - have you seen this article: http://www.linear.com/solutions/5788 ?

Nick

Paul Andrews

unread,
Aug 16, 2017, 12:11:24 PM8/16/17
to neoni...@googlegroups.com
No I hadn't seen that. It looks very useful. Thanks. 
--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/eBV1MATHn34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages