{"id":208,"date":"2023-01-09T12:23:56","date_gmt":"2023-01-09T12:23:56","guid":{"rendered":"http:\/\/www.skynext.tech\/?p=208"},"modified":"2023-01-20T17:58:19","modified_gmt":"2023-01-20T17:58:19","slug":"400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice","status":"publish","type":"post","link":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/","title":{"rendered":"400V DC to 230V AC pure sine wave inverter model using LTSpice."},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1588\" height=\"728\" src=\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png\" alt=\"\" class=\"wp-image-209\" srcset=\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png 1588w, https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model-300x138.png 300w, https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model-768x352.png 768w\" sizes=\"auto, (max-width: 1588px) 100vw, 1588px\" \/><figcaption class=\"wp-element-caption\">Ltspice inverter model<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-d39a9fec-0ccf-4a26-afc6-0b2a20304052\" href=\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/400VDCto230VAC_pure_sine_wave_inverter_bipolar_pwm_model-1.zip\">400VDC to 230VAC pure sine wave inverter parametric model<\/a><a href=\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/400VDCto230VAC_pure_sine_wave_inverter_bipolar_pwm_model-1.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-d39a9fec-0ccf-4a26-afc6-0b2a20304052\">Download<\/a><\/div>\n\n\n\n<p>Note : the above model has been updated for frequency\/phase synchronization. please check :<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-skynext-tech wp-block-embed-skynext-tech\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"9xzlMXDEj1\"><a href=\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/16\/single-phase-inverter-synchronization-to-mains-phase-using-the-zero-crossing-method-and-proportional-derivative-control-with-analog-components\/\">Single phase Inverter synchronization to mains phase using the zero crossing method and proportional \/ derivative control with analog components.<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Single phase Inverter synchronization to mains phase using the zero crossing method and proportional \/ derivative control with analog components.&#8221; &#8212; SKYNEXT Tech.\" src=\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/16\/single-phase-inverter-synchronization-to-mains-phase-using-the-zero-crossing-method-and-proportional-derivative-control-with-analog-components\/embed\/#?secret=qQhmYS7LrW#?secret=9xzlMXDEj1\" data-secret=\"9xzlMXDEj1\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1592\" height=\"693\" src=\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/output_voltage_and_current.png\" alt=\"\" class=\"wp-image-218\" srcset=\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/output_voltage_and_current.png 1592w, https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/output_voltage_and_current-300x131.png 300w, https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/output_voltage_and_current-768x334.png 768w\" sizes=\"auto, (max-width: 1592px) 100vw, 1592px\" \/><figcaption class=\"wp-element-caption\">output voltage and current waveform, 80 ohms resistive load<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Disclaimer : This design uses dangerous AC and DC voltages. If you get out of the simulation domain and start prototyping be sure to use all safety precautions required when working with high voltages. You have to know what you are doing.<\/strong>\n\nBesides the simulation this post is an introduction on pure sine inverter technology targeted at electronics engineers that have little or moderate experience in power electronics and inverter design.\n\nThe goal is to design, implement and prototype your own pure sine wave inverter from scratch as an educational project to get into inverter technology, this will be the object of a series of posts in the future.\n\n<strong>For a faster design approach see the bottom of this post on how to use off the shelf inverter modules such as EGS002 or EGS005 available on BangGood and AliExpress.<\/strong>\n\nTo get straight into the model simulation go to the running the simulation section.\n<strong>\nIntroduction<\/strong>\n\nInverters use MOSFETS to switch a DC source with a variable duty cycle PWM signal.\n\nThe duty cycle variation in the time domain is performed at the frequency of the required output fundamental frequency of the inverter.\nUsually mains frequency, that is 50hz or 60hz.\n\nThe frequency of switching, that is the frequency of the PWM signal is called the switching frequency. it is usually in the 2.5khz to 100khz range.\n\nSo, the goal is to have a PWM signal at high frequency (2.5 khz to 100khz) with a variable duty cycle whose frequency is at mains frequency.\n\nHowever, The variable duty cycle frequency may be lower or higher, or can be adjusted in real time.\n\nApplications that require this duty cycle modulation at fixed but non standard 50Hz or 60hz are mainly for the aerospatial industry.\n\nAirplanes use 400hz. The advantage of 400hz is that power transformers are less bulky than in 50Hz.\n\nThere is also an industry need to adjust the inverter output frequency in real time. This is the market segment of VFDs (Variable Frequency Drive) inverters.\n\nThis allows to set the rotation speed of induction motors, and allow for a soft-start that does not damage the motor.\n\nIn VFD applications, not only the the frequency output of the inverter is managed, but also the output voltage, and sometimes they implement a fixed voltage to frequency ratio mode so the motor stays happy.\n<strong>\nSo, now comes the question, How to modulate the duty cycle of a PWM signal ?<\/strong>\n\nThis is usually done by comparing a triangle signal at the switching frequency with a reference sinusoidal signal at the desired mains frequency.\n\n<strong>This can be done in two ways :<\/strong>\n\n1) Using analog components : a sine generator IC (like the XR-2206 or MAX038) that outputs a triangle wave and another one (also XR-2206 or MAX038) that outputs the sine wave. Then, a schmitt trigger is used to compare these two signals to output a PWM signal.\n\n2) Using digital components : the sine modulated variable duty cycle PWM output is generated by code running on MCUs, PIC, DDS IC. Arduino can do this, however Arduino has a limitation that hinders its use for this purpose, and that is dead time control. More on this later.\n\nIf you nonetheless want to experiment with SPWM generation with an Arduino, check this code to get an idea of how it works.\n\nI recommend you read resources on Fast PWM for Arduino. It is not straightforward if you have no experience with hardware counters\/timers. Check <a href=\"https:\/\/www.arxterra.com\/tutorial-on-fast-pulse-width-modulation\/\">https:\/\/www.arxterra.com\/tutorial-on-fast-pulse-width-modulation\/<\/a> and <a href=\"https:\/\/docs.arduino.cc\/tutorials\/generic\/secrets-of-arduino-pwm\">https:\/\/docs.arduino.cc\/tutorials\/generic\/secrets-of-arduino-pwm<\/a>\nfor starters. You may have to browser for other resources because I could not find one comprehensive documentation for ALL modes, except maybe in AtMel datasheets, but these are very terse and quite hard to understand.\n\nHere is the first code sample :<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;Arduino.h&gt;\n\nuint16_t freq = 50; \/\/ inverter output frequency\nuint32_t counter = 0;\nuint16_t mod_index = 0.9; \/\/ modulation index. you will have to update this in real time for precise voltage control.\nfloat sin_val;\nconst uint16_t samples_per_period = 100; \n\/\/ higher samples per period give a better looking output sine wave, less harmonics from digital aliasing\nuint16_t micros_interval;\n\nuint16_t sin_table&#91;samples_per_period];\n\nvoid populate_sin_table() \n{\n\n  uint16_t i;\n  for(i=0;i&lt;samples_per_period;i++)\n  {\n      sin_val = 512*(1 + mod_index*sin(2*PI*float(i)\/samples_per_period));\n      sin_table&#91;i] = round(sin_val);\n      \/\/Serial.println(int(sin_val));\n  }\n\n}\n\n\/\/ FAST PWM PHASE-CORRECT MODE 3\n\nvoid setup(){ \n   \n  \/\/ Wave Form Generator: phase correct PWM mode 3, Top = OCR1A and OCR1B\n  \/\/ We will output two signals, complementary, using two pins ~9 and ~10 so we need to specify\n  \/\/ (0&lt;&lt;COM1A0) + (1&lt;&lt;COM1A1) + (1&lt;&lt;COM1B0) + (1&lt;&lt;COM1B1)\n  \/\/ (0&lt;&lt;CS10) + (1&lt;&lt;CS11) + (0&lt;&lt;CS12) this is the prescaler and will dictate the switching frequency.\n  \/\/ (1&lt;&lt;WGM11) + (1&lt;&lt;WGM10); and (0&lt;&lt;WGM13) + (0&lt;&lt;WGM12) are used to set the Fast PWM mode, here we use mode 3.\n  \/\/ it allows a 10 bit amplitude resolution for the sine wave signal\n  \/\/ check this link for a table of available modes.\n\n\n\n  TCCR1A = (0&lt;&lt;COM1A0) + (1&lt;&lt;COM1A1) + (1&lt;&lt;COM1B0) + (1&lt;&lt;COM1B1) + (1&lt;&lt;WGM11) + (1&lt;&lt;WGM10);\n  TCCR1B = (0&lt;&lt;WGM13) + (0&lt;&lt;WGM12) + (0&lt;&lt;CS10) + (1&lt;&lt;CS11) + (0&lt;&lt;CS12); \n  \n  OCR1A = 0x3FF; \/\/ top compare value initialization. it will be varied using the sine table in the loop.\n  OCR1B = 0x3FF; \/\/ same for the second PWM signal\n  \n  \/\/DDRB |= (1&lt;&lt;PB1);\n\n  \/\/Serial.begin(9600);\n  populate_sin_table(); \/\/ create a sine table. better use PGM write and store it in flash for a more robust approach\n  micros_interval = int(float(1E6)\/(float(freq)*float(samples_per_period))); \/\/ the loop wait delay between two bit bangings\n  \/\/ of OCR1A and OCR1B.\n\n  \/\/Serial.println(micros_interval);\n  \n} \n\n\n\nvoid loop() { \n delayMicroseconds(micros_interval);\n OCR1A =  sin_table&#91;counter%samples_per_period]; \/\/ iterate on the sine table, use modulo to loop the table\n OCR1B =  sin_table&#91;counter%samples_per_period]; \/\/ same for the second SPWM\n \n \/\/Serial.println(sin_table&#91;counter%samples_per_period]);\n \/\/Serial.flush();\n counter++; \/\/ overflow not managed !!!!!\n} <\/code><\/pre>\n\n\n\n<p>There is also this wonderful code <a href=\"https:\/\/forum.arduino.cc\/t\/dead-time-between-pwm-signals\/937405\">https:\/\/forum.arduino.cc\/t\/dead-time-between-pwm-signals\/937405<\/a> for a three phase system. I did not test it but it looks serious and legit. It has the advantage of using ISR and not a loop to update the TOP value with the sine wave, generates 6 signals (so it is for bipolar spwm) but it suffers from the same dead time insertion problem however, and that is the object of the guy&#8217;s post. But it is possible with analog post processing, check the DTI section.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">That is why STM32 based boards are better for an all digital SPWM generation purpose, but they are more expensive and you'll need to watch quite a bunch of tutorials to master Nucleo (the STMicroelectronics MCU IDE). It will be easier if you already master Arduino FastPWM generation, but it will require time nevertheless.\n\nNow is a good time to learn about the specifics on how that sine modulated variable duty cycle PWM signal allows the inverter to generate a 50hz, 60hz or higher frequency mains power phase voltage.\n\nThe \"sine modulated variable duty cycle PWM signal\" will be now referred by its usual name in the power electronics technology as SPWM (sine PWM)\n\n<strong>The power core : the MOSFET H-bridge<\/strong>\n\nThe power core of an inverter uses an H-bridge configuration because the setup of its components ressembles to the letter H.\nIt is one of the most common designs in the industry.\n\nMOSFETs switch repeateadly a DC source with low source impedance (the power source) according to the input gate signal that comes from the SPWM.\n\nThat is not all. high VDS high current MOSFETS usually need gate voltages that are higher than what an MCU or an analog oscillator can generate.\nThe high side MOSFET gates  of the H-bridge also need voltages with reference to DC ground that are way above the levels of the logic\/analog controllers.\n\nFor that reason, there is a specific family of ICs that exists and they are called \"MOSFET Gate Drivers\". Their goal is to bridge the gap between the logic SPWM signals and the required voltage levels (and current requirements) of the MOSFET gates.\n\nMoreover, an H-bridge inverter has at least 4 mosfets. These MOSFETS need to be activated by gate signals at a precise fashion, like a fine tuned choregraphy.\n\nThe activation pattern is usually diagonal in the schematics. This has the effect of reversing the polarity with reference to DC GND seen by the load with each pwm pulse. Since the two SPWM signals are complementary in this design, when one diagonal set of MOSFETs has a high duty cycle it will be on and conduct a longer time than the reciprocal diagonal set of MOSFET, when this happens the output sine wave of the inverter is at a +Vo_peak. Then there is a time when the duty cycle 0.5 for both diagonal pairs, at this point the sinusoidal output of the inverter crosses 0V. then the cycle goes in the reverse direction and outout reaches -Vo_peak.\n\n\n<strong>PWM Modulation schemes<\/strong>\n\nI just described one SPWM modulation scheme. There are two schemes that are most commonly used.\n\n- Unipolar SPWM\n- Bipolar SPWM\n\nTo understand the difference between the two, please read now :\n\n<a href=\"https:\/\/www.sciencedirect.com\/topics\/engineering\/sinusoidal-pulse-width-modulation\">https:\/\/www.sciencedirect.com\/topics\/engineering\/sinusoidal-pulse-width-modulation<\/a>\n<a href=\"https:\/\/www.tntech.edu\/engineering\/pdf\/cesr\/ojo\/asuri\/Chapter2.pdf\">https:\/\/www.tntech.edu\/engineering\/pdf\/cesr\/ojo\/asuri\/Chapter2.pdf<\/a>\n\nMy guide is based on Bipolar SPWM.\n\nAs you may already guessed, for that SPWM scheme you need two complementary SPWM signals.\nFor analog SPWM generation, the original SPWM signal generated from the triangle to sine comparator is fed to a NOT gate to create a complementary SPWM signal.\n\nThe original signal will drive the Top Left MOSFET and Bottom Right MOSFET\nWhile the complementary signal will drive the Top Right MSOFET and Bottom Left MOSFET.\n\nNote that in an unipolar SPWM scheme, The complementary SPWM signal stays low the whole time the other one operates, and then starts doing SPWM modulation while the other one stays quiet. This switching happens at 2*f_mains,\nI find it harder to generate these two kinds of SPWM signals using digital means, so I think that the bipolar scheme is better to start grasping the technology.\n\nNote also that IC Gate Drivers usually manage two MOSFET for a half bridge configuration. So we need Two gate driver ICs\nIn the LTSpice model IR2110 is used, as it is quite common in the industry.\n\nThe routing between the SPWM signals and gate drivers is as follows in my LTSPICE schematic and simulation :\n\nSPWM signal is provided to HIN input of Gate Driver 1 and LIN of gate Driver 2\nWhereas the complementary SPWM signal is provided to LIN input of gate driver 1 and HIN input of gate driver 2\n\nHO output of gate driver 1 drives the top left M1 Mosfet\nLO output of gate driver 1 drives the bottom left M2 Mosfet\nHO output of gate driver 2 driver the top right M4 Mosfet\nLO output of gate driver 2 drives the bottom right M3 Mosfet.\n\nIf you connect the dots, you'll see it fits the requirements of bipolar SPWM modulation scheme.\n\n<strong>The big issue : dead time control.<\/strong>\n\nThere is a factor that needs extra precautions because it can fry the MOSFETs and brick the inverter. In no case, the M1 M2 MOSFETs should conduct at the same time.\nThis also true for M4 M3. If that would happen, The low impedance DC source will short through these MOSFETs (from Vdc to GND). When driven to high gate voltages, these Power MOSFETs  have a ridiculously low RdsOn, This will generate currents way above the absolute ratings of the MOSFET, frying them if a DC breaker or another protection from the upstream DC link did not catch it in time.\n\nFor this reason, a security margin between the two SPWM signals (the original and complementary) has to be put in place, This is a delay between pulses where both SPWM signals remain low. This is called dead time.\n\na good article to read on that subject :\n\n<a href=\"https:\/\/hackaday.io\/project\/3176-gator-quad\/log\/11741-pwm-control-and-dead-time-insertion\">https:\/\/hackaday.io\/project\/3176-gator-quad\/log\/11741-pwm-control-and-dead-time-insertion<\/a>\n\nFor digital SPWM generation, forget about Arduino to get SPWM plus dead time control using Phase correct PWM out of the box.\nBetter PICs or MCUs are required such as STM32.\n\nIt is however possible to apply analog treatment to a single SPWM arduino generated signal, to create a complementary signal with a dead time delay inserted before the rising edge and after the falling edge.\n\nIn the supplied schematic, it is done through a RC network whose time constant is matched to introduce the required dead time, plus a bunch of gates and schmitt triggers. This setup may be simplified, if you manage to use less components or update the model to use real world components instead of ideal ones, let me know through the contact form.\n\n<strong>Output Voltage control<\/strong> <strong>and regulation<\/strong>.\n\nOutput voltage control of the power stage is performed basically by varying the triangle peak voltage, while the sine voltage remains the same.\n\nThe peak output voltage is roughly given by \nVo_peak = V(dc)*V(sine)\/V(tri)\nVo_RMS is then V(dc)*(V(sine)\/V(tri))\/sqrt(2)\nV(sine)\/V(tri) is known as the modulation index (mi) \nit is usually &lt; 1\n\nIf V(sine) gets larger than V(tri), the inverter operates in the overmodulating region, and RMS output voltage is no longer linearly dependent on V(dc)\nIt appears in the simulation as a voltage saturation of the output.\n\novermodulation is outside the scope of this guide but it is explained in the above mentioned resources.\n\nAn open loop control is not realistic because of deviations from theory that assumes ideal components, and dependance on the load RLC parameters and the output filter parameters, as well of the transformer if an isolated output is required. \n\nSo there is a need for a voltage feedback loop to the SPWM generating component to adjust the modulation index.\n\nPassing the voltage information to the source controller has to be done properly.\n\nBecause of voltage shifts of the (V(l) - V(n)) voltage relative to DC GND even after passing a voltage divider in this unisolated design, galvanic isolation is required, and this is a safety requirement.\nIf the output is isolated using a mains frequency transformer, galvanic isolation in the feedback loop is inevitable.\n\nThere are three methods to create an insulated voltage feedback loop.  \n\n- Using an auxilliary winding in the secondary of a mains transformer.\nWith a turns ratio tuned for low output voltages, usually such as 3.3V\/2 (rms) or 5V\/2 (rms) is obtained when the inverter output voltage is at nominal conditions. That gives ample room for the signal to go higher if the output stage encounters an overvoltage situation. \nOne leg would be connected to DC GND, the other fed to a full bridge rectifier, smoothed, and then that voltage would be fed to an error amplifier op-amp (a difference amplifier) that compares it to a precise voltage reference. This difference signal is a negative feedback that is then used to adjust the modulation index if using full analog generation. That would happen by controlling the AM pin of the XR-2206 Triangle generator, for instance.\n\nIf the SPWM is generated with digital means, the error amplifier could not even be required.\nA DAC may be enough to acquire the voltage output of the optocoupler and the comparison of the DAC output would be done against a digital reference. Then, a digital control method should be implemented to control the feedback loop (such as PID) and update the modulation index.\n\nI digress. Back to the feedback isolation.\n\n- The other way of isolation is to use a separate low power transformer, with it's primary legs in parallel with the load. That is useful if your design does not use a transformer at all for the power stage, so you need only a transformer for feedback. Also, transformers with auxiliary windings are specific and you may have one on hand without that feature.\nOf course it should be designed for 50Hz, or 60Hz, or more depending on your output frequency, with a ratio adjusted the same way as for an auxiliary winding.\n\n\n- The third method involves a rectifier, a smoothing capacitor\/filter stage, a voltage divider, which output drives a voltage controlled current source.\nIn this design I am trying a modified Howland current pump.\nThis current source is required because it will drive an optocoupler to transmit the analog information across the insulation barrier.\nOptocouplers are current driven.\n\nCare has to be taken to operate the optocoupler in its region where the CTR (current transfer ratio) is linear, by setting properly the current source gain.\nThen one has to chose the proper collector resistor on the output side of the optocoupler to obtain proper transfer characteristics.\n\nIt is advised to test the transfer characteristics of the Current source + Optocoupler in a separate circuit to tune it up before adding it to the design, it will make things faster to simulate and way easier.\n\nThe rest of signal processing is the same as with the transformer approach.\nEither digital control if SPWM is generated through a MCU or analog if using an oscillator. Analog will need a compensation network (usually a R+C \/\/ C) network for the feedback control loop to be stable.\n\nNote : I have yet to model this part in the supplied model. It will be the object of this post revision in the future.\n\nHowever, the fact that we are dealing with an inverter and that we have to perform rectification and smoothing to extract the peak voltage information, introduces feedback charateristics that are a bit different than DC\/DC converter feedback loops.\n\nSince the feedback loop would be designed with non-monolithic components (By that I mean the that the feedback loop does not use complex IC whose internals are a black box if their full transfer characteristics are not provided in the datasheet, and that perform mysteriously during AC analysis), it is possible to perform an AC open loop frequency response analysis of the rectifier + smoothing capacitor + current source + optocoupler quite easily.\n\nThen add and tune a proper compensation network to obtain stability.\n\nCheck this guide for an introduction on compensation networks. It is targeted for SMPS power supplies, but the core concepts are the same, that is the need to model the open feedback loop at steady state, introduce a perturbation, and perform an AC analysis to get the frequency and phase response. (The bode plot)\n\n<a href=\"https:\/\/www.ti.com\/seclit\/ml\/slup340\/slup340.pdf\">https:\/\/www.ti.com\/seclit\/ml\/slup340\/slup340.pdf<\/a>\n\n\n<strong>The LC output filter.<\/strong>\n\nA LC filter is a second order passive filter.\nIt's goal is to filter the high frequency switching pulses to obtain a pure sine wave with the least amount of harmonics.\nIn that design, I set the fc (corner frequency) at 10 times the mains frequency, that is 500Hz, not that the lower this frequency, the larger the L and C values, and the larger the effects on voltage with changing load impedannce.\n\nYou will notice also that the sine waveform THD will change with loading, appearing less distorted at higher loads\n\nFinally, the LC output stage has an effect on output power factor. An inverter designed for inductive loads will be tuned differently in that regard.\n\nLoading of the filter also affects its response and hence change the output voltage.\n\nCheck this thread for a discussion on inverter LC filters :\n\n<a href=\"https:\/\/www.edaboard.com\/threads\/true-sinewave-inverter-output-lc-filter-design-help-needed.375327\/\">https:\/\/www.edaboard.com\/threads\/true-sinewave-inverter-output-lc-filter-design-help-needed.375327\/<\/a>\n\n<strong>Running the simulation.<\/strong>\n\nDownload the zip file in the post introduction. Check the readme.txt in the zip for important information about LTspice setup for that model. Most of the important parameters are parametrized and explained\nMost of the inverter functional blocks have commentaries that complement the information given here.\nOn a core i5 Elitebook 8440p, using LTspice under Wine on Linux, I get around 6.5us\/s simulation speed. Try to get at least two or three output sine periods.\nThis is a work in progress, it will be updated as I improve the model.\n\n<strong>A faster approach.<\/strong>\n\nFortunately, you don't have to reinvent the wheel if you have no time to learn all the intricacies of inverter technology, It is however always better to have an understanding of how all the inverter components work before using a board that implements some of the inverter functions in their design.\n\nFor this, there are inverter boards, and we'll have to turn to China and EGMICRO\nEGMICRO is a supplier of ASIC inverter boards and more that take care of the SPWM thing, DTI, Gate driving, frequency settings, and voltage feedback, plus they have a monitoring output. They can be used for UPS inverters and also for VFD operation. They also have 3 phase boards.\n\nFor single phase designs, there are three ASIC demo boards sold on the market :\n- EGS002 is an older but still popular demo board that features the EG8010 ASIC and two IR2110S gate drivers.\nI used the same gate drivers in my LTSpice model.\n- EGS005 is an newer demo board that features the EG8025 ASIC. It is a monolithic design with integrated gate drivers.\n\n- EGS003 is a board available on the market, with a EG8011 ASIC, plus a single EG2126 package housing a full bridge Gate Driver. But It was since discontinued (the EGMicro website purged the documentation about EG8011) It may have been superseded by EGS005 or it may suffering from issues. Suppliers still sell it. The EG8011 ASIC datasheet still can be found elsewhere. I do not recommend that design if the ASIC supplier made it obsolete.\n\nWe will nevertheless perform some intel gathering on these three designs to see how they differ in their reported features.\n\nFor three phase designs, There is an EGSO31 board based on the EG8030 ASIC. It uses separate EG3012 gate drivers instead of the more ubiquitous IR2110. A three phase design is necessary for VFD designs powering 3 phase induction AC motors.\n\nTo get and idea of how these devices work, you need to check the Demo board, the ASIC and the Gate driver datasheet.\nSome of the PDFs are available in simplified Chinese only, but you can pass it to Google translate and have a quite precise idea of what does what after sometimes a little guessing. The quality of Google's technical translations is quite good, since these are terse statements and not litterary works.\n\nThe goal is to look precisely at the application schematic and adapt it for our needs.\n\nWe will start by investigating the EGS002.\n\nCheck that GreatScott's video on EGS002 as an introduction, it also uses a demo UPS board (not just the ASIC+driver board)\n \n<a href=\"https:\/\/www.youtube.com\/watch?v=Dn2PFebi2ww\">https:\/\/www.youtube.com\/watch?v=Dn2PFebi2ww<\/a>\n\nPlease keep tuned for part II. Where we will discuss EGS002 in more detail to unveil its secrets.<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note : the above model has been updated for frequency\/phase synchronization. please check : Disclaimer : This design uses dangerous AC and DC voltages. If you get out of the simulation domain and start prototyping be sure to use all safety precautions required when working with high voltages. You have to know what you are<\/p><\/div>\n<div class=\"blog-btn\"><a href=\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/\" class=\"home-blog-btn\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","pmpro_default_level":"","footnotes":""},"categories":[14],"tags":[],"class_list":["post-208","post","type-post","status-publish","format-standard","hentry","category-electrotechnical-designs","pmpro-has-access"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>400V DC to 230V AC pure sine wave inverter model using LTSpice. - SKYNEXT Tech.<\/title>\n<meta name=\"description\" content=\"LTSpice parametric simulation of a bipolar SPWM pure sine inverter. With dead time control, and LC output filter.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"400V DC to 230V AC pure sine wave inverter model using LTSpice. - SKYNEXT Tech.\" \/>\n<meta property=\"og:description\" content=\"LTSpice parametric simulation of a bipolar SPWM pure sine inverter. With dead time control, and LC output filter.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/\" \/>\n<meta property=\"og:site_name\" content=\"SKYNEXT Tech.\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-09T12:23:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T17:58:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png\" \/>\n<meta name=\"author\" content=\"R.Verissimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"R.Verissimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/\"},\"author\":{\"name\":\"R.Verissimo\",\"@id\":\"https:\/\/www.skynext.tech\/#\/schema\/person\/6b71040d3e4353a85583550901159cd8\"},\"headline\":\"400V DC to 230V AC pure sine wave inverter model using LTSpice.\",\"datePublished\":\"2023-01-09T12:23:56+00:00\",\"dateModified\":\"2023-01-20T17:58:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/\"},\"wordCount\":141,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.skynext.tech\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png\",\"articleSection\":[\"Electrotechnical Designs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/\",\"url\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/\",\"name\":\"400V DC to 230V AC pure sine wave inverter model using LTSpice. - SKYNEXT Tech.\",\"isPartOf\":{\"@id\":\"https:\/\/www.skynext.tech\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png\",\"datePublished\":\"2023-01-09T12:23:56+00:00\",\"dateModified\":\"2023-01-20T17:58:19+00:00\",\"description\":\"LTSpice parametric simulation of a bipolar SPWM pure sine inverter. With dead time control, and LC output filter.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#primaryimage\",\"url\":\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png\",\"contentUrl\":\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png\",\"width\":1588,\"height\":728},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.skynext.tech\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"400V DC to 230V AC pure sine wave inverter model using LTSpice.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.skynext.tech\/#website\",\"url\":\"https:\/\/www.skynext.tech\/\",\"name\":\"SKYNEXT Tech.\",\"description\":\"Power Electronics &amp; Reverse Engineering\",\"publisher\":{\"@id\":\"https:\/\/www.skynext.tech\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.skynext.tech\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.skynext.tech\/#organization\",\"name\":\"SKYNEXT Tech.\",\"alternateName\":\"DELIVERYSIMO EIRL\",\"url\":\"https:\/\/www.skynext.tech\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.skynext.tech\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2019\/09\/cropped-SKYNEXT_logo_square-2.png\",\"contentUrl\":\"https:\/\/www.skynext.tech\/wp-content\/uploads\/2019\/09\/cropped-SKYNEXT_logo_square-2.png\",\"width\":210,\"height\":210,\"caption\":\"SKYNEXT Tech.\"},\"image\":{\"@id\":\"https:\/\/www.skynext.tech\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.skynext.tech\/#\/schema\/person\/6b71040d3e4353a85583550901159cd8\",\"name\":\"R.Verissimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.skynext.tech\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0bf345444b71baae1301e50a1a8cbeb98a5b7f41b85ffe9e1e6c2640ef23b528?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0bf345444b71baae1301e50a1a8cbeb98a5b7f41b85ffe9e1e6c2640ef23b528?s=96&d=mm&r=g\",\"caption\":\"R.Verissimo\"},\"url\":\"https:\/\/www.skynext.tech\/index.php\/author\/wpadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"400V DC to 230V AC pure sine wave inverter model using LTSpice. - SKYNEXT Tech.","description":"LTSpice parametric simulation of a bipolar SPWM pure sine inverter. With dead time control, and LC output filter.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/","og_locale":"en_US","og_type":"article","og_title":"400V DC to 230V AC pure sine wave inverter model using LTSpice. - SKYNEXT Tech.","og_description":"LTSpice parametric simulation of a bipolar SPWM pure sine inverter. With dead time control, and LC output filter.","og_url":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/","og_site_name":"SKYNEXT Tech.","article_published_time":"2023-01-09T12:23:56+00:00","article_modified_time":"2023-01-20T17:58:19+00:00","og_image":[{"url":"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png","type":"","width":"","height":""}],"author":"R.Verissimo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"R.Verissimo","Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#article","isPartOf":{"@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/"},"author":{"name":"R.Verissimo","@id":"https:\/\/www.skynext.tech\/#\/schema\/person\/6b71040d3e4353a85583550901159cd8"},"headline":"400V DC to 230V AC pure sine wave inverter model using LTSpice.","datePublished":"2023-01-09T12:23:56+00:00","dateModified":"2023-01-20T17:58:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/"},"wordCount":141,"commentCount":0,"publisher":{"@id":"https:\/\/www.skynext.tech\/#organization"},"image":{"@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#primaryimage"},"thumbnailUrl":"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png","articleSection":["Electrotechnical Designs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/","url":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/","name":"400V DC to 230V AC pure sine wave inverter model using LTSpice. - SKYNEXT Tech.","isPartOf":{"@id":"https:\/\/www.skynext.tech\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#primaryimage"},"image":{"@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#primaryimage"},"thumbnailUrl":"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png","datePublished":"2023-01-09T12:23:56+00:00","dateModified":"2023-01-20T17:58:19+00:00","description":"LTSpice parametric simulation of a bipolar SPWM pure sine inverter. With dead time control, and LC output filter.","breadcrumb":{"@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#primaryimage","url":"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png","contentUrl":"https:\/\/www.skynext.tech\/wp-content\/uploads\/2023\/01\/inverter_model.png","width":1588,"height":728},{"@type":"BreadcrumbList","@id":"https:\/\/www.skynext.tech\/index.php\/2023\/01\/09\/400v-dc-to-230v-ac-pure-sine-wave-inverter-model-using-ltspice\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.skynext.tech\/"},{"@type":"ListItem","position":2,"name":"400V DC to 230V AC pure sine wave inverter model using LTSpice."}]},{"@type":"WebSite","@id":"https:\/\/www.skynext.tech\/#website","url":"https:\/\/www.skynext.tech\/","name":"SKYNEXT Tech.","description":"Power Electronics &amp; Reverse Engineering","publisher":{"@id":"https:\/\/www.skynext.tech\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.skynext.tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.skynext.tech\/#organization","name":"SKYNEXT Tech.","alternateName":"DELIVERYSIMO EIRL","url":"https:\/\/www.skynext.tech\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynext.tech\/#\/schema\/logo\/image\/","url":"https:\/\/www.skynext.tech\/wp-content\/uploads\/2019\/09\/cropped-SKYNEXT_logo_square-2.png","contentUrl":"https:\/\/www.skynext.tech\/wp-content\/uploads\/2019\/09\/cropped-SKYNEXT_logo_square-2.png","width":210,"height":210,"caption":"SKYNEXT Tech."},"image":{"@id":"https:\/\/www.skynext.tech\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.skynext.tech\/#\/schema\/person\/6b71040d3e4353a85583550901159cd8","name":"R.Verissimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynext.tech\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0bf345444b71baae1301e50a1a8cbeb98a5b7f41b85ffe9e1e6c2640ef23b528?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0bf345444b71baae1301e50a1a8cbeb98a5b7f41b85ffe9e1e6c2640ef23b528?s=96&d=mm&r=g","caption":"R.Verissimo"},"url":"https:\/\/www.skynext.tech\/index.php\/author\/wpadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/posts\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":15,"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"predecessor-version":[{"id":410,"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/posts\/208\/revisions\/410"}],"wp:attachment":[{"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynext.tech\/index.php\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}