Power quality monitoring system based on IEC61850

Power quality monitoring system is an important means to find and evaluate power quality problems in time. A service-oriented browser / server (B / S) mode active power quality real-time monitoring system is designed and implemented, which provides the real-time monitoring function of power quality in the process of active power distribution network absorbing distributed power generation layer by layer, and focuses on observing the impact of the change of power flow direction on the level of power quality. Based on IEC 61850 standard, the system establishes the power quality information model, and uploads the real-time monitoring data of power quality on site to the master station for analysis and storage in the real-time database through MMS. The client communicates with the server through windows communication base (WCF) service to obtain real-time monitoring data, and realizes the global real-time monitoring function of power quality of active distribution network combined with the main wiring diagram, so as to achieve the integrated display effect of data graph.


Introduction
Due to the continuous growth of power demand, the growing shortage of traditional energy and the gradual opening of the power market, distributed power, especially renewable energy, has a large number of access to the distribution network, which has a wide impact on the distribution network [1]. The traditional passive one-way power flow distribution network has gradually evolved into the active two-way power supply distribution network, and the trend direction may change at any time [2]. In addition, the distribution network itself is also impacted by a large number of non-linear loads. The coupling network of distributed power and malignant loads will aggravate the deterioration of power quality, seriously affect the quality and reliability of power supply, resulting in equipment damage, economic loss and other consequences. Therefore, it is necessary to monitor the power quality of the active distribution network in real time, so as to take effective measures in time and reduce the loss.
The power quality of the active distribution network is closely related to the access mode and operation of the distributed generation [3]. It has a great influence on the level of power quality. The traditional power quality monitoring system cannot meet the requirements of active distribution network, so it is necessary to design a power quality monitoring system for active distribution network. At present, there is no relevant literature in this area [4].
Power quality monitoring and management is a systematic project [5]. Although some areas are specially equipped with voltage monitors and harmonic monitoring devices with wireless upload function, they are faced with the reality of wide-ranging rural network points, weak foundation, lack of construction funds and imperfect communication network [6]. The paper mainly discusses the structure of an economic distributed power quality monitoring and analysis system and the automatic IOP Conf. Series: Earth and Environmental Science 619 (2020) 012016 IOP Publishing doi:10.1088/1755-1315/619/1/012016 2 location algorithm of power quality event source, which belongs to the applied basic theory research. This paper is based on the current advanced communication on the basis of automation, this paper puts forward the technical scheme of power quality intelligent monitoring and management simulation of distribution network, builds a system platform, realizes the power quality monitoring and control of regional substation, medium voltage line, station area, low voltage line, user and other levels; through the design of communication interface with other automation systems, it gives full play to the real-time data related to power quality of existing automation systems The functions of collection, transmission and analysis can realize the sharing of data and information resources, and provide auxiliary decision support for power supply enterprises to manage power quality problems timely and scientifically.

System architecture design
The monitoring system of this paper adopts browser / server (B / s) architecture based on. Net, including four parts: power quality monitoring equipment layer, database service layer, web service layer and client. The system structure and working diagram are shown in Figure 1, where ied represents intelligent electronic equipment, TA represents current transformer and TV represents voltage transformer.

Real time data model of power quality monitoring equipment
Real time data of power quality includes steady-state data and alarm event data, involving frequency, voltage effective value, current effective value, harmonic voltage, harmonic current, voltage imbalance, current imbalance, flicker, power and power factor and other indicators. According to the requirements of real-time monitoring data of power quality, according to IEC61850 standard, the logical node model of relevant power quality monitoring equipment is shown in Figure 2.
In Figure 2, TVTR and TCTR are respectively voltage transformer logic nodes and current transformer logic nodes for voltage and current signal acquisition. The power quality measurement function object is used to record the steady-state data, and the power quality event monitoring object is used to record the transient event data.  In the actual monitoring process, the real-time data is uploaded in the way of dataset. The real-time steady-state data is encapsulated in ds real data, and the alarm event data is encapsulated in ds warning data transient. The specific content of the data set is defined in the IED performance description (ICD) file. As the upload cycle of real-time steady-state data in the monitoring equipment is 3 s, in order to ensure the speed of data transmission, the non cache report (URCB) mechanism is adopted, which is uploaded to the monitoring master station immediately after generation, and supports the integrity cycle up (in tgpd) and the general call (GI). The alarm event data is sent through the BRCB mechanism to ensure the event sequence and reliability. IEC 61850 service program is running on the monitoring master station server, which is used to establish a connection with the on-site monitoring equipment, analyze the uploaded monitoring data and store it in the real-time database.

Calculation method of electric parameters 2.3.1. Harmonic calculation method of power grid
The theory of Fourier series put forward by the French mathematician in the 19th century proved that any repeated waveform can be decomposed into a sine wave component containing the fundamental frequency and a series of fundamental frequency doubled harmonics. When the current flows through the nonlinear load in the power system, the waveform is distorted. The voltage and current are decomposed into fundamental wave and a series of harmonics by Fourier transform, Namely: The harmonic measurement based on Fourier transform is the most widely used method. The analog signal is sampled by ADC and becomes a digital sequence signal. Then the harmonic analysis and calculation are carried out by DSP to get the amplitude and phase of the fundamental wave and each harmonic. Using this method to measure harmonic wave, the accuracy is high and the use is convenient. The voltage and current of each harmonic are obtained by FFT and stored in complex form. The real part and the imaginary part of voltage and current are stored separately. The electric parameters of each harmonic voltage, current effective value and total voltage, current effective value can be calculated according to the following formula.
Effective value of the kth harmonic voltage: 2

power calculation method
The active power of single-phase circuit generally refers to the average active power, recorded as P, defined as: If n points are sampled periodically, the above formula is discretized as follows: where n is the number of sampling points in a cycle, the voltage and current must be sampled at the same time to ensure the correctness of calculation. The single phase apparent power s is defined as: where U and I are the effective values of voltage and current respectively.

Function design of power quality monitoring system
The circuit power quality measurement that the power quality monitoring system needs to complete mainly includes: voltage deviation, frequency deviation, three-phase imbalance degree and harmonic, among which the first three items are based on 10 frequency periods. The determination of harmonic is the comparison of harmonic average value and fundamental wave within 3s. In this design, the U-phase zero crossing jump detected by the cap pin is measured as a cycle. When the interrupt is generated, the data is read out from the ADC sampling chip register, and the register is cleared. The corresponding counter 1 measures a cycle. When 10 cycles are reached, the corresponding voltage and frequency deviation and three-phase imbalance degree will be calculated. Another counter is set up. When it reaches 150 cycles, i.e. 3S, the harmonic is measured. The power quality flow is shown in Figure 3. The two counters in this design do not need TMS320F2812 Two internal timers are provided, which can count the zero crossing interrupt generated by two static variables. This method has fast response and simple software design. However, the external zero crossing detection circuit is required to have strong anti-interference performance. The zero crossing detection circuit designed above can effectively suppress the external interference signal. Zero crossing interrupt is an interruption of a frequency cycle, in which the ADC has sampled 128 times. In order to save each sampling data, it is necessary to set the internal register of the ADC sampling chip, and store the real-time acquisition data in the queue. Only when the interrupt is generated can the data be taken out in the first in first out mode.

Voltage deviation and frequency deviation monitoring
The measurement of voltage, current, power, frequency and harmonic is achieved by sampling interruption to obtain the collected data, and then the corresponding effective value calculation or FFT digital processing. If the sampling chip communicates with the DSP chip through the SPI port, the SPI communication port will be interrupted once for each sampling in this design, and TMS320F2812 will be informed to carry out data processing once. If the sampling is 128 times in each frequency cycle, about 6400 times will be interrupted every 1s. In the interrupt program, it needs to read the instantaneous value of current and voltage. At this time, it needs DC filtering. The way to realize it is to measure the DC component with a large resistance, and then subtract this component from the main signal to get a clean AC signal.
In this paper, we use the difference between the values of two adjacent sampling signals not to exceed a certain threshold value as the basis for judging whether to sample the noise signal. If the threshold value is exceeded, it is considered as noise signal. If the threshold value is not exceeded, it is considered as normal sampling signal value. Then the two adjacent voltage signal values are compared with 0 respectively. If the previous sampling value is negative and the current sampling value is positive, it is considered that the signal really passes zero. Then the linear interpolation operation is carried out between the two sampling values, and 8 interpolation operations are carried out in total to get the interpolation point at zero crossing, and then the interpolation number is added to the period count to get the frequency value of the signal. Then the average of the results measured in 10 cycles is obtained, and the frequency deviation is obtained by comparing with the nominal frequency.

Conclusion
Active distribution network can greatly improve the compatibility of clean energy and the efficiency of existing equipment, which is the development trend of intelligent distribution network in the future. However, due to the access of a large number of distributed power, new power quality problems appear in the distribution network. The real-time monitoring system of power quality of active distribution network, combined with the main wiring diagram of distribution network, realizes the real-time monitoring function of power quality in the process of layer by layer absorption of distributed power, and provides data support for the planning, operation, power quality management control and future research work of active distribution network.
At present, for the data provided by the real-time power quality monitoring system of the active distribution network, the following content is under further study.
1) Find the relationship between the power quality level of the distributed power supply and the operation status of the distributed power supply, specifically the influence boundary of the change of the output power of the distributed power supply on the power quality level, such as the influence boundary of the DC voltage fluctuation of the distributed power supply, the change of the filter parameters on the voltage fluctuation and the harmonic emission level.
2) Under a certain permeability, the problem of power quality superposition of distributed generation connected by single point single machine, single point multi machine and multi point multi machine is discussed.
3) Under different permeability, the corresponding comprehensive power quality control and active distribution network coordination control method is proposed.