Magnetic oxygen analysis and measurement method and device, electronic equipment and storage medium
By synchronously sampling and processing the electromagnetic periodic drive signal, an even function signal sequence is constructed, which solves the problem of insufficient measurement accuracy of the magnetic pressure oxygen analyzer in the low oxygen concentration region, and realizes high-precision and low-cost oxygen concentration detection.
Patent Information
- Application Number
- CN202610153445.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-03
- Publication Date
- 2026-04-10
AI Technical Summary
Existing magnetic pressure oxygen analyzers lack sufficient measurement accuracy in low oxygen concentration regions and are susceptible to environmental noise interference, leading to measurement inflection points and nonlinear distortions, thus failing to meet actual testing requirements.
An electromagnetic periodic drive signal is used to synchronously sample AC signals, construct an even function signal sequence, and obtain the real part of the signal frequency through Fourier transform. The oxygen concentration is then determined using a preset mapping relationship.
It improves the measurement accuracy and resolution in low oxygen concentration regions, ensures high linearity and low linearity error across the entire measurement range, and reduces production costs.
Smart Images

Figure CN121830890A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of oxygen concentration measurement, and in particular to a magnetic oxygen analysis measurement method and device, an electronic device and a storage medium. BACKGROUND
[0002] The magnetic pressure type oxygen analyzer utilizes the change in pressure of oxygen molecules in the measured gas under the action of a magnetic field to measure the oxygen content. In the same magnetic field, two gases with different magnetic susceptibilities are introduced, namely the sample gas and the reference gas (air, nitrogen or oxygen), which enter the magnetic gap of the measuring cell. The magnetic gap is located in the middle of the magnet coil. When the electromagnet is energized, a magnetic field is formed around the magnetic gap. When the two gases pass through the magnetic field, the oxygen pressure in the gas changes due to the paramagnetism of oxygen. When the electromagnet is repeatedly excited and demagnetized by a certain frequency of on-off current, an alternating current signal can be obtained in the measurement bridge circuit. The amplitude of the signal fluctuation is directly proportional to the oxygen content in the sample gas. When the reference gas is determined, the parameters are known values, and there is a linear relationship between the oxygen concentration in the sample gas and the pressure difference, so the oxygen content can be accurately measured.
[0003] In related technologies, the collection of the alternating current signal of the magnetic pressure type oxygen analyzer mainly has two modes. The first mode is hardware circuit demodulation and sampling: the alternating current signal is directly demodulated by a hardware circuit, and the demodulated alternating current signal is sampled by ADC (Analog-to-Digital Converter). After the demodulation of the alternating current signal by the analog circuit and relying on the hardware circuit, the demodulated signal is directly sampled by ADC. The hardware circuit design of this mode is complex, resulting in high equipment hardware cost. Moreover, the analog demodulation technology has limited frequency and phase extraction accuracy for periodic modulation signals, and the measurement accuracy is easily affected by environmental noise, making it difficult to ensure data stability. The second mode is to directly sample by ADC and then perform digital algorithm demodulation. At this time, without the hardware demodulation link, the output alternating current signal is directly sampled by ADC, and then the digital demodulation is completed by FFT (Fast Fourier Transform) algorithm. Both of these two signal collection modes take the amplitude of the detected alternating current signal as the core calculation basis. The receiver signal of the magnetic pressure type oxygen analyzer is easily affected by environmental noise, electromagnetic interference, vibration, air flow fluctuation, etc., making it difficult to separate the useful signal from the noise. Moreover, due to the limitation of the detector accuracy, when the zero point gas is introduced, the signal amplitude is not an ideal zero value, and this value will overlap with the signal amplitude corresponding to the low concentration gas near the zero point, thereby forming a measurement inflection point in the low concentration range. This measurement inflection point will cause nonlinear distortion of the measurement curve, directly causing the low oxygen concentration detection resolution to fail to meet the index requirements of actual measurement, and finally leading to deviation of the oxygen content calculation result in the low oxygen concentration region near the zero point. SUMMARY
[0004] The application provides a magnetic oxygen analysis measurement method and device, electronic equipment and storage medium to solve the technical problem of inaccurate oxygen concentration detection in the low oxygen concentration area near zero.
[0005] The application provides a magnetic oxygen analysis measurement method, which comprises the following steps: acquiring an alternating current signal corresponding to a to-be-detected gas, wherein the alternating current signal is generated under the excitation of an electromagnetic periodic driving signal, and the electromagnetic periodic driving signal is used to represent a signal for periodically driving excitation and demagnetization; sampling the alternating current signal according to a jump edge of the electromagnetic periodic driving signal to obtain a sample signal sequence; intercepting the sample signal sequence to obtain an even function signal sequence; performing Fourier transform on the even function signal sequence to obtain a real part of a signal frequency corresponding to the alternating current signal, and determining the oxygen concentration of the to-be-detected gas according to the real part and a preset mapping relationship, wherein the preset mapping relationship is used to represent a mathematical relationship between different real parts and oxygen concentrations.
[0006] In an embodiment of the application, intercepting the sample signal sequence to obtain an even function signal sequence comprises: determining a first peak value or a first trough value of the sample signal sequence as a sequence starting point; and intercepting a plurality of continuous data points in the sample signal sequence from the sequence starting point to obtain the even function signal sequence.
[0007] In an embodiment of the application, sampling the alternating current signal according to the jump edge of the electromagnetic periodic driving signal comprises: triggering an interrupt service at a rising edge or a falling edge of the electromagnetic periodic driving signal, and judging a preset sampling identifier in the interrupt service; if the preset sampling identifier is turned on, the sampling of the alternating current signal is started, and the preset sampling identifier is set to be turned off; and if it is monitored that the sampling is ended, the interrupt identifier of the interrupt service is cleared, and the preset sampling identifier is set to be turned on to start the next round of sampling.
[0008] In an embodiment of the application, before sampling the alternating current signal according to the jump edge of the electromagnetic periodic driving signal, the method further comprises: setting the number of sampling points of the sampling; and determining the sampling rate of the alternating current signal according to the number of sampling points and the driving frequency of the electromagnetic periodic driving signal.
[0009] In one embodiment of the present invention, before truncating the sampled signal sequence, the method further includes: setting the number of calculation points for the Fourier transform to truncate continuous data points corresponding to the number of calculation points from the sampled signal sequence to obtain an even function signal sequence, and performing a Fourier transform on the even function signal sequence; if the signal sampling is detected to be finished, then the data calculation flag is turned on to start truncating the sampled signal sequence to obtain an even function signal sequence, and performing a Fourier transform on the even function signal sequence.
[0010] In one embodiment of the present invention, the even function signal sequence is a cosine signal sequence.
[0011] In one embodiment of the present invention, the Fourier transform is a fast Fourier transform; the number of calculation points of the fast Fourier transform is a power of two.
[0012] This invention provides a magnetic oxygen analysis and measurement device, comprising: a detector for detecting a corresponding AC signal generated by a gas to be tested under the excitation of an electromagnetic periodic driving signal, wherein the electromagnetic periodic driving signal is used to characterize the signal for periodic excitation and demagnetization; a sampler for sampling the AC signal to obtain a sampled signal sequence; a control unit for driving the sampler to sample the signal according to the transition edge of the electromagnetic periodic driving signal; intercepting the sampled signal sequence to obtain an even function signal sequence; performing a Fourier transform on the even function signal sequence to obtain the real component of the signal frequency corresponding to the AC signal, and determining the oxygen concentration in the gas to be tested according to the real component and a preset mapping relationship, wherein the preset mapping relationship is used to characterize the mathematical relationship between different real components and oxygen concentration.
[0013] The present invention provides an electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device enables the magnetic oxygen analysis and measurement method as described in any of the above embodiments.
[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer processor, causes the computer to perform the magnetic oxygen analysis and measurement method described in any of the above embodiments.
[0015] Beneficial effects of the present application: the magnetic oxygen analysis measurement method, device, electronic equipment and storage medium provided by the present application can accurately obtain the oxygen concentration of the measured gas based on the real part of the corresponding signal frequency obtained through the synchronous sampling of the alternating current signal by the electromagnetic periodic driving signal, the construction of the even function signal sequence and the Fourier transform operation, effectively reducing the production cost and improving the measurement accuracy; effectively solve the problem of insufficient resolution of related technologies under low oxygen concentration; and can ensure the high linearity and low linear error of the measurement curve in the full range, and the calculation result in the low oxygen concentration area is more accurate. BRIEF DESCRIPTION OF DRAWINGS
[0016] The drawings incorporated into the specification and forming a part thereof show, to the extent necessary, embodiments for carrying out the application, and, taken in conjunction with the following description, serve to explain the principles of the application. It is clear to one skilled in the art that the drawings described below are only some embodiments of the present application, and other drawings can be obtained from these drawings without creative labor.
[0017] In the drawings:
[0018] Figure 1 The schematic diagram of the exemplary system architecture provided for an embodiment of the present application; Figure 2 The flowchart of the magnetic oxygen analysis measurement method provided in an embodiment of the present application; Figure 3 The flowchart of the signal sampling provided in an embodiment of the present application; Figure 4 The signal diagram of the even function signal sequence provided in an embodiment of the present application; Figure 5(a) is a measurement result diagram provided in an embodiment of the present application; Figure 5(b) is a measurement result diagram of the amplitude method; Figure 6 The block diagram of the magnetic oxygen analysis measurement device provided in an embodiment of the present application; Figure 7 The structural diagram of the computer system of the electronic equipment provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The embodiments of the present application will be described below through specific and concrete examples, and those skilled in the art can easily understand other advantages and effects of the present application from the disclosure of the present specification. The present application can also be implemented or applied by different specific embodiments, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0020] It is to be understood that the drawings shown in the following embodiments are only schematic and that the actual implementation of the application can vary as a consequence of, for example, variations in style of drawing, the number, shape and size of components, their arrangement relative to each other and also the layouts of the various components. Further, it is to be understood that the specific devices illustrated in the attached drawings, and described in the following text, are by way of example only and are not meant to limit the scope of the application.
[0021] In the following description, numerous specific details are discussed in order to provide a thorough understanding of the embodiments of the application. However, it will be apparent to one skilled in the art that the embodiments of the application can be practiced without these specific details. In other instances, well-known structures and devices are not described in exhaustive detail in order to avoid obscuring the application of embodiments of the application.
[0022] Reference is made to Figure 1 , Figure 1 a schematic diagram of an exemplary system architecture provided by an embodiment of the application. As shown in Figure 1 , the system architecture can include a gas source device 110 and a magnetic oxygen analysis measurement device 120. The gas source device 110 can include at least one of a sampling pipeline, a gas cylinder, and a sampling bag. The magnetic oxygen analysis measurement device 120 receives a to-be-measured gas from the gas source device 110 to obtain an oxygen concentration of the to-be-measured gas.
[0023] For example, the magnetic oxygen analysis measurement device 120 obtains an alternating current signal corresponding to the to-be-measured gas, the alternating current signal is generated under the excitation of an electromagnetic periodic driving signal, the electromagnetic periodic driving signal is used to represent a signal for periodically driving excitation and demagnetization; signal sampling is performed on the alternating current signal according to the jump edge of the electromagnetic periodic driving signal to obtain a sampling signal sequence; the sampling signal sequence is intercepted to obtain an even function signal sequence; Fourier transform is performed on the even function signal sequence to obtain a real part of a signal frequency corresponding to the alternating current signal, and the oxygen concentration of the to-be-measured gas is determined according to the real part and a preset mapping relationship, the preset mapping relationship is used to represent a mathematical relationship between different real parts and oxygen concentrations. On the principle of the magnetic pressure type oxygen analyzer, the application still utilizes the paramagnetism of oxygen, but abandons the measurement idea in the related art that uses the amplitude of the alternating current signal as a basis for calculation, and provides a new measurement method for the oxygen concentration, so that the oxygen concentration can be accurately measured in a low oxygen concentration region.
[0024] In the related art, in the low oxygen concentration region near zero, there is a technical problem that the oxygen concentration detection is not accurate.
[0025] To solve the above technical problems, the application provides a magnetic oxygen analysis measurement method and device, an electronic device and a storage medium. The implementation details of the technical solutions of the embodiments of the application are described in detail below.
[0026] Reference is made toFigure 2 , Figure 2 A flowchart of a magnetic oxygen analysis measurement method provided in an embodiment of the present application is shown in FIG. 2. As shown in FIG. 2, in an exemplary embodiment, the magnetic oxygen analysis measurement method comprises steps S210 to S240, which are described in detail as follows. Figure 2 Step S210: Obtain an alternating current signal corresponding to the gas to be measured.
[0027] The alternating current signal is generated under the excitation of an electromagnetic periodic driving signal, which is used to represent a signal for periodically driving excitation and de-excitation.
[0028] In an embodiment of the present application, the magnetic oxygen analysis measurement device further comprises an electromagnet, which is periodically excited and de-excited by the electromagnetic periodic driving signal.
[0029] In an embodiment of the present application, the detector end generates an alternating current signal with a signal frequency same as the driving frequency of the electromagnetic periodic driving signal.
[0030] In an embodiment of the present application, the driving frequency of the electromagnetic periodic driving signal is 12.5 Hz (Hertz).
[0031] Step S220: Sample the alternating current signal according to the rising edge of the electromagnetic periodic driving signal to obtain a sample signal sequence.
[0032] In an embodiment of the present application, before sampling the alternating current signal according to the rising edge of the electromagnetic periodic driving signal, the method further comprises: setting the number of sampling points for signal sampling; and determining the sampling rate of the alternating current signal according to the number of sampling points and the driving frequency of the electromagnetic periodic driving signal.
[0033] In an embodiment of the present application, the control unit comprises an MCU (Microcontroller Unit), and the sampler comprises an ADC (Analog-to-Digital Converter) sampling chip.
[0034] In an embodiment of the present application, the ADC sampling rate, the number of sampling points, and the number of calculation points of Fourier transform are designed according to the driving frequency of the electromagnetic periodic driving signal.
[0035] In an embodiment of the present application, the signal sampling of the alternating current signal according to the jump edge of the electromagnetic period driving signal comprises: triggering an interrupt service at the rising edge or the falling edge of the electromagnetic period driving signal, and judging a preset sampling identifier in the interrupt service; if the preset sampling identifier is an open sampling, then opening the sampling of the alternating current signal, and setting the preset sampling identifier as a non-open sampling; if the signal sampling is monitored to be completed, then clearing an interrupt identifier of the interrupt service, and setting the preset sampling identifier as the open sampling to start the next round of signal sampling.
[0036] In an embodiment of the present application, in the preset sampling identifier, the open sampling is represented by true, and the non-open sampling is represented by false.
[0037] In an embodiment of the present application, in the signal sampling of the alternating current signal, the electromagnetic period driving signal driven by the electromagnet is taken as an external interrupt source to realize the synchronous sampling of the alternating current signal.
[0038] In an embodiment of the present application, please refer to Figure 3 , Figure 3 for the flowchart of the signal sampling provided in the embodiment of the present application. As shown in Figure 3 , starting; whether the electromagnet synchronous signal is captured: the electromagnet synchronous signal is the electromagnetic period driving signal, the electromagnet synchronous signal is taken as an external interrupt source to trigger an interrupt service, if the electromagnet synchronous signal is captured, then in the interrupt service corresponding to the jump edge, whether the signal sampling is opened is judged; whether the data sampling identifier is true: the data sampling identifier is also the preset sampling identifier, if true, then the step of opening the periodic sampling of the timing is entered; opening the periodic sampling of the timing: after the sampling of the alternating current signal is determined to be opened, the periodic sampling of the timing of the ADC is opened, so that the signal sampling of the alternating current signal is started; setting the data sampling identifier as false: in order to avoid repeatedly entering the step of opening the sampling before the sampling is completed, the data sampling identifier of the open sampling is set as false; clearing the interrupt identifier: after the set number of sampling points is collected, the signal sampling is completed, the interrupt identifier of the interrupt service is cleared to start the next round of signal sampling.
[0039] Step S230, intercepting the sampling signal sequence to obtain an even function signal sequence.
[0040] In an embodiment of the present application, before the sampling signal sequence is intercepted, it further comprises: setting the calculation point number of the Fourier transform to intercept the continuous data points corresponding to the calculation point number from the sampling signal sequence to obtain the even function signal sequence, and performing the Fourier transform on the even function signal sequence; if the signal sampling is monitored to be completed, then opening the data calculation identifier to start intercepting the sampling signal sequence to obtain the even function signal sequence, and performing the Fourier transform on the even function signal sequence.
[0041] In an embodiment of the present application, the Fourier transform is a fast Fourier transform; the number of calculation points of the fast Fourier transform is a power of 2.
[0042] In an embodiment of the present application, the image of the even function is symmetrical about the vertical axis (Y axis); the result of the Fourier transform of the even function is even symmetrical in the real part and odd symmetrical in the imaginary part. The frequency spectrum analysis of the alternating current signal can only need to analyze the first half, and the second half is redundant information. When the input sequence is a real even symmetrical sequence, the result of the FFT (Fast Fourier Transform) is theoretically zero in the imaginary part, and only the real part is present. However, in actual measurement, the imaginary part is not zero. This is because of the following two reasons: one is the numerical error, due to the limited number of sampling points or rounding error, the imaginary part may not be completely zero, but the amplitude is very small; the other is that the input sequence is not strictly symmetrical, if the input sequence does not completely satisfy the symmetry (such as the number of sampling points is not a power of 2), the imaginary part may be non-zero.
[0043] In an embodiment of the present application, based on the FFT result characteristics of the even function, the appropriate ADC sampling rate, sampling point number and FFT calculation point number can be designed, the alternating current signal generated by the detector is collected by using the ADC, and the alternating current signal of the detector is constructed into an even function signal sequence.
[0044] In an embodiment of the present application, the even function signal sequence is obtained by intercepting the sampling signal sequence, including: determining the first peak value or the first trough value of the sampling signal sequence as a sequence starting point; starting from the sequence starting point, intercepting a plurality of continuous data points in the sampling signal sequence to obtain the even function signal sequence.
[0045] In an embodiment of the present application, after the signal sampling of the alternating current signal is completed, the sampling signal sequence is processed in the MCU. The sampling signal sequence is searched and compared, the first peak value of the sampling signal sequence is found, the first peak value is taken as the sequence starting point of the calculation sequence, a data point with a calculation point number length is intercepted to form the even function signal sequence.
[0046] In an embodiment of the present application, the even function signal sequence is a cosine signal sequence.
[0047] In an embodiment of the present application, the calculation point number is set to 256.
[0048] In an embodiment of the present application, from the original sampling signal sequence, the first peak value is selected, and 256 continuous data points are selected as the calculation sequence, that is, the even function signal sequence. The even function signal sequence is an even sequence symmetrical about the Y axis. Please refer to Figure 4 , Figure 4 The signal schematic diagram of the even function signal sequence provided in an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the horizontal axis represents time, and the vertical axis represents the amplitude of the signal.Figure 4 As shown in the figure, the horizontal axis is the data points, and the unit is individual; the vertical axis is the signal value, and the unit is mV (millivolt); Figure 4 is the first peak value as the sequence start point is obtained.
[0049] In step S240, the Fourier transform is performed on the dual function signal sequence to obtain the real part of the signal frequency corresponding to the alternating current signal, and the oxygen concentration of the to-be-measured gas is determined according to the real part and the preset mapping relationship.
[0050] The preset mapping relationship is used to represent the mathematical relationship between different real parts and oxygen concentrations.
[0051] In an embodiment of the present application, the FFT operation is performed on the dual function signal sequence, and the imaginary part of the FFT result is theoretically zero, only the real part. The corresponding real part is used as the calculation amount, so as to establish the mathematical relationship between the real part and the oxygen concentration.
[0052] In an embodiment of the present application, the real part of the signal frequency corresponding to the alternating current signal is selected as the calculation amount, so as to calculate the oxygen concentration in the to-be-measured gas.
[0053] In an embodiment of the present application, the low oxygen concentration region includes a measurement region with an oxygen concentration of zero to a few tenths of a percentage, such as 0 to 0.2%.
[0054] In an embodiment of the present application, in order to more comprehensively evaluate the measurement effect of the present application, the magnetic oxygen analysis measurement method provided by the present application and the amplitude method based on FFT are used respectively to carry out comparative experiments on the oxygen concentration within the range of 1%. Please refer to FIG. 5(a) and FIG. 5(b), FIG. 5(a) is a measurement result schematic diagram provided in an embodiment of the present application, and FIG. 5(b) is a measurement result schematic diagram of the amplitude method. As shown in FIG. 5(a), the present application can accurately measure the oxygen concentration at low oxygen concentration, and the resolution at low oxygen concentration is improved; as shown in FIG. 5(b), the curve formed by the measured value of the oxygen concentration and the sample gas value in the low oxygen concentration scene based on the amplitude method based on FFT has an inflection point between 0 and 0.1%, and there is a linear error between 0.1% and 0.2%, that is, the oxygen concentration in this scene cannot be accurately measured.
[0055] In an embodiment of the present application, the present application can use a digital algorithm to demodulate the alternating current signal, realize simple circuit, and efficiently and conveniently realize online detection of oxygen, effectively reduce production cost and improve measurement accuracy. Moreover, the present application directly samples the alternating current signal output by the detector through a hardware synchronous triggering mechanism, reconstructs the sampled signal as an even function, performs Fourier transform on the constructed even function signal sequence, selects the real part of the corresponding signal frequency as the calculation amount, and inversely calculates the oxygen concentration of the measured gas, which can solve the nonlinearity problem in the low oxygen concentration area, does not appear inflection point in the measurement range, ensures high linearity and low linear error of the measurement curve in the full range, and completely solves the technical problems of low precision and nonlinearity existing in the traditional measurement method.
[0056] Please refer to Figure 6 , Figure 6 is a block diagram of a magnetic oxygen analysis measurement device provided in an embodiment of the present application. The device can be applied to the implementation environment shown in Figure 1 . The device can also be applied to other exemplary implementation environments and specifically configured in other devices, and the implementation environment to which the device is applied is not limited in the present embodiment.
[0057] As shown in Figure 6 , the magnetic oxygen analysis measurement device 600 according to an embodiment of the present application includes a detector 6210, a sampler 620, and a control unit 630.
[0058] The detector 610 is configured to detect the corresponding alternating current signal generated by the measured gas under the excitation of the electromagnetic periodic driving signal, and the electromagnetic periodic driving signal is used to represent a signal for periodically driving excitation and demagnetization. The sampler 620 is configured to sample the alternating current signal to obtain a sampled signal sequence. The control unit 630 is configured to drive the sampler to sample the signal according to the jump edge of the electromagnetic periodic driving signal, intercept the sampled signal sequence to obtain an even function signal sequence, perform Fourier transform on the even function signal sequence to obtain the real part of the signal frequency corresponding to the alternating current signal, and determine the oxygen concentration in the measured gas according to the real part and a preset mapping relationship, and the preset mapping relationship is used to represent the mathematical relationship between different real parts and oxygen concentrations.
[0059] It should be noted that the magnetic oxygen analysis measurement device provided in the above embodiments and the magnetic oxygen analysis measurement method provided in the above embodiments belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiments, which will not be described here. The magnetic oxygen analysis measurement device provided in the above embodiments can be used in actual applications, and the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0060] Embodiments of the present application also provide an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the magnetic oxygen analysis measurement method provided in each of the above embodiments.
[0061] Please refer to Figure 7 , Figure 7 is a structural schematic diagram of a computer system of an electronic device provided in an embodiment of the present application. Figure 7 The computer system 700 of the electronic device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0062] As Figure 7 shown, the computer system 700 includes a central processing unit 701, which can perform various appropriate actions and processes according to programs stored in a read-only memory 702 or programs loaded from a storage portion 708 to a random access memory 703, such as performing the method in the above embodiments. In the random access memory 703, various programs and data required for system operation are also stored. The central processing unit 701, the read-only memory 702 and the random access memory 703 are connected to each other through a bus 704. An input / output interface 705 is also connected to the bus 704.
[0063] The following components are connected to the input / output interface 705: an input portion 706 including input devices such as a keyboard and mouse; an output portion 707 including output devices such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 708 including a hard disk; and a communication portion 709 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output interface 705 as necessary. A removable media 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 710 as necessary, so that a computer program read therefrom is installed in the storage portion 708 as necessary.
[0064] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing computer programs for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication portion 709, and / or installed from the removable media 711. When the computer program is executed by the central processing unit 701, various functions defined in the system of the present application are executed.
[0065] The computer readable medium shown in the embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, be an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable signal medium can include a data signal propagating in a baseband or as part of a carrier wave in a propagated data stream, in which the computer readable computer program is carried. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit the program for use by or in connection with an instruction execution system, apparatus or device. The computer program contained on the computer readable medium can be transmitted in any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination of the above.
[0066] The flowcharts and block diagrams in the drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Each block in the flowcharts or block diagrams can represent a module, a program segment, or a portion of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in a different order than that shown in the figures. For example, two blocks noted in succession can actually be executed substantially concurrently, or they can sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block in the flowcharts or block diagrams, and combinations of blocks in the flowcharts or block diagrams, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0067] The units described in the embodiments of the present application can be implemented in the form of software, or can be implemented in the form of hardware, and the described units can also be arranged in a processor. In some cases, the names of the units do not constitute a limitation on the units themselves. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, and the software product can be stored in a nonvolatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a plurality of instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
[0068] Another aspect of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor of a computer, causes the computer to perform the magnetic oxygen analysis measurement method provided in each of the above embodiments. The computer-readable storage medium can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device.
[0069] The above embodiments only exemplarily illustrate the principles and effects of the present application, and are not used to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas disclosed by the present application should be covered by the claims of the present application.
Claims
1. A method for analyzing and measuring magnetic oxygen, characterized in that, The method includes: Acquire the AC signal corresponding to the gas to be tested. The AC signal is generated under the excitation of an electromagnetic periodic drive signal, which is used to characterize the periodic drive excitation and demagnetization signals. The AC signal is sampled based on the rising edge of the electromagnetic periodic drive signal to obtain a sampled signal sequence; The sampled signal sequence is truncated to obtain an even function signal sequence; The even function signal sequence is subjected to Fourier transform to obtain the real component of the signal frequency corresponding to the AC signal, and the oxygen concentration of the gas to be tested is determined according to the real component and a preset mapping relationship. The preset mapping relationship is used to characterize the mathematical relationship between different real components and oxygen concentration.
2. The magnetic oxygen analysis and measurement method according to claim 1, characterized in that, Extracting the sampled signal sequence yields an even function signal sequence, including: The first peak value or the first trough value of the sampled signal sequence is determined as the starting point of the sequence; Starting from the beginning of the sequence, multiple consecutive data points are extracted from the sampled signal sequence to obtain an even function signal sequence.
3. The magnetic oxygen analysis and measurement method according to claim 1, characterized in that, Sampling the AC signal based on the transition edge of the electromagnetic periodic drive signal includes: An interrupt service is triggered at the rising or falling edge of the electromagnetic cycle drive signal, and a preset sampling flag is determined in the interrupt service. If the preset sampling flag is set to enable sampling, then sampling of the AC signal is enabled, and the preset sampling flag is set to disable sampling. If signal sampling is detected to have ended, the interruption flag of the interrupted service is cleared, and the preset sampling flag is set to enable sampling to start the next round of signal sampling.
4. The magnetic oxygen analysis and measurement method according to claim 3, characterized in that, Before sampling the AC signal based on the transition edge of the electromagnetic periodic drive signal, the method further includes: Set the number of sampling points for signal sampling; The sampling rate of the AC signal is determined based on the number of sampling points and the driving frequency of the electromagnetic periodic driving signal.
5. The magnetic oxygen analysis and measurement method according to any one of claims 1-4, characterized in that, Before truncating the sampled signal sequence, the method further includes: The number of calculation points for the Fourier transform is set to extract continuous data points corresponding to the number of calculation points from the sampled signal sequence to obtain an even function signal sequence, and then a Fourier transform is performed on the even function signal sequence. If the signal sampling ends, the data calculation flag is turned on to start capturing the sampled signal sequence, obtaining the even function signal sequence, and performing a Fourier transform on the even function signal sequence.
6. The magnetic oxygen analysis and measurement method according to any one of claims 1-4, characterized in that, The even function signal sequence is a cosine signal sequence.
7. The magnetic oxygen analysis and measurement method according to any one of claims 1-4, characterized in that, The Fourier transform is a Fast Fourier Transform; The number of calculation points for the Fast Fourier Transform is a power of two.
8. A magnetic oxygen analysis and measurement device, characterized in that, The device includes: The detector is used to detect the corresponding AC signal generated by the gas under test under the excitation of an electromagnetic periodic drive signal, wherein the electromagnetic periodic drive signal is used to characterize the periodic drive excitation and demagnetization signal. A sampler is used to sample the AC signal to obtain a sampled signal sequence; The control unit is configured to drive the sampler to sample signals according to the transition edge of the electromagnetic periodic drive signal; extract the sampled signal sequence to obtain an even function signal sequence; perform a Fourier transform on the even function signal sequence to obtain the real component of the signal frequency corresponding to the AC signal; and determine the oxygen concentration in the gas to be measured according to the real component and a preset mapping relationship, wherein the preset mapping relationship is used to characterize the mathematical relationship between different real components and oxygen concentration.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the magnetic oxygen analysis and measurement method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the magnetic oxygen analysis and measurement method according to any one of claims 1 to 7.