Inverter generating capacity statistical control method
By setting the ADC sampling interrupt in the inverter, the average value of photovoltaic current and voltage is obtained, and digital filtering is performed to calculate the power generation, the problems of hardware design complexity and data error in the prior art are solved, and the accurate statistics and storage of the power generation of the inverter are achieved.
Patent Information
- Application Number
- CN202311557338.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-05-23
AI Technical Summary
The existing inverter power generation statistics method requires additional special circuit design to increase hardware design complexity, and timely saving power generation can easily lead to data errors.
By setting the ADC sampling interrupt, the ADC sampling value of the photovoltaic current and voltage is obtained, the average value is obtained by cumulating N cycles, and digital filtering is performed to calculate the power generation. At the same time, the total power generation is saved under the bus voltage alarm condition.
It reduces the complexity of hardware design, improves algorithm accuracy and system reliability, and realizes accurate statistics and preservation of inverter power generation.
Smart Images

Figure CN120028594A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power technology, and in particular to a method for statistically controlling power generation of an inverter. Background Art
[0002] Photovoltaic inverter is a very important component in solar power generation system. Its main function is to convert the direct current generated by photovoltaic panels into alternating current and transmit electrical energy to the power grid.
[0003] At present, the power generation of the inverter needs to be counted through a dedicated metering chip, and the power generation data is saved regularly. This solution has the following two shortcomings: 1. The dedicated chip requires additional design of dedicated circuits, which increases the complexity of hardware design; 2. The scheduled storage of power generation is prone to cause the inverter to fail before the scheduled time, so the power generation for a certain period of time cannot be counted, resulting in data errors. Summary of the invention
[0004] The present invention provides a method for statistically controlling the power generation of an inverter, which reduces the complexity of existing hardware design solutions, improves algorithm accuracy, improves system reliability, and performs inverter power generation statistics.
[0005] In order to achieve the purpose of the present invention, the technical solution adopted is: a method for statistically controlling power generation of an inverter, comprising the following steps:
[0006] S1. By setting the ADC sampling interrupt, the ADC sampling values of the photovoltaic current and the photovoltaic voltage are obtained, and N cycles are accumulated to obtain the ADC average sampling values of the photovoltaic current and the photovoltaic voltage;
[0007] S2. Calculate the theoretical values of the photovoltaic current and the photovoltaic voltage according to the gains of the photovoltaic current and photovoltaic voltage sampling circuits;
[0008] S3, after obtaining the theoretical values of the photovoltaic current and the photovoltaic voltage, a digital first-order low-pass filter is performed to obtain the average values Upv_Mean and Ipv_Mean of the photovoltaic current and the photovoltaic voltage over N cycles respectively;
[0009] S4, when the PWM output is interrupted, Upv_Mean and Ipv_Mean are multiplied to obtain the power Ppv_Mean; then Ppv_Mean is multiplied by the period Ts to obtain the average power generation Epts in the period;
[0010] S5, adding the average power generation Epts of the period Ts and the total power generation Epsum to obtain the latest total power generation Epsum;
[0011] S6. In the ADC sampling interrupt, the sampling value of the bus voltage is obtained, and the theoretical value of the bus voltage is calculated according to the gain of the bus voltage sampling circuit. The theoretical value of the bus voltage is compared with the lower limit value of the alarm set for the bus voltage. If the theoretical value of the bus voltage is less than or equal to the lower limit value of the alarm set for the bus voltage, the total power generation Epsum is written into the storage device for storage.
[0012] As an optimization solution of the present invention, the ADC sampling interruption period is at least N times faster than the PWM output interruption frequency, where N is the calculation period of the sampling average value.
[0013] As an optimization solution of the present invention, in step S5, the total power generation Epsum needs to first read an initial value from the storage device. If the initial value is all 1, it means that the power generation has not been stored before, the total power generation Epsum; after obtaining the total power generation Epsum, EPts is added to the total power generation Epsum to obtain the latest total power generation Epsum.
[0014] As an optimization solution of the present invention, before step S1, a second-order Bessel filter circuit is used to perform hardware filtering after acquiring the sampled signal.
[0015] As an optimization solution of the present invention, the sampling front-stage voltage is sampled using a voltage division method to obtain a sampling signal, and the current passes through a Hall sensor to obtain a sampling signal.
[0016] The present invention has positive effects: 1) The present invention reduces the complexity of existing hardware design solutions, improves algorithm accuracy, improves system reliability, and performs inverter power generation statistics.
[0017] 2) The present invention can use fewer devices and simple control logic to complete the statistics and storage of the inverter power generation. Through the use of algorithms, the statistics of power generation are simpler and more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative work, among which:
[0019] Figure 1 is a flow chart of ADC sampling interruption of the present invention;
[0020] Figure 2 is a flow chart of the PWM output function of the present invention;
[0021] Figure 3 This is the input voltage hardware filter circuit diagram of the present invention;
[0022] Figure 4 It is the main flow chart of the embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0024] like Figure 1-2 As shown, the present invention discloses a method for statistically controlling the power generation of an inverter, wherein the ADC sampling of the photovoltaic current and the photovoltaic voltage is adopted Figure 3 The hardware circuit is used for filtering, the sampling signal is obtained by voltage division of the sampling front-stage voltage, and the current is obtained by the Hall sensor. After obtaining the sampling signal, the second-order Bessel filter circuit is used for hardware filtering; the digital filtering algorithm combined with the first-order low-pass filter is used for software filtering to improve the anti-interference accuracy of current and voltage sampling.
[0025] After the ADC hardware sampling is completed, the software sets the ADC sampling interrupt. The ADC sampling interrupt cycle is at least N times faster than the PWM output interrupt frequency (N is the calculation cycle of the sampling average value). The ADC sampling values of the photovoltaic current and voltage are first obtained, and the sampling values of N cycles are accumulated to obtain the average sampling value. According to the gain of the photovoltaic current and voltage sampling circuit of the sampling corresponding channel, the theoretical value of the current and voltage is calculated. After obtaining the theoretical value, the digital first-order low-pass filtering algorithm is used to obtain the average value Upv_Mean and Ipv_Mean of the current and voltage of N cycles.
[0026] When the PWM output function is set in the DSP / MCU chip, the output period Ts is calculated and set as a PWM peripheral interrupt. In the interrupt of the photovoltaic MPPT algorithm (PWM output interrupt), the sampled Upv_Mean and Ipv_Mean are multiplied to obtain the power Ppv_Mean; then Ppv_Mean is multiplied by the period Ts to obtain the average power generation EPts in the period. The total power generation EPsum needs to read the initial value from the storage device first. If the initial value is all 1, it means that the power generation has not been stored before, EPsum = 0; after obtaining EPsum, EPts is added to EPsum to obtain the latest EPsum.
[0027] In the ADC sampling interrupt, the sampling value of the bus voltage is obtained, and the theoretical value of the bus voltage is calculated according to the gain of the bus voltage sampling circuit. The theoretical value of the bus voltage is compared with the lower limit value (UdcmLow) of the alarm set for the bus voltage. If the theoretical value of the bus voltage is less than or equal to the lower limit value of the alarm set for the bus voltage (i.e., the DSP / MCU power failure alarm value), the total power generation Epsum is written into the storage device for storage.
[0028] When implementing, Figure 4 As shown, initialize ADC and PWM, execute the main function operation logic, including ADC sampling interrupt control process ( Figure 1 ) and PWM interrupt power statistics control process ( Figure 2 ).
[0029] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for statistically controlling power generation of an inverter, It is characterized in that The following steps are involved: S1. By setting the ADC sampling interrupt, the ADC sampling values of the photovoltaic current and the photovoltaic voltage are obtained, and N cycles are accumulated to obtain the ADC average sampling values of the photovoltaic current and the photovoltaic voltage; S2. Calculate the theoretical values of the photovoltaic current and the photovoltaic voltage according to the gains of the photovoltaic current and photovoltaic voltage sampling circuits; S3, after obtaining the theoretical values of the photovoltaic current and the photovoltaic voltage, a digital first-order low-pass filter is performed to obtain the average values Upv_Mean and Ipv_Mean of the photovoltaic current and the photovoltaic voltage over N cycles respectively; S4, when the PWM output is interrupted, Upv_Mean and Ipv_Mean are multiplied to obtain the power Ppv_Mean; then Ppv_Mean is multiplied by the period Ts to obtain the average power generation Epts in the period; S5, adding the average power generation Epts of the period Ts and the total power generation Epsum to obtain the latest total power generation Epsum; S6. In the ADC sampling interrupt, the sampling value of the bus voltage is obtained, and the theoretical value of the bus voltage is calculated according to the gain of the bus voltage sampling circuit. The theoretical value of the bus voltage is compared with the lower limit value of the alarm set for the bus voltage. If the theoretical value of the bus voltage is less than or equal to the lower limit value of the alarm set for the bus voltage, the total power generation Epsum is written into the storage device for storage.
2. The method for controlling the power generation statistics of an inverter according to claim 1, It is characterized in that The ADC sampling interrupt cycle is at least N times faster than the PWM output interrupt frequency, where N is the calculation cycle of the sampling average value.
3. The method for controlling the power generation statistics of an inverter according to claim 2, It is characterized in that In step S5, the total power generation Epsum needs to first read an initial value from the storage device. If the initial value is all 1, it means that the power generation has not been stored before, the total power generation Epsum; after obtaining the total power generation Epsum, EPts is added to the total power generation Epsum to obtain the latest total power generation Epsum.
4. The method for controlling the power generation statistics of an inverter according to claim 1, It is characterized in that Before step S1, a second-order Bessel filter circuit is used to perform hardware filtering after acquiring the sampled signal.
5. The method for controlling the power generation statistics of an inverter according to claim 4, It is characterized in that The sampling signal is obtained by sampling the front-stage voltage using a voltage division method, and the current is obtained by passing through the Hall sensor.