Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 13, No. 3, 2024 319 Design and Implementation of Partial Discharge Acquisition System Based on FPGA Zixing Yang* College of Mechanical Engineering, Xihua University, Chengdu, Sichuan, China *Corresponding Author: Jixue Xiao Abstract: This paper designs and implements a FPGA-based partial discharge signal acquisition system based on the needs and challenges of partial discharge detection technology. Partial discharge is an early warning signal of insulation failure of power equipment. The real-time and accuracy of detection are crucial to ensure the stability of the smart distribution network. The advantage of ultrasonic detection method is that it has strong anti-electromagnetic interference ability, especially in a strong electromagnetic environment, it can provide stable detection results. The hardware design includes ultrasonic receiving module, signal conditioning circuit, signal acquisition circuit, and control and signal processing circuit. The ultrasonic module uses a 40kHz sensor to receive signals, the conditioning circuit realizes envelope detection through AD8310, and the data acquisition is completed by the high sampling rate 3PA1030 ADC. The control part is based on Xilinx Artix-7 FPGA design, integrating data caching, transmission and clock management functions. The software part adopts a top-down design method to construct signal reception and transmission, module configuration, data acquisition and transmission processes to ensure the functional integrity and data stability of the system. Experimental verification shows that the system can accurately capture and process partial discharge signals, and the test results meet the design expectations, with high reliability and practicality. The successful implementation of this system provides effective technical support for the application and promotion of partial discharge detection technology, and also lays the foundation for real-time monitoring and fault diagnosis of smart distribution network equipment. Keywords: Partial discharge; FPGA; Ultrasonic. 1. Introduction As society continues to progress, the power system is also constantly developing and updating. More and more equipment is being integrated into the power system. In order to cope with the increasing number of equipment, high- voltage switchgear equipment needs to be involved to ensure the safe operation of the power system. At present, the high- voltage switchgear that has been used in the entire system is a very critical equipment in the power system. The safety and reliable operation of the high-voltage switchgear is directly related to the power quality and power supply safety of the entire system. [1]Partial discharge is an early manifestation of insulation failure and an important early warning signal of potential equipment failure. Its detection is crucial to ensure the safe operation of the distribution network. [2] The partial discharge signal is weak and easily interfered by environmental noise, so the detection process has great technical challenges. A series of relevant standards have been issued internationally, such as IEC 60270 (partial discharge measurement standard)[3]and IEC 62478 (partial discharge measurement by electromagnetic and acoustic methods)[4], which clearly stipulate the detection method, equipment requirements and measurement conditions of partial discharge. Ultrasonic detection, as a non-invasive method, can effectively capture the acoustic signal generated by partial discharge. Due to its strong anti-electromagnetic interference ability and high positioning accuracy, it has been widely used in complex power systems.[5] With the diversification of power equipment structures and the complexity of operating environments, higher requirements are placed on the real-time performance and high precision of ultrasonic detection technology. The use of an FPGA-based ultrasonic signal acquisition system can not only meet the demand for high-speed signal processing, but also provide a stable and reliable partial discharge monitoring solution for smart distribution networks. By optimizing hardware design and signal processing algorithms, the sensitivity and anti-interference ability of the system can be significantly improved, providing technical support for the safe operation of smart distribution network equipment. 2. Partial Discharge Generation Mechanism 2.1. Causes of Partial Discharge Partial discharge refers to the discharge phenomenon that occurs in a certain area of the insulation structure of high- voltage electrical equipment. This discharge only destroys the insulation structure in this area, and the main insulation does not undergo a through-breakdown.[6]The main causes of partial discharge are as follows: (1) Structural design defects, such as uneven electric field distribution, which may lead to local electric field concentration and exceed the tolerance of the insulation material; (2) Processing defects, such as failure to strictly control process parameters during the manufacturing process, which may lead to uneven insulation layer thickness and uneven interface; (3) Insulation material defects, such as air gaps inside the insulation material due to manufacturing process or aging, or conductive impurities mixed into the insulation material. 320 Figure 1. High-voltage switchgear 2.2. Partial Discharge Type Partial discharge (PD) can be divided into the following three categories according to the location of the PD in the internal insulation structure and the type of damage[7]. 2.2.1. Internal Discharge When there are insulation defects inside electrical equipment, the field strength at local locations will be distorted. When the externally applied voltage causes the electric field strength in these local areas to exceed the breakdown field strength of the air gap or crack, local discharge will occur in the insulating material. This phenomenon is called internal discharge. It is an ionization phenomenon that occurs between the insulating medium and the electrode, or in the air gap or crack inside the insulating material. The main reason for internal discharge is the existence of defects in the insulating material, such as bubbles and impurities caused by imperfect processes during the manufacturing process, or cracks and aging caused by long- term operation of the equipment. The gas in the bubble has a lower breakdown field strength than that of solid insulating materials, so it is more likely to discharge when the electric field is concentrated. Impurities may cause local conductivity to increase, further exacerbating the electric field distortion. In addition, the long-term combined effects of electric fields, electrothermal stresses and environmental humidity on the material will lead to degradation of insulation performance and increase the possibility of discharge. Figure 2. Internal discharge diagram 2.2.2. Surface Discharge When the operating environment of electrical equipment is harsh, the insulation surface may be contaminated or absorb moisture, which greatly reduces the insulation performance. When the local electric field strength on the surface reaches the breakdown condition, the local discharge along the surface of the insulating material is called surface discharge. Surface discharge is a discharge phenomenon that occurs on the surface of the insulating medium and is formed by discharge creeping. It is manifested as the gradual expansion of local sparks and may form conductive traces. On the surface of the insulating bushing of the high-voltage switchgear, a large amount of salt and dust may accumulate due to long-term exposure to the industrial environment. When the humidity is high, these pollutants form a conductive film with moisture, and the discharge may develop from local sparks to surface flashovers, seriously affecting the safe operation of the equipment. Figure 3. Schematic diagram of surface discharge 2.2.3. Corona Discharge When the electric field is concentrated on the tip or sharpened area of the conductor surface, the electric field strength in the surrounding air may exceed its breakdown field strength, thereby inducing gas ionization. This discharge phenomenon occurring in a local area on the conductor surface is called corona discharge. Corona discharge is usually accompanied by a purple-blue glow, a hissing sound, and an ozone smell, and is a typical gas discharge phenomenon. In ultra-high voltage transmission lines, the surface of the conductor may produce sharp points due to wear or corrosion. When the voltage rises to a certain value, these areas will produce corona discharge. Corona not only wastes transmission energy, but also generates high-frequency noise, interfering with the normal operation of surrounding electronic equipment. Figure 4. Corona discharge diagram 2.3. Partial Discharge Detection Methods According to the different signal characteristics and 321 detection methods, partial discharge detection methods are mainly divided into the following categories: 2.3.1. High Frequency Current Detection Method When partial discharge occurs inside the equipment, the discharge will form a high-frequency current signal inside the equipment, which will be transmitted to the outside through the equipment grounding system. The high-frequency current method captures these high-frequency signals by installing a high-frequency current transformer (HFCT) at the equipment grounding end. The transformer converts the detected high- frequency current pulse into a voltage signal and sends it to the subsequent signal processing equipment for analysis.[8] The advantages of the high-frequency current method are high sensitivity and strong anti-interference ability, which is particularly suitable for online monitoring and long-term operation of equipment. However, since the signal needs to be transmitted through the equipment grounding system, the discharge signal is easily affected by external electromagnetic interference. In order to improve the accuracy of detection, it is usually necessary to process the signal with a bandpass filter, shielding measures and advanced signal processing algorithms. Figure 5. High-frequency current transformer 2.3.2. Ultrasonic Detection Method When a partial discharge occurs, the dielectric breakdown and vibration caused by the discharge will generate ultrasonic waves inside the device. These ultrasonic waves propagate through the device in the form of mechanical waves. Ultrasonic sensors can capture these waveform signals. Commonly used ultrasonic sensors include contact and non- contact sensors: contact sensors are directly attached to the surface of the device and have higher sensitivity; non-contact sensors use air-coupled signals and are suitable for scenarios where direct contact with the device cannot be achieved. [9] The distinctive feature of the ultrasonic detection method is its strong ability to resist electromagnetic interference, especially in strong electromagnetic environments, which can provide stable detection results. In addition, this method can detect the discharge signal at the internal location of the device, helping to accurately locate the discharge source. However, the sensitivity and resolution of ultrasonic detection are limited by the material, structure and sensor arrangement of the equipment. Therefore, in practical applications, it is necessary to optimize the sensor arrangement based on the characteristics of the equipment. Figure 6. Ultrasonic partial discharge detector 2.3.3. UHF Detection Method The UHF detection method is a local discharge detection technology based on electromagnetic wave signals. Its basic principle is that electromagnetic wave signals in the ultra-high frequency (UHF, 300MHz-3GHz) range are radiated during the local discharge process. These signals propagate inside the equipment and are captured by antennas or UHF sensors. The detection device usually includes a broadband antenna for receiving UHF signals and sending the signals to a spectrum analyzer or signal processing system for analysis. The UHF detection method can be used to analyze the characteristics of the discharge signal, locate the discharge source, and even evaluate the discharge intensity.[10] Due to the fast propagation speed of UHF signals and the low interference from environmental noise, this method is particularly suitable for online monitoring and large-scale rapid detection. At the same time, the UHF detection method can also be combined with a multi-antenna array to achieve accurate positioning of the discharge source. However, this method requires dedicated detection equipment and advanced signal processing technology, and has high application costs and operation requirements. In addition, for discharge sources buried deep in complex equipment structures, UHF signals may be difficult to detect due to excessive attenuation. Figure 7. UHF detector 322 2.3.4. Optical Detection Method During partial discharge, ultraviolet light, visible light, and even infrared light are generated due to dielectric breakdown or ionization. Optical detection captures these light signals through highly sensitive photodetectors or ultraviolet cameras to identify the discharge location and characteristics. This method is particularly suitable for detecting externally visible discharge phenomena, such as corona discharge in high- voltage transmission lines or surface discharge on the surface of switchgear. The advantage of optical detection is that it can intuitively record the discharge process and generate clear images or videos, providing a direct basis for on-site fault diagnosis. Ultraviolet imaging technology can be used in strong light environments and is particularly suitable for outdoor equipment detection. However, optical detection methods are highly dependent on ambient light and weather conditions, such as being interfered by strong sunlight or bad weather. In addition, this method cannot effectively detect discharge signals inside the equipment, so it is usually necessary to combine other detection methods for comprehensive analysis.[11] Figure 8. Optical detector 3. Hardware Design of Partial Discharge Acquisition System The hardware design mainly includes the following modules: ultrasonic receiving module, signal conditioning circuit, signal acquisition circuit, control and signal processing circuit. 3.1. Ultrasonic Receiving Module When designing an ultrasonic receiving module, the selection of ultrasonic sensors is crucial. Ultrasonic sensors are the core components for signal reception, and their performance directly affects the sensitivity and accuracy of the receiving module. Since the frequency of ultrasonic signals generated by partial discharge is mostly concentrated around 40kHz, the ultrasonic sensor selects the CUSA-R75- 18-2400-TH receiving sensor produced by Same Sky. The center frequency range of this sensor is 38~40kHz, and the detection distance is 0.2~18m, which meets the design requirements. Figure 9. Ultrasonic sensor 3.2. Signal Conditioning Circuit In the process of receiving ultrasonic signals, the received signal is usually an amplitude modulated signal (AM signal) in the form of a high-frequency carrier, which contains the envelope of the target information. Directly processing high- frequency signals not only places high requirements on subsequent circuits, but also increases the complexity of the system. Through detection, the envelope information of the signal can be extracted and the high-frequency signal can be converted into a low-frequency baseband signal, thereby greatly reducing the difficulty of signal processing and improving the readability and analysis efficiency of the signal. In addition, detection can also enhance the anti-noise performance of the system and make the target information more prominent. The AD8310 produced by ADI is a high-performance logarithmic detector suitable for envelope detection of broadband signals. The operating frequency range of AD8310 (DC to 440MHz) can meet the processing requirements of common signal frequencies (such as 40kHz) of ultrasonic receiving modules. Its logarithmic detection range is as wide as 95dB, which can effectively process input signals with a large dynamic range. In addition, the output voltage of AD8310 is linearly logarithmically related to the input signal power, which is convenient for subsequent signal processing and quantitative analysis, and helps to achieve high-precision detection. A passive bandpass filter is added to the output of AD8310 to filter out interference and DC components in the signal. As a logarithmic detector, AD8310 can effectively extract the envelope information of the signal, but its output signal level is usually low and the bandwidth is wide. Directly passing it to the subsequent processing unit may not be enough to drive the circuit with high input impedance or high gain requirements, so further signal processing and amplification are required. TP2311 is a high-performance operational amplifier that can provide high-gain amplification. In addition, it has the characteristics of low noise and high bandwidth. By amplifying the back-end output of AD8310 with TP2311, it can ensure that the subsequent signal acquisition circuit can obtain sufficient dynamic range and improve the availability of the signal. 323 Figure 10. Signal conditioning circuit 3.3. Signal Acquisition Circuit In modern electronic systems, signal acquisition is an important part of converting analog signals into digital signal processing. Through signal acquisition, high-precision digitization of physical signals can be achieved, which is convenient for subsequent data storage, analysis and processing. ADC (Analog-to-Digital Converter) is the core component of the signal acquisition circuit, and its function is to digitize analog signals at a certain sampling rate and resolution. A high-performance ADC needs to meet both high sampling rate and high resolution to ensure that the integrity and details of the signal are not lost. Specific indicators include: sampling rate, resolution and linearity. In this design, the 3PA1030 chip is selected as the ADC chip in the signal acquisition circuit. Its features are as follows: High sampling rate: 3PA1030 supports a sampling rate of up to 50MSPS (50 million samples per second), which can meet the high-speed signal acquisition requirements of ultrasonic detection and other scenarios. High resolution: The chip has a 10-bit resolution and can provide sufficient quantization accuracy to capture small changes in the signal. Synchronous sampling capability: Supports multi-channel synchronous sampling, which is convenient for high- precision data synchronization in multi-channel ultrasonic detection. Friendly interface: 3PA1030 provides a standard digital output interface, which is easy to connect with FPGA and simplifies circuit design. Figure 11. Signal acquisition circuit 3.4. Control and Signal Processing Circuits In signal acquisition and processing, the central processing unit (CPU) is the core component of the system, responsible for controlling the signal acquisition process, executing complex algorithm processing, and realizing data storage and communication. The performance of the central processing unit directly determines the real-time performance, computing power and scalability of the system. XC7A35T is a cost-effective FPGA chip in the Xilinx Artix-7 series, based on a 28nm process, with high performance and low power consumption. It contains more than 33,000 logic units, 1800Kb of on-chip Block RAM, 90 DSP slices and 4 clock management units, supports high- speed serial transmission up to 6.6Gbps, integrates rich IO resources and configurable interfaces, and is suitable for a variety of real-time signal processing, high-speed data acquisition and industrial control scenarios. At the same time, it provides a powerful development tool chain (Vivado Design Suite), supports flexible hardware acceleration and 324 parallel processing capabilities, so that it achieves a good balance in performance, power consumption and cost, and is an ideal choice for small and medium-sized FPGA designs. 4. Software Design of Partial Discharge Acquisition System The partial discharge signal acquisition process is as follows: Figure 12. Partial discharge signal acquisition process According to the partial discharge high-speed acquisition process, a top-down design method is used to divide the process into: signal transceiver module, configuration module, ultrasonic acquisition module and clock tree. 4.1. Signal Transceiver Module In embedded systems, UART (Universal Asynchronous Receiver/Transmitter) is a widely used serial communication protocol. It is suitable for point-to-point data transmission with simple hardware and low-overhead communication. The UART communication frame structure contains start bit, data bit, check bit (optional) and stop bit, and the module needs to support configurable frame format. The UART top-level module mainly implements two sub- modules of data sending and receiving. UART communication is shown in the figure below: Figure 13. UART module The baud rate determines the timing of the UART module's sending and receiving data bits. A baud rate of 115200bps means that 115200 bits are sent or received per second, so the time period of each bit is: 1/115200=8.68us, and the period of the 25MHz main clock is 40ns, so it is necessary to divide the frequency to generate the baud rate clock. The division factor N is: 8.68us/40ns=217. Therefore, an 8-bit counter is used, and a baud rate clock pulse is generated when the count reaches 217, and the counter is cleared and counted again. 4.2. Configuration Module As mentioned in 2.3, this design uses the 3PA1030 325 produced by 3PEAK for high-speed ADC. 3PA1030 is an ADC conversion chip with a resolution of 10 bits and a sampling rate of up to 50MHz. By configuring the three pins CLK, OE, and STBY of the chip, the ADC can be used for acquisition and synchronous parallel output of 10-bit data. According to the manual, the CLK pin is the clock input of the ADC chip, which supports a maximum clock input of 50MHz; the OE pin is the enable signal, which is in high impedance when input high level, and the chip works normally when the level is low; the STBY pin is in power-off mode when input high level, and the chip works normally when the level is low. Therefore, FPGA is used to provide a 50MHz clock with a duty cycle of 50% to the ADC chip, and the ADC can work normally when the OE and STBY pins are pulled low. Figure 14. ADC configuration module 4.3. Ultrasound Acquisition Module FIFO (First In First Out) is a commonly used IP core in FPGA, mainly used in scenarios such as data caching, interface modules, data conversion and protocol processing. The basic principle of FIFO is first in first out, that is, the data written first is read out first. It plays the role of buffering data in FPGA to solve the problem of inconsistent data processing speed between modules. At the same time, FIFO can also match data width to solve the problem of inconsistent data bit width and ensure that data can be transmitted to the communication protocol end without error. After the ultrasonic signal generated by the discharge source is processed and collected, the collected data is cached in FIFO, and then the UART module reads the data in the FIFO and uploads it to the host computer. For this, a FIFO control module is required to realize the writing and reading of data. Figure 15. FIFO control module 4.4. Clock Tree The crystal oscillator provides a 50MHz clock to the FPGA, and after entering the FPGA, the FPGA's clock management unit (PLL) is used for frequency division and frequency multiplication. At the same time, although the external crystal oscillator provides a basic 50 MHz clock signal, there may be signal quality and stability problems when it is directly used as the clock of other modules. PLL can further adjust the original clock signal, improve the quality of the clock signal, and reduce the effects of jitter, noise, etc., so as to ensure that the clock signal of other modules is more stable and accurate. In addition, PLL can also shape the clock signal (such as reducing noise or jitter in the clock signal), thereby improving the quality and reliability of the clock. Especially in the application of high-frequency clocks, PLL can effectively reduce the system instability caused by clock noise. Among them, clk_in1 is the external input 50MHz clock, and clk_out1 is the 50MHz clock stabilized by PLL, which is used to provide the ADC chip sampling clock. The 25MHz clock is the clock of the UART module. Data transmission between different clock domains is completed using asynchronous FIFO. Data is read and written at two different clock frequencies, which effectively isolates different clock domains, avoids timing problems when data is transmitted in different clock domains, and improves data stability and reliability. 326 Figure 16. Clock configuration module 4.5. Logic Code Synthesis The above modules are instantiated as top-level modules, and Vivado is used to synthesize, implement, and generate bitstreams, and finally obtain the logic synthesis netlist. Figure 17. Logic synthesis netlist 5. Partial Discharge Acquisition System Experiment 5.1. Ultrasonic Receiving Module Testing Use a discharge gun to discharge the ultrasonic sensor, and use an oscilloscope to capture the signal as shown in Figure 4.1. The oscilloscope shows that the ultrasonic center frequency is 40KHz, and the ultrasonic sensor is working normally. 327 Figure 18. Ultrasonic sensor output waveform 5.2. Signal Conditioning Circuit Testing Connect the ultrasonic sensor to the SMA female connector of the circuit module and use an oscilloscope to capture the output of the circuit module. The test results are shown in the figure below. The module works normally. Figure 19. Output waveform of the signal conditioning circuit 5.3. Signal Acquisition Circuit Testing Use a signal generator to input a sine wave into the input end of the ADC module, and use Vivado's built-in ila to capture the waveform. The test results are shown in the figure below. The module works normally. 328 Figure 20. ADC acquisition waveform 5.4. Signal Transceiver Module Testing When testing UART, send the received data to the host computer to complete the UART data loopback. Select COM3 as the port, 115200 as the baud rate, and 8 as the data bit. Check the results in the receiving area. The sent data is consistent with the received data, and the UART transmission is stable. Figure 21. UART data loopback 5.5. Overall Testing The partial discharge signal acquisition test was carried out using a 10kV high-voltage switchgear. The test environment and test results are as follows. The acquisition system can work normally. 329 Figure 22. Overall test environment The test shows that the design is feasible and reliable and meets the design requirements. References [1] Yuan Gang. Research on partial discharge detection method of high-voltage switchgear based on ultrasonic wave [D]. Shenyang Agricultural University, 2022. DOI:10.27327/d.cnki.gshnu.2022.000137. [2] Lin Fuhai. Research and application of partial discharge detection of switchgear and GIS equipment based on ultrasonic and UHF technology[D]. North China Electric Power University, 2018. [3] Standard I E C. High-voltage test techniques: partial discharge measurements[J]. IEC-60270, 2000: 13-31. [4] Wang Y, Gong J, Ye J, et al. Laboratory Calibration of HFCT Partial Discharge Detection Systems[C]//2021 IEEE 4th International Electrical and Energy Conference (CIEEC). IEEE, 2021: 1-4. [5] Li Dajian, Liang Jizhong, Bu Kewei, et al. Ultrasonic detection of partial discharge of typical defects in GIS[J]. High Voltage Apparatus, 2009, 45(1): 72-75. [6] Cai Junyi. Research on ultrasonic positioning method of partial discharge source in transformer[D]. Southwest Jiaotong University, 2021. DOI: 10.27414/d.cnki.gxnju.2021.003237. [7] Wei Yongjin. Research on partial discharge positioning method of high-voltage switchgear based on ultrasonic waves [D]. Shenyang Agricultural University, 2023.DOI:10.27327/d.cnki.gshnu.2023.000453. [8] Yu Yungang. Research and application of ultrasonic and ultra- high frequency methods in GIS partial discharge detection[D]. North China Electric Power University, 2015. [9] Ilkhechi H D, Samimi M H. Applications of the acoustic method in partial discharge measurement: A review[J]. IEEE Transactions on Dielectrics and Electrical Insulation, 2021, 28(1): 42-51. [10] Tenbohlen S, Denissov D, Hoek S M, et al. Partial discharge measurement in the ultra high frequency (UHF) range[J]. IEEE Transactions on Dielectrics and Electrical Insulation, 2008, 15(6): 1544-1552. [11] Han X, Li J, Zhang L, et al. A novel PD detection technique for use in GIS based on a combination of UHF and optical sensors[J]. IEEE Transactions on Instrumentation and Measurement, 2018, 68(8): 2890-2897.