Linearly Decoupled Control of a Dynamic Voltage Restorer without Energy Storage

This paper presents the design of a decoupled linear control strategy for a Dynamic Voltage Restorer (DVR) that utilizes a Matrix Converter (MC) as its core element and obtains the compensation energy directly from the power system. This DVR is intended to cope with power quality problems present in supply system voltages such as balanced and unbalanced variations (sags and swells), and harmonic distortion. The dynamic model of the complete system that includes the Matrix Converter, the input filters and the electrical grid, is performed in the synchronous reference frame (dq0), to have constant signals at the fundamental frequency, in order to design the proposed linear control strategy. The coupling in the dq components of the system output signals caused by the Park Transformation, is eliminated by a change of variable proposed for the controller design, giving rise to a decoupled linear control. In this way, the strategy developed makes it possible to establish an adequate transient response for the converter in terms of convergence speed and overshoot magnitude, in addition to ensuring closed-loop system stability under bounded operating conditions. Unlike other proposals that utilize complex modulation strategies to control the MC under adverse conditions at the input terminals, in this case, the ability to generate fully controllable output voltages, regardless of the condition of the input signals, is provided by the designed linear controller. This allows the development of a multifunctional compensator with a simple control that could be of easy implementation. In order to verify the performance of the control strategy developed, and the effectiveness of the proposed DVR to mitigate the power quality problems already mentioned, several case studies are presented. The operational capacity of the MC is demonstrated by the obtained simulation results, which clearly reveals the capability of the DVR to eliminate voltage swells up to 50% and sags less than 50%. The compensation limit reached for sags is 37%. In relation to compensation for unbalanced voltage variations, the DVR manages to reduce the voltage imbalance from 11.11% to 0.37%. Finally, with regard to the operation of the DVR as an active voltage filter, the compensator is capable of reducing a THD of 20% calculated on the supply voltage, to a value of 1.53% measured at the load terminals. In the last two cases, the DVR mitigates disturbances to a level below the criteria established in the IEEE standard for power quality. Results obtained from numerical simulations performed in MATLAB/Simulink serve to validate the proposal, given that for each condition analyzed, the MC had succesfully generated the adequate compensation voltages, thus corroborating the robustness and effectiveness of the control strategy developed in this proposal.


Introduction
Power quality is a concept that has acquired great relevance because it can be utilized to evaluate the adequate performance of current power systems. Since the number of nonlinear loads connected to the electrical grid is increasing, the quality of the signals in the system has been degraded due to the operation of these devices. This has resulted in considerable economic losses due to the malfunction of electronic loads sensitive to variations in supply voltages [1]. Among the most common voltage disturbances are sags and swells, which together with harmonic distortion and voltage imbalance, almost entirely encompass power quality problems that adversely affect the operation of power distribution systems [2].
Many solutions to these power quality problems have been proposed in recent years, most of these considered within the concept of Custom Power Devices (CUPS) [3,4]. In this sense, Middlekauff and Collins presented a study using Series Devices (SD) to mitigate power disturbances and voltage sags [5]. The series compensation device denominated Dynamic Voltage Restorer (DVR) was introduced for voltage sag mitigation and has been adopted as a common solution to the problem. The DVR operating principle is to inject the required voltage in series with the main supply in order to reach the levels at load terminals [6]. Conventional DVR topologies utilize an energy storage device (ESD) at their input terminals, which stores energy to increase the operational range of this compensation device.
Usually, the ESD consists of a DC energy source such as batteries [7], supercapacitors, photovoltaic (PV) cells, among others, or an AC source such as a flywheel [8]. In these configurations, the compensation power is limited by the capacity of the ESD; therefore, an optimal operation mode is typically required to improve the DVR performance [9]. An additional solution consists in utilizing a DVR topology that is capable of obtaining the required compensation energy directly from a robust node on the same utility grid [6]. In order to implement this solution, a power electronics converter is required to handle AC power at its input and output terminals. For this reason, researchers have focused their efforts on developing DVR topologies based on AC-AC power converters. In this way, these topologies allow avoiding the drawbacks imposed by the DC-link required in solutions based on back-to-back converters, such as lower energy density, and high maintenance costs. In addition, the AC-AC converters allow obtaining a more accurate compensation, thus the resulting compensated signals have a higher quality [10]. On the other hand, DVRs based on AC-AC converters, however, face the challenges of dealing with complex topologies of these converters [11,12] as the difficulty of implementing control and modulation strategies to generate the signals required to accurately perform the compensation scheme [13,14].
Unlike AC-AC converters used in power compensation applications, such as Vector Switching Converters (VeSc), the Matrix Converter (MC) exhibits the following operative advantages: high quality input current signals, controllable input power factor, four quadrant operation and compact design. These remarkable features make the MC an attractive option for DVR implementation. Nonetheless, features such as the limited voltage ratio and the absence of passive elements, which implies input/output coupling, increase the difficulty to define accurate control and modulation strategies. In order to utilize the MC as a DVR to compensate different voltage disturbances, it is necessary for the converter to have the ability to generate fully controllable compensation voltages, regardless of the input terminal signal characteristics. This requirement prevents the utilization of classical scalar and vector modulation strategies, which consider that the input voltages are sinusoidal and balanced. Although modulation strategies have been developed to control the MC even under adverse conditions at its input terminals, most of these techniques are focused on generating balanced and sinusoidal output voltages [15]. Since the drawback of input/output coupling in MC had been overcome by novel modulation strategies, proposals began to emerge for the implementation of DVRs with the MC as the core element. In this respect, Szczesniak et al. published a comprehensive study about control methods applied to DVR using three-phase Matrix Converters, where the effectiveness of MCs in DVR applications is deeply discussed [16]. Shabanpur and Seifi reported a comparative study about the different control methodologies applied to DVRs using an MC instead of conventional back-to-back converters [17]. Similarly, Abardeh et al. developed a control system for an MC based DVR topology, capable of generating the reference voltages during different sag and swell conditions [18]. Meanwhile, Lozano et al. proposed a novel DVR topology based on the MC, able to compensate balanced and unbalanced voltage sags without using an ESD [19]. In addition, these compensation schemes mainly consider balanced disturbances, whereas in practice more of the power quality problems are of an unbalanced nature. Recently, proposals have been developed based on the so-called multifunctional DVR, which is capable of operating to compensate balanced and unbalanced voltage sags and swells, as well as harmonic distortion. However, these multifunctional devices, like voltage sags and swells compensators, in addition to utilizing a complex modulation technique, also require a control strategy to achieve compensation of all the disturbances mentioned. It is worth mentioning that the control strategy is also responsible for ensuring the stability of the system. In [20], even though the results show that the DVR operates adequately in the face of different disturbances, the paper does not focus on controller design. It is well known that both the time-varying modulation and nonlinearity caused by the MC coupling make it difficult to design a controller, for this reason, it is a challenging task to design suitable controllers for this application that comply with the aforementioned characteristics.
A commonly used strategy to simplify the design of controllers for the MC is to model the system in the synchronous reference frame (dq0), utilizing the Park Transform. In this reference frame the signals at the fundamental frequency are constant values, thus eliminating the need to use a time-varying modulation technique. With regard to distorted signals such as those associated with power quality disturbances, in the dq coordinates they will appear as a deviation from the constant reference values, thereby allowing the utilization of linear controllers to ensure proper operation of the MC. However, one of the inherent disadvantages of modeling the converter in the dq0 reference frame is the coupled terms that result between the components of the d and q axes, which complicate the controller design and affect its dynamic performance. Hence, the use of mathematical strategies is required to decouple these elements. In relation to research works involving the operation of a voltage compensator, in [21] applying this decoupling strategy in the conventional DVR, the design of a linear controller is achieved, which allows it to have an adequate dynamic response by mitigating the disturbances. Considering these results, it is concluded that by modeling the converter in the dq0 reference frame, and using a decoupling strategy for the system components, it is possible to develop a linear control technique capable of controlling the operation of the MC under adverse operating conditions at its input terminals, without requiring the operation of a complex modulation algorithm. Having a direct MC that generates fully controllable voltages regardless of the condition of the input voltages, allows proposing the development of a DVR that can obtain compensation energy from the same supply system for different types of disturbances.
For this reason, this paper proposes a DVR based on a Direct Matrix Converter operated by a decoupled linear controller, the parameters of which are estimated based on the mathematical model. The model is developed in the dq0 reference frame, and the coupling in the dq components of the system output signals caused by the Park Transformation are eliminated by a change of variable proposed for the controller design. The control technique was developed considering the nonlinear components of the model such as the amplitude-bounded perturbations, which directly affect the linear terms of the system. Thus, the MC operates adequately under adverse conditions at the input terminals without the need of a complex modulation strategy, and therefore, the multifunctional operation of the DVR is guaranteed. The compensator is able to mitigate disturbances such as balanced and unbalanced voltage variations (sags and swells), as well as harmonic distortion. In addition, the decoupled linear control strategy allows evaluate and ensure the DVR stability, by considering the entire system as a linear component and taking into account non-lineal bounded perturbations derived from practical operational considerations. Numerical simulations performed in MATLAB/Simulink validates the effectiveness of the control strategy developed, and demonstrate the feasibility of the DVR topology proposed. Likewise, the results obtained confirm that with the decoupled linear control strategy, the utilization of MC can be extended to a wide variety of applications completely dominated by conventional DC-AC converters, such as in most topologies of FACTS devices, or in distributed generation systems.

Dynamic Voltage Restorer (DVR) Mathematical Model
In this proposal, the DVR comprises two principal components: the Matrix Converter, and the passive filters. The mathematical model of the system is described by means of their state-space representation. Variables defined in the phase coordinate system (abc) are transformed into the rotating coordinate system (dq0) through Park transform, taking the supply voltage as the reference signal to obtain the phase angle required for the transformation. In this particular case, component 0 is neglected because the MC mathematical model considers only line voltages.

Matrix Converter
The Matrix Converter is a device specialized in transforming electrical energy from AC to AC, through an array of solid-state power devices. This converter operates synchronizing the commutation of nine bidirectional switches (s ij ), responsible for connecting any of the three input terminals ( Figure 1 shows the internal structure of a three-phase Direct Matrix Converter. In order to generate the desired set of output electrical signals, it is imperative to develop a suitable sequence of operation for the matrix switches [22]. Over the years, a variety of modulation techniques have been developed to control the MC [23]. Most of these techniques are commonly based on two approaches: scalar methods, as the one proposed by Venturini, and the space vector modulation (SVM) strategies. These last strategies offer the advantage of allowing a better selection of the required voltage and current vectors, simplifying the control algorithms, and allowing the converter to operate with a unity power factor at its input terminals. In the SVM techinques, the MC relevant signals, namely, the input and output voltages and currents, are represented as space vectors in a complex plane. Recently, the MC performance under unbalanced supply and abnormal conditions at the input terminals have been addressed in several investigations, from which it can be concluded that to achieve this objective it is necessary to modify conventional strategies, increasing the number of mathematical operations required or their complexity [24].
In this paper, the Direct Space Vector Modulation (DSVM) proposed by Casadei et al. was adopted [25]. Although it is a strategy in which the disturbances at the input terminals are reflected on the MC output signals, its implementation is relatively simple. Thus, considering that the problem of MC coupling can be addressed by the controller, the DSVM technique is suitable for this application. In this case, the MC is represented by a low-frequency algebraic model, which relates the input currents (i di , i qi ) with the output currents (i do , i qo ); and the output voltages (v do , v qo ) with the input voltages (v di , v qi ), under a unity power factor operation defined within the modulation strategy. Consequently, the MC can provide active and reactive power even though there is only active power at its input terminals.

Passive Filter
Passive filters are typically utilized to reduce the magnitude of the high-frequency harmonic components generated by the commutation of the MC power switches. The filter connected at the MC input terminals attenuates the undesired harmonic components present in the current demanded from the supply, without modifying the input voltages.
On the other hand, an output filter reduces the inherent distortion of the MC output voltages, which are injected in series with the supply line, in order to compensate the voltages applied on the load terminals. In this case, the control strategy is responsible for preventing the propagation of the supply system disturbances through the converter. Figure 2 shows the equivalent single-phase model corresponding to the passive filter considered for the input and output terminals of the MC.

System Mathematical Model
The proposed DVR topology includes a Direct Matrix Converter with passive filters connected at its input and output terminals, as can be seen in the schematic diagram presented in Figure 3. In this system, the supply voltage serves as the sync signal for the control and modulation strategies. The phase angle of this voltage is obtained by means of a Phase-Locked-Loop (PLL) module. In the dq0 reference frame, the system states correspond to the input and output currents and voltages of the MC, that is, respectively. Voltages, v ds and v qs , as well as currents, i dload and i qload , are the disturbance inputs; whilst voltages {v do , v qo } and {v dload , v qload }, are the control inputs and outputs, respectively. Thereby, the system parameters, are used to define the mathematical expressions of variables x that make up the vector X of state variables, given by Equation (1), Consequently, the compensation system is formally described by the state-space representation defined by Equations (2)-(10),ẋ , and u i = x 2 3 + x 2 4 . According to the instantaneous power theory, the term p ≡ v do i do + v qo i qo , represents the active power at the MC output terminals, i.e., the compensation power. The set of differential equations given by (2)-(10), represent the dynamic behavior of the entire system, including the nonlinear terms associated with the MC operation. These equations can be rewritten in the canonical form as Equation (11), The linear matrix A o is composed by the parameters related to the linear components of the system, and the perturbation functions g o (x, u), represent the input disturbances along with the nonlinearities incorporated by the MC. This expression can be arranged in the form given by Equation (12), where the components of vector g o (x, u) and the components of matrix A o are defined as,

Decoupled Model Outputs
In Equation (12), the first four equations corresponding to the input filter are decoupled from the following four equations, corresponding to the output filter, where the input signal for system control appears [26]. The last two equations represent the dynamics of the decoupled output for the simplified model. Redefining the control inputs as described in Equations (13) and (14), it is possible to rewrite the system in the compact form, as stated in Equation (15) x = A od x + g od (x, u), where, A od and g od are fundamental matrices to describe the decoupled system represented by Equation (16),ẋ . It is noteworthy that the first four equations of the original model have not been modified. Nonetheless, the second block of equations can be separated into three components: two first-order elements (σ 2 ), corresponding to the dynamics of the output signals, and one second-order system, coupled with the first-order ones. In this way, the control problem focuses on the analysis of the two first-order linear systems, represented by the system of Equations (17) and (18), which depends mainly on expressions forẋ 7 andẋ 8 , Hence, the stability of all internal states of the system can be guaranteed.

Control Strategy Design for Decoupled System
The proposed controller for the decoupled system utilizes an output feedback strategy with an integral control action [27]. The diagram of this closed-loop strategy is shown in Figure 4. A new dynamic is incorporated into the system through the error functionė, defined by Equation (19).ė Additionally, the input signal indicated in Equations (17) and (18), and related to the new dynamics, is given by expression (20), Therefore, the feedback system takes the convenient decoupled form denoted by Equations (21)-(23)ẋ = (a − bk y c)x + bk i e + bk y r − bk y pw, which can be rewritten in the following matrix form, In this case, the output is given by a second-order system. The stability analysis and transient response are directly estimated from the eigenvalues of the linear system defined by Equations (24) and (25). Inputs r and w represent the reference and disturbance signals, respectively. The output is determined by the actual state x, plus the disturbance signal w.

Closed-Loop Stability Analysis
For the generic system described by Equations (17) and (18), constants a, b, c and p, are defined as follows: a = σ 2 , b = 1, c = 1, and p = 1. Moreover, the system inputs are described by means of Equations (26) and (27), v qa = k i e 2 + k y r q − k y x 8 − k y v qs , considering the form established for expression (20). Therefore, the system can be rewritten in the canonical form, similarly to Equation (11), but utilizing A c and g c (x, u), as given by Equation (28), This last expression is given in expanded form by Equation (29), where, Specifically, the stability of the closed-loop system is determined through the eigenvalues of matrices A 11o and A 22c , as long as they have the negative real part, in addition to the bounded function g c (x). In this sense, the system is tuned so that the eigenvalues have a negative real part, which is achieved through the appropriate selection of the system parameters that directly affect the values of matrix A 11o elements. Consequently, stability in each control loop is guaranteed by selecting suitable values for the elements k y and k i of the following matrix, in order to obtain eigenvalues with the negative part in matrix A 22c . Figure 5 shows a simplified diagram of the DVR, where the main signals that determine its operation are indicated in the dq0 reference frame.
Assumptions have been considered in some signals of the system from a practical point of view, which allow determining the elements associated with system perturbations. The assumptions considered are the following: • v sp < K, represents a bounded input voltage with a maximum magnitude value K, • v ip ≤ v sp , condition defined during input filter design, which implies that there may be a voltage drop across the input filter elements; • v op < 0.87 v ip , voltage restriction inherent to MC operation, • v injp ≤ v op , condition defined during output filter design that implies that there may be a voltage drop across the output filter elements; From the analysis of functions g(x, u), it is possible to establish that the term p that represents the active power delivered by the DVR is limited by the operating characteristics of the system, its capacity and the capacity of the compensator. Furthermore, when considering the constraint that v sp > 1, results in the condition that u i > 1, which allows to establish the following relationships, x 3 u i < 1 and x 4 u i < 1. Through the previous considerations, the system capabilities are determined, where it must be fulfilled that i loadp < K 2 , where K 2 represents the maximum current of the load. Finally, it is concluded that the closed-loop system presents a BIBO (Bounded Input Bounded Output) stability under the already described operating considerations.

Simulation Results
The time-domain performance of the entire system is analyzed through detailed numerical simulations using a Simulink model. In particular, the control algorithm's effectiveness is verified. As case studies, the stability properties of the DVR is firstly shown through providing the eigenvalues of the compensation system. Then, operating conditions that involve compensation of balanced and unbalanced voltage variations, as well as the mitigation of harmonic distortion are addressed. The main objective of these cases is to evaluate the performance of the controller design to operate the MC as a voltage compensator, and to verify its ability to generate accurate compensation signals for each disturbance without requiring a complex modulation strategy.
The last eigenvalue is related to the behavior of the output signals. Therefore, based on all the eigenvalues obtained, the stability of the system is confirmed.
Below are the case studies proposed to address the most common power quality problems that affect the operation of distribution power systems.

Balanced Voltage Sags and Swells
This study case considers that the quality of the supply voltage is affected by consecutive sags and swells problems along the time interval from 0.015 to 0.25 s. The severity and duration of these consecutive power quality problems are the following: first, a sag of 20% of 0.035 s occurs, followed by a 20% swell of the same duration; then a sag of 40%, followed by a 40% swell are applied; finally, a sag of 50% and a swell of the same magnitude are applied during 0.05 s, as sketched in Figure 6 in the abc and dq0 reference frames. The dq components of the voltage reference to be achieved is also shown. In Figure 7, the effects of the DVR operation are shown through load voltages, presented in abc coordinates and in the dq0 reference frame. From the results obtained, it is clear that despite the occurrence of consecutive disturbances in the supply system, the load voltage remains almost invariant during the analysis period and at levels close to its nominal value. During the transition in the disturbances, transients are observed in the load voltage, the most considerable being the one that occurs at t = 0.2 s, and this condition is due to the fact that the controller is operating to inject a maximum compensation value and suddenly the system voltage changes between 50% and 150% of its nominal value, so the control must be adjusted in a very short time to completely reverse the phase of the injected voltage. It is important to note that these types of operating conditions are very unlikely to occur in a real system, but they still serve to verify the performance of the compensator under extreme conditions. Table 2 summarizes the steady-state errors between the reference voltages and the compensated voltages at the load terminals.
Results obtained show that the proposed DVR is capable of regulating the load voltage during each disturbance except during the most severe condition (sag of 50%), in which there is an average error of 13%. It should be considered that for this analysis, the compensation voltage is taken from the failed system, so if the system voltage drops to 50%, only that value is available to inject the missing voltage at load terminals, which limits the compensation level to sags less than 50%, since the MC limited voltage ratio and the losses in the converter and filters must also be considered. Nevertheless, considering that only 2% of all faults correspond to voltage sags of 50%, the proposed DVR configuration is still an attractive option for voltage sag compensation thanks to the aforementioned operational advantages. In the case of severe swell disturbances, the system does not exhibit any problem to attenuate them properly.

Unbalanced Disturbance
The second study case involves an unbalanced disturbance, where the magnitude of the supply system phase voltages are modified according to the following sequence: during the time interval where 0.016 s ≤ t ≤ 0.05 s, magnitude of phase A voltage drops to 70% of its nominal value; during 0.05 s ≤ t ≤ 0.1 s, magnitude of phase B voltage also drops to 70%; and finally, during 0.1 s ≤ t ≤ 0.15 s, magnitude of phases A and B voltages drop to 85%. Figure 8 presents the supply system voltages during the unbalanced disturbances, in time-domain and in the dq0 reference frame. Similarly, the lower graph in Figure 8 illustrates the magnitude of the voltage imbalance, calculated according to the definition presented in [28]. This case study is of particular interest for the DVR configuration based on the direct MC, because in order to achieve compensation, the converter must generate voltages with an unbalance level independent of the unbalance present at its input terminals. This condition has been addressed in several investigations in which modifications to conventional modulation strategies have been proposed, or new techniques have been developed with a certain degree of complexity in their implementation. In this case, the proposed DVR operates with a conventional modulation strategy, not designed for this application, but with a robust controller that can fill this gap. While Table 3 summarizes the percentages of unbalance present in voltages before and after compensation, Figure 9 exhibits the load voltages and the behavior of the imbalance.  Although the MC must generate constant voltage components from components that vary sinusoidally, as can be seen from the central image of Figure 8, the controller in conjunction with the DSVM strategy manages to precisely mitigate the disturbances. Likewise, values exhibited in Table 3, and the lower graph of Figure 9, confirm that the voltage imbalance at load terminals remained below the guidelines established in standard [28] during the entire test, which would ensure proper operation of sensitive loads. The results validate the effectiveness of the proposal now for this type of voltage disturbance.

Harmonic Distortion
After demonstrating the capacity of the proposed topology to compensate for voltage variations, in this case study it is evaluated as an active voltage filter. Distorted voltages mainly affect sensitive electronic loads used in automation systems, although also increased losses in conventional loads based on magnetic cores. For this reason, it is important to have power active filters capable of eliminating the high frequency components present in supply voltages. In this case, harmonic components are added to all the phase voltages of the supply system, as follows: during the time interval defined by, 0 s ≤ t ≤ 0.034 s, a 4th harmonic component with an amplitude of 20% is added; during, 0.034 s ≤ t ≤ 0.068 s, a 5th harmonic with an amplitude of 20% appears in all phases; during, 0.068 s ≤ t ≤ 0.1 s, a 6th harmonic with an amplitude of 20% is added; and finally, during, 0.1 s ≤ t ≤ 1.34 s, 4th, 5th, and 6th harmonic components with amplitudes of 10% are incorporated in all phases. Figure 10 exhibits the high level of harmonic distortion in the supply voltages. As can be seen in the lower image of this figure, when there is higher harmonic contamination, in the dq0 reference frame the components of the system voltages vary randomly. In turn, from these signals, the converter must also generate distorted and complementary voltages, so that the sum of the system and the injected voltages, results in voltages without distortion at load terminals. To properly evaluate the performance of the DVR as an active voltage filter, it is necessary to determine the Total Harmonic Distortion (THD) of the signals. This parameter is presented in Table 4 during the different conditions analyzed. In this case, the compensator is capable of reducing the load voltage THD, to values less than 3% in each condition. These values meet the criteria established in standard [28], which determine the appropriate operating conditions for power distribution systems in relation to power quality. For its part, Figure 11 provides a qualitative view of the proper operation of the DVR for harmonic distortion in the supply voltages. From this figure it is evident that the converter is capable of considerably compensating the distortion in the supply voltages and, therefore, the load voltages are maintained with a waveform very similar to the pure sine wave. For the graph that presents load voltage components, d and q, it is also appreciated that despite the fact that there are still some slight variations, both components adequately follow the reference signals.

Conclusions
This paper presented a controller design for a Dynamic Voltage Restorer based on the Direct Matrix Converter. The controller was modeled on the dq0 reference frame to deal with constant signals at the fundamental frequency, thereby simplifying its structure, and hence its design. By means of a proposed variable change it was possible to eliminate the coupling in the output components of the system, inherent to the Park transformation. In this way, the proposed linear control technique allowed establishing an adequate transient response for the compensator, as well as ensuring the stability of the complete system under bounded operating conditions. Likewise, by working in the dq0 reference frame it was possible to incorporate the DVSM modulation strategy to direct the operation of the MC, which despite not having been designed to operate under adverse conditions at the converter input terminals, is relatively simple to implement. The outstanding ability of the converter to generate fully controllable voltages from distorted input signals was provided by the proposed control technique, managing to develop a simple and effective multifunctional solution to cope with common power quality problems. The multifunctional performance of the proposed DVR was evaluated for case studies in which balanced and unbalanced voltage variations (sags and swells) were considered as disturbances, in addition to the presence of harmonic contamination in the supply voltages. Since in the dq0 reference frame all the disturbances are reflected as deviations of the dq components from their constant reference components, the DVR acted individually on each component when it was required. In this sense, the desired load voltages were maintained almost invariant during each disturbance analyzed. In particular, the simulation results obtained from the first case study in which the effectiveness of the DVR was analyzed in compensating balanced voltage sags and swells, showed that the device has no problem eliminating swells up to 50% of the nominal value. Theoretically, the only limit for swell compensation would be determined by the physical capacity of the DVR. On the other hand, since the device takes the compensation power of the same failed system, the compensation is limited to voltage sags less than 50%. The results obtained for this condition corroborate this, although a voltage restoration was achieved up to 87% of its nominal value. Considering that only 2% of all faults correspond to voltage sags of 50%, the proposed DVR can be considered as a good option for compensation of voltage variations. With regard to unbalanced voltage variations, the MC was able to operate adequately under unbalanced conditions at its input terminals, and was able to generate the accurate compensation voltages. The compensator reduced the voltage imbalance in the supply system from 5.55% and 11.11% to average values between 0.37% and 0.8%, values that are within the guidelines established by the power quality standard [28]. Finally, the performance of the DVR operating as an active voltage filter was evaluated, the MC again was able to operate properly, now with distorted voltages at its input terminals. The DVR generated and injected voltages with a harmonic content similar to that of the supply voltage, but of opposite phase, at the load terminals the harmonic distortion of the voltage provided by the electric supply system. The THD was reduced from 17.32% and 20% to values between 1.53% and 2.24%, thus evidencing the effectiveness of the control strategy developed. In conclusion, the developed DVR was able to operate in a multifunctional way for mitigating different voltage disturbances without requiring a complex modulation strategy for the converter, or adjustments in the tuning of the controller for each particular disturbance, unlike several proposals found in the open literature. The incorporation of MC into DVR configuration that obtains energy from the same supply system resulted in a multifunctional and effective solution for power quality problems, thanks to the control strategy developed, which also made it possible to ensure the stability of the complete system.