Current measurement method and system, electronic equipment, readable storage medium and program product

By combining the current measurement method of linear arrays and square arrays, the adaptive compensation algorithm and compensation coil eliminate crosstalk magnetic field, the accuracy of current measurement and anti-external magnetic crosstalk capability are improved, and the complex electromagnetic environment is adapted.

CN120468484APending Publication Date: 2025-08-12SOUTHERN POWER GRID DIGITAL GRID RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510617292.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

Traditional current sensors have problems with magnetic saturation and DC bias, and array current sensors have shortcomings in their ability and accuracy in anti-external magnetic crosstalk.

Method used

Using a current measurement method combining linear arrays and square arrays, an adaptive compensation algorithm is established through machine learning, and the position and current carrying size of the external crosstalk wire are determined based on the output signal. The compensation coil is used to generate a supplementary magnetic field to eliminate the impact of the crosstalk magnetic field, and improve the measurement accuracy.

Benefits of technology

The array structure's anti-external magnetic crosstalk capability and current measurement accuracy are improved, and adapted to complex electromagnetic environments, solving the problem of insufficient anti-external magnetic crosstalk and accuracy of traditional array structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120468484A_ABST
    Figure CN120468484A_ABST
Patent Text Reader

Abstract

The invention relates to a current measurement method and system, electronic equipment, a readable storage medium and a program product. Comprising the following steps: determining a first current error according to an output signal of a linear array and an output signal of a square array; according to the first current error and a pre-established mapping relation, determining the position of the external crosstalk wire and the current-carrying size; according to the position of the external crosstalk wire and the size of the carrying current, through a self-adaptive compensation algorithm established by machine learning, the compensation current corresponding to each compensation coil is determined; the compensation coil is controlled by the driving circuit to generate a supplementary magnetic field so as to eliminate the influence of a crosstalk magnetic field; and determining the current value of the wire to be measured according to the output signal of the linear array or the output signal of the square array. By adopting the method, the square array and the linear array are combined, the magnetic field is compensated adaptively, and the external magnetic crosstalk resistance and the current measurement precision of the array structure can be improved. Meanwhile, the external magnetic crosstalk resistance and the measurement precision are considered, and the problems existing in a traditional array structure are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of current measurement technology, and in particular to a current measurement method, system, electronic device, computer-readable storage medium, and computer program product. Background Art

[0002] Traditional current sensors often use an iron core structure, which can cause problems such as magnetic saturation and DC bias during operation. Iron cores also have inherent disadvantages such as large size, heavy weight, and high cost, significantly limiting their application in power systems. Consequently, array current sensors were developed and quickly became a popular research area in current sensing technology. Array current sensors forgo the iron core structure and offer advantages such as small size, light weight, low cost, and a wide linear measurement range. Furthermore, magnetically sensitive elements can be packaged as chips and mounted on printed circuit boards, further reducing the size of the array structure and keeping power consumption very low.

[0003] At present, magnetic sensitive elements are widely used in the field of current sensing, especially the current sensing technology based on single-axis magnetic sensitive element arrays. Compared with traditional open-loop / closed-loop technology with magnetic focusing rings, it has advantages such as excellent response bandwidth, measurement range and low cost.

[0004] The array structures used in current sensing technology mainly include circular array structure and linear array structure. The circular array structure has good resistance to external magnetic crosstalk but its accuracy is not high. The linear array structure has very high accuracy, but its accuracy is greatly affected by external magnetic crosstalk. Summary of the Invention

[0005] Based on this, it is necessary to provide a current measurement method, system, electronic device, computer-readable storage medium and computer program product to address the above technical problems, which can improve the current measurement accuracy and enable the array structure to have better resistance to external magnetic crosstalk.

[0006] In a first aspect, the present application provides a current measurement method, the method being applied to a control unit, the control unit being configured to collect output signals of a linear array and an output signal of a square array; the linear array comprising a first magnetic sensitive element, a second magnetic sensitive element, and a third magnetic sensitive element; the square array comprising a four-side structure; one side structure in the square array comprising the first magnetic sensitive element, the second magnetic sensitive element, and the third magnetic sensitive element, and the other three side structures each comprising three magnetic sensitive elements; the conductor to be measured being located at the center of the square array;

[0007] The first magnetic sensitive element, the second magnetic sensitive element and the third magnetic sensitive element are placed in corresponding compensation coils; the compensation coils are connected to the driving circuit;

[0008] The method comprises:

[0009] determining a first current error based on the output signal of the linear array and the output signal of the square array;

[0010] Determine the position and current carrying magnitude of the external crosstalk conductor according to the first current error and a pre-established mapping relationship; the mapping relationship is used to characterize the relationship between the position of the external conductor, the current carrying magnitude of the external conductor, and the current error;

[0011] Based on the position and current carrying capacity of the external crosstalk wire, the compensation current corresponding to each compensation coil is determined by an adaptive compensation algorithm; the adaptive compensation algorithm is established through machine learning;

[0012] Based on the compensation current corresponding to each compensation coil, the compensation coil is controlled by the driving circuit to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field;

[0013] The current value of the conductor to be measured is determined according to the output signal of the linear array or the output signal of the square array.

[0014] In one embodiment, before determining the first current error based on the output signal of the linear array and the output signal of the square array, the method further includes:

[0015] In the absence of a crosstalk magnetic field, determining a second current error based on the output signal of the linear array and the output signal of the square array;

[0016] The gain parameter of the square array is adjusted to regulate the output signal of the square array so that the second current error is reduced to a preset threshold.

[0017] In one embodiment, determining the first current error based on the output signal of the linear array and the output signal of the square array includes:

[0018] Calculating a first current value to be measured according to the output signal of the linear array;

[0019] Calculating a second current value to be measured according to the output signal of the square array;

[0020] The difference between the first current value to be measured and the second current value to be measured is calculated to obtain a first current error.

[0021] In one embodiment, calculating the first current value to be measured according to the output signal of the linear array includes:

[0022] The first current value to be measured is calculated based on the output signal of the linear array using a first preset formula; wherein the first preset formula includes:

[0023] ;

[0024] ;

[0025] Where L represents the distance between two adjacent magnetic sensitive elements in the linear array; Indicates the magnetic field strength at the location of the first magnetic sensitive element; Indicates the magnetic field strength at the location of the second magnetic sensitive element; Indicates the magnetic field strength at the location of the third magnetic sensitive element; Indicates the first current value to be measured; is the magnetic permeability of vacuum.

[0026] In one embodiment, calculating the second current value to be measured according to the output signal of the square array includes:

[0027] The second current value to be measured is calculated based on the output signal of the square array using a second preset formula; wherein the second preset formula includes:

[0028] ;

[0029] Where, Indicates the second current value to be measured; represents the magnetic field strength at the location of each magnetic sensitive element included in the square array; r represents the distance between the edge structure and the conductor to be measured; is the magnetic permeability of vacuum.

[0030] In one embodiment, the method further comprises:

[0031] In the absence of a crosstalk magnetic field, the current value of the conductor to be measured is determined according to the output signal of the linear array or the output signal of the square array.

[0032] In a second aspect, the present application further provides a current measurement system, comprising a control unit, a linear array, and a square array; the control unit is configured to collect output signals of the linear array and the square array; the linear array comprises a first magnetic sensitive element, a second magnetic sensitive element, and a third magnetic sensitive element; the square array comprises four side structures; one side structure in the square array comprises the first magnetic sensitive element, the second magnetic sensitive element, and the third magnetic sensitive element, and the other three side structures each comprise three magnetic sensitive elements; the conductor to be measured is located at the center of the square array;

[0033] The first magnetic sensitive element, the second magnetic sensitive element and the third magnetic sensitive element are placed in corresponding compensation coils; the compensation coils are connected to the driving circuit;

[0034] The control unit is specifically used to determine a first current error based on the output signal of the linear array and the output signal of the square array; determine the position and current carrying size of the external crosstalk conductor based on the first current error and a pre-established mapping relationship; the mapping relationship is used to characterize the relationship between the position of the external conductor, the current carrying size of the external conductor and the current error; determine the compensation current corresponding to each compensation coil based on the position and current carrying size of the external crosstalk conductor through an adaptive compensation algorithm; the adaptive compensation algorithm is established through machine learning; based on the compensation current corresponding to each compensation coil, control the compensation coil through a drive circuit to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field; and determine the current value of the conductor to be measured based on the output signal of the linear array or the output signal of the square array.

[0035] In a third aspect, the present application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect above when executing the computer program.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect above.

[0037] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect above.

[0038] The above-mentioned current measurement method, system, electronic device, computer-readable storage medium, and computer program product determine a first current error based on the output signal of the linear array and the output signal of the square array; determine the position and current of the external crosstalk conductor based on the first current error and a pre-established mapping relationship; the mapping relationship is used to characterize the relationship between the position of the external conductor, the current of the external conductor, and the current error; determine the compensation current corresponding to each compensation coil based on the position and current of the external crosstalk conductor through an adaptive compensation algorithm; the adaptive compensation algorithm is established through machine learning; based on the compensation current corresponding to each compensation coil, the compensation coil is controlled by a driving circuit to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field; and determine the current value of the conductor to be measured based on the output signal of the linear array or the output signal of the square array. By combining the square array and the linear array in the above manner, the adaptive compensation magnetic field can improve the array structure's resistance to external magnetic crosstalk and adapt to complex electromagnetic environments. After eliminating the influence of the crosstalk magnetic field, the current value of the conductor to be measured is measured, which can improve the accuracy of current measurement. It can simultaneously take into account the resistance to external magnetic crosstalk and measurement accuracy, solving the problems existing in traditional array structures. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0040] Figure 1 A diagram showing an application environment of a current measurement method according to an embodiment;

[0041] Figure 2 1 is a flow chart of a current measurement method according to an embodiment;

[0042] Figure 3 A schematic diagram of a logic for generating a compensation magnetic field in one embodiment;

[0043] Figure 4 Schematic diagram of the structure of a linear matrix in one embodiment;

[0044] Figure 5 FIG. 1 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0046] The current measurement method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the control unit 102 is used to collect output signals of the linear array 104 and the output signals of the square array 106. The linear array 104 includes a first magnetic sensitive element P1, a second magnetic sensitive element P2, and a third magnetic sensitive element P3. The square array 106 includes a four-side structure. One side of the square array 106 includes the first magnetic sensitive element P1, the second magnetic sensitive element P2, and the third magnetic sensitive element P3, and the other three sides each include three magnetic sensitive elements. That is, the square array 106 includes 12 magnetic sensitive elements P1 to P12. The conductor to be tested is located at the center of the square array. The first magnetic sensitive element P1, the second magnetic sensitive element P2, and the third magnetic sensitive element P3 are placed in corresponding compensation coils 108. The compensation coils 108 are connected to the drive circuit 110.

[0047] The control unit 102 may be a microcontroller unit (MCU) or other unit with data processing and control capabilities. A magnetic sensor element is a sensitive element whose characteristic parameters change significantly with changes in external magnetic field. It is used to sense the magnetic field acting on each magnetic sensor element from the conductor under test. The magnetic sensor elements used in this embodiment may be uniaxial magnetic sensors. The sensitive axes of the magnetic sensors in the square array 106 are oriented clockwise.

[0048] In an exemplary embodiment, Figure 2 As shown, a current measurement method is provided, which is applied to Figure 1 The control unit 102 in FIG. 1 is used as an example to illustrate the invention, including:

[0049] Step 202 : Determine a first current error according to the output signal of the linear array and the output signal of the square array.

[0050] The control unit 102 collects the output signals of the magnetic field changes induced by the magnetic sensitive elements (P1, P2, P3) in the linear array. , Respectively represent the magnetic field strength at the locations of the first magnetic sensitive element P1, the second magnetic sensitive element P2 and the third magnetic sensitive element P3.

[0051] Similarly, the magnetic field changes are sensed by each magnetic sensitive element (P1, P2, ..., P12) in the square array, and the control unit 102 collects its output signal , They respectively represent the magnetic field strengths at the locations of the first magnetic sensitive element P1, ..., and the twelfth magnetic sensitive element P12.

[0052] The first current error is used to characterize the output error between the linear array and the square array. It is understood that if the output of the linear array is close to the output of the square array, the first current error is 0, indicating that there is currently no crosstalk magnetic field. The current value of the conductor to be measured is determined based on the output signal of the linear array or the output signal of the square array. For example, when there is no magnetic field crosstalk from the external conductor, only the current of the conductor to be measured (i.e. Figure 1 The control unit collects the output signal of the linear array. , and the precise current value of the conductor to be measured can be calculated by y1=f(B1,B2,B3).

[0053] Among them, when there is magnetic field crosstalk from the external conductor, there is a current in the conductor to be measured in the array (i.e. Figure 1 The measured current I0) and the crosstalk conductor current (i.e. Figure 1The magnetic field generated by the crosstalk current I1) is calculated based on the output signal of the linear array and the output signal of the square array. cal-线形 =f(B1,B2,B3),I cal-方形 =f(B1-B12), and the difference between the two is taken as the first current error. For example, if the first current error is not zero, continue to step 204.

[0054] Step 204 : determining the position and current carrying magnitude of the external crosstalk conductor according to the first current error and a pre-established mapping relationship; the mapping relationship is used to characterize the relationship between the position of the external conductor, the current carrying magnitude of the external conductor, and the current error.

[0055] Among them, a mapping relationship between the position of the outer conductor, the current size of the outer conductor and the current error is established in advance. After determining the first current error, the outer conductor position and the current size of the outer conductor corresponding to the current first current error are determined by querying the mapping relationship, thereby determining the position of the outer crosstalk conductor and the current size. Exemplarily, the output error between the linear array and the square array is numerically simulated by electromagnetic simulation software. By changing parameters such as the position of the outer conductor and the current size, the change in the array output error is observed, and the mathematical relationship between the position of the outer conductor, the current size of the outer conductor and the current error is fitted. Exemplarily, referring to Figure 1 , the position of the external crosstalk conductor can be expressed based on the angle θ, and the current carrying size can be expressed based on I1.

[0056] Step 206 : Determine the compensation current corresponding to each compensation coil according to the position and current-carrying magnitude of the external crosstalk wire through an adaptive compensation algorithm; the adaptive compensation algorithm is established through machine learning.

[0057] In this case, an adaptive compensation algorithm is established through machine learning. The position and current carrying amount of the external crosstalk conductor are input into the adaptive compensation algorithm, and the compensation current corresponding to each compensation coil at different positions is output. Optionally, the adaptive compensation algorithm corresponds to a preset algorithm model. In a specific implementation, relevant data is collected to form sample data. The preset algorithm model is trained based on this sample data. The parameters of the preset algorithm model are continuously optimized to minimize prediction errors until the preset algorithm model can accurately predict new data. The trained preset algorithm model is then deployed in actual applications to make predictions or decisions in real time.

[0058] Step 208 : Based on the compensation current corresponding to each compensation coil, the compensation coil is controlled by the driving circuit to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field.

[0059] Reference Figure 3The magnetic sensitive elements of the linear array are placed in a compensation coil (i.e., a solenoid). The control unit provides a compensation current to the solenoid through the drive circuit. The compensation magnetic field generated by the solenoid offsets the crosstalk magnetic field generated by the crosstalk current, thereby achieving the purpose of resisting crosstalk magnetic field interference. Assume that the number of turns of the solenoid coil is known and is N. The compensation current at the magnetic sensitive elements P1, P2, and P3 is in, where n = 1, 2, and 3. The compensation magnetic field generated inside the energized solenoid is :

[0060] ;

[0061] Where, is the magnetic permeability of vacuum.

[0062] Among them, the control unit calculates the exact value of the compensation current and then outputs an electrical signal to the outside, and accurately generates the compensation current through the driving circuit. After the magnetic field compensation, the influence of the external magnetic field on the linear array can be basically ignored, and the next step of calculating the current to be measured is carried out.

[0063] Step 210 : Determine the current value of the conductor to be measured according to the output signal of the linear array or the output signal of the square array.

[0064] After the magnetic field compensation, the output signal of the linear array or the square array is further used for calculation to obtain the accurate current value of the conductor to be measured.

[0065] For example, referring to Figure 1 The control unit includes a computing unit and a machine learning adaptive compensation algorithm. The computing unit is used to execute the above steps 202, 204, and 210, and the machine learning adaptive compensation algorithm is used to execute the above steps 206 and 208.

[0066] By adopting the approach of this embodiment, external magnetic field interference (such as geomagnetism or the magnetic field of adjacent conductors) is effectively suppressed through multi-sensor data fusion, significantly improving anti-interference capabilities, enhancing the signal-to-noise ratio, and adapting to complex electromagnetic environments. Utilizing a symmetrical design, some system errors (such as temperature drift) can be eliminated, and overall accuracy can be improved through redundant data. The sensor hardware design is simple and easy to integrate into narrow spaces (such as PCBs or cable troughs). It also has high sensitivity to unidirectional currents (such as long straight wires) and performs well in noise suppression in fixed scenarios.

[0067] The above-mentioned current measurement method combines square and linear arrays with adaptive magnetic field compensation to enhance the array structure's resistance to external magnetic crosstalk and adapt to complex electromagnetic environments. After eliminating the influence of the crosstalk magnetic field, the current value of the measured conductor is measured, which improves the current measurement accuracy. This approach achieves a balance between external magnetic crosstalk resistance and measurement accuracy, resolving the problems of traditional array structures.

[0068] In an exemplary embodiment, before step 202, the method further includes: determining a second current error based on the output signal of the linear array and the output signal of the square array in the absence of a crosstalk magnetic field; and adjusting the output signal of the square array by adjusting a gain parameter of the square array so as to reduce the second current error to a preset threshold.

[0069] The preset threshold is 0 or a value close to 0, and the current measurement system is set in an environment without a crosstalk magnetic field, and the square array is adjusted in advance. In the absence of a crosstalk magnetic field, the gain parameter of the square array is adjusted so that the error between the second current output by the linear array and the square array is reduced to 0. Optionally, the control unit adjusts the gain of the amplifier of the square array to adjust the gain parameter of the square array. Optionally, the control unit stores the gain parameter of the square array, and by adjusting the gain parameter, the second current error is reduced to 0. After the output signal of the square array is subsequently collected, the output signal is processed according to the gain parameter.

[0070] In this embodiment, by adjusting the gain parameters of the square array, the output of the square array is made close to that of the linear array, thereby eliminating the measurement error of the square array. This facilitates the subsequent perception of the influence of the crosstalk magnetic field based on the output error between the linear array and the square array, thereby improving the accuracy of current measurement.

[0071] In an exemplary embodiment, step 202 includes: calculating a first current value to be measured based on the output signal of the linear array; calculating a second current value to be measured based on the output signal of the square array; and calculating a difference between the first current value to be measured and the second current value to be measured to obtain a first current error.

[0072] Due to the different principles of linear and square arrays, the methods for calculating the measured current values based on the linear and square arrays are different, and the degree of impact of external magnetic field interference on the linear and square arrays is also different. The control unit is equipped with calculation logic for the linear and square arrays. It calculates a first measured current value based on the output signal of the linear array and a second measured current value based on the output signal of the square array, and determines the difference between the two as a first current error.

[0073] In an exemplary embodiment, calculating the first current value to be measured based on the output signal of the linear array includes: calculating the first current value to be measured based on the output signal of the linear array using a first preset formula; wherein the first preset formula includes:

[0074] ;

[0075] ;

[0076] Where L represents the distance between two adjacent magnetic sensitive elements in the linear array; Indicates the magnetic field strength at the location of the first magnetic sensitive element; Indicates the magnetic field strength at the location of the second magnetic sensitive element; Indicates the magnetic field strength at the location of the third magnetic sensitive element; Indicates the first current value to be measured; is the magnetic permeability of vacuum.

[0077] Among them, reference Figure 4 The distance between two adjacent magnetic sensitive elements is L (for example, between the first magnetic sensitive element P1 and the second magnetic sensitive element P2, and between the second magnetic sensitive element P2 and the third magnetic sensitive element P3). The distance between the first magnetic sensitive element P1 and the conductor to be measured is r1, the distance between the second magnetic sensitive element P2 and the conductor to be measured is r, and the distance between the third magnetic sensitive element P3 and the conductor to be measured is r3.

[0078] Based on the magnetic field strength at the location of each magnetic sensitive element in the linear array and the distance between two adjacent magnetic sensitive elements, a first preset formula is solved to determine the first current value to be measured .

[0079] In an exemplary embodiment, calculating the second current value to be measured based on the output signal of the square array includes: calculating the second current value to be measured based on the output signal of the square array using a second preset formula; wherein the second preset formula includes:

[0080] ;

[0081] Where, Indicates the second current value to be measured; represents the magnetic field strength at the location of each magnetic sensitive element included in the square array; r represents the distance between the edge structure and the conductor to be measured; is the magnetic permeability of vacuum.

[0082] Among them, reference Figure 1 and Figure 4 , the distance between the edge structure and the conductor to be measured is r. Based on the magnetic field strength of each magnetic sensitive element in the square array and the distance between the edge structure and the conductor to be measured, the second preset formula is solved to determine the second current value to be measured. .

[0083] In an exemplary embodiment, the method further includes: determining a current value of the conductor to be measured based on an output signal of the linear array or an output signal of the square array in the absence of a crosstalk magnetic field.

[0084] When there is no magnetic field crosstalk from an external conductor, the control unit calculates the precise current value of the conductor under test based on the output signal of the linear array using a first preset formula. Alternatively, the control unit calculates the precise current value of the conductor under test based on the output signal of the square array using a second preset formula. Exemplarily, the control unit determines a first current error based on the output signal of the linear array and the output signal of the square array. When the first current error is zero, the control unit determines the current value of the conductor under test based on the output signal of the linear array or the output signal of the square array.

[0085] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0086] Based on the same inventive concept, embodiments of the present application also provide a current measurement system for implementing the current measurement method described above. The solution provided by this system is similar to the solution described in the method described above. Therefore, the specific limitations in one or more current measurement system embodiments provided below can be found in the limitations of the current measurement method described above and will not be further elaborated here.

[0087] In an exemplary embodiment, Figure 1 As shown, a current measurement system is provided, which includes a control unit 102, a linear array 104, and a square array 106; the control unit 102 is used to collect output signals of the linear array 104 and the square array 106; the linear array 104 includes a first magnetic sensitive element P1, a second magnetic sensitive element P2, and a third magnetic sensitive element P3; the square array 106 includes a four-side structure; one side structure of the square array 106 includes the first magnetic sensitive element P1, the second magnetic sensitive element P2, and the third magnetic sensitive element P3, and the other three side structures each include three magnetic sensitive elements; the conductor to be measured is located at the center of the square array; the first magnetic sensitive element P1, the second magnetic sensitive element P2, and the third magnetic sensitive element P3 are placed in corresponding compensation coils 108; the compensation coils 108 are connected to the driving circuit 110;

[0088] The control unit 102 is specifically configured to determine a first current error based on the output signal of the linear array 104 and the output signal of the square array 106; determine the position and current of the external crosstalk conductor based on the first current error and a pre-established mapping relationship; the mapping relationship is used to characterize the relationship between the position of the external conductor, the current of the external conductor, and the current error; determine the compensation current corresponding to each compensation coil 108 based on the position and current of the external crosstalk conductor through an adaptive compensation algorithm; the adaptive compensation algorithm is established through machine learning; based on the compensation current corresponding to each compensation coil 108, control the compensation coil 108 through the drive circuit 110 to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field; and determine the current value of the conductor to be measured based on the output signal of the linear array 104 or the output signal of the square array 106.

[0089] The above-mentioned current measurement system combines square and linear arrays with adaptive magnetic field compensation, enhancing the array structure's resistance to external magnetic crosstalk and adapting to complex electromagnetic environments. After eliminating the influence of the crosstalk magnetic field, the current value of the measured conductor is measured, improving current measurement accuracy. This balance of external magnetic crosstalk resistance and measurement accuracy addresses the challenges of traditional array structures.

[0090] In an exemplary embodiment, the control unit 102 is further configured to determine a second current error based on the output signal of the linear array 104 and the output signal of the square array 106 in the absence of a crosstalk magnetic field; and to adjust the output signal of the square array 106 by adjusting a gain parameter of the square array 106 so as to reduce the second current error to a preset threshold.

[0091] In an exemplary embodiment, the control unit 102 is further configured to calculate a first current value to be measured based on the output signal of the linear array 104 ; calculate a second current value to be measured based on the output signal of the square array 106 ; and calculate a difference between the first current value to be measured and the second current value to be measured to obtain a first current error.

[0092] In an exemplary embodiment, the control unit 102 is further configured to calculate the first current value to be measured based on the output signal of the linear array 104 using a first preset formula; wherein the first preset formula includes:

[0093] ;

[0094] ;

[0095] Where L represents the distance between two adjacent magnetic sensitive elements in the linear array; Indicates the magnetic field strength at the location of the first magnetic sensitive element; Indicates the magnetic field strength at the location of the second magnetic sensitive element; Indicates the magnetic field strength at the location of the third magnetic sensitive element; Indicates the first current value to be measured; is the magnetic permeability of vacuum.

[0096] In an exemplary embodiment, the control unit 102 is further configured to calculate a second current value to be measured based on the output signal of the square array 106 using a second preset formula; wherein the second preset formula includes:

[0097] ;

[0098] Where, Indicates the second current value to be measured; represents the magnetic field strength at the location of each magnetic sensitive element included in the square array; r represents the distance between the edge structure and the conductor to be measured; is the magnetic permeability of vacuum.

[0099] In an exemplary embodiment, the control unit 102 is further configured to determine the current value of the conductor to be measured according to the output signal of the linear array 104 or the output signal of the square array 106 in the absence of a crosstalk magnetic field.

[0100] Each module in the above-mentioned current measurement system can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in hardware form, or can be stored in a memory in the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.

[0101] In an exemplary embodiment, an electronic device is provided. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The electronic device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a current measurement method is implemented.

[0102] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0103] In an exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: determining a first current error based on an output signal of a linear array and an output signal of a square array; determining a position and a current-carrying magnitude of an external crosstalk conductor based on the first current error and a pre-established mapping relationship; the mapping relationship is used to characterize the relationship between the position of the external conductor, the current-carrying magnitude of the external conductor, and the current error; determining a compensation current corresponding to each compensation coil based on the position and the current-carrying magnitude of the external crosstalk conductor through an adaptive compensation algorithm; the adaptive compensation algorithm is established through machine learning; based on the compensation current corresponding to each compensation coil, controlling the compensation coil through a driving circuit to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field; and determining a current value of the conductor to be measured based on the output signal of the linear array or the output signal of the square array.

[0104] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining a second current error based on the output signal of the linear array and the output signal of the square array in the absence of a crosstalk magnetic field; and adjusting the output signal of the square array by adjusting a gain parameter of the square array so as to reduce the second current error to a preset threshold.

[0105] In one embodiment, when the processor executes the computer program, it further implements the following steps: calculating a first current value to be measured based on the output signal of the linear array; calculating a second current value to be measured based on the output signal of the square array; and calculating a difference between the first current value to be measured and the second current value to be measured to obtain a first current error.

[0106] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: calculating a first current value to be measured based on the output signal of the linear array using a first preset formula; wherein the first preset formula includes:

[0107] ;

[0108] ;

[0109] Where L represents the distance between two adjacent magnetic sensitive elements in the linear array; Indicates the magnetic field strength at the location of the first magnetic sensitive element; Indicates the magnetic field strength at the location of the second magnetic sensitive element; Indicates the magnetic field strength at the location of the third magnetic sensitive element; Indicates the first current value to be measured; is the magnetic permeability of vacuum.

[0110] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: calculating a second current value to be measured based on the output signal of the square array using a second preset formula; wherein the second preset formula includes:

[0111] ;

[0112] Where, Indicates the second current value to be measured; represents the magnetic field strength at the location of each magnetic sensitive element included in the square array; r represents the distance between the edge structure and the conductor to be measured; is the magnetic permeability of vacuum.

[0113] In one embodiment, when the processor executes the computer program, the following steps are further implemented: in the absence of a crosstalk magnetic field, the current value of the conductor to be measured is determined according to the output signal of the linear array or the output signal of the square array.

[0114] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: determining a first current error based on the output signal of the linear array and the output signal of the square array; determining the position and current carrying size of the external crosstalk conductor based on the first current error and a pre-established mapping relationship; the mapping relationship is used to characterize the relationship between the position of the external conductor, the current carrying size of the external conductor and the current error; determining the compensation current corresponding to each compensation coil based on the position and current carrying size of the external crosstalk conductor through an adaptive compensation algorithm; the adaptive compensation algorithm is established through machine learning; based on the compensation current corresponding to each compensation coil, controlling the compensation coil through a driving circuit to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field; and determining the current value of the conductor to be measured based on the output signal of the linear array or the output signal of the square array.

[0115] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: in the absence of a crosstalk magnetic field, determining a second current error based on the output signal of the linear array and the output signal of the square array; and adjusting the gain parameter of the square array to regulate the output signal of the square array so that the second current error is reduced to a preset threshold.

[0116] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a first current value to be measured based on the output signal of the linear array; calculating a second current value to be measured based on the output signal of the square array; and calculating a difference between the first current value to be measured and the second current value to be measured to obtain a first current error.

[0117] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a first current value to be measured based on the output signal of the linear array using a first preset formula; wherein the first preset formula includes:

[0118] ;

[0119] ;

[0120] Where L represents the distance between two adjacent magnetic sensitive elements in the linear array; Indicates the magnetic field strength at the location of the first magnetic sensitive element; Indicates the magnetic field strength at the location of the second magnetic sensitive element; Indicates the magnetic field strength at the location of the third magnetic sensitive element; Indicates the first current value to be measured; is the magnetic permeability of vacuum.

[0121] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a second current value to be measured based on the output signal of the square array using a second preset formula; wherein the second preset formula includes:

[0122] ;

[0123] Where, Indicates the second current value to be measured; represents the magnetic field strength at the location of each magnetic sensitive element included in the square array; r represents the distance between the edge structure and the conductor to be measured; is the magnetic permeability of vacuum.

[0124] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: in the absence of a crosstalk magnetic field, determining the current value of the conductor to be measured according to the output signal of the linear array or the output signal of the square array.

[0125] In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps: determining a first current error based on an output signal of a linear array and an output signal of a square array; determining a position and a current-carrying magnitude of an external crosstalk conductor based on the first current error and a pre-established mapping relationship; the mapping relationship being used to characterize a relationship between the position of the external conductor, the current-carrying magnitude of the external conductor, and the current error; determining a compensation current corresponding to each compensation coil based on the position and the current-carrying magnitude of the external crosstalk conductor through an adaptive compensation algorithm; the adaptive compensation algorithm being established through machine learning; controlling the compensation coil to generate a supplementary magnetic field through a driving circuit based on the compensation current corresponding to each compensation coil to eliminate the influence of the crosstalk magnetic field; and determining a current value of the conductor to be measured based on the output signal of the linear array or the output signal of the square array.

[0126] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: in the absence of a crosstalk magnetic field, determining a second current error based on the output signal of the linear array and the output signal of the square array; and adjusting the gain parameter of the square array to regulate the output signal of the square array so that the second current error is reduced to a preset threshold.

[0127] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a first current value to be measured based on the output signal of the linear array; calculating a second current value to be measured based on the output signal of the square array; and calculating a difference between the first current value to be measured and the second current value to be measured to obtain a first current error.

[0128] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a first current value to be measured based on the output signal of the linear array using a first preset formula; wherein the first preset formula includes:

[0129] ;

[0130] ;

[0131] Where L represents the distance between two adjacent magnetic sensitive elements in the linear array; Indicates the magnetic field strength at the location of the first magnetic sensitive element; Indicates the magnetic field strength at the location of the second magnetic sensitive element; Indicates the magnetic field strength at the location of the third magnetic sensitive element; Indicates the first current value to be measured; is the magnetic permeability of vacuum.

[0132] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: calculating a second current value to be measured based on the output signal of the square array using a second preset formula; wherein the second preset formula includes:

[0133] ;

[0134] Where, Indicates the second current value to be measured; represents the magnetic field strength at the location of each magnetic sensitive element included in the square array; r represents the distance between the edge structure and the conductor to be measured; is the magnetic permeability of vacuum.

[0135] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: in the absence of a crosstalk magnetic field, determining the current value of the conductor to be measured according to the output signal of the linear array or the output signal of the square array.

[0136] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0137] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the memory, database or other media mentioned in each embodiment provided by this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0138] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0139] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A current measurement method, characterized in that: The method is applied to a control unit, the control unit being configured to collect output signals of a linear array and an output signal of a square array; the linear array comprising a first magnetic sensitive element, a second magnetic sensitive element, and a third magnetic sensitive element; the square array comprising a four-side structure; one side structure of the square array comprising the first magnetic sensitive element, the second magnetic sensitive element, and the third magnetic sensitive element, and the other three side structures comprising three magnetic sensitive elements respectively; The conductor to be tested is located at the center of the square array; The first magnetic sensitive element, the second magnetic sensitive element and the third magnetic sensitive element are placed in corresponding compensation coils; The compensation coil is connected to the drive circuit; The method comprises: determining a first current error according to the output signal of the linear array and the output signal of the square array; Determine the position and current carrying magnitude of the external crosstalk conductor according to the first current error and a pre-established mapping relationship; the mapping relationship is used to characterize the relationship between the position of the external conductor, the current carrying magnitude of the external conductor, and the current error; According to the position of the external crosstalk wire and the current carrying amount, a compensation current corresponding to each compensation coil is determined by an adaptive compensation algorithm; the adaptive compensation algorithm is established by machine learning; Based on the compensation current corresponding to each compensation coil, the compensation coil is controlled by the driving circuit to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field; The current value of the conductor to be measured is determined according to the output signal of the linear array or the output signal of the square array.

2. The method according to claim 1, characterized in that Before determining the first current error based on the output signal of the linear array and the output signal of the square array, the method further includes: In the absence of a crosstalk magnetic field, determining a second current error according to the output signal of the linear array and the output signal of the square array; The output signal of the square array is adjusted by adjusting the gain parameter of the square array so that the second current error is reduced to a preset threshold.

3. The method according to claim 1, characterized in that The determining a first current error according to the output signal of the linear array and the output signal of the square array includes: Calculating a first current value to be measured according to the output signal of the linear array; Calculating a second current value to be measured according to the output signal of the square array; A difference between the first current value to be measured and the second current value to be measured is calculated to obtain a first current error.

4. The method according to claim 3, characterized in that Calculating a first current value to be measured according to the output signal of the linear array includes: Calculate a first current value to be measured based on the output signal of the linear array using a first preset formula; wherein the first preset formula includes: ; ; Where L represents the distance between two adjacent magnetic sensitive elements in the linear array; Indicates the magnetic field strength at the location of the first magnetic sensitive element; Indicates the magnetic field strength at the location of the second magnetic sensitive element; Indicates the magnetic field strength at the location of the third magnetic sensitive element; Indicates the first current value to be measured; is the magnetic permeability of vacuum.

5. The method according to claim 3, characterized in that Calculating a second current value to be measured according to the output signal of the square array includes: A second current value to be measured is calculated based on the output signal of the square array using a second preset formula; wherein the second preset formula includes: ; Where, Indicates the second current value to be measured; represents the magnetic field strength at the location of each magnetic sensitive element included in the square array; r represents the distance between the edge structure and the conductor to be measured; is the magnetic permeability of vacuum.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: In the absence of a crosstalk magnetic field, the current value of the conductor to be measured is determined according to the output signal of the linear array or the output signal of the square array.

7. A current measurement system, characterized in that: The system includes a control unit, a linear array, and a square array; the control unit is used to collect output signals of the linear array and the square array; the linear array includes a first magnetic sensitive element, a second magnetic sensitive element, and a third magnetic sensitive element; the square array includes a four-side structure; one side structure of the square array includes the first magnetic sensitive element, the second magnetic sensitive element, and the third magnetic sensitive element, and the other three side structures each include three magnetic sensitive elements; The conductor to be tested is located at the center of the square array; The first magnetic sensitive element, the second magnetic sensitive element and the third magnetic sensitive element are placed in corresponding compensation coils; the compensation coils are connected to a driving circuit; The control unit is specifically configured to determine a first current error based on the output signal of the linear array and the output signal of the square array; determine the position and current magnitude of the external crosstalk conductor based on the first current error and a pre-established mapping relationship; the mapping relationship is configured to characterize the relationship between the position of the external conductor, the current magnitude of the external conductor, and the current error; and determine the compensation current corresponding to each compensation coil based on the position of the external crosstalk conductor and the current magnitude using an adaptive compensation algorithm; the adaptive compensation algorithm is established through machine learning; Based on the compensation current corresponding to each compensation coil, the compensation coil is controlled by the driving circuit to generate a supplementary magnetic field to eliminate the influence of the crosstalk magnetic field; The current value of the conductor to be measured is determined according to the output signal of the linear array or the output signal of the square array.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.