The application of digital power quality online monitoring system in power system The power quality online monitoring equipment is the most basic and the most important equipment for the power quality supervision and inspection network of the power grid. At present, the power quality indicators of domestic and foreign production and sales in the market are used (such as Monitoring equipment such as harmonics, unbalance, etc., can not fully meet the actual needs of China's power grid power quality supervision and management. In southern Hebei province, installation of harmonic on-line monitoring devices began in 1996. Initial installations had many problems in data storage, data transmission, and back-office statistical analysis functions. In order to meet the needs of the development of power quality supervision, Baoding Guodian Zhongke Electric Co., Ltd. has developed a series of GDDN-500 digital power quality on-line monitoring terminals based on several years of operating experience and experience.
The new digital power quality on-line monitoring device has the functions of collecting power quality parameters according to the national standard, on-line long-time work, high reliability, on-site operation, convenient and practical, and communication with the central station. At the same time, it can also record and store for a long time. Data and easy to read data. The device adopts the same DSP digital signal processor and high-speed multi-channel AD acquisition technology as the latest foreign products. The PC104 IPC is used for data processing and display storage, which has strong functions, easy operation and software upgrade. 
1 Function and Structure
The grid power quality monitoring system consists of a power quality monitoring terminal, a central station, and analysis software. 
1.1 Power Quality Monitoring Terminal
Input three-phase voltage 100V, three-phase current 5A or 1A for data signal processing, using FFT to calculate the amplitude and phase angle of each harmonic voltage and current. Calculate unbalanced voltages and currents, and calculate and display technical data such as three-phase voltage, current, voltage qualification rate, frequency, active power, reactive power, and power factor. Responsible for the data processing, storage and communication with the central station and data transmission, the formation of substation reports.
The main functions of the power quality monitoring terminal are as follows. 
a. The input signal is TV, TA secondary three-phase voltage (100V), three-phase current (5A or 1A).
b. With the public MODEM interface, you can dial and connect to receive data at the central station.
c. Large screen (320×240) backlit LCD graphic display.
d. Chinese graphic (spectrum, waveform, curve, vector) operator interface.
e. The terminal can store data for more than one year and store the data as a set of 3min or 5min packets.
f. With a LAN connection interface, laptops can be used to copy data in the field.
g. Multi-parameter comprehensive measurement, real-time fixed-point alarm, can set parameter value, parameter alarm status.
h. Harmonic voltage, current, negative sequence voltage, current limit alarm relay. 
1.2 The central station and analysis software center station receive processor data through a modem or network for statistical analysis to form files, reports and curves, and display data and graphics (such as spectrograms, waveforms, curves, vector diagrams, etc.) . It can manage multiple power quality monitoring terminals and analyze and process the collected data. It can analyze the power quality of a certain period of time or an event period, form a report, and automatically form daily, monthly and annual reports, automatically. Find the time period and the line with harmonic content exceeding the standard, and calculate the voltage qualification rate and power supply reliability.
The central station is a client-server mode. Data is stored in the database of the server and can be easily called and inquired.
2 Main technical indicators
2.1 Measurement items The device uses (220 ± 15%) Vac or [(220 +10%) ~ (220-15%)] Vdc power supply, and the items that can be measured include: voltage, current, frequency, voltage qualification rate, active power Reactive power, apparent power, power factor, voltage unbalance, current unbalance, harmonic voltage, harmonic current (up to 31/50 or more), harmonic phase, harmonic power, distortion rate Wait. 
2.2 Measurement Accuracy
Voltage measurement: ±0.2%
Current measurement: ±0.2%
Voltage imbalance measurement error: ≤ 0.2%
Current imbalance measurement error: ≤1%
Frequency measurement: 47 to 53 Hz with an accuracy of ±0.01Hz (50Hz)
Signal conversion accuracy: 14bit 
Sampling frequency: 8kHz/channel
3 Power Quality Monitoring Terminal Software/Hardware Components
The hardware of the power quality monitoring terminal consists of TA/TV and signal preprocessing, DSP processor, PC104 IPC, PC104 and DSP parallel communication ISA bus parallel expansion, modem, LCD display (VGA monochrome with backlight), network adapter, power supply, etc. constitute.
Power quality monitoring terminal software consists of DSP software and PC104 software. 
3.1 DSP software
3.1.1 Principles of DSP
The monitoring terminal adopts TI's 320C2XX series of TMS320F240 chips. In consideration of the limited internal memory capacity of the chip, high-speed SRAM and EEPROM are expanded in the DSP part. The final design of the system requires acquisition of 1024 points (six channels in the same acquisition) within each power frequency cycle. It requires a 1024-point 6-radix 2 FFT transformation calculation and is transmitted to the PC104 processing unit. This requires a faster clock frequency. In this device, DSP's internal clock is nearly 40MHz. 
A fast 14-bit high-accuracy AD converter is expanded outside the DSP processing section. The AD converter can perform 6-channel simultaneous sampling, providing guarantees for accurate calculation of active and reactive power and positive/negative sequences. 
3.1.2 DSP Structure and Function
a. Data acquisition part, including frequency sampling and calculation, AD converter 6-channel simultaneous sampling. ""
b. Data processing, transform the collected data format.
c. FFT transform calculation.
d. Data transmission, the DSP data is transmitted to the PC104. 
3.1.3 Input and operation Input three-phase voltage, current, frequency measurement, 1024 or 512 points AD conversion (where AD uses a dual 6-channel high-speed AD converter), after FFT transformation, after calculating the root mean square value, upload the data. If necessary, only 31 or 61 harmonics or higher harmonics are transmitted during data transmission.
Perform FFT calculations, take 31 (or 61) harmonics every 0.5s, calculate the root mean square value every 6s, and the formula is:
Where Uhk is the h-th harmonic rms value measured for the kth time in 3 s. 
3.1.4 Data Transmission Data is uploaded every 3s according to the pulse given by the upper computer every 0.5s. Taking the 31st harmonic as an example, each set of data is as follows.
a. Frequency f.
Each harmonic is divided into a real part and an imaginary part, and the phase of Ua is used as the reference phase.
3.2 Part of PC104
The PC104 industrial control board adopts a PCM-3336 board with high integration. The board has a floppy disk and a hard disk interface. It can directly drive 320×240 LCD monochrome display, 2-way RS232C serial interface, and 1 printer parallel interface. Directly with a keyboard and an ordinary monitor. The board's BIO design can connect up to 15 G hard drives. For ease of use and reliability, hard drives use electronic or laptop hard drives.
The industrial control board has the function of WATCH-DOG. When it is not working properly, it will be automatically reset.
The PC104 board is responsible for data processing, storage and display, communication connection and data transmission between the power quality monitoring terminal and the central station, and forms a substation report. Send 0.5 s pulse to DSP, collect DSP data. 
3.2.1 Software Components of the PC104
a. Calculate and process all kinds of data, including voltage, current, active power, reactive power, positive and negative sequence, voltage unbalance, voltage pass rate, and harmonic content rate. 
b. graphically display on the LCD voltage, current fundamental and various harmonic amplitude, phase angle, voltage, current vector, voltage and current waveforms.
c. Communication transmission functions, including communication with DSP, communication with MODEM and network communication.
d. Parameter input, including voltage-to-current ratio, upper and lower limits of voltage, harmonic limit setting, etc.
3.2.2 Receiving DSP Data The data received from the DSP is temporarily stored. There are frequency, three-phase voltage, three-phase current and corresponding positive and negative zero-sequence components and various harmonic components (real and imaginary parts, total 2 ×3×64 data). 
3.2.3 Calculation of Harmonic and Unbalance Indexes
Harmonic and unbalanced degree indicators are calculated according to GB/T "Power Quality Harmonics in Public Power Networks" and GB/T "Power quality three-phase voltage permissible unbalance", the specific formulas are as follows.
3.2.3.1 Harmonic calculation (calculated once per reading group of data)
a. The hth harmonic voltage content
Where Uh - the hth harmonic voltage (square root value);
U1 - Fundamental voltage (root mean square).
b. The hth harmonic current content
In the formula Ih - the hth harmonic current (root mean square value);
I1 - Fundamental current (square root value).
c. Harmonic voltage content
f. Current total harmonic distortion rate
g. The hth harmonic power, phase
3.2.3.2 Calculation of Maximum Harmonic and Probability Values ​​a. Calculation of Maximum Harmonic Value (All Values ​​and Total Distortion Rate) a.
b. Calculation of the 95% probability value The 95% probability value of the measured values ​​of each phase within the measurement period and the value of the largest one phase are calculated and stored.
3.2.3.3 Harmonic over-limit alarm The measured value is compared with the allowable value to judge whether it exceeds the limit. If it exceeds the limit, an alarm is issued. 
3.2.3.4 Voltage and current unbalance degree Calculate voltage and current unbalance degree (read one set of data every 3s to calculate once), and calculate 95% probability value of unbalanced voltage and current.
a. Take the maximum unbalanced degree b. 95% probability value. Calculate the 95% probability value within the measurement period (statistical period).
3.2.3.5 Unbalanced degree exceeding alarm The measured value is compared with the allowable value to judge whether it exceeds the limit. If it exceeds the limit, an alarm is issued.
3.2.4 Voltage Qualification Rate
3.2.4.1 Calculate voltage (calculate one set of data every 3s)
Calculate the upper limit rate, the lower limit rate, the statistical upper limit accumulation time, and the lower limit accumulation time; calculate the voltage qualification rate; store the record data of the previous month and the current month, the previous day, and the current day; record the maximum, minimum, and average values.
Can set monitoring voltage rating and limits. The statistical time of voltage quality monitoring is in units of min, and the average voltage of 1 min is taken as a statistical unit.
The monitored voltage is displayed in real time with a refresh cycle of 2 seconds.
3.2.4.2 Calculate Voltage Qualification Rate
3.2.5 Frequency
The zero-crossing detection circuit and the DSP capture function are used to accurately measure the width of the entire cycle to calculate the frequency.
3.2.6 Display of Graphic and Chinese Characters Displays voltage/current waveforms, voltage/current vector diagrams, voltage/current fundamental and harmonic amplitudes and phase angles. The amplitudes and phase angles of various harmonics are divided into digital displays and Bar graph plus angle pointer display. 
3.3 ISA Parallel Expansion Unit for PC104 and DSP Communication
To facilitate the communication between the DSP and the PC, the parallel interface with interrupts is extended and the peripheral address and interrupt of the PC104 are occupied. The parallel communication is 8-bit bidirectional communication (interrupt) communication. 
3.4 MODEM and LAN Communication Management
MODEM is connected to RS232C serial interface, and several control lines are extended separately. Real-time monitoring and control of MODEM ensures that MODEM can communicate normally for a long time. 
The extended network card allows LAN network communication. 
4 Conclusions
a. The power quality monitoring terminal can accurately monitor the power supply and power supply status of the power grid in real time, and in particular, it can keep abreast of the over-standard condition of harmonics and master the conditions of asymmetry and voltage pass rate, providing power and power companies with Convenient monitoring equipment. 
b. The power quality monitoring terminal has the characteristics of high sampling frequency, accurate measurement, and fast calculation speed. Its measurement indicators meet the requirements of the national standards for power quality. 
c. The Chinese and graphical display interface of the power quality monitoring terminal make the user more convenient and intuitive to use. 
d. The power quality monitoring terminal adopts DSP and PC104 industrial control board design, with advanced technology and high accuracy. It is convenient for software maintenance and upgrade of DSP and PC104. 
e. The power quality monitoring terminal can form a power quality monitoring network in the regional power grid and the provincial network or the joint power grid. Through a dedicated central station software, a large number of historical data can be statistically analyzed, various statistical reports can be formed, and a harmonic spectrum diagram can be drawn. The distribution map of various indicators provides advanced tools for the supervision of power quality.
The new digital power quality on-line monitoring device has the functions of collecting power quality parameters according to the national standard, on-line long-time work, high reliability, on-site operation, convenient and practical, and communication with the central station. At the same time, it can also record and store for a long time. Data and easy to read data. The device adopts the same DSP digital signal processor and high-speed multi-channel AD acquisition technology as the latest foreign products. The PC104 IPC is used for data processing and display storage, which has strong functions, easy operation and software upgrade. 
1 Function and Structure
The grid power quality monitoring system consists of a power quality monitoring terminal, a central station, and analysis software. 
1.1 Power Quality Monitoring Terminal
Input three-phase voltage 100V, three-phase current 5A or 1A for data signal processing, using FFT to calculate the amplitude and phase angle of each harmonic voltage and current. Calculate unbalanced voltages and currents, and calculate and display technical data such as three-phase voltage, current, voltage qualification rate, frequency, active power, reactive power, and power factor. Responsible for the data processing, storage and communication with the central station and data transmission, the formation of substation reports.
The main functions of the power quality monitoring terminal are as follows. 
a. The input signal is TV, TA secondary three-phase voltage (100V), three-phase current (5A or 1A).
b. With the public MODEM interface, you can dial and connect to receive data at the central station.
c. Large screen (320×240) backlit LCD graphic display.
d. Chinese graphic (spectrum, waveform, curve, vector) operator interface.
e. The terminal can store data for more than one year and store the data as a set of 3min or 5min packets.
f. With a LAN connection interface, laptops can be used to copy data in the field.
g. Multi-parameter comprehensive measurement, real-time fixed-point alarm, can set parameter value, parameter alarm status.
h. Harmonic voltage, current, negative sequence voltage, current limit alarm relay. 
1.2 The central station and analysis software center station receive processor data through a modem or network for statistical analysis to form files, reports and curves, and display data and graphics (such as spectrograms, waveforms, curves, vector diagrams, etc.) . It can manage multiple power quality monitoring terminals and analyze and process the collected data. It can analyze the power quality of a certain period of time or an event period, form a report, and automatically form daily, monthly and annual reports, automatically. Find the time period and the line with harmonic content exceeding the standard, and calculate the voltage qualification rate and power supply reliability.
The central station is a client-server mode. Data is stored in the database of the server and can be easily called and inquired.
2 Main technical indicators
2.1 Measurement items The device uses (220 ± 15%) Vac or [(220 +10%) ~ (220-15%)] Vdc power supply, and the items that can be measured include: voltage, current, frequency, voltage qualification rate, active power Reactive power, apparent power, power factor, voltage unbalance, current unbalance, harmonic voltage, harmonic current (up to 31/50 or more), harmonic phase, harmonic power, distortion rate Wait. 
2.2 Measurement Accuracy
Voltage measurement: ±0.2%
Current measurement: ±0.2%
Voltage imbalance measurement error: ≤ 0.2%
Current imbalance measurement error: ≤1%
Frequency measurement: 47 to 53 Hz with an accuracy of ±0.01Hz (50Hz)
Signal conversion accuracy: 14bit 
Sampling frequency: 8kHz/channel
3 Power Quality Monitoring Terminal Software/Hardware Components
The hardware of the power quality monitoring terminal consists of TA/TV and signal preprocessing, DSP processor, PC104 IPC, PC104 and DSP parallel communication ISA bus parallel expansion, modem, LCD display (VGA monochrome with backlight), network adapter, power supply, etc. constitute.
Power quality monitoring terminal software consists of DSP software and PC104 software. 
3.1 DSP software
3.1.1 Principles of DSP
The monitoring terminal adopts TI's 320C2XX series of TMS320F240 chips. In consideration of the limited internal memory capacity of the chip, high-speed SRAM and EEPROM are expanded in the DSP part. The final design of the system requires acquisition of 1024 points (six channels in the same acquisition) within each power frequency cycle. It requires a 1024-point 6-radix 2 FFT transformation calculation and is transmitted to the PC104 processing unit. This requires a faster clock frequency. In this device, DSP's internal clock is nearly 40MHz. 
A fast 14-bit high-accuracy AD converter is expanded outside the DSP processing section. The AD converter can perform 6-channel simultaneous sampling, providing guarantees for accurate calculation of active and reactive power and positive/negative sequences. 
3.1.2 DSP Structure and Function
a. Data acquisition part, including frequency sampling and calculation, AD converter 6-channel simultaneous sampling. ""
b. Data processing, transform the collected data format.
c. FFT transform calculation.
d. Data transmission, the DSP data is transmitted to the PC104. 
3.1.3 Input and operation Input three-phase voltage, current, frequency measurement, 1024 or 512 points AD conversion (where AD uses a dual 6-channel high-speed AD converter), after FFT transformation, after calculating the root mean square value, upload the data. If necessary, only 31 or 61 harmonics or higher harmonics are transmitted during data transmission.
Perform FFT calculations, take 31 (or 61) harmonics every 0.5s, calculate the root mean square value every 6s, and the formula is:
Where Uhk is the h-th harmonic rms value measured for the kth time in 3 s. 
3.1.4 Data Transmission Data is uploaded every 3s according to the pulse given by the upper computer every 0.5s. Taking the 31st harmonic as an example, each set of data is as follows.
a. Frequency f.
Each harmonic is divided into a real part and an imaginary part, and the phase of Ua is used as the reference phase.
3.2 Part of PC104
The PC104 industrial control board adopts a PCM-3336 board with high integration. The board has a floppy disk and a hard disk interface. It can directly drive 320×240 LCD monochrome display, 2-way RS232C serial interface, and 1 printer parallel interface. Directly with a keyboard and an ordinary monitor. The board's BIO design can connect up to 15 G hard drives. For ease of use and reliability, hard drives use electronic or laptop hard drives.
The industrial control board has the function of WATCH-DOG. When it is not working properly, it will be automatically reset.
The PC104 board is responsible for data processing, storage and display, communication connection and data transmission between the power quality monitoring terminal and the central station, and forms a substation report. Send 0.5 s pulse to DSP, collect DSP data. 
3.2.1 Software Components of the PC104
a. Calculate and process all kinds of data, including voltage, current, active power, reactive power, positive and negative sequence, voltage unbalance, voltage pass rate, and harmonic content rate. 
b. graphically display on the LCD voltage, current fundamental and various harmonic amplitude, phase angle, voltage, current vector, voltage and current waveforms.
c. Communication transmission functions, including communication with DSP, communication with MODEM and network communication.
d. Parameter input, including voltage-to-current ratio, upper and lower limits of voltage, harmonic limit setting, etc.
3.2.2 Receiving DSP Data The data received from the DSP is temporarily stored. There are frequency, three-phase voltage, three-phase current and corresponding positive and negative zero-sequence components and various harmonic components (real and imaginary parts, total 2 ×3×64 data). 
3.2.3 Calculation of Harmonic and Unbalance Indexes
Harmonic and unbalanced degree indicators are calculated according to GB/T "Power Quality Harmonics in Public Power Networks" and GB/T "Power quality three-phase voltage permissible unbalance", the specific formulas are as follows.
3.2.3.1 Harmonic calculation (calculated once per reading group of data)
a. The hth harmonic voltage content
Where Uh - the hth harmonic voltage (square root value);
U1 - Fundamental voltage (root mean square).
b. The hth harmonic current content
In the formula Ih - the hth harmonic current (root mean square value);
I1 - Fundamental current (square root value).
c. Harmonic voltage content
f. Current total harmonic distortion rate
g. The hth harmonic power, phase
3.2.3.2 Calculation of Maximum Harmonic and Probability Values ​​a. Calculation of Maximum Harmonic Value (All Values ​​and Total Distortion Rate) a.
b. Calculation of the 95% probability value The 95% probability value of the measured values ​​of each phase within the measurement period and the value of the largest one phase are calculated and stored.
3.2.3.3 Harmonic over-limit alarm The measured value is compared with the allowable value to judge whether it exceeds the limit. If it exceeds the limit, an alarm is issued. 
3.2.3.4 Voltage and current unbalance degree Calculate voltage and current unbalance degree (read one set of data every 3s to calculate once), and calculate 95% probability value of unbalanced voltage and current.
a. Take the maximum unbalanced degree b. 95% probability value. Calculate the 95% probability value within the measurement period (statistical period).
3.2.3.5 Unbalanced degree exceeding alarm The measured value is compared with the allowable value to judge whether it exceeds the limit. If it exceeds the limit, an alarm is issued.
3.2.4 Voltage Qualification Rate
3.2.4.1 Calculate voltage (calculate one set of data every 3s)
Calculate the upper limit rate, the lower limit rate, the statistical upper limit accumulation time, and the lower limit accumulation time; calculate the voltage qualification rate; store the record data of the previous month and the current month, the previous day, and the current day; record the maximum, minimum, and average values.
Can set monitoring voltage rating and limits. The statistical time of voltage quality monitoring is in units of min, and the average voltage of 1 min is taken as a statistical unit.
The monitored voltage is displayed in real time with a refresh cycle of 2 seconds.
3.2.4.2 Calculate Voltage Qualification Rate
3.2.5 Frequency
The zero-crossing detection circuit and the DSP capture function are used to accurately measure the width of the entire cycle to calculate the frequency.
3.2.6 Display of Graphic and Chinese Characters Displays voltage/current waveforms, voltage/current vector diagrams, voltage/current fundamental and harmonic amplitudes and phase angles. The amplitudes and phase angles of various harmonics are divided into digital displays and Bar graph plus angle pointer display. 
3.3 ISA Parallel Expansion Unit for PC104 and DSP Communication
To facilitate the communication between the DSP and the PC, the parallel interface with interrupts is extended and the peripheral address and interrupt of the PC104 are occupied. The parallel communication is 8-bit bidirectional communication (interrupt) communication. 
3.4 MODEM and LAN Communication Management
MODEM is connected to RS232C serial interface, and several control lines are extended separately. Real-time monitoring and control of MODEM ensures that MODEM can communicate normally for a long time. 
The extended network card allows LAN network communication. 
4 Conclusions
a. The power quality monitoring terminal can accurately monitor the power supply and power supply status of the power grid in real time, and in particular, it can keep abreast of the over-standard condition of harmonics and master the conditions of asymmetry and voltage pass rate, providing power and power companies with Convenient monitoring equipment. 
b. The power quality monitoring terminal has the characteristics of high sampling frequency, accurate measurement, and fast calculation speed. Its measurement indicators meet the requirements of the national standards for power quality. 
c. The Chinese and graphical display interface of the power quality monitoring terminal make the user more convenient and intuitive to use. 
d. The power quality monitoring terminal adopts DSP and PC104 industrial control board design, with advanced technology and high accuracy. It is convenient for software maintenance and upgrade of DSP and PC104. 
e. The power quality monitoring terminal can form a power quality monitoring network in the regional power grid and the provincial network or the joint power grid. Through a dedicated central station software, a large number of historical data can be statistically analyzed, various statistical reports can be formed, and a harmonic spectrum diagram can be drawn. The distribution map of various indicators provides advanced tools for the supervision of power quality.