Fast reactive current detection based on 87C196

Publisher:WeaselLatest update time:2011-06-03 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As the power system's requirements for power quality continue to increase, the reactive power and its compensation issues that affect the voltage stability of the power system have received increasing attention. A large number of reactive compensation devices have been put into operation in the power supply system, which has played a certain role in the stability of the power system. However, in industrial sites such as steel rolling where reactive power changes dynamically, the size of reactive power not only changes over time, but also changes very quickly. In order to obtain a stable voltage, it is usually required that the reactive compensation device can quickly follow the reactive current changes, which undoubtedly puts higher requirements on the accuracy and speed of reactive current detection. This paper proposes a method based on the instantaneous reactive power theory to achieve rapid reactive detection, and implements the detection algorithm on the 87C196KC single-chip computer. Experiments have shown that this method has high detection accuracy and fast detection speed, and is a better detection scheme for dynamic reactive compensation devices. 1 Hardware structure of the system

The reactive current detection system consists of an analog transmitter, an analog signal processing module, a switch input module, a switch output module, a microprocessor system based on a single-chip microcomputer, a keyboard and a display unit, etc. If it is necessary to control the switching of capacitors according to the size of the reactive current to achieve rapid reactive compensation, corresponding modules can also be added to control the switching of capacitors, such as a switch module composed of anti-parallel thyristors, a thyristor drive control circuit, a capacitor compensation circuit, etc. The hardware structure of the entire control system is shown in Figure 1.

In the figure, the CPU module uses the 87C196KC single-chip microcomputer produced by Intel. The chip has 8-bit and 10-bit A/D conversion for programmable acquisition and conversion time, 16kB ROM and 488B register RAM. Its main frequency can run up to 20MHz. The 87C196KC uses a high-speed input/output (HISO) structure for event control. The HISO port has 4 inputs and 6 outputs, and uses two 16-bit timers/counters as the system time base. In addition, the related hardware components include a watchdog timer, a full-duplex serial port (SIO), and a peripheral transaction server (PTS). It handles interrupt events by microcode, similar to the DMA channel method, which can greatly reduce the CPU's response to interrupt services. For details about the pin functions and control command formats of the 87C196KC, please refer to reference 2. Since 87C196KC integrates a fully programmable, self-calibrating, high-precision analog data acquisition system, the reactive power detection system composed of it has a simple structure and does not require a large number of complex peripherals and peripheral circuits. Its simple hardware structure design greatly improves the working reliability and anti-interference ability of the entire system.

2 Principle of reactive current detection

The ip-iq detection method based on instantaneous reactive power theory is widely used due to its small amount of calculation and good real-time performance. In the power system, under normal circumstances, the three-phase grid voltage is symmetrical and distortion-free. Assuming that the load current is three-phase symmetrical, considering that the load current may contain harmonics, its voltage and current expressions can be expressed as:

In the formula, n = 3k ± 1, where k is an integer (when k = 0, only the + sign is taken, that is, only n = 1 is taken), ω is the angular frequency of the power supply, In and ?n are the effective values ​​and initial phase angles of each current (the fundamental initial phase angle is the phase difference relative to the fundamental voltage).

By transforming the three-phase current into the α-β two-phase orthogonal coordinates, the instantaneous currents iα and iβ can be obtained.

In formula 2, C32 is the transformation matrix, and its expression is:

In order to more conveniently decompose the active and reactive components of the current, the coordinate system should be transformed into the dq coordinate system that rotates synchronously with the power supply voltage, and the d axis should be in phase with the power supply voltage. In this way, the transformed d axis is the active component, and the q axis component is the reactive component. Assuming that the transformation matrix from the α-β coordinate to the dq coordinate is C, then:

It can be seen from formula (5) that the active and reactive components of the current are instantaneous alternating, and in addition to the fundamental component, they also contain harmonic components. If only the fundamental wave is considered, the fundamental current when n = 1 is:

The formula shows that after the above processing, the DC components ip and iq obtained by low-pass filtering are √3 times the active current component and reactive current component of the fundamental current respectively. Therefore, the detection of the entire reactive current can be realized according to the principle of Figure 2. In the transformation matrix C, sinωt and cosωt are in phase with the a-phase voltage ea, which can be obtained by a phase-locked loop (PLL) and a sine-cosine signal generation circuit. When implemented in a single-chip microcomputer, it can also be obtained by software calculation through synchronous zero-crossing detection. [page]

3. Program flow of reactive current calculation

Figure 3 is the software flow of the controller, and Figure 3 (a) is the main program flow chart. After the system is powered on, it is first initialized to set the registers and I/O ports, and then the self-test program is executed. After the self-test is correct, the external interrupt is opened, and then the key scan is performed. If a key is pressed, the key processing is performed and then the display program is executed. If no key is pressed, the display program is executed directly. Then it returns to the key scan step of the main program, and it loops continuously to wait for the interrupt subroutine triggered by the synchronous detection. Figure 3 (b) is the interrupt subroutine flow chart triggered after receiving the synchronous detection signal. When the synchronous detection signal is received, the program enters the corresponding interrupt subroutine. First, the program site is protected, and then the current and voltage values ​​are sampled. According to the above detection method and current and voltage values, the system calculates the effective value of the reactive current, and calculates which branches need to be switched based on the effective value of the current, and outputs the switching instruction. After execution, exit the interrupt and wait for the next interrupt. 4 Conclusion



The detection system proposed in this paper has a simple structure. The use of high-density chips for hardware structure design greatly improves the working reliability and anti-interference ability of the entire system, and the operation is reliable. At the same time, it can quickly and accurately detect reactive current. The hardware system made according to the detection method proposed in this paper has also been put into actual operation. Practice has proved that the system can not only complete the accurate detection of reactive current within 20ms, but also complete the capacitor switching within 40ms in conjunction with the TSC system. In addition, it can also realize dynamic reactive compensation. Therefore, it plays an important role in improving power quality and reducing losses, and has a good value for promotion and application.

Reference address:Fast reactive current detection based on 87C196

Previous article:Development of Linear CCD Real-time Detection System Based on Single Chip Microcomputer
Next article:Application of MSP430F149 in power measurement, control and protection products

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号