Abstract

This paper addresses the synchronization and operation of a 140 kVA inverter system connected to the main grid as part of a decentralized microgeneration system. The considerations for the supply of electrical energy stored in battery banks, mostly of photovoltaic origin, involve a study of the details of a rigid nonlinear system, which parallels the generation and distribution standards typical of hydroelectric and thermoelectric plants. Considering aspects related to power electronics operation, this paper presents both the modeling and the controlling aspects necessary to synchronize and ensure a stable operation of the microgeneration systems when connected to the main grid. Statistical processing was developed to guarantee synchronization between the systems without presenting electric shocks by simulating the magnetic link in asynchronous generators to meet this aim. The proposed model simulates the increase in power by a phase shift by maintaining a constant frequency based on a Chirp wave generator. The proposed process considers a generation power baseband operation. A Mamdani-type fuzzy proportional-integral controller is used to determine the power setpoint, which sets the Chirp generator phase shift setpoint, which includes a Mamdani fuzzy proportional-type controller. Both controllers are connected in a cascade. The applied correlational technique to achieve the synthesis of the sinusoid and the synchronization presented optimal performance when using 17 samples per signal period. The design of the transformer primarily, guaranteed a phase shift of −4.3018°, allowed for a THD below 2.75%.

1. Introduction

When a project on a microgeneration system is carried out, the study focuses on the primary energy source (whether wind, photovoltaic, or other), considering electronic aspects of switching and electrical regulation. However, it does not deal with issues related to interconnection with the main electric system, its implications, or possible limitations during the operation of the on-grid and off-grid switching [1].

In particular, an aspect such as regulation must be limited, since this topic is broad and in detail, many aspects must be considered. However, there are aspects to take into account that are common to any electric generation unit that needs to be synchronized with its main grid. Generally, of the four variables to be considered, such as voltage amplitude, frequency, and phase, only voltage amplitude and frequency are controlled [2]. In contrast, the phase is left relatively random until, given the conditions, the generation power switch can be closed. However, when the electric generation unit is the electronic inverter type, it can regulate and continuously monitor the three variables to be considered for synchronization [35]. Since these three parameters are electronically created, synchronism may be lost. The mentioned conditions differ in hydroelectric or thermoelectric generation units that keep the generating unit synchronized once the electromagnetic link is synchronized.

In the same way, the state-of-the-art of controllers for frequency control in power systems with multiple areas has been carried out using fuzzy techniques, even though the fractional component, both for the integral and differential effects, becomes less practical. This is due to weighted parameters, which are difficult to obtain with usual numerical methods and require convolution techniques that demand a lot of memory resources and computation time [68]. However, the tendency to incorporate studies using fuzzy logic for control to improve power quality in microgrids that use batteries and energy storage systems can be seen in works such as the one presented in [9], as well as the search for the maximum power transfer point, as shown in [10].

Likewise, studies related to voltage regulation and load sharing have been carried out for standard generation systems [11] and the case for alternative energy systems such as wind power are also being analyzed [2]. However, the appropriate way to share the load with statist systems more efficiently is still being evaluated. The research presented in [12] proposes a nonlinear way of compensating the frequency deviation in such a way that the power supplied to the system varies depending on the condition of the deviation, and it is intended to subtract weight from the compensation when the frequency deviation is too large. However, it is clear that in hybrid generation processes, whether with thermal, wind, or solar sources, compensation for power droop is present, as presented in [13].

Considering that the study on a generation system of the electronic type, where an inverter phase is involved, is similar to other electrical generation systems, the implementation of a grid frequency compensation mechanism is an aspect that must be considered during the control and operation development [4]. In particular, this factor should be considered when the aspects of operations and degree of participation in the supply of active and reactive power to the grid are analyzed. Furthermore, since partitioning with reactive energy is not commonly considered in research studies, the active power correlation study is pertinent to protecting the equipment.

Another aspect considered, in terms of protection, is the inductive nature of the transformers and the line emulated for transmission, making it necessary to propose the study and topology to provide suppressors of transient voltage peaks using MOV [5, 6].

The generation using power electronics devices distorts the voltage profile due to the low generation of reactive power and the operation in a baseband of power generation. The traditional generation from relatively low-power generation systems aims at the simple generation and injection of active power [7] without considering other aspects, such as the grid frequency variation.

Fuzzy controls based on the Mamdani approach have been widely and effectively used in various applications where they have proven their best performance compared to other classical control techniques. Wang and Li proposed a nonlinear hybrid fuzzy system by adjusting Mamdani’s parameters, and their results showed that the proposed fuzzy system has better approximation performance based on the variable universe (nonlinear constraints for applications that require quick response and high stability precision) than comparing with other control systems [14].

Fuzzy controls have been successfully applied in electrical networks and distributed generation environments. Sharma et al. proposed a dual-structured fuzzy (Mamdani-based) to switch between proportional and integral actions to improve the frequency regulation in a microgrid, including a wind-diesel generator system combined with an ultra-capacitor storage unit [15]. Barakat presented a Mamdani-based fuzzy logic control to reduce load frequency control issues and step load perturbations in terms of peaks and settling time under different multisource interconnected power systems (reheat, hydro, and gas units with and without HVDC links) [16]. Fayez et al. developed a fuzzy controller to command battery energy storage and a resistor brake to mitigate subsynchronous resonance oscillatory torque and speed response in steam turbines connected to power grids. The results showed that the proposed control scheme could reduce the intensive computational burdens due to the applications of 3 fuzzy rules compared to more complex control techniques [17]. Manas et al. presented a methodology based on a Mamdani fuzzy expert system to determine the optimal sizing and placement of distributed generators in the distribution grid of Tezpur University (India), showing the effectiveness of the fuzzy algorithm in terms of loss reduction and voltage profile improvement [18].

In addition, this type of fuzzy control has shown its efficiency and improved the performance of power electronics devices. Acikgoz et al. presented a control topology for an electronic power transformer (containing a three-phase pulse width modulation rectifier that converts 800 Vrms AC to 2000 V DC bus at the input stage, a dual active bridge converter that provides a 400 V DC bus with 5: 1 high-frequency transformer at the isolation stage, and a three-phase two-level inverter that is used to obtain AC output at the output stage) based on a fuzzy controller to improve compensation ability for voltage harmonics, voltage flicker, and voltage sag/swell conditions [19]. Agarwal et al. proposed a fault analysis method (fuzzy-based) for voltage source converters in high voltage direct current (HVDC) transmission lines, which probed to be better than conventional methods in terms of computational requirements, less number of protections relays, implementation complexity, and required signals with 100% accuracy discrimination of AC and DC sections faults[20].

Finally, Mamdani-type fuzzy controls have been studied as alternative techniques for classical controls of motors and generation machines. Cross and Ma compared different techniques for model-based condition monitoring systems applied in wind turbines, such as linear model, artificial neural networks, state-dependent “pseudo” transfer function, and Mamdani fuzzy-based approach, where this last technique demonstrated to be practically feasible to be implemented [21]. Errouha et al. introduce the Mamdani fuzzy logic techniques as an alternative approach to conventional direct torque control (DTC) to control induction motors for water pumping systems, where the results showed that the fuzzy control could improve the performance by minimizing the flux and torque ripples, reducing overshoot and undershoot, and enhancing the response time [22].

The use of fuzzy inference in the protection and controller implementation process has two advantages. On the one hand, in the implementation of controllers (to generate and synchronize the inverter signal), more parameters allow for achieving the desired results with a computational cost only present during the training process. On the other hand, in correlation protection, fuzzy characterization allows implementation with elementary mathematical operations whose execution times are much lower and whose accuracy is acceptable for the desired purpose.

This research presents aspects related to the synchronization of a power inverter to operate in on-grid mode and its efficient performance. In this way, algorithms are proposed to carry out the correlation and adjustment function minimized by a decreasing gradient to modify the identification of the signal and parameters of the grid before synchronizing. The way of generating the sinusoid signal, whose amplitude, frequency, and phase are controlled, is based on a chirp generator. The novelty of the proposed control is based on a structure capable of creating a numerically stable condition that achieves a gradual phase adjustment of the sync chirp generator and produces an equivalent in amplitude, frequency, and phase with the addition of phase adjustment [23]. The effect is like cloning the synchronized signal and adding the missing component to achieve the phase adjustment that allows power flow to the electrical grid.

The aforementioned nonlinear conditions cannot be faced with classical control tools. The use of Mamdani-type fuzzy controllers has been implemented due to the increased degree of freedom that implies the operation of this kind of controller. Based on this fact, another significant contribution of this paper is to present approximate models that allow an initial tuning of neuro-fuzzy controllers connected in cascade, which are subsequently tuned until the desired performance is achieved.

2. Materials and Methods

2.1. Nomenclature
MOV Metal oxide varistorPLL Phase-locked loopTHD Total harmonic distortion (−) Root mean square grid voltage (V) Root mean square voltage of the first harmonic of the grid voltage (V) Root mean square voltage of the nth harmonic of the grid voltage (V) Apparent power (VA) Impedance () Efficiency (−) Apparent power for the fundamental harmonic (VA) Total apparent power (VA) Efficiency complement, (−) Sinusoidal fundamental harmonic amplitude condition (V) Cosine fundamental harmonic amplitude condition (V) Number of log samples for correlational processing Log sampling time (−) Frequency in () in correspondence with the theoretical 60 Hz Line voltage recording (V) Indexer Amplitude correlated initial condition (V) Correlated phase initial condition (rad) Cost function Identified final frequency () Identified amplitude correlated end condition (V) Identified end condition of correlated phase (rad) Active power supplied by the electronic system (W) Reactive power supplied by the electronic system (VAR) Active power received by the reference electrical bar (W) Reactive power received by the reference electrical bar (VAR) Inductive reactance of the simulated line () Voltage provided by the electronic system (V) Reference bar voltage (V) Phase condition between the bus and the electronic system (rad) Average reactive power on the simulated line (VAR) Simulated line resistor () Active power on the simulated line (W) Error between an i-th prediction and its i-th sample Participation factor for error (cost function) (−) Participation factor for derivative error (cost function) (−) Degree of truth of a membership function (−) Degree of truth of a membership function (−) Degree of truth of an i-th membership function (−) Variable of the fuzzy universe Abscissa value of the vertex of the i-th membership function Abscissa value of the extreme left of the i-th membership function Abscissa value of the right end of the i-th membership function Width of the base of the membership function Voltage output of the transformer (V) Transformer voltage output in the first harmonic (V) Inductance of the simulated line (H) i-th voltage of the inductance in the simulated line inductance (V) i-th current of the inductance in the simulated line inductance (A) Frequency of the i-th voltage and current of the simulated line inductance (Hz) i-th power prediction (p.u.) i-th power (p.u.)ARX Exogenous regression analysis Gain of the linear model of the phase generator Phase generator output (rad) Phase setpoint (rad)PI Integral proportional control Proportional control Power setpoint (p.u.) i-th linear power prediction (p.u.) i-th nonlinear power prediction (p.u.) Time constant 1 (s) Time constant 2 (s) Time constant 3 (s) Time constant (s) Speed error constant MOV current (A) MOV current prediction (A) MOV power (W) MOV voltage (V) MOV threshold voltage (V) MOV characterization exponent (−)
2.2. Grid Modeling

In this section, methodological aspects are covered to determine the quality of the grid operation. Statistical knowledge of the electrical supply signal behavior allows drawing strategies for synchronizing the inverter power electronics system. Taking into account the aim proposed in this paper, the first step is to study the grid’s aspects and characterize them using statistical identification techniques such as the correlation for sinusoidal systems. The objective is to achieve a minimum error in the global relative percentage deviation and a high value in the Pearson quadratic correlation factor using a minimum number of samples per period.

This section can be subdivided into the following subsections: First, statistics for evaluating and identifying the grid to replicate conditions for synchronization. Second, the grid model and its Thevenin simplification is developed in a three-bar electrical diagram for the study of static power flow. Thirdly, we perform the dynamic power flow study of the simplified electrical system using the obtained model.

2.2.1. Distribution Grid: Electrical Signal Sample Recording and Processing

The study’s first phase consists of taking a record of the electrical signal from the distribution grid. This exploratory phase is sampled at 25 (kHz) for 1.27996 (s). The recording was made using an ACUTE DS-1202 digital oscilloscope, high-quality PC-based 2-channel DSO, with 200 (MHz) bandwidth, 200 (MSample/s) sampling rate, and 512 (Kbyte) memory.

A sinusoidal quality assessment of the grid’s electrical energy is carried out considering the harmonic distortion factor, or THD, for which the square root of the equation is used.

The impact of the value of the harmonic distortion factor is considered when an efficiency factor is established based on the active power used when the fundamental frequency is considered. For this purpose, the following equations are used based on the analysis proposed in Figure 1:

Figure 1 shows the power triangle made up of both the fundamental and harmonic components. The harmonic content, being of high frequency, is not broadly useable, because energy is lost in heat, both in static and dynamic machines.

The same result is obtained when determining the energy efficiency due to the harmonic effect based on equation (3), if active or reactive power is considered instead of using apparent power.

The importance of equation (5) is clear to establish the quality of the sinusoid, where its tendency to zero gives information about purity in the generation process. On the other hand, its tendency to unity, typical of synthesized alternating signals such as square waves, is generally not acceptable for all electrical devices. However, from the energy point of view, the efficiency measured from equation (4) is an alternative way to determine the quality of the signal injected into the main grid. The following equation represents a way of presenting the energy losses due to the signal’s harmonic content:

The algorithm proposed in this paper is based on a double correlation, the first being an algorithm that offers a closed mathematical adjustment expression to determine the amplitude and phase, assuming that the frequency is 60 (Hz). The second correlation is an improvement that uses the result of the first correlation as a starting point and whose result is the product of an iterative search process using the decreasing gradient method.

The following equation allows for determining amplitude conditions, which are determined with the help of equation (7) based on the amplitude and phase of the sinusoid of the grid-sampled voltage.

Besides, the following equation is the cost function that, when minimized with the decreasing gradient method, allows obtaining a much more accurate value of the amplitude, phase, and frequency of the sampled electrical signal of the system.

However, equation (9) is used to establish a relative parameter in the evaluation process for the identification of rest of the parameters. Therefore, equation (9) can be related with equation (10), which is the multivariable correlation factor of Pearson presented in the process of identification of systems.

It is worth mentioning that equations (8)–(10) are presented based on i-index samples because they are part of a sampling process defined based on N samples that can correspond to one or more periods, even a fraction thereof. This study proposes sampling with a buffer of two and a half periods to consider a 60 (Hz) signal. Nevertheless, the registered and parameterized signal does not have to have this value since the reality of the generation process presents a variation in the frequency that is usually below 1%, which could be much more under fault conditions.

2.2.2. Generated Power and Load Flow in the Coupling Line to the Grid Bar

The power generated and supplied to the grid depends on the power angle δ. The power angle allows establishing the active power generated, supplied, and received by the grid bar, determined by following equations, as well as reactive powers, also defined by the following equations [1]:

From equations (11) and (13), it is concluded that the maximum active power supplied by the generator (when the generator voltage is equal to the network bus voltage) is 90 degrees. Under this condition, the reactive power is equal in magnitude to the active power; therefore, the generator’s maximum power is approximately 142 (kVA).

The reactive power in the grid for a relatively small electrical grid with negligible resistance is of interest, as shown in equation (15). In the case of considering the resistance of the coupling grid, the active power can be determined using the equation (16) [1].

From equation (15), the value of the reactive power in the line is negligible. However, it is necessary to consider deviations in the voltage regulation, which is why it cannot be wrongly dimensioned and must be considered the worst of cases to avoid failure of this device.

The reactive power in the grid is essential when designing the coupling reactor that emulates the short transmission line. From equation (15), it can be concluded that the value of the reactive power in the line is negligible. However, it is necessary to consider its deviations in the voltage regulation, the reason why it cannot be wrongly dimensioned, and, in the worst case, should be considered to avoid breakdowns on this device.

Additionally, implementing a transient suppressor of the MOV or Crowbar type in parallel with the reactor should be considered to suppress transients in case of differential voltage.

Although the active power is negligible before minimum values of R, this must be considered at the moment of the design of the reactor and at the moment of quantifying the active power that will not be delivered to the reference bar, as shown in equation (16).

From the previous equations, it can be concluded that the power angle determines the contribution of active power to the bus. However, reactive power is generated by keeping the power angle at zero and only by varying the voltage.

2.2.3. Static Power Flow Modeling

Considering as a case study a small town with an electrical demand of approximately 3 (MW) of active power and around 8,000 subscribers to the electrical service. An empirical model of three bars has been considered to study the static and dynamic power flow from the inverter system to the main grid.

As shown in Figure 2, the three-bar model contemplates the generator bar, whose voltage at bar 1 corresponds to the Thevenin voltage of the model, and the voltage at bar 2 corresponds to the voltage at the substation or coupling transformer of the inverter system. Finally, bar 3 corresponds to the voltage generated by the inverter system.

The Thevenin model of the system was obtained under the following considerations:(i)The regulations for the national interconnected system of Ecuador consider a system efficiency of around 95%, with an approximate power factor of 0.9.(ii)Considering a distribution voltage of 13.8 (kV), there is an apparent power of 3.33 (MVA) in the system, with 72.64 (kVAR) corresponding to reactive losses in the line. From this value, 1.48 (kVAR) corresponds to the capacitive effects of the line and 74.13 (kVAR) to inductive effects, with 150 (kW) losses arising due to the Joule effect.

Considering 8,000 subscribers to the electrical service, the distribution of electrical impedances and reactances for the model is obtained, in per unit, as detailed in Table 1.

Figure 3 shows how the loads connected to the network are distributed and the consideration of the line impedances by sections, where the line and load impedances keep the same value. In this model, 8,000 sections have been considered to correspond to the total subscribers of the case study.

Under the defined considerations, the Thevenin model has been calculated, in per unit, seen from the coupling bar 2 of the inverter system with the corresponding values described in Table 2.

As shown in Figure 4(a), taking into account the phase difference between bus bars 2 and 3, it is possible to obtain the active and reactive powers, in per unit, as depicted in Figures 4(b) and 4(c), respectively.

To determine the phase condition in buses 2 and 3, as well as the generator voltage, the following considerations have been defined:

Solving the system, using equations (18) and (19), to determine and , the values for and are obtained. Under the evaluated conditions, Figure 5(a) shows the evolution of the voltage of the inverter system in bus 3. To achieve the phase difference between bus 3 and 2, such that the desired active power flow is fulfilled, the phases of bars 2 and 3 are evaluated concerning bar 1, as shown in Figures 5(b) and 5(c), respectively.

2.2.4. Dynamic Power Flow Modeling

Using the simplified model of the three busbars electrical system (Figure 2), a representation in the state space has been defined considering a state to reproduce the response of the grid to the power supply by the inverter system. Due to their electronic nature, time considerations for power supply (which are typical of inversion systems) allow times between 2 and 5 seconds [11, 24]. Although the time for the supply of power is very short, this is typical of distributed networks and is present in generation systems of an electronic nature.

The state space that allows obtaining the dynamic behavior of the voltage in bus 2, as well as the current that flows through the line that connects buses 3 and 2, as shown in the following equation:

Figure 6 shows the dynamic behavior of the power in the transmission line, represented in p.u., which corresponds to the power generated by the inverter system. The model’s dynamic order is increased in estimating the active power of the line, for which the weighted integral of the instantaneous power is approximated based on the state.

As depicted in Figure 6, creating a positive phase shift (or in advance) produces an increase in power in the grid. This increase in power produces an increase in the voltage of the system. Although the model presented cannot reproduce the phenomenon associated with the increase in frequency, that is another variable is dynamically affected by the injection of power from the electrical grid. This is why power flow dynamics are studied to anticipate and compensate for grid oscillations that cause undesirable frequency oscillations.

2.2.5. Comparison of the Dynamic Power Flow between the Proposed Model and the Measurement with PMUs

This section summarizes power flux transmission measurements using ABB’s RES670 phasor measurement unit (PMU). Measurements were made on the line made up of the coupling inductor between the inversion system and the substation. For the comparison, the same generation set points used during the simulation were considered. The results obtained are shown in Figure 7.

The results show that the experimental measurements converge to the same simulated values for reasons of adjusting the power set point of the inversion system. However, the dynamics is affected by the randomness of the connected loads and the consideration of a higher dynamic order reality, or simply of distributed parameters present in the network.

It is important to highlight that the principles of scalarity, typical of linear systems, are no longer fulfilled since the load-taking times are slightly increased as the power set point increases. It is important to highlight that during the experimentation, the AGC (automatic generation control) of the system was not inhibited, which is why the thermogenerators and hydrogenerators played an uncontrolled role in the secondary regulation, which affected the dynamics to be studied.

However, the results show the ability to guarantee fast load taps for low power set points, and the response being slightly slower for when the power set point tends to 100% of the power capable of supplying the inversion system.

2.3. Control Systems for ON-GRID Operation

In this section, control strategies based on neuro-fuzzy techniques are outlined for the implementation of cascade controllers that allow the regulation of the power supplied by the inverter system, as well as a gradual adjustment in the phase condition that allows the flow of desired power to guarantee the supply of power to the network. Although the study was designed for a 100 (kW) system, the modeling, and proposed control can be applied to a system of greater or lesser power, as can the interpretation of the results (presented in p.u.).

2.3.1. Mamdani-Type Fuzzy Inference System Processing

The Mamdani-type fuzzy inference system has been implemented to characterize both the angular speed for the offset contribution in the inverter, once the generation unit is synchronized, as well as to adapt proportional and integral values of the closed-loop control of the active power that allows setting the offset setpoint value.

For this particular case, inferences are presented with two universes of discussion, whose implication is achieved using a producer of the degrees of truth of the membership functions. If the conjunction of these degrees of truth is needed, it is carried out by implementing the probabilistic OR. The consequent is achieved through the aggregation of the rules implementing a sum, while the defuzzification or single-valued value is achieved through the centroid method.

To facilitate the calculation of the rules, the range of the universe of discussion is obtained under the expert knowledge of the behavior of the signals, taking into consideration the possible extreme values that can be reached under the dynamics of the regulation, being the membership functions assigned using a regular partition following the rule of overlap.

The membership functions of the rules in the consequent are adjusted using an optimization method based on the decreasing gradient. This optimization defines a cost function that values the behavior of the fuzzy dynamic system, considering the control deviation and its variation. Equation (22) shows the cost function, whose minimization guarantees the achievement of the setpoint under the condition of minimum stress of the system or actuators.

2.3.2. Considerations for PI and Controllers of the Mamdani Fuzzy Type

The degrees of freedom a fuzzy controller offers are directly related to the number of rules. The redundancy of degrees of freedom allows adjustments that guarantee a higher performance than a classic controller. However, there is a compromise between the number of rules and the complexity of reaching a global minimum on a cost function surface.

For all the universes of discussion, the membership functions must be the simplest to calculate; therefore, delta or triangular type functions are used.

The fuzzy AND has been implemented with the product, and the fuzzy OR has been implemented with the probabilistic OR, as shown in equations (24) and (25), respectively.

In fuzzy inference aggregation, an OR has been implemented by addition, as shown in the following equation:

Implementing the sum as OR in the aggregation of rules allows obtaining a unique value in the defuzzification by implementing a centroid weighting of the membership functions of the activated rules.

In equation (27), Δ is the width of the membership function of the rule, i is the i-th activated rule or its degree of truth, and is the value, in the universe of discussion, where the vertex of the triangular or delta membership function is located and which represents its centroid.

In a simplified consideration, each i-th membership function associated with the output presents an i-th area that depends on the degree of truth of the consequent, which in this case, being triangular functions, is considered to have the same bases. The consideration of equal bases in the property functions of the outputs allows us to establish the relationship between the Mamdani inference and that of Takagi Sugeno Kang of order zero. Note the following simplification:

In equation (28), corresponds to the i-th singleton , evidencing the equivalence between Mamdani fuzzy inference and Sugeno or TSK0, as seen in equation (29).

Considering equations (27)–(29), it is concluded that Sugeno’s method is computationally more efficient and, indeed, a better option to train function characterization systems. However, it is well known that Sugeno’s inference method modifies the general Mamdani fuzzy inference method. Additionally, the efficiency of Sugeno’s method is increased when the overlap method is used and programmed so that only the activated rules are evaluated. Under these considerations, there is a maximum of 2n as the total number of activated rules, where n is the number of variables or inputs of the fuzzy inference system.

Therefore, Sugeno’s method is conceptually better for the implementation of instantaneous systems in characterization processes, and therefore, it is also better for the implementation of dynamic systems. However, the reason for the implementation of this study using Mamdani is because it is better known than Takagi Sugeno Kang of zero order (or higher) and additionally because its performance, assessed with Matlab, is slightly more efficient in terms of time, with an estimate in the time relation of Tmamdani/Tsugeno equal to a mean of 0.9802.

The adjustments to the fuzzy systems are made in two stages. The first stage corresponds to the phase allocator, in which the membership functions of the consequent are adjusted (their position in the universe of discourse) based on a cost function that penalizes the error and the correction speed, as seen in Figure 8.

The second stage corresponds to the fuzzy PI control that guarantees compliance with the power setpoint and establishes the setpoint for the phase angle. The adjustment is made under the same considerations as the previous stage. The modeling of the active power measurement instrumentation is considered of the first order and closing the loop directly from the phase parameter, as shown in Figure 9.

2.3.3. Variable Frequency Sinusoidal Signal Generator

The variable-frequency sinusoidal generator implements the Chirp function based on a sine function of variable frequency and phase. The variable frequency implementation allows for the generated signal’s adaptation to the frequency of the main electrical grid. The variable phase allows gradual adjustment until reaching the desired phase shift to achieve the power angle that allows supplying the desired active power.

3. Results and Discussion

The process of synchronization and generation of a 140 (kVA) inverter to an electrical grid using Mamdani controllers in cascade are analyzed in this section under the following criteria:(a)Periodic processing of the reference bar voltage signal: this study guarantees the synchronization of the inversion system to the grid efficiently and at the lowest computational cost, using the correlational technique presented in the methodology section. In addition, the harmonic content’s effect and its implication in unused active power are also shown.(b)Considerations for synchronization: this section explains how the coupling transformer of the inverter system contributes to the filtering of the voltage signal and how this produces an offset in delay that must be compensated when synchronizing the electronic generation unit by the inverter.(c)Charging or power outlet: This section presents how to determine the experimental value of the specified inductance for one of the 10 (kW) inverters. Besides, this section shows the way to establish the power correlation, based on a fuzzy estimator, to be able to establish the deviation in the process of the generation that shows a failure.(d)Protection for the line inductor: in this section, the model for the MOV is presented as an element for suppressing voltage peaks, and the arrangement in the electrical topology of the transformer to reach the electronic inverter system is protected at all times.(e)Contribution of power droop for system frequency compensation: This section shows how the control diagram is structured such that the electronic generation system, by inversion, can contribute to the recovery of the frequency of the electrical system or interconnected grid. These conditions are studied when disturbances occur either due to load or generation rejections or due to regulation effects during peak hours, satisfying the concept of power stagnation and the proposed American standard of 4% frequency variation capable of producing 100% of generation power variation.(f)Electronic inversion system coupled with a transformer with 10 windings: This section integrates the idea of generating electronic inversion units (precisely 10 units), which coupled with a transformer with 10 primaries allows conceiving the 140 (kVA) system, managed under the criteria of a central, which allows the increase of the reliability.

3.1. Periodic Processing of the Reference Bus Voltage Signal

Figure 10 shows 30 periods of the reference bar stress calculated with equations (6) and (7) and adjusted with equation (8), allowing the correlated signal that is shown in Figure 11. Besides, in Figure 10, the harmonic content present in the reference bus voltage is observed.

Based on equation (4), the percentage efficiency of the reference voltage, determined by taking into account the harmonic distortion, is 99.87%. Therefore, the previous percentage efficiency value is a good value, considered absolute.

Taking into account, as an example, the Ecuadorian electrical system, which for the year 2020 registered 8,712.29 (MW) of nominal power and 8,095.25 (MW) of effective power [2], with annual energy generated between 20,095.49 (GWh) [3] and 25,024.20 (GWh) gross or 24,805.71 (GWh) of available energy [25, 26]. Therefore, an average annual generated power between 2,294 and 2,857 (MW) is inferred, of which between 2.76 and 3.44 (MW) are lost due to the harmonic effect, as determined using equation (5).

To select the number of samples to be taken per period of the electrical signal, a study was carried out regarding a record of 416 samples per period for 30 cycles. The reference values of RMS voltage, frequency in (Hz), and phase in degrees are shown in Table 3.

Table 4 shows the execution time for 17 samples per period, yielding satisfactory results if the percentage global deviation is considered an indicator that highlights the goodness of fit concerning the samples. In this case, the Pearson quadratic correlation factor was applied.

3.2. Considerations for Synchronization

The synchronization of the inverter system must consider filtering aspects associated with the coupling transformer of the inverter so that harmonic distortion values are satisfied. The harmonic distortion value has been set to be below 5%, a value estimated with equation (30), being transformer output voltage, and is the signal of the first harmonic of this output voltage.

Considering a triangular signal with a frequency 100 times greater than the nominal frequency of the grid (6 (kHz)) and considering a phase shift due to the filtering action of the power transformer −4.3018°, the harmonic distortion factor is around 0.027595 (2.75%). This offset, necessary to satisfy the THD condition, which is naturally introduced by the transformer, must be considered by the algorithm when compensating the offset to achieve synchronization with a zero-degree offset concerning the reference bar the microgeneration system wants to inject power.

Figure 12 shows the filtering effect of the power transformer and its inherent delay offset φ. Equations (6)–(8) applied to each of the signals allow for determining the gap between these signals. This process of determining the gap due to the filtering effect is carried out only once during the evaluation and start-up phase of the system. Later, it will be carried out as part of a predictive maintenance routine to guarantee the adjustments.

Therefore, considering that the synchronization makes periodic use of the equations (6)–(8), once the parameters have been determined, the algorithm performs offset angle compensation by filtering the effect.

3.3. Charging or Power Outlet

Once the synchronization of the inverter system and the network is given, the switch is closed. After closing, the load or power is taken. The power intake is governed by a power setpoint assigned based on a secondary control in correspondence with an algorithm that responds to the needs of the energy market. Then, based on equation (11), the phase angle adjustment for the generation of active power is carried out.

The dependence of the active power generated on the line inductance requires its experimental determination in the first instance before starting the system’s operation. Line inductance is calculated by equations:

The use of any of the equations presents a deviation in the order of 0.03%. Therefore, the value of the calculated inductance was 3.82 (mH), for a 100 (kW) power plant with ten units of 10 (kW) each. It is important to highlight that equation (31) is worth knowing the excitation frequency of the sinusoidal signal, and equation (32) is more sensitive to noise because it presents the current derivative. However, it is essential to mention that equation (32) is much more unbiased than equation (31).

During the operation of the inverter system, it is crucial to monitor the power differential between the generated and estimated power. For this, the variables of the offset angle in the bus bar between the coupling point and the terminal voltage of the inverter are used, considering that the inverter voltage is at the same amplitude as the bus voltage. With these variables and a neuro-fuzzy power correlation system, the power is estimated and contrasted with the power measured by instrumentation in the feedback. In the event of a severe discrepancy, it is necessary to produce a shutdown or emergency stop of the inverted transistorized generating unit.

Considering the bus voltage and the inverter voltage with the same amplitude, the behavior of the active power supplied to the bus is as shown in Figure 13.

Its fuzzy implementation allows the theoretical determination of power at a lower computational cost by implementing a 25-rule Mamdani algorithm. Figure 14 presents the universe of discussion of the variable ρ in a range between 0° and 90° with five membership functions.

Figure 15 shows the universe of the discussion of the variable considered in a range of probable existence for , between 100 (V) and 200 (V), with five membership functions. Figure 16 presents the universe of discussion for the prediction output in a range between 0 (kW) and 30 (kW), with twenty-one membership functions. Figure 17 shows the surface characterization resulting from the power given by the fuzzy system.

The standard deviation of the power prediction is ±66.6084 (W), with the percentage relative mean square error being ±0.66% concerning 10 (kW) of the active power of each inverter unit. Tables 57 present the construction parameters of the triangular functions of the fuzzy system.

The execution of the fuzzy inference system in the power correlation characterization uses 25 rules whose simplified matrix is summarized in Table 8.

The adjustments of the membership functions of the power were made by minimizing the cost function between the estimated theoretical power and the power predicted by the neuro-fuzzy system using N points of power generated by the inversion system in the operating range, considering an approximate surplus of 30%. Equation (33) presents the minimized cost function using the decreasing gradient.

For load taking or power generation, a nonlinear system has been implemented to adjust the offset angle between bars, which is controlled by a fuzzy system that improves the behavior of a proportional controller. This system is located downstream of a fuzzy integral proportional controller that guarantees compliance with the power setpoint.

Considering that the system is of the rigid type, the controllers are tuned by taking the feedback from the phase output and incorporating a gain conversion from radians to power. This conversion is processed by a first-order dynamic that characterizes the behavior of the power measurement instrumentation. For control reasons, the open-loop system considers the power setpoint as input and the instrument’s power measurement as output, where the series controller must be able to meet performance conditions under this condition.

Figure 18(a) shows a linear equivalent of the system that allows an adjustment with less commitment and, therefore, is more expeditious when training and improving the location of the membership functions associated with the outputs of the controllers. Figure 18(b) proceeds to carry out the training and give the fine adjustments of the membership functions of the universe of discourse associated with the outputs of the controllers for the nonlinear behavior.

The estimate of the gain related to the integral model approximated by the phase adjustment is carried out by equation (34), obtained starting from an ARX identification of a maximum precision integral model.

Both PI and fuzzy controllers for the nonlinear model are presented, considering their structure and the tables that allow their behavior to be reproduced. Considering basic control concepts, the power deviation in (p.u), for the worst case, can only vary between ±1, with a partition given by three membership functions, as shown in Figure 19.

Regarding the universe of the discussion of the integral effect, if the maximum deviation is unity (in absolute value) and if a triangular slope of the error is considered, until reaching zero in a time of 0.16 seconds (approximate time at 10 periods of a 60 (Hz) signal) the area under the curve is around 0.08 (p.u.s). This result defines why the interval of the universe of discussion is confined to an absolute value of 0.08, with a partition given by three membership functions, as shown in Figure 20.

The phase can be between ±180°, which in radians can be limited between ±3, with a partition given by nine membership functions, as depicted in Figure 21. Tables 911 present the construction parameters of the triangular functions of the fuzzy system.

The execution of the fuzzy inference system in the prediction of the phase command uses 9 rules whose simplified matrix is as shown in Table 12.

On the other hand, the real phase can only be present between ±90°. This value is bounded between ±1.571 ≅ π⁄2, with a partition given by three membership functions, as shown in Figures 22 and 23, respectively.

It is possible to establish the universe of the discussion of the variation of the phase-in time, considering its linear approximation based on an integral obtained discretely with the maximum precision (Figure 24). Based on the approximate model, given the high gain, if it is desired that the output of the integral system reaches π⁄2 in 1⁄60 (s), considering a phase target of π⁄2 there must be a rate of change of (π⁄2)⁄1000. This value is close to 0.001571 (rad/s), whose absolute value defines the interval of the output of the fuzzy inference system of the phase controller.

Tables 1315 present the construction parameters of the triangular functions of the fuzzy system of the phase controller.

The execution of the fuzzy inference system in the characterization of the phase variation uses 9 rules, whose simplified matrix is shown in Table 16.

Tests of linear and nonlinear models, controlled with fuzzy systems, presented similar responses. However, it is evident that, due to fuzzy controllers, both systems fail to fully comply with the scalar factor, typical of linear dynamic systems. This effect is shown in Figure 25, with tests of 30, 60, 90, and 100% of the nominal power of the inverter system.

In operation, an initial test of the complete system has been performed for a load lasting 20 cycles. This test verifies the ability of the system to synchronize and produce the gradual phase shift to satisfy the load condition. However, this is a preliminary test since, in operation, the system must meet standards such that the load intake is not perceived as a load rejection. Under this consideration, a gradient control is incorporated in the assignment of the setpoint. Figure 26 shows the complete simulation scheme for this evaluation, with a graphical result depicted in Figure 27.

Figure 27 shows the synchronization result, using simulation, of a 100% load tap, presenting the variables per unit (p.u), with the red line being the bus voltage signal and the green line showing the synchronization order. Once the algorithm has been performed, the correlation and assignment of parameters to the chirp generator must be done. The blue line is the voltage signal of the unit’s inverter system, which is gradually out of phase until the power condition is satisfied, and the pink line is the power signal.

By implementing the identification of the system’s behavior, a candidate model has been chosen, as shown in equation (35), initializing the variables by trial with the values T_1 = 1/30, T_2 = 1/50 y T_3 = 1/60.

By applying the decreasing gradient method to find optimal values of the time constants, it was possible to minimize the cost function given by equation (36). In this equation, is the linear prediction of the power from the model obtained with the proposed transfer function, as shown in (37), and is the power of the nonlinear model with the fuzzy controller, being the setpoint, which corresponds to a step by step synchronized with the closing order of the power switch.

The evolution in generations of the cost function is shown in Figure 28, observing the evolution of the parameters in Figure 29.

From Figure 29 a simplified function can be defined for the model as shown in (38), which can be represented, as shown in equation (39).

Therefore, for the model presented in (38), , the value of T found by optimization is about 0.025 seconds, which allows estimating a . Hence, the speed of tracking error is around 0.076 (for the estimated model), which contrasts with the nonlinear model. Furthermore, when it is excited with a unit ramp setpoint, the tracking error is around 0.0621, resulting in a . Due to this, the control system does not require tracking or speed compensation, which is sufficient to control the rate of change of the power setpoint in the standard range between 1/60 (s) to 1/120 (s) as a maximum power setpoint gradient of change.

3.4. Protection for Line Inductor

Two widely used techniques for suppressing electromagnetic transients that generate high voltage are crowbar protection and MOV protection. Considering that MOV devices are more common in transmission lines and their compensation, this device is considered for the protection of the inductor. This system emulates the connection line [5] where the dynamics introduce a hysteresis behavior which can be simplified with the instantaneous equation presented in [6], as shown in equation (41), being the MOV current, P the current per unit flowing through the MOV for when the voltage is applied , and the exponent that characterizes the MOV.

The experimental case presented in [6] shows that (A), (V), and are the values obtained by applying the decreasing gradient to the experimental values in [5] according to the cost function presented in (41) and whose evolution is observed in Figure 30.

Considering that the transformer itself has an inductive effect, a protection connection is proposed as shown in Figure 31, making use of MOV S20K75 [6]. It is possible to model it by conserving the parameter , and placing the values (A) and (A) as presented in the manufacturer’s datasheet.

3.5. Power Droop Contribution to System Frequency Compensation

Studies aimed to evaluate the impact of reactive power (as a way of compensating the voltage profile of transmission grids) based on the administration of reactive power given by the participation of generating units with inverter systems with renewable energy as the primary source have been studied in [7].

However, even more necessary is the study that aims to improve participation by droop control for both active and reactive power to improve the participation of inverter electronic generating units working in parallel in a microgrid [27]. The work presented in [12] considers static, dynamic, and nonlinear droop to compensate for the frequency using power droop.

In this paper, the contribution due to power drooping of the inversion electronic generating units is proposed using the classic concept of the frequency dead band, with a drooping power corresponding to 4%, equivalent to a gain of 25, and a frequency dead band of 0.3%. Its implementation contributes effectively to the recovery of the system frequency in a way that affects the contribution of active power to the grid.

Figure 32 shows the simulation diagram for evaluating the frequency compensation when the power regulation mode presents a power droop. Under the simulation condition, a frequency disturbance of ±2.3% is presented with a dead zone of 0.3%. Therefore, the process is done for ±2% of frequency variation for compensation purposes. This variation causes a compensation of ±50% of the power. Due to this fact, the simulation presents a setpoint of 50% such that the inverter system has control capacity.

When the frequency exceeds the regulation band of 0.3%, the power droop compensates for 2% above the regulation band, and the power must drop 50%. Therefore, if the setpoint is at 50%, the power must be at zero, and the phase condition must be 0° or 0 radians (or 0 in p.u.). Otherwise, if the frequency is below the regulation band of 0.3%, the power droop compensates for 2% below the regulation band. Here, the power must rise 50%, so if the setpoint is at 50%, the power must be at 100%, and the phase condition is 90° or π⁄2 radians (or 1 in p.u.).

Figure 33 shows this operating condition for power regulation during a frequency disturbance.

3.6. Electronic Inverter System Coupled with a 10-Winding Transformer

In Section 3.4, the MOV was presented as protection for the line inductor, and Figure 30 showed the physical location of the MOV protection to suppress transients at the time of disconnection [24, 27]. This figure represents the connection of only one 10 (kW) inverter unit. Due to cost and reliability facts, it is more robust than the 100 (kW) inverter system formed by 10 inverter units of 10 (kW), each one coupled through a power switch to a primary winding of a step-up transformer from 120 (V) to 13.8 (kV). Therefore, this distribution transformer contemplates 10 windings.

The design under this consideration presents more reliability, improvements for maintenance management, cost reduction in power management, and a better compensation effect when managing power plant criteria such as operation in power mode and operation in power mode with speed regulation.

Figure 34 shows the configuration of the step-up transformer, with the design specifications presenting 10 windings in the primary and one in the secondary. This design satisfies the power specifications and distribution voltage, considering the line inductor and the respective protections using MOV technology.

4. Conclusions

The conceptual development of an electronic inverter unit with the capacity to provide electrical energy to an interconnected system must take into account:(1)To consider the filtering effect to achieve the THD in the synchronization process, taking into account that the grid voltage condition must be identified using correlational techniques that allow for lower computational costs because this algorithm must be running cyclically at all times.(2)The nonlinear modeling that allows reproducing the behavior of the chirp function and the phase condition for synchronization is controlled by the time fuzzy controllers, which allow considering greater degrees of freedom for the adjustment of system performance.(3)The implementation of the power correlation using neuro-fuzzy, reduced computational time when the rule of overlapping membership functions was implemented. Despite the direct programming of the fuzzy system, it offers better results than the application of computational tools that execute all the rules for determining the consequent aggregation.(4)The importance of power correlation is in predicting operating conditions under fault when power should be generated under voltage and phase conditions, and the deviation concerning the measured power is determined.(5)The consideration of dealing with power drooping is that this is the regulation modality on which these equipment operate. However, the degree of participation to try to correct grid frequency deviations must be taken into consideration.(6)Modeling the equipment as a whole and obtaining a linear representation allow us to determine that the ability to follow the power setpoint does not require a correction and that, therefore, a gradient control is only necessary for ratio regulation power setpoint change.(7)The consideration of the MOV as a transient overvoltage protection element minimizes the propagation of the fault that the presence of a crowbar could cause. This protection element was considered due to the inductive load represented by the transmission line and emulated when connecting the electronic inverter units to the grid.(8)Considering the complete equipment by including ten units of 10 (kW) allows handling power elements to be subjected to less stress, increasing reliability, and improving the capacity and efficiency of the equivalent generator of 140 (kVA).

The static power flow study showed a contribution to the voltage increase in bus 2, associated with the substation that couples to the generation system by the inverter through the line emulated by the inductor. Likewise, bus 2 had a slight delay in phase (less than 1.5 degrees) concerning bus 1, associated with the connection node of the generator modeled by the Thevenin equivalent circuit.

The dynamic power flow study, taking into account that it was carried out considering linear models, showed the same response and settling time under different phase shift conditions between the voltages of buses 2 and 3 (with bus 3 being the voltage in the generator by inversion and bus 2 being the node associated with the coupling substation). The adjusted times to reach the power setpoint were 2 seconds for the five cases evaluated.

Finally, regarding fuzzy control, a Mamdani system was implemented instead of Sugeno because the models developed with Matlab are more efficient in terms of execution time. The critical aspect to remember is to demystify the fact that Sugeno is always a better inference method due to its ease of singleton adjustment. Mamdani, with the correct adjustment of its configuration, allows the application of the decreasing gradient for the positioning of the membership functions of the consequent, taking into account the centroid method. This process is facilitated if a triangular or delta-type membership function is used (like the ones used in this paper).

Data Availability

Data required to reproduce the proposed study are already included in this manuscript.

Conflicts of Interest

The authors declare that they have no conflicts of interest.