Magnetic sensor array anti-interference current measurement method and system based on neural network
Patent Information
- Application Number
- CN202411211684.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-08-30
Smart Images

Figure CN119310326A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of magnetic sensors, and in particular to a method and system for measuring anti-interference current of a magnetic sensor array based on a neural network. Background Art
[0002] Current sensors are important devices for measuring current in power systems, and their accuracy and reliability are directly related to the stability and safety of the power grid. Magnetoresistance (MR) magnetic sensors have the advantages of small size and low power consumption, and are a hot topic in the research of magnetic sensors today. Among them, TMR current sensors are new magnetoresistance effect sensors in recent years. They use the tunnel magnetoresistance effect of magnetic multilayer film materials to sense the magnetic field. They have higher temperature stability, sensitivity and linear range than AMR and GMR current sensors. At the same time, they have the characteristics of small size and low overall cost. They have very important advantages in the fields of smart metering, magnetic random access memory, etc. However, under the conditions of complex external environment or strong interference magnetic field, the performance of current sensors will be greatly reduced, limiting practical applications. Existing anti-interference solutions are mostly aimed at single phase-to-phase interference currents, and cannot face the magnetic field interference caused by multiple factors in complex environments. Summary of the invention
[0003] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a method and system for anti-interference current measurement of a magnetic sensor array based on a neural network is provided. The present invention aims to provide a current measurement technical solution that can effectively resist external interference in view of the weak ability of current sensors to resist external interference and the demand for high-performance sensor development.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: A method for measuring current with an anti-interference magnetic sensor array based on a neural network, comprising: S101, respectively collecting magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricities, crosstalk current interference, stray magnetic field interference, and external temperature and humidity changes; S102, constructing a training data set by using the conductor current as label data of a sample vector of a magnetic field detection value; S103, standardizing the training data set and dividing the training set and the test set according to a preset ratio; S104, constructing a machine learning model for anti-interference current measurement of a magnetic sensor array, using the training set and the test set, combined with a preset loss function and an optimization algorithm to train the machine learning model so that it establishes a mapping relationship between a magnetic field detection value sample vector and a conductor current; S105, inputting the sample vector of the magnetic field detection value obtained by the magnetic sensor array on the measured wire into the trained machine learning model to obtain the wire current of the measured wire.
[0005] Optionally, when collecting the magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes in step S101, the selection of different wire currents includes: setting the value range of the wire current to is evenly divided into several intervals, each of which has a width of ,in For the resolution of the magnetic sensor array, different wire currents For The step size is evenly distributed in the range of wire current The number of different wire currents between , In the above formula, is the amount of wire current, for Round down.
[0006] Optionally, when collecting the magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes in step S101, it includes setting a magnetic field detection value sample vector for each wire current. Sampling points, wire eccentricity, crosstalk current interference, and stray magnetic field interference are combined into different interference configurations, and sampling is repeated under different environmental conditions to obtain M groups of P-dimensional magnetic field detection value sample vector matrices. The function expression is shown in the following formula: , In the above formula, is the sample vector matrix of magnetic field detection values, ~ is the sample vector of magnetic field detection values obtained by sampling at M sampling points under the first conductor current, ~ is the sample vector of magnetic field detection values obtained by sampling at M sampling points under the second conductor current, ~ For the The magnetic field detection value sample vector obtained by sampling at M sampling points under the wire current, the function expression of the magnetic field detection value sample vector is: , In the above formula, is the sample vector matrix of magnetic field detection value The magnetic field detection value sample vector of the i-th row and j-th column in , ~ They are respectively magnetic field detection value samples detected by N magnetic sensors of the magnetic sensor array.
[0007] Optionally, step S102 includes: S201, randomly shuffling the order of the magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricities, crosstalk current interference, stray magnetic field interference, and external temperature and humidity changes; S202, the sample vectors of the magnetic field detection values after random shuffling are normalized according to the following formula to be converted into a distribution with a mean of 0 and a standard deviation of 1:
[0008] In the above formula, is the magnetic field detection value sample The standardized processing results, is the magnetic field detection value sample The mean of is the magnetic field detection value sample The standard deviation of S203, constructing a training data set by using the wire current corresponding to each magnetic field detection value sample vector as label data of the magnetic field detection value sample vector after the normalization process.
[0009] Optionally, the machine learning model constructed in step S104 is a multi-input, single-output feedforward neural network model, whose input is a magnetic field detection value sample vector and whose output is a wire current. The feedforward neural network model includes an input layer, two hidden layers and an output layer connected in sequence, and each layer of the network includes a linear layer and an activation unit. The linear layer output value of the layer network The calculation function expression is: , In the above formula, For the The weight matrix of the layer network, For the The input of the layer network, For the The bias vector of the layer network, and any Input value of the layer network For the The activation unit output value of the layer network , and there are: , In the above formula, To activate the unit.
[0010] Optionally, the function expression of the loss function preset in step S104 is: , In the above formula, is the loss function, N represents the number of samples, For the The predicted conductor current corresponding to the magnetic field detection value samples, For the The actual wire current corresponding to the magnetic field detection value samples.
[0011] Optionally, the magnetic sensor array includes an annular base for being sleeved on the measured conductor, the annular base is provided with a coaxial circular array, the coaxial circular array includes magnetic sensors distributed on the circumference of the annular base, and the sensitive axis direction of the magnetic sensors is coaxial with the direction of the annular magnetic field generated by the measured conductor. In addition, the present invention also provides a magnetic sensor array anti-interference current measurement system based on a neural network, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the magnetic sensor array anti-interference current measurement method based on a neural network.
[0012] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program or instruction, and the computer program or instruction is programmed or configured to execute the neural network-based magnetic sensor array anti-interference current measurement method through a processor.
[0013] In addition, the present invention also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the neural network-based magnetic sensor array anti-interference current measurement method through a processor.
[0014] Compared with the prior art, the present invention has the following advantages: 1. The anti-interference current measurement structure of the magnetic sensor array based on artificial neural network adopted in the present invention can train the neural network through the data set and optimize the network structure by adjusting the parameters, so that the current sensor can adapt to various complex measurement environments, effectively resist external interference, and improve the current measurement accuracy.
[0015] 2. The present invention can establish a neural network for different numbers of magnetic sensors. By analyzing the loss function and adjusting the network structure, a better expected value can be obtained under the condition of using a smaller number of sensors, thereby simplifying the sensor structure and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1Schematic diagram of the basic flow of the method of the embodiment of the present invention.
[0017] Figure 2 Schematic diagram of the feedforward neural network structure in an embodiment of the present invention.
[0018] Figure 3 This is a flowchart of optimizing a neural network based on the Adam algorithm in an embodiment of the present invention.
[0019] Figure 4 Schematic diagram of the structure of a current measuring device based on an artificial neural network according to an embodiment of the present invention.
[0020] Figure 5 Schematic diagram of the impact of multiple factors on current measurement results in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] like Figure 1 As shown, the anti-interference current measurement method of the magnetic sensor array based on the neural network in this embodiment includes: S101, respectively collecting magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricities, crosstalk current interference, stray magnetic field interference, and external temperature and humidity changes; S102, constructing a training data set by using the conductor current as label data of a sample vector of a magnetic field detection value; S103, standardizing the training data set and dividing the training set and the test set according to a preset ratio; S104, constructing a machine learning model for anti-interference current measurement of a magnetic sensor array, using the training set and the test set, combined with a preset loss function and an optimization algorithm to train the machine learning model so that it establishes a mapping relationship between a magnetic field detection value sample vector and a conductor current; S105, inputting the sample vector of the magnetic field detection value obtained by the magnetic sensor array on the measured wire into the trained machine learning model to obtain the wire current of the measured wire.
[0022] In step S101 of this embodiment, when respectively collecting magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes, the selection for different wire currents includes: setting the value range of the wire current is evenly divided into several intervals, each of which has a width of ,in For the resolution of the magnetic sensor array, different wire currents For The step size is evenly distributed in the range of wire current The number of different wire currents between , In the above formula, is the amount of wire current, for Round down.
[0023] In step S101 of this embodiment, when respectively collecting magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes, it includes setting the value of the magnetic field detection value sample vector for each wire current. sampling points, combining the wire eccentricity, crosstalk current interference, and stray magnetic field interference into different interference configurations, repeating the sampling under different environmental conditions, and obtaining M groups of P-dimensional magnetic field detection value sample vector matrices (including The function expression is as follows: , In the above formula, is the sample vector matrix of magnetic field detection values, ~ is the sample vector of magnetic field detection values obtained by sampling at M sampling points under the first conductor current, ~ is the sample vector of magnetic field detection values obtained by sampling at M sampling points under the second conductor current, ~ For the The sample vector of magnetic field detection values obtained by sampling at M sampling points under the wire current is: The function expression of the magnetic field detection value sample vector is: , In the above formula, is the sample vector matrix of magnetic field detection value The magnetic field detection value sample vector of the i-th row and j-th column in When the controllable current value is The magnetic field sample vector collected by the sensor array corresponding to the sampling point), ~ They are respectively magnetic field detection value samples detected by N magnetic sensors of the magnetic sensor array.
[0024] In this embodiment, step S102 includes: S201, randomly shuffling the order of the magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricities, crosstalk current interference, stray magnetic field interference, and external temperature and humidity changes; S202, the sample vectors of the magnetic field detection values after random shuffling are normalized according to the following formula to be converted into a distribution with a mean of 0 and a standard deviation of 1:
[0025] In the above formula, is the magnetic field detection value sample The standardized processing results, is the magnetic field detection value sample The mean of is the magnetic field detection value sample The standard deviation of S203, constructing a training data set by using the wire current corresponding to each magnetic field detection value sample vector as label data of the magnetic field detection value sample vector after the normalization process.
[0026] like Figure 2 As shown, the machine learning model constructed in step S104 of this embodiment is a multi-input, single-output feedforward neural network model, whose input is a magnetic field detection value sample vector and output is a wire current. The feedforward neural network model includes an input layer, two hidden layers and an output layer connected in sequence. Each layer of the network includes a linear layer and an activation unit. The linear layer output value of the layer network The calculation function expression is: , In the above formula, For the The weight matrix of the layer network, For the The input of the layer network, For the The bias vector of the layer network, and any Input value of the layer network For the The activation unit output value of the layer network , and there are: , In the above formula, To activate the unit.
[0027] like Figure 3 As shown, in step S104 of this embodiment, the training set and the test set are used to train the neural network learning model in combination with a preset loss function and an optimization algorithm so that the neural network learning model can establish a mapping relationship between a magnetic field detection value sample vector and a conductor current, including: Step 1: Initialize the network parameters of the feedforward neural network model. The initialized network parameters include: The weight matrix of the layer network and The bias vector of the layer network ; Step 2: Input the samples in the test set into the feedforward neural network model for forward propagation; Step 3, calculate the loss function; in this embodiment, the function expression of the preset loss function is: , In the above formula, is the loss function, N represents the number of samples, For the The predicted conductor current corresponding to the magnetic field detection value samples, For the The actual wire current corresponding to the magnetic field detection value samples; Step 4, perform back propagation, use the Adam algorithm to calculate the first-order matrix estimation and the second-order matrix estimation respectively, and then calculate the deviation correction, and update the network parameters of the feedforward neural network model according to the calculation results of the deviation correction, including: The weight matrix of the layer network and The bias vector of the layer network ; Step 5, determine whether the loop termination condition is met. If the number of iterations is equal to the preset threshold, the loop termination condition is determined to be met, and the network parameters of the optimal feedforward neural network model are retained, including: any The weight matrix of the layer network and The bias vector of the layer network ; Otherwise, jump to step 2.
[0028] As an optional implementation, Figure 4 and Figure 5 As shown, the magnetic sensor array in this embodiment includes a circular base 2 for being sleeved on the measured conductor 1, and a coaxial circular array is provided on the circular base 2. The coaxial circular array includes magnetic sensors 3 distributed on the circumference of the circular base 2, and the sensitive axis direction of the magnetic sensor 3 is coaxial with the direction of the annular magnetic field generated by the measured conductor 1. Figure 4As shown, in this embodiment, the annular base 2 includes a connector 4 and two semi-annular circuit boards. The two semi-annular circuit boards are connected by a detachable connector 4 to form an annular structure. The FPC board can be disassembled and assembled through the connector 4 (the annular array is split into two semi-circles to facilitate the wire to be fixed through the center), which can meet various measurement situations when the current wire is not convenient to move, so that the current can be measured when the measured current wire 1 is fixed. In this embodiment, the circuit board is an FPC flexible circuit board. The use of FPC flexible circuit board materials can provide excellent electrical properties, meet the design needs of smaller and higher density installation, and reduce assembly processes and enhance reliability. In this embodiment, the magnetic sensor 3 can use the required magnetic sensor as needed. For example, as an optional embodiment, the magnetic sensor 3 in this embodiment is a TMR magnetic sensor. As shown in FIG. Figure 5 As shown, during the operation of the current sensor, especially in a complex environment, when faced with stray magnetic field interference such as conductor eccentricity, crosstalk current interference, geomagnetic field, and changes in external temperature and humidity, the magnitude of the magnetic field felt by each magnetic sensor chip will change accordingly according to its spatial position, so that the output voltage value will change and cause measurement errors. Traditional coaxial array magnetoresistive current sensors usually choose to increase the number of magnetic sensor chips to reduce the error caused by conductor eccentricity and reduce geomagnetic field interference. However, this method can only reduce the impact of strong external magnetic field interference caused by crosstalk current by increasing the distance between the crosstalk current conductor and the current conductor to be measured or by increasing the number of magnetic sensor chips. However, in actual applications, the distance between the crosstalk current conductor and the current conductor to be measured is generally fixed and difficult to change. When the distance between the crosstalk current conductor and the current conductor to be measured is close, even if the number of magnetic sensor chips is increased, it is difficult to reduce the measurement error to an acceptable range, and it will also increase the volume and cost. See Figure 5 The magnetic sensor 3 of the coaxial circular array is subject to interference from wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes. However, the anti-interference current measurement method of the magnetic sensor array based on the neural network in this embodiment can effectively eliminate the interference from wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes.
[0029] In step S101 of this embodiment, when collecting sample vectors of magnetic field detection values of the magnetic sensor array under different wire currents, wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes, the ring base 2 is first set on the controllable current wire. Since the spatial magnetic field generated by different current values is different, the interference source simulates electromagnetic interference of different types and intensities, and the magnetic sensor array is installed on the ring base. The magnetic sensor array senses the spatial magnetic field and outputs electrical signals, which are synchronously read out and stored by the data acquisition system. The data acquisition system includes a high-precision data acquisition card and a PC to ensure that the sampled data is collected and stored in a timely manner.
[0030] In step S102 of this embodiment, when constructing a training data set using the conductor current as the label data of the magnetic field detection value sample vector, the experimental site is selected to be consistent with the final measurement site to avoid errors caused by changes in the geomagnetic field; in the actual operating environment, different experimental conditions are set, including the setting of the conductor eccentric position and the crosstalk current intensity, covering a variety of interference situations, to ensure the diversity of the sample set, and for each controllable current value, samples are randomly collected under different interference conditions. Select different time periods to repeat the above experiment, and record the environmental conditions of each experiment, such as temperature, humidity, etc. First, according to the range of the current to be measured and the resolution of the current sensor , several controllable current values are selected by uniform sampling method and used as label values. The entire current range to be measured is evenly divided into several intervals with a width of ,in is the resolution of the current sensor, the controllable current value by The step size is evenly distributed in the current range to be measured Then, the magnetic field samples are collected by using the time-sharing random sampling method. For each controllable current value ,set up sampling points, in different time periods and under different environmental conditions, using magnetic sensor arrays to collect data under different interference configurations The dimension of the sample vector is equal to the number of magnetic sensors, counted as N. Finally, each controllable current value Correspondingly, M groups of N-dimensional magnetic field sample vectors are obtained, and each group of magnetic field sample vectors corresponds to a label value .
[0031] In step S103 of this embodiment, when the training data set is standardized and the training set and the test set are divided according to a preset ratio, all sample data are preprocessed, and data shuffling is performed by randomizing the sample order to disrupt the interference data set collected in chronological order, thereby preventing the neural network model from forgetting and also preventing the neural network model from learning irrelevant sequential dependencies, thereby improving the generalization ability of the model and avoiding overfitting. The function expression for data standardization in this embodiment is: , In the above formula, for The result obtained by data standardization is is the mean, The data is converted to a distribution with a mean of 0 and a standard deviation of 1 through data standardization, which reduces the dimensional difference of the data and prevents features with a large numerical range from dominating the training process, thus enabling the optimization algorithm to converge faster. Finally, the samples are divided into training and test sets in a ratio of 4:1. The neural network model will be trained on the training set and evaluated on the test set.
[0032] In this embodiment, step S104 includes establishing Figure 2 The multi-input, single-output feedforward neural network model shown in the figure converts the magnetic field sample vector of the sampling point into As input, ~ is N magnetic field samples, the current value to be measured As output, the network model is trained using the training set, and the prediction accuracy and generalization ability of the model are evaluated by inputting the trained model into the test set. The network structure and parameters with the best performance on the test set are selected as the final neural network model. The activation function of the network is the linear rectifier unit ReLU. During the forward propagation process, since each layer of the network includes a linear layer and an activation unit, the first The linear layer output value of the layer network is: , In the above formula, For the The linear layer output value of the layer network, For the The weight matrix of the layer network, For the The input of the layer network, Indicates The bias vector of the layer network; No. The input value of the layer network is The activation unit output value of the layer network is: , in, For the The input value of the layer network, For the The activation unit output value of the layer network, To activate the wish for The result obtained by the linear layer output value of the layer network, Indicates The weight matrix of the layer network, Indicates The bias vector of the layer network.
[0033] The functional expression of the loss function in this embodiment is: , In the above formula, is the loss function, N represents the number of samples, For the The predicted conductor current corresponding to the magnetic field detection value samples, For the The actual wire current corresponding to the magnetic field detection value sample is compared with the actual value through the loss function to calculate the error, and the goal of network training is to minimize the loss function value. The loss function in this embodiment is smooth and differentiable, so that the gradient-based optimization algorithm can be effectively applied to model training. The loss function gives a higher weight to the larger error in the sum of squared errors. The model will be more inclined to reduce large errors. For application scenarios with high requirements for current measurement accuracy, the model performance can be better optimized. The network optimization algorithm is the Adam algorithm. The Adam optimization algorithm combines momentum and adaptive learning rate to speed up convergence and improve training results. Use the preprocessed training set data for model training. The network training process is as follows: Figure 3 As shown, the parameters of the neural network are adjusted by back propagation to gradually reduce the loss function value, and the training is stopped after the model converges. In step S105, the sample vector of the magnetic field detection value obtained by the magnetic sensor array on the measured wire is input into the trained machine learning model, and the output obtained after the inference calculation of the neural network model is the wire current of the measured wire.
[0034] In summary, this embodiment discloses an anti-interference current measuring device of a magnetic sensor array based on a neural network and an application method thereof. The anti-interference current measuring device in this embodiment includes a ring base 2 for being set on the current conductor 1 to be measured, and a coaxial circular array is provided on the ring base 2. The coaxial circular array includes magnetic sensors 3 distributed on the circumference of the ring base, and the sensitive direction of the magnetic sensor 3 is the same as the direction of the annular magnetic field generated by the current conductor to be measured. The anti-interference current measuring method of the magnetic sensor array based on the neural network in this embodiment includes: the structure of the neural network is a feedforward neural network with multiple inputs and single outputs, and contains multiple hidden layers; the neural network is trained by collecting a data set containing multiple interference sources in a complex environment to optimize and determine the final network parameters; the network input is the measured value of the magnetic sensor array, and the network output is the predicted value of the current to be measured, and the accurate measurement of the current to be measured is achieved through the device and the neural network. The anti-interference current measuring method of the magnetic sensor array based on the neural network in this embodiment can solve the problem that the current sensor is easily interfered by the external current magnetic field, resulting in a decrease in the current measurement accuracy, and provides a current measurement technical solution that uses an artificial neural network to effectively resist external magnetic field interference.
[0035] In addition, this embodiment also provides a neural network-based magnetic sensor array anti-interference current measurement system, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the neural network-based magnetic sensor array anti-interference current measurement method.
[0036] In addition, this embodiment also provides a computer-readable storage medium, which stores a computer program or instruction, and the computer program or instruction is programmed or configured to execute the neural network-based magnetic sensor array anti-interference current measurement method through a processor.
[0037] In addition, this embodiment also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the neural network-based magnetic sensor array anti-interference current measurement method through a processor.
[0038] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for measuring current with an anti-interference magnetic sensor array based on a neural network, characterized in that: include: S101, respectively collecting magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricities, crosstalk current interference, stray magnetic field interference, and external temperature and humidity changes; S102, constructing a training data set by using the conductor current as label data of a sample vector of a magnetic field detection value; S103, standardizing the training data set and dividing the training set and the test set according to a preset ratio; S104, constructing a machine learning model for anti-interference current measurement of a magnetic sensor array, using the training set and the test set, combined with a preset loss function and an optimization algorithm to train the machine learning model so that it establishes a mapping relationship between a magnetic field detection value sample vector and a conductor current; S105, inputting the sample vector of the magnetic field detection value obtained by the magnetic sensor array on the measured wire into the trained machine learning model to obtain the wire current of the measured wire.
2. The method for measuring current with an anti-interference magnetic sensor array based on a neural network according to claim 1, characterized in that: In step S101, when collecting magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes, the selection of different wire currents includes: setting the value range of the wire current to is evenly divided into several intervals, each of which has a width of ,in For the resolution of the magnetic sensor array, different wire currents For The step size is evenly distributed in the range of wire current The number of different wire currents between , In the above formula, is the amount of wire current, for Round down, n Is a positive integer.
3. The method for measuring current with an anti-interference magnetic sensor array based on a neural network according to claim 2, characterized in that: In step S101, when the magnetic field detection value sample vectors of the magnetic sensor array are collected under different wire currents, wire eccentricity, crosstalk current interference, stray magnetic field interference and external temperature and humidity changes, it includes setting the magnetic field detection value sample vectors for each wire current. Sampling points, wire eccentricity, crosstalk current interference, and stray magnetic field interference are combined into different interference configurations, and sampling is repeated under different environmental conditions to obtain M groups of P-dimensional magnetic field detection value sample vector matrices. The function expression is shown in the following formula: , In the above formula, is the sample vector matrix of magnetic field detection values, ~ is the sample vector of magnetic field detection values obtained by sampling at M sampling points under the first conductor current, ~ is the sample vector of magnetic field detection values obtained by sampling at M sampling points under the second conductor current, ~ For the The magnetic field detection value sample vector obtained by sampling at M sampling points under the wire current, the function expression of the magnetic field detection value sample vector is: , In the above formula, is the sample vector matrix of magnetic field detection value The magnetic field detection value sample vector of the i-th row and j-th column in , ~ They are respectively magnetic field detection value samples detected by N magnetic sensors of the magnetic sensor array.
4. The method for measuring current with an anti-interference magnetic sensor array based on a neural network according to claim 1, characterized in that: Step S102 includes: S201, randomly shuffling the order of the magnetic field detection value sample vectors of the magnetic sensor array under different wire currents, wire eccentricities, crosstalk current interference, stray magnetic field interference, and external temperature and humidity changes; S202, the sample vectors of the magnetic field detection values after random shuffling are normalized according to the following formula to be converted into a distribution with a mean of 0 and a standard deviation of 1: In the above formula, is the magnetic field detection value sample The standardized processing results, is the magnetic field detection value sample The mean of is the magnetic field detection value sample The standard deviation of S203, constructing a training data set by using the wire current corresponding to each magnetic field detection value sample vector as label data of the magnetic field detection value sample vector after the normalization process.
5. The method for measuring current with an anti-interference magnetic sensor array based on a neural network according to claim 1, characterized in that: The machine learning model constructed in step S104 is a multi-input, single-output feedforward neural network model, whose input is a magnetic field detection value sample vector and output is a conductor current. The feedforward neural network model includes an input layer, two hidden layers and an output layer connected in sequence. Each layer of the network includes a linear layer and an activation unit. The linear layer output value of the layer network The calculation function expression is: , In the above formula, For the The weight matrix of the layer network, For the The input of the layer network, For the The bias vector of the layer network, and any Input value of the layer network For the The activation unit output value of the layer network , and there are: , In the above formula, To activate the unit.
6. The method for measuring current with an anti-interference magnetic sensor array based on a neural network according to claim 1, characterized in that: The function expression of the loss function preset in step S104 is: , In the above formula, is the loss function, N represents the number of samples, For the The predicted conductor current corresponding to the magnetic field detection value samples, For the The actual wire current corresponding to the magnetic field detection value samples.
7. The method for measuring current with an anti-interference magnetic sensor array based on a neural network according to claim 1, characterized in that: The magnetic sensor array comprises a circular base (2) for being sleeved on a conductor (1) to be measured, a coaxial circular array being provided on the circular base (2), the coaxial circular array comprising magnetic sensors (3) distributed on the circumference of the circular base (2), the sensitive axis direction of the magnetic sensors (3) being coaxial with the direction of the annular magnetic field generated by the conductor (1) to be measured.
8. A magnetic sensor array anti-interference current measurement system based on a neural network, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the neural network-based magnetic sensor array anti-interference current measurement method as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the anti-interference current measurement method of the magnetic sensor array based on a neural network as claimed in any one of claims 1 to 7 through a processor.
10. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the anti-interference current measurement method of the magnetic sensor array based on a neural network as claimed in any one of claims 1 to 7 through a processor.
Citation Information
Patent Citations
Magnetic field signal-based current calculation method suitable for multiple scenes
CN113609749A
Current calculation method based on magnetic field sensing signal machine learning
CN113609750A
Wire current determination method and device, computer equipment and storage medium
CN114441832A
Current calculation method and system based on uniaxial TMR sensing signal deep learning
CN115526121A
Iron core-annular array multi-ring magnetosensitive current sensor and current measurement method
WO2023077900A1
Cited By
Array current sensor rapid resolving method based on nested neural network
CN121724063A