Research on simultaneous switch and multiple switch processing methods

In the simulation of complex power electronic equipment containing multiple power electronic switches, it is often encountered that the same switch occurs several times in one step, or there are multiple switch actions in one step, that is, multiple switches. When the switching event occurs between two moments, because the voltage value can only be updated at the end of the simulation step, there is a cumulative error in the current obtained by the integration. In traditional electromagnetic transient simulation, the interpolation algorithm and its deformation are commonly used to solve this problem. However, due to the complexity of the conventional interpolation algorithm, it will seriously affect the efficiency in large-scale power grid simulation, and can only be applied to offline simulation, which cannot meet the needs of real-time simulation. In this paper, a method is presented to deal with synchronous switches and multiple switches, which can reliably solve the problem of synchronous switches and multiple switches encountered in real-time simulation of complex power electronic systems.


Introduction
For the processing of synchronous switches and multiple switches [1] , the interpolation algorithm and its deformation are mainly adopted in offline simulation, and the double interpolation algorithm is adopted in the PSCAD/EMTDC program [2] .When switching occurs within a step, node voltage, branch current, and history term are linearly interpolated back to the switching moment to give the state at the t -moment immediately before the switching action.The conductivity matrix is changed to reflect the switching action, and to deal with the synchronous switching problem, [G]V=I is solved again at t + immediately following the switching action.From this point, one step is calculated using the normal integral step, and then it is judged whether there is a new switching action.If there is a new switching action, the above interpolation calculation process is repeated; if there is no new switching action, the interpolation is returned to the simulation time grid.The calculation steps of this method are described in detail in [3].The calculation process of this method is complicated because it requires at least two interpolation backsteps in the calculation process.In [4], the double interpolation algorithm has been improved to simplify the calculation steps and reduce the number of interpolation backsteps.However, due to the interpolation extrapolate method, the calculation accuracy is not as good as that of the double interpolation method, and the variable step size algorithm will also bring additional calculation overhead.In [5], the algorithm above is improved to ensure the constant node admittance matrix in the calculation process, and the simulation speed is improved, but due to the existence of interpolation extrapolation, the algorithm still has the problem of low accuracy.The algorithm above involves interpolation and extrapolation and can only be used for offline simulation.
For the processing of synchronous switches in real-time simulation, the switch prediction algorithm is more suitable.In [6], RTDS uses the exhaustive mode of switch combination to predict synchronous switches and selects possible states among all switch states for exhaustive analysis until a state satisfying the conditions appears.However, when there are too many switching states, the method of exhaustion will have the problem of low efficiency.For the processing of multiple switches, in [7][8], a Time-Average-Method (TAM) is proposed, which averages the state variables according to the principle of impulse equality, avoiding the interpolation rollback and other operations in traditional simulation methods, and ensuring that no error accumulation would occur in the integration process [9] .However, the original TAM can only be applied to backward Euler solvers [10] , which limits the scope of application.In summary, compared with more mature offline simulation algorithms, synchronous switch, and multi-switch processing algorithms suitable for real-time simulation still need to be further studied.

Generation mechanism of synchronous switch and multiple switch
During the simulation of the VSC converter, the IGBTs of the three bridge arms are switched independently.As shown in Figure 1, multiple bridge arm switches may be switched at the same time within one step.When the simulation adopts a fixed step size, the switching of the remaining switches within the step size can only be shown at the next moment, when the converter valve is on or off, the problem of multiple switches will lead to triggering errors.Synchronous switching refers to the opening or closing of a switch in a power electronic system causing a series of other switches to be opened or closed in a chain reaction.Because of the instantaneous switching assumption that all other switches operate simultaneously, the circuit passes through a series of states that have no physical meaning until a new state allows for "time divergence."The synchronous switching problem often occurs in forced commutating circuits containing controlled devices, as shown in Figure 2. When the gate off thyristor (GTO) is turned off, the outflow current from the power supply becomes zero.Since the current in the inductor cannot mutate, a negative voltage (Ldi/dt) is generated, and the single pilot diode immediately switches on and maintains the current in the inductor.However, when calculating with a fixed-step program, the diode is not turned on until the step is over, so the current in the inductor drops to zero, which creates large voltage spikes within a single step.To solve the problems above, an instantaneous interpolation method is used in the off-line simulation program PSCAD/EMTDC program (version 3.07 and above) to distinguish the switching operation from the integration operation.By interpolation backtracking, the circuit state [G]V=I solution and the matrix G are updated, and the diode is switched on at the zero voltage, rather than at the end of the step.The result is that the inductive current is not affected and continues to flow through the diode, thus solving the problem of synchronous switching.

Synchronous switch processing method of two-level converter
In the two-level half-bridge converter shown in Figure 3, the switching group exists in the form of an IGBT/ diode group.In each simulation step, the on-condition of IGBT in the IGBT/ diode combination is that there is a gate signal (g) and the branch voltage vce > 0; IGBT shutdown condition: no gate signal (g) or current ice < 0; The diode conduction condition is when the voltage vd > 0; The shutdown condition is that the diode branch current id is less than or equal to 0. The IGBT and diode in the IGBT/ diode combination cannot be on at the same time.The IGBT/ diode group has three switching states: State 1: both the IGBT and the diode are in the off state; State 2: The IGBT is in the off state and the diode is in the on-state; State 3: The IGBT is on and the diode is off.The state equation of the model is: Since the AC side of the converter is connected to a large inductor and the DC side is connected with a large capacitor, the AC side current io of the converter and the DC side voltage vp and vn will not change suddenly.In addition, in the non-locked state, the triggering signal g1g2 of the IGBT in the upper and lower bridge arm is complementary, and the DC side voltage vp is always greater than the voltage vn.According to the direction of current io, the switch status table in the non-latched state can be obtained, as shown in Table 1.When the circuit structure is changed into a VSC converter, the final state can be judged only by analyzing the three half-bridges separately.When a short circuit and other faults occur in the converter circuit, generally protecting the safety of the converter and other equipment will let the converter run in a locked state.At this time, the circuit operating conditions are complex, and it is difficult to predict the switch state, so in the locked state, a new synchronous switch processing method is needed.
When the converter operates in a locked state, the trigger signal g1g2 of T1T2 is zero at the same time, and the state of the diode is unknown.Through analysis, it can be seen that the diode may have the following three switching states: State 1: D1D2 is in the off state; State 2: D1 is on and D2 is off.State 3: D1 is off and D2 is on.
If a latching state occurs in the simulation process, the processing method is as follows: First, it is assumed that the circuit is in State 1, that is, both D1D2 are in the off state.At this time, the node admittance matrix is updated to solve the circuit, and the voltage and current at both ends of D1D2 are obtained.At this time, the switching state is determined.If the D1D2 on-condition determined by the voltage and current is not consistent with the assumption, it indicates that the assumption is wrong.It is assumed that the on-light state is in State 2 again, and the same calculation and judgment are performed until the three states are judged.

Time-average-method (TAM) algorithm
The on-light state prediction can solve the problem caused by synchronous switch switching in realtime simulation, but the on-light state prediction cannot be processed when the intersection point of the modulated wave and the carrier is in the middle of two simulation moments.In addition, since the voltage value can only be updated at the end of the simulation step, even if the algorithm can predict the next switch state, it will still lead to cumulative errors.When the trapezoidal method is used for integration, there is a cumulative error in the current obtained by integration.In order to reduce the cumulative error of the integrated component caused by switching between the simulation steps, the time average method (TAM) can be introduced for processing.TAM is to take the equivalent average value of the switching function in one simulation cycle.

Analysis of examples
In order to verify the effectiveness of the switch prediction algorithm above and the TAM algorithm, the VSC converter circuit shown in Figure 4 was simulated, and the simulation parameters were shown in Table 2.The simulation was carried out on a PC using Matlab to realize the algorithms above.The calculation step was 1 us, and the calculation result of PSCAD with the step length of 0.1 us was taken as the benchmark.At each simulation step, the advanced synchronization switch state prediction is started, and then the TAM processing is carried out during the previous simulation step.It can be seen from the waveform comparison diagram that the simulation waveform deviates seriously from the reference value when synchronous switch and multiple switch are not processed, and the wrong simulation result is obtained.The relative error of the simulation results decreases obviously, reaching less than 0.2~2% after the synchronous switch is processed by the switch prediction.It can be seen that the switching prediction algorithm in this paper can effectively solve the problem of synchronous switching in the simulation process of a two-level VSC converter.When the

Table 1 .
Switch status table.

Table 2 .
Simulation system parameter.The comparison of simulation results is shown in Figure5.UA1 is the voltage to the right of the Aphase resistance on the AC side, and Ia is phase A currents on the AC side.