Current calibration method and terminal equipment
By sorting and grouping the current error values and determining the linear compensation relationship, the problem of current measurement error in photovoltaic power generation systems is solved and the accuracy of current measurement is improved.
Patent Information
- Application Number
- CN202411115855.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-03
AI Technical Summary
The existing current measurement methods have errors in photovoltaic power generation systems, which affect the performance and stability of the system.
By obtaining the current error value, sorting the voltages according to the preset sorting method, grouping and determining the linear compensation relationship to reduce measurement errors and improve detection accuracy.
This method can more accurately reflect the relationship between the current error value and the voltage, reduce the measurement error, improve the accuracy of the current measurement, and make the measurement result closer to the actual current value.
Smart Images

Figure CN119064837A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of current calibration, and in particular to a current calibration method and terminal equipment. Background Art
[0002] In photovoltaic (PV) power generation systems, accurate current and voltage measurement is crucial to ensure the performance and stability of PV power generation systems. However, due to environmental factors, equipment aging, and other reasons, there are often errors in the measurement of PV voltage and PV current.
[0003] The existing calibration method will result in a large error in the measured current value. Summary of the invention
[0004] The present invention provides a current calibration method and terminal equipment, which can reduce the error of measuring current value and improve the detection accuracy of PV current.
[0005] In a first aspect, an embodiment of the present invention provides a current calibration method, comprising: obtaining a current error value; sorting the voltages corresponding to the current error values according to a preset sorting method to obtain multiple pairs of sorted data, each pair of sorted data including a voltage and a current error value corresponding to the voltage; grouping the multiple pairs of sorted data according to a change trend of the current error values in the multiple pairs of sorted data to obtain at least one trend group; wherein the change trend of the current error values in the same trend group is consistent; and determining a linear compensation relationship based on the sorted data in each trend group to perform current calibration.
[0006] Optionally, the step of grouping the multiple pairs of sorted data according to the changing trends of the current error values in the multiple pairs of sorted data to obtain at least one trend group includes: grouping the multiple pairs of sorted data according to the changing trends of the current error values in the multiple pairs of sorted data to obtain an upward trend group and a downward trend group.
[0007] Optionally, the steps of grouping multiple pairs of sorted data according to the changing trend of the current error values in the multiple pairs of sorted data, and obtaining an upward trend group and a downward trend group include: determining a characteristic value according to the difference between the nth current error value and the n-1th current error value in the multiple pairs of sorted data; wherein n is an integer greater than or equal to 2; if at least three characteristic values obtained continuously are greater than or equal to a first set value, the sorted data corresponding to the characteristic value are formed into an upward trend group; if at least three characteristic values obtained continuously are less than or equal to a second set value, the sorted data corresponding to the characteristic value are formed into a downward trend group.
[0008] Optionally, the linear compensation relationship includes a first linear compensation relationship and a second linear compensation relationship; the linear compensation relationship is determined according to the sorted data in each trend group to perform current calibration, including: determining the first linear compensation relationship according to the first sorted data, the second sorted data and the linear function expression in the upward trend group; wherein the first sorted data is the sorted data corresponding to the minimum voltage in the upward trend group, and the second sorted data is the sorted data corresponding to the maximum voltage in the upward trend group; determining the second linear compensation relationship according to the third sorted data, the fourth sorted data and the linear function expression in the downward trend group; wherein the third sorted data is the sorted data corresponding to the maximum voltage in the downward trend group, and the fourth sorted data is the sorted data corresponding to the minimum voltage in the downward trend group.
[0009] Optionally, the first sorting data is (x 1 ,y 1 ), the second sorting data is (x 2 ,y 2 ), the analytical expression of the linear function is y=kx+b;
[0010] The step of determining the first linear compensation relationship according to the first sorted data, the second sorted data and the linear function analytical expression in the upward trend group includes: 1 ,y 1 ) and the second sorted data (x 2 ,y 2 ) is substituted into the analytical expression of the linear function to obtain the following system of two-variable linear equations:
[0011]
[0012] Solve the two-variable linear equation system and determine the first linear compensation relationship as:
[0013]
[0014] Among them, x 1 Represents the voltage in the first sorted data, y 1 represents the current error value in the first sorted data, x 2 represents the voltage in the second sorted data, y 2 represents the current error value in the second sorted data, y represents the dependent variable of the linear function, x represents the independent variable of the linear function, k represents the proportional coefficient, and b represents the intersection of the linear function curve and the y-axis.
[0015] Optionally, the third sorting data is (x 3 ,y 3 ), the fourth sorting data is (x 2 ,y 2), the analytical expression of the linear function is y=kx+b; the step of determining the second linear compensation relationship according to the third sorted data, the fourth sorted data and the analytical expression of the linear function in the downward trend group includes: converting the third sorted data (x 3 ,y 3 ) and the fourth sorted data (x 2 ,y 2 ) is substituted into the analytical expression of the linear function to obtain the following system of two-variable linear equations:
[0016]
[0017] Solve the two-variable linear equation system and determine the second linear compensation relationship as follows:
[0018]
[0019] Among them, x 3 represents the voltage in the third sorted data, y 3 represents the current error value in the third sorted data, x 2 represents the voltage in the fourth sorted data, y 2 represents the current error value in the fourth sorting data, y represents the dependent variable of the linear function, y represents the independent variable of the linear function, k represents the proportional coefficient, and b represents the intersection of the linear function curve and the y-axis.
[0020] Optionally, the step of obtaining the current error value includes: obtaining multiple actual current values and multiple measured current values corresponding to each voltage; determining the average value of the actual current values and the average value of the measured current values corresponding to each voltage based on the multiple actual current values and the multiple measured current values; determining the current error value corresponding to each voltage based on the difference between the average value of the measured current values and the average value of the actual current values.
[0021] Optionally, the step of obtaining a plurality of actual current values and a plurality of measured current values corresponding to each voltage includes: continuously obtaining a plurality of actual current values and a plurality of measured current values corresponding to each voltage at intervals of a preset voltage.
[0022] Optionally, after the step of determining the current error value corresponding to each voltage based on the difference between the average value of the measured current value and the average value of the actual current value, the current calibration method also includes: determining whether the average value of the measured current value is an abnormal current value; wherein the abnormal current value is the average value of the measured current value whose absolute value of the difference with the average value of the actual current value is greater than or equal to a third set value; in the case where the average value of the measured current value is an abnormal current value, eliminating the current error value corresponding to the average value of the measured current value; in the case where the average value of the measured current value is not an abnormal current value, retaining the current error value corresponding to the average value of the measured current value.
[0023] Optionally, the third set value is 1% of the rated current.
[0024] In a second aspect, an embodiment of the present invention provides a terminal device, comprising: one or more processors; a memory for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the one or more processors implement the current calibration method provided by any embodiment of the present invention.
[0025] The current calibration method provided by the embodiment of the present invention first obtains the current error value and sorts the corresponding voltage according to the preset sorting method, so as to ensure the orderliness and systematicness of the data. This orderly processing method helps to clearly present the corresponding relationship between the voltage and current error values, and avoids the confusion and disorder of the data from interfering with the subsequent analysis. Secondly, the sorted data is grouped according to the change trend of the current error value, and the sorted data with similar change characteristics can be grouped together. This can fully take into account the local characteristics of the data, because the relationship between the current error value and the voltage may be different under different working conditions or environments. Grouping processing can more accurately capture these local change laws, rather than generally processing all data uniformly. Finally, based on the sorted data in each trend group, a linear compensation relationship is determined, and compensation models can be established for different current error value change trends. Since the data in each trend group has a consistent change trend, the established linear compensation relationship can better fit the characteristics of the group of arranged data, thereby improving the accuracy of the linear compensation relationship. Compared with establishing a single linear compensation relationship for the entire sorted data set, this grouping processing and separate modeling method can better adapt to the diversity and complexity of the data, and more accurately reflect the true relationship between the current error value and the voltage. In addition, the current value can be calibrated according to the linear compensation relationship, and the accurate linear compensation relationship can reduce the measurement error, improve the accuracy of the current measurement, and make the measurement result closer to the actual current value.
[0026] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0028] Figure 1is a flow chart of a current calibration method provided by an embodiment of the present invention;
[0029] Figure 2 is a flow chart of another current calibration method provided by an embodiment of the present invention;
[0030] Figure 3 It is a fitting curve diagram formed by an upward trend group and a downward trend group provided by an embodiment of the present invention;
[0031] Figure 4 is a flow chart of another current calibration method provided by an embodiment of the present invention;
[0032] Figure 5 is a flow chart of another current calibration method provided by an embodiment of the present invention;
[0033] Figure 6 is a flow chart of another current calibration method provided by an embodiment of the present invention;
[0034] Figure 7 It is a structural diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] Figure 1is a flow chart of a current calibration method provided by an embodiment of the present invention. The current calibration method provided by an embodiment of the present invention can be applied to the case of measuring the DC side current of the inverter in the PV system. The method can be executed by the controller of the inverter and / or the host computer of the controller. The controller can be implemented in software and / or hardware and can be integrated in the PV system. Exemplarily, the controller can include a single-chip microcomputer and can also include a digital signal processor (DSP).
[0038] like Figure 1 As shown, the current calibration method provided by the embodiment of the present invention specifically includes the following steps:
[0039] S101. Obtain a current error value.
[0040] The current error value refers to the error that occurs when measuring current. The current error value is the error of the measured current value relative to the actual current value. At the same voltage level, when the number of measured current values obtained is different, the value of the current error value is different. Specifically, at the same voltage level, when a measured current value is obtained, the current error value is equal to the difference between the measured current value and the actual current value. At the same voltage level, when multiple measured current values and multiple actual current values are obtained, the current error value is equal to the difference between the average value of the measured current value and the average value of the actual current value. For example, when the voltage is 100 V, if the five measured current values obtained are a1, a2, a3, a4 and a5, and the five actual current values obtained are b1, b2, b3, b4 and b5, then the average value of the measured current values = (a1+a2+a3+a4+a5) / 5, the average value of the actual current values = (b1+b2+b3+b4+b5) / 5, and the current error value = (a1+a2+a3+a4+a5) / 5-(b1+b2+b3+b4+b5) / 5.
[0041] In some embodiments, the voltage can be preset at each interval, and the actual current value and the measured current value corresponding to each voltage can be continuously obtained. Exemplarily, the actual current value corresponding to each voltage can be obtained by a power analyzer, and the actual current value obtained can be transmitted to a host computer connected to the controller, and the measured current value corresponding to each voltage can be obtained by a current sensor, and the measured current value obtained can be transmitted to a host computer connected to the controller. Exemplarily, the actual current value and the measured current value corresponding to each voltage are continuously obtained at each interval of 5V, and the current error value is determined according to the difference between the measured current value and the actual current value. Before obtaining the actual current value corresponding to each voltage through the power analyzer, the power analyzer can be calibrated to improve the measurement accuracy of the power analyzer and enhance the reliability of the actual current value.
[0042] S102 , sorting the voltages corresponding to the current error values according to a preset sorting method to obtain a plurality of pairs of sorted data, each pair of sorted data including a voltage and a current error value corresponding to the voltage.
[0043] The preset sorting method refers to a pre-set rule for arranging the voltages corresponding to the current error values. This rule can be in various forms, for example, the voltages can be sorted from small to large or from large to small.
[0044] According to the preset sorting method, the voltages corresponding to the current error values are sorted. After the sorting operation, multiple groups of sorted data are obtained. Each group of sorted data consists of two parts, one is the voltage, and the other is the current error value corresponding to the voltage.
[0045] S103 , grouping the multiple pairs of sorted data according to the change trends of the current error values in the multiple pairs of sorted data to obtain at least one trend group.
[0046] Among them, the change trend of the current error value in the same trend group is consistent. The change trend of the current error value refers to the regular change direction and characteristics of the current error value as the voltage changes in multiple pairs of sorted data. Generally speaking, it includes at least the following change trends: Monotonically increasing trend: the current error value continues to increase with the increase of voltage. Monotonically decreasing trend: the current error value continues to decrease with the increase of voltage. Maintain stability: the current error value is relatively stable within a certain range, and there is no obvious increase or decrease trend with the change of voltage or other factors. Fluctuating change: the current error value shows irregular ups and down fluctuations, and may have a certain increase or decrease trend in some areas, but it does not have a clear single directionality as a whole. When grouping, the current error values with the same change trend and their corresponding voltage data are grouped into the same trend group, which is helpful for centralized analysis and processing of data with similar characteristics.
[0047] S104 : Determine a linear compensation relationship according to the sorted data in each trend group to perform current calibration.
[0048] Determining a linear compensation relationship refers to finding a linear mathematical expression or function that describes the relationship between the voltage and current error values in each trend group. In a trend group, the trend of the current error value is consistent. By analyzing the sorted data in the trend group, you can try to fit these data points with a linear relationship. For example, you can use a method such as the least squares method to determine a straight line equation that best represents the trend of these data points. Assuming that the voltage is represented by the variable x and the current error value is represented by the variable y, the linear compensation relationship may be similar to the form of y=ax+b, where a and b are coefficients determined by data analysis.
[0049] After the linear compensation relationship is determined, the current value can be calibrated according to the linear compensation relationship. When a current value that needs to be calibrated is obtained, its corresponding voltage is substituted into the linear compensation relationship to calculate the corresponding current error value, thereby achieving the calibration of the current value.
[0050] For example, if the linear compensation relationship is known to be y=0.5x+1, for a current value of 10 with a voltage, substituting x=10 into the linear compensation relationship, we can get the current error value y=0.5)10+1=6. At this time, the current value plus the current error value is the calibrated current value. In this way, the current value can be corrected and calibrated according to the linear compensation relationship between the voltage and current error values, which can reduce the measurement error, improve the accuracy of the current measurement, and make the measurement result closer to the actual current value.
[0051] The current calibration method provided by the embodiment of the present invention first obtains the current error value and sorts the corresponding voltage according to the preset sorting method, so as to ensure the orderliness and systematicness of the data. This orderly processing method helps to clearly present the corresponding relationship between the voltage and current error values, and avoids the confusion and disorder of the data from interfering with the subsequent analysis. Secondly, the sorted data is grouped according to the change trend of the current error value, and the sorted data with similar change characteristics can be grouped together. This can fully take into account the local characteristics of the data, because the relationship between the current error value and the voltage may be different under different working conditions or environments. Grouping processing can more accurately capture these local change laws, rather than generally processing all data uniformly. Finally, based on the sorted data in each trend group, a linear compensation relationship is determined, and compensation models can be established for different current error value change trends. Since the data in each trend group has a consistent change trend, the established linear compensation relationship can better fit the characteristics of the group of arranged data, thereby improving the accuracy of the linear compensation relationship. Compared with establishing a single linear compensation relationship for the entire sorted data set, this grouping processing and separate modeling method can better adapt to the diversity and complexity of the data, and more accurately reflect the true relationship between the current error value and the voltage. In addition, the current value can be calibrated according to the linear compensation relationship, and the accurate linear compensation relationship can reduce the measurement error, improve the accuracy of the current measurement, and make the measurement result closer to the actual current value.
[0052] Figure 2 FIG. 1 is a flow chart of another current calibration method provided by an embodiment of the present invention. Figure 2 As shown, the current calibration method may include:
[0053] S201. Obtain a current error value.
[0054] S202 , sorting the voltages corresponding to the current error values according to a preset sorting method to obtain a plurality of pairs of sorted data, each pair of sorted data including a voltage and a current error value corresponding to the voltage.
[0055] S203 , grouping the multiple pairs of sorted data according to the change trends of the current error values in the multiple pairs of sorted data to obtain an upward trend group and a downward trend group.
[0056] Specifically, the characteristic value is determined according to the difference between the nth current error value and the n-1th current error value in the plurality of pairs of sorted data; wherein n is an integer greater than or equal to 2. That is, the characteristic value D n =y n -y n-1 , where y n Represents the nth current error value in multiple pairs of sorted data, y n-1 Represents the n-1th current error value in multiple pairs of sorted data.
[0057] If at least three consecutively acquired eigenvalues are greater than or equal to the first set value, the sorted data corresponding to the eigenvalues are formed into an upward trend group. If at least three consecutively acquired eigenvalues are less than or equal to the second set value, the sorted data corresponding to the eigenvalues are formed into a downward trend group.
[0058] The first setting value is any value greater than 0, and the second setting value is any value less than 0. The specific values of the first setting value and the second setting value can be adjusted and optimized according to actual needs. For example, the appropriate first setting value and the second setting value can be selected according to the specific PV system environment and equipment characteristics.
[0059] It should be noted that if the first set value is large, an upward trend group will only be formed when the characteristic value is relatively large. This may cause the system to be more strict in identifying the upward trend, and some smaller fluctuations or changes will not be easily classified as an upward trend group. If the first set value is small, the host computer connected to the controller will more easily identify some relatively small characteristic value changes as upward trends, which may make the formation of an upward trend group more sensitive. For the second set value, its value size also has a similar effect. When the absolute value of the second set value is large, the characteristic value needs to drop to a relatively low level to form a downward trend group. When the absolute value of the second set value is small, the characteristic value may be classified as a downward trend group with a slight drop.
[0060] For example, assuming that the first setting value is 0.01, if (D n ≥0.01)&&(D n+1 ≥0.01)&&(D n+2 ≥0.01), then the n-1th sorted data (x n-1,y n-1 ), the nth sorted data (x n ,y n ), the n+1th sorted data (x n+1 ,y n+1 ), the n+2th sorted data (x n+2 ,y n+2 ) forms an upward trend group, where D n is the first eigenvalue, D n+1 is the second eigenvalue, D n+2 is the third eigenvalue, x n-1 is the voltage in the n-1th sorted data, y n-1 is the current error value in the n-1th sorted data, x n is the voltage in the nth sorted data, y n is the current error value in the nth sorted data, x n+1 is the voltage in the n+1th sorted data, y n+1 is the current error value in the n+1th sorted data, x n+2 is the voltage in the n+2th sorted data, y n+2 is the current error value in the n+2th sorted data. It can be understood that the upward trend group does not only include these four sorted data, and any sorted data that satisfies the above relationship can be put into the upward trend group.
[0061] For example, assuming that the second setting value is -0.01, if (D n ≤-0.01)&&(D n+1 ≤-0.01)&&(D n+2 ≤-0.01), then the n-1th sorted data (x n-1 ,y n-1 ), the nth sorted data (x n ,y n ), the n+1th sorted data (x n+1 ,y n+1 ), the n+2th sorted data (x n+2 ,y n+2 ) forms a downward trend group. It is understandable that the downward trend group does not only include these four sorted data, and any sorted data that satisfies the above relationship can be put into the downward trend group. The linear compensation relationship includes a first linear compensation relationship and a second linear compensation relationship.
[0062] S204: Determine a first linear compensation relationship according to the first sorted data, the second sorted data and the linear function analytical expression in the upward trend group.
[0063] The first sorting data is the sorting data corresponding to the minimum voltage in the upward trend group, and the second sorting data is the sorting data corresponding to the maximum voltage in the upward trend group.
[0064] Figure 3 is a fitting curve diagram formed by an upward trend group and a downward trend group provided by an embodiment of the present invention, referring to Figure 3 , the horizontal axis is voltage U, the unit is V, and the vertical axis is current error value IΔ, the unit is A.
[0065] The first sorted data is (x 1 ,y 1 ), the second sorting data is (x 2 ,y 2 ), the analytical expression of the linear function is y=kx+b. The step of determining the first linear compensation relationship according to the first sorted data, the second sorted data and the analytical expression of the linear function in the upward trend group includes: 1 ,y 1 ) and the second sorted data (x 2 ,y 2 ) is substituted into the analytical expression of the linear function to obtain the following system of two-variable linear equations:
[0066]
[0067] Solve the two-variable linear equation system and determine the first linear compensation relationship as:
[0068]
[0069] Among them, x 1 Represents the voltage in the first sorted data, y 1 represents the current error value in the first sorted data, x 2 represents the voltage in the second sorted data, y 2 represents the current error value in the second sorted data, y represents the dependent variable of the linear function, x represents the independent variable of the linear function, k represents the proportional coefficient, and b represents the intersection of the linear function curve and the y-axis.
[0070] S205 . Determine a second linear compensation relationship according to the third sorted data, the fourth sorted data and the linear function analytical expression in the downward trend group.
[0071] The third sorting data is the sorting data corresponding to the maximum voltage in the downward trend group, and the fourth sorting data is the sorting data corresponding to the minimum voltage in the downward trend group.
[0072] Continue to refer Figure 3 , the fourth sorting data is equal to the second sorting data. The third sorting data is (x 3 ,y 3), the fourth sorting data is (x 2 ,y 2 ), the analytical expression of the linear function is y=kx+b. The step of determining the second linear compensation relationship according to the third sorted data, the fourth sorted data and the analytical expression of the linear function in the downward trend group includes: 3 ,y 3 ) and the fourth sorted data (x 2 ,y 2 ) is substituted into the analytical expression of the linear function to obtain the following system of two-variable linear equations:
[0073]
[0074] Solve the system of linear equations in two variables and determine the second linear relationship as:
[0075]
[0076] Among them, x 3 represents the voltage in the third sorted data, y 3 represents the current error value in the third sorted data, x 2 represents the voltage in the fourth sorted data, y 2 represents the current error value in the fourth sorting data, y represents the dependent variable of the linear function, y represents the independent variable of the linear function, k represents the proportional coefficient, and b represents the intersection of the linear function curve and the y-axis.
[0077] After the first linear compensation relationship and the second linear compensation relationship are determined, the current value may be calibrated according to the first linear compensation relationship or the second linear relationship.
[0078] The current calibration method provided by the embodiment of the present invention divides the arranged data into an upward trend group and a downward trend group according to the change trend of the current error value in multiple pairs of sorted data, which can more finely distinguish and identify different change modes of the current error value, avoid uniform processing of all data, and more efficiently obtain accurate calibration results. Corresponding linear compensation relationships are determined for different trend groups, making the compensation more targeted and accurate, thereby improving the calibration effect.
[0079] Figure 4 FIG. 1 is a flow chart of another current calibration method provided by an embodiment of the present invention. Figure 4 As shown, the current calibration method may include:
[0080] S401. Acquire multiple actual current values and multiple measured current values corresponding to each voltage.
[0081] In some embodiments, a plurality of actual current values corresponding to each voltage can be obtained by a power analyzer, and the obtained plurality of actual current values can be transmitted to a host computer connected to a controller, and a plurality of measured current values corresponding to each voltage can be obtained by a sensor, and the obtained plurality of measured current values can be transmitted to a host computer connected to a controller. Optionally, a plurality of actual current values corresponding to each voltage and a plurality of measured current values can be continuously obtained at each interval of a preset voltage. Exemplarily, a plurality of actual current values and a plurality of measured current values corresponding to each voltage can be continuously obtained at each interval of 5V.
[0082] S402: Determine an average value of the actual current values and an average value of the measured current values corresponding to each voltage according to the multiple actual current values and the multiple measured current values.
[0083] For example, when the voltage is 100 V, if the five measured current values obtained are a1, a2, a3, a4 and a5, and the five actual current values obtained are b1, b2, b3, b4 and b5, then the average value of the measured current values = (a1+a2+a3+a4+a5) / 5, the average value of the actual current values = (b1+b2+b3+b4+b5) / 5, and the current error value = (a1+a2+a3+a4+a5) / 5-(b1+b2+b3+b4+b5) / 5.
[0084] S403: Determine the current error value corresponding to each voltage according to the difference between the average value of the measured current value and the average value of the actual current value.
[0085] S404: Determine whether the average value of the measured current values is an abnormal current value.
[0086] The abnormal current value is the average value of the measured current value whose absolute value of the difference with the average value of the actual current value is greater than or equal to the third set value. The embodiment of the present invention does not limit the specific value of the third set value, and the third set value can be adjusted according to the error of the calibration result. In some embodiments, the third set value can be 1% of the rated current. Exemplarily, the third set value can be 0.5A.
[0087] When the average value of the measured current value is an abnormal current value, the current error value corresponding to the average value of the measured current value is eliminated; when the average value of the measured current value is not an abnormal current value, the current error value corresponding to the average value of the measured current value is retained. That is, when the average value of the measured current value is an abnormal current value, step S405 is executed, and then step S404 is returned to be executed. When multiple measured current values are not abnormal current values, step S406 is executed.
[0088] S405 , eliminating the current error value corresponding to the average value of the measured current value.
[0089] S406. Keep the current error value corresponding to the average value of the measured current value.
[0090] S407 , sorting the voltages corresponding to the current error values according to a preset sorting method to obtain a plurality of pairs of sorted data, each pair of sorted data including a voltage and a current error value corresponding to the voltage.
[0091] S408 , grouping the multiple pairs of sorted data according to the change trends of the current error values in the multiple pairs of sorted data to obtain at least one trend group.
[0092] S409 , determining a linear compensation relationship according to the sorted data in each trend group to perform current calibration.
[0093] The current calibration method provided by the embodiment of the present invention can reduce the random errors and uncertainties that may exist in a single measurement by obtaining multiple actual current values and multiple measured current values at the same voltage level, and calculating the average value of the actual current values and the average value of the measured current values, thereby more accurately reflecting the actual situation. In the case where the average value of the measured current value is an abnormal current value, the current error value corresponding to the average value of the measured current value is eliminated, so that the remaining data can better represent the normal current measurement situation, avoid the current error value corresponding to the abnormal current value from having an excessive impact on the overall calibration result, and make the calibration result closer to the actual situation, that is, it helps to more accurately determine the linear compensation relationship, so as to more effectively calibrate the current value.
[0094] Figure 5 FIG. 1 is a flow chart of another current calibration method provided by an embodiment of the present invention. Figure 5 As shown, the current calibration method may include:
[0095] S501. Acquire multiple actual current values and multiple measured current values corresponding to each voltage.
[0096] S502: Determine an average value of the actual current values and an average value of the measured current values corresponding to each voltage according to the multiple actual current values and the multiple measured current values.
[0097] S503: Determine the current error value corresponding to each voltage according to the difference between the average value of the measured current value and the average value of the actual current value.
[0098] S504: Determine whether the average value of the measured current values is an abnormal current value.
[0099] If the average value of the measured current values is an abnormal current value, step S505 is executed, and then the process returns to step S504. If the plurality of measured current values are not abnormal current values, step S506 is executed.
[0100] S505 , eliminating the current error value corresponding to the average value of the measured current value.
[0101] S506. Keep the current error value corresponding to the average value of the measured current value.
[0102] S507 , sorting the voltages corresponding to the current error values according to a preset sorting method to obtain a plurality of pairs of sorted data, each pair of sorted data including a voltage and a current error value corresponding to the voltage.
[0103] S508 , grouping the multiple pairs of sorted data according to the change trends of the current error values in the multiple pairs of sorted data to obtain an upward trend group and a downward trend group.
[0104] S509: Determine a first linear compensation relationship according to the first sorted data, the second sorted data and the linear function analytical expression in the upward trend group.
[0105] S510, determining a second linear compensation relationship according to the third sorted data, the fourth sorted data and the linear function analytical expression in the downward trend group.
[0106] Figure 6 FIG. 1 is a flow chart of another current calibration method provided by an embodiment of the present invention. Figure 6 As shown, the current calibration method may include:
[0107] S601. Measuring instrument calibration and measuring instrument settings.
[0108] Specifically, before obtaining multiple actual current values and multiple measured current values corresponding to each voltage, it is necessary to calibrate the measuring instrument (such as a power analyzer) and set the voltage intervals to obtain multiple actual current values. By calibrating the measuring instrument, the accuracy of the measuring instrument itself can be ensured, and the data deviation caused by the error of the measuring instrument can be reduced, thereby obtaining a more accurate actual current value.
[0109] S602: Signal acquisition.
[0110] Specifically, signal acquisition is the step of obtaining multiple actual current values and multiple measured current values corresponding to each voltage.
[0111] S603: Signal processing.
[0112] Specifically, signal processing is the step of determining the average value of the actual current values and the average value of the measured current values corresponding to each voltage based on multiple actual current values and multiple measured current values, and determining the current error value corresponding to each voltage based on the difference between the average value of the measured current values and the average value of the actual current values.
[0113] S604: Determine whether the average value of the measured current values is an abnormal current value.
[0114] S605: Eliminate this data.
[0115] Specifically, eliminating this data is a step of eliminating the current error value corresponding to the average value of the measured current value.
[0116] S606. Data collection and backup.
[0117] Specifically, data collection and backup are steps of retaining the current error value corresponding to the average value of the measured current value.
[0118] S607: Data trend grouping processing.
[0119] Specifically, the data trend grouping process is to sort the voltages corresponding to the current error values according to a preset sorting method to obtain multiple pairs of sorted data, each pair of sorted data including a voltage and a current error value corresponding to the voltage.
[0120] S608, obtaining upward trend group data.
[0121] S609, obtaining downward trend group data.
[0122] Specifically, obtaining the upward trend group data and obtaining the downward trend group data are steps of grouping the multiple pairs of sorted data according to the changing trends of the current error values in the multiple pairs of sorted data to obtain the upward trend group and the downward trend group.
[0123] S610, fitting the calibration curve and scope.
[0124] Specifically, fitting the calibration curve and scope is the step of determining the first linear compensation relationship based on the first sorted data, the second sorted data and the linear function expression in the upward trend group, and determining the second linear compensation relationship based on the third sorted data, the fourth sorted data and the linear function expression in the downward trend group.
[0125] The scope refers to the voltage range in which the calibration curve (i.e., the first linear compensation relationship and the second linear compensation relationship) can be accessed and used in the program. Since the fitting curve is obtained based on the measurement data within a specific voltage range, its scope is limited to this specific voltage range. In practical applications, if this specific voltage range is exceeded, the accuracy of the fitting curve may be reduced. However, in some cases, if the characteristics of the system are similar within a wider voltage range, this fitting curve can also be used to a certain extent.
[0126] S611. The calibration curve and the scope are written into the controller of the inverter.
[0127] Writing the calibration curve and the scope into the controller of the inverter is to transmit the first linear compensation relationship and the second linear compensation relationship to the controller of the inverter, and the controller of the inverter can calibrate the current value according to the first linear compensation relationship or the second linear compensation relationship.
[0128] Figure 7 It is a structural diagram of a terminal device provided by an embodiment of the present invention. Figure 7 The terminal device 50 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0129] like Figure 7 As shown, the terminal device 50 includes one or more processors 51; a memory for storing one or more computer programs. When the one or more computer programs are executed by the one or more processors, the one or more processors implement the current calibration method provided by any embodiment of the present invention.
[0130] The processor 51 is connected to the memory in communication, and the memory may be a read-only memory (ROM) 52, a random access memory (RAM) 53, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory 52 or the computer program loaded from the storage unit 58 to the random access memory 53. In the RAM 53, various programs and data required for the operation of the credit rating determination device 50 can also be stored. The processor 51, the ROM 52, and the RAM 53 are connected to each other via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.
[0131] A number of components in the terminal device 50 are connected to the I / O interface 55, including: an input unit 56, such as a keyboard, a mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a disk, an optical disk, etc.; and a communication unit 59, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 59 allows the terminal device 50 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0132] The processor 51 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The processor 51 performs the various methods and processes described above, such as the current calibration method.
[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0134] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0135] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A current calibration method, It is characterized in that include: Get the current error value; Sorting the voltages corresponding to the current error values according to a preset sorting method to obtain a plurality of pairs of sorted data, each pair of the sorted data comprising a voltage and a current error value corresponding to the voltage; Grouping the plurality of pairs of sorted data according to the change trends of the current error values in the plurality of pairs of sorted data to obtain at least one trend group; wherein the change trends of the current error values in the same trend group are consistent; A linear compensation relationship is determined based on the sorted data in each of the trend groups to perform current calibration.
2. The current calibration method according to claim 1, It is characterized in that The step of grouping the plurality of pairs of sorted data according to the change trends of the current error values in the plurality of pairs of sorted data to obtain at least one trend group comprises: The plurality of pairs of sorted data are grouped according to the change trends of the current error values in the plurality of pairs of sorted data to obtain an upward trend group and a downward trend group.
3. The current calibration method according to claim 2, It is characterized in that The step of grouping the plurality of pairs of sorted data according to the change trends of the current error values in the plurality of pairs of sorted data to obtain an upward trend group and a downward trend group comprises: Determine a characteristic value according to a difference between the nth current error value and the n-1th current error value in a plurality of pairs of the sorted data; wherein n is an integer greater than or equal to 2; If at least three of the characteristic values obtained continuously are all greater than or equal to the first set value, the sorted data corresponding to the characteristic values are formed into an upward trend group; If at least three of the characteristic values obtained continuously are all less than or equal to the second set value, the sorted data corresponding to the characteristic values are formed into a downward trend group.
4. The current calibration method according to claim 2, It is characterized in that The linear compensation relationship includes a first linear compensation relationship and a second linear compensation relationship; The step of determining a linear compensation relationship according to the sorted data in each trend group to perform current calibration comprises: Determine the first linear compensation relationship according to the first sorting data, the second sorting data and the linear function analytical expression in the upward trend group; wherein the first sorting data is the sorting data corresponding to the minimum voltage in the upward trend group, and the second sorting data is the sorting data corresponding to the maximum voltage in the upward trend group; The second linear compensation relationship is determined according to the third sorting data, the fourth sorting data and the linear function analytical expression in the downward trend group; wherein the third sorting data is the sorting data corresponding to the maximum voltage in the downward trend group, and the fourth sorting data is the sorting data corresponding to the minimum voltage in the downward trend group.
5. The current calibration method according to claim 4, It is characterized in that The first sorting data is (x 1 ,y 1 ), the second sorting data is (x 2 ,y 2 ), the analytical expression of the linear function is y=kx+b; The step of determining the first linear compensation relationship according to the first sorted data, the second sorted data and the linear function analytical expression in the upward trend group comprises: The first sorted data (x 1 ,y 1 ) and the second sorted data (x 2 ,y 2 ) is substituted into the analytical expression of the linear function to obtain the following system of two-variable linear equations: Solve the two-variable linear equation system to determine the first linear compensation relationship as follows: Among them, x 1 represents the voltage in the first sorted data, y 1 represents the current error value in the first sorted data, x 2 The voltage in the second sorted data, y 2 represents the current error value in the second sorted data, y represents the dependent variable of the linear function, x represents the independent variable of the linear function, k represents the proportional coefficient, and b represents the intersection of the linear function curve and the y-axis.
6. The current calibration method according to claim 4, It is characterized in that The third sorting data is (x 3 ,y 3 ), the fourth sorting data is (x 2 ,y 2 ), the analytical expression of the linear function is y=kx+b; The step of determining the second linear compensation relationship according to the third sorted data, the fourth sorted data and the linear function analytical expression in the downward trend group comprises: The third sorted data (x 3 ,y 3 ) and the fourth sorting data (x 2 ,y 2 ) is substituted into the analytical expression of the linear function to obtain the following system of two-variable linear equations: Solve the two-variable linear equation system to determine the second linear compensation relationship: Among them, x 3 represents the voltage in the third sorted data, y 3 represents the current error value in the third sorted data, x 2 represents the voltage in the fourth sorted data, y 2 represents the current error value in the fourth sorted data, y represents the dependent variable of the linear function, y represents the independent variable of the linear function, k represents the proportional coefficient, and b represents the intersection of the linear function curve and the y-axis.
7. The current calibration method according to claim 1, It is characterized in that The step of obtaining the current error value comprises: Acquire multiple actual current values and multiple measured current values corresponding to each of the voltages; Determine an average value of the actual current values and an average value of the measured current values corresponding to each of the voltages according to the plurality of actual current values and the plurality of measured current values; The current error value corresponding to each voltage is determined according to the difference between the average value of the measured current value and the average value of the actual current value.
8. The current calibration method according to claim 7, It is characterized in that The step of obtaining a plurality of actual current values and a plurality of measured current values corresponding to each of the voltages comprises: At each preset voltage interval, a plurality of actual current values and a plurality of measured current values corresponding to each of the voltages are continuously acquired.
9. The current calibration method according to claim 7, It is characterized in that After the step of determining the current error value corresponding to each of the voltages according to the difference between the average value of the measured current value and the average value of the actual current value, the current calibration method further includes: Determine whether the average value of the measured current value is an abnormal current value; wherein the absolute value of the difference between the abnormal current value and the average value of the actual current value is greater than or equal to the average value of the measured current value of a third set value; In a case where the average value of the measured current values is the abnormal current value, eliminating the current error value corresponding to the average value of the measured current values; When the average value of the measured current values is not the abnormal current value, the current error value corresponding to the average value of the measured current values is retained.
10. The current calibration method according to claim 9, It is characterized in that The third set value is 1% of the rated current.
11. A terminal device, It is characterized in that include: one or more processors; a memory for storing one or more computer programs, When one or more computer programs are executed by one or more processors, the one or more processors implement the current calibration method according to any one of claims 1 to 10.
