Impedance Matching-Based Power Flow Analysis for UPQC in Three-Phase Four-Wire Systems

: Different from the extant power ﬂow analysis methods, this paper discusses the power ﬂows for the uniﬁed power quality conditioner (UPQC) in three-phase four-wire systems from the point of view of impedance matching. To this end, combined with the designed control strategies, the establishing method of the UPQC impedance model is presented, and on this basis, the UPQC system can be equivalent to an adjustable impedance model. After that, a concept of impedance matching is introduced into this impedance model to study the operation principle for the UPQC system, i.e., how the system changes its operation states and power ﬂow under the grid voltage variations through discussing the matching relationships among node impedances. In this way, the nodes of the series and parallel converter are matched into two sets of impedances in opposite directions, which mean that one converter operates in rectiﬁer state to draw the energy and the other one operates in inverter state to transmit the energy. Consequently, no matter what grid voltages change, the system node impedances are dynamically matched to ensure that output equivalent impedances are always equal to load impedances, so as to realize impedance and power balances of the UPQC system. Finally, the correctness of the impedance matching-based power ﬂow analysis is validated by the experimental results.


Introduction
Nowadays, the three-phase four-wire (3P4W) power supply system has been widely used in low-voltage distribution networks (LVDNs) because of its more flexible voltage supply mode [1], that is, it can provide consumers with 220 V phase voltage and 380 V line voltage. However, due to issues such as the start-up of impact load equipment, the randomness of the grid-connected output power of renewable energy, and the short-circuit failure of power systems [2], the 3P4W distribution networks mainly face the problem of grid voltage fluctuations (i.e., sag/swell), which may cause data loss or even damage to critical loads [3], such as financial industry computers, network servers, etc.
In order to protect the LVDNs and critical loads, the unified power quality conditioner (UPQC) [4] is increasingly used to improve the power quality problems in LVDNs. Usually, the UPQC, consisting of a series converter (SC) and a parallel converter (PC), can solve both voltage and current power quality problems, such as voltage variations, unbalance and harmonics as well as current power factors, unbalance and harmonics.
When the grid voltages change, to balance the active powers between grid side and load side, the UPQC system will switch the operation states of the SC and PC, that is, the SC/PC will be changed from a rectifier to an inverter or vice versa. Correspondingly, the amplitudes and directions of the power flows will be changed with the SC/PC's operation state changes. According to the phase angle difference between system output voltage (i.e., load voltage) and grid voltage, the common analysis methods of the UPQC's operation principle are as follows: (1) UPQC-P: the difference is 0 or π, the SC only transmits active powers in the forward or reverse direction [5,6]; (2) UPQC-Q: the difference is π/2, the SC only transmits reactive powers for loads [7,8]; (3) UPQC-VAmin: the difference range is 0-π/2, the SC transmits active and reactive powers at the same time. This method attempts to minimize the volt-ampere (VA) loading, thereby reducing the design cost of UPQC [9,10]; (4) UPQC-S: it has the same range of the angle difference as UPQC-VAmin, but the difference is that the SC operates at maximum capacity to enhance the UPQC's utilization [11,12].
Hitherto the UPQC's operation principle has been rarely analyzed from the perspectives of the impedance model and impedance matching in previously published UPQC studies. For this objective, the concept of impedance matching was involved in the UPQC system in this paper, and the internal power flows of the system were analyzed by discussing the matching relationships among node impedances. However, the major challenges faced by this paper are how to establish the UPQC system's impedance model and how to use this model to analyze the power flows.
The impedance model has been widely used in system stability analysis, power sharing, power transmission and so on. In [13], the grid-connected converter is equivalent to a current source in parallel with an output impedance, and then the stability of the grid-connected converter is discussed by analyzing the impedance relationship between the converter and the gird. In [14], considering the influence of distributed capacitances of the transmission line and the transformer, the impedance model was utilized to analyze the harmonic resonance problem of the series-parallel hybrid active power filter (HAPF). In [15], the impedance model of thyristor-controlled LC-coupling HAPF is established, and the firing angles of thyristors are calculated to balance and compensate active and reactive power. In [16], the influence of line impedance between multiple distributed generations (DGs) and the point of common coupling (PCC) on the power distribution is analyzed, and then a power-sharing control method based on the virtual complex impedance is investigated to achieve accurate power-sharing between DGs. In [17], the equivalent impedance circuit of a unified power flow controller (UPFC) is established, and the active and reactive powers between the two power grids are adjusted by matching the impedance of UPFC and the transmission line.
Inspired by Refs. [13][14][15][16][17], Ref. [18] introduces the impedance matching into the UPQC and analyzes the impedance regulation process with three-phase unbalanced loads. However, the establishing method of the impedance model that plays a key role in impedance matching analysis is not given in Ref. [18]. In addition, in view of the fact that the establishing method of the UPQC impedance model is presented for the first time in this paper, the three-phase balanced loads are used as a research condition to verify the correctness of this method, and the corresponding relationships between node impedances and power flows are more clearly demonstrated.
In this paper, considering the operating characteristics of the two converters in terms of voltage-and current-source control methods, the SC can be equivalent to a controllable sinusoidal current source in parallel with its impedance, and the PC can be equivalent to a controllable sinusoidal voltage source in series with its impedance. In this way, the UPQC system is equivalent to an adjustable impedance model with five nodes (i.e., input node, SC node, node behind transformer, PC node and output node), in which the amplitude and direction of the node impedance, respectively, reflect the amplitude and direction of the power flow at the corresponding node. Once the grid voltages change, the original matching state of these node impedances will be broken, and then they will be re-adjusted to change the amplitudes and/or directions of power flows inside the system, so as to balance the active powers between input side (i.e., the grid side) and output side (i.e., the load side). As a result, no matter what grid voltages change, the system node impedances are dynamically matched to ensure that the output equivalent impedances are always equal to load impedances. Not only that, these node impedances will indicate two main characteristics as follows: (1) all node impedances are associated with load impedances; (2) except for the equivalent output impedance, four other impedances are associated with the variation degree of grid voltages. Therefore, it is helpful to intuitively observe the factors that affect the system's power flows by means of this impedance model. In other words, the UPQC impedance model established in this paper can directly reflect the changing degrees of the grid voltage and load impedance to the system power flows.
The rest of this paper is organized as follows: Section 2, the control strategies of the UPQC system are designed and the equivalent impedance model is established. Section 3, the operation principle of the system is exhaustively analyzed from the power flow and impedance matching perspective. Section 4, theoretical calculation results of the voltages, currents, active powers and node impedances are obtained according to the impedance matching method. Finally, the correctness of the impedance matching-based power flow analysis is validated by the experimental results in Section 5.

Control Strategy and Impedance Model
To discuss the impedance matching, the UPQC's impedance model is an essential prerequisite. For this purpose, the control strategy of the UPQC system is designed in this section, and on this basis, the establishment process of the system's equivalent impedance model with five nodes is given in detail. Figure 1 shows the 3P4W UPQC's circuit topology, and its electrical quantities are shown in Table 1. In which, the antiparallel thyristors S abc are used to disconnect the UPQC from the grid in the case of a grid short-circuit, power outage or other failures.
observe the factors that affect the system's power flows by means of this impedance model. In other words, the UPQC impedance model established in this paper can directly reflect the changing degrees of the grid voltage and load impedance to the system power flows.
The rest of this paper is organized as follows: Section 2, the control strategies of the UPQC system are designed and the equivalent impedance model is established. Section 3, the operation principle of the system is exhaustively analyzed from the power flow and impedance matching perspective. Section 4, theoretical calculation results of the voltages, currents, active powers and node impedances are obtained according to the impedance matching method. Finally, the correctness of the impedance matching-based power flow analysis is validated by the experimental results in Section 5.

Control Strategy and Impedance Model
To discuss the impedance matching, the UPQC's impedance model is an essential prerequisite. For this purpose, the control strategy of the UPQC system is designed in this section, and on this basis, the establishment process of the system's equivalent impedance model with five nodes is given in detail. Figure 1 shows the 3P4W UPQC's circuit topology, and its electrical quantities are shown in Table 1. In which, the antiparallel thyristors Sabc are used to disconnect the UPQC from the grid in the case of a grid short-circuit, power outage or other failures.

Series Converter Control Strategy and Impedance Model
The SC operates as a controllable sinusoidal current source, and Figure 2 shows its control block diagram in the dq0-frame, where ω s can be obtained by a phase-locked loop (PLL) [19]. The dc-link voltage control and the active power balance (APB) principle [20] are employed to the generate grid current reference i * Sd , where the dc-link voltage control quantity i * Sd1 is used to stabilize the dc-link voltage, also to compensate for system loss, while the APB generation quantity i * Sd2 is responsible for generating the grid active current. The function of the dc-link unbalance control is to balance the voltages u dc± across capacitors C dc± . The function of the current control is to adjust the SC output currents i SCabc (i.e., grid currents i Sabc ) to be sinusoidal and balanced. Moreover, k pwm , d dq0 and U Sdpk represent the modulator gain, the SC's duty ratio and the maximum value of the grid voltage, respectively.

Series Converter Control Strategy and Impedance Model
The SC operates as a controllable sinusoidal current source, and Figure 2 shows its control block diagram in the dq0-frame, where ωs can be obtained by a phase-locked loop (PLL) [19]. The dc-link voltage control and the active power balance (APB) principle [20] are employed to the generate grid current reference i Sd * , where the dc-link voltage control quantity i Sd1 * is used to stabilize the dc-link voltage, also to compensate for system loss, while the APB generation quantity i Sd2 * is responsible for generating the grid active current. The function of the dc-link unbalance control is to balance the voltages udc± across capacitors Cdc±. The function of the current control is to adjust the SC output currents iSCabc (i.e., grid currents iSabc) to be sinusoidal and balanced. Moreover, kpwm, ddq0 and USdpk represent the modulator gain, the SC's duty ratio and the maximum value of the grid voltage, respectively.  Figure 2. Control block diagram of SC.
In the dq0-frame, the grid voltages uSabc, load voltages uLabc and currents iLabc can be expressed as follows: where u Sd , u Ld and i ̅ Ld are the dc components that represent the fundamental components, whereas u Sd , u Ld and i Ld are the oscillating components that represent the harmonic components.
Since these oscillation components deteriorate the current reference generation, a second-order low-pass filter (LPF) with the cut-off frequency of 12 Hz is employed to eliminate these components [21], in order to obtain u Sd , u Ld and i ̅ Ld . According to the instantaneous power theory, ignoring the system loss, the relationship between fundamental active powers of the grid side and load side is as follows: In the dq0-frame, the grid voltages u Sabc , load voltages u Labc and currents i Labc can be expressed as follows: where u Sd , u Ld and i Ld are the dc components that represent the fundamental components, whereas u Sd , u Ld and i Ld are the oscillating components that represent the harmonic components. Since these oscillation components deteriorate the current reference generation, a second-order low-pass filter (LPF) with the cut-off frequency of 12 Hz is employed to eliminate these components [21], in order to obtain u Sd , u Ld and i Ld . According to the instantaneous power theory, ignoring the system loss, the relationship between fundamental active powers of the grid side and load side is as follows: From Equation (2), the fundamental active current generated by the APB at the input side of the UPQC can be expressed as follows: From Equation (3), since i * Sd2 is related to fundamental components (i.e., u Sd , u Ld and i Ld ), the grid only provides active powers for loads.
The total reference i * Sd is obtained by adding i * Sd1 and i * Sd2 , as follows: Since the grid currents are required to be sinusoidal and balanced waveforms, the current references of the qand 0-axis are set to i * SCq = 0 and i * SC0 = 0, respectively. Moreover, the dc-link voltage loop is designed as a typical type II control system to obtain the better antiinterference performance. As a result, a type II controller G SCV (s) = k dc (1 + s/ω z )/(s(1 + s/ω p )) is employed in the dc-link voltage control loop [22], where k dc , ω z and ω p are the controller gain, pole frequency and zero frequency, respectively.
In Figure 2, the reference i * Sd needs to be multiplied by the transformer Tr turn ratio n to control the SC output currents i SCabc , and thus the grid current i Sd (s) can be obtained as follows: where H SCd (s) = G SCI (s)k pwm /[L SC s + R SC + G SCI (s)k pwm ], Z SCs (s) = [L SC s + R SC + G SCI (s)k pwm ].
H SCd (s) is the closed-loop transfer function of the current control loop, Z SCs (s) and Z SCp (s) = n 2 Z SCs (s) are the SC's equivalent impedances on the primary and secondary side of Tr, respectively. G SCI (s) = k SCip + k SCii /s is a proportional-integral (PI) controller, where k SCip and k SCii are the PI controller gains. R SC is the equivalent resistance of the inductor L SC , and u Cnd (s) = u Cd (s)/n is the secondary voltage of Tr. The PI controller parameters for the SC can be obtained from the procedure detailed in [23].
From Equation (5), the first term H SCd (s)i * Sd (s) represents the tracking ability of i Sd (s) to the reference i * Sd , and the second term u Cd (s)/Z SCp (s) represents the disturbance of u Cd (s) to i Sd (s). Therefore, the controller G SCI (s) is required to have a larger gain to reduce the effect of u Cd (s) on i Sd (s). According to Equation (5), the SC's Norton impedance model can be obtained in the d-axis, as shown in Figure 3. For analysis simplicity, the impedance model on the secondary side of Tr in Figure 3a is equivalent to the primary side in Figure 3b. As a result, the SC is equivalent to a controllable sinusoidal current source H SCd (s)i * Sd (s) in parallel with the equivalent impedance Z SCp (s). Asides from that, the impedance modeling methods of the qand 0-axis are similar to that of the d-axis.
Based on the relationship between u Cd (s) and i Sd (s) in Figure 3b, the SC can be equivalent to an output impedance Z SCout (s), as shown by the dashed line, and its expression is as follows: Energies 2021, 14, 2702 6 of 17 effect of uCd(s) on iSd(s). According to Equation (5), the SC's Norton impedance model can be obtained in the d-axis, as shown in Figure 3. For analysis simplicity, the impedance model on the secondary side of Tr in Figure 3a is equivalent to the primary side in Figure  3b. As a result, the SC is equivalent to a controllable sinusoidal current source H SCd (s)i Sd * (s) in parallel with the equivalent impedance ZSCp(s). Asides from that, the impedance modeling methods of the q-and 0-axis are similar to that of the d-axis.
(a) (b) Based on the relationship between uCd(s) and iSd(s) in Figure 3b, the SC can be equivalent to an output impedance ZSCout(s), as shown by the dashed line, and its expression is as follows: From Equation (6), Z SCout (s) is related to H SCd (s), i * Sd (s), u Cd (s) and Z SCp (s). Since u Cd (s) and i * Sd (s) vary with u Sd (s) and P Ld , Z SCout (s) will be adjusted to control the active power P SC drew or emitted by the SC.

Parallel Converter Control Strategy and Impedance Model
The PC operates as a controllable sinusoidal voltage source, which is used to control load voltages to be sinusoidal, regulated and balanced. For this purpose, the control strategy of PC is designed, as shown in Figure 4, where the voltage references in the dq0-frame are u * Ld = 311 V and u * Lq = u * L0 = 0 V, respectively. Considering unbalanced and non-linear loads, the voltage loop controllers G PCV (s) employ the PI + quasi-resonant (QR) controllers, while the current loop controllers G PCI (s) employ the PI controllers.
From Equation (6), ZSCout(s) is related to HSCd(s), i Sd * (s), uCd(s) and ZSCp(s). Since uCd(s) and i Sd * (s) vary with uSd(s) and PLd, ZSCout(s) will be adjusted to control the active power PSC drew or emitted by the SC.

Parallel Converter Control Strategy and Impedance Model
The PC operates as a controllable sinusoidal voltage source, which is used to control load voltages to be sinusoidal, regulated and balanced. For this purpose, the control strategy of PC is designed, as shown in Figure   From Figure 4, taking the d-axis as an example, the load voltage uLd(s) can be obtained as follows: HPCd(s) and ZPC(s) are the closed-loop transfer function and equivalent impedance of the PC, respectively.
To improve the voltage quality of uL, low-order harmonics need to be suppressed. Specifically, with the increase in the order of harmonics, the harmonic contents will decrease significantly, thus the 3rd, 5th, 7th, 9th, 11th and 13th harmonics will be suppressed as undesirable components. After the dq0 coordinate transformation, the 5th and 7th harmonics as well as the 11th and 13th harmonics are transformed into the 6th and From Figure 4, taking the d-axis as an example, the load voltage u Ld (s) can be obtained as follows: where H PCd (s) and Z PC (s) are the closed-loop transfer function and equivalent impedance of the PC, respectively.
To improve the voltage quality of u L , low-order harmonics need to be suppressed. Specifically, with the increase in the order of harmonics, the harmonic contents will decrease significantly, thus the 3rd, 5th, 7th, 9th, 11th and 13th harmonics will be suppressed as undesirable components. After the dq0 coordinate transformation, the 5th and 7th harmonics as well as the 11th and 13th harmonics are transformed into the 6th and 12th harmonics, respectively, which are reflected on the dand q-axis. While, the 3rd and 9th harmonics are directly reflected on the 0-axis. Based on the above analysis, the voltage loop controllers G PCVd,q,0 (s) adopt the PI + QR structure, and they can be expressed as follows: 2k r ω c s s 2 +2ω c s+(hω o ) 2 (8) where k PCvp and k PCvi are the gains of PI controller, and h, k r , ω o and ω c are the harmonic order, resonance coefficient, resonance frequency and cut-off frequency of the QR controller.
It can be noted that the voltage loop PI controllers k PCvp + k PCvi /s are employed to control the dc component of the load voltage generated by the transformation of the ac fundamental components to the dq0-frame, while the current loop PI controllers G PCI (s) = k PCip + k PCii /s are employed to control the currents i 2dq0 . Furthermore, the current and voltage loops are designed as the typical type I and type II control systems, respectively, to achieve the fast dynamic response and good anti-interference performance, and the parameter designs of PI and QR controllers for the PC can be found in [23,24], respectively.
The PC's Thevenin impedance model can be obtained from Equation (7), as shown in Figure 5, that is, the PC is equivalent to a controllable sinusoidal voltage source and an impedance in series. Based on the relationship between load voltage u Ld (s) and the PC's output current i PCd (s), the PC can be equivalent to an output impedance Z PCout (s), as shown by the dashed line, and its expression is as follows: where kPCvp and kPCvi are the gains of PI controller, and h, kr, ωo order, resonance coefficient, resonance frequency and cut-off fr troller.
It can be noted that the voltage loop PI controllers kPCvp + kPC trol the dc component of the load voltage generated by the trans damental components to the dq0-frame, while the current loop PI + kPCii/s are employed to control the currents i2dq0. Furthermore, loops are designed as the typical type I and type II control system the fast dynamic response and good anti-interference performanc signs of PI and QR controllers for the PC can be found in [23,24], r The PC's Thevenin impedance model can be obtained from in Figure 5, that is, the PC is equivalent to a controllable sinusoid impedance in series. Based on the relationship between load vo output current iPCd(s), the PC can be equivalent to an output shown by the dashed line, and its expression is as follows: From Equation (9), ZPCout(s) is not only related to HPCd(s) an to iPCd(s) that is equal to the difference between iLd(s) and iSd(s). W balance the active powers between grid side and load side, iSd thus iPCd(s) is determined by uSd(s). As a result, the changes o changes of ZPCout(s), so as to control the active power PPC(s) drew

Equivalent Impedance Model for UPQC
The UPQC equivalent impedance model can be obtained fro as shown in Figure 6a. To simplify the analysis, a simplified im obtained from Equations (6) and (9), as shown in Figure 6b, wher input and output equivalent impedances, and can be expressed a From Equation (9), Z PCout (s) is not only related to H PCd (s) and Z PC (s), but also related to i PCd (s) that is equal to the difference between i Ld (s) and i Sd (s). When u Sd (s) fluctuates, to balance the active powers between grid side and load side, i Sd (s) will vary with u Sd (s), thus i PCd (s) is determined by u Sd (s). As a result, the changes of u Sd (s) will lead to the changes of Z PCout (s), so as to control the active power P PC (s) drew or emitted by the PC.

Equivalent Impedance Model for UPQC
The UPQC equivalent impedance model can be obtained from Equations (5) and (7), as shown in Figure 6a. To simplify the analysis, a simplified impedance model can be obtained from Equations (6) and (9), as shown in Figure 6b, where Z S (s) and Z out (s) are the input and output equivalent impedances, and can be expressed as follows: After the impedance model is established, the matching relationships among node impedances will be studied to analyze the operation principle of UPQC power flow, and the system control parameters are shown in Table 2.

Power Flow and Impedance Matching
The concept of impedance matching is involved in the UPQC's impedance model to discuss the operation principle of power flows in this section. To simplify the analysis for the power flow and impedance matching, supposing that: (a) uSabc are pure sinusoidal, and their root-mean-square (RMS) values USabc are equal to US; (b) the dc-link voltage is stable and the UPQC's loss is zero.
The RMS values of load voltages ULabc are equal to UL under the control of PC, and the variation degree of grid voltage ku can be defined as follows: From Equation (12), this value of ku is determined by US. On the basis of the variation degree ku, the theoretical analysis process can be carried out from the following three cases:

Impedance Matching-Based Power Flow Analysis in Case A
In Case A (i.e., US = UL, ku = 0), the grid provides all the active power for the load through path 1 (defined as: from the grid to the load through the transformer), and Figure 7 shows the operation principle of the UPQC in Case A.  After the impedance model is established, the matching relationships among node impedances will be studied to analyze the operation principle of UPQC power flow, and the system control parameters are shown in Table 2.

Power Flow and Impedance Matching
The concept of impedance matching is involved in the UPQC's impedance model to discuss the operation principle of power flows in this section. To simplify the analysis for the power flow and impedance matching, supposing that: (a) u Sabc are pure sinusoidal, and their root-mean-square (RMS) values U Sabc are equal to U S ; (b) the dc-link voltage is stable and the UPQC's loss is zero.
The RMS values of load voltages U Labc are equal to U L under the control of PC, and the variation degree of grid voltage k u can be defined as follows: From Equation (12), this value of k u is determined by U S . On the basis of the variation degree k u , the theoretical analysis process can be carried out from the following three cases: (1) Case A: U S = U L , k u = 0; (2) Case B: U S > U L , k u > 0; (3) Case C: U S < U L , k u < 0.

Impedance Matching-Based Power Flow Analysis in Case A
In Case A (i.e., U S = U L , k u = 0), the grid provides all the active power for the load through path 1 (defined as: from the grid to the load through the transformer), and Figure 7 shows the operation principle of the UPQC in Case A. After the impedance model is established, the matching relationships among node impedances will be studied to analyze the operation principle of UPQC power flow, and the system control parameters are shown in Table 2.

Power Flow and Impedance Matching
The concept of impedance matching is involved in the UPQC's impedance model to discuss the operation principle of power flows in this section. To simplify the analysis for the power flow and impedance matching, supposing that: (a) uSabc are pure sinusoidal, and their root-mean-square (RMS) values USabc are equal to US; (b) the dc-link voltage is stable and the UPQC's loss is zero.
The RMS values of load voltages ULabc are equal to UL under the control of PC, and the variation degree of grid voltage ku can be defined as follows: From Equation (12), this value of ku is determined by US. On the basis of the variation degree ku, the theoretical analysis process can be carried out from the following three cases: (1) Case A: US = UL, ku = 0; (2) Case B: US > UL, ku > 0; (3) Case C: US < UL, ku < 0.

Impedance Matching-Based Power Flow Analysis in Case A
In Case A (i.e., US = UL, ku = 0), the grid provides all the active power for the load through path 1 (defined as: from the grid to the load through the transformer), and  In Figure 7a, Z L is a resistive-inductive (R-L) load impedance consisting of Z Lp and Z Lq , and thus the load current i L consists of the active and reactive currents i Lp and i Lq . Thus, the active and reactive powers of load impedance P L and Q L can be expressed as follows: where the subscripts p and q represent the active and reactive components, respectively, ϕ L is the load power factor angle. In Case A, the electrical quantities of UPQC system meet the following relationships: From Equation (14), both U C and I PCp are zero, thus P SC = P PC = 0, meaning that there is no active power transmission between SC and PC. Additionally, the grid and the PC provide all active and reactive power for the load, respectively.

Impedance Matching
In Figure 7b, the input equivalent impedance Z S can be calculated as follows: From Equation (15), due to Z S = Z Lp , the input active power P S is equal to the load active power P L .
Not only that, due to U C = 0 and I PCp = 0, the SC's output impedance Z SCout is equal to zero, while the PC's output resistive impedance Z PCp is infinite. This means that the SC and PC do not get involved in the resistive impedance matching.
Since the PC compensates the all reactive power for the load, the PC's inductive impedance Z PCq can be expressed as follows: The output equivalent impedance Z out can be expressed as follows: From the above analysis, in Case A, only the PC is involved in the inductive impedance matching. Furthermore, Z S , Z PCq and Z out contain the factor Z L (Z Lp or Z Lq ), which indicates that these node impedances are adjusted only depending on the load.

Impedance Matching-Based Power Flow Analysis in Case B
In Case B (i.e., U S > U L , k u > 0), in addition to path 1, the grid provides the active power for the load through path 2 (defined as: from the SC to the PC or from the PC to the SC). To this end, the node impedances will be matched again, owing to U S > U L , aiming to balance the power flows. To analyze the operation principle more clearly, an M point is marked behind the transformer, and the operation principle is shown in Figure 8.

Power Flow
As U S increases (i.e., U S = (1 + k u )U L ), I S will be reduced to ensure P S = P L , according to Equations (3) and (12), I S can be expressed as follows: From Equation (18), I S is reduced by (1 + k u ) times.

Power Flow
As US increases (i.e., US = (1 + ku)UL), IS will be reduced to ensure PS = PL, according to Equations (3) and (12), IS can be expressed as follows: From Equation (18), IS is reduced by (1 + ku) times. The increase in US results in a voltage difference between grid side and load side, which is added the transformer Tr. Thus, the voltage UC across Tr can be expressed as follows: Combining Equations (18) and (19), the SC's active power PSC can be obtained as follows: From Equation (20), PSC is negative due to UC, which indicates that the SC draws the active power from the grid.
After the transformer compensation (i.e., M point), the voltage of path 1 is UL, while the IS remains the same, so the active power of path 1 can be expressed as follows: It can be seen from Equation (21) that PM is less than PL, meaning that path 1 cannot meet the power requirements of the load. For this reason, the PC provides the load with the active power drew by the SC, as can be seen in path 2.
The PC compensates both the active and reactive powers and its output current IPC can be expressed as follows: Combining UL and IPCp, the PC's output active power PPC can be obtained as follows: It can be seen from Equation (23) that PPC is positive, which indicates that the PC emits the active power.
The energy ∆P transferred between SC and PC is as follows: In terms of reactive power, the phase angle difference between voltage UC across the transformer and grid current IS is π, which results in the reactive power QSC of SC as zero.
While the PC provides all the reactive current and power for the load, so the reactive power QPC output by the PC is equal to QL. The increase in U S results in a voltage difference between grid side and load side, which is added the transformer Tr. Thus, the voltage U C across Tr can be expressed as follows: Combining Equations (18) and (19), the SC's active power P SC can be obtained as follows: From Equation (20), P SC is negative due to U C , which indicates that the SC draws the active power from the grid.
After the transformer compensation (i.e., M point), the voltage of path 1 is U L , while the I S remains the same, so the active power of path 1 can be expressed as follows: It can be seen from Equation (21) that P M is less than P L , meaning that path 1 cannot meet the power requirements of the load. For this reason, the PC provides the load with the active power drew by the SC, as can be seen in path 2.
The PC compensates both the active and reactive powers and its output current I PC can be expressed as follows: Combining U L and I PCp , the PC's output active power P PC can be obtained as follows: It can be seen from Equation (23) that P PC is positive, which indicates that the PC emits the active power.
The energy ∆P transferred between SC and PC is as follows: In terms of reactive power, the phase angle difference between voltage U C across the transformer and grid current I S is π, which results in the reactive power Q SC of SC as zero.
While the PC provides all the reactive current and power for the load, so the reactive power Q PC output by the PC is equal to Q L .

Impedance Matching
Compared with Case A, node impedances Z S , Z SCout and Z PCout are matched to make Z out equal to Z L in Case B.
According to Equations (10) and (18), Z S can be calculated as follows: From Equation (25), Z S is (1 + k u ) 2 times Z Lp due to U S > U L . The SC's output impedance Z SCout can be calculated as follows: From Equation (26), the direction of Z SCout is determined by U C , resulting in Z SCout being negative, which indicates that the SC operates in a rectified state to draw the active power.
The impedance Z M at M-point can be calculated as follows: From Equation (27), due to Z M = Z LP , the active powers of UPQC system cannot be balanced if the impedance matching behavior is performed by the SC alone. For this reason, the PC is required to participate in the impedance matching, and the PC's output impedance Z PCout can be calculated as follows: From Equation (28), the direction of the resistive impedance Z PCp is determined by I PCp , resulting in Z PCp being positive, which indicates that the PC operates in an inverter state to provide the load with the active power drawn by the SC. Moreover, the inductive load impedance Z Lq is only compensated by the PC (i.e., Z PCq = Z Lq ).
Comparing Equations (20) and (23) with Equations (26) and (28), it can be found that the active power transmitted by two converters is the same, but their output impedances are different, and the difference between Z SCout and Z PCout is k 2 u times. This indicates that the range of impedance regulated by the PC is wider than that regulated by the SC under the condition of the same transmission power.
According to Equations (25), (26) and (28), Z out can be expressed as follows: From Equation (29), after the node impedances are dynamically matched, Z out is equal to Z L , which achieves the impedance balance of the UPQC.
In Case B, all node impedances have two factors k u and Z Lp , which means that these impedances are adjusted depending on the grid voltage and the load, and thus achieving Z out = Z L . In consequence, when the node impedances reach an equilibrium state again, the power flows of the system will be accompanied by stability and balance. Figure 9 shows the operation principle in Case C (i.e., U S < U L , k u < 0), the analysis process in Case C is like that in Case B, and will not be repeated here. The difference is that path 1 will generate the excess active power due to the increase in grid current. To balance the system energy, the SC and PC output a positive and negative impedance, respectively, which causes the PC to draw this excess energy and the SC to return it to path 1 via path 2. It should be noted that due to the definition of k u in Equation (14), the expressions of voltage (U C ), currents (I S , I PC ), active powers (P SC , P M , P PC , ∆P), reactive powers (Q SC , Q PC ) and node impedances (Z S , Z SCout , Z M , Z PCout , Z out ) in Case C are the same as those in Case B. However, due to k u < 0 in Case C, the directions of U C , I PCp , P SC , P PC , ∆P, Z SCout and Z PCp are opposite to that in Case B.

Case Analysis
To investigate the correctness and adaptability of the above theoretical analysis, this section will quantitatively conduct some case analysis on the matching relationships between active power flows and node impedances.
The case analysis conditions are as follows: (1) The 9.8 kW × 3 three-phase balanced resistive loads are taken as an example to analyze the power flow and impedance matching.
(2) For purposes of analysis, it is supposed that the UPQC is lossless and the dc-link voltage is controlled to be stable.
(3) Referring to IEC 60038-2009, the variation ranges of U S are not more than ±10%. To prove the operation ability of the UPQC to grid voltage fluctuations, the fluctuation range is set to ±15% in this paper. The upper and lower limits of U S are taken as the analysis conditions, the three cases in the previous section are redefined as follows: Case A: U S = 220 V, k u = 0; Case B: U S = 253 V, k u = +15%; Case C: U S = 187 V, k u = −15%. According to Section 3, Figure 10 shows the quantitative matching relationships among the active powers, node impedances and grid voltages in the three redefined cases. From Figure 10a,b, P Sabc are always equal to P Labc , while Z Sabc and Z Labc are only equal at 220 V. Furthermore, P Mabc and P SCabc keep decreasing, while P PCabc keep increasing, where P SCabc and P PCabc always remain the same amplitude and the opposite direction, indicating that one converter operates in rectifier state and the other one operates in inverter state. Z Sabc and Z Mabc always keep increasing, while Z outabc and Z Labc remain unchanged and always equal. Additionally, Z SCoutabc continuously decreases, and they are zero only at U Sabc = 220 V, which is in line with the series characteristics of the SC. It should be noted that due to the definition of ku in Equation (14), the expressions of voltage (UC), currents (IS, IPC), active powers (PSC, PM, PPC, ∆P), reactive powers (QSC, QPC) and node impedances (ZS, ZSCout, ZM, ZPCout, Zout) in Case C are the same as those in Case B. However, due to ku < 0 in Case C, the directions of UC, IPCp, PSC, PPC, ∆P, ZSCout and ZPCp are opposite to that in Case B.

Case Analysis
To investigate the correctness and adaptability of the above theoretical analysis, this section will quantitatively conduct some case analysis on the matching relationships between active power flows and node impedances.
The case analysis conditions are as follows: (1) The 9.8 kW × 3 three-phase balanced resistive loads are taken as an example to analyze the power flow and impedance matching.
(2) For purposes of analysis, it is supposed that the UPQC is lossless and the dc-link voltage is controlled to be stable.
(3) Referring to IEC 60038-2009, the variation ranges of US are not more than ±10%. To prove the operation ability of the UPQC to grid voltage fluctuations, the fluctuation range is set to ±15% in this paper. The upper and lower limits of US are taken as the analysis conditions, the three cases in the previous section are redefined as follows: Case A: US = 220 V, ku = 0; Case B: US = 253 V, ku = +15%; Case C: US = 187 V, ku = −15%.
According to Section 3, Figure 10 shows the quantitative matching relationships among the active powers, node impedances and grid voltages in the three redefined cases. From Figure 10a,b, PSabc are always equal to PLabc, while ZSabc and ZLabc are only equal at 220 V. Furthermore, PMabc and PSCabc keep decreasing, while PPCabc keep increasing, where PSCabc and PPCabc always remain the same amplitude and the opposite direction, indicating that one converter operates in rectifier state and the other one operates in inverter state. ZSabc and ZMabc always keep increasing, while Zoutabc and ZLabc remain unchanged and always equal. Additionally, ZSCoutabc continuously decreases, and they are zero only at USabc = 220 V, which is in line with the series characteristics of the SC. From Figure 10c, Z PCoutabc are divided into two parts. The closer the two parts are to 220 V, the greater Z PCoutabc , and their impedances are infinite at U Sabc = 220 V, which is in line with the parallel characteristics of the PC.
For comparison with the experimental results in the next section, the theoretical calculation results of voltages, currents, active powers and node impedances in Case A-C are shown in Table 3.

Experimental Validation
In order to verify the correctness of power flow analysis based on impedance matching, the UPQC hardware prototype system has been developed to perform the relevant experiments, as shown in Figure 11. The developed control algorithms have been embedded into two DSPs (TMS320F28335), and parameters used for the experimentation are shown in Tables 1 and 2 From Table 3, the difference ΔP between PMabc and PLabc is comp converters, i.e., |ΔP|=|PMabc − PLabc|=|PSCabc|=|PPCabc|. Aside from t rates of USabc are +15% and −15% in Case B and C, respectively, wh rates of ISabc, PSCabc and PPCabc are 13.04% and 17.65% from Equations (1

Experimental Validation
In order to verify the correctness of power flow analysis ba matching, the UPQC hardware prototype system has been develo relevant experiments, as shown in Figure 11. The developed contr been embedded into two DSPs (TMS320F28335), and parameters u mentation are shown in Tables 1 and 2.

BoxⅠ BoxⅡ
Box I: SC and PC DSP-based control circuits dc-link capacitors Two air fans Auxiliary power supply Box II: Three-phase transformers Antiparallel thyristors Two air fans Figure 11. UPQC laboratory prototype.
It is important to note that the UPQC draws loss currents from sate for its system losses during the implementation of experiments. H of loss currents needs to be addressed for the evaluation of node losses are consumed in three-phase transformers, a 240 W auxiliary 24 W air fans and other losses. Figure 12 shows loss currents iSabc d from the grid with Case A and no-load, in which their RMS values ar 1.97 A, respectively. It is important to note that the UPQC draws loss currents from the grid to compensate for its system losses during the implementation of experiments. Hence, the influence of loss currents needs to be addressed for the evaluation of node impedances. These losses are consumed in three-phase transformers, a 240 W auxiliary power supply, four 24 W air fans and other losses. Figure 12 shows loss currents i Sabc drawn by the UPQC from the grid with Case A and no-load, in which their RMS values are 2.09 A, 2.18 A and 1.97 A, respectively. Figure 13 shows      Figure 14b,e. From Figure 14a,b, iSabc and uSabc are still in phase. Unlike Case A, uCabc withstand the reverse voltages (i.e., the voltage differences between uSabc and uLabc) to compensate for the swell part of uSabc in Figure 14c. As a result, the directions of uCabc are opposite to that of iSabc, which indicates that the SC operates in a rectifier state to draw the active powers from the grid. In Figure 14f, the PC's output currents iPCabc are in phase with uLabc, indicating that the PC operates in an inverter state to transmit the active powers to the loads.   Figure 14b,e. From Figure 14a,b, i Sabc and u Sabc are still in phase. Unlike Case A, u Cabc withstand the reverse voltages (i.e., the voltage differences between u Sabc and u Labc ) to compensate for the swell part of u Sabc in Figure 14c. As a result, the directions of u Cabc are opposite to that of i Sabc , which indicates that the SC operates in a rectifier state to draw the active powers from the grid. In Figure 14f, the PC's output currents i PCabc are in phase with u Labc , indicating that the PC operates in an inverter state to transmit the active powers to the loads. Figure 15 shows the experimental results of Case C, and its analysis process is similar to that of Case B, thus will not be repeated.
Based on the experimental results from Figures 13-15, the actual values of the voltages, currents, active powers, and node impedances are listed in Table 4. As mentioned earlier, the influences of the loss currents in Figure 12 on i Sabc and i PCabc should be considered for experimental results in Table 4. To be more specific, taking Case B as an example to calculate the loss currents and grid currents is as follows: in terms of loss currents, A-phase is 1 Table 4, experimental results are relatively close to the theoretical calculation results in Table 3, which endorse the correctness of power flow analysis based on the impedance matching method.  Figure 15 shows the experimental results of Case C, and its analysis process is similar to that of Case B, thus will not be repeated. Based on the experimental results from Figures 13-15, the actual values of the voltages, currents, active powers, and node impedances are listed in Table 4. As mentioned earlier, the influences of the loss currents in Figure 12 on iSabc and iPCabc should be considered for experimental results in Table 4. To be more specific, taking Case B as an example to calculate the loss currents and grid currents is as follows: in terms of loss currents, A-phase is 1 Table 4, experimental results are relatively close to the theoretical calculation results in Table 3, which endorse the correctness of power flow analysis based on the impedance matching method.   Figure 15 shows the experimental results of Case C, and its analysis process is similar to that of Case B, thus will not be repeated. Based on the experimental results from Figures 13-15, the actual values of the voltages, currents, active powers, and node impedances are listed in Table 4. As mentioned earlier, the influences of the loss currents in Figure 12 on iSabc and iPCabc should be considered for experimental results in Table 4. To be more specific, taking Case B as an example to calculate the loss currents and grid currents is as follows: in terms of loss currents, A-phase is 1.82 A (221 × 2.09/253), B-phase is 1.91 A (221 × 2.18/252), and C-phase is 1.71 A (220 × 1.97/254). In terms of grid currents, combined with the calculated loss currents, the actual RMS values of iSabc are 38.58 A, 38.89 A and 38.49 A, respectively. From Table 4, experimental results are relatively close to the theoretical calculation results in Table 3, which endorse the correctness of power flow analysis based on the impedance matching method.

Conclusions
In this paper, the impedance matching method is introduced to discuss the operation principle for the UPQC in three-phase four-wire systems. On the basis of the designed control strategies, the UPQC is equivalent to an adjustable impedance model with five nodes, and then the corresponding relationships between power flows and node impedances changing with grid voltages are analyzed from this model. When grid voltages change, the original matching state of node impedances is broken, and then all node impedances are dynamically matched to achieve the impedance and power balances of the UPQC. Experimental results from the hardware prototype system have validated the correctness of power flow analysis based on the impedance matching method, and some conclusions can be drawn as follows: (1) In Case A, the input equivalent impedances are equal to the load impedances, while the SC's output impedances are almost zero, and the PC's output resistive impedances are large, so both converters do not participate in the power transmission. (2) In Case B, both the input equivalent impedances and the impedances at M-point are increased; moreover the SC outputs the negative impedances and draws the active powers, while the PC outputs the positive impedances and emits the active powers. (3) The impedance matching relationships in Case C are opposite to that in Case B. (4) No matter what grid voltages change, system node impedances are dynamically matched to ensure that the output equivalent impedances are always equal to the load impedances.