Alternating current detection method and device, computer device and medium
By employing multi-point temperature sensing and dynamic zero-point offset estimation, the problems of sensitivity drift and zero-point offset of TMR sensors under temperature changes are solved, achieving high accuracy in alternating current detection.
Patent Information
- Application Number
- CN202611013692.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-11-06
AI Technical Summary
Existing TMR sensors exhibit sensitivity drift with temperature changes in weak current and low-frequency current detection, and the zero-point offset is difficult to track dynamically, resulting in low detection accuracy.
By acquiring temperature information from multiple locations around the tunnel magnetoresistive sensor, temperature compensation is performed, and a comprehensive evaluation is conducted at sampling times that are evenly distributed throughout the complete electrical cycle. The zero-point offset estimate is dynamically adjusted to determine the target alternating current.
It significantly improves the signal-to-noise ratio of the TMR sensor in variable temperature environments, reduces the calibration error of zero-point offset, and improves the accuracy of alternating current detection.
Smart Images

Figure CN123046475A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electromagnetic measurement technology, and in particular to an alternating current detection method, device, computer equipment, and medium. Background Technology
[0002] Tunnel magnetoresistance (TMR) sensors offer advantages such as high sensitivity, small size, low power consumption, ease of integration, and suitability for weak magnetic field detection. In recent years, they have been widely used in scenarios such as weak current detection, leakage current detection, non-contact current detection, and online monitoring of smart grids. However, TMR devices and their associated analog front-ends are highly sensitive to temperature changes, device consistency, offset bias, and power supply fluctuations. In weak current and low-frequency current detection, the sensitivity of TMR sensors drifts with temperature changes, and the system zero point slowly shifts over time. This significantly increases the proportion of error in the total output, thereby reducing measurement accuracy and repeatability.
[0003] Currently, in terms of temperature compensation, the temperature of the magnetic field collected varies depending on the temperature acquisition location, making it difficult to accurately compensate for temperature and resulting in low accuracy of weak current detection. In terms of zero-point offset suppression, the zero-point offset is usually calibrated under a standard magnetic field in a static scene, which is difficult to reflect the dynamic offset during operation, thus affecting the accuracy of weak current detection during operation.
[0004] Therefore, how to detect the AC current of the conductor under test in order to improve the accuracy of the detection results is a problem that needs to be solved. Summary of the Invention
[0005] Therefore, it is necessary to provide an alternating current detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems.
[0006] In a first aspect, this application provides an alternating current detection method, comprising:
[0007] The temperature information of multiple locations around the tunnel magnetoresistive sensor at the current moment, as well as the detection current of the tunnel magnetoresistive sensor, are obtained. The tunnel magnetoresistive sensor is used to sense the magnetic field around the conductor under test in order to detect the alternating current of the conductor under test, wherein the current of the conductor under test does not include direct current.
[0008] Temperature compensation is performed on the detected current based on the temperature information from multiple locations to obtain a temperature-compensated current.
[0009] Based on the comprehensive evaluation value of multiple temperature compensation currents in the complete electrical cycle corresponding to the detected current before the current time, the zero-point offset estimate is determined; the sampling times corresponding to the multiple temperature compensation currents are evenly distributed in the complete electrical cycle.
[0010] Based on the temperature compensation current and the zero-point offset estimate at the current moment, the target alternating current of the conductor under test at the current moment is determined.
[0011] In one embodiment, determining the zero-point offset estimate based on the comprehensive evaluation value of multiple temperature compensation currents in the complete electrical cycle corresponding to the detected current before the current moment includes:
[0012] In the multiple complete electrical cycles corresponding to the detected current before the current moment, a comprehensive evaluation value corresponding to the corresponding complete electrical cycle is determined based on the multiple temperature compensation currents within each complete electrical cycle.
[0013] The comprehensive evaluation value corresponding to all the complete electrical cycles is smoothed to obtain the zero-point offset estimate.
[0014] In one embodiment, the step of performing temperature compensation on the detected current based on the temperature information from multiple locations to obtain a temperature-compensated current includes:
[0015] Based on the temperature information from multiple locations, the equivalent temperature is determined;
[0016] The temperature compensation current is determined based on the equivalent temperature, the detection current, and the preset temperature compensation model.
[0017] In one embodiment, the method further includes:
[0018] Under standard current, the test values of the tunnel magnetoresistive sensor were obtained at multiple test temperatures;
[0019] The preset temperature compensation model is determined by fitting the test temperatures and their corresponding test values.
[0020] In one embodiment, determining the temperature compensation current based on the equivalent temperature, the detection current, and a preset temperature compensation model includes:
[0021] Based on the equivalent temperature and the preset temperature compensation model, the compensation current is determined.
[0022] The temperature compensation current is determined based on the compensation current and the detection current.
[0023] In one embodiment, determining the equivalent temperature based on the temperature information from multiple locations includes:
[0024] Determine the average value of the temperature information at multiple locations;
[0025] The equivalent temperature is determined based on the average value.
[0026] In one embodiment, determining the target alternating current of the conductor under test at the current moment based on the temperature compensation current and the zero-point offset estimate includes:
[0027] Based on the temperature compensation current and the zero-point offset estimate at the current moment, the alternative alternating current is determined;
[0028] Based on the candidate alternating currents and the target current threshold of the conductor under test, the target alternating current of the conductor under test at the current time is determined.
[0029] Secondly, this application also provides an alternating current detection device, comprising:
[0030] The temperature information acquisition module is used to acquire temperature information at multiple locations around the tunnel magnetoresistive sensor at the current moment, as well as the detection current of the tunnel magnetoresistive sensor; the tunnel magnetoresistive sensor is used to sense the magnetic field around the conductor under test, so as to detect the alternating current of the conductor under test, wherein the current of the conductor under test does not include direct current.
[0031] A temperature compensation module is used to perform temperature compensation on the detected current based on the temperature information from multiple locations to obtain a temperature-compensated current.
[0032] The zero-point offset determination module is used to determine the zero-point offset estimate based on the comprehensive evaluation value of multiple temperature compensation currents in the complete electrical cycle corresponding to the detection current before the current time; the sampling times corresponding to the multiple temperature compensation currents are evenly distributed in the complete electrical cycle.
[0033] The detection module is used to determine the target alternating current of the conductor under test at the current time based on the temperature compensation current and the zero-point offset estimate at the current time.
[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in any of the embodiments of the first aspect described above.
[0035] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in any of the embodiments of the first aspect described above.
[0036] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the embodiments of the first aspect described above.
[0037] In the above implementation process, the detection current of the tunnel magnetoresistive sensor is corrected by using temperature information from multiple locations around the sensor. Employing multi-point temperature sensing allows for more accurate decoupling of the magnetic field signal, eliminating spurious signals caused by ambient temperature fluctuations or sensor self-heating, and significantly improving the signal-to-noise ratio of the tunnel magnetoresistive sensor in variable temperature environments. Furthermore, a comprehensive evaluation value is calculated based on multiple uniformly distributed temperature compensation currents from the complete electrical cycle prior to the current moment, and this comprehensive evaluation value is determined as the zero-point offset estimate for the current moment. This allows the zero-point offset estimate to be adaptively adjusted over time, achieving dynamic tracking of the zero-point offset estimate and reducing the low accuracy problem caused by calibrating the zero-point offset in static scenarios. Finally, based on the current temperature compensation current and the accurate zero-point offset estimate, the target alternating current of the conductor under test is determined at the current moment, effectively improving the accuracy of the alternating current detection results for the conductor under test. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of the structure of an alternating current detection system provided in an embodiment of this application;
[0040] Figure 2 This is a schematic flowchart of an alternating current detection method provided in an embodiment of this application;
[0041] Figure 3 This is a flowchart illustrating a method for determining a zero-point offset estimate provided in an embodiment of this application;
[0042] Figure 4 This is a schematic diagram of the structure of an alternating current detection device provided in an embodiment of this application;
[0043] Figure 5This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0045] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0046] The alternating current detection method provided in this application embodiment can be applied to, for example... Figure 1 The alternating current detection system shown. Figure 1 This is a schematic diagram of the structure of an alternating current detection system provided in an embodiment of this application, as shown below. Figure 1 As shown, the alternating current detection system may include a tunnel magnetoresistive sensor 102, a microcontroller 104, and multiple temperature sensors. Figure 1 Taking the alternating current detection system including a first temperature sensor 101 and a second temperature sensor 103 as an example, in practical scenarios, the alternating current detection system may include three or four temperature sensors; this is not a limitation. The tunnel magnetoresistive sensor 102 can be placed on the conductor to be detected (…). Figure 1Around the tunnel magnetoresistive sensor 102 (not shown), the magnetic field generated by the current in the conductor to be detected is sensed, and the change in magnetic field is converted into a voltage signal or a bridge output signal. After amplification, filtering, analog-to-digital conversion, and digital processing, the detected current is obtained. Multiple temperature sensors can be set in the tunnel magnetoresistive sensor 102. As an example, a first temperature sensor 101 and a second temperature sensor 103 are respectively set on both sides or adjacent to opposite sides of the tunnel magnetoresistive sensor 102 to sense the temperature distribution around the tunnel magnetoresistive sensor 102. The tunnel magnetoresistive sensor 102, the first temperature sensor 101, and the second temperature sensor 103 are respectively connected to a microcontroller 104. The tunnel magnetoresistive sensor 102 transmits the detected current to the microcontroller 104, and the first temperature sensor 101 and the second temperature sensor 103 transmit the detected temperature to the microcontroller 104. In addition, the alternating current detection system may also include an analog conditioning circuit and an analog-to-digital converter (ADC). The analog conditioning circuit receives the weak current signal output from the TMR sensor, amplifies it, filters it, performs impedance transformation, adjusts its level, and suppresses noise, converting it into a signal with appropriate amplitude, stability, and low noise to match the input range and impedance requirements of the subsequent ADC. The ADC receives the output from the analog conditioning circuit, samples it at a fixed resolution (e.g., 12-bit, 24-bit), quantizes it into discrete digital code, and transmits it to the microcontroller 104.
[0047] In one exemplary embodiment, Figure 2 This is a flowchart illustrating an alternating current detection method provided in an embodiment of this application, applied to... Figure 1 Taking the microcontroller 104 in the example, the explanation is as follows: Figure 2 As shown, the method may include steps 201 to 204, wherein:
[0048] Step 201: Obtain temperature information at multiple locations around the tunnel magnetoresistive sensor at the current moment, as well as the detection current of the tunnel magnetoresistive sensor.
[0049] Among them, the tunnel magnetoresistive sensor is used to sense the magnetic field around the conductor under test in order to detect the alternating current of the conductor under test, which does not include direct current.
[0050] For example, during the current detection process of the TMR sensor on the conductor under test, the microcontroller acquires the detection current directly detected by the TMR sensor at the current moment, as well as the temperature information detected by temperature sensors at multiple locations around the tunnel magnetoresistive sensor at the current moment. The TMR sensor is used to sense the magnetic field around the conductor under test to detect the alternating current of the conductor. In this embodiment, the current in the conductor under test does not contain direct current, or the direct current in the conductor under test is negligible. Furthermore, the current in the conductor under test is typically a periodic alternating weak current. Alternating weak current generally refers to AC power used for signal transmission or control, with a frequency of power frequency (50Hz / 60Hz) or higher, a voltage lower than the safety extra-low voltage (AC <25V), and a current in the milliampere (mA) or microampere (μA) range, and does not fall under the category of power supply.
[0051] Alternating current indicates a periodic change in the direction of current. It is commonly used at the power frequency of 50Hz / 60Hz, but may also include high-frequency alternating current (such as kHz~MHz) for communication or radio frequency.
[0052] Low current is an engineering term that emphasizes the purpose of information transmission (such as audio, video, data, and control signals) rather than energy transmission. It does not simply refer to a small current value. It usually corresponds to low-voltage systems and is characterized by low voltage (generally ≤25VAC), low current (mA~μA level), and low power (mW level).
[0053] Step 202: Perform temperature compensation on the detection current based on temperature information from multiple locations to obtain the temperature-compensated current.
[0054] Furthermore, the detection current of the TMR sensor is temperature-compensated based on temperature information detected by temperature sensors at multiple locations, resulting in a temperature-compensated current. As an example, the equivalent temperature can be determined by the average value of multiple temperature data points, or by a weighted average of multiple temperature data points. The equivalent temperature is then input into a preset temperature compensation model to obtain the temperature-compensated current, which represents the current after temperature compensation based on the detection current of the TMR sensor.
[0055] Step 203: Determine the zero-point offset estimate based on the comprehensive evaluation value of multiple temperature compensation currents in the complete electrical cycle corresponding to the current detected at the current moment.
[0056] The sampling times corresponding to multiple temperature-compensated currents are evenly distributed throughout the complete electrical cycle.
[0057] For example, the complete electrical cycle corresponding to the detected current before the current moment can include one complete cycle or multiple complete cycles, without limitation. Taking the example that the complete electrical cycle corresponding to the detected current before the current moment can include one complete cycle, the temperature compensation current corresponding to each time point can be obtained at multiple time points evenly distributed within that complete cycle. If the multiple time points are N, then the multiple temperature compensation currents corresponding to one complete cycle are x. tc (1) x tc (2), ..., x tc (N).
[0058] Further determine the comprehensive evaluation value of multiple temperature-compensated currents. As an example, first determine the complete electrical cycle of the AC current of the conductor under test, and then sum or average the temperature-compensated output within the complete electrical cycle. The complete electrical cycle can be determined by methods such as zero-crossing detection, frequency tracking, phase-locked loop synchronization, or software cycle identification. Let the current cycle of the AC current of the conductor under test be T0. When the conductor under test is a 50Hz power frequency current, T0 = 20ms; when the conductor under test is a 60Hz power frequency current, T0 ≈ 16.67ms.
[0059] This means that the sum or average of multiple temperature compensation currents can be used to determine a comprehensive evaluation value for the multiple temperature compensation currents. This comprehensive evaluation value is then used as the zero-point offset estimate.
[0060] It should be noted that in the theoretical scenario where zero-point offset does not occur, under the condition that the conductor under test does not contain a DC component, the waveform is basically symmetrical, and the sampling window is aligned with the complete electrical cycle, the average value of the effective AC component within a complete cycle should be close to zero. Therefore, the average output of the complete cycle can be used to characterize the zero-point offset estimate.
[0061] Step 204: Based on the temperature compensation current and the zero offset estimate at the current moment, determine the target alternating current of the conductor under test at the current moment.
[0062] Furthermore, by subtracting the zero-point offset estimate from the current temperature compensation current, the target alternating current of the conductor under test at the current moment is obtained.
[0063] In the above implementation process, the detection current of the tunnel magnetoresistive sensor is corrected by using temperature information from multiple locations around the sensor. Employing multi-point temperature sensing allows for more accurate decoupling of the magnetic field signal, eliminating spurious signals caused by ambient temperature fluctuations or sensor self-heating, and significantly improving the signal-to-noise ratio of the tunnel magnetoresistive sensor in variable temperature environments. Furthermore, a comprehensive evaluation value is calculated based on multiple uniformly distributed temperature compensation currents from the complete electrical cycle prior to the current moment, and this comprehensive evaluation value is determined as the zero-point offset estimate for the current moment. This allows the zero-point offset estimate to be adaptively adjusted over time, achieving dynamic tracking of the zero-point offset estimate and reducing the low accuracy problem caused by calibrating the zero-point offset in static scenarios. Finally, based on the current temperature compensation current and the accurate zero-point offset estimate, the target alternating current of the conductor under test is determined at the current moment, effectively improving the accuracy of the alternating current detection results for the conductor under test.
[0064] In one embodiment, the zero-point offset estimate is determined based on the combined evaluation value of multiple temperature compensation currents during the complete electrical cycle corresponding to the detected current prior to the current moment. Figure 3 This is a flowchart illustrating a method for determining a zero-point offset estimate provided in an embodiment of this application, as shown below. Figure 3 As shown, the method may include steps 2031 to 2032, wherein:
[0065] Step 2031: In the multiple complete electrical cycles corresponding to the current detected before the current moment, based on the multiple temperature compensation currents in each complete electrical cycle, determine the comprehensive evaluation value corresponding to the corresponding complete electrical cycle.
[0066] Step 2032: Smooth the comprehensive evaluation values corresponding to all complete electrical cycles to obtain the zero-point offset estimate.
[0067] For example, if there are multiple complete electrical cycles corresponding to the current detected before the current moment, the comprehensive evaluation value of the corresponding complete electrical cycle is determined based on the sum of the multiple temperature compensation currents corresponding to each complete electrical cycle or the average value of the multiple temperature compensation currents.
[0068] As an example, the comprehensive evaluation value for all complete electrical cycles is smoothed to obtain the zero-point offset estimate. It should be noted that the smoothing method can include arithmetic mean smoothing, weighted average smoothing, first-order low-pass filtering, or exponential weighted moving average.
[0069] As another example, the zero-point offset estimate for the current moment (current complete electric cycle) can be determined based on the zero-point offset estimate from the previous complete electric cycle and the comprehensive evaluation value for the current complete electric cycle. A smoothing coefficient can be preset. The value typically ranges from 0 to 1, such as 0.75 to 0.9. The zero-point offset estimate for the previous complete electrical cycle is obtained, along with the comprehensive evaluation value for the current moment (the current complete electrical cycle). Then, based on the zero-point offset estimate for the previous complete electrical cycle and the comprehensive evaluation value for the current complete electrical cycle, the zero-point offset estimate for the current moment (the current complete electrical cycle) can be determined. :
[0070] ;
[0071] in, It is the estimated zero offset at the current moment; It is the zero-point offset estimate of the previous complete electrical cycle; The comprehensive assessment value of the current complete electrical cycle.
[0072] In the above implementation process, based on the temperature compensation current corresponding to multiple sampling points uniformly distributed throughout the complete electrical cycle, the comprehensive evaluation value of the corresponding complete electrical cycle is determined. Compared with single-point sampling to estimate the zero-point offset, this ensures the accuracy of the zero-point offset estimate and reduces misjudgments caused by instantaneous waveform fluctuations. Furthermore, by smoothing the comprehensive evaluation values from multiple complete electrical cycles—that is, smoothing the evaluation values from multiple historical cycles—adaptive dynamic adjustment of the zero-point offset estimate is achieved, thereby improving the accuracy of the detection results.
[0073] In one embodiment, temperature compensation is performed on the detected current based on temperature information from multiple locations to obtain a temperature-compensated current, which may include the following steps 2021 to 2022, wherein:
[0074] Step 2021: Determine the equivalent temperature based on temperature information from multiple locations.
[0075] Step 2022: Determine the temperature compensation current based on the equivalent temperature, the detection current, and the preset temperature compensation model.
[0076] For example, the average or weighted average of temperature information from multiple locations is used to determine the equivalent compensation current.
[0077] The system invokes a preset temperature compensation model, which can be a multidimensional lookup table or a high-order polynomial function. This model may include the sensitivity variation coefficients and zero-point drift bias of the TMR sensor at different temperatures. The sensitivity correction factor at the current equivalent temperature is then obtained from the preset temperature compensation model. and zero-point correction value Furthermore, based on the equivalent temperature Detecting current Sensitivity correction factor and zero-point correction value Determine the temperature compensation current. .Right now:
[0078] = ( - ( )) ( );
[0079] in, For temperature compensation current; To detect current; ( () is the equivalent temperature The zero-point correction value below; ( () is the equivalent temperature The sensitivity correction factor is as follows.
[0080] In the above implementation process, the equivalent temperature is determined by temperature information from multiple locations, ensuring the accuracy of the temperature parameters input into the preset temperature compensation model, thereby significantly improving measurement accuracy in complex thermal environments. Furthermore, the preset temperature compensation model corrects for both sensitivity and zero-point accuracy, effectively reducing temperature drift in precision current detection by the TMR sensor and improving the accuracy of the temperature-compensated current.
[0081] In one embodiment, the method may further include the following steps S1 to S2, wherein:
[0082] Step S1: Under standard current, obtain the test values of the tunnel magnetoresistive sensor at multiple test temperatures.
[0083] Step S2: Fit each test temperature and its corresponding test value to determine the preset temperature compensation model.
[0084] For example, place the tunneling magnetoresistive sensor (TMR) to be calibrated in a high-precision temperature chamber (or high and low temperature test chamber), ensuring that the temperature sensor integrated inside the TMR sensor or the external temperature probe accurately reflects the temperature of the sensitive element. Pass a known and constant standard current (or standard magnetic field) around the TMR sensor. This current value is recommended to cover the typical operating point of the TMR sensor's range, such as 50% or 100% of full scale, and remain constant throughout the calibration process. Set the full operating temperature range, for example, -40°C to +125°C, and control the temperature rise and fall of the chamber in preset steps, for example, every 5°C or 10°C as a sampling point, with each step forming a test temperature.
[0085] At each test temperature point, after the chamber temperature stabilizes (thermal equilibrium is reached), record the current actual temperature value. and the test values output by the TMR sensor .
[0086] Due to standard current Given that the measurement error is known, calculate the measurement error at each test temperature point: = - Thus through a set of ( , The data pairs reveal the mapping relationship between temperature and measurement deviation.
[0087] Furthermore, construct an nth-order polynomial model: n is usually 2 or 3. All test points ( , Substitute the values into the fitting algorithm to calculate the optimal polynomial coefficients. , , , Thus, the nth-order polynomial model is determined as the preset temperature compensation model.
[0088] In the above implementation process, dense sampling and high-order polynomial fitting are performed at multiple test temperatures, enabling the preset temperature compensation model to accurately capture and describe the nonlinear characteristics of the temperature drift of the TMR sensor. This allows the compensation amount to be accurately deduced based on the current temperature, thereby significantly reducing the measurement error across the entire operating temperature range.
[0089] In one embodiment, determining the temperature compensation current based on the equivalent temperature, the detection current, and a preset temperature compensation model may include steps 1 and 2, wherein:
[0090] Step 1: Determine the compensation current based on the equivalent temperature and the preset temperature compensation model.
[0091] Step 2: Determine the temperature compensation current based on the compensation current and the detection current.
[0092] For example, equivalent temperature Substitute into the preset temperature compensation model In this process, the compensation current at the current temperature is obtained. (i.e., the error bias value caused by temperature).
[0093] Furthermore, the compensation current will be... From the detected current The temperature compensation current is obtained by removing the middle part. = , This is the temperature compensation current that ultimately eliminates the effects of temperature drift. This current value can be directly used for subsequent alternating current waveform analysis or RMS value calculation.
[0094] In the above implementation process, by acquiring the equivalent temperature in real time and substituting it into a preset temperature compensation model, a compensation current that matches the current temperature can be dynamically and continuously generated. Based on the compensation current and the detected current, the temperature compensation current is determined. Thus, whether under extremely cold start-up or high-temperature full-load conditions, the spurious current signal introduced by temperature can be accurately deducted, ensuring the measurement accuracy of the sensor across the entire operating temperature range.
[0095] In one embodiment, determining an equivalent temperature based on temperature information from multiple locations includes: determining the average value of the temperature information from multiple locations; and determining the equivalent temperature based on the average value.
[0096] For example, the average value of temperature information from multiple locations can be determined as the equivalent temperature, which can greatly reduce the impact of local thermal field unevenness, truly reflect the thermal state of the sensor, and improve the signal-to-noise ratio of temperature sensing.
[0097] In one embodiment, determining the target alternating current of the conductor under test at the current moment based on the temperature compensation current and the zero-point offset estimate may include the following steps 2041 to 2042, wherein:
[0098] Step 2041: Determine the alternative alternating current based on the temperature compensation current and the zero offset estimate at the current moment.
[0099] Step 2042: Based on the alternative alternating currents and the target current threshold of the conductor under test, determine the target alternating current of the conductor under test at the current moment.
[0100] For example, the difference between the current temperature compensation current and the zero-point offset estimate is determined as the candidate alternating current, i.e., the candidate alternating current. for:
[0101] ;
[0102] Furthermore, a target current threshold is preset based on the conductor's rated current, the maximum range of the TMR sensor, or the system's safety protection limits. .
[0103] The absolute value of the candidate alternating current is compared with the target current threshold. If... If the signal is within a reasonable range, then the target alternating current of the conductor under test at the current moment is... ; This indicates that the signal has exceeded the limit, and clamping processing will be performed: = ) Finally, the target alternating current of the conductor under test at the current moment is obtained. .
[0104] In the above implementation process, the target alternating current is strictly limited to the preset linear range by using the target current threshold. This not only ensures the smoothness and realism of the final displayed waveform, but also effectively protects the numerical stability of the algorithm module and avoids system-level computational crashes caused by single-point abnormal data.
[0105] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0106] Based on the same inventive concept, this application also provides an alternating current detection device for implementing the alternating current detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the alternating current detection device provided below can be found in the limitations of the alternating current detection method described above, and will not be repeated here.
[0107] In one exemplary embodiment, Figure 4 This is a schematic diagram of the structure of an alternating current detection device provided in an embodiment of this application, as shown below. Figure 4 As shown, the device may include:
[0108] Temperature information acquisition module 401 is used to acquire temperature information at multiple locations around the tunnel magnetoresistive sensor at the current moment, as well as the detection current of the tunnel magnetoresistive sensor; the tunnel magnetoresistive sensor is used to sense the magnetic field around the conductor under test in order to detect the alternating current of the conductor under test, which does not include DC current.
[0109] Temperature compensation module 402 is used to perform temperature compensation on the detection current based on temperature information from multiple locations to obtain a temperature-compensated current;
[0110] The zero-point offset determination module 403 is used to determine the zero-point offset estimate based on the comprehensive evaluation value of multiple temperature compensation currents in the complete electrical cycle corresponding to the current detected at the current moment; the sampling times corresponding to the multiple temperature compensation currents are uniformly distributed in the complete electrical cycle.
[0111] The detection module 404 is used to determine the target alternating current of the conductor under test at the current moment based on the temperature compensation current and the zero offset estimate at the current moment.
[0112] In one embodiment, the zero-point offset determination module 403 is specifically used for:
[0113] In the multiple complete electrical cycles corresponding to the current detected before the current moment, the comprehensive evaluation value corresponding to the corresponding complete electrical cycle is determined based on the multiple temperature compensation currents in each complete electrical cycle.
[0114] The comprehensive evaluation values corresponding to all complete electrical cycles are smoothed to obtain the zero-point offset estimate.
[0115] In one embodiment, the temperature compensation module 402 is specifically used for:
[0116] Determine the equivalent temperature based on temperature information from multiple locations;
[0117] The temperature compensation current is determined based on the equivalent temperature, the detection current, and the preset temperature compensation model.
[0118] In one embodiment, the temperature compensation module 402 is further configured to:
[0119] Under standard current, the test values of the tunnel magnetoresistive sensor were obtained at multiple test temperatures;
[0120] The test temperatures and their corresponding test values are fitted to determine the preset temperature compensation model.
[0121] In one embodiment, the temperature compensation module 402 is specifically used for:
[0122] Based on the equivalent temperature and the preset temperature compensation model, the compensation current is determined.
[0123] The temperature compensation current is determined based on the compensation current and the detection current.
[0124] In one embodiment, the temperature compensation module 402 is specifically used for:
[0125] Determine the average value of temperature information from multiple locations;
[0126] The equivalent temperature is determined based on the average value.
[0127] In one embodiment, the detection module 404 is specifically used for:
[0128] Based on the current temperature compensation current and the zero-point offset estimate, the alternative alternating current is determined;
[0129] Based on the alternative alternating currents and the target current threshold of the conductor under test, the target alternating current of the conductor under test at the current moment is determined.
[0130] Each module in the aforementioned alternating current detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0131] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, Figure 5 This is a schematic diagram of the internal structure of a computer device according to an embodiment of this application. The computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data detected by various sensors. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an alternating current detection method.
[0132] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0133] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the alternating current detection method in any of the above embodiments.
[0134] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the alternating current detection method in any of the above embodiments.
[0135] 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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.
[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in 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 many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0137] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0138] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An alternating current detection method, characterized by, The method includes: The temperature information of multiple locations around the tunnel magnetoresistive sensor at the current moment, as well as the detection current of the tunnel magnetoresistive sensor, are obtained. The tunnel magnetoresistive sensor is used to sense the magnetic field around the conductor under test in order to detect the alternating current of the conductor under test, wherein the current of the conductor under test does not include direct current. Temperature compensation is performed on the detected current based on the temperature information from multiple locations to obtain a temperature-compensated current. Based on the comprehensive evaluation value of multiple temperature compensation currents in the complete electrical cycle corresponding to the detected current before the current time, the zero-point offset estimate is determined; the sampling times corresponding to the multiple temperature compensation currents are evenly distributed in the complete electrical cycle. Based on the temperature compensation current and the zero-point offset estimate at the current moment, the target alternating current of the conductor under test at the current moment is determined.
2. The method of claim 1, wherein, The determination of the zero-point offset estimate based on the comprehensive evaluation value of multiple temperature compensation currents in the complete electrical cycle corresponding to the detected current before the current time includes: In the multiple complete electrical cycles corresponding to the detected current before the current moment, a comprehensive evaluation value corresponding to the corresponding complete electrical cycle is determined based on the multiple temperature compensation currents within each complete electrical cycle. The comprehensive evaluation value corresponding to all the complete electrical cycles is smoothed to obtain the zero-point offset estimate.
3. The method of claim 1, wherein, The step of performing temperature compensation on the detected current based on the temperature information from multiple locations to obtain a temperature-compensated current includes: Based on the temperature information from multiple locations, the equivalent temperature is determined; The temperature compensation current is determined based on the equivalent temperature, the detection current, and the preset temperature compensation model.
4. The method according to claim 3, characterized in that, The method further includes: Under standard current, the test values of the tunnel magnetoresistive sensor were obtained at multiple test temperatures; The preset temperature compensation model is determined by fitting the test temperatures and their corresponding test values.
5. The method according to claim 3, characterized in that, The step of determining the temperature compensation current based on the equivalent temperature, the detection current, and the preset temperature compensation model includes: Based on the equivalent temperature and the preset temperature compensation model, the compensation current is determined. The temperature compensation current is determined based on the compensation current and the detection current.
6. The method according to claim 3, characterized in that, Determining the equivalent temperature based on the temperature information from multiple locations includes: Determine the average value of the temperature information at multiple locations; The equivalent temperature is determined based on the average value.
7. The method according to any one of claims 1 to 6, characterized in that, Determining the target alternating current of the conductor under test at the current moment based on the temperature compensation current and the zero-point offset estimate includes: Based on the temperature compensation current and the zero-point offset estimate at the current moment, a candidate alternating current is determined; Based on the candidate alternating currents and the target current threshold of the conductor under test, the target alternating current of the conductor under test at the current time is determined.
8. An alternating current detection device, characterized in that, The device includes: The temperature information acquisition module is used to acquire temperature information at multiple locations around the tunnel magnetoresistive sensor at the current moment, as well as the detection current of the tunnel magnetoresistive sensor; the tunnel magnetoresistive sensor is used to sense the magnetic field around the conductor under test in order to detect the alternating current of the conductor under test, wherein the current of the conductor under test does not include direct current. A temperature compensation module is used to perform temperature compensation on the detected current based on the temperature information from multiple locations to obtain a temperature-compensated current. The zero-point offset determination module is used to determine the zero-point offset estimate based on the comprehensive evaluation value of multiple temperature compensation currents in the complete electrical cycle corresponding to the detection current before the current time; the sampling times corresponding to the multiple temperature compensation currents are evenly distributed in the complete electrical cycle. The detection module is used to determine the target alternating current of the conductor under test at the current time based on the temperature compensation current and the zero-point offset estimate at the current time.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
