Current measurement method, electronic equipment and readable storage medium

By adjusting the PID parameters in the quantum current sensor to regulate the microwave frequency, the problem of long tracking time for microwave resonant frequency in traditional methods is solved, and more efficient current measurement is achieved.

CN121049560APending Publication Date: 2025-12-02SOUTHERN POWER GRID SENSING TECHNOLOGY (GUANGDONG) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional quantum current sensors based on diamond NV centers have low measurement efficiency due to the long time required for microwave resonant frequency tracking when measuring current.

Method used

By acquiring the initial resonant frequency of the quantum current sensor, optical detection magnetic resonance measurement is performed based on the microwave modulation signal. The measurement response signal is demodulated, and when the demodulated component does not match the target value, the PID parameters are adjusted to regulate the microwave frequency until a match is achieved. The microwave resonant frequency is then determined to measure the current.

Benefits of technology

The measurement efficiency of the quantum current sensor has been improved. By adaptively adjusting the PID parameters in real time, the microwave resonant frequency can be quickly searched, thus increasing the measurement speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121049560A_ABST
    Figure CN121049560A_ABST
Patent Text Reader

Abstract

The invention relates to a current measurement method, electronic equipment and a readable storage medium. The method comprises the following steps: acquiring an initial resonant frequency of the quantum current sensor, and outputting a microwave modulation signal according to the initial resonant frequency; performing optical detection magnetic resonance measurement operation based on the microwave modulation signal, obtaining a measurement response signal for the microwave modulation signal, and demodulating the measurement response signal to obtain a demodulation component; when the demodulation component is not matched with the demodulation component target value, the PID parameter is adjusted, and the microwave frequency of the microwave modulation signal is adjusted based on the adjusted PID parameter until the demodulation component is matched with the demodulation component target value; a microwave frequency when the demodulation component matches the demodulation component target value is determined as a microwave resonance frequency, and a current measurement value is determined on the basis of the microwave resonance frequency. By adopting the method, the current measurement efficiency of the quantum current sensor can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quantum technology, and in particular to a current measurement method, electronic device, and readable storage medium. Background Technology

[0002] With the continuous development of quantum technology, quantum current sensors based on solid-state spin NV color centers (Nitrogen-Vacancy Centers) have attracted widespread attention due to their excellent magnetic sensitivity and high stability, making them one of the most promising quantum devices of our time.

[0003] Currently, most quantum current sensors based on diamond NV centers measure the magnetic field induced by current using optically detected magnetic resonance (ODMR). In traditional measurement processes, the microwave frequency of the output microwave modulation signal is typically adjusted by coarsely locating the resonant range and then finely locating the resonant point to track the microwave resonant frequency and thus determine the corresponding current value.

[0004] However, traditional methods are time-consuming and have low measurement efficiency when tracking microwave resonant frequencies. Summary of the Invention

[0005] Therefore, it is necessary to provide a current measurement method, electronic device, and readable storage medium that can improve the measurement efficiency of quantum current sensors in response to the above-mentioned technical problems.

[0006] In a first aspect, this application provides a current measurement method, the method comprising:

[0007] Obtain the initial resonant frequency of the quantum current sensor, and output a microwave modulation signal based on the initial resonant frequency;

[0008] Optical magnetic resonance measurement is performed based on microwave modulation signal to obtain measurement response signal for microwave modulation signal, and the measurement response signal is demodulated to obtain demodulated component;

[0009] If the demodulated component does not match the target value of the demodulated component, adjust the PID parameters, and based on the adjusted PID parameters, adjust the microwave frequency of the microwave modulation signal until the demodulated component matches the target value of the demodulated component.

[0010] The microwave frequency at which the demodulated component matches the target value of the demodulated component is determined as the microwave resonant frequency, and the current measurement value is determined based on the microwave resonant frequency.

[0011] In one embodiment, adjusting the PID parameters based on the demodulated component and the target value of the demodulated component includes:

[0012] Determine the demodulation component error between the demodulated component and the target value of the demodulated component;

[0013] The desired frequency adjustment amount is determined based on the PID parameters and demodulation component error.

[0014] The PID parameters are adjusted based on the desired frequency adjustment.

[0015] In one embodiment, adjusting the PID parameters according to the desired frequency adjustment amount includes:

[0016] If the absolute value of the undetermined frequency adjustment is greater than the first adjustment threshold, decrease the proportional coefficient in the PID parameters;

[0017] If the absolute value of the undetermined frequency adjustment is less than the second adjustment threshold, increase the proportional coefficient in the PID parameters, where the first adjustment threshold is greater than the second adjustment threshold.

[0018] In one embodiment, adjusting the PID parameters further includes:

[0019] Determine the demodulation component error between the demodulated component and the target value of the demodulated component;

[0020] The PID parameters are adjusted based on the demodulation component error.

[0021] In one embodiment, adjusting the PID parameters based on the demodulation component error includes:

[0022] If the absolute value of the demodulation component error is greater than the first difference threshold, increase the proportional coefficient in the PID parameters;

[0023] If the absolute value of the demodulation component error is less than the second difference threshold, increase the integral coefficient in the PID parameters, where the first difference threshold is greater than the second difference threshold.

[0024] In one embodiment, adjusting the microwave frequency of the microwave modulation signal based on the adjusted PID parameters includes:

[0025] The target frequency adjustment amount is determined based on the demodulation error between the demodulated component and the target value of the demodulated component, as well as the adjusted PID parameters.

[0026] When the target frequency adjustment is greater than the modulation depth of the microwave modulation signal, the integral term in the PID parameters is limited, and the target frequency adjustment is adjusted to the range of the modulation depth.

[0027] When the target frequency adjustment amount is not greater than the modulation depth, the microwave frequency of the microwave modulation signal is adjusted based on the target frequency adjustment amount.

[0028] In one embodiment, the process includes, before adjusting the microwave frequency of the microwave modulation signal:

[0029] The current detected by the quantum current sensor is predicted when the demodulated component matches the target value of the demodulated component, and the predicted current value is obtained.

[0030] Based on the predicted current value, the predicted microwave frequency value is obtained;

[0031] Based on the microwave predicted frequency, the target frequency adjustment amount is corrected to obtain a new target frequency adjustment amount. Then, based on the target frequency adjustment amount, the microwave frequency of the microwave modulation signal is adjusted.

[0032] In one embodiment, the method further includes:

[0033] The current of the quantum current sensor is monitored to obtain the current monitoring results;

[0034] If the current monitoring results indicate an abnormal current, lock the PID parameters, or adjust the PID parameters to the predetermined protection parameter values.

[0035] Secondly, this application also provides a current measuring device, comprising:

[0036] The modulation module is used to obtain the initial resonant frequency of the quantum current sensor and output a microwave modulation signal based on the initial resonant frequency.

[0037] The measurement module is used to perform optical detection magnetic resonance measurement operations based on microwave modulation signals, acquire the measurement response signal for the microwave modulation signal, and demodulate the measurement response signal to obtain the demodulated component;

[0038] The adjustment module is used to adjust the PID parameters when the demodulated component does not match the target value of the demodulated component, and adjust the microwave frequency of the microwave modulation signal based on the adjusted PID parameters until the demodulated component matches the target value of the demodulated component.

[0039] The determination module is used to determine the microwave resonant frequency when the demodulated component matches the target value of the demodulated component, and to determine the current measurement value based on the microwave resonant frequency.

[0040] Thirdly, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0041] Obtain the initial resonant frequency of the quantum current sensor, and output a microwave modulation signal based on the initial resonant frequency;

[0042] Optical magnetic resonance measurement is performed based on microwave modulation signal to obtain measurement response signal for microwave modulation signal, and the measurement response signal is demodulated to obtain demodulated component;

[0043] If the demodulated component does not match the target value of the demodulated component, adjust the PID parameters, and based on the adjusted PID parameters, adjust the microwave frequency of the microwave modulation signal until the demodulated component matches the target value of the demodulated component.

[0044] The microwave frequency at which the demodulated component matches the target value of the demodulated component is determined as the microwave resonant frequency, and the current measurement value is determined based on the microwave resonant frequency.

[0045] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0046] Obtain the initial resonant frequency of the quantum current sensor, and output a microwave modulation signal based on the initial resonant frequency;

[0047] Optical magnetic resonance measurement is performed based on microwave modulation signal to obtain measurement response signal for microwave modulation signal, and the measurement response signal is demodulated to obtain demodulated component;

[0048] If the demodulated component does not match the target value of the demodulated component, adjust the PID parameters, and based on the adjusted PID parameters, adjust the microwave frequency of the microwave modulation signal until the demodulated component matches the target value of the demodulated component.

[0049] The microwave frequency at which the demodulated component matches the target value of the demodulated component is determined as the microwave resonant frequency, and the current measurement value is determined based on the microwave resonant frequency.

[0050] The aforementioned current measurement method, electronic device, and readable storage medium acquire the initial resonant frequency of the quantum current sensor, and then perform photodetector magnetic resonance measurement based on a microwave modulation signal to obtain a measurement response signal for the microwave modulation signal. This measurement response signal is then demodulated to obtain a demodulated component. Therefore, when the demodulated component does not match its target value, the PID parameters are adjusted according to the demodulated component and its target value. Based on the adjusted PID parameters, the microwave frequency of the microwave modulation signal is adjusted until the demodulated component matches its target value. The microwave frequency at which the demodulated component matches its target value is then determined as the microwave resonant frequency, and the current measurement value is determined based on this microwave resonant frequency. This process, by adaptively adjusting the PID parameters according to the changes in the demodulated component and its target value, allows the PID parameters to adapt to the nonlinear system of the demodulated component in real time, improving the convergence speed of the PID operation and thus increasing the speed of finding the microwave resonant frequency, thereby improving the measurement efficiency of the quantum current sensor. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in this embodiment or related technologies, the accompanying drawings used in the description of this embodiment or related technologies will be briefly introduced below. Obviously, the accompanying 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.

[0052] Figure 1 This is a flowchart illustrating a current measurement method in one embodiment;

[0053] Figure 2 This is a schematic diagram of the structure of a bidirectional lock-in amplifier in one embodiment;

[0054] Figure 3 This is a schematic diagram of the output result of a bidirectional lock-in amplifier in one embodiment;

[0055] Figure 4 This is a flowchart illustrating the steps for adjusting PID parameters in one embodiment;

[0056] Figure 5 This is a flowchart illustrating the steps for adjusting PID parameters in another embodiment;

[0057] Figure 6 This is a schematic diagram illustrating the range of microwave frequencies in one embodiment;

[0058] Figure 7 This is a flowchart illustrating the current measurement method in another embodiment;

[0059] Figure 8This is a structural block diagram of a current measuring device in one embodiment;

[0060] Figure 9 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation

[0061] 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.

[0062] Quantum sensors are quantum measurement systems based on solid-state spin color centers (such as diamond NV centers, silicon carbide color centers, diamond germanium vacancy color centers, hexagonal boron nitride color centers, or diamond silicon vacancy color centers). Diamond NV (Nitrogen-Vacancy Center) color centers are point defect structures in diamond composed of nitrogen atoms (N) and vacancies, and are important luminescent quantum systems in diamond. Generally, they can be detected by photodetector magnetic resonance to obtain the magnetic resonance signal and determine the corresponding measurand, such as magnetic field, temperature, electric field, or pressure. Taking a quantum sensor based on diamond NV centers as an example, the spin of the diamond NV center is first polarized to a specific quantum state using a laser. Since Zeeman splitting occurs in a magnetic field based on the electron spin energy level, and the magnitude of the Zeeman splitting displacement is affected by the magnitude of the magnetic field, the magnetic field generated by the current will change the electron spin energy level, leading to quantum state evolution. Then, the spin state of the diamond NV center is detected by the difference in fluorescence intensity, and the magnetic field strength and current value are calculated.

[0063] Optically Detected Magnetic Resonance (ODMR) utilizes the sensitivity and high resolution of optical technology to detect magnetic resonance signals. When a sample is placed in an external magnetic field, the magnetic moments of the atomic nuclei or electrons in the sample interact with the field. Then, by radiating microwave signals of a specific frequency into the sample, energy level transitions occur in the nuclei or electrons. These transitions cause the sample to absorb or emit electromagnetic radiation of that specific frequency, forming a magnetic resonance signal. This signal is then detected using optical techniques, and the difference in fluorescence intensity is used to determine the magnetic resonance signal.

[0064] In one exemplary embodiment, such as Figure 1 As shown, a current measurement method is provided, including steps 102 to 108. Wherein:

[0065] Step 102: Obtain the initial resonant frequency of the quantum current sensor and output a microwave modulation signal based on the initial resonant frequency.

[0066] In this embodiment, the executing entity is an electronic device. This electronic device can be a quantum current sensor, a terminal device integrating a quantum current sensor, or a terminal device communicatively connected to the quantum current sensor. For example, the terminal device can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart TVs, smart in-vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The following description uses a quantum current sensor as the executing entity as an example.

[0067] A quantum current sensor is a quantum sensor used to measure current. It detects subtle changes in the magnetic field caused by current using a sensitive element (such as a diamond NV center) and then deduces the current value. The initial resonance frequency is the magnetic resonance frequency of the quantum current sensor when there is zero current and no interfering magnetic field. Understandably, the ODMR sweep spectrum of light-probe magnetic resonance at zero magnetic field may differ for different quantum current sensors. Depending on the relationship between the magnetic field and the axis of the diamond NV center, a quantum current sensor may have 2, 4, 6, or 8 resonance peaks. In actual measurement, one resonance peak can be selected, such as the leftmost peak, or multiple peaks can be tracked and measured simultaneously. The microwave modulation signal is an electromagnetic wave signal generated by modulating the frequency of a microwave carrier wave based on the initial resonance frequency. This microwave modulation signal is generally a sinusoidal or square wave signal.

[0068] For example, the initial resonant frequency of a quantum current sensor can be determined based on the type of sensitive element used in the sensor. The initial resonant frequency corresponding to the diamond NV color center is typically around 2.87 GHz. It is understood that differences can exist between sensitive elements of the same type, and even within the same sensitive element, variations can occur over time, leading to changes in the magnetic resonance frequency. Furthermore, the same quantum current sensor can utilize microwave signals to perform ODMR measurements, obtain an ODMR sweep curve, and then select at least one resonant frequency from this ODMR sweep curve as the initial resonant frequency.

[0069] To improve the efficiency of finding the accurate initial resonant frequency, the quantum current sensor can also transform the frequency search problem into an optimization problem using a particle swarm optimization algorithm to obtain the initial resonant frequency of the quantum current sensor. Alternatively, optimization algorithms such as genetic algorithms, simulated annealing algorithms, or related improved fusion algorithms can be used instead of particle swarm optimization to achieve the frequency search for the initial resonant frequency. For example, the formula for a microwave modulation signal is:

[0070] v mod (t)=v+v dev cos(2πv ref t)

[0071] Among them, v mod (t) represents the microwave frequency of the microwave modulation signal, t is the time point, and v is the initial resonant frequency, i.e., the microwave center frequency of the microwave modulation signal. dev For modulation depth, v ref The modulation frequency.

[0072] In this embodiment, after obtaining the initial resonant frequency, the radio frequency microwave source of the quantum current sensor can be adjusted according to the above formula to output the microwave modulation signal for ODMR measurement.

[0073] Step 104: Perform optical detection magnetic resonance measurement based on the microwave modulation signal to obtain the measurement response signal for the microwave modulation signal, and demodulate the measurement response signal to obtain the demodulated component.

[0074] The measurement response signal is an electrical signal describing the fluorescence intensity of the sensitive element (such as a diamond NV center) of the quantum current sensor when excited by a laser under microwave modulation. The demodulation component is the amplitude and phase information of the measurement response signal, which can be obtained by demodulating this electrical signal of the measurement response signal.

[0075] In this embodiment, the quantum current sensor can perform photodetector magnetic resonance measurement based on a microwave modulation signal to obtain a measurement response signal for the microwave modulation signal. For example, after outputting a microwave modulation signal according to the initial resonant frequency, the quantum current sensor can convert the collected fluorescence intensity into an electrical signal using a photodetector unit to obtain the measurement response signal for the microwave modulation signal. This photodetector unit can be an avalanche photodiode, photodiode, photomultiplier tube, or other similar components.

[0076] Quantum current sensors can demodulate the measured response signal using methods such as bidirectional lock-in amplifiers and digital lock-in amplifiers to obtain the demodulated component. Taking a bidirectional lock-in amplifier as an example... Figure 2 As shown, the measurement response signal S l(t) The input signal is fed into the bidirectional lock-in amplifier and is quadrature (i.e., with a 90° phase difference) with the reference signal (S). R0(t) S R1(t) The signals are mixed by phase-sensitive detectors (PSD0, PSD1) to obtain two mixed signals (LPF0, LPF1). The frequency of the reference signal is v. refThe modulation frequency is the same as that of the microwave modulation signal. The two mixed signals are then passed through low-pass filters (LPF0, LPF1) to retain the DC component, yielding the demodulated value X = S. Output0 , and demodulation value Y = S Output1 Then, based on the demodulated values ​​X and Y, mathematical operations are performed to calculate the square root of the sum of the squares of X and Y. Taking the arctangent of Y / X yields the amplitude R and phase θ of the microwave modulated signal. The output of the bidirectional lock-in amplifier is as follows: Figure 3 As shown, Figure 3 In the coordinate graphs, the horizontal axis represents the microwave frequency. When the phase of the reference signal matches the phase of the microwave modulation signal, the demodulated value X (Lock X) is near zero, meaning it falls within a near-zero range where the endpoints are on either side of zero. Since different quantum current sensors vary, the specific near-zero range can be set according to actual needs. When the demodulated value Y (Lock Y) equals 0, it indicates that the corresponding microwave frequency is the microwave resonant frequency. The amplitude of the microwave modulation signal... A R The amplitude of the reference signal is used. Therefore, the demodulated value Y can be selected as the demodulated component.

[0077] Step 106: If the demodulated component does not match the target value of the demodulated component, adjust the PID parameters, and based on the adjusted PID parameters, adjust the microwave frequency of the microwave modulation signal until the demodulated component matches the target value of the demodulated component.

[0078] The demodulated component target value represents the demodulated component whose corresponding microwave frequency is the microwave resonant frequency, and is generally zero. The PID parameters are the parameters used for PID calculation based on the demodulated component and the demodulated component target value, and include at least a proportional term, an integral term, and a derivative term. The proportional term includes a proportional coefficient, and the integral term includes an integral coefficient.

[0079] For example, a quantum current sensor can determine the demodulation error between the demodulated component and its target value, and determine whether the absolute value of the demodulation error is less than a predetermined error threshold. If the absolute value of the demodulation error is less than the predetermined error threshold, the demodulated component is considered to match the target value. If the absolute value of the demodulation error is greater than or equal to the predetermined error threshold, the demodulated component is considered to be mismatched with the target value. The predetermined error threshold is a pre-set value at which the demodulation error can be considered an error, and the specific value can be selected according to actual needs. When current flows through a conductor, a magnetic field is generated. Therefore, the microwave resonant frequency is inconsistent with the initial resonant frequency when a magnetic field is present, resulting in a mismatch between the demodulated component corresponding to the measured response signal at the initial resonant frequency and the target value. Thus, the quantum current sensor can adjust the microwave frequency of the microwave modulation signal until it is adjusted to match the microwave resonant frequency at which resonance occurs, thereby matching the demodulated component with the target value. For example, when the demodulated component is less than the target value, the microwave frequency of the microwave modulation signal is increased; when the demodulated component is greater than the target value, the microwave frequency of the microwave modulation signal is decreased.

[0080] At the fundamental physics level, the spin dynamics of the diamond NV center inherently exhibit nonlinear effects, which are reflected in the measurement response signal. Therefore, although the demodulation process itself is a linear operation, the input measurement response signal already contains the nonlinear relationship between fluorescence intensity and spin state transition probability, resulting in a nonlinear demodulated component. For this nonlinear demodulated component, using fixed-parameter PID control or fixed-amplitude modulation would require a considerable amount of time to adjust the microwave frequency to the microwave resonance frequency at which resonance occurs. Therefore, the quantum current sensor can adjust the PID parameters according to the demodulated component and its target value, allowing the PID parameters to adaptively adjust with changes in these parameters. This effectively addresses nonlinear systems and time-varying disturbances, leading to faster PID convergence, increased speed in adjusting the microwave frequency to the microwave resonance frequency, and ultimately improved measurement efficiency of the quantum current sensor.

[0081] As an example, a quantum current sensor can determine the demodulation error between the demodulated component and its target value, and then adjust the PID parameters based on this demodulation error. For instance, the quantum current sensor can calculate the difference between the demodulated component and its target value as the demodulation error, and then adjust the PID parameters based on this error, such as the proportional coefficient, integral coefficient, and derivative coefficient. This embodiment adjusts the PID parameters according to the demodulation error between the demodulated component and its target value, making the PID parameters adaptively adjust to changes in the demodulated component and its target value. This effectively addresses the nonlinearity of the demodulated component system and improves the convergence speed of the PID calculation.

[0082] As another example, a quantum current sensor can determine the demodulation error between the demodulated component and its target value, and then, based on the PID parameters and this demodulation error, determine the desired frequency adjustment amount. The PID parameters are then adjusted according to this desired frequency adjustment amount. For instance, the quantum current sensor can calculate the difference between the demodulated component and its target value as the demodulation error, and then, based on the PID parameters and this demodulation error, perform a PID operation to obtain the desired frequency adjustment amount. The input to the PID operation is the demodulation error, and the output is the microwave frequency adjustment amount. The PID parameters are then adjusted according to this desired frequency adjustment amount, including at least adjusting the proportional gain. It is understood that the adjustment magnitude of the proportional gain in the PID parameters is positively correlated with the absolute value of the desired frequency adjustment amount, while the adjustment direction is negatively correlated with the absolute value of the desired frequency adjustment amount. Of course, the integral and derivative coefficients in the PID parameters can also be adjusted. Since the frequency adjustment essentially reflects the deviation between the demodulated component and the target value of the demodulated component, but the frequency adjustment is a linear quantity, adjusting the PID parameters based on the undetermined frequency adjustment can more accurately assess the deviation between the demodulated component and the target value of the demodulated component in the linear space. Compared with adjusting the PID parameters based on the demodulated component error, this embodiment has higher accuracy in PID adjustment, resulting in faster PID convergence.

[0083] Furthermore, the technical solution in this embodiment, which determines the desired frequency adjustment amount based on PID parameters and demodulation component error, and then adjusts the PID parameters according to the desired frequency adjustment amount, can be combined with another solution that adjusts the PID parameters based on the demodulation component error. That is, this embodiment can first perform the adjustment of the PID parameters based on the desired frequency adjustment amount, and then perform the adjustment of the PID parameters based on the demodulation component error. Alternatively, it can first perform the adjustment of the PID parameters based on the demodulation component error, and then perform the adjustment of the PID parameters based on the desired frequency adjustment amount.

[0084] This embodiment adjusts the PID parameters when the demodulated component does not match the target value of the demodulated component, and then adjusts the microwave frequency of the microwave modulation signal based on the adjusted PID parameters until the demodulated component matches the target value. This allows the PID parameters to adaptively adjust as the demodulated component changes with the target value, effectively dealing with nonlinear systems and time-varying disturbances. This results in faster convergence of the PID operation, increases the speed of adjusting the microwave frequency to the microwave resonant frequency, and ultimately improves the measurement efficiency of the quantum current sensor.

[0085] Step 108: Determine the microwave resonant frequency as the microwave frequency at which the demodulated component matches the target value of the demodulated component, and determine the current measurement value based on the microwave resonant frequency.

[0086] There is a linear relationship between the microwave resonant frequency and the measured current value.

[0087] In this embodiment, after the demodulated component matches the target value, the microwave frequency at which the demodulated component matches the target value can be determined as the microwave resonant frequency. Then, based on the linear relationship between the microwave resonant frequency and the current measurement value, the current measurement value corresponding to the microwave resonant frequency can be determined. For example, this linear relationship can be described using the linearity formula: Δv=S·I+v0;

[0088] Alternatively, the inverse solution can be expressed as the current calculation formula: I = (Δv - v0) / S.

[0089] Where, Δv: resonant peak frequency shift (relative to the initial resonant frequency when there is zero current and no magnetic field), in Hz. I: measured current value, in A, mA, μA, etc. S: current measurement sensitivity, in Hz / A, representing the frequency shift caused by a unit current. v0: initial resonant frequency.

[0090] In some embodiments, to further improve the accuracy of current measurement, this embodiment can perform tracking measurements on two resonance peaks symmetrical to an initial resonance frequency (e.g., 2.87 GHz) to measure the microwave resonance frequencies of these two symmetrical resonance peaks. For example, a first resonance peak and a second resonance peak symmetrical to an initial resonance frequency (e.g., 2.87 GHz) are selected, and their corresponding initial frequencies are determined. For the first resonance peak, a first microwave modulation signal is output based on its initial frequency. A photodetector magnetic resonance measurement operation is performed based on the first microwave modulation signal to obtain a first measurement response signal for the microwave modulation signal. The first measurement response signal is then demodulated to obtain a first demodulated component. The microwave frequency of the first microwave modulation signal is adjusted until the first demodulated component matches the target value of the demodulated component, and this current microwave frequency is determined as the microwave resonance frequency of the first resonance peak. For the second resonance peak, a second microwave modulation signal can be output based on the initial frequency of the second resonance peak. A photodetector magnetic resonance measurement operation is then performed based on the second microwave modulation signal to obtain a second measurement response signal for the microwave modulation signal. This second measurement response signal is then demodulated to obtain a second demodulated component. The microwave frequency of the second microwave modulation signal is adjusted until the second demodulated component matches the target value of the demodulated component. This current frequency is then determined as the microwave resonance frequency of the second resonance peak. Furthermore, the current measurement value I can be calculated using a dual-channel differential method based on these two microwave resonance frequencies. For example, the microwave resonance frequency difference between these two resonance peaks is Δv = 2γB (referencing the Larmor precession equation), and the magnetic field B of the diamond NV color center is B = μ0*I / (2πr), where Δv is the microwave resonance frequency difference, i.e., the difference between the two microwave resonance frequencies; γ is the electron gyromagnetic ratio of the diamond NV color center; and μ0 is the vacuum permeability (4π×10⁻⁶). -7 Let H / m be the current measurement value, I be the current measured value, and r be the distance from the center of the conductor to the diamond NV color center in the quantum current sensor. The current measurement value I can then be calculated by solving the above formula.

[0091] In the aforementioned current measurement method, the initial resonant frequency of the quantum current sensor is obtained, and then a photodetector magnetic resonance measurement operation is performed based on the microwave modulation signal to obtain the measurement response signal for the microwave modulation signal. The measurement response signal is then demodulated to obtain the demodulated component. This allows for adjustment of the PID parameters based on the demodulated component and its target value when they do not match. The microwave frequency of the microwave modulation signal is then adjusted based on the adjusted PID parameters until the demodulated component matches its target value. The microwave frequency at which the demodulated component matches its target value is then determined as the microwave resonant frequency, and the current measurement value is determined based on this microwave resonant frequency. This process, by adaptively adjusting the PID parameters according to the changes in the demodulated component and its target value, allows the PID parameters to adapt to the nonlinear system of the demodulated component in real time, improving the convergence speed of the PID operation and thus increasing the speed of finding the microwave resonant frequency, thereby improving the measurement efficiency of the quantum current sensor.

[0092] In one exemplary embodiment, such as Figure 4 As shown, adjusting the PID parameters based on the demodulated component and the target value of the demodulated component includes steps 202 to 206. Wherein:

[0093] Step 202: Determine the demodulation component error between the demodulated component and the target value of the demodulated component.

[0094] For example, the quantum current sensor can use the value obtained by subtracting the target value of the demodulated component from the demodulated component as the demodulation error. Of course, in this embodiment, the value obtained by subtracting the demodulated component from the target value can also be used as the demodulation error. It is understood that the demodulation errors obtained in these two ways need to be adaptively adjusted during subsequent PID calculations.

[0095] Step 204: Determine the unknown frequency adjustment amount based on the PID parameters and demodulation component error.

[0096] For example, the quantum current sensor can calculate the desired frequency adjustment amount corresponding to the demodulation component error based on PID parameters and the demodulation component error through PID calculation. The input to the PID calculation is the demodulation component error, and the output is the microwave frequency adjustment amount. For example, the mathematical expression for the PID calculation is as follows:

[0097]

[0098] Where u(t) is the frequency adjustment, e(t) is the demodulation component error, and K... p K is the proportionality coefficient. i K is the integral coefficient. d is the differential coefficient.

[0099] Step 206: Adjust the PID parameters according to the unknown frequency adjustment amount.

[0100] During microwave frequency adjustment, excessively large adjustments to the desired frequency can lead to overshoot and oscillation, while insufficient adjustments can result in sluggish response and residual steady-state error. Quantum current sensors can adjust PID parameters based on the desired frequency adjustment. This adjustment includes at least modifying the proportional gain. The magnitude of the proportional gain adjustment is positively correlated with the absolute value of the desired frequency adjustment; a larger absolute value results in a larger adjustment magnitude, and a smaller absolute value results in a smaller adjustment magnitude. Conversely, the direction of proportional gain adjustment is negatively correlated with the absolute value of the desired frequency adjustment; a larger absolute value leads to a smaller adjustment magnitude, and a smaller absolute value leads to a smaller adjustment magnitude. The integral and derivative coefficients in the PID parameters can also be adjusted. For example, in this embodiment, if the absolute value of the desired frequency adjustment is greater than a first adjustment threshold, the proportional coefficient in the PID parameters can be decreased; if the absolute value of the desired frequency adjustment is less than a second adjustment threshold, the proportional coefficient in the PID parameters can be increased. The first adjustment threshold is greater than the second adjustment threshold. The first adjustment threshold is used to determine if the frequency adjustment is too large, and the second adjustment threshold is used to determine if the frequency adjustment is too small. The specific values ​​of the first and second adjustment thresholds can be selected according to actual needs.

[0101] In this embodiment, by adjusting the PID parameters according to the undetermined frequency adjustment amount, the frequency adjustment amount falls within a suitable range, avoiding problems such as overshoot and oscillation caused by excessive frequency adjustment amount, as well as problems such as sluggish response and residual steady-state error caused by insufficient frequency adjustment amount.

[0102] In one exemplary embodiment, adjusting the PID parameters according to the desired frequency adjustment amount includes:

[0103] If the absolute value of the undetermined frequency adjustment is greater than the first adjustment threshold, decrease the proportional coefficient in the PID parameters;

[0104] If the absolute value of the undetermined frequency adjustment is less than the second adjustment threshold, increase the proportional coefficient in the PID parameters, where the first adjustment threshold is greater than the second adjustment threshold.

[0105] For example, if the absolute value of the desired frequency adjustment amount is greater than a first adjustment threshold, it indicates that the adjustment range of the desired frequency adjustment amount for the microwave frequency is too large. In this case, the quantum current sensor can reduce the proportional coefficient in the PID parameters, wherein the reduction in the proportional coefficient in the PID parameters can be positively correlated with the absolute value of the desired frequency adjustment amount, so as to quickly reduce the excessive desired frequency adjustment amount to a suitable range (between the first adjustment threshold and the second adjustment threshold). Furthermore, in this embodiment, while reducing the proportional coefficient in the PID parameters, at least one of the integral coefficient and derivative coefficient in the PID parameters can also be reduced. If the absolute value of the desired frequency adjustment amount is less than a second adjustment threshold, it indicates that the adjustment range of the desired frequency adjustment amount for the microwave frequency is too small. In this case, the quantum current sensor can increase the proportional coefficient in the PID parameters, wherein the increase in the proportional coefficient in the PID parameters can be positively correlated with the absolute value of the desired frequency adjustment amount, so as to quickly increase the excessively small desired frequency adjustment amount to a suitable range (between the first adjustment threshold and the second adjustment threshold). In addition, this embodiment can increase at least one of the integral coefficient and derivative coefficient in the PID parameters while increasing the proportional coefficient in the PID parameters.

[0106] Therefore, this embodiment increases or decreases the proportional coefficient in the PID parameters based on the undetermined frequency adjustment amount, so as to quickly adjust the undetermined frequency adjustment amount that is too large or too small to a suitable range with the help of the adjusted PID parameters. This avoids problems such as overshoot and oscillation caused by excessive frequency adjustment amount, as well as problems such as slow response and residual steady-state error caused by insufficient frequency adjustment amount.

[0107] In one exemplary embodiment, such as Figure 5 As shown, adjusting the PID parameters based on the demodulated component and the target value of the demodulated component further includes steps 302 to 304. Wherein:

[0108] Step 302: Determine the demodulation component error between the demodulation component and the target value of the demodulation component.

[0109] For example, in this embodiment, the value obtained by subtracting the target value of the demodulated component from the demodulated component can be used as the demodulation component error. Of course, in this embodiment, the value obtained by subtracting the demodulated component from the target value of the demodulated component can also be used as the demodulation component error. It is understood that the demodulation component errors obtained in these two ways need to be adaptively adjusted during subsequent PID calculations.

[0110] Step 304: Adjust the PID parameters according to the demodulation component error.

[0111] In this embodiment, after determining the demodulation error between the demodulated component and its target value, the quantum current sensor can adjust the PID parameters based on this error. For example, the proportional gain, integral gain, and derivative gain in the PID parameters can be adjusted. This embodiment uses the difference between the demodulated component and its target value to adaptively adjust the PID parameters, effectively addressing the nonlinearity of the demodulated component and improving the convergence speed of the PID operation. For example, if the absolute value of the demodulated component error is greater than a first difference threshold, the proportional gain in the PID parameters can be increased, thereby increasing the response speed and accelerating the convergence of the PID operation. If the absolute value of the demodulated component error is less than a second difference threshold, increasing the integral gain in the PID parameters can effectively enhance the ability to eliminate steady-state errors, improving control accuracy and ultimately ensuring strict convergence to the demodulated component's target value.

[0112] In one exemplary embodiment, adjusting the PID parameters based on the demodulation component error includes:

[0113] If the absolute value of the demodulation component error is greater than the first difference threshold, increase the proportional coefficient in the PID parameters;

[0114] If the absolute value of the demodulation component error is less than the second difference threshold, increase the integral coefficient in the PID parameters, where the first difference threshold is greater than the second difference threshold.

[0115] This embodiment indicates that if the absolute value of the demodulated component error is greater than a first difference threshold, it means there is a large deviation between the current microwave frequency and the microwave resonant frequency. Increasing the proportional gain in the PID parameters improves the response speed when the deviation is large. Furthermore, to ensure the PID convergence speed matches the demodulated component error, the increase in the proportional gain is positively correlated with the absolute value of the demodulated component error. When the absolute value of the demodulated component error is less than a second difference threshold, it means there is a small deviation between the current microwave frequency and the microwave resonant frequency. Increasing the integral gain in the PID parameters effectively enhances the ability to eliminate steady-state errors, thereby improving control accuracy and ultimately ensuring strict convergence to the target value of the demodulated component.

[0116] This embodiment improves response speed by increasing the proportional coefficient in the PID parameters when the absolute value of the demodulation component error exceeds a first difference threshold. Conversely, it enhances the ability to eliminate steady-state errors by increasing the integral coefficient in the PID parameters when the absolute value of the demodulation component error is less than a second difference threshold. Thus, this embodiment achieves rapid response when the deviation is large, while maintaining precise control when the deviation is small, ensuring both convergence speed and accuracy.

[0117] In one exemplary embodiment, adjusting the microwave frequency of the microwave modulation signal based on the adjusted PID parameters includes:

[0118] The target frequency adjustment amount is determined based on the demodulation error between the demodulated component and the target value of the demodulated component, as well as the adjusted PID parameters.

[0119] When the target frequency adjustment is greater than the modulation depth of the microwave modulation signal, the integral term in the PID parameters is limited, and the target frequency adjustment is adjusted to the range of the modulation depth.

[0120] When the target frequency adjustment amount is less than or equal to the modulation depth, the microwave frequency of the microwave modulation signal is adjusted based on the target frequency adjustment amount.

[0121] In this embodiment, the quantum current sensor can calculate the target frequency adjustment amount based on the demodulation error between the demodulated component and the target value of the demodulated component, as well as the adjusted PID parameters, through PID calculation. To avoid overshoot (i.e., the output adjustment amount causing the regulated parameter to exceed the target value during adjustment), when the target frequency adjustment amount is greater than the modulation depth of the microwave modulation signal, the quantum current sensor can perform amplitude limiting processing on the integral term in the PID parameters and adjust the target frequency adjustment amount to the range of the modulation depth. The amplitude limiting processing is a limiting operation to prevent integral term saturation; specifically, it can be implemented using conditional integration or back calculation. For example, in this embodiment, the target frequency adjustment amount can be adjusted to the minimum value if it is less than the minimum value of the modulation depth range, and to the maximum value if it is greater than the maximum value of the modulation depth range. When the target frequency adjustment amount is less than or equal to the modulation depth, the quantum current sensor can adjust the microwave frequency of the microwave modulation signal based on the target frequency adjustment amount. like Figure 6 As shown, this embodiment limits the target frequency adjustment amount to the range of modulation depth ( Figure 6 Within the vertical dashed line (in the diagram), the microwave frequency of the adjusted microwave modulation signal can be controlled to be within the frequency modulated range (initial resonant frequency ± modulation depth).

[0122] In one exemplary embodiment, such as Figure 7 As shown, steps 402 to 406 are included before adjusting the microwave frequency of the microwave modulation signal. Wherein:

[0123] Step 402: Predict the current detected by the quantum current sensor when the demodulated component matches the target value of the demodulated component, and obtain the current prediction value.

[0124] In this embodiment, the quantum current sensor can predict the current detected by the quantum current sensor when the demodulated component matches the target value of the demodulated component, based on historical current information, thus obtaining a predicted current value. The historical current information refers to the current measurement value at a historical moment. For example, this embodiment can use statistical mathematical models, machine learning models, or deep learning models to predict the current value at a future moment (i.e., the predicted current value) based on historical current information. Taking a sine wave as an example, the prediction equation of the current prediction model is: in These are the prediction parameters for the prediction equation. To ensure the accuracy of the current prediction model, this embodiment updates the prediction parameters of the prediction equation based on the predicted current value and the measured current value at the same time. The specific update method is as follows:

[0125] Prediction error: i measure Let be the current measurement value at time t. Let t be the predicted current value at time t.

[0126] The parameter corrections for the prediction parameters of the prediction equation are calculated as follows:

[0127]

[0128] Parameter updates for the prediction parameters of the prediction equation:

[0129] Where ΔA(t) is the prediction parameter. The correction amount, Δφ(t) is the prediction parameter. The correction amount, Δw(t) is the prediction parameter. The correction amount. For the prediction parameters The proportional coefficient used in PID calculations. For the prediction parameters Integral coefficients for PID calculations. For the prediction parameters The differential coefficients used in PID calculations. For the prediction parameters The proportional coefficient used in PID calculations. For the prediction parameters Integral coefficients for PID calculations. For the prediction parameters The differential coefficients used in PID calculations. For the prediction parameters The proportional coefficient used in PID calculations.

[0130] Step 404: Obtain the microwave frequency prediction value based on the current prediction value.

[0131] Since there is a linear relationship between the microwave resonant frequency and the measured current value, the quantum current sensor can derive the microwave frequency prediction value corresponding to the current prediction value based on this linear relationship.

[0132] Step 406: Based on the microwave predicted frequency, correct the target frequency adjustment amount to obtain a new target frequency adjustment amount, and return to the step of adjusting the microwave frequency of the microwave modulation signal based on the target frequency adjustment amount until the demodulated component matches the target value of the demodulated component.

[0133] In this embodiment, the quantum current sensor can calculate the difference between the predicted microwave frequency and the actual microwave frequency to obtain a frequency modulation prediction value. Then, by weighting the predicted frequency modulation value and the target frequency modulation amount, the target frequency modulation amount is corrected to obtain a new target frequency modulation amount. The weighting coefficients for the predicted frequency modulation value and the target frequency modulation amount can be selected according to specific circumstances. The quantum current sensor can then return to the step of adjusting the microwave frequency of the microwave modulation signal based on the new target frequency modulation amount until the demodulated component matches the target value of the demodulated component.

[0134] In this embodiment, the microwave frequency prediction value is derived by back-calculating the predicted current value, and the target frequency adjustment is corrected. This can further improve the efficiency of searching for the microwave resonant frequency, and thus further improve the measurement efficiency of the quantum current sensor.

[0135] In one exemplary embodiment, the method further includes:

[0136] The current of the quantum current sensor is monitored to obtain the current monitoring results;

[0137] If the current monitoring results indicate an abnormal current, lock the PID parameters, or adjust the PID parameters to the predetermined protection parameter values.

[0138] The current monitoring results can include descriptions of the current's characteristic attributes, such as current waveform and current magnitude. Current anomalies can manifest as non-periodic current waveforms or abnormally high currents. Preset protection parameter values ​​are the values ​​of pre-defined PID parameters to prevent erroneous adjustments to the PID parameters.

[0139] Since the PID parameters in this embodiment change with the demodulated components, an abnormal current may cause the PID parameters to be incorrectly adjusted. Therefore, this embodiment can lock the current PID parameters (i.e., keep the current PID parameters unchanged) when an abnormal current is detected, to avoid incorrect adjustments due to the abnormal current. Furthermore, to completely eliminate the impact of abnormal current on the PID parameters, the quantum current sensor can also adjust the PID parameters to a predetermined protection parameter value when an abnormal current is detected, allowing the PID parameter adjustment to be redone and eliminating the effects of previous adjustments.

[0140] This embodiment locks the PID parameters or adjusts them to predetermined protection parameter values ​​when current monitoring results indicate an abnormal current. This avoids erroneous adjustments to the PID parameters during current anomalies, preventing excessive deviations in microwave frequency regulation.

[0141] To provide a clearer explanation of the current measurement method provided in this application, a specific embodiment is described below. This embodiment uses a two-phase lock-in amplifier as a demodulation method and includes the following:

[0142] Step 1: Obtain the initial resonant frequency of the quantum current sensor.

[0143] Because different quantum current sensors may produce different ODMR sweep spectral lines at zero magnetic field, their initial resonance frequencies will also differ. Furthermore, depending on the axial relationship between the magnetic field and the NV color center of the quantum current sensor, there may be 2, 4, 6, or 8 resonance peaks. In actual measurement, one of these peaks can be selected, such as the leftmost resonance peak, or multiple resonance peaks can be used simultaneously as the initial resonance frequency for tracking and measurement. For example, optimization algorithms such as particle swarm optimization, genetic algorithms, simulated annealing algorithms, or related improved fusion algorithms can be used to search for the initial resonance frequency.

[0144] Step 2: Output a microwave modulation signal based on the initial resonant frequency.

[0145] The microwave is frequency modulated according to the initial resonant frequency to output a microwave modulated signal with the same frequency as the initial resonant frequency. The microwave modulated signal is generally a sine wave or square wave signal.

[0146] Step 3: Perform optical detection magnetic resonance measurement based on the microwave modulation signal to obtain the measurement response signal for the microwave modulation signal.

[0147] The radio frequency microwave source of the quantum current sensor is adjusted according to the microwave modulation signal to perform ODMR measurement and obtain the PD (Photodiode) signal (i.e., measurement response signal). The PD signal is a real-time electrical signal converted by the photodetector unit in the quantum current sensor from the light intensity signal of the NV color center. The PD signal constitutes the ODMR spectrum as the microwave frequency of the microwave modulation signal changes.

[0148] Step 4: Demodulate the measured response signal to obtain the demodulated component.

[0149] The PD signal is processed by a dual-phase lock-in amplifier to obtain the demodulated component. Specifically, the PD signal is mixed with two orthogonal (i.e., 90° phase difference) reference signals in the dual-phase lock-in amplifier to obtain two mixed signals, where the frequency of the reference signals is the same as the modulation frequency of the microwave modulation signal. Then, the two mixed signals are passed through a low-pass filter to retain the DC component, yielding demodulated values ​​X and Y. When the microwave frequency of the microwave modulation signal is in phase with the microwave resonant frequency, the demodulated value X is near zero. When the demodulated value Y (i.e., the demodulated component) equals the target value of the demodulated component (generally 0), it indicates that the microwave frequency corresponding to the microwave modulation signal is the microwave resonant frequency. Then, an adaptive PID algorithm is used to adjust the microwave frequency so that the demodulated value Y equals 0. When the demodulated value Y is less than 0, the microwave frequency is increased; when the demodulated value Y is greater than 0, the microwave frequency is decreased. This adaptive PID algorithm ensures that the output frequency adjustment is less than the modulation depth of the microwave modulation signal by adjusting the PID parameters, preventing overshoot.

[0150] The adaptive PID algorithm includes:

[0151] (1) Integral limiting operation is used to ensure that the microwave frequency adjustment is less than the modulation depth. This prevents the integral term of the PID algorithm from saturating and causing overshoot when the deviation between the demodulated component and the target value of the demodulated component is too large.

[0152] (2) Dynamically adjust the PID parameters based on the demodulation error between the demodulated component and the target demodulation component. Determining the demodulation error between the demodulated component and the target demodulation component, and adjusting the PID parameters based on the demodulation error, can make the PID algorithm converge faster and reduce the measurement time for determining the microwave resonant frequency.

[0153] Step 5: If the demodulated component does not match the target value, adjust the PID parameters, and based on the adjusted PID parameters, adjust the microwave frequency of the microwave modulation signal until the demodulated component matches the target value.

[0154] In this embodiment, the target frequency adjustment amount is obtained through PID calculation based on the demodulation error between the demodulated component and the target demodulation value, and the adjusted PID parameters. Furthermore, based on a current prediction model, the current detected by the quantum current sensor is predicted when the demodulated component matches the target demodulation value, resulting in a predicted current value. Based on this predicted current value, a predicted microwave frequency value is obtained. Then, the target frequency adjustment amount is corrected based on the predicted microwave frequency to obtain a new target frequency adjustment amount. Taking a sine wave as an example, the prediction equation of the current prediction model is: in These are the prediction parameters for the current prediction model. The microwave frequency of the microwave modulation signal is adjusted according to the new target frequency adjustment amount until the demodulated component matches the target value. By combining the PID algorithm with the prediction model, the measurement convergence speed is faster and the measurement time is shorter.

[0155] Step 6: Determine the microwave resonant frequency as the microwave frequency at which the demodulated component matches the target value of the demodulated component, and determine the current measurement value based on the microwave resonant frequency.

[0156] When the demodulated value Y corresponding to the adjusted microwave frequency meets the threshold requirement (demodulation component error is less than a predetermined error threshold), the microwave frequency of the microwave modulation signal is considered to be the microwave resonant frequency. Otherwise, after adjusting the microwave frequency of the microwave modulation signal according to the frequency adjustment amount output by the PID algorithm, step 3 is continued until the demodulated value Y corresponding to the adjusted microwave frequency meets the threshold requirement. Since the microwave frequency offset between the resonance peak (the location of the microwave resonant frequency) and the initial resonant frequency when the current is 0 is linearly related to the current magnitude, the measured current value can be calculated based on the linearity formula and the measured microwave resonant frequency.

[0157] Step 7: Record the current measurement values ​​and revise the current prediction model based on these values ​​to ensure its accuracy. Taking a sine wave as an example, the prediction equation for the current prediction model is as follows: in These are the prediction parameters for the current prediction model. Taking a sinusoidal current as an example, the prediction equation of the current prediction model is: in These are the prediction parameters for the prediction equation. To ensure the accuracy of the current prediction model, this embodiment updates the prediction parameters of the prediction equation based on the predicted current value and the measured current value at the same time. The specific update method is as follows:

[0158] Prediction error: i measure Let be the current measurement value at time t. Let t be the predicted current value at time t.

[0159] The parameter corrections for the prediction parameters of the prediction equation are calculated as follows:

[0160]

[0161] Parameter updates for the prediction parameters of the prediction equation:

[0162] Where ΔA(t) is the prediction parameter. The correction amount, Δφ(t) is the prediction parameter. The correction amount, Δw(t) is the prediction parameter. The correction amount. For the prediction parameters The proportional coefficient used in PID calculations. For the prediction parameters Integral coefficients for PID calculations. For the prediction parameters The differential coefficients used in PID calculations. For the prediction parameters The proportional coefficient used in PID calculations. For the prediction parameters Integral coefficients for PID calculations. For the prediction parameters The differential coefficients used in PID calculations. For the prediction parameters The proportional coefficient used in PID calculations.

[0163] In addition, during continuous measurement, the current of the quantum current sensor can be monitored to obtain the current monitoring results. If the current monitoring results indicate an abnormal current, the PID parameters can be locked, or the PID parameters can be adjusted to a predetermined protection parameter value.

[0164] If the AC measurement waveform is non-periodic or even shows abnormally large current, it is assumed that a short circuit fault has occurred in the circuit environment where the measured current is located. This will generate a system alarm and switch the quantum current sensor to protection mode to protect and correct the PID parameters, such as locking the PID parameters or adjusting the PID parameters to a predetermined protection parameter value.

[0165] It should be understood that although the steps in the flowcharts of the above embodiments 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 above embodiments 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.

[0166] Based on the same inventive concept, this embodiment also provides a current measuring device for implementing the current measuring 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 current measuring device embodiments provided below can be found in the limitations of the current measuring method described above, and will not be repeated here.

[0167] In one exemplary embodiment, such as Figure 8 As shown, a current measuring device 800 is provided, including: a modulation module 810, a measuring module 820, an adjustment module 830, and a determining module 840, wherein:

[0168] The modulation module 810 is used to obtain the initial resonant frequency of the quantum current sensor and output a microwave modulation signal based on the initial resonant frequency.

[0169] The measurement module 820 is used to perform optical detection magnetic resonance measurement operations based on microwave modulation signals, acquire measurement response signals for microwave modulation signals, and demodulate the measurement response signals to obtain demodulated components;

[0170] The adjustment module 830 is used to adjust the PID parameters when the demodulated component does not match the target value of the demodulated component, and adjust the microwave frequency of the microwave modulation signal based on the adjusted PID parameters until the demodulated component matches the target value of the demodulated component.

[0171] The determination module 840 is used to determine the microwave resonant frequency when the demodulated component matches the target value of the demodulated component, and to determine the current measurement value based on the microwave resonant frequency.

[0172] In one embodiment, the adjustment module 830 is further configured to determine the demodulation component error between the demodulated component and the target value of the demodulated component, determine the unknown frequency adjustment amount based on the PID parameters and the demodulation component error, and adjust the PID parameters according to the unknown frequency adjustment amount.

[0173] In one embodiment, the adjustment module 830 is further configured to decrease the proportional coefficient in the PID parameters when the absolute value of the adjustment amount to be determined is greater than the first adjustment amount threshold, and increase the proportional coefficient in the PID parameters when the absolute value of the adjustment amount to be determined is less than the second adjustment amount threshold, wherein the first adjustment amount threshold is greater than the second adjustment amount threshold.

[0174] In one embodiment, the adjustment module 830 is further configured to determine the demodulation component error between the demodulated component and the target value of the demodulated component, and adjust the PID parameters according to the demodulation component error.

[0175] In one embodiment, the adjustment module 830 is further configured to increase the proportional coefficient in the PID parameters when the absolute value of the demodulation component error is greater than a first difference threshold, and to increase the integral coefficient in the PID parameters when the absolute value of the demodulation component error is less than a second difference threshold, wherein the first difference threshold is greater than the second difference threshold.

[0176] In one embodiment, the adjustment module 830 is further configured to determine a target frequency adjustment amount based on the demodulation component error between the demodulated component and the target value of the demodulated component, and the adjusted PID parameters; when the target frequency adjustment amount is greater than the modulation depth of the microwave modulation signal, to perform amplitude limiting processing on the integral term in the PID parameters and adjust the target frequency adjustment amount to the range of the modulation depth; when the target frequency adjustment amount is less than or equal to the modulation depth, to adjust the microwave frequency of the microwave modulation signal based on the target frequency adjustment amount.

[0177] In one embodiment, the adjustment module 830 is further configured to predict the current detected by the quantum current sensor when the demodulated component matches the target value of the demodulated component, obtain a current prediction value, obtain a microwave frequency prediction value based on the current prediction value, correct the target frequency adjustment amount based on the microwave prediction frequency, obtain a new target frequency adjustment amount, and control the adjustment module 830 to perform the operation of adjusting the microwave frequency of the microwave modulation signal based on the target frequency adjustment amount until the demodulated component matches the target value of the demodulated component.

[0178] In one embodiment, the current measuring device further includes a protection module for monitoring the current of the quantum current sensor, obtaining current monitoring results, and locking the PID parameter when the current monitoring results indicate an abnormal current, or adjusting the PID parameter to a predetermined protection parameter value.

[0179] Each module in the aforementioned current measuring device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the quantum current sensor in hardware form or independent of it, or stored in the memory of the quantum current sensor in software form, so that the processor can call and execute the corresponding operations of each module.

[0180] In one exemplary embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, this electronic device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface is also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a current measurement method.

[0181] Those skilled in the art will understand that Figure 9 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 electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0182] In one exemplary embodiment, an electronic device is provided, 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 the above-described method embodiments.

[0183] 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 in the above method embodiments.

[0184] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0185] 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.

[0186] 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. When executed, the computer program 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.

[0187] 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.

[0188] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this 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. A current measurement method, characterized in that, The method includes: Obtain the initial resonant frequency of the quantum current sensor, and output a microwave modulation signal based on the initial resonant frequency; Based on the microwave modulation signal, perform optical detection magnetic resonance measurement operation to obtain the measurement response signal in response to the microwave modulation signal, and demodulate the measurement response signal to obtain the demodulated component; If the demodulated component does not match the target value of the demodulated component, the PID parameters are adjusted according to the demodulated component and the target value of the demodulated component, and the microwave frequency of the microwave modulation signal is adjusted based on the adjusted PID parameters until the demodulated component matches the target value of the demodulated component. The microwave frequency at which the demodulated component matches the target value of the demodulated component is determined as the microwave resonant frequency, and the current measurement value is determined based on the microwave resonant frequency.

2. The method according to claim 1, characterized in that, The step of adjusting the PID parameters according to the demodulated component and the target value of the demodulated component includes: Determine the demodulation component error between the demodulated component and the target value of the demodulated component; Based on the PID parameters and the demodulation component error, the desired frequency adjustment amount is determined; The PID parameters are adjusted according to the desired frequency adjustment amount.

3. The method according to claim 2, characterized in that, The step of adjusting the PID parameters according to the desired frequency adjustment amount includes: If the absolute value of the undetermined frequency adjustment is greater than the first adjustment threshold, decrease the proportional coefficient in the PID parameters; If the absolute value of the desired frequency adjustment is less than the second adjustment threshold, the proportional coefficient in the PID parameter is increased, wherein the first adjustment threshold is greater than the second adjustment threshold.

4. The method according to claim 1, characterized in that, The step of adjusting the PID parameters according to the demodulated component and the target value of the demodulated component further includes: Determine the demodulation component error between the demodulated component and the target value of the demodulated component; The PID parameters are adjusted based on the demodulation component error.

5. The method according to claim 4, characterized in that, The step of adjusting the PID parameters based on the demodulation component error includes: If the absolute value of the demodulation component error is greater than the first difference threshold, increase the proportional coefficient in the PID parameters; If the absolute value of the demodulation component error is less than the second difference threshold, the integral coefficient in the PID parameter is increased, wherein the first difference threshold is greater than the second difference threshold.

6. The method according to claim 1, characterized in that, The adjustment of the microwave frequency of the microwave modulation signal based on the adjusted PID parameters includes: The target frequency adjustment amount is determined based on the demodulation component error between the demodulated component and the target value of the demodulated component, and the adjusted PID parameters; When the target frequency adjustment amount is greater than the modulation depth of the microwave modulation signal, the integral term in the PID parameter is subjected to amplitude limiting, and the target frequency adjustment amount is adjusted to the range of the modulation depth. When the target frequency adjustment amount is less than or equal to the modulation depth, the microwave frequency of the microwave modulation signal is adjusted based on the target frequency adjustment amount.

7. The method according to claim 6, characterized in that, Before adjusting the microwave frequency of the microwave modulation signal, the following steps are included: The current predicted value is obtained by predicting the current detected by the quantum current sensor when the demodulated component matches the target value of the demodulated component. Based on the predicted current value, the predicted microwave frequency value is obtained; Based on the microwave predicted frequency, the target frequency adjustment amount is corrected to obtain a new target frequency adjustment amount. The process then returns to the step of adjusting the microwave frequency of the microwave modulation signal based on the target frequency adjustment amount until the demodulated component matches the target value of the demodulated component.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The current of the quantum current sensor is monitored to obtain the current monitoring results; If the current monitoring results indicate an abnormal current, the PID parameter is locked, or the PID parameter is adjusted to a predetermined protection parameter value.

9. An electronic 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 8.

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 8.

Citation Information

Cited By

  • Diamond NV color center magnetic sensing method and system with wide dynamic range

    CN121454422A