# Operation Optimization of Microgrid System Based on Intelligent System Model

Authors: Jian Kang
Journal: Advances in Multimedia
 (2022)

---

## Abstract

In order to improve the operation optimization effect of the microgrid system, this paper combines the intelligent system model to construct the operation optimization model of the microgrid system. Moreover, this paper conducts a quantitative calculation and research on the maximum compensation capacity of the active power filter device and proposes a harmonic power adaptive compensation control strategy in the case of the limited output capacity of the APF device. In addition, this paper adopts the method of extracting the harmonic current command in the synchronous coordinate system based on the band-pass filter composed of SOGI and combines the RDFT algorithm to determine the number of harmonics that can be compensated and the degree of compensation for the harmonic number. Finally, this paper combines simulation experiments and comprehensive evaluation to study and verify that the operation optimization effect of the microgrid system based on the intelligent system model is better and can effectively improve the operation effect of the microgrid system.


---

## Body

## 1. Introduction

Microgrid is a small system that integrates power generation, distribution, and electricity consumption. It is mainly composed of renewable energy power generation devices, microsources, energy storage systems, user loads, power electronic conversion devices, etc. The microgrid has two modes of operation: grid-connected and islanded, which can meet the energy needs of users in the region. Studying the operation optimization scheduling of microgrid can improve the reliability and economy of power supply of microgrid system to a certain extent, and it is essential to establish the mathematical model of microgrid to study the optimal scheduling problem of microgrid.As an effective means to give full play to distributed power, microgrid has become one of the hotspots of smart grid research [1]. Microgrid is a small generation, distribution, and power consumption system, which is mainly composed of distributed generation devices, energy storage systems, user loads, and power electronic conversion devices [2]. Moreover, microgrids generally have the following characteristics [3]. (1) Autonomy: As a small energy network, microgrid has two modes of operation: grid-connected and islanded. When the microgrid is connected to the grid, it can not only meet the peak regulation demand of the large power grid, but also maintain the stability of the large power grid. Moreover, when a system failure occurs in the large power grid, the microgrid can also be quickly separated from the large power grid and switched to island operation to ensure continuous power supply to other important loads in the microgrid. (2) Stability: The microgrid is connected to the large grid through public tie lines. When connected to the grid, its voltage and frequency are the same as those of the large grid. However, when operating in an island, voltage power balance is maintained through energy storage units, fast control, and real-time communication. (3) Compatibility: The microgrid can integrate distributed power sources such as wind power, solar power, and fuel cells and adjust power fluctuations in real time through energy storage units and control devices to maintain stability within the microgrid. (4) Flexibility: As a single controlled entity, the microgrid can realize the “plug and play” of distributed power supply and can provide different levels of power demand according to different pricing strategies provided by different users. (5) Economy: The microgrid can comprehensively optimize the utilization of energy, improve the efficiency of energy operation, reduce the environmental pollution in the microgrid, and realize the unified management of asset allocation and market transactions.The energy storage system is an important part of the construction of a microgrid and an important unit for the optimal scheduling of the microgrid. With its fast power regulation and both supply and storage capabilities, the energy storage system can smooth the power fluctuations of renewable energy, cut peaks, and fill valleys. It has played a great role in improving the voltage quality and providing backup power, which is the key for the microgrid to realize the flexible adjustment of widely accessed distributed energy and the optimal operation of the network [4]. So far, domestic and foreign researchers have conducted in-depth discussions on the participation of energy storage in the optimal scheduling of microgrid operations. Literature [5] proposed a grid-connected operation of microgrids including wind turbines, photovoltaics, and energy storage considering carbon emissions. The optimal dispatching model of the microgrid and the optimal economic operation of the microgrid can be realized by adjusting the charging and discharging power of the energy storage and the exchange power with the large power grid and load abandonment situation to achieve ideal economic operation. Literature [6] studied the characteristics of energy storage system, took it as the object of microgrid scheduling, and established the operation reliability of microgrid, the economic cost of microgrid, and the response of microgrid. A multiobjective optimal scheduling model with three objectives as the objective function is solved based on the dynamic programming algorithm. The analysis results of specific simulation examples show that the economical operation of the microgrid can be realized through the reasonable scheduling operation of the energy storage battery. In literature [7] under the premise of real-time electricity price and load demand, an economic dispatch method using fuzzy theory optimization is proposed based on the combined cooling, heating, and power microgrid. For the optimal control of electric power and microsource output, literature [8] established a multiobjective optimization model considering the charging and discharging strategy of the energy storage system and the user’s multiperiod electricity price response model under the time-of-use price with the goal of maximizing annual revenue and photovoltaic efficiency. At the same time, the improved NSGA-II is used in the optimization method to solve the calculation. On the basis of the wind-solar-storage microgrid, literature [9] established a microgrid considering the working mode of the energy storage system with the goal of minimizing the operating cost of the microgrid. As well as the intraday optimal dispatch model, the calculation example results show that the participation of energy storage in the operation of the microgrid can effectively improve the income of the microgrid and wind power. Literature [10] established the goal of microgrid power balance, the lowest cost of composite energy storage, and the lowest fluctuation of renewable energy. The multiobjective optimal scheduling model of composite energy storage is proposed, and the multiobjective problem is solved by the method of ordering the average value of fitness dispersion. The calculation example finally verifies that the optimization effect of composite energy storage is better than that of single energy storage. In the case of grid connection, aiming at the operating cost, environmental pollution cost, and reliability of the microgrid, a method for joint optimization of hybrid renewable energy power generation and energy storage capacity is established, reducing greenhouse gas emissions to make the microgrid system more reliable. Literature [11] proposed a multiobjective stochastic optimization framework for optimal scheduling of energy storage systems in microgrids. As the goal, the multiobjective genetic algorithm is used to solve the calculation. The results of the calculation example show that the stochastic optimization framework is beneficial to the economic operation of the microgrid. Literature [12] considered the service life of the battery energy storage system and the microgrid system in the objective function. The overall revenue is solved by the self-adaptive dynamic programming 1 algorithm, and the simulation results discuss the influence of the service life of the energy storage on the system revenue and the effectiveness of the ADP algorithm.Literature [13] proposed an autonomous scheduling strategy for microgrids that absorbs renewable energy such as wind and solar. The autonomous scheduling strategy establishes a robust hybrid optimal scheduling model for electricity and heat on the premise of taking into account the response potential of interruptible loads. Considering the participation of adjustable loads in microgrid scheduling can not only significantly improve the flexibility of microgrid scheduling, but also improve the consumption level of wind power photovoltaic output and reduce the pressure on conventional units for peak shaving [14]. The CHP-type microgrid with coordinated response introduces transferable loads on the basis of the electrothermal model and proposes a multiobjective optimization model of the CHP-type microgrid based on the demand-side coordinated response targeting economic indicators and carbon emission indicators. Regarding simulation examples, the results show that the coordinated response of demand-side electric heating and transferable loads can reduce the microsource configuration capacity in the CHP-type microgrid and effectively improve the economy and environmental protection of its operation. Literature [15] considered the difference in user participation in power system scheduling. Under the premise of willingness, a multiobjective model with the lowest comprehensive power generation cost and the largest carbon trading benefit is established, and the incentive coefficients of different flexible loads are selected to study the impact on the economic dispatch of the power system. The calculation example verifies the flexible load through four dispatching models. Participating in system scheduling can take into account both the economy and environmental protection of the system. Literature [16] established a safety system considering transferable loads, translatable loads, and interruptible loads under different wind power output scenarios generated under the quasi-Monte Carlo method. Constraining the unit combination model, taking into account the coordination of flexible loads on the power supply side and the demand side at the same time, achieves a reasonable allocation of flexible load scheduling. The power consumption and the improvement of system economy play an important role. In the case of random fluctuations of wind power and time-of-use electricity prices, literature [17] comprehensively considered interruptible loads and power generation side resources to establish the daily operation optimization of the large-capacity wind power connection system. The results of the calculation example show that the proposed system scheduling model can not only improve the utilization rate of wind energy but also improve the economy. Literature [18] first established a compensation cost model for interruptible loads such as air conditioners under the time-of-use electricity price, and then the objective function aiming at the lowest economic cost of the microgrid is established and analyzed through four different scheduling modes. The calculation example results show that taking into account the load reduction and participating in the optimal scheduling of the microgrid can give full play to the power consumption side of the microgrid and users. On the premise of considering user-side satisfaction, energy storage, and demand response, literature [19] established a grid-connected microgrid operation optimization scheduling model, and the following conclusions were drawn through numerical example simulation. The introduction of demand-side resources in the optimal scheduling of microgrid operation can effectively reduce the load peak-to-valley difference and reduce the operating cost of the microgrid. Literature [20] used interruptible load as a user-side schedulable resource to establish a two-way wind power system under uncertain output. The stage stochastic optimization scheduling model can give full play to the scheduling ability of interruptible loads and respond to the uncertainty of wind power output in time. Simulation shows that the participation of flexible loads in system scheduling can fully give full play to the power generation efficiency of conventional units and reduce system dispatch costs.In this paper, the microgrid system operation optimization model is constructed in combination with the intelligent system model, the operation process of the microgrid is optimized, and the operation efficiency of the microgrid is effectively improved.


## 2. Microgrid Intelligent Operation Optimization System

### 2.1. Research on Adaptive Compensation Method of Active Power Filter Device

The research in this chapter focuses on how to ensure the safe operation of the APF output without exceeding the capacity and maximize the capacity utilization of the device when the capacity (harmonics and reactive power) that needs to be compensated in the line exceeds the maximum compensation capacity of the APF. This chapter firstly performs theoretical calculation on the maximum reactive power and harmonic compensation capability of APF. Moreover, this paper clarifies the relationship between the output capability of APF capacity and its main circuit parameters theoretically and provides theoretical guidance for the selection of main circuit parameters from the perspective of APF capacity determination. When the APF capacity is not enough to compensate all the harmonic power in the line, this chapter proposes to use the band-pass filter constructed based on SOGI to extract the harmonic current in stages and combine the RDFT algorithm to calculate the effective value of each harmonic current. According to the value constraints, the order of compensation harmonics and the degree of current compensation of each harmonic are adjusted dynamically, so as to achieve the purpose of limiting amplitude and maximum capacity utilization.Figure1 shows the single-phase phasor diagram of the grid-connected APF device:Figure 1
Single-phase phasor diagram of grid-connected APF device.In Figure1, Vsh is the effective value of the APF output voltage, θshv is the phase of the APF output voltage, Ish is the effective value of the APF output current, θshi is the phase of the APF output current, and Zsh is the APF grid-connected connector impedance. θsh is the phase angle of the impedance of the APF grid-connected connector, Vpcc is the effective value of the voltage at the PCC point, θpccv is the phase of the voltage at the PCC point, Ipcc is the effective value of the current at the PCC point, and θpcci is the phase of the current at the PCC point. The voltage and current of the PCC point are the reference phasors; that is, the phase angle of the PCC point voltage and current is 0:(1)θpcci=θpccv=0.Then, the current flowing on the APF grid-connected branch can be expressed as(2)Ish=vsh∠θshv−vpcczsh∠θshz.The voltage output by the APF device is(3)Vsh=Vpcc+ZshIsh∠θshz+θshi.According to the definition of complex power, the quantitative expression of single-phase output capacity of APF device is obtained:(4)Ssh=VpccIsh∗=VpccVsh∠−θshv−VpccZsh∠−θshz=VpccVshZsh∠θshz−θshv−Vpcc2Zsh∠θshz=VpccVshZshcosθshv−Vpcc2Zshcosθshz+VpccVshZshsinθshvsinθshz+jVpccVshZshcosθshv−Vpcc2Zshsinθshz−VpccVshZshsinθshvcosθshz,and(5)Ssh=Psh+jQsh=Pshf+PshH+jQshf+QshH=Pshf2+Qshf2+Hsh2.In the formula,Pshf is the active power of the fundamental wave, Qshf is the reactive power of the fundamental wave, Hsh is the harmonic power, and Hsh includes the active harmonic power and the reactive harmonic power:(6)Hsh=PshH2+QshH2,then,(7)Pshf=VpccVshZshcosθshv−Vpcc2ZshcosθshzQshf=VpccVshZshcosθshv−Vpcc2ZshsinθshzHshf=VpccVshZshsinθshv.Since∠θshv is very small, it can be approximated that sinθshv=θshv,cosshv=1; then, ∠θshi depends on ∠θshz. If Zsh is inductive, then ∠θshz=90°. This is consistent with the fact that the connection device of the general grid-connected inverter is a single inductor or an LCL filter.At this time,(8)Pshf=0Qshf=VpccVshZsh−Vpcc2ZshHshf=VpccVshZshθshv.It can be seen from formula (8) that the active power consumed by the APF device is very small, and the reactive power and harmonic power it can output are related to the PCC point voltage and the impedance of the grid-connected connector.WhendQshf/dVpcc=0, the maximum reactive power that can be compensated by APF is obtained as(9)Qshf−max=3Vpcc−max2Zsh.At this time,Vsh=2Vpcc.Similarly, we can get(10)Hshf−max=3Vpcc−maxVsh−maxZsh.At this time,sinθshv=1.It can be seen from equations (8) and (10) that the maximum capacity of the APF device is mainly related to the impedance of its grid-connected connector and the maximum voltage that the device can output. The size of the output voltage of the device depends on the DC bus voltage of the device and the modulation strategy used (DC voltage utilization). In addition, in the hardware circuit, it also depends on the maximum current and reverse withstand voltage that the main switching device can withstand for a long time.The crest factor is an intuitive indicator used to measure the difference between the peak value and the RMS value of the current of the AC load. It is defined as the ratio of the current peak value to the RMS value. For linear loads, the current waveform is a sine wave with a crest factor of 1.414. For some switching power supply or motor speed-regulating loads, the current crest factor can reach 3. The prototype capacity in this design is 3kVA, and the principle of nearest compensation is adopted. It is applied in the power grid of 380V voltage level, and its output current is small (within 5A). Moreover, this design uses RMS constraints to define the output capacity of the APF. Even when the crest factor reaches 3, it is far less than the current level that the modular three-phase bridge switching device can withstand and can give full play to the compensation capability of the device, so it is reasonable to use the RMS constraint. The output of the device is limited by the RMS constraint condition, and the RMS value of the rated current output by the device is(11)Ic,rated≈SAPFVsh.Among them,Vsh is the voltage output by the device, and SAPF is the APF capacity. If the active component of the fundamental wave that maintains the voltage stability of the DC side is ignored, the square of the effective value of the APF output compensation current can be expressed as(12)Ic2=Icf2+Ich2≈Icq2+Ich2.From formula (12), it can be seen that the RMS value of the APF output current is composed of the valid value Icq of the fundamental wave reactive current and the valid value Ich of the harmonic current when ignoring the smaller RMS value of the fundamental wave active current. The effective value of the reactive current that needs to be compensated is related to the capacity and power factor of the linear reactive load, and the effective value of the current that needs to be compensated for harmonics is related to the capacity and THD of the harmonic nonlinear load. Generally speaking, the parallel APF can be used to compensate the reactive power generated by linear loads and the distorted power generated by nonlinear loads. However, due to the limitation of capacity at the beginning of the design or the change of load conditions, the APF cannot fully compensate the harmonics and reactive currents in the line. Therefore, in the case of prioritizing the compensation of harmonic currents, it is often only possible to partially compensate the reactive current or even prioritize the compensation of the specified subharmonic current components.


### 2.2. Harmonic Power Adaptive Compensation Method

Taking advantage of the large gain and zero phase shift characteristics of SOGI structure at the resonant frequency, the output of SOGI is fed back to the input to form a band-pass filter structure with frequency-selective characteristics. The structure of the band-pass filter implemented by SOGI is shown in Figure2.Figure 2
Structure block diagram of band-pass filter implemented by SOGI.The input-output transfer function of the band-pass filter structure diagram in the above figure is(13)YsUs=kω0ss2+kω0s+ω02.Whenk takes different values, the frequency characteristic curve of the band-pass filter based on the SOGI structure is drawn as shown in Figure 3.Figure 3
The bode diagram of the band-pass filter implemented by SOGI at differentk values.Whenk takes different values, we observe how fast the output signal reproduces the input signal (Figure 4).Figure 4
Time domain response of band-pass filter with differentk values using SOGI. (a) Input the signal waveform. (b) The output signal time-domain response waveform at k = 1.0. (c) The output signal time-domain response waveform at k = 0.5. (d) The output signal time-domain response waveform at k = 0.1.
(a)(b)(c)(d)It can be seen from Figures3 and 4 that the filter based on SOGI has good band-pass filtering characteristics. For any given signal, it is possible to track the sinusoidal signal of the selected frequency without static error, with a gain of 0 dB and no phase shift. When the value of k is smaller, the filtering effect is better, but the response speed is slower. Conversely, the larger the k value, the faster the response speed, but the filtering effect will be reduced. Therefore, it is necessary to compromise the response speed and the filtering effect and generally take k = 0.5.In industrial applications, the harmonics generated by nonlinear loads are mostly 6k±1. Taking a typical three-phase uncontrolled rectifier bridge with resistive inductive load as an example, the expression of the load current in the abc coordinate system can be obtained by analysis. After transforming it into thedq coordinate system, the expression is as follows:(14)iLdiLq=I1+∑n=6k±1k=1,2,3,…−1kIn−1+In+1cosnωt∑n=k≠1k=1,2,3,…−1k−In−1+In+1sinnωt.In the formula,iLd is the d-axis component of the load current, iLq is the q-axis component of the load current, I1 is the load fundamental current amplitude, In is the load harmonic current amplitude, and n is the harmonic order.The load harmonic current waveform and spectrum analysis in thedq rotating coordinate system are shown in Figure 5. It can be seen from the figure that the high-frequency components of the load current only contain 6k harmonic components in the dq rotating coordinate system.Figure 5
Typical nonlinear load current waveform and spectrum. (a) Typical nonlinear loadd-axis harmonic current waveform. (b) Typical nonlinear load d-axis harmonic current spectrum. (c) Typical nonlinear load q-axis harmonic current waveform. (d) Typical nonlinear load q-axis harmonic current spectrum.
(a)(b)(c)(d)Aiming at the characteristics of the load current in thedq coordinate system, an adaptive harmonic current compensation control strategy based on SOGI is proposed in this paper. The 6nth harmonic current in the dq coordinate system corresponds to the 6n ± 1th harmonic current in the abc coordinate system. Therefore, the second-order generalized integrator (SOGI6n) in the above figure extracts the 6n ± 1st harmonic current component iLd_6n in the load current.According to the RMS constraint formula (12), it can be known that the accurate and rapid extraction of the RMS of each harmonic current in the load current is the premise of maximizing the utilization of the APF device capacity without overloading. In this design, the recursive discrete Fourier transform (RDFT) method based on the traditional discrete Fourier transform (DFT) is used to extract the effective value of each harmonic current. The specific principle is described as follows.We assume a signalx(t) with period T satisfying the Dirichlet condition, which can be expressed as a superposition of a series of sinusoidal function components:(15)xnτ=∑k=1NmAkcoskωnτ+∑k=1NmBksinkωnτ.In the formula,Nm is the ratio of the highest harmonic frequency to the fundamental frequency, and Ak and Bk are the real and imaginary parts of the k-th harmonic content, respectively. ω is the angular frequency of the fundamental wave, and τ is the period of the interval between the sampling points in each fundamental wave period.Taking the signal of the fundamental frequency as an example, the real partA1 and the imaginary part B1 can be calculated according to the following formula:(16)A1n=2N∑i=nn−N+1xiτcosωiτB1n=2N∑i=nn−N+1xiτsinωiτ.In the formula,N is the number of sampling points in a fundamental wave cycle, the sampling frequency in this design is 18 kHz, and the fundamental wave frequency is 50 Hz. Therefore, the number of sampling points per fundamental wave period is N=18000/50=360, and the sampling point period in each fundamental wave period is τ=20ms/360=55.5μs.It can be known from formula (16) that, for the calculation of the real part and imaginary part of the fundamental wave component at the current moment, it is necessary to prestore N signal sampling values of the previous fundamental wave period. In addition, N times of multiplication and addition operations are required, which greatly consumes the computing time of the processor. In order to improve the operation speed, formula (16) is transformed into a recursive form:(17)A1n=A1n−1+2Nxnτ−xn−NτcosωnτB1n=B1n−1+2Nxnτ−xn−Nτsinωnτ.According to formula (17), the real and imaginary components of the fundamental component can be calculated to synthesize the effective value of the fundamental component. For the k-th harmonic, the real and imaginary parts are calculated as follows:(18)Akn=Akn−1+2Nxnτ−xn−NτcoskωnτBkn=Bkn−1+2Nxnτ−xn−Nτsinkωnτ.The effective value of the synthesizedk-th harmonic current is as follows:(19)iLk2=Ak2n+Bk2n.The principle block diagram of extracting the effective value of each harmonic current based on the RDFT algorithm is shown in Figure6.Figure 6
The principle block diagram of extracting the effective value of harmonic current based on RDFT algorithm.According to the above block diagram, the effective value current of any harmonic component can be extracted. Taking the three-phase bridge uncontrolled rectifier load as an example, we use the method in Figure6 to extract the square of the effective value of the 5th, 7th, 11th, and 13th harmonic currents. Among them, the load suddenly increases at 0.04 s, and the simulation results are shown in Figure 7.Figure 7
The result of extracting the RMS value of the 5th, 7th, 11th, and 13th harmonic currents based on the RDFT algorithm.It can be seen from Figure7 that the use of recursive discrete Fourier transform can improve the real-time performance of the calculation and at the same time can reduce the amount of calculation of the discrete Fourier transform. After the square of the RMS value of each harmonic current is obtained, the adaptive harmonic power compensation algorithm is implemented according to the RMS value constraints.When the capacity is sufficient, the APF can fully compensate the reactive power and harmonic current; when the capacity is not sufficient, the power compensation of different frequency harmonics needs to be selected or the compensation coefficient adjusted. The selection of the compensation frequency band and the determination of the coefficient need to be jointly determined according to the effective value of the harmonic and the capacity of the APF. In this paper, the recursive discrete Fourier transform RDFT is used to extract the effective value of each harmonic current and calculate the APF capacity margin. The compensation coefficientk6n of each frequency is adjusted according to the remaining capacity. According to the characteristics of the load current in the dq coordinate system, the adaptive harmonic current compensation control block diagram based on SOGI and RDFT proposed in this paper is shown in Figure 8.Figure 8
Block diagram of adaptive compensation control ofd-axis harmonic current.k6n=1 indicates that the compensation coefficient of the selected frequency band of SOGI is 1; that is, the 6nth harmonic current of the d-axis and the q-axis can be fully compensated. k6n<1 means that the remaining capacity of the APF cannot fully compensate the command current in this frequency band, so the proportional coefficient k6n needs to be adjusted to complete the limiter. The clipped instruction can be expressed as(20)id∗=ivdc∗+∑n=1nmaxk6niLd−6n−1+iLd−6n+1+k6nmax+1iLd−6nmax+1+iLd−6nmax+1iq∗=iq+∑n=1nmaxk6niLq−6n−1+iLq−6n+1+k6nmax+1iLq−6nmax+1+iLq−6nmax+1nmax=∑n=1∞I6n−12+I6n+12−Ires2≤εmax|n=maxn1,n2….Among them,Ires is the residual capacity after compensating reactive power, εmax is a small positive number, and nmax is the maximum number of harmonic groups for complete compensation. The coefficient before the harmonic order command that is not completely compensated is determined by proportional limiting according to the remaining capacity and the capacity to be compensated.


## 2.1. Research on Adaptive Compensation Method of Active Power Filter Device

The research in this chapter focuses on how to ensure the safe operation of the APF output without exceeding the capacity and maximize the capacity utilization of the device when the capacity (harmonics and reactive power) that needs to be compensated in the line exceeds the maximum compensation capacity of the APF. This chapter firstly performs theoretical calculation on the maximum reactive power and harmonic compensation capability of APF. Moreover, this paper clarifies the relationship between the output capability of APF capacity and its main circuit parameters theoretically and provides theoretical guidance for the selection of main circuit parameters from the perspective of APF capacity determination. When the APF capacity is not enough to compensate all the harmonic power in the line, this chapter proposes to use the band-pass filter constructed based on SOGI to extract the harmonic current in stages and combine the RDFT algorithm to calculate the effective value of each harmonic current. According to the value constraints, the order of compensation harmonics and the degree of current compensation of each harmonic are adjusted dynamically, so as to achieve the purpose of limiting amplitude and maximum capacity utilization.Figure1 shows the single-phase phasor diagram of the grid-connected APF device:Figure 1
Single-phase phasor diagram of grid-connected APF device.In Figure1, Vsh is the effective value of the APF output voltage, θshv is the phase of the APF output voltage, Ish is the effective value of the APF output current, θshi is the phase of the APF output current, and Zsh is the APF grid-connected connector impedance. θsh is the phase angle of the impedance of the APF grid-connected connector, Vpcc is the effective value of the voltage at the PCC point, θpccv is the phase of the voltage at the PCC point, Ipcc is the effective value of the current at the PCC point, and θpcci is the phase of the current at the PCC point. The voltage and current of the PCC point are the reference phasors; that is, the phase angle of the PCC point voltage and current is 0:(1)θpcci=θpccv=0.Then, the current flowing on the APF grid-connected branch can be expressed as(2)Ish=vsh∠θshv−vpcczsh∠θshz.The voltage output by the APF device is(3)Vsh=Vpcc+ZshIsh∠θshz+θshi.According to the definition of complex power, the quantitative expression of single-phase output capacity of APF device is obtained:(4)Ssh=VpccIsh∗=VpccVsh∠−θshv−VpccZsh∠−θshz=VpccVshZsh∠θshz−θshv−Vpcc2Zsh∠θshz=VpccVshZshcosθshv−Vpcc2Zshcosθshz+VpccVshZshsinθshvsinθshz+jVpccVshZshcosθshv−Vpcc2Zshsinθshz−VpccVshZshsinθshvcosθshz,and(5)Ssh=Psh+jQsh=Pshf+PshH+jQshf+QshH=Pshf2+Qshf2+Hsh2.In the formula,Pshf is the active power of the fundamental wave, Qshf is the reactive power of the fundamental wave, Hsh is the harmonic power, and Hsh includes the active harmonic power and the reactive harmonic power:(6)Hsh=PshH2+QshH2,then,(7)Pshf=VpccVshZshcosθshv−Vpcc2ZshcosθshzQshf=VpccVshZshcosθshv−Vpcc2ZshsinθshzHshf=VpccVshZshsinθshv.Since∠θshv is very small, it can be approximated that sinθshv=θshv,cosshv=1; then, ∠θshi depends on ∠θshz. If Zsh is inductive, then ∠θshz=90°. This is consistent with the fact that the connection device of the general grid-connected inverter is a single inductor or an LCL filter.At this time,(8)Pshf=0Qshf=VpccVshZsh−Vpcc2ZshHshf=VpccVshZshθshv.It can be seen from formula (8) that the active power consumed by the APF device is very small, and the reactive power and harmonic power it can output are related to the PCC point voltage and the impedance of the grid-connected connector.WhendQshf/dVpcc=0, the maximum reactive power that can be compensated by APF is obtained as(9)Qshf−max=3Vpcc−max2Zsh.At this time,Vsh=2Vpcc.Similarly, we can get(10)Hshf−max=3Vpcc−maxVsh−maxZsh.At this time,sinθshv=1.It can be seen from equations (8) and (10) that the maximum capacity of the APF device is mainly related to the impedance of its grid-connected connector and the maximum voltage that the device can output. The size of the output voltage of the device depends on the DC bus voltage of the device and the modulation strategy used (DC voltage utilization). In addition, in the hardware circuit, it also depends on the maximum current and reverse withstand voltage that the main switching device can withstand for a long time.The crest factor is an intuitive indicator used to measure the difference between the peak value and the RMS value of the current of the AC load. It is defined as the ratio of the current peak value to the RMS value. For linear loads, the current waveform is a sine wave with a crest factor of 1.414. For some switching power supply or motor speed-regulating loads, the current crest factor can reach 3. The prototype capacity in this design is 3kVA, and the principle of nearest compensation is adopted. It is applied in the power grid of 380V voltage level, and its output current is small (within 5A). Moreover, this design uses RMS constraints to define the output capacity of the APF. Even when the crest factor reaches 3, it is far less than the current level that the modular three-phase bridge switching device can withstand and can give full play to the compensation capability of the device, so it is reasonable to use the RMS constraint. The output of the device is limited by the RMS constraint condition, and the RMS value of the rated current output by the device is(11)Ic,rated≈SAPFVsh.Among them,Vsh is the voltage output by the device, and SAPF is the APF capacity. If the active component of the fundamental wave that maintains the voltage stability of the DC side is ignored, the square of the effective value of the APF output compensation current can be expressed as(12)Ic2=Icf2+Ich2≈Icq2+Ich2.From formula (12), it can be seen that the RMS value of the APF output current is composed of the valid value Icq of the fundamental wave reactive current and the valid value Ich of the harmonic current when ignoring the smaller RMS value of the fundamental wave active current. The effective value of the reactive current that needs to be compensated is related to the capacity and power factor of the linear reactive load, and the effective value of the current that needs to be compensated for harmonics is related to the capacity and THD of the harmonic nonlinear load. Generally speaking, the parallel APF can be used to compensate the reactive power generated by linear loads and the distorted power generated by nonlinear loads. However, due to the limitation of capacity at the beginning of the design or the change of load conditions, the APF cannot fully compensate the harmonics and reactive currents in the line. Therefore, in the case of prioritizing the compensation of harmonic currents, it is often only possible to partially compensate the reactive current or even prioritize the compensation of the specified subharmonic current components.


## 2.2. Harmonic Power Adaptive Compensation Method

Taking advantage of the large gain and zero phase shift characteristics of SOGI structure at the resonant frequency, the output of SOGI is fed back to the input to form a band-pass filter structure with frequency-selective characteristics. The structure of the band-pass filter implemented by SOGI is shown in Figure2.Figure 2
Structure block diagram of band-pass filter implemented by SOGI.The input-output transfer function of the band-pass filter structure diagram in the above figure is(13)YsUs=kω0ss2+kω0s+ω02.Whenk takes different values, the frequency characteristic curve of the band-pass filter based on the SOGI structure is drawn as shown in Figure 3.Figure 3
The bode diagram of the band-pass filter implemented by SOGI at differentk values.Whenk takes different values, we observe how fast the output signal reproduces the input signal (Figure 4).Figure 4
Time domain response of band-pass filter with differentk values using SOGI. (a) Input the signal waveform. (b) The output signal time-domain response waveform at k = 1.0. (c) The output signal time-domain response waveform at k = 0.5. (d) The output signal time-domain response waveform at k = 0.1.
(a)(b)(c)(d)It can be seen from Figures3 and 4 that the filter based on SOGI has good band-pass filtering characteristics. For any given signal, it is possible to track the sinusoidal signal of the selected frequency without static error, with a gain of 0 dB and no phase shift. When the value of k is smaller, the filtering effect is better, but the response speed is slower. Conversely, the larger the k value, the faster the response speed, but the filtering effect will be reduced. Therefore, it is necessary to compromise the response speed and the filtering effect and generally take k = 0.5.In industrial applications, the harmonics generated by nonlinear loads are mostly 6k±1. Taking a typical three-phase uncontrolled rectifier bridge with resistive inductive load as an example, the expression of the load current in the abc coordinate system can be obtained by analysis. After transforming it into thedq coordinate system, the expression is as follows:(14)iLdiLq=I1+∑n=6k±1k=1,2,3,…−1kIn−1+In+1cosnωt∑n=k≠1k=1,2,3,…−1k−In−1+In+1sinnωt.In the formula,iLd is the d-axis component of the load current, iLq is the q-axis component of the load current, I1 is the load fundamental current amplitude, In is the load harmonic current amplitude, and n is the harmonic order.The load harmonic current waveform and spectrum analysis in thedq rotating coordinate system are shown in Figure 5. It can be seen from the figure that the high-frequency components of the load current only contain 6k harmonic components in the dq rotating coordinate system.Figure 5
Typical nonlinear load current waveform and spectrum. (a) Typical nonlinear loadd-axis harmonic current waveform. (b) Typical nonlinear load d-axis harmonic current spectrum. (c) Typical nonlinear load q-axis harmonic current waveform. (d) Typical nonlinear load q-axis harmonic current spectrum.
(a)(b)(c)(d)Aiming at the characteristics of the load current in thedq coordinate system, an adaptive harmonic current compensation control strategy based on SOGI is proposed in this paper. The 6nth harmonic current in the dq coordinate system corresponds to the 6n ± 1th harmonic current in the abc coordinate system. Therefore, the second-order generalized integrator (SOGI6n) in the above figure extracts the 6n ± 1st harmonic current component iLd_6n in the load current.According to the RMS constraint formula (12), it can be known that the accurate and rapid extraction of the RMS of each harmonic current in the load current is the premise of maximizing the utilization of the APF device capacity without overloading. In this design, the recursive discrete Fourier transform (RDFT) method based on the traditional discrete Fourier transform (DFT) is used to extract the effective value of each harmonic current. The specific principle is described as follows.We assume a signalx(t) with period T satisfying the Dirichlet condition, which can be expressed as a superposition of a series of sinusoidal function components:(15)xnτ=∑k=1NmAkcoskωnτ+∑k=1NmBksinkωnτ.In the formula,Nm is the ratio of the highest harmonic frequency to the fundamental frequency, and Ak and Bk are the real and imaginary parts of the k-th harmonic content, respectively. ω is the angular frequency of the fundamental wave, and τ is the period of the interval between the sampling points in each fundamental wave period.Taking the signal of the fundamental frequency as an example, the real partA1 and the imaginary part B1 can be calculated according to the following formula:(16)A1n=2N∑i=nn−N+1xiτcosωiτB1n=2N∑i=nn−N+1xiτsinωiτ.In the formula,N is the number of sampling points in a fundamental wave cycle, the sampling frequency in this design is 18 kHz, and the fundamental wave frequency is 50 Hz. Therefore, the number of sampling points per fundamental wave period is N=18000/50=360, and the sampling point period in each fundamental wave period is τ=20ms/360=55.5μs.It can be known from formula (16) that, for the calculation of the real part and imaginary part of the fundamental wave component at the current moment, it is necessary to prestore N signal sampling values of the previous fundamental wave period. In addition, N times of multiplication and addition operations are required, which greatly consumes the computing time of the processor. In order to improve the operation speed, formula (16) is transformed into a recursive form:(17)A1n=A1n−1+2Nxnτ−xn−NτcosωnτB1n=B1n−1+2Nxnτ−xn−Nτsinωnτ.According to formula (17), the real and imaginary components of the fundamental component can be calculated to synthesize the effective value of the fundamental component. For the k-th harmonic, the real and imaginary parts are calculated as follows:(18)Akn=Akn−1+2Nxnτ−xn−NτcoskωnτBkn=Bkn−1+2Nxnτ−xn−Nτsinkωnτ.The effective value of the synthesizedk-th harmonic current is as follows:(19)iLk2=Ak2n+Bk2n.The principle block diagram of extracting the effective value of each harmonic current based on the RDFT algorithm is shown in Figure6.Figure 6
The principle block diagram of extracting the effective value of harmonic current based on RDFT algorithm.According to the above block diagram, the effective value current of any harmonic component can be extracted. Taking the three-phase bridge uncontrolled rectifier load as an example, we use the method in Figure6 to extract the square of the effective value of the 5th, 7th, 11th, and 13th harmonic currents. Among them, the load suddenly increases at 0.04 s, and the simulation results are shown in Figure 7.Figure 7
The result of extracting the RMS value of the 5th, 7th, 11th, and 13th harmonic currents based on the RDFT algorithm.It can be seen from Figure7 that the use of recursive discrete Fourier transform can improve the real-time performance of the calculation and at the same time can reduce the amount of calculation of the discrete Fourier transform. After the square of the RMS value of each harmonic current is obtained, the adaptive harmonic power compensation algorithm is implemented according to the RMS value constraints.When the capacity is sufficient, the APF can fully compensate the reactive power and harmonic current; when the capacity is not sufficient, the power compensation of different frequency harmonics needs to be selected or the compensation coefficient adjusted. The selection of the compensation frequency band and the determination of the coefficient need to be jointly determined according to the effective value of the harmonic and the capacity of the APF. In this paper, the recursive discrete Fourier transform RDFT is used to extract the effective value of each harmonic current and calculate the APF capacity margin. The compensation coefficientk6n of each frequency is adjusted according to the remaining capacity. According to the characteristics of the load current in the dq coordinate system, the adaptive harmonic current compensation control block diagram based on SOGI and RDFT proposed in this paper is shown in Figure 8.Figure 8
Block diagram of adaptive compensation control ofd-axis harmonic current.k6n=1 indicates that the compensation coefficient of the selected frequency band of SOGI is 1; that is, the 6nth harmonic current of the d-axis and the q-axis can be fully compensated. k6n<1 means that the remaining capacity of the APF cannot fully compensate the command current in this frequency band, so the proportional coefficient k6n needs to be adjusted to complete the limiter. The clipped instruction can be expressed as(20)id∗=ivdc∗+∑n=1nmaxk6niLd−6n−1+iLd−6n+1+k6nmax+1iLd−6nmax+1+iLd−6nmax+1iq∗=iq+∑n=1nmaxk6niLq−6n−1+iLq−6n+1+k6nmax+1iLq−6nmax+1+iLq−6nmax+1nmax=∑n=1∞I6n−12+I6n+12−Ires2≤εmax|n=maxn1,n2….Among them,Ires is the residual capacity after compensating reactive power, εmax is a small positive number, and nmax is the maximum number of harmonic groups for complete compensation. The coefficient before the harmonic order command that is not completely compensated is determined by proportional limiting according to the remaining capacity and the capacity to be compensated.


## 3. Analysis of Optimization Effect of Microgrid System Operation Based on Intelligent System Model

Firstly, the three-phase linear load power is 2.5 kVA, the power factor is 0.8, the three-phase uncontrolled rectifier load power is 3 kVA, and the THD is about 30%. According to the calculation of formula (20), it can be known that the existing APF capacity can meet the full compensation of reactive power and harmonic current. Figure 9 is the simulation waveform diagram of the full compensation mode.Figure 9
Simulation results (full compensation run). (a) A-phase grid voltage waveform. (b) A-phase grid current waveform. (c) A-phase compensation current waveform. (d) A-phase load current waveform. (e) FFT analysis of grid current.
(a)(b)(c)(d)(e)On the basis of the above research, a comprehensive evaluation of the operation optimization effect of the microgrid system based on the intelligent system model proposed in this paper is carried out, and the results shown in Table1 are obtained.Table 1
Optimization effect of microgrid system operation based on intelligent system model.
NumberOptimization effectNumberOptimization effectNumberOptimization effect189.321590.122992.16291.311688.403093.99392.341789.633190.29490.241893.693293.14587.751990.203389.53692.142092.903488.76787.802193.903591.14888.872290.363687.36991.072388.023788.121087.012489.613891.261189.492593.083990.541287.892691.754092.801393.682788.931493.352889.43Through the above research, it is verified that the operation optimization effect of the microgrid system based on the intelligent system model is better, and the operation effect of the microgrid system can be effectively improved.


## 4. Conclusion

As a small power distribution system with independent management and dispatching capabilities, microgrid has received extensive attention in the industry. Driven by the increasing maturity of power electronics technology, intelligent measurement technology, and network communication technology, microgrids will be widely used in distribution systems containing large-scale renewable energy. Since microgrid investors and power grid companies belong to different interest groups, the electricity market transaction rules of the distribution system will directly affect the operation efficiency of the microgrid and the enthusiasm for participating in the dispatching of the distribution system. However, the traditional power market operation mode has restricted the potential of microgrids to participate in power dispatching in the distribution system, and exploring new power market operation rules is crucial for the development of microgrids in the distribution system. In this paper, the microgrid system operation optimization model is constructed based on the intelligent system model, and the operation process of the microgrid is optimized. Finally, through the simulation test and comprehensive evaluation research, this paper verifies that the operation optimization effect of the microgrid system based on the intelligent system model is better, and it can effectively improve the operation effect of the microgrid system.



---

*Source: 5924656-2022-07-21.xml*