Simulation of control and measurement systems for dc-ac inverter

. Computer simulation can reduce the cost of creating new technical devicesand modernization of existing ones.This article includes the model control system and measurement system for DC-AC inverter. Control systems for two-, three- and four-level inverters are considered.The models are made by means of computer simulation in the program OrCAD Capture. Each model is built with the help of universal blocks, which are found in other computer simulation programs.The results of research on the considered models are given.These results show the dependence of the inverter output voltage parameters on the change of the control signals mode.


Introduction
Many modern electric power systems, including photovoltaic systems, convert DC voltage into AC voltage and vice versa. For such purposes, electric converters, such as rectifiers and inverters are used. The most complex type of such converters is a voltage DC-AC inverter.Such inverters are an important part of renewable energy applications [1,2] or drives with induction motors [3].Modernization of electric power converters is a modern urgent issue aimed at improving the quality of electrical energy conversion.
The most optimal means of research energy converters is mathematical modeling using computer programs.In mathematical modeling, the source object is abstractly divided into separate parts with elementary functions. This method allows to explore the various modes of operation with a minimum cost when changing system parameters.
A DC-AC inverter is a complex system that includes several subsystems. The entire system of DC-AC inverter can be divided into two main components: the control subsystem and the power part. In addition, the third component can be considered as the measurement subsystem.The power part is an electric bridge.Schemes of such bridges are divided by the number of phases (single and three phase) and the number of voltage levels (two-level and multi-level).That schemes are well represented in various sources [4][5][6][7][8] and are not given in this article. In most cases, the electric bridge is made of identical half-bridges. The number of half bridges equals to the number of phases of the output voltage.
The purpose of this paper is to create computer models of control and measurement subsystems that can be used in research of voltage inverters.The models should be clear and should have all the necessary functions.

Materials and Methods
The computer program package OrCAD was used for simulation.All models are created from special blocks in the Capture program.The assembled block is simulated in the "Time Domain (Transient)" mode using the PSpice program. By transients in the elements it can be judged on the effectiveness of the assembled model. The inverter control subsystem generates the opening signals of the power switches of each half-bridge of the inverter. There are many ways to control the inverter [9][10][11][12]. The basis for creating control signals are often such as modulating and reference signals. Exceeding one signal over another signal leads to the opening of a given half-bridge key. The modulating signal determines the phase and frequency of the inverter output voltage, and the reference signal reduces the level of the output voltage and increases the sinusoidality of the output current. The reference signal, as a rule, perform a sawtooth with a high frequency. Fig.1 shows the control circuit of a single half-bridge for two-level voltage inverter, which made in the OrCAD Capture program. The system ( fig.1) consists of the following functional elements: -Е1, Е2, Е3, Е4, Е15 -math blocks (ETABLE) that perform the comparator function. These output blocks generate a signal,which is equal to the input difference multiplied by 10 6 . At the same time, there are set limits of the output signal: for the block E1, the limit is Umax=5 V и Umin=-5 V; for the blocksE2 and E3 -Umax=5 V и Umin=0 V; for the blocksE4 and E15 -Umax=20 V и Umin=-20 V. Since even a small difference in input signals multiplied by 10 6 exceeds the specified limits, the output of these blocks basically creates a signal Umax or Umin. In other computer programming tools, there may be special relay blocks that can replace the element ETABLE; -theDELAY element performs a time delay on a discrete signal.When a positive signal appears at its input, a signal Uout=0.1 V will be generated at the output for a specified time.After a specified time, the output signal will change to Uout=1.4 V; -mathematical blocks for multiplying (MULT) and subtracting (DIFF).
The presented system works as follows. When the modulating signal is exceeded (input U_mod1) over the reference signal (input U_saw), the signal Uout=2 V is created at the output of the E1 element, and in the opposite case -Uout=0 V.This signal is sent to two control channels for each half-bridge key.The control channel of the first key begins with element E2, and the second with element E3.When a positive signal arrives at the E2 element, a signal Uout=2 V is generated at its output.This signal simultaneously arrives at the DELAY and MULT elements.For a specified time, the DELAY element will output a signal of Uout=0.1 V.As a result, the output of the MULT element will first produce a signal Uout=0.1×2=0.2 V. Signal delay is required to ensure a sustainable closure of the half bridge IGBT-transistors, and is numerically equal to the switch-off time of the transistor. After a  8 8 specified time, the output of the DELAY element will be Uout=1.4 V, and the output of the MULT -Uout=1.4*2=2.8 V. From the output of the MULT element, the signal arrives at the input of the DIFF element, where the signal equal to one is subtracted from it (input U_1V). As a result, signals Uin=0,2-1=-0,8 V or Uin=2.8-1=1.8 V will be input to the E4 block. This is done to ensure that the element E4 received signals of different polarities. Thus, when a positive signal arrives at the E2 element, the output of the E4 element first generates a signal Uout=-20 V, and after a predetermined time delay, this signal changes to Uout=20 V, which leads to the opening of the first half-bridge transistor. When a negative signal arrives at the E2 element, the output of the E4 element immediately generates a signal Uout=-20 V, which leads to the closure of the first half-bridge transistor. The control channel of the second key works in the same way, except that the E3 element generates a signal positive signal Uout=5 V when receiving a negative signal at the input. Fig.2 shows the control circuit of one half-bridge of a three-level voltage inverter. In contrast to the previously discussed, three initial signals are supplied to such a system: modulating (input U_mod1), reference (input U_saw) and level signal (input U_ur).The level signal with different polarity enters the control channels of the first and third keys.The second key opens when the first and third keys are closed.When the signal from the input "IN+" exceeds the signal from the input "IN-", the signal Uout=2V is created at the output of E1 and E2, and in the opposite case -Uout=-2 V.As a result, when a modulating signal is found between the reference ones, the signals Uout=-2 V are generated at the outputs of the Е1 and Е2 elements.In the MULT block, these signals are multiplied together and the output signal is Uout=(-2)×(-2)=4 V. The DELAY elements and subsequent ones perform a function similar to the one previously discussed. Fig.3 shows the control circuit of one half-bridge of a four-level voltage inverter.

IN1
OUT IN2 In this system (Fig.3), the elements are similar to those considered in the first system (2level inverter).A feature of this system are the additional elements of subtraction(DIFF).These elements exclude the simultaneous opening of the first and second, as well as the third and fourth keys.If a positive signal appears at the output of the E1 element, this signal will be subtracted from the signal at the output of the E2 element.As a result, the element U2 receives a zero signal and the second key does not open.
Control is carried out by changing the modulating and reference signals.Control can be expressed using the following factors: -frequency ratio of the reference signal: where fsaw is the frequency of the reference sawtooth signal, Hz. Fmod is the frequency of the modulating signal, Hz; -modulationdepth: where Umod(m)is the amplitude value of the modulating signal; Usaw(m) is the amplitude value of the reference sawtooth signal.
The measurement system is used to determine the parameters of the output voltage and current.In the present research, the system determined the following parameters: -rms phase voltage: where uL is the instantaneous value of the phase voltage; -mean phase voltage:  8 8 -DC phase voltage component: The measurement system implemented in the OrCAD Capture program is shown in Fig.4.   Fig. 4. Phase Voltage Measurement System.
The measurement system works as follows. The signal from the voltage sensor enters the input U_L1.Then this signal is multiplied by the signal from the U_off input and then goes to three different channels. The signal from the input U_off is a signal equal to one with a time delay. It is required to skip the initial transients. An example of his work is presented in Fig.5. 5. Waveforms from the measurement system.
Additionally, the following parameters were calculated: -total harmonic distortion Where U1 is the value of the first phase voltage harmonic. This value is determined from the decomposition of the signal into a Fourier series by software; -form factor -maximum difference between effective voltages of all phases ∆U L.max = max(U RMS1 ; U RMS2 ; U RMS3 ) − min (U RMS1 ; U RMS2 ; U RMS3 ) U 1 100, %.

Results
The modulation depth was chosen such that the output voltage was the same for all inverters (at the same input voltage).The modulation depth was: for a two-level inverter μ=0.5; for a three-level -μ=0,625; for a four-level -μ=0,667.
For each inverter, several experiments were performed by changing the frequency of the reference sawtooth signal. Fig.6 shows the dependence of the harmonic distortion coefficient on the multiplicity of the reference signal ε. The average value of harmonic distortion was: for a two-level inverter -1.39; for a three-level -0.92; for a four-level -0.82.

Discussion
According to Fig.6, the total harmonic distortion of the voltage practically does not change with the change in the value of ε. This can be explained by the fact that low harmonics have the greatest valueat a low value of ε in the voltage spectrum. As ε increases, the amplitude of higher harmonics in the voltage spectrum increases.In general, the level of harmonic  8 8 distortion remains unchanged. The smallest harmonic distortions are observed in the fourlevel inverter, and the maximum -in the two-level.When changing from two-level to threelevel inverter THD of output voltage is reduced by 1.5 times, and when changing from three-level to four-level inverter -1.15 times. From the Fig.7 graph it can be seen that the value of UCONST is less for odd values of ε. However, this proposition is not confirmed for ε=19 and above when the maximum value of UCONST is observed. In general, the values of DC phase voltage component do not exceed UCONST =0.19%. However, even such small values can cause additional power losses in electrical machines. The choice of odd multiplicity ε allows to reduce the constant component of the voltage.
From the Fig.8 graph it can be seen that the maximum difference between the effective voltages of all phases decreases with increasing ε. This is due to the asymmetric modulation of the phase voltage form at low values ε. Another feature of the graph is that the largest values of ΔUL.maxare obtained with odd harmonics.

Conclusions
The proposed models of the control and measurement systems make it possible to conduct experiments using computer simulation. Control systems are maximally simplified and unified. This allows them to be used in other computer simulation programs. The measurement system allowsto simplify the calculation of the parameters of the inverters output voltage. The simulation results allow to make adjustments to the inverter control to achieve optimal output voltage parameters.