Help needed - Shunt Regulator - Doing labs in sim due to social distancing

crutschow

Joined Mar 14, 2008
34,420
Here's the transient response
You need to zoom on the transient response to better see any overshoots.
Try a 120ms simulation time with the start at 90ms.

When compensating a circuit I test both the AC response and the transient response after each change so that both are optimized.
Sometimes the AC response will look okay, but the transient response does not.

Below is my transient simulation with R5 removed, but with a resistor added in series with C1 for good response.
That provides a lead-lag compensation which is often useful in stabilizing op amp circuits.

Edit: Forgot to post the sim. Here it is:

1586072538024.png
 
Last edited:

MrAl

Joined Jun 17, 2014
11,474
R5 cuts some of the gain of the circuit which is essential to keeping it stable and at the same time not slowing it down too much. I dont know if it is the right value but that's what it does.

Now the main idea there is to get a gain that is compatible with the circuit and load. To be sure you would do a complete analysis of the system as a feedback system and see what gains causes oscillation and what gains do not. There will be a point where the gain reaches a value that causes the circuit to actually become an oscillator rather than a regulator. Below that point the circuit should be stable.

To start you can think of the transistor as a gain stage and make a block diagram then analyze it.
 

ci139

Joined Jul 11, 2016
1,898
Sometimes the AC response will look okay, but the transient response does not.
i have also noticed that while testing the quartz oscillators - usually , the reason behind is either too low (output) power to "charge" the "RLCC" tank or in the lesser occasions ?what it seems - a false bias versus " saturated/'over-defined' " output (too high output power)?

+ a poor (but the best i've managed to set up so far) the К554СА3(LM311) sub circuit model (has a more realistic I/O range than the netlist models in the internet)
& the AN6914(LM193) might be slower than the original thing (but likely also with the more realistic I/O responce)
K554CA3 - CLM - Test - Q110-mp.gifK554CA3 - CLM - Test - Q112-mp.gif
 

Attachments

Last edited:

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
You need to zoom on the transient response to better see any overshoots.
Try a 120ms simulation time with the start at 90ms.
Thanks for posting your simulation.

I've run as you suggested and even zoomed in... it appears to be rock solid:

1586096079045.png


1586096098511.png

Also I'm trying to keep the circuit performing so that we can still use the Vout formula which is based on the current through R3/R4 divider and the resulting voltage divider that compares this to the reference voltage set by the zener. Here's the calucation:

1586096248776.png

I've tried to stabilize without affecting the relationship for voltage out.

Here is another way of looking at it:

Vin- = 5.1 and stiff
Therefore V+ is 5.1. Then follows 5.1/3.9k is 1.3075mA
V dropped at Top is 1.3 mA x 10k = 13.075V
Therefore Vout is 18.18V
Or 1.3075mA x 13.9k = 18.18V

Thank you all for your insights I am gaining better understanding of this circuit and what the parts are doing.
 

crutschow

Joined Mar 14, 2008
34,420
You should specify the V3 rise and fall times to be other than 0 (for which LTspice actually uses about 1/10th of the pulse period).
1μs or less is a good value for this transient test.

Also you should use a reasonable number of steps per decade in the AC analysis such as 1k instead of the 0.1 you used.
 
Last edited:

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
Oh, I thought I did that... here's the result. It looks very close to the response from a PID circuit I'm working on:
1586098244124.png
 

MrAl

Joined Jun 17, 2014
11,474
Hello,

You also need to vary the beta of the transistor to make sure it is always stable. If the beta rises it means more loop gain. It might be necessary to provide feedback so the transistor gain stays roughly the same.
In the root locus plot below we can see what happens when the gain K increases. The system is either stable or relatively stable until the gain K rises and then it becomes oscillatory even though technically still stable until finally the gain K rises too much and then it becomes completely unstable.
The point where it becomes oscillatory but still damped is just to the left of the red line, and just to the right of the red line it becomes very unstable and therefore not usable at all.
The root locus plot shown is for another system but that's how they all work. We vary the gain K and see what happens.
To simulate this you can either vary the beta or add another gain stage starting with a gain of 1 and increase up to maybe a gain of 2 and see if it remains stable. Also if the gain goes too low it may not regulate properly even though still very stable.
This plot shows gains from 0 to some maximum where K increases in the direction of the two green arrows.

What might work better is to modify the circuit to use a PNP transistor instead. The gain should be more constant then.

RootLocusFS-1.gif
 
Last edited:

MrAl

Joined Jun 17, 2014
11,474
Here is an example of a PNP shunt regulator.
You'll have to modify it slightly to fit your power supply type and reference type.
The output of this one is 5v.
Transistor is 2N4403 but probably any low power PNP will work.
This eliminates the problems associated with a changing gain.

ShuntRegulator_20200406-1.gif
 

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
this is interesting.. @MrAl, Initially I played around with beta and found that the opamp was able to adjust the gain of the BJT so it caused some confusion in understanding. I see that the transistor has its own gain causing the oscillation issue when the circuit has enough gain due to the phase shift cause by two poles. I haven’t dug into calculations of the miller capacitance causing poles but it’s my guess.

I have to start work on my lab write up for my series pass and series pass with current limiting lab, but that one is pretty simple. I will build a model for your PNP shunt and try to understand why gain isn't a factor in that one.

I see you’re approaching this like the PID system with K controlling the system. This is a good way to analyze and explain why my PID circuit becomes unstable when I amplify the various K parameters in the circuit and in our regulation circuit.
 
Last edited:

MrAl

Joined Jun 17, 2014
11,474
I didnt realize this was the homework section either but now you have an interesting challenge: figure out why the PNP version is transistor gain independent.
I meant to do a root locus on your original circuit too but didnt get that far yet.
I'll wait till you make more progress too since this is the homework section.
 

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
It's in the homework section because I was trying to get a homework circuit to actually work. My homework is complete which was already posted in #1. I have issues with the circuits in our problems that do not work (it's happened before) so no longer homework, just trying to understand this better. We glossed over shunt regulators in class... was only couple slides and will not be tested on it.
 
Last edited:

MrAl

Joined Jun 17, 2014
11,474
It's in the homework section because I was trying to get a homework circuit to actually work. My homework is complete which was already posted in #1. I have issues with the circuits in our problems that do not work (it's happened before) so no longer homework, just trying to understand this better. We glossed over shunt regulators in class... was only couple slides and will not be tested on it.
Oh ok great.
Well i did a preliminary root locus and surprisingly the NPN version looks stable too, so the problem must be coming in with the response of the op amp. I went all the way up to a beta of 2000 and still stable.
In that study though the op amp was given as ideal so it must be the real life op amp that causes the instability. We'd have to model the op amp more accurately to see the instability with increased beta that you are seeing in the simulations. Or maybe it just so happens that the shunt version is more stable than the series regulator counter part to begin with.
This turned out to be interesting i might take it farther.
 

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
It's stable now but wasn't when we first started. here's the original circuit (that was in the text book) before we added things to fix it. I'm glad there are others interested in things like this. Thank you for your contributions.

1586189563199.png
 
Last edited:

MrAl

Joined Jun 17, 2014
11,474
Oh no wonder :) The feedback must connect to the non inverting input because for one the transistor adds an inversion, and two when the output of the circuit goes higher the output of the op amp must go higher and there it goes lower instead. So there is positive feedback.
 

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
Sorry that was one of the test ones I found it here and was trying it. Youre right it looks like a comparator. It didn’t work well and when it did, wasn’t even close.
8AE8ED9F-583D-4A08-87F4-8858EB7B88DA.jpeg


This is the one from our book, there were a few issue, up to now we used the 741 and it’s not rail to rail and gain Is too high.

FC960308-54C6-4D4F-AA6F-29A8955A2D0B.jpeg
I like to get the ones in our text book working when I have time, it’s challenging.
 
Last edited:
Top