Method, device and equipment for reading parameters in nuclear magnetic signals and medium
By adjusting the zero-order phase of the local oscillator signal, the spectrum signal of the nuclear magnetic signal is symmetrical and upward, which solves the parameter reading error problem caused by uneven magnetic field, and realizes highly accurate spectrum signal phase and height reading.
Patent Information
- Application Number
- CN202411998742.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
AI Technical Summary
When reading parameters in nuclear magnetic signals in the prior art, the mathematical model fitting is low due to uneven magnetic fields, and parameter reading errors occur.
By adjusting the zero-order phase of the local oscillator signal, the spectrum signal corresponding to the FID signal is symmetrical and upward, so that the phase and height of the spectrum signal can be read according to the phase adjustment accumulated value.
Without mathematical model fitting of the spectrum, the accuracy of reading the spectrum signal phase and height is improved, and fitting readout errors caused by uneven magnetic field are avoided.
Smart Images

Figure CN119804534A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of processing free induction decay signals, and in particular to a method, device, equipment and medium for reading parameters in nuclear magnetic resonance signals. Background Art
[0002] Nuclear Magnetic Resonance (NMR) technology is commonly used in medical and chemical testing, and can also be used in quantum computing and other fields. Atomic nuclei will produce different energy levels in a magnetic field, and the nuclei will absorb the radio frequency field that resonates with their frequency to cause energy level transitions. If the radio frequency field is used to excite the energy level state of the atomic nuclei, the free induction decay (FID) signal generated by the atomic nuclei can be measured in the experiment, thereby obtaining information about the chemical structure or quantum state of the sample. In order to reflect the quantum state of the nuclear spin and the chemical structure of the compound where the nuclear spin is located, it is necessary to obtain the height and phase parameters of the FID frequency domain signal.
[0003] The method of reading the above parameters from the spectrum of experimental data is generally to use a complex Lorentz mathematical model to fit the shape of the actual spectral line. That is, when the degree of fit is high, the above parameters can be obtained from the mathematical model. However, due to the uneven magnetic field, the degree of fit of the mathematical model is low, and parameter reading errors may occur. Summary of the invention
[0004] The present application provides a method, device, equipment and medium for reading parameters in nuclear magnetic resonance signals. By adjusting the zero-order phase of the local oscillator signal, a spectrum signal corresponding to the FID signal is achieved to have a left-right symmetrical and upward shape, so that the phase of the spectrum signal can be read according to the phase adjustment cumulative value and the height of the spectrum signal can be directly measured.
[0005] In a first aspect, the present application provides a method for reading parameters in a nuclear magnetic resonance signal, the method comprising:
[0006] By collecting nuclear magnetic signals, free induction decay FID signals are obtained;
[0007] According to the zero-order phase of the current local oscillator signal, the FID signal is Fourier transformed into a frequency domain signal to obtain a spectrum signal;
[0008] Taking the midpoint position of the signal peak in the spectrum signal and the zero amplitude line as the reference, calculate the left area and the right area in the spectrum signal;
[0009] If the absolute value of the phase difference between the area on the left and the area on the right is less than or equal to the error tolerance parameter, the phase measurement value of the spectrum signal within the error tolerance range is obtained according to the phase adjustment cumulative value, and the height of the read spectrum signal is measured, and the phase adjustment cumulative value is obtained by adding the corresponding phase adjustment values in the Fourier transform iterative operation, and the phase adjustment value is obtained by adjusting the zero-order phase of the local oscillator signal to the phase value of the zero-order phase of the current local oscillator signal.
[0010] Optionally, before the operation of performing Fourier transform of the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal is initially performed, the method further includes:
[0011] The zero-order phase of the original local oscillator signal is subtracted from the phase adjustment value to obtain the zero-order phase initial value of the current local oscillator signal.
[0012] Optionally, the iterative operation process of Fourier transform includes:
[0013] If the phase difference between the left area and the right area is greater than the error tolerance parameter, or if the phase difference between the left area and the right area is less than the negative value of the error tolerance parameter, the zero-order phase of the local oscillator signal is adjusted according to the phase adjustment value. After obtaining the zero-order phase of the current local oscillator signal, return to execute the operation of performing Fourier transform on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to determine whether the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, until the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, and the phase adjustment cumulative value is obtained.
[0014] Optionally, adjusting the zero-order phase of the local oscillator signal according to the phase adjustment value to obtain the zero-order phase of the current local oscillator signal includes:
[0015] If the phase difference between the left area and the right area in the previous Fourier transform iteration process is of the same sign as the phase difference between the left area and the right area in the current Fourier transform iteration process, the zero-order phase of the local oscillator signal is subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal;
[0016] If the phase difference between the left area and the right area in the previous Fourier transform iteration process and the phase difference between the left area and the right area in the current Fourier transform iteration process have different signs, the phase adjustment value is assigned to the negative value of the phase adjustment value in the previous Fourier transform iteration process divided by 2, and the phase adjustment value is subtracted from the zero-order phase of the local oscillator signal to obtain the zero-order phase of the current local oscillator signal;
[0017] If Fourier transform is performed for the first time, the zero-order phase of the local oscillator signal is obtained by subtracting the phase adjustment value from the zero-order phase initial value of the local oscillator signal.
[0018] Optionally, taking the midpoint position of the signal peak in the spectrum signal and the zero amplitude line as a reference, calculating the left area and the right area in the spectrum signal includes:
[0019] The spectrum signal is divided according to the midpoint position of the signal peak in the spectrum signal to obtain a left spectrum signal based on the left side of the midpoint position and a right spectrum signal based on the right side of the midpoint position;
[0020] The area of the left spectrum signal and the right spectrum signal is calculated according to the integral of the zero amplitude line and the envelope line to obtain the left area and the right area.
[0021] Optionally, obtaining a phase measurement value of the spectrum signal within an error tolerance range according to the phase adjustment cumulative value includes:
[0022] If the sum of the left area and the right area is greater than 0, the phase adjustment cumulative value is output as the phase measurement value of the spectrum signal within the error tolerance range;
[0023] If the sum of the left area and the right area is less than 0, the phase adjustment cumulative value is added with π, and the output is the phase measurement value of the spectrum signal within the error tolerance range.
[0024] In a second aspect, the present application provides a device for reading parameters in a nuclear magnetic resonance signal, the device comprising:
[0025] An acquisition unit, used for acquiring a free induction decay (FID) signal by collecting a nuclear magnetic resonance signal;
[0026] A processing unit, used for performing Fourier transformation on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to obtain a spectrum signal;
[0027] A calculation unit, used to calculate the left area and the right area of the spectrum signal based on the midpoint position of the signal peak in the spectrum signal and the zero amplitude line;
[0028] A reading unit is used to obtain a phase measurement value of the spectrum signal within an error tolerance range according to a phase adjustment cumulative value if the absolute value of the phase difference between the left area and the right area is less than or equal to an error tolerance parameter, and to measure the height of the read spectrum signal, wherein the phase adjustment cumulative value is obtained by accumulating the corresponding phase adjustment values in the Fourier transform iterative operation, and the phase adjustment value is a phase value for adjusting the zero-order phase of the local oscillator signal to the zero-order phase of the current local oscillator signal.
[0029] Optionally, before initially performing the operation of Fourier transforming the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal, the obtaining unit is further used to:
[0030] The phase adjustment value is subtracted from the zero-order phase of the original local oscillator signal to obtain an initial value of the zero-order phase of the current local oscillator signal.
[0031] Optionally, the processing unit further includes:
[0032] an adjusting unit, configured to adjust the zero-order phase of the local oscillator signal according to the phase adjustment value to obtain the zero-order phase of the current local oscillator signal if the phase difference between the left area and the right area is greater than an error tolerance parameter, or if the phase difference between the left area and the right area is less than a negative value of the error tolerance parameter;
[0033] The iteration unit is used to return to execute the operation of performing Fourier transform on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to determine whether the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, until the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, and obtain the phase adjustment cumulative value.
[0034] Optionally, the adjustment unit is specifically used for:
[0035] If the phase difference between the left area and the right area in the previous Fourier transform iteration process is of the same sign as the phase difference between the left area and the right area in the current Fourier transform iteration process, the zero-order phase of the local oscillator signal is subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal;
[0036] If the phase difference between the left area and the right area in the previous Fourier transform iteration process and the phase difference between the left area and the right area in the current Fourier transform iteration process have different signs, the phase adjustment value is assigned to the negative value of the phase adjustment value in the previous Fourier transform iteration process divided by 2, and the phase adjustment value is subtracted from the zero-order phase of the local oscillator signal to obtain the zero-order phase of the current local oscillator signal;
[0037] If Fourier transform is performed for the first time, the zero-order phase of the local oscillator signal is obtained by subtracting the phase adjustment value from the zero-order phase initial value of the local oscillator signal.
[0038] Optionally, the computing unit is specifically used for:
[0039] The spectrum signal is divided according to the midpoint position of the signal peak in the spectrum signal to obtain a left spectrum signal based on the left side of the midpoint position and a right spectrum signal based on the right side of the midpoint position;
[0040] The area of the left spectrum signal and the right spectrum signal is calculated according to the integral of the zero amplitude line and the envelope line to obtain the left area and the right area.
[0041] Optionally, when the reading unit obtains the phase measurement value of the spectrum signal within the error tolerance range according to the phase adjustment cumulative value, it is specifically used to:
[0042] If the sum of the left area and the right area is greater than 0, the phase adjustment cumulative value is output as the phase measurement value of the spectrum signal within the error tolerance range;
[0043] If the sum of the left area and the right area is less than 0, the phase adjustment cumulative value is added with π, and the output is the phase measurement value of the spectrum signal within the error tolerance range.
[0044] In a third aspect, the present application provides an electronic device, the electronic device comprising a memory and a processor:
[0045] The memory is used to store computer programs;
[0046] The processor is used to execute the method provided by the first aspect according to the computer program.
[0047] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program for executing the method provided in the first aspect.
[0048] It can be seen that this application has the following beneficial effects:
[0049] The present application provides a method for reading parameters in a nuclear magnetic resonance signal, which obtains a free induction decay (FID) signal by collecting a nuclear magnetic resonance signal; performs Fourier transform on the FID signal into a frequency domain signal according to the zero-order phase of a current local oscillator signal to obtain a spectrum signal; calculates the left area and the right area in the spectrum signal based on the midpoint position of the signal peak in the spectrum signal and the zero amplitude line; if the absolute value of the phase difference between the left area and the right area is less than or equal to an error tolerance parameter, obtains a phase measurement value of the spectrum signal within the error tolerance range according to a phase adjustment cumulative value, and measures the height of the read spectrum signal, wherein the phase adjustment cumulative value is obtained by accumulating the corresponding phase adjustment values in the Fourier transform iterative operation, and is a phase value for adjusting the zero-order phase of the local oscillator signal to the zero-order phase of the current local oscillator signal. In this process, when the spectrum signal is symmetrical and upward, the relative phase of the zero-order phase of the current local oscillator signal and the zero-order phase of the FID signal is exactly 0, which means that the zero-order phase of the current local oscillator signal is equal to the zero-order phase of the FID signal within the error tolerance range. Therefore, the original relative phase of the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal can be obtained according to the phase adjustment cumulative value in the process of adjusting the zero-order phase of the local oscillator signal to the zero-order phase of the current local oscillator signal. That is, in this adjustment process, the phase adjustment value (including positive and negative signs) of each iteration process is accumulated to obtain the phase measurement value of the spectrum signal within the error tolerance range. At the same time, when the spectrum signal is adjusted to be symmetrical and upward, the signal height is equal to the spectrum signal intensity. Therefore, the phase measurement value of the spectrum signal within the error tolerance range and the height of the spectrum signal can be directly obtained through the Fourier transform iteration operation, so that the phase and height of the spectrum signal can be measured without fitting the mathematical model of the spectrum, avoiding the fitting readout error caused by the uneven magnetic field, and improving the accuracy of the phase and height of the spectrum signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0051] Figure 1 It is a schematic diagram of fitting the complex Lorentz mathematical model and the experimental spectral line shape in the embodiment of the present application;
[0052] Figure 2 This is a schematic diagram of the shape of different phase changes of an experimental spectrum line in an embodiment of the present application;
[0053] Figure 3This is a flow chart of an embodiment of a method for reading parameters in a nuclear magnetic resonance signal in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of converting a time domain signal into a frequency domain signal in an embodiment of the present application;
[0055] Figure 5 This is a schematic diagram of the left side area and the right side area of a spectrum signal in an embodiment of the present application;
[0056] Figure 6 This is a flow chart of another embodiment of a method for reading parameters in a nuclear magnetic resonance signal in an embodiment of the present application;
[0057] Figure 7 This is a schematic diagram of the structure of a device for reading parameters in a nuclear magnetic resonance signal in an embodiment of the present application;
[0058] Figure 8 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0061] First, the technical terms that may appear in the embodiments of this application are explained here:
[0062] (1) Nuclear magnetic resonance: The process in which a non-zero spin atomic nucleus absorbs electromagnetic waves of a specific frequency under the action of an external magnetic field and undergoes energy level transition. A non-zero spin atomic nucleus has a magnetic moment, and its spin energy level undergoes Zeeman splitting under the action of an external magnetic field.
[0063] (2) Spin echo: It is a signal source in the magnetic resonance phenomenon. Compared with the free induction decay (FID) that appears immediately after the first radio frequency pulse (RF pulse) excitation, the spin echo is a signal that grows back after the dephased magnetization vector is refocused after the second radio frequency pulse.
[0064] In the process of generating FID signal by spin echo, the quantum state of spin has dynamic behavior of transverse angular momentum changing with time in magnetic field. The macroscopic phenomenon is: when the net magnetic moment When there is an angle with the external magnetic field direction (Z axis), it will precess around the magnetic field direction at the Larmor frequency ω0. This behavior is similar to the precession of a gyroscope around the gravitational field perpendicular to the ground if it deviates from the vertical direction during rotation. During the precession process, the net magnetic moment The lateral component of will vary with time:
[0065]
[0066] Among them, M x-y (t0) represents the projection of the net magnetic moment on the xy plane at the beginning of precession, φ represents the angle between the projection of the net magnetic moment on the xy plane and the x-axis at the beginning of precession (also called phase, in radians in the formula), is an attenuation coefficient related to decoherence, and ω0 represents the Larmor frequency.
[0067] The transverse component of the net magnetic moment generates a changing magnetic field during the precession process, and the changing magnetic field generates a changing electric field that is captured by the coil in the device. This nuclear magnetic signal that decays with time is the FID signal, which contains various nuclear state information such as Larmor frequency ω0, phase φ, and the magnitude of the transverse component of the net magnetic moment.
[0068] (3) Complex Lorentzian: The frequency domain signal of the FID signal after FFT. The strength of the complex Lorentzian is determined by the initial strength of the FID signal and is proportional to the projection size M of the net magnetic moment on the xy plane at the initial sampling moment. x-y (t0); and the shape of the complex Lorentz type is determined by the phase φ of the net magnetic moment at the initial sampling moment. x The generated signal corresponds to the real part of the complex Lorentz type M y The generated signal corresponds to the imaginary part of the complex Lorentz type Their function expressions are:
[0069]
[0070] Among them, |a l |∝|M x-y (t0)| is the FFT signal amplitude, λ is a constant reflecting the signal attenuation speed, φ represents the phase of the complex Lorentz type (spectrum signal), and ω0 represents the Larmor frequency.
[0071] Based on the above description and Figure 2As shown in the change diagram, it can be seen The height of |a l |, the shape of the spectrum signal is related to the phase φ, so when the spectrum signal is symmetrical and upward, the phase of the signal is exactly 0, and the signal height is also equal to the spectrum signal strength |a l |.
[0072] (4) Relative phase: Relative phase refers to the phase difference between two waves. At the same frequency, the phase difference between two waves can be any value, but their relative phase is regular. When the phase difference between the two waves is 0, the relative phase is 0 degrees; when the phase difference is 180 degrees, the relative phase is 180 degrees.
[0073] (5) Zero-order phase: usually refers to the phase angle of a waveform at the beginning of its cycle. In other words, if a periodic signal starts a new cycle at time t = 0, then it can be said that the signal has a zero-order phase at t = 0.
[0074] (6) Local Oscillator (LO): A key component in radio communication equipment that generates RF signals to drive receiving or transmitting circuits. The LO provides a stable reference frequency to ensure the precision and accuracy of the modulation and demodulation process, helping to achieve reliable signal transmission.
[0075] At present, the method of reading the above parameters from the spectrum of experimental data is generally to fit the shape of the actual spectrum line with a complex Lorentz-type mathematical model. When the fitting degree is high, it is believed that the mathematical model used for fitting can well represent the shape of the actual spectrum, that is, the above parameters can be obtained from the mathematical model. However, in actual situations, due to the uneven magnetic field, there are often multiple λ (wavelength) components in the spectrum signal. Therefore, Figure 1 As shown, the spectral lines are thin lines and the complex Lorentz type is thick lines. The shape of the spectral lines is difficult to completely match the complex Lorentz type, resulting in a low degree of fit and errors in parameter reading.
[0076] In an embodiment of the present application, the corresponding phase adjustment value in each Fourier transform iterative operation can be accumulated to obtain the original relative phase of the zero-order phase of the local oscillator signal and the zero-order phase of the FID signal, that is, the phase measurement value of the spectrum signal within the error tolerance range in the reference system, and the height of the corresponding spectrum signal can be directly read, thereby avoiding the fitting readout error caused by the uneven magnetic field and improving the accuracy of the phase and height of the read spectrum signal.
[0077] To facilitate understanding of the specific implementation of the method for reading parameters in a nuclear magnetic resonance signal provided in an embodiment of the present application, it will be described below with reference to the accompanying drawings.
[0078] It should be noted that the subject implementing the method of reading parameters in nuclear magnetic signals may be a device for reading parameters in nuclear magnetic signals provided in an embodiment of the present application, and the device for reading parameters in nuclear magnetic signals may be carried in an electronic device or a functional module of an electronic device. The electronic device in the embodiment of the present application may be any device capable of implementing the method of reading parameters in nuclear magnetic signals in an embodiment of the present application, for example, an Internet of Things (IoT) device.
[0079] Figure 3 A flow chart of a method for reading parameters in a nuclear magnetic signal provided in an embodiment of the present application. The method can also be applied to a device for reading parameters in a nuclear magnetic signal, and the device for reading parameters in a nuclear magnetic signal can be, for example, Figure 7 The device 700 for reading parameters in a nuclear magnetic signal as shown, or the device for reading parameters in a nuclear magnetic signal can also be integrated in Figure 8 Functional modules in the electronic device 800 are shown.
[0080] like Figure 3 As shown, the method includes the following steps S301 to S304:
[0081] S301: Obtain free induction decay (FID) signals by collecting nuclear magnetic resonance signals.
[0082] In order to read the parameters in the nuclear magnetic signal, the nuclear magnetic signal is first collected to obtain the free induction decay FID signal; then, according to the zero-order phase of the current local oscillator signal, the FID signal is Fourier transformed into a frequency domain signal to obtain a spectrum signal; the midpoint position of the signal peak in the spectrum signal and the 0 amplitude line are used as references to calculate the left area and the right area in the spectrum signal; finally, if the absolute value of the difference between the left area and the right area is less than or equal to the error tolerance parameter, the phase measurement value of the spectrum signal within the error tolerance range is obtained according to the phase adjustment cumulative value, and the height of the read spectrum signal is measured, and the phase adjustment cumulative value is obtained by accumulating the corresponding phase adjustment value in the Fourier transform iterative operation, and the phase adjustment value is obtained by adjusting the zero-order phase of the local oscillator signal to the phase value of the zero-order phase of the current local oscillator signal. Therefore, the embodiment of the present application obtains the FID signal through S301, which makes preliminary preparations for the subsequent acquisition of the spectrum signal.
[0083] Since the above introduction explains that the nuclear magnetic signal that decays with time is the FID signal, in this embodiment of the present application, the FID signal is obtained by collecting the nuclear magnetic signal.
[0084] S302: Perform Fourier transformation on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to obtain a spectrum signal.
[0085] Since the complex Lorentzian type of the spectrum of the FID signal is fitted, the obtained phase measurement value and height may have fitting errors. For this reason, the embodiment of the present application adopts an iterative Fourier transform method to read the parameters in the nuclear magnetic signal. In order to more clearly understand the principle of reading the parameters (phase measurement value and height of the spectrum signal) in the nuclear magnetic signal in the embodiment of the present application, the following will be described in detail:
[0086] First, the phase measurement value that needs to be obtained in the embodiment of the present application is the original relative phase of the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal, that is, this original relative phase is an unknown value. When the frequency domain signal of the FID signal is in a shape that is symmetrical and upward, the relative phase of the zero-order phase of the local oscillator signal and the zero-order phase of the FID signal is just 0. This feature can be used to adjust the zero-order phase of the local oscillator signal so that the absolute value of the difference between the left area and the right area of the frequency domain signal is less than or equal to the error tolerance parameter, that is, the spectrum signal is in a shape that is symmetrical and upward, so that the corresponding phase adjustment value in the Fourier transform iterative operation can be accumulated to obtain the original relative phase of the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal (that is, the final phase measurement value).
[0087] The specific method may be: according to the zero-order phase of the current local oscillator signal, the FID signal is Fourier transformed into a frequency domain signal, and after the spectrum signal is obtained, when the absolute value of the difference between the left area and the right area in the spectrum signal of the frequency domain signal is less than or equal to the error tolerance parameter, and it conforms to a left-right symmetrical and upward shape, it means that the relative phase of the zero-order phase of the current local oscillator signal and the zero-order phase of the FID signal is 0, which means that the zero-order phase of the current local oscillator signal is equivalent to the zero-order phase of the FID signal within the error tolerance range. Therefore, the original relative phase of the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal can be obtained according to the phase adjustment cumulative value in the process of adjusting the zero-order phase of the local oscillator signal to the zero-order phase of the current local oscillator signal.
[0088] It should be noted that in the embodiment of the present application, the zero-order phase of the original local oscillator signal is generally not directly relative to the zero-order phase of the FID signal to be 0. At this time, it is necessary to repeat the Fourier transform operation (Fourier transform iteration operation) of the zero-order phase of the local oscillator signal so that the absolute value of the difference between the left area and the right area of the frequency domain signal is less than or equal to the error tolerance parameter. The final original relative phase should be the accumulated value of the phase adjustment value corresponding to each Fourier transform iteration operation (phase adjustment cumulative value). For this, the embodiment of the present application will perform the Fourier transform iteration operation by default, that is, the phase measurement value of the spectrum signal within the error tolerance range is finally obtained based on the phase adjustment cumulative value.
[0089] Based on the above principles, before executing S302 for the first time, the embodiment of the present application needs to first obtain the zero-order phase initial value of the current local oscillator signal. The specific process is to subtract the phase adjustment value from the zero-order phase of the original local oscillator signal of the FID signal to obtain the zero-order phase initial value of the current local oscillator signal.
[0090] It should be noted that, since the phase is periodic, no matter the zero-order phase of the local oscillator signal is subtracted from or added to the phase adjustment value, the effect is the same as long as the sign remains consistent during the adjustment process.
[0091] According to the above principle, and because there are multiple frequency components in the FID signal, in order to analyze the FID signal more intuitively, it is necessary to first perform Fourier transform on the FID signal into a frequency domain signal, usually as follows Figure 4 As shown, the FID signal is converted from a time domain signal to a frequency domain signal through Fast Fourier Transform (FFT) to obtain a spectrum signal.
[0092] S303: Calculate the left side area and the right side area of the spectrum signal based on the midpoint position of the signal peak in the spectrum signal and the zero amplitude line.
[0093] As an example, S303 may include: dividing according to the midpoint position of the signal peak in the spectrum signal to obtain a left spectrum signal based on the left side of the midpoint position and a right spectrum signal based on the right side of the midpoint position; calculating the area of the left spectrum signal and the right spectrum signal using the zero amplitude line and envelope line integral to obtain the left area and the right area.
[0094] Since the shapes of different phases in the spectrum signal are different, such as Figure 5 As shown, when the spectrum signal is symmetrical and upward, the relative phase between the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal is exactly 0. Therefore, the absolute value of the difference between the left area and the right area of the frequency domain signal can be adjusted to be less than or equal to the error tolerance parameter by comparing the left area and the right area in the spectrum signal.
[0095] To this end, the present application first needs to calculate the left area and the right area of the spectrum signal. The specific process may include: first, dividing the spectrum signal according to the midpoint position ω0 of the signal peak in the spectrum signal, obtaining the left spectrum signal based on the left side of the midpoint position and the right spectrum signal based on the right side of the midpoint position, and then determining the Y-axis highest point of the left spectrum signal and the right spectrum signal according to the 0 amplitude line. After determining the Y-axis highest point of the signals on both sides, the area calculation can be performed according to the envelope integral to obtain the left area and the right area.
[0096] S304: If the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, the phase measurement value of the spectrum signal within the error tolerance range is obtained according to the phase adjustment cumulative value, and the height of the read spectrum signal is measured, and the phase adjustment cumulative value is obtained by adding the corresponding phase adjustment values in the Fourier transform iterative operation, and the phase adjustment value is a phase value for adjusting the zero-order phase of the local oscillator signal to the zero-order phase of the current local oscillator signal.
[0097] In order to achieve a relative phase of 0 between the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal, the absolute value of the phase difference between the left area and the right area of the frequency domain signal needs to be adjusted to be less than or equal to the error tolerance parameter, and the left area and the right area need to be adjusted.
[0098] It should be noted that in the embodiment of the present application, an error tolerance parameter E is generally preset to ensure that the obtained spectrum signal is a phase measurement value within the error tolerance range, where the error tolerance range is ±E, that is, the tolerable error between the output phase adjustment cumulative value and the original relative phase. The error tolerance parameter generally needs to be a relatively small value that is sufficient to meet the requirements while not making it impossible to exit the loop, and the preset phase adjustment value can be 0-2π.
[0099] In this regard, the following embodiment of the present application introduces the iterative operation process of Fourier transform:
[0100] (1) First, if the phase difference between the left area and the right area is greater than the error tolerance parameter, or if the phase difference between the left area and the right area is less than the negative value of the error tolerance parameter, the zero-order phase of the local oscillator signal is adjusted according to the phase adjustment value. When the above two situations occur, it means that the absolute value of the phase difference between the left area and the right area in the frequency domain signal does not meet the requirement that the absolute value of the phase difference is less than or equal to the error tolerance parameter, and the relative phase between the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal is not 0, and the zero-order phase of the local oscillator signal needs to be adjusted.
[0101] (2) The zero-order phase of the local oscillator signal is adjusted according to the phase adjustment value to obtain the zero-order phase of the current local oscillator signal.
[0102] (3) Finally, the operation of performing Fourier transform on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal is returned to determine whether the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, until the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, and the phase adjustment cumulative value is obtained.
[0103] The process of adjusting the zero-order phase of the local oscillator signal according to the phase adjustment value can also be divided into the following cases:
[0104] (1) If the phase difference between the left area and the right area in the previous Fourier transform iteration process is of the same sign as the phase difference between the left area and the right area in the current Fourier transform iteration process, the zero-order phase of the local oscillator signal is subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal;
[0105] When the phase difference between the left area and the right area has the same sign as the phase difference between the left area and the right area in the current Fourier transform iteration process, it means that the relative phase between the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal is greater than 0, that is, the zero-order phase of the local oscillator signal can be directly adjusted according to the phase adjustment value, so the zero-order phase of the local oscillator signal is directly subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal. It should be noted that since the subtraction of the phase adjustment value is taken as an example in the embodiment of the present application, the entire process is the zero-order phase of the local oscillator signal minus the phase adjustment value. Of course, if the phase adjustment value is added at the beginning, the entire process is the zero-order phase of the local oscillator signal plus the phase adjustment value.
[0106] (2) If the phase difference between the left area and the right area in the previous Fourier transform iteration process and the phase difference between the left area and the right area in the current Fourier transform iteration process have different signs, the phase adjustment value is assigned to the negative value of the phase adjustment value in the previous Fourier transform iteration process divided by 2, and the zero-order phase of the local oscillator signal is subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal.
[0107] When the phase difference between the left area and the right area is of different sign from the phase difference between the left area and the right area in the current Fourier transform iteration, it means that the relative phase between the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal is less than 0, that is, the zero-order phase of the local oscillator signal was adjusted too much before, and the phase adjustment value needs to be adjusted first, and the phase adjustment value is assigned to the negative value of the phase adjustment value divided by 2 in the previous Fourier transform iteration, and then the zero-order phase of the local oscillator signal is subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal.
[0108] (3) If there is no previous Fourier transform iteration process, the zero-order phase of the local oscillator signal is directly subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal.
[0109] In this process, the zero-order phase of the local oscillator signal is adjusted according to the comparison between the left area and the right area, so as to satisfy the situation that the relative phase between the zero-order phase of the FID signal and the zero-order phase of the current local oscillator signal is 0, and the spectrum signal is symmetrical and upward.
[0110] The following illustrates that when the spectrum signal is symmetrical in shape, that is, when the absolute value of the difference between the left area and the right area is less than or equal to the error tolerance parameter, as an example, 304 may include: S3041, if the absolute value of the difference between the left area and the right area is less than or equal to the error tolerance parameter; S3042, if the sum of the left area and the right area is greater than 0, then the phase adjustment cumulative value is output as the phase measurement value of the spectrum signal within the error tolerance range; S3043, if the sum of the left area and the right area is less than 0, then the phase adjustment cumulative value is added with π, and output as the phase measurement value of the spectrum signal within the error tolerance range; S3044, measure the height of the read spectrum signal.
[0111] In this process, due to the problem of direction, it is necessary to determine whether the sum of the left area and the right area is greater than 0, so as to determine whether the direction of the phase adjustment cumulative value needs to be adjusted; in this S3042, if the sum of the left area and the right area is greater than 0, it indicates that the spectrum signal is symmetrical and upward, so the phase adjustment cumulative value can be directly output as a phase measurement value within the error tolerance range; in this S3043, if the sum of the left area and the right area is less than 0, it indicates that the spectrum signal is symmetrical and downward, so the phase adjustment cumulative value needs to be added with a value of 180 degrees of π, so that the direction of the phase adjustment cumulative value is changed, so as to be output as a phase measurement value within the error tolerance range. At this time, the phase adjustment cumulative value is obtained by accumulating the corresponding phase adjustment values (including positive and negative signs) of the Fourier transform iterative operation in this adjustment process.
[0112] When the spectrum signal is adjusted to be symmetrical and upward, the height of the current spectrum peak can be measured to obtain the spectrum signal strength |a l |, thus the phase and height of the signal can be measured without fitting the mathematical model to the spectrum, thus avoiding the fitting readout error caused by the uneven magnetic field.
[0113] It can be seen that the embodiment of the present application performs a Fourier transform iteration operation on the zero-order phase of the local oscillator signal so that the absolute value of the difference between the left area and the right area of the frequency domain signal is less than or equal to the error tolerance parameter, satisfying the shape of the spectrum signal being symmetrical and pointing upward, so that the corresponding phase adjustment value in the Fourier transform iteration operation can be accumulated to obtain the original relative phase of the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal, and when the spectrum signal is adjusted to be symmetrical and pointing upward, the signal height is equal to the signal strength, so the height of the spectrum signal can be directly measured. The phase and height of the signal are measured without the need to fit the spectrum to a mathematical model, avoiding the fitting readout error caused by the uneven magnetic field.
[0114] In order to make the method provided in the embodiment of the present application clearer and easier to understand, Figure 6 A specific example of this method is described.
[0115] like Figure 6 As shown, the implementation may include the following steps:
[0116] S601: Obtain free induction decay (FID) signals by collecting nuclear magnetic resonance signals.
[0117] S602: Preset error tolerance parameters and phase adjustment values.
[0118] In order to read the original relative phase between the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal, the present application needs to preset a phase adjustment value Δφ and a preset error tolerance parameter E. Since it is necessary to perform Fourier transform iteration operation in the embodiment of the present application, the error tolerance parameter generally needs to be a relatively small value that is sufficient to meet the requirements while not making it impossible to exit the loop, and the preset phase adjustment value can be 0-2π.
[0119] S603: Subtract the phase adjustment value from the zero-order phase of the original local oscillator signal to obtain an initial value of the zero-order phase of the current local oscillator signal.
[0120] In the embodiment of the present application, it is necessary to perform an iterative Fourier transform operation based on the zero-order phase of the local oscillator signal. First, it is necessary to subtract the phase adjustment value from the zero-order phase of the original local oscillator signal to obtain the initial value of the zero-order phase of the current local oscillator signal, so that the FID signal can be Fourier transformed into a frequency domain signal based on the zero-order phase of the current local oscillator signal.
[0121] S604: Perform Fourier transformation on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to obtain a spectrum signal.
[0122] In order to more intuitively analyze the initial value of the zero-order phase of the current local oscillator signal, it is necessary to convert the FID signal from a time domain signal to a frequency domain signal through fast Fourier transform according to the zero-order phase of the current local oscillator signal, so as to obtain a spectrum signal.
[0123] S605: Determine whether the absolute value of the difference between the left area and the right area of the spectrum signal is less than or equal to an error tolerance parameter.
[0124] Before determining the absolute value of the difference between the left area and the right area of the spectrum signal, it is also necessary to calculate the left area and the right area. The specific process may include: taking the midpoint position of the signal peak in the spectrum signal as a reference, using the zero amplitude line and the envelope line integral to calculate the left area S in the spectrum signal L and the right side area S R .
[0125] The area S on the left side will be obtained L and the right side area S R After that, since the phase is 0, the left area S L and the right side area S R It is within the error tolerance range, so it is necessary to determine the left area S of the spectrum signal. L and the right side area S R Whether the absolute value of the phase difference is less than or equal to the error tolerance parameter. If it is judged to be within the error tolerance range, it means that the phase difference is 0, and S609 and subsequent operations can be executed; if it is judged not to be within the error tolerance range, it means that the zero-order phase of the current local oscillator signal needs to be adjusted, and S606~S608 need to be executed.
[0126] S606: If the absolute value of the difference between the left area and the right area is greater than the error tolerance parameter, or if the difference between the left area and the right area is less than the negative value of the error tolerance parameter, then determine whether the difference between the left area and the right area in the previous Fourier transform iteration is of the same sign as the difference between the left area and the right area in the current Fourier transform iteration.
[0127] If the absolute value of the phase difference between the left area and the right area is greater than the error tolerance parameter, or if the phase difference between the left area and the right area is less than the negative value of the error tolerance parameter, it means that the zero-order phase of the current local oscillator signal still needs to be adjusted. The adjustment process is different under different conditions. Therefore, it is necessary to first determine whether the phase difference between the left area and the right area in the previous Fourier transform iteration process and the phase difference between the left area and the right area in the current Fourier transform iteration process are of the same sign. The magnitude relationship between the zero-order phase of the FID signal and the zero-order phase of the current local oscillator signal can be determined based on the same sign or different sign. If they are of the same sign, execute S607, and if they are of different signs, execute S608. It should be noted that if there is no previous Fourier transform iteration process, the zero-order phase of the local oscillator signal is directly subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal.
[0128] S607: If the phase difference between the left area and the right area in the previous Fourier transform iteration is of the same sign as the phase difference between the left area and the right area in the current Fourier transform iteration, subtract the phase adjustment value from the zero-order phase of the local oscillator signal to obtain the zero-order phase of the current local oscillator signal, and then return to execute S604.
[0129] When the phase difference between the left area and the right area has the same sign as the phase difference between the left area and the right area in the current Fourier transform iteration process, it means that the relative phase between the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal is greater than 0, that is, the zero-order phase of the local oscillator signal can be directly adjusted according to the phase adjustment value, that is, the zero-order phase of the local oscillator signal is subtracted from the phase adjustment value. After obtaining the zero-order phase of the current local oscillator signal, continue to return to execute the Fourier transform iteration operation of S604.
[0130] S608: If the phase difference between the left area and the right area in the previous iteration of Fourier transform has a different sign from the phase difference between the left area and the right area in the current iteration of Fourier transform, the phase adjustment value is assigned to the negative value of the phase adjustment value in the previous iteration of Fourier transform divided by 2, and the phase adjustment value is subtracted from the zero-order phase of the local oscillator signal to obtain the zero-order phase of the current local oscillator signal, and then return to execute S604.
[0131] When the phase difference between the left area and the right area is of different sign from the phase difference between the left area and the right area in the current Fourier transform iteration, the relative phase between the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal is less than 0, that is, the zero-order phase of the local oscillator signal was adjusted too much before. Therefore, it is necessary to adjust the phase adjustment value first, assign the phase adjustment value to the negative value of the phase adjustment value divided by 2 in the previous Fourier transform iteration, then subtract the phase adjustment value from the zero-order phase of the local oscillator signal, obtain the zero-order phase of the current local oscillator signal, and continue to perform the Fourier transform iteration operation of S604.
[0132] S609: If the absolute value of the difference between the left area and the right area is less than or equal to the error tolerance parameter, determine whether the sum of the left area and the right area is greater than 0.
[0133] Due to the direction issue, it is necessary to determine whether the sum of the left area and the right area is greater than 0, so as to decide whether the phase adjustment cumulative value needs to be adjusted in direction. For this, it is necessary to determine whether the sum of the left area and the right area is greater than 0. If the sum of the left area and the right area is greater than 0, it indicates that the spectrum signal is symmetrical and upward, so the processing operation S610 is executed; if the sum of the left area and the right area is less than 0, it indicates that the spectrum signal is symmetrical and downward, and the processing operation S611 is executed.
[0134] S610: If the sum of the left area and the right area is greater than 0, the phase adjustment cumulative value is output as a phase measurement value of the spectrum signal within an error tolerance range.
[0135] If the sum of the left area and the right area is greater than 0, it indicates that the spectrum signal is symmetrical and upward. At this time, the iterative operation of Fourier transform is jumped out, and the corresponding phase adjustment value (including positive and negative signs) in the iterative operation of Fourier transform is accumulated to obtain the phase adjustment cumulative value. Since the direction is upward, the phase adjustment cumulative value can be directly output as a phase measurement value within the error tolerance range.
[0136] S611: If the sum of the left area and the right area is less than 0, add π to the phase adjustment cumulative value and output it as the phase measurement value of the spectrum signal within the error tolerance range.
[0137] If the sum of the left area and the right area is less than 0, it indicates that the spectrum signal is symmetrical and downward. At this time, the iterative operation of Fourier transform is exited, and the corresponding phase adjustment value (including positive and negative signs) in the iterative operation of Fourier transform is accumulated to obtain the phase adjustment cumulative value. Since the direction is downward, the phase adjustment cumulative value needs to be added with a value of 180 degrees of π to change the direction of the phase adjustment cumulative value, and then output as a phase measurement value within the error tolerance range.
[0138] S612: Measure the height of the read spectrum signal and output it as signal strength.
[0139] When the spectrum signal is adjusted to be symmetrical and upward, the height of the current spectrum peak can be measured to obtain the spectrum signal strength |a l |.
[0140] The present embodiment provides a method for reading parameters in a nuclear magnetic resonance signal, performing a Fourier transform iteration operation on the zero-order phase of a local oscillator signal, so that the absolute value of the phase difference between the left area and the right area of the frequency domain signal is less than or equal to the error tolerance parameter, satisfying the shape of the spectrum signal being symmetrical on the left and upward, thereby accumulating the corresponding phase adjustment values in the Fourier transform iteration operation to obtain the original relative phase of the zero-order phase of the FID signal and the zero-order phase of the local oscillator signal, and obtaining the phase measurement value of the spectrum signal within the error tolerance range according to the original relative phase, and measuring and reading the height of the spectrum signal when the spectrum signal is symmetrical on the left and upward, thereby reading the phase and height of the spectrum signal, thereby avoiding the fitting readout error caused by the uneven magnetic field.
[0141] See also Figure 7 The present application embodiment provides a device 700 for reading parameters in a nuclear magnetic resonance signal, the device comprising:
[0142] An acquisition unit 701 is used to acquire a free induction decay (FID) signal by collecting a nuclear magnetic resonance signal;
[0143] The processing unit 702 is used to perform Fourier transform on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to obtain a spectrum signal;
[0144] The calculation unit 703 is used to calculate the left area and the right area of the spectrum signal based on the midpoint position of the signal peak in the spectrum signal and the zero amplitude line;
[0145] The reading unit 704 is used to obtain the phase measurement value of the spectrum signal within the error tolerance range according to the phase adjustment cumulative value if the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, and measure the height of the read spectrum signal. The phase adjustment cumulative value is obtained by accumulating the corresponding phase adjustment values in the Fourier transform iterative operation, and the phase adjustment value is a phase value for adjusting the zero-order phase of the local oscillator signal to the zero-order phase of the current local oscillator signal.
[0146] Optionally, before initially performing the operation of Fourier transforming the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal, the obtaining unit 701 is further configured to:
[0147] The zero-order phase of the original local oscillator signal is subtracted from the phase adjustment value to obtain the zero-order phase initial value of the current local oscillator signal.
[0148] Optionally, the processing unit 702 further includes:
[0149] an adjusting unit, configured to adjust the zero-order phase of the local oscillator signal according to the phase adjustment value to obtain the zero-order phase of the current local oscillator signal if the phase difference between the left area and the right area is greater than an error tolerance parameter, or if the phase difference between the left area and the right area is less than a negative value of the error tolerance parameter;
[0150] The iteration unit is used to return to execute the operation of performing Fourier transform on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to determine whether the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, until the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, and obtain the phase adjustment cumulative value.
[0151] Optionally, the adjustment unit is specifically used for:
[0152] If the phase difference between the left area and the right area in the previous Fourier transform iteration process is of the same sign as the phase difference between the left area and the right area in the current Fourier transform iteration process, the zero-order phase of the local oscillator signal is subtracted from the phase adjustment value to obtain the zero-order phase of the current local oscillator signal;
[0153] If the phase difference between the left area and the right area in the previous Fourier transform iteration process and the phase difference between the left area and the right area in the current Fourier transform iteration process have different signs, the phase adjustment value is assigned to the negative value of the phase adjustment value in the previous Fourier transform iteration process divided by 2, and the phase adjustment value is subtracted from the zero-order phase of the local oscillator signal to obtain the zero-order phase of the current local oscillator signal;
[0154] If Fourier transform is performed for the first time, the zero-order phase of the local oscillator signal is obtained by subtracting the phase adjustment value from the zero-order phase initial value of the local oscillator signal.
[0155] Optionally, the calculation unit 703 is specifically configured to:
[0156] The spectrum signal is divided according to the midpoint position of the signal peak in the spectrum signal to obtain a left spectrum signal based on the left side of the midpoint position and a right spectrum signal based on the right side of the midpoint position;
[0157] The area of the left spectrum signal and the right spectrum signal is calculated according to the integral of the zero amplitude line and the envelope line to obtain the left area and the right area.
[0158] Optionally, when the reading unit 704 obtains the phase measurement value of the spectrum signal within the error tolerance range according to the phase adjustment cumulative value, it is specifically used to:
[0159] If the sum of the left area and the right area is greater than 0, the phase adjustment cumulative value is output as the phase measurement value of the spectrum signal within the error tolerance range;
[0160] If the sum of the left area and the right area is less than 0, the phase adjustment cumulative value is added with π, and the output is the phase measurement value of the spectrum signal within the error tolerance range.
[0161] It should be noted that the specific implementation method and effect of the device 700 for reading parameters in nuclear magnetic signal can be found in the above Figure 3 or Figure 6 The relevant descriptions in the provided methods will not be repeated here.
[0162] The present application embodiment also provides an electronic device 800, such as Figure 8 As shown, the device 800 includes a memory 801 and a processor 802:
[0163] The memory 801 is used to store computer programs;
[0164] The processor 802 is used to execute the above Figure 3 or Figure 6 The method provided.
[0165] In addition, the present application also provides a computer-readable storage medium, the computer-readable storage medium is used to store a computer program, and the computer program is used to execute Figure 3 or Figure 6 The method provided.
[0166] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0167] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is only schematic, in which the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the goals of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0168] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A method for reading parameters in a nuclear magnetic resonance signal, characterized in that: The method comprises: By collecting nuclear magnetic signals, free induction decay FID signals are obtained; According to the zero-order phase of the current local oscillator signal, the FID signal is Fourier transformed into a frequency domain signal to obtain a spectrum signal; Calculate the left side area and the right side area of the spectrum signal based on the midpoint position of the signal peak in the spectrum signal and the zero amplitude line; If the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, the phase measurement value of the spectrum signal within the error tolerance range is obtained according to the phase adjustment cumulative value, and the height of the spectrum signal is measured and read, and the phase adjustment cumulative value is obtained by adding the corresponding phase adjustment values in the Fourier transform iterative operation, and the phase adjustment value is the phase value for adjusting the zero-order phase of the local oscillator signal to the zero-order phase of the current local oscillator signal.
2. The method according to claim 1, characterized in that Before the operation of performing Fourier transform of the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal is performed for the first time, the method further includes: The phase adjustment value is subtracted from the zero-order phase of the original local oscillator signal to obtain an initial value of the zero-order phase of the current local oscillator signal.
3. The method according to claim 2, characterized in that The iterative operation process of the Fourier transform comprises: If the phase difference between the left area and the right area is greater than the error tolerance parameter, or if the phase difference between the left area and the right area is less than the negative value of the error tolerance parameter, the zero-order phase of the local oscillator signal is adjusted according to the phase adjustment value. After the zero-order phase of the current local oscillator signal is obtained, the operation of performing Fourier transform on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to determine whether the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter is returned to execute, until the absolute value of the phase difference between the left area and the right area is less than or equal to the error tolerance parameter, and the phase adjustment cumulative value is obtained.
4. The method according to claim 3, characterized in that The step of adjusting the zero-order phase of the local oscillator signal according to the phase adjustment value to obtain the zero-order phase of the current local oscillator signal includes: If the phase difference between the left area and the right area in the previous Fourier transform iteration process is of the same sign as the phase difference between the left area and the right area in the current Fourier transform iteration process, subtract the phase adjustment value from the zero-order phase of the local oscillator signal to obtain the zero-order phase of the current local oscillator signal; If the phase difference between the left area and the right area in the previous Fourier transform iteration process and the phase difference between the left area and the right area in the current Fourier transform iteration process have different signs, assigning the phase adjustment value to the negative value of the phase adjustment value in the previous Fourier transform iteration process divided by 2, and subtracting the phase adjustment value from the zero-order phase of the local oscillator signal to obtain the zero-order phase of the current local oscillator signal; If Fourier transform is performed for the first time, the zero-order phase of the local oscillator signal is obtained by subtracting the phase adjustment value from the zero-order phase initial value of the local oscillator signal.
5. The method according to claim 1, characterized in that The calculating the left side area and the right side area of the spectrum signal based on the midpoint position of the signal peak in the spectrum signal and the zero amplitude line includes: Dividing the spectrum signal according to the midpoint position of the signal peak in the spectrum signal to obtain a left spectrum signal based on the left side of the midpoint position and a right spectrum signal based on the right side of the midpoint position; The area of the left spectrum signal and the right spectrum signal is calculated according to the zero amplitude line and the envelope line integral to obtain the left area and the right area.
6. The method according to claim 1, characterized in that The step of obtaining a phase measurement value of the spectrum signal within an error tolerance range according to the phase adjustment accumulated value includes: If the sum of the left area and the right area is greater than 0, the phase adjustment cumulative value is output as a phase measurement value of the spectrum signal within an error tolerance range; If the sum of the left area and the right area is less than 0, the phase adjustment cumulative value is added with π, and the result is output as a phase measurement value of the spectrum signal within an error tolerance range.
7. A device for reading parameters in nuclear magnetic resonance signals, characterized in that: The device comprises: An acquisition unit, used for acquiring a free induction decay (FID) signal by collecting a nuclear magnetic resonance signal; A processing unit, used for performing Fourier transformation on the FID signal into a frequency domain signal according to the zero-order phase of the current local oscillator signal to obtain a spectrum signal; A calculation unit, used to calculate the left area and the right area of the spectrum signal based on the midpoint position of the signal peak in the spectrum signal and the zero amplitude line; A reading unit is used to obtain a phase measurement value of the spectrum signal within an error tolerance range according to a phase adjustment cumulative value if the absolute value of the phase difference between the left area and the right area is less than or equal to an error tolerance parameter, and to measure and read the height of the spectrum signal, wherein the phase adjustment cumulative value is obtained by accumulating the corresponding phase adjustment values in the Fourier transform iterative operation, and the phase adjustment value is a phase value for adjusting the zero-order phase of the local oscillator signal to the zero-order phase of the current local oscillator signal.
8. The device according to claim 7, characterized in that The computing unit is specifically used for: Dividing according to the midpoint position of the signal peak in the spectrum to obtain a left spectrum based on the left side of the midpoint position and a right spectrum based on the right side of the midpoint position; The area of the left spectrum and the right spectrum is calculated according to the zero amplitude line and the envelope line integral to obtain the left area and the right area.
9. An electronic device, characterized in that: The device includes a memory and a processor, and the processor is used to execute a program stored in the memory to run the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 6.