Compensation device for multiple capacitors with different capacities based on STM32 single-chip microcomputer

By adopting multiple capacitance compensation devices based on STM32 microcontrollers in the power grid and using reactive power as the switching criteria, the problem that the power factor in the prior art cannot accurately reflect the reactive components of the power grid is solved, and stable compensation and power supply safety of the power grid are achieved.

CN119765373APending Publication Date: 2025-04-04STATE GRID XINJIANG ELECTRIC POWER CO LTD HOTAN POWER SUPPLY CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510016784.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the existing reactive control methods of power grids, when the power factor is used as the switching criterion, it cannot accurately reflect the reactive component of the load in the power grid, resulting in insufficient compensation during heavy loads of the power grid, and easy to generate switching oscillation during light loads, affecting the reliability and power supply quality of the control system.

Method used

Using multiple capacitor compensation devices of different capacitances based on STM32 microcontroller, the detection module collects the voltage and current parameters of the power grid, the data processing module calculates the reactive power, and the control module uses the reactive power as the switching criteria to perform the switching operation of the capacitor, avoiding switching oscillation, and ensuring the safety of power supply.

Benefits of technology

The purpose of reactive power is achieved, and the effect of the oscillation of the oscillation and repeated trial and cutting on the power grid and capacitors is avoided, ensuring the safety and reliability of the power supply, and improving the stability and power supply quality of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119765373A_ABST
    Figure CN119765373A_ABST
Patent Text Reader

Abstract

The invention discloses a compensation device for multiple capacitors with different capacities based on an STM32 single chip microcomputer, which comprises a detection module, a control module, an execution module and a power supply module, and is characterized in that the detection module is connected with the control module, the control module is connected with the execution module, and the power supply module is connected with the detection module, the control module and the execution module. The detection module comprises a voltage acquisition module, a current acquisition module and a data processing module, the control module comprises an STM32 single-chip microcomputer and a reset circuit, the control module takes a value of reactive power as a switching basis, compares the value with a target value in a control process, and sends a command according to a comparison result, and the control module controls the switching of the reactive power. The execution module comprises an LED display and a capacitor switching driving circuit, the device takes reactive power as a switching criterion, the detection quantity is consistent with a control target, switching oscillation is avoided, one-time in-place switching of a capacitor bank is realized, power supply safety is ensured, and reliable power supply is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid operation and maintenance, and in particular to a plurality of capacitor compensation devices with different capacities based on an STM32 single-chip microcomputer. Background Art

[0002] Due to the extensive use of inductive loads in the power grid, a large amount of reactive power flows in the power grid, causing waste of electric energy and voltage instability, and even damage to equipment. Reactive power compensator is a compensation device. Its role in the electronic power supply system is to improve the power factor of the power grid, reduce the loss of power supply transformers and transmission lines, improve power supply efficiency, and improve the power supply environment. It plays an indispensable and very important role in the power supply system. Reasonable selection of compensation devices can minimize network losses and improve the quality of the power grid.

[0003] Using power factor as a switching criterion is one of the traditional methods of reactive power control in power grids. It uses the power factor that reflects the phase difference between voltage and current in the power grid as a control signal to control the switching state of parallel compensation capacitors. However, the power factor cannot accurately reflect the size of the reactive component of the load in the power grid, which often results in insufficient compensation when the power grid is heavily loaded and prone to switching oscillation when the power grid is lightly loaded.

[0004] Switching oscillation means that after the controller puts a group of capacitors into (cuts off) when the power grid is under (over) compensated, it detects that the power grid is over (under) compensated, so it judges to cut off (put on) a group of capacitors. At this time, the power grid controller is under (over) compensated, and the controller puts another group of capacitors into (cuts off), and the invalid switching action is repeated.

[0005] When the power grid is overloaded, the reactive component of the load is large, but because the reactive component accounts for a small proportion of the load, the measured power factor angle may be small, or even lower than the set value of the system compensation, causing the control device to fail to compensate the power grid and unable to perform tracking and regulation, resulting in insufficient compensation.

[0006] When the grid is lightly loaded, the power factor angle may be large, but the reactive component of the load is not large. At this time, compensating the grid may easily cause over-compensation. The compensation device needs to cut off the capacitor and the system returns to its initial state.

[0007] This repeated cycle will cause switching oscillations in the control system. Switching oscillations will not only affect the reliability and service life of the control system, but will also lead to frequent opening and closing of switching elements, affecting the service life of switches and capacitors, and generating a large amount of harmonics and inrush currents, affecting power supply safety and quality. Summary of the invention

[0008] In order to overcome the above problems, the purpose of the present invention is to provide a plurality of capacitor compensation devices with different capacities based on an STM32 single-chip microcomputer. The device uses reactive power as a switching criterion. Since the detected amount is consistent with the control target, the purpose of replenishing the reactive power as much as it is lacking and cutting the reactive power as much as it exceeds can be truly achieved. Switching oscillation can be avoided, and the capacitor bank can be switched in place at one time, avoiding the influence of repeated trial switching on the power grid and the capacitor, ensuring power supply safety, and realizing reliable power supply.

[0009] The technical solution adopted by the present invention is:

[0010] Including detection module, control module, execution module, power module,

[0011] The detection module is connected to the control module, the control module is connected to the execution module, and the power module is connected to the detection module, the control module, and the execution module.

[0012] The detection module includes a voltage acquisition module, a current acquisition module, and a data processing module. The voltage acquisition module is connected to the voltage transformer of the three-phase power grid, and the current acquisition module is connected to the current transformer of the three-phase power grid. The parameters collected by the voltage acquisition module and the current acquisition module are transmitted to the data processing module for processing and then transmitted to the control module.

[0013] The control module includes an STM32 single-chip microcomputer and a reset circuit. The control module uses the value of reactive power as the switching basis. After receiving the processed parameter signal, the STM32 single-chip microcomputer compares it with the target value in the control process, and issues a command according to the comparison result to make a decision on whether to switch on or not to switch on the capacitor and transmits it to the execution module.

[0014] The execution module includes an LED display and a capacitor switching drive circuit. The LED display is used to display the real-time power factor. After receiving the command signal from the control module, the capacitor switching drive circuit opens or closes the switch to complete the compensation task.

[0015] As a further description of the present invention, the control process includes the following steps:

[0016] Step 1: System initialization, including setting flags and initial values ​​of variables, interrupts, and initialization of each module chip.

[0017] Step 2: Process the sampled voltage and current values.

[0018] Step 3: Process the sampled value of the power factor.

[0019] Step 4: Calculate the specific value of reactive power, compare the obtained reactive power value with the target value, and determine whether it falls within the range of the target value.

[0020] Step 5: If the value falls within the target range, the measurement command is reissued after a delay, and the system returns to step 2 to enter a new cycle.

[0021] If it does not fall within the target range, the best switching combination is determined, and the action of the capacitor switching drive circuit is controlled according to the best switching combination.

[0022] As a further description of the present invention, the reactive power is calculated as follows:

[0023]

[0024] in, is the voltage value before power system compensation,

[0025] is the current value before power system compensation,

[0026] is the power factor angle before compensation,

[0027] is the voltage value after power system compensation,

[0028] is the current value after power system compensation,

[0029] It is the power factor angle expected after compensation.

[0030] As a further description of the present invention, the method for determining the best switching combination in the fourth step is:

[0031] According to the comparison result of reactive power value and target value,

[0032] If the reactive power value is greater than the target value, it is determined that the power grid is in an over-compensation state at this time, and a capacitor is removed starting from the small-capacity capacitor, that is, the capacitor switching drive circuit is controlled to disconnect the capacitor switch with the smallest capacity, and the reactive power value is compared with the target value again. If it is still greater than the target value, the capacitor switch with the smallest capacity in the remaining capacitor is disconnected, and the reactive power is compared with the target value again, and the comparison is repeated until the reactive power value falls within the target value range.

[0033] If the reactive power value is less than the target value, it is determined that the power grid is in an under-compensated state. A capacitor is added starting from the large-capacity capacitor, that is, the capacitor switching drive circuit is controlled to close the switch of the capacitor with the largest capacity, and the reactive power value is compared with the target value again. If it is still less than the target value, the switch of the capacitor with the largest capacity in the remaining capacitors is closed, and the reactive power is compared with the target value again. The comparison is repeated until the reactive power value falls within the target value range.

[0034] As a further description of the present invention, the data processing module includes a zero-crossing comparison circuit and an A / D conversion circuit.

[0035] The zero-crossing comparison circuit is used to obtain the power factor value of the three-phase power grid.

[0036] The A / D conversion circuit converts the data into a digital quantity that can be recognized by the STM32 single chip microcomputer.

[0037] As a further description of the present invention, the capacitor switching drive circuit adopts parallel capacitor switching, adopts capacitors of different capacities to be connected in parallel, and realizes the switching of capacitors of different capacities by turning on and off a composite switch.

[0038] As a further description of the present invention, the parallel circuit adopts a low-voltage centralized compensation method, performs centralized compensation on the 380V side of the low-voltage busbar of the user-specific transformer, and adopts a microcomputer-controlled low-voltage parallel capacitor cabinet.

[0039] As a further description of the present invention, the power factor in the target value is 0.97.

[0040] As a further description of the present invention, the power module adopts a DC power supply, is designed to output two +5V regulated power supplies, is designed using integrated voltage regulator devices LM7805 and LM7812, and all integrated voltage regulator chips are equipped with heat sinks.

[0041] Beneficial effects of the present invention:

[0042] The invention discloses a plurality of capacitor compensation devices with different capacities based on an STM32 single-chip computer, comprising a detection module, a control module, an execution module and a power supply module. In the control process of the control module, reactive power is used as a switching criterion. Since the detection amount is consistent with the control target, the purpose of replenishing reactive power according to the reactive power shortage and cutting reactive power according to the reactive power excess can be truly achieved. Switching oscillation can be avoided, and one-time switching of the capacitor group can be achieved, thereby avoiding the influence of repeated trial switching on the power grid and the capacitor, ensuring power supply safety, and achieving reliable power supply.

[0043] The invention is based on a plurality of capacitor compensation devices with different capacities of an STM32 single-chip microcomputer. The capacitor switching drive circuit adopts parallel capacitor switching, capacitors with different capacities are connected in parallel, the switching of capacitors with different capacities is realized by turning on and off a composite switch, the parallel connection of capacitors with different capacities is adopted as a switching basis for reactive power compensation in a power grid, the grouping, wiring form and control mode of the capacitors are combined with each other, a plurality of compensation schemes are formed, the frequent operation of the contactor of the load switch is avoided, the service life of the device is improved, the stealing vibration is avoided, and the purpose of reactive power compensation is realized quickly and efficiently. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is the overall structure diagram of multiple capacitor compensation devices with different capacities based on the STM32 single-chip microcomputer proposed by the present invention;

[0045] Figure 2 A control flow chart of a control module for multiple capacitor compensation devices with different capacities based on an STM32 single-chip microcomputer proposed by the present invention;

[0046] Figure 3 A flow chart for determining the optimal switching combination of multiple capacitor compensation devices with different capacities based on an STM32 single-chip microcomputer proposed by the present invention;

[0047] Figure 4 A circuit diagram of a plurality of power modules of capacitor compensation devices with different capacities based on an STM32 single-chip microcomputer proposed by the present invention;

[0048] Figure 5 The phase difference waveform diagram measured by the zero-crossing comparison circuit of multiple capacitor compensation devices with different capacities based on the STM32 single-chip microcomputer proposed by the present invention;

[0049] Figure 6 A circuit diagram of a power factor measurement circuit for multiple capacitor compensation devices with different capacities based on an STM32 single-chip microcomputer proposed by the present invention;

[0050] Figure 7 A driving circuit diagram of an AC contactor of multiple capacitor compensation devices with different capacities based on an STM32 single-chip microcomputer proposed by the present invention;

[0051] Figure 8 The present invention provides a driving circuit diagram of solid-state relays of multiple capacitor compensation devices with different capacities based on an STM32 single-chip microcomputer. DETAILED DESCRIPTION

[0052] The specific implementation of the present invention is described below in conjunction with the accompanying drawings and embodiments:

[0053] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which the present invention can be implemented. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0054] At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" cited in this specification are only for the convenience of description and are not used to limit the scope of implementation of the present invention. Changes or adjustments to their relative relationships should be regarded as the scope of implementation of the present invention without substantially changing the technical content.

[0055] like Figures 1 to 8 As shown, it shows a specific embodiment of the present invention:

[0056] Embodiment 1

[0057] Multiple capacitor compensation devices with different capacities based on STM32 microcontroller, including detection module, control module, execution module, power supply module,

[0058] The detection module is connected to the control module, the control module is connected to the execution module, and the power module is connected to the detection module, the control module, and the execution module.

[0059] The detection module includes a voltage acquisition module, a current acquisition module, and a data processing module. The voltage acquisition module is connected to the voltage transformer of the three-phase power grid, and the current acquisition module is connected to the current transformer of the three-phase power grid. The parameters collected by the voltage acquisition module and the current acquisition module are transmitted to the data processing module for processing and then transmitted to the control module.

[0060] The control module includes an STM32 single-chip microcomputer and a reset circuit. The control module uses the value of reactive power as the switching basis. After receiving the processed parameter signal, the STM32 single-chip microcomputer compares it with the target value in the control process, and issues a command according to the comparison result to make a decision on whether to switch on or not to switch on the capacitor and transmits it to the execution module.

[0061] The execution module includes an LED display and a capacitor switching drive circuit. The LED display is used to display the real-time power factor. After receiving the command signal from the control module, the capacitor switching drive circuit opens or closes the switch to complete the compensation task.

[0062] In this embodiment, if Figure 1 As shown, the detection module collects voltage and current parameters in the three-phase power grid through the voltage acquisition module and the current acquisition module, and converts the relevant parameter signals into signals that can be received by the control module through the data processing module. After the control process, the STM32 single-chip microcomputer controls the capacitor switching drive circuit to perform the action of switching the capacitor to complete the compensation task.

[0063] Specifically, the power supply module adopts a direct current power supply, is designed to output two +5V regulated power supplies, is designed using integrated voltage regulators LM7805 and LM7812, and all integrated voltage regulator chips are equipped with heat sinks.

[0064] In this embodiment, a DC regulated power supply is used which is formed by voltage transformation, rectification, filtering and voltage stabilization of AC power. The DC regulated power supply of the device is designed with conventional bridge full-wave rectification, capacitor filtering, and three-terminal fixed output integrated voltage stabilizing devices LM7805 and LM7812, and all integrated voltage stabilizing chips are equipped with heat sinks with sufficient margin.

[0065] In order to prevent interference to the microcontroller, the analog circuit and the digital circuit are powered independently. Therefore, the power supply circuit is designed to output two +5V regulated power supplies and one +12V regulated power supply. At the same time, the switching element of the main circuit is a composite switch composed of an AC contactor and a solid-state relay in parallel. The power supply on the DC side of the solid-state relay can be selected as +5V, or it can be replaced by a small charger, with an input of 220V AC and an output of 5V DC.

[0066] Since the solid-state relay has an optocoupler inside, its DC side and AC side are isolated from each other, so the power supply on its DC side can be shared with the +5V power supply of the digital circuit.

[0067] The +12V power supply is used to control a small control relay for the AC contactor coil. The circuit diagram of the power module is as follows: Figure 4 shown.

[0068] The AC voltage and current are obtained through the voltage transformer and current transformer respectively, and then the AC quantity is converted into a DC quantity for easy A / D conversion through the rectifier and filter circuit. The A / D conversion circuit then converts the analog quantity into a digital quantity and sends it to the CPU.

[0069] In this embodiment, the voltage and current signals collected by the voltage acquisition module and the current acquisition module are jointly completed by sensors and amplifiers. Since the voltage and current drawn from the power grid are mostly high voltage and strong current, they must be processed before they can be introduced into the signal processor. Therefore, the voltage acquisition module is connected to the voltage transformer of the three-phase power grid, and the current acquisition module is connected to the current transformer of the three-phase power grid to realize the collection of voltage signals and current signals.

[0070] The voltage acquisition module and the current acquisition module use corresponding voltage sensors and current sensors to acquire voltage and current signals.

[0071] In this embodiment, the control module includes an STM32 single-chip microcomputer and a reset circuit. During use, in order to prevent system freezes, data loss, program runaway and other phenomena caused by electromagnetic interference, power grid fluctuations, power outages and other factors, the device adopts an X25045 chip with power-off saving function, watchdog function and power supply voltage detection function.

[0072] In this embodiment, the display circuit of the execution module is implemented using an LED digital tube.

[0073] Specifically, the control process includes the following steps:

[0074] Step 1: System initialization, including setting flags and initial values ​​of variables, interrupts, and initialization of each module chip.

[0075] Step 2: Process the sampled voltage and current values.

[0076] Step 3: Process the sampled value of the power factor.

[0077] Step 4: Calculate the specific value of reactive power, compare the obtained reactive power value with the target value, and determine whether it falls within the range of the target value.

[0078] Step 5: If the value falls within the target range, the measurement command is reissued after a delay, and the system returns to step 2 to enter a new cycle.

[0079] If it does not fall within the target range, the best switching combination is determined, and the action of the capacitor switching drive circuit is controlled according to the best switching combination.

[0080] In this embodiment, Figure 2 As shown in the figure, after the STM32 microcontroller of the control module is turned on, the system is first initialized when executing the control process. The initialization mainly includes setting the initial value of the flag bit and the variable, interrupt initialization, and setting the initialization of each chip. Then the program enters the main program: first, data collection and processing are performed, including the collection and processing of line voltage and phase current, and the sampling value processing of power factor; then, the reactive power is calculated based on the collected voltage, current and power factor, and the optimal switching combination of the capacitor bank is determined. Finally, the switching of the corresponding capacitor bank is controlled according to the operating status of the capacitor bank, and the power factor of the system is displayed in real time in the display program.

[0081] Specifically, the data processing module includes a zero-crossing comparison circuit and an A / D conversion circuit.

[0082] The zero-crossing comparison circuit is used to obtain the power factor value of the three-phase power grid.

[0083] The A / D conversion circuit converts the data into a digital quantity that can be recognized by the STM32 single chip microcomputer.

[0084] In this embodiment, the power factor is calculated using the phase angle relationship between the three-phase voltage and current of the power grid.

[0085] The zero-crossing comparison circuit compares the line voltage between the A and C phases in the load power grid. and phase current Sampling is performed to detect the time difference between the rising edges of two adjacent square waves. , determine the power factor angle, and use this method to obtain the power factor values ​​of the three-phase power grid in turn.

[0086] In this embodiment, the phase difference waveform measured by the zero-crossing comparison circuit is Figure 5 As shown, Figure 5 In the figure, V1 and V2 are the sine waves of the same frequency obtained by sampling the voltage and current transformers after amplification and filtering. V1 and V2 are transformed into square waves V3 and V4 after passing through the zero comparison circuit. V3 and V4 are then XORed by the XOR gate to obtain a group of rectangular pulse signals. The obtained phase difference rectangular pulse signal is input into the interrupt of the single-chip microcomputer. The value measured by the internal timing counter of the single-chip microcomputer can be used to calculate the power factor of the line at this time.

[0087] In this embodiment, the circuit diagram of the power factor measurement circuit actually used is as follows: Figure 6 shown.

[0088] Specifically, the reactive power is calculated as follows:

[0089]

[0090] in, is the voltage value before power system compensation,

[0091] is the current value before power system compensation,

[0092] is the power factor angle before compensation,

[0093] is the voltage value after power system compensation,

[0094] is the current value after power system compensation,

[0095] It is the power factor angle expected after compensation.

[0096] Specifically, the power factor in the target value is 0.97.

[0097] In this embodiment, the calculation result of reactive power is used as the switching criterion. Since the detected amount is consistent with the control target, the purpose of replenishing the reactive power when it is insufficient and cutting the reactive power when it is excessive can be truly achieved. It can avoid switching oscillation and realize the one-time switching of the capacitor bank, avoiding the influence of repeated trial switching on the power grid and capacitors.

[0098] By adopting the above-mentioned reactive power calculation method, since the switching of capacitors is ultimately a compensation for the reactive power of the power grid, and the reactive power is determined by the phase power, voltage U, and current I, the control method using the power factor as the switching criterion only detects Φ in the power grid, while the control method using the reactive power as the switching criterion detects I and U in the power grid. Obviously, the control method using the reactive power as the switching criterion can not only eliminate the switching oscillation phenomenon, but also more truly and comprehensively sample the reactive power of the power grid.

[0099] Specifically, the method for determining the best switching combination in the fourth step is:

[0100] According to the comparison result of reactive power value and target value,

[0101] If the reactive power value is greater than the target value, it is determined that the power grid is in an over-compensation state at this time, and a capacitor is removed starting from the small-capacity capacitor, that is, the capacitor switching drive circuit is controlled to disconnect the capacitor switch with the smallest capacity, and the reactive power value is compared with the target value again. If it is still greater than the target value, the capacitor switch with the smallest capacity in the remaining capacitor is disconnected, and the reactive power is compared with the target value again, and the comparison is repeated until the reactive power value falls within the target value range.

[0102] If the reactive power value is less than the target value, it is determined that the power grid is in an under-compensated state. A capacitor is added starting from the large-capacity capacitor, that is, the capacitor switching drive circuit is controlled to close the switch of the capacitor with the largest capacity, and the reactive power value is compared with the target value again. If it is still less than the target value, the switch of the capacitor with the largest capacity in the remaining capacitors is closed, and the reactive power is compared with the target value again. The comparison is repeated until the reactive power value falls within the target value range.

[0103] In this embodiment, Figure 3 As shown, the best switching combination is determined based on the comparison result between the actual reactive power value and the target value.

[0104] In the actual process of capacitance compensation, there are three wiring methods of capacitor banks:

[0105] Triangle connection, also called △ connection;

[0106] Star connection, also known as Y connection;

[0107] The combination of triangle and star connection is also called △-Y connection.

[0108] The advantages of the triangle connection method are low investment and convenient control, and the disadvantages are poor compensation accuracy. When the three-phase load is unbalanced, it is easy for some phases to be over-compensated or some phases to be under-compensated. Therefore, the triangle connection method is mainly used for three-phase symmetrical loads.

[0109] The star connection method compensates according to the reactive power of each phase, so it will not cause over-compensation of reactive power. However, the cost of the device is much higher than that of the delta connection, and the control is relatively complicated.

[0110] The connection method combining triangle and star combines the above two connection methods, and has both common compensation and separate compensation in compensation mode.

[0111] In this embodiment, a △-Y connection method is adopted.

[0112] Specifically, the capacitor switching drive circuit adopts parallel capacitor switching, adopts capacitors of different capacities to be connected in parallel, and realizes the switching of capacitors of different capacities by turning on and off a composite switch.

[0113] In actual use, the grouping of capacitors can be divided into equal capacity grouping and unequal capacity grouping. The so-called equal capacity grouping means that the capacity of each group of capacitors is equal. Its advantage is that it is easy to realize automatic control, but its disadvantage is that the compensation difference is large. In order to obtain a smaller compensation difference, the number of groups must be increased, and the corresponding control equipment and space occupied also need to be increased;

[0114] The so-called unequal capacity grouping method means that the capacity of each group of capacitors is not equal. Its advantage is that a smaller compensation difference can be obtained by using fewer groups.

[0115] In this embodiment, the capacitor bank of the capacitor switching drive circuit adopts the coding method of 8421, and the capacitance of the capacitor is allocated according to the size ratio of 8421, which can improve the compensation accuracy of the controller.

[0116] For example, if the reactive power capacity that the grid needs to compensate is 68 kvar, if capacitors of equal capacity are used (a total of 10 capacitors, each with a capacity of 10 kvar), only 60 kvar can be compensated. If 8421 coding is used (a total of 5 capacitors, with capacitors of 50, 25, 15, 10, and 5 kvar), the compensation accuracy of the controller is greatly improved, and the frequent contactor action, over-compensation, and under-compensation problems caused by inaccurate compensation can be reduced.

[0117] In this embodiment, the AC contactor and the solid-state relay of the composite switch of the capacitor switching drive circuit respectively use different drive circuits.

[0118] The AC contactor is driven by a triode. The driving circuit of the AC contactor is as follows: Figure 7 As shown, the transistor drives the control relay HH52P to control the on / off state of the AC contactor coil, and then controls the closing of the main contacts of the AC contactor. When the transistor output is high, the normally open contact of HH52P closes, the AC contactor coil connected to it is energized, and the magnet attracts the platform, driving the main contacts of the contactor to close.

[0119] The control command word for controlling the switching of the capacitor is output by P2.4, P2.5, P2.6, and P2.7 of the STM32 microcontroller, and is driven to the solid-state relay SSR to turn the solid-state relay on or off. The driving part uses the integrated chip ULN2003 dedicated to the relay.

[0120] ULN2003 is a power amplifier that can drive 7 groups of high-voltage and high-current loads simultaneously. Its pins and functions are shown in the following table.

[0121] Table 1 Main functions of pins

[0122]

[0123] The ULN2003 circuit has the following features:

[0124] (1) High current gain (greater than 1000);

[0125] (2) Strong load capacity (output current greater than 500mA);

[0126] (3) Wide temperature range (-40~85℃);

[0127] (4) High operating voltage (greater than 50V).

[0128] The application circuit of ULN2003 has a large current output capability to drive various loads. The signals output by each port of the microcontroller in this device are generally weak, making it difficult to drive the subsequent circuit to work properly. Therefore, a power amplifier must be added between the output port and the load to enable the entire circuit to work properly. In this compensation device, this model component is selected as the power amplifier chip and applied to the design system.

[0129] The driving circuit of the solid-state relay is as follows Figure 8 shown.

[0130] Specifically, the parallel circuit adopts a low-voltage centralized compensation method, performs centralized compensation on the 380V side of the low-voltage busbar of the user-specific transformer, and adopts a microcomputer-controlled low-voltage parallel capacitor cabinet.

[0131] Embodiment 2

[0132] In this embodiment, according to the models of transformers in the area currently under the jurisdiction of the applicant, a reactive power compensation allocation table of different capacities as shown in the following table is selected.

[0133] Table 2 Reactive power compensation allocation table for different transformer configurations

[0134]

[0135] In this embodiment, the above-mentioned reactive power compensation allocation table is used to compensate the transformer of the corresponding level, which can realize the one-time switching of the capacitor group with maximum efficiency, ensure the stable operation of the power grid, and avoid the impact of repeated trial switching on the power grid and capacitors.

[0136] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

[0137] Many other changes and modifications may be made without departing from the concept and scope of the present invention.It should be understood that the present invention is not limited to the specific embodiments, and the scope of the present invention is defined by the appended claims.

Claims

1. Multiple capacitor compensation devices with different capacities based on STM32 microcontroller, characterized in that: Including detection module, control module, execution module, power module, The detection module is connected to the control module, the control module is connected to the execution module, and the power module is connected to the detection module, the control module, and the execution module. The detection module includes a voltage acquisition module, a current acquisition module, and a data processing module. The voltage acquisition module is connected to the voltage transformer of the three-phase power grid, and the current acquisition module is connected to the current transformer of the three-phase power grid. The parameters collected by the voltage acquisition module and the current acquisition module are transmitted to the data processing module for processing and then transmitted to the control module. The control module includes an STM32 single-chip microcomputer and a reset circuit. The control module uses the value of reactive power as the switching basis. After receiving the processed parameter signal, the STM32 single-chip microcomputer compares it with the target value in the control process, and issues a command according to the comparison result to make a decision on whether to switch on or not to switch on the capacitor and transmits it to the execution module. The execution module includes an LED display and a capacitor switching drive circuit. The LED display is used to display the real-time power factor. After receiving the command signal from the control module, the capacitor switching drive circuit opens or closes the switch to complete the compensation task.

2. According to claim 1, multiple different capacity capacitor compensation devices based on STM32 single chip microcomputer are characterized in that, The control process includes the following steps: Step 1: System initialization, including setting flags and initial values ​​of variables, interrupts, and initialization of each module chip. Step 2: Process the sampled voltage and current values. Step 3: Process the sampled value of the power factor. Step 4: Calculate the specific value of reactive power, compare the obtained reactive power value with the target value, and determine whether it falls within the range of the target value. Step 5: If the value falls within the target range, the measurement command is re-issued after a delay, and the system returns to step 2 to enter a new cycle. If it does not fall within the target range, the best switching combination is determined, and the action of the capacitor switching drive circuit is controlled according to the best switching combination.

3. The multiple different capacity capacitor compensation devices based on STM32 single chip microcomputer according to claim 2, characterized in that, The reactive power is calculated as follows:

4. Among them, is the voltage value before power system compensation, is the current value before power system compensation, is the power factor angle before compensation, is the voltage value after power system compensation, is the current value after power system compensation, It is the power factor angle expected after compensation.

5. The multiple different capacity capacitor compensation devices based on STM32 single chip microcomputer according to claim 2, characterized in that, The method for determining the best switching combination in the fourth step is: According to the comparison result of reactive power value and target value, If the reactive power value is greater than the target value, it is determined that the power grid is in an over-compensation state at this time, and a capacitor is removed starting from the small-capacity capacitor, that is, the capacitor switching drive circuit is controlled to disconnect the capacitor switch with the smallest capacity, and the reactive power value is compared with the target value again. If it is still greater than the target value, the capacitor switch with the smallest capacity in the remaining capacitor is disconnected, and the reactive power is compared with the target value again, and the comparison is repeated until the reactive power value falls within the target value range. If the reactive power value is less than the target value, it is determined that the power grid is in an under-compensated state. A capacitor is added starting from the large-capacity capacitor, that is, the capacitor switching drive circuit is controlled to close the switch of the capacitor with the largest capacity, and the reactive power value is compared with the target value again. If it is still less than the target value, the switch of the capacitor with the largest capacity in the remaining capacitors is closed, and the reactive power is compared with the target value again. The comparison is repeated until the reactive power value falls within the target value range.

6. The multiple different capacity capacitor compensation devices based on STM32 single chip microcomputer according to claim 1, characterized in that, The data processing module includes a zero-crossing comparison circuit and an A / D conversion circuit. The zero-crossing comparison circuit is used to obtain the power factor value of the three-phase power grid. The A / D conversion circuit converts the data into a digital quantity that can be recognized by the STM32 single chip microcomputer.

7. The multiple different capacity capacitor compensation devices based on STM32 single chip microcomputer according to claim 1, characterized in that, The capacitor switching driving circuit adopts parallel capacitor switching, adopts capacitors of different capacities to be connected in parallel, and realizes the switching of capacitors of different capacities by turning on and off a composite switch.

8. The multiple different capacity capacitor compensation devices based on the STM32 single chip microcomputer according to claim 6, characterized in that: The parallel circuit adopts a low-voltage centralized compensation method, performs centralized compensation on the 380V side of the low-voltage busbar of the user-specific transformer, and adopts a low-voltage parallel capacitor cabinet controlled by a microcomputer.

9. According to claim 2 or 4, multiple different capacity capacitor compensation devices based on STM32 single-chip microcomputers are characterized in that, The power factor in the target value is 0.

97.

10. The multiple different capacity capacitor compensation device based on STM32 single chip microcomputer according to claim 1 is characterized in that: The power supply module adopts a direct current power supply, is designed to output two +5V regulated power supplies, is designed using integrated voltage regulators LM7805 and LM7812, and all integrated voltage regulator chips are equipped with heat sinks.