# A Two-Grid Interline Dynamic Voltage Restorer Based on Two Three-Phase Input Matrix Converters
## 3 TI-IDVR System Analysis
Thus, Equation (15) can be written as:  
\[\left|2V_{F1,sag}\right|=k\left|V_{F2,rated}\right|-\left|V_{F2,rated}\right| \tag{17}\]  
\[\left|V_{F1,sag}\right|=\left|S^{\prime}V_{F1,rated}\right|\text{, where S is the sag value that by definition has values between 0.9 and 0.1. In this way, we define \(S^{\prime}\)= (1-5). Substituting in Equation (17), we have:  
\[\left|2S^{\prime}V_{F1,rated}\right|=\left|V_{F2,rated}\right|(k-1) \tag{18}\]  
Combining Equations (16) and (18) gives us:  
\[\left|2S^{\prime}KV_{F2,rated}\right|=\left|V_{F2,rated}\right|(k-1) \tag{19}\]  
considering that \(S^{\prime}\)= (1-5) and solving for S:  
\[V_{sgmax,pu}=aV_{dcmax,pu} \tag{11}\]0  
and combining Equations (16) and (20):  
\[V_{sgmax,pu}=aV_{dcmax,pu} \tag{11}\]1  
From this expression, we can establish a maximum value of the sag that the proposed TI-IDVR can satisfactorily mitigate:  
\[ \begin{array}{l}sag,max,F1=\frac{\left|V_{F2,rated}\right|+\left|V_{F1,rated }\right|}{2\left|V_{F1,rated}\right|};\ \left|V_{F1,rated}\right|>\left|V_{F2,rated}\right|\\ sag,max,F2=\frac{\left|V_{F1,rated}\right|+\left|V_{F2,rated}\right|}{2 \left|V_{F2,rated}\right|};\ \left|V_{F2,rated}\right|>\left|V_{F1,rated}\right|\end{array}  \tag{22}\]  
where _sag,max,F1_ and _sag,max,F2_ are the maximum sags that can be mitigated at loads 1 and 2, respectively. For example, assuming that \(\left|V_{F1,rated}\right|=200\) V _and_\(\left|V_{F2,rated}\right|=150\) V, then _sag,max,F1_ = 0.875; that is, \(\left|V_{F1,sag}\right|=25\) V. Considering Equations (4), (10) and (11), we have \(\left|V_{L1,rated}\right|=\left|V_{F1,sag}\right|+\left|V_{F1,sag}\right|+ \left|V_{F2,rated}\right|\); 200 V = 25 V + 25 V + 150 V; this shows that if a sag greater than 87.5% appears, the stability in load voltage is compromised. It should be mentioned that ideal conditions are considered in this analysis; that is, the voltage losses in the switching elements, the input and output filters of the TI-IDVR, and the injection transformers are not considered. Now, suppose a voltage swell on feeder 1. Figure 3b shows the relationship of the voltage vectors or voltage phasor in this case. Taking into consideration Figures 2 and 3b, the following equation can be written:  
\[\overset{\rightarrow}{V}_{L1,rated}=\overset{\rightarrow}{V}_{F1,swell}- \overset{\rightarrow}{V}_{comp,swell} \tag{23}\]  
where \(\overset{\rightarrow}{V}_{L1,rated}\), \(\overset{\rightarrow}{V}_{F1,swell}\) y \(\overset{\rightarrow}{V}_{comp,swell}\) are the voltage vectors for load voltage 1, feeder 1 voltage (with swell), and compensation voltage injected by TI-IDVR, respectively. Following the reasoning used for the voltage sag, we can write the absolute value of the offset voltage \(\left|\overset{\rightarrow}{V}_{comp,swell}\right|\) as follows:  
\[\left|\overset{\rightarrow}{V}_{comp,swell}\right|=aMV_{dc} \tag{24}\]  
The value per unit of the voltage swell (\(V_{swell,pu}\)) based on the nominal value of the load voltage is as follows:  
\[V_{swell,pu}=1-\left|V_{F1,swell,pu}\right| \tag{25}\]  
Now, assuming that the voltages \(\overset{\rightarrow}{V}_{L1,rated}\) and \(\overset{\rightarrow}{V}_{F1,swell}\) are in phase, Equation (23) can be written as follows:  
\[\left|V_{L1,rated}\right|=\left|V_{F1,swell}\right|-\left|V_{comp,swell}\right| \tag{26}\]  
Considering \(\left|V_{L1}\right|=\left|V_{L1,rated}\right|\), Equation (26) can be written as follows:  
\[1=\left|V_{F1,swell,pu}\right|-\left|V_{comp,swell,pu}\right| \tag{27}\]  
Combining Equations (24), (25) and (27) we can write:  
\[V_{swell,pu}=aMV_{dc,pu} \tag{28}\]  
The maximum value of a voltage swell that can be compensated for can be obtained considering \(M=1\).