0 Introduction
In order to monitor a large number of loads online, many companies have developed distribution integrated measurement and control instruments based on single-chip microcomputer technology to comprehensively monitor the load operating parameters, capacitor switching, and power collection of distribution transformers or distribution lines . However, due to the complexity of the power supply system load, especially the large-scale use of nonlinear loads by users, enterprises pay more and more attention to power quality issues such as harmonics. Therefore, the requirements for distribution integrated measurement and control instruments have also increased, and it is generally required to add harmonics, frequency monitoring, and communication networking functions. In order to solve these problems, this paper takes the ARM7 chip LPC2220FBD144 of PHILIPS as the core and develops a new generation of distribution integrated measurement and control instruments .
1Hardware circuit design
1.1 Overall structure of hardware circuit
The hardware structure block diagram of this device is shown in Figure 1. It is mainly composed of data acquisition, operation processing, data storage, keyboard display, communication interface and other units. The operation processing unit is the core part, which is used to realize data signal processing, fast Fourier transform (FFT) and other functions. Considering the operation speed, accuracy, hardware resources and other requirements of the power distribution comprehensive measurement and control instrument , this design selects the LPC2220FBD144 ARM7 chip of PHILIPS.
The LPC2220FBD144 chip is a cost-effective ARM7 chip in the LPC2200 series. It uses an LQFP package with 36 pins on each of the four sides. The chip has an improved von Neumann structure (instructions and data share a 32-bit bus) and a three-stage pipeline. It can perform several operations at the same time and enable the external processing and memory systems to operate continuously. The chip has built-in high-speed flash memory up to 256KB , 64KB static RAM, 32-bit arithmetic logic unit, 32-bit accumulator, 64-bit multiplier and reduced instruction set, and its shortest instruction cycle can reach 17ns. These features make its operation very flexible, with strong processing power and fast speed. Since its application program can be solidified inside the CPU, it can not only reduce costs and size, but also facilitate system upgrades. In addition, it has low power consumption and flexible resource configuration, making it very suitable for data collection and processing at production sites. 1.2 Data acquisition circuit
The data acquisition circuit in this system consists of three parts: PT and CT, signal arrangement and A/D conversion. After the real-time current and voltage pass through the PT, CT and signal arrangement circuit, they can be converted into 0-3.3 V analog signals, and then the analog conversion circuit completes the digital processing. The hardware circuit of the data acquisition part is shown in Figure 2 (one of the 6 acquisition circuits, Ua).
According to the requirements of measuring harmonics and other parameters and digital anti-frequency aliasing, this device samples the signal waveform at 128 points per cycle, and the sampling period is 156μs. The A/D inside ARM7 is an 8-input 10-bit successive analog-to-digital converter. Since it can synchronously sample current and voltage with high accuracy, this design does not use other peripheral A/D chips.
1.3 Memory and clock circuit
The memory is mainly composed of Samsung's NAND FLASH memory chips. NAND FLASH is a non-volatile flash memory chip with a capacity of 16 MB , which can be used to store collected data and historical data that has been uploaded.
The clock uses the PCF8563 chip from PHILIPS. This chip has a low-power CMOS real-time clock/calendar, simple peripheral interface, high accuracy and reliability, and stable operation. The maximum bus speed of the chip is 400 kbits/s. After each reading and writing of data, its embedded word address register will automatically generate an increment. PCF8563 has 16 8-bit registers, an address register that can automatically increment, a built-in 32.768 kHz oscillator (with an internal integrated capacitor), a frequency divider (used to provide a source clock for the real-time clock RTC), a programmable clock output, a timer, an alarm, a power failure detector, and a 400 kHz I2C bus interface. It also has the functions of counting seconds, minutes, hours, weeks, days, months, years, and leap year compensation. It can use binary digits and BCD codes to represent time, calendar, and alarm. After installing a lithium battery, the data can be kept intact for ten years in the event of a power outage, and the function can fully meet the needs of this device.
1.4 Communication Circuit
This product uses two communication circuits, one for RS-485 bus interface and the other for RS-232 bus interface. The bus transceiver of RS-485 bus interface uses SP3485. SP3485 is a 3.3 V low-power half-duplex transceiver. It fully meets the requirements of RS-485 serial protocol and conforms to the electrical specifications of RS-485. The data transmission rate can reach 10 Mbps (with load). Since the IO port line occupied by RS-485 bus is multiplexed with the port line of UART0, the communication of UART0 interface must be stopped when RS485 bus communication is performed. The direction of RS485 communication is controlled by P2.16. When P2.16 is low, the core board receives bus data; when P2.16 is high, the core board sends data to the bus. The circuit diagram is shown in Figure 3.
The bus transceiver of the RS-232 bus interface uses SP3232E. The SP3232E series chip is a low-power device with 2 drivers/2 receivers. SP3232E has a high-efficiency charge pump and only needs 0.1μF capacitor to operate when the operating voltage is 3.3 V. The charge pump allows the SP3232E series devices to send RS-232 compliant signals at a voltage within 3.3 to 5.0 V. Since this product is a 3.3 V system, SP3232E is used for RS232 level conversion. Its circuit diagram is shown in Figure 4.
1.5 Other circuits
In order to realize
the functions of
the measurement and control instrument
and collect DC quantities such as transformer oil temperature,
the
measurement and control
instrument hardware circuit should also include keyboard interface circuit, watchdog circuit, DC sampling circuit, etc. Among them, the keyboard interface circuit can directly use the keyboard scanning input circuit to realize the input data function, and display various data and graphics through the 128×64 dot matrix LCD display; the watchdog circuit is composed of MAX705. If it does not receive a low-level signal within 1 second, it will send a reset signal to
ARM7
to reset the system; the DC sampling circuit mainly realizes the collection and measurement of DC quantities such as transformer temperature.
The measurement and
control instrument
uses a 250 Ω sampling resistor to convert the 4~20 mA current signal into a 1~5 V voltage signal to detect oil temperature, etc. [page]
2. Processing of sampling data
The large amount of noise interference and high-order harmonics contained in the field measured signals will cause errors in harmonic measurement, frequency measurement, etc. For the FFT algorithm, if the sampling values cannot be evenly distributed within the signal period, it will also cause spectrum leakage, resulting in large measurement errors, so the sampled data must be processed.
2.1 Noise Processing
The various noises in the power system can generally be considered as random white noise. In recent years, scholars have proposed many methods to eliminate noise, such as wavelet transform. Wavelet transform has good localization characteristics when it exists in the time and frequency domains at the same time, and can automatically adjust the sampling density according to the different frequency components of the signal, thereby realizing signal noise elimination. However, wavelet transform has no obvious advantages in spectrum analysis. Considering that the improvement focus of the measurement and control instrument is to increase the harmonic function and the convenience of ARM7 hardware for FFT, this design still uses FFT as the basic algorithm to seek a noise elimination method based on the FFT algorithm.
The FFT algorithm can be used to eliminate noise by using the window function. You can refer to the idea of using the cosine window to improve accuracy, and the characteristics that the autocorrelation function of the sine signal is the cosine function of the same frequency, while the autocorrelation function of the white noise function is almost zero to eliminate white noise. The addition of the cosine window function method can reduce the influence of white noise in the signal and improve
the harmonic measurement accuracy of
the measurement and control instrument
. The autocorrelation function of the periodic signal X(n)=sinωn is:
Where N is the number of sampling points.
2.2 Prevention of Spectrum Aliasing
The signal to be processed in harmonic measurement is the digital signal obtained by sampling and A/D conversion. To obtain accurate FFT operation results, the Nyquist sampling theorem must be satisfied to prevent measurement errors caused by spectrum aliasing. To prevent spectrum aliasing, an analog filter is usually used to filter out high-frequency signals with half the sampling frequency fs. However, since it is difficult for analog filters to ensure good physical properties in the low-frequency band, and the sampling frequency of this measurement and control instrument is relatively high, a combination of analog filters and digital filters can be used, while considering the harmonic measurement range to reduce the impact of spectrum aliasing.
2.3 Synchronous Sampling Processing
According to the principle of FFT, the sampling points should be evenly distributed within a signal cycle (i.e., strict synchronous sampling should be achieved), otherwise it will cause signal spectrum leakage, resulting in measurement errors. Due to the complex structure of hardware synchronization technology, it will increase the manufacturing cost of the measurement and control instrument . Therefore, this paper adopts software synchronization to achieve synchronous sampling. Software synchronization is essentially a compensation method. The main idea is to use software methods to track the changes in signal frequency and use variable window functions to achieve synchronous sampling of signal cycles to reduce the errors caused by spectrum leakage. The key to software synchronization is how to detect and determine the frequency of the signal in real time. The measurement and control instrument uses complex sequence FFT and phase-locked loop to directly process the sampling values of the voltage or current signal, and then cooperates with digital filtering technology to obtain the signal zero crossing and obtain the signal frequency, thereby realizing synchronous sampling of the signal and completing the measurement of the signal frequency. This method of detecting and determining the signal frequency is simple in calculation, fast in tracking speed, and high in sampling rate of the measurement and control instrument , which can obtain high measurement accuracy and fully meet the actual needs of the project.
3. Measurement and control instrument Software design
Based on the above data processing ideas and the algorithms for data acquisition and parameter calculation, the following introduces the
software design
method
of
the
...
The newly improved and developed ...
The main program is used to complete hardware initialization, hardware self-test and cyclic operation, etc. The subprograms include data acquisition and processing, capacitor switching control, power and operating parameter calculation, power quality monitoring, host computer serial communication, etc. The main and subprograms use interrupts to read and process data, and the program design adopts a top-down, step-by-step detailed structured design method.
3.2 FFT Implementation
When implementing FFT, the data overflow problem must be solved. According to the N-point DFT calculation formula:
When performing DFT operations, overflow is inevitable if certain measures are not taken. In order to avoid FFT operation data overflow, the intermediate results of the DFT butterfly operation unit can be normalized. The following is the intermediate result of the FFT butterfly unit:
Assume A and B are normalized inputs, then, in the complex time extraction FFT operation, the maximum value of Cr, Ci, Dr, Di is: 1+cos45°+sin45°+2.414. In the real DIT FFT operation, the maximum value of Cr, Ci, Dr, Di is 2, so it can be normalized by a factor of 2 in each level of FFT calculation. Using
the chip's shift characteristics and normalizing by 2 for
ARM7
will not increase any computational complexity. In this way, if the FFT contains M levels, the output is equivalent to dividing by 2M=N. Where N is the length of the FFT.
3.3 Calculation of harmonic parameters
The parameter calculation adopts N=128-point FFT algorithm, and the calculation results are stored as A0, B0, A1, B1, ..., An, Bn in sequence. An is the real part of the nth harmonic, and Bn is the imaginary part of the nth harmonic. In this way, the phase angle, amplitude, harmonic distortion rate, content rate and other indicators of each harmonic (taking voltage as an example) can be calculated:
In this way, according to the calculated voltage, current and phase angle, the active power, reactive power, power factor, electric power and other parameter values of the power grid can be calculated, so as to realize the control of equipment such as capacitors according to relevant strategies. Various monitoring data and operating status can also be sent to the computer for long-term storage, and the data can be further analyzed to realize distribution monitoring and management.
4 Conclusion
According to the new requirements of power supply enterprises for distribution measurement and control functions, this paper takes PHILIPS's LPC2220FBM144 chip as the core, makes full use of
the powerful computing power
of ARM7
, and gives a new generation of distribution comprehensive
measurement and control instrument
development method. Actual use proves that the algorithm and implementation technology adopted are completely feasible.
Previous article:Design of a new intelligent tracker based on ARM and FPGA
Next article:Design of intelligent storage system based on ARM
Recommended ReadingLatest update time:2024-11-17 02:53
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- C6678 multi-core application cache test
- Simulation AWR Learning Website
- 15th Anniversary] EE DIY (Progress) -- Upper Computer UI Changes
- 【LoRa】Common Problems in LoRa Development
- Welcome to discuss: Why are so many people optimistic about gallium nitride (GaN) devices?
- How can I include all the component libraries and package libraries used when copying the PROTEL99 project file to another computer?
- Summary of where and how DSP stores and writes data
- Has anyone used BL9582B?
- Qinheng CH582mesh networking
- The basic structure and working principle of RFID