For me this is one of those situations where the more you learn, the more you realize you don't know.
Excellent! Once you begin to get a flavor for how little you might actually know, you can begin to fill in those gaps, however small a piece at a time.
I was actually ill advised by someone on stackexchange. Thank you for the correction. I thought he was correct, being the MOSFET wasn't on for the entire time period it could handle the pulses of current, gradually charging the inductor over 1/5 of a second rather than just hard switching at the full 12V. However now that I've actually done the calculations since reading your reply, the heat dissipation would probably cause the MOSFET to explode violently.
My original idea was to engineer a soft start by gradually increasing positive pulse width (which I think a youtube I saw video recently confirmed) until the VBOOSTED arrived at the peak voltage of 400V, then the comparator would modify the duty cycle to keep it at that point. That's actually a simplified rundown because it doesn't just increase the duty cycle like that. There's a bit of transistor logic and RC timing incorporated into that circuit. Once I've removed that bad advice from the original schematic, I'll post it.
Would you say that's a step in the right direction?
Yes. But more to the point: what are you
really controlling?
If you're charging an inductor, and when the charge (current) gets too high the transistor blows up...... why not just stop charging when it's "full"?
In other words, measure the switch current, and turn off the switch when it reaches some peak value.
The circuit is an RS flip-flop connected to the transistor (with gate driver). An oscillator periodically pokes S, turning on the transistor. A comparator monitors current, relative to a threshold, and hits R when triggered.
Even if the inductor current stays high between pulses, the transistor will never stay on longer than the propagation delay of the comparator, f/f, driver and switch. Which can be on the order of 100ns, nowhere near enough time to destroy the transistor (at least, from just one hit).
Bonus: as you vary threshold voltage, the peak current, and therefore output power, varies proportionally. Well isn't that handy?
Suppose you control it so that input current is proportional to input voltage -- now you have your basic PFC!
(There are some added tricks to realize a full PFC: you need an outer voltage feedback loop, which varies the gain of the inner current loop, gradually (a time constant of several line cycles), so the output voltage can be stabilized without interfering with the ripple that the PFC section has to create. Feedforward compensation is normally used as well, to keep the loop stable over wide changes in input voltage.)
Oh, I'm aware that LTSpice will allow a 2N2222 to operate at 1000V with 50A going through it with no problem .
Hmm, well -- depends. SPICE is capable of modeling breakdown voltage (though not the latching avalanche breakdown that can occur in BJTs), and the hFE reduction at high current.
Not all models are made equally. And cheap or shitty parts tend to have shitty models. Nevermind that they've made, I don't know, a billion dollars worth of that part over the last half a century.
For instance I designed a simple phase shift oscillator in SPICE that worked like a charm, but on the breadboard I had to add 3 more resistor, capacitor stages then it actually worked, I even added a schmitt trigger and made a square wave output with a variable duty cycle. SPICE was wrong about the oscillating frequency as well . In fact SPICE let me put just about any resistor or capacitor values in and still worked.
You say "worked like a charm", I say "didn't model reality worth diddly squat".
It's ultimately your responsibility to verify the models you put into your simulations, that they behave reasonably, and that your whole simulation is realistic.
You can easily build a bunch of chaotic nonsense with dependent sources, but that doesn't make it real.
Here's another model:
The left side is what I built. It happens to be an oscillator! Q4 collector voltage wiggles around maybe 0.5V at 30MHz (pretty fast for a TIP31, huh?). (Oh FYI, MJD31C is the SMT version of TIP31C, and C is just the voltage grade in the TIP31 family. Pretty much same things electrically, other than that.)
The right hand stuff is what I had to do to the circuit to make it "behave". The inductances and capacitances correspond to lead inductances and device capacitances; except that, the inductances are far too large to be representative (by about 5 times), and the model already has capacitance parameters in it, so I shouldn't need to add more outside!
I suspect the problem is a transport (charge diffusion) effect inside the TIP31, causing real delay or something like that, which is enough to shift the poles into the right half plane. SPICE doesn't do this. Notoriously, SPICE has no support of transport phenomena, besides one-dimensional transmission lines, which are something of a hack anyway. Instead, SPICE represents charge as a dependent capacitor. But a capacitor can be discharged instantly, and has no delay (it adds a derivative, but not a time displacement), while a junction cannot.
Other times, I've had overly optimistic results: this amplifier
https://www.seventransistorlabs.com/Images/WidebandAmp.png showed 300MHz bandwidth (-3dB) in SPICE, albeit with no particular attempt at replicating real parasitics (likely, trace capacitance is a pF or two on most nodes, resulting in not quite half the bandwidth). The real one measures 100MHz, though.
IIRC, noise did come out okay though. (The figure shown is measured.)
I totally agree. However when I post a schematic with a bunch of BJTs in it, I get people telling me that the schematic is convoluted and I should just use ICs. If I can't find an IC that does exactly what I want and IC's will almost always take up more space in my case (simple logic gates, etc. and I don't have the many of the requirements for surface mount components), so why not use BJTs? I'm using breadboards(never for power conversion) and perfboard.
Haters to the left...
To be fair, drawing everything out, discrete, is tedious and not very productive. I might explore a circuit that way, or breadboard it, but where simple functions are needed (amps, comparators, logic), I always reach for ICs when it's time to implement it for real.
Tim