Design resources for pure sine wave inverter - Page 1
Forum section: electronics / projects

author: rx8pilot
author_rank: Super Contributor
timestamp: October 02, 2016, 04:15:16 am
content: does anyone have recommendations for any design resources on pure sine wave inverter designs? I have a project that I am starting that needs 12-24VDC to 120VAC 1000-1500w pure sine wave inverter integrated into an existing design with unique size and shape along with a special thermal management to make it as quiet as possible.I have been looking for books, white papers, or anything else that can help guide my first try at this type of design. So far I have not found much other than a TI white paper. Power electronics are not new to me - it is how I am currently making a living and I am fairly well configured with test equipment for this task. My previous projects are designing specialized power management devices so I have had to build numerous SMPS designs, monitoring, fault detection, switching, etc.I do not want to re-invent anything if I don't have to so I am looking for common topologies, controllers, etc. Efficiency will be my biggest challenge since it needs to be both small and quiet. Fans are big and loud. The better the efficiency the easier it will be to accommodate the thermal reality.

author: ebclr
author_rank: Super Contributor
timestamp: October 02, 2016, 09:17:03 am
content: The basicshttp://www.egmicro.com/download/EGS002_manual_en.pdfhttp://voron.ua/files/pdf/micoshema/EG8010_datasheet_en.pdfhttp://www.infineon.com/dgdl/ir2110.pdf?fileId=5546d462533600a4015355c80333167e

author: PChi
author_rank: Frequent Contributor
timestamp: October 02, 2016, 10:30:51 am
content: Another design resource ishttp://www.st.com/content/ccc/resource/technical/document/application_note/fa/f1/fe/3d/81/1e/47/45/DM00050692.pdf/files/DM00050692.pdf/jcr:content/translations/en.DM00050692.pdfIs cost and issue or can money be thrown at the problem? Unsurprisingly thehttps://www.littleboxchallenge.com/winner used expensive components.Are you trying to achieve a high power density?What EMC regulations need to be met?

author: MagicSmoker
author_rank: Super Contributor
timestamp: October 02, 2016, 12:37:17 pm
content: There are many ways to skin this cat, but the most popular approach is to cascade two converters with the first stage stepping up (and, optionally, isolating) the DC supply voltage to provide the appropriate bus voltage to a PWM'ed H-bridge switching at some multiple of the desired mains frequency. The output of the H-bridge is then passively filtered to provide sinusoidal AC.The first stage is usually a two-switch forward (or several of them in parallel, preferably interleaved) as this topology is nearly bulletproof, but also commonly used are the current-mode push-pull, the current-fed push-pull, and for the real bargain basement approach when isolation isn't needed, the tapped inductor boost.Another approach that appears to be popular with solar microinverters is to LF sinusoidally modulate the HF step-up/isolation stage then use a thyristor bridge "unfolder" switching at LF to parcel out the modulated HF square wave voltage. This is less expensive and takes up less space because no DC link capacitance is needed, but can't deal with poor power factor loads too well. Frankly, it's a puzzle to me why this ever became popular and I would recommend against it; I'm mentioning it now because you'll no doubt see references to it in your research.The EG Micro IC referenced above is a designed and made in China "ASIC" that combines all the major functions I oulined in the first paragraph along with a pushbutton and LCD user interface. I have no experience with how reliable it is, specifically, but straight from China DC-AC inverters are notoriously unreliable. I would not, for example, use crappy little bootstrap gate driver ICs for anything mission-critical and/or which handles more than a few dozen watts. Also note that most (all?) bootstrap drivers are incompatible with the two-switch forward (or flyback) topology as they rely on the upper and lower switches being switched in complementary fashion (there are ways to get around this, of course, but once you have to resort to such hacks it kind of calls into question the use of the bootstrap IC in the first place, eh?).

author: rx8pilot
author_rank: Super Contributor
timestamp: October 02, 2016, 04:01:16 pm
content: Thanks for the starting points!Adding some additional information may help as well. This project is not particularly cost sensitive, but not at the level of specialized military or aerospace either. It is an industrial/commercial application and there is an expectation of high reliability. I have been designing some high-frequency high density converters based on eGaN FETS and would consider taking those lessons to this project as well if it will allow me to shrink the overall solution. The eGan FETs are very expensive but offer numerous advantages. They also require a very good design to actually take advantage of them. The extremely fast switching also creates EMC challenges.I have not read any of the EG data yet, but I would be nervous designing with a Chinese part unless it had a lot of support and proven history in critical/difficult applications. I would sooner roll my own with a uC and have complete control of the system (although that is a much longer design cycle). I am surprised there are seemingly not any off the shelf controllers from Linear, Maxim, and some other of the usual suspects.

author: jbb
author_rank: Super Contributor
timestamp: October 02, 2016, 07:46:50 pm
content: This should be an interesting project for you.I know what you mean about reference material. There is a lot of excellent stuff behind the paywall in the IEEE XPLORE database (>100 years technical papers) but it's hard to get at. A good introductory reference book for controls is Digital Control of Power Electronics by Buso and Mattavellihttp://www.morganclaypool.com/doi/abs/10.2200/S00637ED1V01Y201503PEL007?journalCode=pel.I generally like the C2000 series devices from Texas Instruments as they offer moderately good ADCs and really good PWM channels. Depending on your switching frequency, a 60 MHz device can probably do the business. (I suggest the 150MHz Delfino devices if cost isn't critical.) In my experience, most of your software effort will go into system configuration (managing ADC / PWM / relays, protection, ADC calibration, UI) and the control algorithm will actually be moderately easy to implement.I recommend sampling the ADCs twice per switching cycle - that way switching ripple will not be aliased back down to near-DC where you can't filter it out. Also, taking the time to build a basic signal recorder in can be very valuable (like a software-defined oscilloscope).In terms of the topology, I highly recommend isolating the primary and secondary!Isolated 2-switch forward does have some plusses (doesn't explode with a shorted switch, no shoot-through risk, apparently used in aerospace) but limits duty cycle to < 50%. Given your battery input current will be 100A or more, the RMS currents will be unacceptably high (>140A).Hard switched full/H bridge offers near 100% utilisation but will penalise you for leakage inductance - careful transformer design required.Some of the (quasi-)resonant types are interesting, e.g. LLC, phase-shifted full bridge as they actually use the transformer leakage current to commutate the switches.I would suggest the hard-switched H bridge as the input voltage is quite low and RMS current will be high. Whatever topology you use, make sure it can limit the inrush current to the main DC link capacitor bank, which will be at 0V when you first switch the power on.Your DC link will have to be a large capacitor bank. It will need to store enough energy to a) prevent 120 Hz (2x 60 Hz) ripple from getting back into the DC-DC stage and b) provide plenty of energy reserve for AC loads with inrush currents. You'll also need to leave some voltage headroom for voltage drop in the filter inductor and control margin.Your AC output stage presents some options. I would recommend against the 'unfolding' types with 4x SCRs at there output because they are bad at harmonics and non-linear loads. The classic H-bridge converter is a standard choice here, and for good reason. Be aware that Superjunction MOSFETs (e.g. CoolMOS) have bad body diodes with HEAPS of reverse recovery charge Qrr, which can make them a bad choice. Estimate your switching losses (on, off, reverse recovery) when evaluating devices.oh ****, Im late for work!

author: MagicSmoker
author_rank: Super Contributor
timestamp: October 02, 2016, 08:27:10 pm
content: Quote from: rx8pilot on October 02, 2016, 04:01:16 pmYou're welcome. FWIW, a personal project I've got on the stack of things I'd like to get done before I die is a "backpack" Li-ion battery + inverter for running electric mowers, weed eaters, etc. It has absolutely no commercial viability - mainly because there's already Li-ion battery powered lawn equipment on the market - hence why it is a personal project...Quote from: rx8pilot on October 02, 2016, 04:01:16 pmThat doesn't change my recommendations too much, as I assumed you were competent - or at least old enough to take personal responsibility for your mishapsAs for using GaN to push the switching frequency up near (or past) the MHz level, I suspect that will be a waste of time bcause no matter how you slice things you need to deal with 100A+ input current, and therefore you will either need to use physically large conductors (including transformer windings) or else parallel multiple lower power converters together; ie - lots of volume required. Also, there is precious little benefit in PWMing the H-bridge that creates the bipolar AC waveform at an arbitrarily high frequency; usually 100x higher than the LF mains (ie - 6kHz) is more than enough, and a 1000x multiple is verging on ridiculous. Yes, the passive filter components get smaller as PWM frequency goes up, it's basically a diminishing returns kind of problem.Quote from: rx8pilot on October 02, 2016, 04:01:16 pmYeah, that's my feeling on the EG8010 part as well, but it is damn near a complete solution and very inexpensive so if you have the luxury of trying a few different approaches here it might be worth rolling a prototype with it.I'm also surprised there aren't any COTS ICs that do this... Also, a PFC controller that can deal with 3 phase AC input has been on my xmas wishlist for years now.

author: MagicSmoker
author_rank: Super Contributor
timestamp: October 02, 2016, 08:37:35 pm
content: Quote from: jbb on October 02, 2016, 07:46:50 pmI pretty much agree with your entire post. I'll just add that the duty cycle penalty for the two-switch forward often won't result in too much of an increase in the size of the transformer once switching frequency is high enough that the usual ferrite grades will be core loss limited (ie - >40kHz or so), rather than saturation limited. Also, interleaving two two-switch forwards together would drastically reduce the ripple current reflected back to the source and is probably necessary anyway if the entire circuit will be board mounted as dealing with the entire 100A+ input current with one converter (whether a two-switch forward, full bridge, PSFB, etc.) would be nightmarish.

author: rx8pilot
author_rank: Super Contributor
timestamp: October 02, 2016, 11:54:32 pm
content: I agree that isolation is mandatory.The currents in this project will be higher than anything I have dealt with before - should make for a nice learning experience. I am very good at avoiding electrical shocks, fires, and blowing up test equipment - hopefully I can keep that streak going. Do you suppose that running parallel DC converters is a reasonable solution to divide the current requirements into more manageable magnitude? I have never needed to do that before.I am considering the uC route since it will be so easy to hang the various monitoring and protection tasks while streaming the data to the rest of the system. Since I don't see much out there that is ready to go, not sure there is much choice but to roll my own control system.

author: Phoenix
author_rank: Frequent Contributor
timestamp: October 03, 2016, 02:05:32 am
content: Quote from: rx8pilot on October 02, 2016, 11:54:32 pmDefinitely. I'm a big fan of TI's C2000 series as well, particularly the Piccolo range (floating point makes control loops quick and easy, the CLA is good for separating control and system tasks). I've used quite a few of their micro's C240, F2810, F28035, F28069 for various power electronic/inverter/motor drive topologies. The Delfino are more complex and expensive, but also more powerful (significantly faster clock helps with PWM freq and resolution).

author: jbb
author_rank: Super Contributor
timestamp: October 03, 2016, 03:31:58 am
content: Quote from: MagicSmoker on October 02, 2016, 08:37:35 pmQuote from: rx8pilot on October 02, 2016, 11:54:32 pmYes, paralleling multiple small converters can be extremely effective. If you phase shift the carriers you can get ripple current reduction (and even cancellation at some duty cycles), which reduces system size. If you use Continuous Conduction Mode (CCM) converters you'll probably want a current control loop per converter so they share the load. This will require more current sensors etc. In contrast, Discontinuous Conduction Mode (DCM) converters can share among themselves if you're careful. In general, CCM converters have higher switching losses and may have slightly smaller magnetics. DCM converters have lower switching losses and possibly larger magnetics (due to core loss).As you're making a battery pack, I thoroughly suggest you use a higher input voltage like 24V.You can also split the DC/DC converters as an inputs-in-parallel / outputs-in-series configuration. This reduces transformer turns ratios, and forces current sharing. Assuming a DC link around 240V DC, you could do: 2x 24V 25A -> 120V 5A. Inputs in parallel, outputs in series, Tx ratio approx 1:5. A center-tapped transformer secondary and half-wave rectifier could be used to reduce diode losses.On the DC/AC side:I recommend you look around 20kHz because it's above audible (remember that, even if your ears aren't what they used to be, there are other people around). The magnetics can then be quite small.In order to avoid problems with MOSFET body diodes, you can make asymmetric half bridges. The low side switches can be CoolMOS for fast switching & good conduction loss. The high side switches can be IGBT with quality anti-parallel diodes (silicon ultrafast or Silicon Carbide (SiC) Schottky). By using high frequency PWM on the MOSFETs only, and switching the IGBTs at line frequency, you can make a compromise between good conduction losses and good switching losses.I have another option I'll write up tonight in case you feel adventurous.(Edit: added comments on DC/AC switches)

author: Phoenix
author_rank: Frequent Contributor
timestamp: October 03, 2016, 04:02:13 am
content: Quote from: jbb on October 03, 2016, 03:31:58 amA couple of things to consider before selecting a topology are the reactive power requirements and if the circuit is earthed (for common mode).Under reactive loads the anti-parallel diode conducts during the time when the volts are positive and amps are negative and vise-versa. This is one of the reasons why IGBTs are still preferred in many applications. New wide band-gap devices also have some interesting reverse conduction characteristics you need to be aware of. As always - switching loss vs conduction loss trade-off.A basic HBridge can generate an incredible amount of common mode voltage. If it's a problem (usually when part of the circuit or load is earth referenced) it can be overcome with different PWM strategies, a different topology (e.g. H5, H6, HERIC, NPC) or more sophisticated filter structure.

author: jbb
author_rank: Super Contributor
timestamp: October 03, 2016, 09:42:50 am
content: Quote from: Phoenix on October 03, 2016, 04:02:13 amOooh, yeah. The HERIC etc. are quite interesting and much better than the simple H-Bridge for common mode. For a transformer-isolated system the common mode (CM) may not be too bad if the input-output capacitance of the DC-DC converters is low.If you end up with too much common mode then you could get a tingle when you touch your tool.......I mean, the incidental current path back through your body to the backpack could exceed the perception threshold.If you're feeling adventurous you could make a split +/- 240V DC supply, and use a 3-level converter (https://www.semikron.com/dl/service-support/downloads/download/semikron-application-note-3l-npc-tnpc-topology-en-2015-10-12-rev-05) to provide the output voltage. This way the neutral line can connect directly to the mid-point of the DC link.

author: diyaudio
author_rank: Frequent Contributor
timestamp: October 03, 2016, 10:41:35 am
content: Quote from: rx8pilot on October 02, 2016, 04:15:16 am1000-1500w?The hardest part is getting the magnetics right and switching aspects to work properly, the other stuff is common sense, another tip.. stay away from digital, dsp stuff that every one is pitching C2000 ect.. its a waste of time if you a newbie, get the the analog loops, magnetics right first. (the rest will follow) If you have success then move to a C2000 supervisor style implementation.It would be useful look at old APC designs..http://eevblog.com/files/apc_smart-ups_su2200_3000.pdf

author: Siwastaja
author_rank: Super Contributor
timestamp: October 03, 2016, 12:14:55 pm
content: Quote from: rx8pilot on October 02, 2016, 11:54:32 pmC2000 was already mentioned, but I'd like to add that I'm having success with STM32F334, it's well capable of providing almost arbitrary PWM waveforms with its 5-channel, 10-output waveform generation timer with 6 counters and 24 compare registers and 4.5 GHz equivalent timer clock; two 5MSPS ADCs, three comparators, all of which can be configured to work together for peak or valley cycle-by-cycle current limiting or whatever you want. For example, 1MSPS DACs can provide reference levels for the integrated comparators, potentially using a DMA if you want to vary your current limit directly from a lookup table, without CPU intervention whatsoever.For example, I'm getting 8 current measurements from the ADC per cycle, whereas the comparator, sharing the input pin with the ADC, provides peak mode Current-Mode control.

author: rx8pilot
author_rank: Super Contributor
timestamp: October 03, 2016, 07:27:02 pm
content: Quote from: jbb on October 02, 2016, 07:46:50 pmYes, I think it will. While I am a few steps ahead of being a newbie in power electronics - I am far from expert either. That ensures some long nights and burned PCB are in my future. Bring it on. Burned PCB usually coincide with a very valuable lesson not likely learned from reading a book.Quote from: Phoenix on October 03, 2016, 02:05:32 amOne of the sales people from Venable (maybe he was an engineer), mentioned those as well. I am totally unfamiliar with the programming interface of those uC's. Are there any significant hurdles getting into that architecture? Proprietary IDE? Usable libraries? Any other unique challenges with them? Most of my uC experience is with Atmel AVR and XMEGA and a little bit of PIC. All if my designs so far have been all analog control and the uC's are in a monitoring position. It does not appear (only a brief look) that Atmel has an offering that is geared toward software defined power like. There seems to be quite a bit of app notes on the topic - that should keep me busy for a while.Quote from: jbb on October 03, 2016, 03:31:58 amSilly question - is it possible in a software defined system to be able to chose DCM and CCM schemes based on the load?Quote from: jbb on October 03, 2016, 03:31:58 amI will not have control over the source of power, at least not entirely. If I could decide on my own - I would go with 48VDC input.Quote from: jbb on October 03, 2016, 03:31:58 amThat is an interesting thought. That could minimize the size of the transformer and reduce some of the design complexity with current sharing.Quote from: Phoenix on October 03, 2016, 04:02:13 amIs a HERIC topology all about efficiency of the AC output stage? I would assume there would still be the necessity for isolation.http://iceeot.org/papers/OR0334.pdfQuote from: diyaudio on October 03, 2016, 10:41:35 amIt is tough to say. The all analog control is not a simple task either and is a challenge to get it dialed in without a ton of component swaps. At lease with a DSP approach, I can manipulate the performance with non-contact methods and build a LUT to accommodate various conditions and events. In the end after getting the power conversion dialed in, I would theoretically have very easy access to the performance and control parameters that will feed the rest of the system - which is much bigger than just the inverter component. I think I am in for a learning roller coaster either way - analog or digital. I will not know the magnitude of the challenge until I am nearly done.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 03, 2016, 07:47:43 pm
content: Go for the digital route. It's here today, thanks to the extremely powerful yet low-cost MCUs with highly integrated peripherals especially designed for DC/DC converter control. The peripherals today are insane compared to what many people are used to with AVRs and PICs. You can pretty much configure the HW to automatically generate many kinds of response waveforms to analog current events etc., to accommodate most power topologies in existence, including almost any exotic topology you might think of.You can create sequences at sub-nanosecond resolution, answer to current-limit trips within a few tens of nanoseconds, create reference waveforms for the on-chip current limit comparators directly from a memory lookup table, scan a lot of analog voltages directly into memory using fast onchip ADCs with direct memory access, automatically watchdog against illegal analog voltages - all of this without your CPU executing a single instruction after you have set up the peripherals. All of this frees your CPU time completely to crunch PI loops and such.The learning curve for me (with STM32F334) was surprisingly easy when it comes to configuring said peripherals and creating code. The peripherals help me more than they challenge me. However, I had some rather serious hurdles in the beginning, when trying to get the GNU toolchain work at all.

author: diyaudio
author_rank: Frequent Contributor
timestamp: October 03, 2016, 07:57:06 pm
content: QuoteLearning power electronics DSP control theory is no easy task (you are bound to go into recursive research / rabbit holes), also... debugging control power loops is another challenge.... I'm under the impression here is more software babbling then classic power electronics talk. At 1000-1500w no software will fix up snubbing, transformer winding issues (leakage inductance) or reduce switching losses/ PCB Layout. (AND NOT without advance mathematics in control loop compensation..)I'm a fan of mix mode, analog loops with digital supervision. old meets new.But its your time use it how you want to

author: rx8pilot
author_rank: Super Contributor
timestamp: October 03, 2016, 08:15:54 pm
content: Quote from: diyaudio on October 03, 2016, 07:57:06 pmWhile not a power electronics genius - all of my experience so far is pure analog. I have had the hair pulling pleasure of sorting out control loops in theory and in practice. The 'practice' part was remarkably different from the theory part and led me down the path of optimizing the PCB layout and learning how to estimate the remaining parasitics that the theory does not take into account. All of that effort revealed my lack of knowledge in how to measure power electronics on top of the fact that I did not really have the right test equipment either. I have drastically improved my ability to measure power electronics, and have a few charred PCB's from learning control theory. Still a LOT to learn, but I have a fire extinguisher close by.So, at least I have a some power electronics success and failures to draw on and I am not too scared of the coding challenges. That would leave the brain cells available to tackle the DSP scheme itself (I hope).Quote from: diyaudio on October 03, 2016, 07:57:06 pmSo far, that has been my strategy and it is made more practical by all the support for this approach. I have not found any sine wave inverter controllers from the big companies. That means I would have to design from the ground up the entire control system - probably not a short learning curve.

author: snarkysparky
author_rank: Frequent Contributor
timestamp: October 03, 2016, 08:39:11 pm
content: Unipolar or bipolar switching. I would like to hear from some experts. It seems to me that with inductive loads it has to be bipolar switching.

author: rx8pilot
author_rank: Super Contributor
timestamp: October 03, 2016, 09:23:40 pm
content: Quote from: snarkysparky on October 03, 2016, 08:39:11 pmWhat do you mean?

author: jbb
author_rank: Super Contributor
timestamp: October 03, 2016, 09:50:40 pm
content: Quote from: diyaudio on October 03, 2016, 07:57:06 pmYou're right that no amount of fancy software will save you from bad hardware (I've seen it tried...). The reality is you need to do both.In my experience (industrial research work on PV inverters) it's easier to do the controls in the digital domain, assuming you have some experience with writing control software (or want to develop it). However, the provision of analog protection (overvoltage / overcurrent) is a really good idea if you can afford the space.The use of 'advanced mathematics' is really dependent on the designer. For switching frequencies much higher than the line frequency, the really crazy mathematics like model predictive control are not required. However, the Proportional+Resonant controller is very applicable to inverters, fairly easy to perform digitally, and a complete disaster to perform in analog.http://www.jee.ro/covers/art.php?issue=WL1151672308W44a51ff4512f9.Quote from: snarkysparky on October 03, 2016, 08:39:11 pmhttp://www.ijirst.org/articles/IJIRSTV1I7111.pdfSeems like a decent intro to H-bridge modulation. Please note that they talk about THD in there, with great big numbers like 99% THD. This isvoltageTHD. When we add a filter inductor, we filter out the high frequency stuff to end up with a reasonablecurrentTHD. Please note that over-modulation results in significant low-frequency (3rd, 5th, etc.) harmonic content which is very hard to filter out (giant inductors and capacitors required), and should generally be avoided.Assuming hard switching (which is the most common with inverters), the inductance of the load doesn't make any difference to the choice of unipolar or bipolar modulation. Unipolar modulation generates less common mode voltage, which is good. Bipolar modulation generates more common mode voltage (that you must carefully filter) but allows you tohalvethe size of the output filter inductor, which is why it's a very popular choice.The H5, H6 and HERIC (http://iceeot.org/papers/OR0334.pdf)converters someone mentioned previously work by adding an extra semiconductor or two, to allow the generation of bipolar waveforms without making heaps of common mode voltage (i.e. best of both worlds). I think they're patented, but provided you don't intend to carry out ancommercialactivity you can use them.Note on soft switching:Many modern isolated DC-DC converters use it (e.g. LLC). This is because the operating frequency of the internal AC transformer is the same as the switching frequency. This allows the designer to make the current direction reverse during the switching cycle, providing soft switching. This usually results in some moderate increase in RMS current flows.Applying soft switching to DC-AC converters is more difficult because the AC output frequency is way lower than the switching frequency - there is no built-in current reversal for each switching cycle. It is possible to add auxiliary switches & snubbers but this increases cost & complexity. For a first DC-AC inverter effort I would recommend hard switching.

author: MagicSmoker
author_rank: Super Contributor
timestamp: October 04, 2016, 10:51:53 am
content: Quote from: rx8pilot on October 03, 2016, 07:27:02 pmOh boy... it's up to you to decide what you are capable of doing, not any of us, but if you have never coded a control loop much less a complete multi-stage switchmode power converter, then I, personally, would not use this project as a learning tool unless you have a fairly free budget and a year or more to get it done. Assuming neither condition pertains (ie - budget or time), I would only use MCUs to do monitoring and basic housekeeping functions, and modulating the AC inverter H-bridge *after* the power circuit is debugged because you will have a devil of a time trying to figure out if it is a coding or hardware error causing your switches to explode. For debugging the inverter stage - and, perhaps, even for production - I would use a simple carrier-based unipolar sinusoidal modulator; ie, a unipolar 60Hz sine wave reference is compared with a much higher frequency unipolar triangle carrier wave (much higher = 100x to 1000x, and preferably an integral number, though this is not terribly important once the carrier to reference ratio exceeds 50 or so).Oh, and I strongly recommend going with a plain old H-bridge for the AC inverter rather than any of the other funky "IEEE Academic" topologies like H5, H6, HERIC, whatever; 9 times out of 10 that shit only works in MATLAB.So with that said, and assuming one does not have unlimited time or budget or brain cells to expend on the project, my rough sketch of a plan would be:1) First design/debug the DC link converter (ie - what supplies isolated ~170VDC to the AC inverter stage). Suggested approaches are multiple two-switch forwards interleaved and paralleled (NB - I would not plan on wiring the secondaries in series only because that makes debugging the converter design more difficult; save this option for later if time/budget allows) or a single current-mode push-pull converter with foil primaries (the UC2846 is the classic choice of control IC here). Plan on eventually adding an 8b MCU to monitor incoming supply voltage, precharge the input capacitors, handle faults, report telemetry to another MCU and/or UI, etc.2) Next design/debug the H-bridge AC inverter including the output filter, first using the isolated and rectified mains as your DC link, and then using your previously designed and "debugged" DC link converter (you might find your design is not quite as debugged as you thought when you cascade the two converters, even if the H-bridge is more or less running "open loop" [ie - all voltage regulation is done in the DC link converter]). I would first go with a simple sine wave oscillator (phase shift, Wein bridge, "Bubba", etc.) for the 60Hz reference and a discrete high frequency clock and modulator using an LM339 (ie - a high frequency square wave clock -> integrator -> compare with 60Hz reference -> gate drivers). Once the H-bridge and output filter are working well with a variety of loads and gracefully handling overloads only then would I consider using an MCU with a LUT of sine values to do the switch modulation and monitoring/telemetry reporting.EDIT: Note that I made no comments about reducing common mode voltage at the output. Firstly, this is a secondary concern - ie, something to worry about and/or optimize, if necessary, after you get the power electronics bits working. Secondly, this may not be an issue at all if the output of the inverter is only used internally (ie - inside a product, which is what you implied in the OP). The oddball academic and/or patented topologies I dismissed out of hand are mainly geared towards reducing common mode voltage and/or output filter size. Generally speaking, power electronics engineers tend to be extremely skeptical any time the number of switches multiplies without a concomitant increase in power handling.Quote from: rx8pilot on October 03, 2016, 07:27:02 pmErf... CCM/DCM refers to the current flowing through the choke in an SMPS - whether that be the input choke of a current-fed topology (ie - boost derived), the output choke of a conventional forward topology (ie - buck derived) or the primary of an isolated flyback. Mode of operation is therefore dependent on the load current, amount of inductance and switching frequency, so is not something that can be controlled in software except by increasing switching frequency as load current declines, something which is not usually desirable (there are exceptions, of course, such as in resonant converters, but those are rarely as versatile or reliable as hard-switched PWM converters).

author: rx8pilot
author_rank: Super Contributor
timestamp: October 04, 2016, 04:27:01 pm
content: Quote from: MagicSmoker on October 04, 2016, 10:51:53 amUh oh....that doesn't sound good.Quote from: MagicSmoker on October 04, 2016, 10:51:53 amThere is no specific time frame to get this done, and may actually be a good candidate for a learning curve - albeit a long one. I understand the reality is I am going into uncharted territory where I don't know what I don't know. There is no way for you or anyone that has already been here to know what I know or how quickly (or slowly) I learn. Here is my thinking.....The project can be broken up into pieces as it makes sense to isolate the lessons involved. The DC section and AC section can be designed individually as suggested. The control system can start as a somewhat crude analog configuration to test the output stages and work through some of the analog, switching, and filtering fundamentals. After verifying the power stage within reason - I can start the process of designing and coding the digital control in at a pace that is respectful of the challenge vs my skills. By the time I get the DC section stable - I will have already learned the basics of chosen uC - IDE, peripherals, memory, programming, debug, etc along with a functional example of coding a digital control loop. In theory, the same basic strategy on the AC side where the output stage goes through a shake down with some analog controls for testing followed by the development of the digital control. I would expect the development of the AC section to reveal issues with the DC section where I have to go back and make changes and improvements.Assuming I get to this point - I would focus on performance, efficiency, and protections, and communication as it gets closer to being a viable system. Maybe it takes a few months, maybe it takes 18months. Who knows. I am the business owner and self-financing, so at least I don't have anyone looking over my shoulder and pointing at the calendar. The end game is two-fold. I do have a direct application for what is being designed - but also really want the knowledge for a myriad of other projects. The learning curve is welcome.I don't mind burning up some parts, which should be expected. To give you an idea for my penchant for challenge.....10 years ago when I wanted to start my small manufacturing business, I needed a CNC milling machine. I did a ton of research, but could barely understand any of what I was reading since I had no practical experience. I did my best and just purchased a brand new CNC machine and a pile of peripheral equipment. When it arrived - I did not know how to connect it to the mains, I did not know how to turn it on, I did not even know how to put a cutting tool into the tool holders. I dove in head first - over six figures of $$ and no knowledge at all. I did, however, know what the end game was. I needed parts and I needed knowledge. I got both after a brutal learning cycle. In fact, After about 2 years or so, I was making parts that machinists with decades of experience would say are 'impossible' when I needed them outsourced for higher volume. A million details and the possibility that the CNC machine could self-destruct on a single bug in the code kept me busy - but I loved and built considerable skill in process. I am now essentially doing the same thing in power electronics on my way to high-speed digital. That is the next chapter.I cannot tell you how thankful I am to get all the tips and help on this. During my CNC learning curve, I had no human resources to steer me around unnecessary challenges.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 04, 2016, 06:35:42 pm
content: With that attitude of yours, it will be no problem. I bet you have proper digital control up and running in about half a year of hard work, with tons of gained experience.If you have good attention span, as I think you do, there is nothing to stop you. You need to read through hundreds of pages of manuals*, register descriptions, etc., you need to be able to make your own conclusions and form your own opinions. You have to accept that the documentation is broken, but you'll still get the job done, you work around the totally undocumented silicon bugs only you will find. No hits on Google!You can't follow "official routes", if you do, you'll have horrible buggy mess everywhere. You need to understand - not only power electronics, but CPU architectures, C compilers, C language standard. People developing electronics often lack the experience in these areas.When I moved from Atmel AVR to STM32, there were several turning points which require more understanding and higher level of self-esteem, to ignore poor advice and make my own decisions:- The free GNU toolset doesn't provide working C runtime, not even the basics. You need to understand how a CPU and the C standard work and implement linker scripts, vector tables and startup code. This is not necessarily a big minus, just a steep learning curve. You just need to understand deeper; that's definitely positive.- The internet community isn't there. "But everybody is using STM32!" means that everybody is blinking an LED with a commercial demo board. Once you actually try to do something real, the number of real Google hits is not in range of hundreds like with AVR or PIC; you are lucky to find anything at all. But strangely, this has not bothered me much. It's easier to focus on solving the problem yourself and gaining understanding, instead of seeking for some easy copy-paste "solution", which tend to work for some time, but cause much pain later down the road when you didn't understand what the code did.- The internet community uses the totally and utterly horrible piece of shit standard peripheral "library" functions and structs provided by ST. Code examples are almost useless because of this, you need to decipher them first, then write your code exactly like you did with AVR or PIC, accessing the peripheral configuration registers normally, in a sane way.- With a more advanced CPU and increased level of enthusiasm, you are likely to proceed to more complex control tasks, which requires more displicine in coding style.I had some 15 years of random hobby experience on AVR microcontrollers, I was at a point where I don't need to debug for hours every time I'm making a PWM generator using a timer or want to read a potentiometer using ADC. I was also at a point where I could say that I really understand the C language.I have found that my coding style and work flow has become more "lean" now, I also seem to be able to solve more complex problems more quickly than before, even though I might be stuck solving a problem longer than when I was googling and copy-pasting code from the internet. But exactly because I understand the issue, it will not resurface countless times later.The biggest horror story in my STM32 entry was the lack of working complete C runtime and standard library. The root of my issues was the necessity to write your own linker script, something that, for example, avrgcc&avr-libc automatically generates. Even when the linker script examples were provided by ST, they were so hard to find that I never had a chance to look at them, so I ended up taking advice from a hobbyist site**! Simply initializing the stack pointer to a memory location aligned by four (should've been aligned by eight) cost memonthsof work, trying to pinpoint the issue (on a platform completely new to me), and not finding it, sidestepping all the issues. This kind of shit can happen to anyone, using any product or any technology, and it's easy to dismiss it afterwards as a dumb thing.I made the decision to learn the new platform in a project I had promised to deliver in two to three months. Extremely stupid thing to do, yes, but otherwise I wouldn't be doing what I'm doing now. That "3-month" project took a bit over half a year to finish, btw. Now I'm doing a new version, utilizing the full potential these modern power control MCUs provide, without too strict of a timetable. And everything's going super smoothly after the rough start, I totally love digital power control now. The control possibilities are literally almost endless, this is a shock when you come from analog & oldschool PIC/AVR.I think people are too scared about learning things. It's always worth it.*) an example:http://www.st.com/content/ccc/resource/technical/document/reference_manual/71/30/2e/f3/20/5b/46/c1/DM00093941.pdf/files/DM00093941.pdf/jcr:content/translations/en.DM00093941.pdf**)http://fun-tech.se/stm32/- warning, it's all wrong, don't follow the linker scripts.

author: rx8pilot
author_rank: Super Contributor
timestamp: October 04, 2016, 07:35:19 pm
content: Quote from: Siwastaja on October 04, 2016, 06:35:42 pmThat is the target - flexible knowledge. A lot of people questioned my push into CNC machining when I was primarily working as a industrial designer and mechanical engineer. Machining is dirty and loud. The thing was I was working with a lot of very smart engineers that had not idea how parts were made - limiting their success. I also worked with machinists that had no idea why parts were made - just make it like the drawing says to make it. After I punched through the learning curve and had 5 axis machines - I could devise, design, prototype, test, and prep for production far better and far faster than a team 5x the size. It really made it fun to be able to move that fast and get fantastic results at the same time.Quote from: Siwastaja on October 04, 2016, 06:35:42 pmI am sharper in CPU architecture and C than power electronics. My first job out of high school (1992) was coding and that has been by hobby since I got my first computer in 1984. I would never claim to be an amazing programmer, but I know where to look for the answers and learned how to learn without Google. My most recent push has been on 'style' and organization. My previous projects were big for a one-man-band and my somewhat sloppy style came back to haunt me in the end. It was a 1000 'tests' that were never really finished and then strung together like a giant bowl of spaghetti. I have learned many lessons to help keep that to a minimum. I also want to be clean and organized enough to delegate some development to others when needed - that means I cannot be a code slob and expect it to be ok.As for power electronics.....Quote from: MagicSmoker on October 04, 2016, 10:51:53 amI think that is good advice - starting with a plain architecture will make it a lot easier to stay on task. Walking before running.Quote from: MagicSmoker on October 04, 2016, 10:51:53 amThe output will supply power to a variety of external loads. Most of them are computers, LCD displays, DSP, data storage, etc. Possibly small AC fans and lighting at well. I will have to filter any common mode for sure another thing to learn. I have never designed a filter to do that.

author: MagicSmoker
author_rank: Super Contributor
timestamp: October 07, 2016, 08:02:37 pm
content: Quote from: rx8pilot on October 04, 2016, 07:35:19 pmOkay, this does slightly change things - if the primary goal is to Learn Something New and you have a decent understanding of real-time C coding then by all means try implementing the control loop/switching strategy entirely in software, but only *after* you have gotten the power stuff working with common analog ICs. Independently debugging the hardware, then using that "known good" design as a platform for developing an alternate, entirely software based control strategy will not only be less frustrating, it will likely be more educational rather than repeatedly toasting expensive semiconductors without any idea if the cause is your code or you board layout or circuit design or... you get the picture.Quote from: rx8pilot on October 04, 2016, 07:35:19 pmWell, at it's simplest you can effectively filter common mode voltages and currents with capacitors and inductors, respectively. Yes, it is possible to reduce or eliminate common mode noise with judicious choice of hardware design and/or modulation strategy, and I encourage you to explore those possibilities, but as I said before this is a secondary concern and should be addressed after you get the inverter inverting properly. Yes, that may mean having to redesign some of the hardware, but you didn't think you'd get everything working perfectly the first go-around, did you?

author: Siwastaja
author_rank: Super Contributor
timestamp: October 07, 2016, 09:30:26 pm
content: Quote from: MagicSmoker on October 07, 2016, 08:02:37 pmThis is slightly misleadingly said, IMHO.In a modern software-defined power converter, entire "switching strategy" isnever everwritten "in software".The whole point of modern power control MCUs is that they integrate the logic -- which is HW, not SW -- and even the analog side. This means that software is only used toconfigurehow this analog/digital control side is being used. Think of the software as a schematic. It often literally becomes a schematic; an initialization code switches muxes inside the MCU, producing the desired power converter!This is of course a HUGE simplification; in most cases, some timing-critical control code still needs to run to "seal the gaps" of what the integrated HW can't be configured to do.So,in addition, digital control loops can (and often must) be written. But exactly because the "HW level" things are being taken care of by theactual HWinside the MCU, software can be dedicated to doing the actual math, instead of trying to switch transistors with software. This takes software to higher level.And for me, it has been a lot easier to write a PID control loop in C than to try to understand analog compensator networks. With debug information datalogging & analysis, you have way more visibility than you can ever have with a scope on an analog network. But it depends on your background.Of course, when a completely integrated power conversion IC exists for a task, then it can be used, following the appnote schematic. But once the integrated controller cannot do the job (for any stupid reason, because they most often are highly specialized for one specific job only with almost zero flexibility -- want to disable unwanted "fault" or "hickup" mode? No can do!), the choices often are a huge PCB full of discretes, opamps, etc.; or a single microcontroller that integrates the same HW components, but can be reconfigured, using software, in minutes.But yeah, it's not an easy task. Nor is designing pure sine wave inverter control logic in analog electronics, unless you find and use a completely integrated chip that does everything, but then, it's not about designing the control at all anyway.It's not just software. It's "software-defined", and the point is that you can change it without a full product redesign. Great for learning and for research. Also great for mass manufacturing, because the high level of integration reduces BOM. The only exception is a converter topology and usage case so commonplace that a dedicated control IC, manufactured in millions, exists for $0.50.

author: Phoenix
author_rank: Frequent Contributor
timestamp: October 08, 2016, 05:59:11 am
content: Quote from: rx8pilot on October 04, 2016, 04:27:01 pmThe development with a uC can be split up even more. You can develop and test the entire open loop PWM strategy without connecting the microcontroller to the power stage if you know what you are looking to achieve in the pattern. And that a lot of the high power circuitry can be tested with the open loop PWM, before turning on any closed loop type of controller and without the need to make an analogue controller.I'll also add that protection should be considered very early on, not as a later addition. Overcurrent protection, over voltage protection and IGBT desat protection (if applicable) will save countless parts (and your ears) when things go wrong. Any good power electronics targetted micro will have analogue comparator inputs and digital "trip" inputs capable of immediately disabling switching without software intervention.

author: rx8pilot
author_rank: Super Contributor
timestamp: October 08, 2016, 09:26:09 pm
content: Quote from: MagicSmoker on October 07, 2016, 08:02:37 pmI can see the wisdom in that - learn one thing at a time and avoid 12 months of tail chasing.Quote from: MagicSmoker on October 07, 2016, 08:02:37 pmI got past that dream many many years ago. Fall down, get up. Fall down, get up. Repeat until you no longer smell the burning FR4.Quote from: Phoenix on October 08, 2016, 05:59:11 amTotally agree and fortunately, this is what I am already good at. I think I can prevent the majority of the smoke making mistakes by designing in analog protections from coding failures. It should also help to design with big FET's that have huge SOA's and make sure the current/voltage limits are safe along with applying relatively small loads to get the basic control system safe. Optimizing the MOSFET's can happen after the designs are proven not do anything totally outrageous. With all that said - I am not going to cry and quit over a burned up PCB. I just hope that when things get hot and die, that I can figure out why. There have been a few lessons I learned where the system destroyed itself so fast and so complete that it was hard to figure out what happened.