Introduction
Fault recorder is an important automatic device to improve the safe operation of power system. When the power system fails or oscillates, it can automatically record the changes of various electrical quantities within a certain time before and after the fault point. The fault recorder designed in the reference adopts the method of combining virtual software with data acquisition card. Its disadvantage is that it must rely on computer for calculation and analysis, which makes the equipment inconvenient to move,
and the price of data acquisition card is relatively high, which makes the product application have certain limitations. The reference design is a fault recorder based on the combination of DSP and A/D converter. The A/D converter used cannot synchronously convert 6-channel signals, and there is a certain delay between the measured results. In view of the above shortcomings, the method of combining DSP and AD7656 is now adopted. The waveform and data are displayed by an external LCD, so that it can be used as a handheld device, and it can also be connected to a computer to display in real time on the computer through LabWindows/CVI software. The 6-channel synchronous sampling characteristics of the AD7656 used overcome the disadvantage of delay between measurement results and improve the measurement accuracy.
1 Operation principle and related algorithms
Combining various performance indicators proposed previously, the fault recorder adopts a design method combining hardware and software. The high-speed data acquisition device uses DSP-TMS320F28335 as the core, uses TBC-LXH dual-loop series closed-loop Hall current sensor and CHV-25P Hall voltage sensor to collect signals, and uses high-performance AD7656 to complete the A/D conversion of the signal, uses LCD for waveform display and uses LabWindows/CVI software for control. The addition of LCD to this device is mainly considered to be able to display voltage and current waveforms without a computer, which is convenient for operation.
This device consists of three parts: detection part, calculation part, and host computer control part. The system block diagram is shown in Figure 1. The system operation is as follows: First, the voltage and current of the power grid are filtered out by filters to remove high-frequency interference and low-frequency drift signals. Then, the voltage and current sensors of the detection part detect the basic parameters of the power grid such as three-phase voltage and current in real time, and the measured 6-channel analog quantity is transmitted to AD7656; TMS320F28335 controls AD7656 to convert the 6-channel analog quantity into digital quantity, and DSP uses FFT algorithm to analyze the digital quantity of voltage and current, extracts the fundamental wave and each harmonic component, and calculates the active power, reactive power and THD value, and then transmits it to C8051F005 microcontroller and terminal computer; the keyboard connected to the microcontroller controls LCD to display waveforms, and the computer uses LabWindows/CVI software to display, store and print waveform data.
This harmonic analysis method adopts fast Fourier transform (FFT). Its implementation method in DSP uses the library function that creates FFT for calculation. The specific implementation method is introduced in detail in the software part.
2 System Hardware Design
The core of this device uses TMS320F28335 and AD7656 devices. The collected signals can communicate with the computer through the RS-485 serial port after DSP operation.
2.1 TMS320F28335 and peripheral circuits
2.1.1 Reset circuit design
The reset circuit of TMS320F28335 uses a power-on reset circuit, and the power supply device gives a reset signal. Once the power is turned on, the system is in a reset state. When XRS is low, the DSP is reset. In order to initialize the DSP correctly, XRS should be kept at a low level and maintained for at least 3 CLKOUT cycles. At the same time, after power-on, the crystal oscillator of the system generally requires a stabilization period of 100 to 200 ms. Once the selected power supply device TPS73HD301 is powered on, its output voltage closely follows the input voltage. When the output voltage reaches the minimum voltage to start RESET (1.5 V at 25°C), the pin RESET outputs a low level and maintains it for at least 200 ms, thus meeting the reset requirement.
2.1.2 Clock circuit design
There are generally two ways to provide clock to DSP: one is to use the crystal oscillator circuit provided inside the DSP, that is, to connect a crystal between the X1 and X2 pins of the DSP to start the internal oscillator; the other method is to directly input the external clock source into the X2/CLKIN pin, leaving X1 floating, and using a packaged crystal oscillator. Considering the resource utilization and simplicity of circuit design, the clock circuit of this minimum application system uses the internal crystal oscillator of TMS320F28335. The specific circuit is shown in Figure 2. The operating frequency of the external crystal oscillator is 30 MHz. TMS320F28335 has a programmable phase-locked loop inside, which the user can program according to the required system clock frequency.
2.1.3 Power supply circuit design
The power supply requirement of DSP is to supply power to its core and I/O separately. The power supply device TPS73HD301 is used to power DSP. The core power supply voltage is 1.9 V and the I/O port power supply voltage is 3.3 V. [page]
In the power supply design of AD7656, AVcc and DVcc are the analog voltage input and digital voltage input of AD7656. As a 6-channel independent synchronous sampling data converter, AD7656 requires sufficient power during the conversion process, so the decoupling of AVcc is very important in the design. In the actual circuit design, +15 V (or +12 V) voltage can be provided to the Vdd and Vss power input terminals separately, and +5 V can be provided to the AVcc analog voltage terminal at the same time. Connect AVcc to DVcc through a filter (small resistor or magnetic bead). Then supply the system with +5 V power through the filter.
The RANGE of AD7656 is grounded, and the input voltage range is 4 times the reference voltage. The H/S pin and SER/PAR are both grounded to start the hardware control conversion input mode, and the sampling is controlled by the CONVSTA/B/C pin. Among them, REFCAP_A, REFCAP_B and REFCAP_C are all grounded to control the input to be converted in pairs.
2.3 Overall hardware design of the system
2.3.1 Connection between AD7656 and the detection part
The sensors of the detection part use TBC~LxH dual-loop series closed-loop Hall current sensor and CHV-25P Hall voltage sensor. The rated measurement range of the current sensor is 0~150 A, the response time is less than 20μs, and the temperature drift is small; the voltage sensor measurement range is 0~500 V, the response time is less than 10μs, and the linearity is good. Because the input voltage and current have high-order harmonics and noise signals, a pre-filter device is required for anti-aliasing filtering. In addition, in order to meet the 16-bit accuracy requirements of AD7656, the front end should use a high-precision operational amplifier that can handle 10 V bipolar signals for signal processing and filtering. This operational amplifier uses AD8022, as shown in Figure 3. INl is the input end of the initial analog signal, which is transmitted to AD7656 after passing through AD8022. The three-phase voltage and current are connected in the same way.
2.3.2 DSP and AD7656
The connection between AD7656 and DSP is shown in Figure 4. ADCINA and ADCINB of DSP are multiplexed as I/O ports, connected to D0~D15 data ports of AD7656 for data transmission. GPIOB59 of DSP is connected to BUSY of AD7656 to detect whether AD7656 is in conversion state. GPIOB60 of DSP is connected to CONVST of AD7656, and GPIOB62 is connected to chip select port of AD7656 to control the start and stop of AD7656. GPIOB61 is connected to read and write port of AD7656 to control the reading of converted data of AD7656. GPIOB63 is connected to RST port of AD7656 to control the reset of AD7656. ISSl61LV6416 is an off-chip random access memory.
2.3.3 Connection between DSP, MCU and computer
DSP's SCIB communicates with computer via serial port. Because: RS-232 has weak anti-interference ability, RS-485 is selected as the communication serial port, and then converted to a level suitable for the computer through a conversion chip. DSP's SCIC serial port is connected to F005 MCU PO. 0 and PO. 1 ports. Its transmission baud rate is set to 9600 b/s.
2.3.4 Connection between DSP and external memory
The extended data memory uses SST25VF040 from SST. SST25VF040 is a serial flash memory with SPI interface of the company. It is a low-power Flash with a storage capacity of 4 MB and works at a voltage of 2.7 to 3.6 V, so it can be directly connected to DSP. Its connection diagram is shown in Figure 5. The receiving and transmitting ends of the SPIA port of DSP are connected to its SI and SO ports for data transmission. GIPIO26 and GIP1027 are used to control the chip selection and reading and writing of the memory respectively.
2.3.5 Connection between C8051F005, LOD and keyboard
In order to make the fault recorder convenient for mobile use, the method of connecting the F005 single-chip microcomputer of Xinhualong Company to LCD and keyboard for control is adopted. The operation of the fault recorder can be controlled by an external keyboard without a computer. P1.0~P1.7 of F005 is connected to the 8 keys K1~K8 of the external keyboard, which can control the display of 6 kinds of waveforms, set the upper and lower limits of fault records, etc. The LCD uses 240128 E model liquid crystal, P2.0~P2.7 of F005 is connected to DBO~DB7 of LCD for data transmission, and P3.0 and P3.1 are connected to the read-write port of LCD.
3 System software design
The software design includes LabWindows/CVI software program and DSP control A/D conversion program, as well as the program for extracting the fundamental component and each harmonic component using FFT transformation.
3.1 Overall process
The following is a flowchart to explain the software design. As shown in Figure 6, the serial port setting is completed by setting the serial port of the control interface, and the system starts running after the setting is successful.
[page]
As shown in Figure 7, there is a button for selecting the time of automatic fault recording on the interface. If 2s is set, the waveform of 4s before and after the fault will be stored. The waveform selection button can be used to select the waveform to be displayed. If the A-phase current is selected, its waveform and harmonic data can be displayed (if the computer is not connected, the relevant values can be set by an external keyboard). When the DSP starts running, the system is initialized, the sensor starts to detect the voltage and current, and the detected analog signal is converted into a 16-bit digital signal by A/D. The DSP performs FFT operation to analyze the harmonic components and calculate the THD value. The calculated maximum value of the fundamental wave is compared with the set standard value. When it is greater than or less than the set value, the alarm device is triggered. After that, the measured data is transmitted to the control interface and single-chip microcomputer of the computer through the serial port. The control interface displays the measured waveform and data, and the fault waveform and data can be saved. The single-chip microcomputer controls the LCD for display. The experimental result in Figure 7 is the A-phase current waveform, which displays the fundamental wave and harmonic values of the A-phase current, and calculates the THD value.
3.2 LabWindows/CVI Partial Program
When the system is running, first configure the serial port, send the current or voltage of a certain phase to be displayed to the serial port, and the DSP will transmit it to the computer according to the instruction requirements. The software interface will display the waveform and its effective value, and can store and print according to the situation. The following functions:
3.3 Implementation of FFT transformation and calculation of THD value
DSP can perform floating-point operations, and its calibration can realize accurate calculation of values. Calibration simply means converting a decimal into an integer and then performing the operation, which reduces the calculation error. For example, a decimal is 1.123 456 789, and there can be several decimal places after it. If calculated directly, part of the value after the decimal point will be discarded in the operation, which will increase the error. If calibration operation is used, 1.123 456 789 can be converted into an integer 1.123 456 789×225 (select Q25 calibration) and then perform the operation, which will make the calculation result error smaller than before. This is a major advantage of DSP operation, and its operation speed is fast. When using FFT operation, the sampling harmonic frequency can reach as many as 31 times.
DSP initialization program:
The command signal of a certain phase voltage or current to be displayed can be sent through the control interface, or the signal waveform to be displayed can be sent through the keyboard. DSP triggers A/D conversion by judging the received interrupt flag and command signal. The interrupt command is as follows:
Previous article:Characteristic Analysis of Wireless Spectrum Analyzer
Next article:Fading performance testing of receivers in mobile devices
Recommended ReadingLatest update time:2024-11-16 17:52
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【CH579M-R1】3. ADC internal temperature measurement, external channel and touch button test
- How to migrate from GCC Linker to SEGGER Linker in Embedded Studio?
- Based on PSOC6 development board simulation I2C solution X-NUCLEO-IKS01A3 LPS22HH
- 【CH579M-R1】+OTA first experience
- Xunwei i.MX6ULL Terminator to view the real-time value of variables
- Simple 6LoWPAN Mesh Data Collector
- I created a project with stm32cubemx and then used the module generated by keil RTE, but the code generated by RTE is repeated. How can I disable the duplication?
- 【ESP32-C3-DevKitM-1】LED PWM for ESP32-C3
- Questions about LM317 circuit
- The most complete circuit testing process