Fiber bragg grating multi-channel high-frequency signal acquisition method based on LabVIEW
Through the fiber grating multi-channel high-frequency signal acquisition method controlled by LabVIEW, the problem of data time out of synchronization during optical switch polling is solved, and the accurate acquisition and noise suppression of high-frequency signals are achieved, and the signal-to-noise ratio is improved.
Patent Information
- Application Number
- CN202510830719.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-20
AI Technical Summary
The existing fiber grating multi-channel high-frequency signal acquisition system cannot meet the accuracy requirements in high-frequency fast measurement scenarios, especially the problem that the acquisition time is out of synchronization when the optical switch polling is turned on.
The fiber grating multi-channel high-frequency signal acquisition method based on LabVIEW is adopted. The optical channel is opened according to the preset sequence through the data acquisition and processing control module, and the data is stored in the adjustable memory capacity buffer area, and signal recombination, filtering, component extraction, display and storage processing is performed when the preset capacity is reached, solving the problem of data time out-synchronization and eliminating noise interference.
It improves the accuracy of multi-channel high-frequency signal acquisition, eliminates environmental and equipment noise interference, and improves the signal-to-noise ratio.
Smart Images

Figure CN120333512A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fiber Bragg grating high-frequency demodulation, and particularly to a method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW. Background Art
[0002] Multi-point detection based on fiber Bragg gratings has been widely applied in many fields such as engineering and scientific research. However, for scenarios that require high-frequency and rapid measurement of multi-point vibration, impact, etc. based on fiber Bragg grating detection, existing mature demodulation systems and processing methods cannot meet the requirements.
[0003] That is, how to provide a method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW, and achieve the technical effect of improving the accuracy of multi-channel high-frequency signal collection on the premise of realizing high-frequency and rapid collection is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0004] Aiming at the above existing problems, the present invention aims to provide a method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW, and at least solve the above technical problems.
[0005] To at least solve the above technical problems, the present invention provides a method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW, which is applied to a multi-channel fiber Bragg grating signal acquisition system. The multi-channel fiber Bragg grating signal acquisition system includes a multi-channel fiber Bragg grating sensing device and a host computer. The host computer is deployed with a host computer data acquisition module and a data acquisition processing control module. The method includes: The data acquisition processing control module polls and opens the optical channels in the multi-channel fiber Bragg grating sensing device according to a preset optical channel opening sequence, and sequentially obtains high-frequency data of multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate; The data acquisition processing control module stores the sequentially obtained high-frequency data of multi-channel fiber Bragg gratings in a preset adjustable memory capacity buffer area, and judges whether the number of elements stored in the adjustable memory capacity buffer area exceeds the preset memory of the adjustable memory capacity buffer area; When the number of elements stored in the adjustable memory capacity buffer area exceeds the preset memory, the data in the adjustable memory capacity buffer area is flowed out and sequentially subjected to signal recombination, filtering, component extraction, display and storage processing.
[0006] Preferably, the multi-channel fiber Bragg grating sensing device includes a tunable laser light source, a multi-channel fiber Bragg grating, an optical switch corresponding to the multi-channel fiber Bragg grating, and an optical performance detection module. The data acquisition, processing, and control module polls and opens the optical channels in the multi-channel fiber Bragg grating sensing device according to a preset optical channel opening sequence, and sequentially obtains the high-frequency data of the multi-channel fiber Bragg grating collected by the host computer data acquisition module according to a preset sampling rate, including: Start the optical performance detection module through the data acquisition, processing, and control module. Detect the spectrogram of the first-channel fiber Bragg grating through the optical performance detection module according to the preset optical channel opening sequence, and process the spectrogram according to the peak search algorithm to obtain the central wavelength of the first-channel fiber Bragg grating; Start the tunable laser light source, and determine whether the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the current first-channel fiber Bragg grating; If not, compensate the output wavelength of the tunable laser light source according to the central wavelength of the first-channel fiber Bragg grating until the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the first-channel fiber Bragg grating; If so, open the optical switch corresponding to the first-channel fiber Bragg grating, and obtain the high-frequency data of the first-channel fiber Bragg grating collected by the host computer data acquisition module according to the preset sampling rate; Judge whether the high-frequency data of the first-channel fiber Bragg grating meets the preset acquisition conditions. If the high-frequency data of the first-channel fiber Bragg grating meets the preset acquisition conditions, switch the optical switch to the next-channel fiber Bragg grating according to the preset optical channel opening sequence and close the optical switch, and sequentially obtain the high-frequency data of each channel fiber Bragg grating according to the acquisition steps of the high-frequency data of the first-channel fiber Bragg grating.
[0007] Preferably, the host computer data acquisition module includes an FPGA module and a Real-Time module. The sequentially obtaining the high-frequency data of the multi-channel fiber Bragg grating collected by the host computer data acquisition module according to the preset sampling rate includes: The FPGA module sequentially collects the high-frequency data of the multi-channel fiber Bragg grating according to the preset sampling rate, and stores the high-frequency data in the DMA FIFO; The Real-Time module reads the high-frequency data in the DMA FIFO through the FIFO and writes the high-frequency data read from the FIFO into the network stream; The data acquisition, processing, and control module reads the high-frequency data from the network stream.
[0008] Preferably, the FPGA module sequentially collects high-frequency data of multiple channels of fiber Bragg gratings according to a preset sampling rate, and stores the high-frequency data in the DMA FIFO, including: The FPGA module first calls the reset I / O function. After the reset I / O function is called, the STOP boolean value is set to zero, and an interrupt code is sent to the Real-Time module; The FPGA module parallelly calls the function of generating I / O sampling pulses to determine the sampling rate of the FPGA module for signals, calls the function of obtaining I / O status to obtain the sample status of each channel, and calls the function of reading I / O to read high-frequency data from each channel; When it is judged that the program status is correct, the high-frequency data is written into the DMA FIFO. At the same time, it is judged whether there is an error code in the program. If not, the high-frequency data is repeatedly collected in a loop.
[0009] Preferably, the preset memory of the adjustable memory capacity buffer is M, and the expression of the preset memory is: ; where n represents the number of data collected by a preset single channel; N is the number of optical switch channels; The number n of high-frequency data collected by a preset single channel is configured according to the following formula: ; where t represents the preset time for switching channels, in ms; f represents the sampling rate preset by the FPGA module, in Hz.
[0010] Preferably, the preset acquisition condition is that the number of high-frequency data of a single channel of fiber Bragg grating collected is greater than or equal to the number n of high-frequency data collected by a preset single channel.
[0011] Preferably, the data acquisition and processing control module stores the high-frequency data of multiple channels of fiber Bragg gratings obtained in sequence in a preset adjustable memory capacity buffer and judges whether the number of elements stored in the adjustable memory capacity buffer exceeds the preset memory, including: The data acquisition and processing control module continuously receives and obtains the high-frequency data of multiple channels of fiber Bragg gratings and orderly introduces it as data elements into the adjustable memory capacity buffer constructed by the while loop statement; Obtain the initial number of data elements in the adjustable memory capacity buffer and record it in the shift register as the initial reference for subsequent counting operations; For each new data element entering the while loop statement, the count value of the shift register is incremented on the basis of the initial reference until the count value in the shift register exceeds (is greater than or equal to) the preset memory M preset by humans.
[0012] Preferably, when the number of elements stored in the adjustable memory capacity buffer exceeds the preset memory, the data in the adjustable memory capacity buffer flows out and is sequentially subjected to signal recombination, filtering, component extraction, display, and storage processing, including: When the count value in the shift register exceeds the preset memory M, the multi-channel high-frequency data cached in the adjustable memory capacity buffer flows out; The multi-channel high-frequency data flowing out of the adjustable memory capacity buffer is sequentially subjected to signal recombination processing to obtain N high-frequency waveform signals; The N high-frequency waveform signals are respectively subjected to filtering processing, and target data is extracted from the filtered high-frequency waveform signals. The target data is displayed in an N-channel waveform chart, and a data storage loop system with an event state machine is constructed using the queue message processor mode. The display data on the N-channel waveform chart is stored through the data storage loop system.
[0013] Preferably, the multi-channel high-frequency data flowing out of the adjustable memory capacity buffer is sequentially subjected to signal recombination processing to obtain N high-frequency waveform signals, including: The multi-channel high-frequency data flowing out of the adjustable memory capacity buffer is converted from the U32 type to the DBL type; Then, the multi-channel high-frequency data after type conversion is divided into N groups of parallel array subsets according to specific rules, and each array subset has n numbers; The N groups of array subsets are respectively subjected to signal recombination processing to obtain N high-frequency waveform signals; Among them, the signal recombination processing includes: using the N groups of array subsets as Y and the sampling rate f of the FPGA module for signal sampling as dt to create a waveform.
[0014] Preferably, the extraction of target data from the filtered high-frequency waveform signals includes: Numerical data that is Y in the high-frequency waveform signal is extracted from the filtered high-frequency waveform signals to obtain target data, and the data type of the target data is the DBL type.
[0015] Compared with the prior art, the beneficial effects of the present invention are: A method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW provided by the present invention is applied to a multi-channel high-frequency signal acquisition system of fiber Bragg gratings. The system includes a multi-channel fiber Bragg grating sensing device and a host computer. A host computer data acquisition module and a data acquisition processing control module are deployed at the host computer end. The method specifically includes: the data acquisition processing control module polls and opens the optical channels in the multi-channel fiber Bragg grating sensing device according to a preset optical channel opening sequence, and sequentially obtains the high-frequency data of the multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate; the data acquisition processing control module stores the sequentially obtained high-frequency data of the multi-channel fiber Bragg gratings in a preset buffer area with adjustable memory capacity and determines whether the number of elements stored in the buffer area with adjustable memory capacity exceeds the preset memory of the buffer area with adjustable memory capacity; when the number of elements stored in the buffer area with adjustable memory capacity exceeds the preset memory, the data in the buffer area with adjustable memory capacity is flowed out and sequentially subjected to signal recombination, filtering, component extraction, display, and storage processing. The method provided by this application performs synchronous time compensation on the asynchronously acquired data by setting a buffer area with adjustable memory capacity, solves the problem of asynchronous acquisition data time when the optical switch polls and opens, and at the same time, by flowing out the data in the buffer area with adjustable memory capacity and sequentially performing signal recombination, filtering, component extraction, display, and storage processing, eliminates the low-frequency noise in the environment and the noise interference brought by the multi-channel fiber Bragg grating sensing device, improves the signal-to-noise ratio of the acquired high-frequency signals, and improves the accuracy of multi-channel high-frequency signal acquisition.
[0016] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of the present invention more obvious and understandable, the following specifically gives the specific embodiments of the present invention. Brief Description of the Drawings
[0017] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.
[0018] Figure 1 is a flowchart of the method for collecting multi-channel high-frequency signals of fiber Bragg gratings provided by this application; Figure 2 is an optical path connection diagram of the multi-channel fiber Bragg grating sensing device provided by this application; Figure 3 is a collection flowchart of the multi-channel high-frequency signals of fiber Bragg gratings provided by this application; Figure 4 It is the program flow chart for the FPGA module provided by this application to collect high-frequency data; Figure 5 It is the producer-consumer program flow chart for the Real-Time module provided by this application; Figure 6 It is the control and processing flow chart for the data acquisition and processing control module provided by this application; Figure 7 It is the schematic diagram of wavelength matching for the tunable laser source provided by this application under high stress or variable temperature environment; Figure 8 It is the work flow chart for the adjustable memory capacity buffer provided by this application; Figure 9 It is the data processing process for the adjustable memory capacity buffer provided by this application; Figure 10 It is the signal recombination flow chart provided by this application; Figure 11 It is the high-frequency signal extraction flow chart provided by this application. Specific embodiments
[0019] Next, in combination with the accompanying drawings in the embodiments of this specification, the technical solutions in the embodiments of this specification will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art belong to the scope protected by this invention; among them, the keyword "and / or" involved in this embodiment represents two situations, namely, and and or. In other words, A and / or B mentioned in the embodiments of this specification represents two situations, A and B, and A or B, describing three states existing between A and B. For example, A and / or B means: only including A but not B; only including B but not A; including both A and B.
[0020] At the same time, in the embodiments of this specification, when a component is considered to be "connected" to another component, it can be directly connected to another component or there may be an intermediate component at the same time. When a component is considered to be "disposed on" another component, it can be directly disposed on another component or there may be an intermediate component at the same time.
[0021] The following uses specific specific examples to illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0022] Embodiment 1 Please refer to Figures 1-10 Specifically, in the implementation of the fiber Bragg grating multi-channel high-frequency signal acquisition method based on LabVIEW, this method is applied to a fiber Bragg grating multi-channel high-frequency signal acquisition system. The fiber Bragg grating multi-channel high-frequency signal acquisition system includes a multi-channel fiber Bragg grating sensing device and a host computer. The host computer is deployed with a host computer data acquisition module and a data acquisition processing control module. The method specifically includes the following steps S110 to S130: Step S110: The data acquisition processing control module polls and opens the optical channels in the multi-channel fiber Bragg grating sensing device according to a preset optical channel opening sequence, and sequentially obtains the high-frequency data of the multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate; Among them, a LabVIEW development environment is deployed on the host computer side. On this basis, both the host computer data acquisition module and the data acquisition processing control module are built in this LabVIEW environment. Through this integrated environment, the functional operations and collaborative work of each module are realized, ensuring the efficient and stable execution of data acquisition and processing control.
[0023] The FPGA module is an extension tool specifically designed for field-programmable gate array (FPGA) hardware, allowing users to implement high-performance parallel computing and real-time processing on the FPGA through graphical programming. The FPGA module can directly generate code suitable for FPGA hardware, providing low-latency and high-throughput control and data processing capabilities. It supports parallel processing and can execute multiple tasks simultaneously, making it suitable for applications such as high-speed data acquisition, real-time control, and signal processing that require high precision and high efficiency. The FPGA module is compatible with other functional modules of LabVIEW and can be seamlessly integrated with hardware platforms such as CompactRIO and PXI of NI acquisition cards to flexibly customize hardware solutions.
[0024] As an implementable method, the multi-channel fiber Bragg grating sensing device includes a tunable laser light source, multi-channel fiber Bragg gratings, optical switches corresponding to the multi-channel fiber Bragg gratings, and an optical performance detection module. The data acquisition processing control module involved in the above step S110 polls and opens the optical channels in the multi-channel fiber Bragg grating sensing device according to a preset optical channel opening sequence, and sequentially obtains the high-frequency data of the multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate. Specifically, it includes the following content: Start the optical performance detection module through the data acquisition processing control module, detect the spectral diagram of the first-channel fiber Bragg grating through the optical performance detection module according to a preset optical channel opening sequence, and process the spectral diagram according to the peak-finding algorithm to obtain the central wavelength of the first-channel fiber Bragg grating; Turn off the optical performance detection module, start the tunable laser light source, obtain the output wavelength of the tunable laser light source, and determine whether the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the first-channel fiber grating; If the output wavelength of the tunable laser light source is not within the 3dB bandwidth wavelength range of the first-channel fiber grating, compensate the output wavelength of the tunable laser light source according to the central wavelength of the first-channel fiber grating until the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the first-channel fiber grating; If the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the first-channel fiber grating, turn on the optical switch corresponding to the first-channel fiber grating, and obtain the high-frequency data of the first-channel fiber grating collected by the host computer data acquisition module according to the preset sampling rate; Determine whether the high-frequency data of the first-channel fiber grating meets the preset acquisition conditions. If the high-frequency data of the first-channel fiber grating meets the preset acquisition conditions, turn off the tunable laser light source, switch the optical switch to the next-channel fiber grating according to the preset optical channel opening sequence and turn off the optical switch, and obtain the high-frequency data of each channel fiber grating in turn according to the acquisition steps of the high-frequency data of the first-channel fiber grating.
[0025] After the high-frequency data of the first-channel fiber grating is obtained, obtain the high-frequency data of the second-channel fiber grating in turn according to the acquisition steps of the high-frequency data of the first-channel fiber grating until the high-frequency data of the Nth-channel fiber grating is obtained to complete a switch cycle. Among them, obtaining the high-frequency data of the second-channel fiber grating in turn according to the acquisition steps of the high-frequency data of the first-channel fiber grating is specifically: Start the optical performance detection module through the data acquisition and processing control module, detect the spectrogram of the second-channel fiber grating through the optical performance detection module according to the preset optical channel opening sequence, and process the spectrogram according to the peak-seeking algorithm to obtain the central wavelength of the second-channel fiber grating; Turn off the optical performance detection module, start the tunable laser light source, obtain the output wavelength of the tunable laser light source, and determine whether the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the second-channel fiber grating; If the output wavelength of the tunable laser light source is not within the 3dB bandwidth wavelength range of the second-channel fiber grating, compensate the output wavelength of the tunable laser light source according to the central wavelength of the second-channel fiber grating until the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the second-channel fiber grating; If the output wavelength of the tunable laser source is within the 3dB bandwidth wavelength range of the fiber grating in the second channel, the optical switch corresponding to the fiber grating in the second channel is turned on, and high-frequency data of the fiber grating in the second channel is acquired through the upper computer data acquisition module according to a preset sampling rate. Determine whether the high-frequency data of the fiber grating in the second channel meets the preset acquisition conditions. If the high-frequency data of the fiber grating in the second channel meets the preset acquisition conditions, turn off the tunable laser source and switch the optical switch to the fiber grating in the third channel and turn off the optical switch according to the preset optical channel opening sequence, so as to obtain the high-frequency data of the fiber grating in each channel according to the optical channel opening sequence until the high-frequency data of the fiber grating in the Nth channel is obtained, then the data acquisition of a polling switch is completed.
[0026] Through the control logic of the data acquisition processing control module for the optical switch and the optical performance detection module, the problem of wavelength matching feedback under large stress and large temperature change environments is solved.
[0027] As an implementable method, the preset acquisition condition is that the number of high-frequency data of the fiber grating in a single channel collected is greater than or equal to the preset number n of high-frequency data collected in a single channel.
[0028] Among them, Figure 2 The optical path connection diagram of the multi-channel fiber grating sensing device is shown. The multi-channel fiber grating sensing device specifically includes a tunable laser source, an optical splitter, a multi-channel fiber grating, an optical switch corresponding to the multi-channel fiber grating, an optical performance detection module, and a photodetector. Among them, the tunable laser source is used to output a first optical signal with adjustable wavelength; the optical splitter is used to divide the first optical signal into multiple second optical signals; the multi-channel fiber grating (FGB1-FBGN) is used to detect high-frequency signals according to the preset optical channel opening sequence under the action of multiple second optical signals, and output multiple third optical signals, and the initial center wavelengths of the multi-channel fiber grating sensors are within the same wavelength range; the optical switch is used to switch the optical channels in the multi-channel fiber grating according to the preset optical channel opening sequence; the photodetector is used to convert multiple third optical signals into multiple voltage signals; the upper computer data acquisition module can be integrated on the NI acquisition card to collect the voltage signals output by the photodetector, that is, the high-frequency data to be collected in this application, and the data acquisition processing control module communicates with the tunable laser source, the optical switch, the optical performance detection module, and the upper computer data acquisition module respectively to correspondingly control the switching of channels and the acquisition of signals.
[0029] Step S120: Store the high-frequency data of the multi-channel fiber grating obtained in sequence in a preset adjustable memory capacity buffer area through the data acquisition processing control module, and judge whether the number of elements stored in the adjustable memory capacity buffer area exceeds the preset memory of the adjustable memory capacity buffer area. As an implementable way, the host computer data acquisition module includes an FPGA module and a Real-Time module. Then, both the FPGA module and the Real-Time module can be integrated into the NI acquisition card.
[0030] Then, the steps of sequentially acquiring the high-frequency data of the multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate in step S120 specifically include the following sub-steps (1) to (3): (1) The FPGA module sequentially acquires the high-frequency data of the multi-channel fiber Bragg gratings according to the preset sampling rate and stores the high-frequency data in the DMA FIFO. As an implementable way, the FPGA module in the above sub-step (1) sequentially acquires the high-frequency data of the multi-channel fiber Bragg gratings according to the preset sampling rate and stores the high-frequency data in the DMA FIFO, which specifically includes the following content: The FPGA module first calls the reset I / O function. After calling the reset I / O function, it sets the STOP boolean value to zero and sends an interrupt code to the Real-Time module. The FPGA module parallelly calls the function of generating I / O sampling pulses to determine the sampling rate of the FPGA module for the signal, calls the function of obtaining the I / O status to obtain the sample status of each channel, and calls the function of reading I / O to read the high-frequency data from each channel. When it is determined that the program status is correct, the high-frequency data is written into the DMA FIFO. At the same time, it is judged whether there is an error code in the program. If not, the high-frequency data is repeatedly collected in a loop.
[0031] The specific program flow chart of the above FPGA module for collecting high-frequency data can be specifically referred to in the appendix Figure 4 .
[0032] When writing the program, the two functions of calling the "read I / O function" and writing to the DMA FIFO are placed in a while loop. The data collected by the NI read by the "read I / O function" is first written into the shift register. The shift register serves as a buffer. Each time the while loop iterates, the shift register outputs the data input into the shift register in the previous iteration and transmits this data to the DMA FIFO. This program design of temporarily storing the data of the previous iteration and outputting it in the next iteration can enable the while loop to complete each iteration quickly to keep up with the maximum sampling rate of 1MS / s of the NI acquisition card.
[0033] (2) The Real-Time module reads the high-frequency data in the DMA FIFO through the FIFO and writes the high-frequency data read from the FIFO into the network stream. Upload the data after the above sub-step (1) to the Real-Time module through the DMA-FIFO, and the Real-Time module will perform the next processing. The FIFO reading rate of the Real-Time module determines whether data overflow occurs in the DMA FIFO.
[0034] In the design of the Real-Time module, upload the high-frequency data detected by the fiber Bragg grating sensor to the Real-Time module through the DMA FIFO, separate the two processes by FIFO reading and writing the high-frequency data detected by the fiber Bragg grating sensor read from the FIFO into the network stream.
[0035] When programming the Real-Time module, if the program for reading FIFO data and the program for writing to the network stream are placed in the same while loop, the running speed of the program for reading FIFO data is much faster than that of the program for writing to the network stream, which will cause the problem of overflow and loss of the collected high-frequency data.
[0036] Therefore, as Figure 5 shown in the production-consumer program flow chart of the Real-Time module, use the production-consumer framework to separate the two processes. The producer part deals with the problem of transmitting high-frequency data from the FPGA module end to the Real-Time module through the FIFO. The consumer part processes the high-frequency fiber Bragg grating data read from the upper FIFO, first puts it into the queue buffer, reads the data in the queue buffer in the consumer part loop. Under the action of the buffer, the two loops can run at their respective iteration speeds without affecting each other, effectively solving the problem of FIFO data overflow.
[0037] (3) The data acquisition and processing control module reads the high-frequency data from the network stream.
[0038] As a feasible way, in step S120 involved above, store the high-frequency data of the multi-channel fiber Bragg grating obtained in sequence in a preset adjustable memory capacity buffer area through the data acquisition and processing control module, and judge whether the number of elements stored in the adjustable memory capacity buffer area exceeds the preset memory, specifically including the following sub-steps (4) to sub-step (6): (4) The data acquisition and processing control module continuously receives and obtains the high-frequency data of the multi-channel fiber Bragg grating and orderly introduces it into the adjustable memory capacity buffer area constructed by the while loop statement as data elements; As a feasible way, the preset memory of the adjustable memory capacity buffer area is M, and this preset memory M can be preset and adjusted according to the actual application scenario and system resource status to ensure the stability and effectiveness of the system during data processing. The expression of the preset memory is: ; where n represents the number of data collected in a single channel as preset; N is the number of optical switch channels; Configure the number n of high-frequency data collected in a single channel as preset according to the following formula: ; where t represents the time for preset channel switching, with the unit of ms; f represents the sampling rate preset by the FPGA module, with the unit of Hz.
[0039] (5) Obtain the number of initial data elements in the adjustable memory capacity buffer and record them in the shift register as the initial reference for subsequent counting operations; (6) For each data element newly entering the while loop statement, the count value of the shift register is incremented on the basis of the initial reference until the count value in the shift register reaches or exceeds the preset memory M set by the user.
[0040] As an embodiment, it can be passed through Figure 8 to understand the working flowchart of the adjustable memory capacity buffer in more detail.
[0041] Figure 6 Shows the control of the multi-channel fiber Bragg grating sensing device by the data acquisition and processing control module and the processing flowchart of high-frequency signals. Specifically, the data acquisition and processing control module of the host computer first turns on the optical performance detection module to detect Figure 6 the spectrogram of the fiber Bragg grating sensor in the FBG1 channel in, and obtains the central wavelength of FBG1 through the peak search algorithm. When affected by large stress or large temperature change, such as Figure 7 Shows the wavelength matching schematic diagram of the tunable laser source under large stress or variable temperature environment. When the central wavelength of the spectrogram detected by the optical performance detection module deviates from the set 3dB bandwidth range, the output wavelength of the wavelength tunable laser source can be compensated through the wavelength obtained by the spectral peak search of the optical performance detection module to make it near the 3dB bandwidth wavelength of the multi-channel fiber Bragg grating. Then, turn on the FBG1 channel of the optical switch, collect the high-frequency data transmitted through the network stream from the Real-Time module, and determine whether the number of data collected when the optical switch is in the open state is n. If so, store the n collected data in the buffer with a preset adjustable memory capacity. The preset memory of the adjustable memory capacity buffer is M. Then, switch the optical switch to Figure 1 the FBG2 channel of and close the optical switch, turn on the optical performance detection module again, detect the spectrogram of the optical switch switched to the FBG2 channel, and repeat the above steps in sequence. After the optical switch automatically polls and switches once and the number of elements in the adjustable memory capacity buffer ≥ M, the array data in the buffer is output for signal recombination, filtering, component extraction, display and storage processing, and the buffer is reset to wait for the next round of array data to flow in, and the above operations are cycled.
[0042] Step S130: When the number of elements stored in the adjustable memory capacity buffer exceeds the preset memory, the data in the adjustable memory capacity buffer is flowed out and sequentially subjected to signal recombination, filtering, component extraction, display, and storage processing.
[0043] As an implementable manner, when the number of elements stored in the adjustable memory capacity buffer exceeds the preset memory in Step S130 above, the data in the adjustable memory capacity buffer is flowed out and sequentially subjected to signal recombination, filtering, component extraction, display, and storage processing, which specifically includes the following sub-steps (7) to sub-step (9): (7) When the count value in the shift register exceeds the preset memory M, the multi-channel high-frequency data buffered in the adjustable memory capacity buffer is flowed out; (8) Sequentially perform signal recombination processing on the multi-channel high-frequency data flowing out of the adjustable memory capacity buffer to obtain N high-frequency waveform signals; As an implementable manner, as Figure 9 shown, the sequential signal recombination processing of the multi-channel high-frequency data flowing out of the adjustable memory capacity buffer in the above sub-step (8) to obtain N high-frequency waveform signals specifically includes the following contents: Convert the multi-channel high-frequency data flowing out of the adjustable memory capacity buffer from U32 type to DBL type; Then divide the multi-channel high-frequency data after type conversion into N groups of parallel array subsets according to specific rules, and each array subset has n numbers; Perform signal recombination processing on the N groups of array subsets respectively to obtain N high-frequency waveform signals; Among them, Figure 10 shows the signal recombination flow chart, and the corresponding signal recombination processing process includes: taking the N groups of array subsets as Y and taking the sampling rate f of the FPGA module for signal sampling as dt to create a waveform.
[0044] Specifically, convert the multi-channel high-frequency data flowing out of the adjustable memory capacity buffer from U32 type to DBL type. The data flowing out of the buffer is divided into N groups of array subsets, each array subset has n numbers, and each group of array subsets is parallel. Use LabVIEW to create a waveform, take the N groups of array subsets as Y, and take the sampling rate f of the FPGA module as dt to convert it into a high-frequency signal.
[0045] (9) Filter the N high-frequency waveform signals respectively, extract the target data from the filtered high-frequency waveform signals, display the target data in the N-channel waveform chart, and construct a data storage loop system with an event state machine using the queue message processor mode, and store the display data on the N-channel waveform chart through the data storage loop system.
[0046] As an implementable way, such as Figure 11 shown, the extraction of the target data from the filtered high-frequency waveform signals involved in the above sub-step (9) specifically includes the following content: Extract the numerical data that is Y in the high-frequency waveform signal from the filtered high-frequency waveform signal to obtain the target data, and the data type of the target data is DBL type.
[0047] Let the created high-frequency waveform signal flow into the Digital IIR Filter function Vi for high-pass filtering to eliminate the interference of low-frequency noise. Let the filtered high-frequency waveform signals of N channels flow into the FFT Spectrum (Mag-Phase) function Vi written in LabVIEW, and obtain the frequency domain diagram of the high-frequency signals of N channels through the conversion and peak searching algorithms to judge whether the signals are valid through this frequency domain diagram. Then perform the operation of extracting waveform components on the filtered high-frequency signals, extract the numerical data that is Y in the signals, and re-obtain the numerical data of DBL type after filtering. Display the obtained numerical data in the N-channel waveform chart, and establish a data storage loop with a built-in event state machine in the design mode of the queue message processor (Queue Message Handle-QMH) to store the display data on the N-channel waveform chart.
[0048] Generally speaking, Figure 3 shows the overall acquisition process of the fiber grating multi-channel high-frequency signals and some functions implemented by the data acquisition and processing control module of the host computer, including the feedback control of the tunable laser light source, the switching setting of the optical switch, the opening sequence of the optical channels, the control of the optical performance detection module, the parameter setting (sampling rate) of the acquisition card (the acquisition card integrated with the host computer data acquisition module), the display of the multi-channel spectrogram, the parameter setting of the filter, the caching of high-frequency data, and the storage of high-frequency waveform signals and target signals, etc.
[0049] In summary, a method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW provided by the present invention is applied to a multi-channel high-frequency signal acquisition system of fiber Bragg gratings. The system includes a multi-channel fiber Bragg grating sensing device and a host computer. A host computer data acquisition module and a data acquisition processing control module are deployed at the host computer end. The method specifically includes: the data acquisition processing control module polls and opens the optical channels in the multi-channel fiber Bragg grating sensing device according to a preset optical channel opening sequence, and sequentially obtains the high-frequency data of the multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate; the data acquisition processing control module stores the sequentially obtained high-frequency data of the multi-channel fiber Bragg gratings in a preset buffer area with adjustable memory capacity and determines whether the number of elements stored in the buffer area with adjustable memory capacity exceeds the preset memory of the buffer area with adjustable memory capacity; when the number of elements stored in the buffer area with adjustable memory capacity exceeds the preset memory, the data in the buffer area with adjustable memory capacity is flowed out and signal recombination, filtering, component extraction, display and storage processing are sequentially performed. The method provided by the present application synchronously compensates the time of asynchronously acquired data by setting a buffer area with adjustable memory capacity, solves the problem of asynchronous acquisition data time when the optical switch polls and opens, and at the same time, by flowing out the data in the buffer area with adjustable memory capacity and sequentially performing signal recombination, filtering, component extraction, display and storage processing, the interference of low-frequency noise in the environment, noise of the tunable laser light source and dark current in the photodetector is eliminated, the signal-to-noise ratio of the acquired high-frequency signal is improved, and the accuracy of multi-channel high-frequency signal acquisition is improved.
[0050] The technical features in the claims of the present application are subject to the literal description. The drawings are used to assist in understanding the concept and embodiments of the present invention. The scope of protection of the present invention should be determined based on the content of the literal description.
[0051] It should be noted that the structures, ratios, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those skilled in the art to understand and read, and are not used to limit the limited conditions for the implementation of the present invention. Therefore, they do not have any technical significance. Any modification of the structure, change of the proportional relationship or adjustment of the size should still fall within the scope covered by the technical content disclosed in the present invention without affecting the effects that the present invention can produce and the purposes that can be achieved. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" cited in this specification are only for the convenience of clear description and are not used to limit the scope of implementation of the present invention. Any change or adjustment of their relative relationship should also be regarded as the scope of implementation of the present invention without substantial change in the technical content.
[0052] The above are only the preferred embodiments of the present invention, and do not impose any form of limitation on the present invention. Although the present invention has been disclosed above with the preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to equivalent embodiments of equivalent changes within the scope of the technical solution of the present invention by using the above-disclosed technical content. However, as long as it does not depart from the content of the technical solution of the present invention, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW, which is applied to a multi-channel high-frequency signal acquisition system of fiber Bragg gratings, and is characterized in that, The fiber Bragg grating multi-channel high-frequency signal acquisition system includes a multi-channel fiber Bragg grating sensing device and a host computer. The host computer is equipped with a host computer data acquisition module and a data acquisition processing control module. The method includes: The data acquisition processing control module polls and opens the optical channels in the multi-channel fiber Bragg grating sensing device according to a preset optical channel opening sequence, and sequentially obtains the high-frequency data of the multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate; The data acquisition processing control module stores the sequentially obtained high-frequency data of the multi-channel fiber Bragg gratings in a preset adjustable memory capacity buffer and determines whether the number of elements stored in the adjustable memory capacity buffer exceeds the preset memory of the adjustable memory capacity buffer; When the number of elements stored in the adjustable memory capacity buffer exceeds the preset memory, the data in the adjustable memory capacity buffer is flowed out and sequentially subjected to signal recombination, filtering, component extraction, display, and storage processing.
2. The method for collecting multi-channel high-frequency signals of fiber Bragg grating based on LabVIEW according to claim 1, characterized in that The multi-channel fiber Bragg grating sensing device includes a tunable laser light source, a multi-channel fiber Bragg grating, an optical switch corresponding to the multi-channel fiber Bragg grating, and an optical performance detection module. The data acquisition processing control module polls and opens the optical channels in the multi-channel fiber Bragg grating sensing device according to a preset optical channel opening sequence, and sequentially obtains the high-frequency data of the multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate, including: The data acquisition processing control module starts the optical performance detection module. The optical performance detection module detects the spectrogram of the first-channel fiber Bragg grating according to a preset optical channel opening sequence, and processes the spectrogram according to a peak searching algorithm to obtain the central wavelength of the first-channel fiber Bragg grating; The optical performance detection module is turned off, the tunable laser light source is started, and it is determined whether the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the current first-channel fiber Bragg grating; If the output wavelength of the tunable laser light source is not within the 3dB bandwidth wavelength range of the first-channel fiber Bragg grating, the output wavelength of the tunable laser light source is compensated according to the central wavelength of the first-channel fiber Bragg grating until the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the first-channel fiber Bragg grating; If the output wavelength of the tunable laser light source is within the 3dB bandwidth wavelength range of the first-channel fiber Bragg grating, the optical switch corresponding to the first-channel fiber Bragg grating is opened, and the high-frequency data of the first-channel fiber Bragg grating collected by the host computer data acquisition module according to a preset sampling rate is obtained; It is determined whether the high-frequency data of the first-channel fiber Bragg grating meets the preset acquisition conditions. If the high-frequency data of the first-channel fiber Bragg grating meets the preset acquisition conditions, the tunable laser light source is turned off, the optical switch is switched to the next-channel fiber Bragg grating according to a preset optical channel opening sequence and the optical switch is closed, and the high-frequency data of each channel fiber Bragg grating is sequentially obtained according to the acquisition steps of the high-frequency data of the first-channel fiber Bragg grating.
3. The fiber Bragg grating multi-channel high-frequency signal acquisition method based on LabVIEW according to claim 1, characterized in that, The host computer data acquisition module includes an FPGA module and a Real-Time module. Sequentially obtaining the high-frequency data of multi-channel fiber Bragg gratings collected by the host computer data acquisition module according to a preset sampling rate includes: The FPGA module sequentially collects the high-frequency data of multi-channel fiber Bragg gratings according to a preset sampling rate, and stores the high-frequency data in the DMA FIFO; The Real-Time module reads the high-frequency data in the DMA FIFO through the FIFO and writes the high-frequency data read from the FIFO into the network stream; The data acquisition processing control module reads the high-frequency data from the network stream.
4. The method for collecting multi-channel high-frequency signals of fiber Bragg grating based on LabVIEW according to claim 3, wherein, The FPGA module sequentially collects the high-frequency data of multi-channel fiber Bragg gratings according to a preset sampling rate, and stores the high-frequency data in the DMA FIFO, including: The FPGA module first calls the reset I / O function. After the reset I / O function is called, it sets the STOP boolean value to zero and sends an interrupt code to the Real-Time module; The FPGA module parallelly calls the generate I / O sampling pulse function to determine the sampling rate of the FPGA module for the signal, calls the get I / O status function to obtain the sample status of each channel, and calls the read I / O function to read the high-frequency data from each channel; When it is judged that the program status is correct, the high-frequency data is written into the DMA FIFO. At the same time, it is judged whether there is an error code in the program. If not, the high-frequency data is repeatedly collected in a loop.
5. The method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW according to claim 1, wherein: The preset memory of the adjustable memory capacity buffer is M, and the expression of the preset memory is: ; where n represents the number of data collected by a preset single channel; N is the number of optical switch channels; Configure the number n of high-frequency data collected by a preset single channel according to the following formula: ; where t represents the time for preset channel switching, in ms; f represents the sampling rate preset by the FPGA module, in Hz.
6. The method for collecting multi-channel high-frequency signals of fiber Bragg gratings based on LabVIEW according to claim 2, wherein: The preset acquisition condition is that the number of high-frequency data of a single-channel fiber Bragg grating collected is greater than or equal to the preset number n of high-frequency data collected for a single channel.
7. The method for collecting multi-channel high-frequency signals of fiber Bragg grating based on LabVIEW according to claim 5, wherein The method of storing the sequentially obtained high-frequency data of multi-channel fiber Bragg gratings in a buffer area with a preset adjustable memory capacity by the data acquisition processing control module and judging whether the number of elements stored in the buffer area with adjustable memory capacity exceeds the preset memory includes: The data acquisition processing control module continuously receives and obtains the high-frequency data of multi-channel fiber Bragg gratings and orderly introduces them as data elements into the buffer area with adjustable memory capacity constructed by the while loop statement; Obtain the initial number of data elements in the buffer area with adjustable memory capacity and record it in the shift register as the initial reference for subsequent counting operations; For each new data element entering the while loop statement, the count value of the shift register is incremented on the basis of the initial reference until the count value in the shift register reaches or exceeds the preset memory M set by the user.
8. The method for collecting multi-channel high-frequency signals of fiber Bragg grating based on LabVIEW according to claim 7, characterized in that, When the number of elements stored in the buffer area with adjustable memory capacity exceeds the preset memory, the data in the buffer area with adjustable memory capacity is flowed out and signal recombination, filtering, component extraction, display and storage processing are sequentially performed, including: When the count value in the shift register exceeds the preset memory M, the multi-channel high-frequency data cached in the adjustable memory capacity buffer is outputted. The multi-channel high-frequency data outputted from the adjustable memory capacity buffer is successively subjected to signal recombination processing to obtain N high-frequency waveform signals. The N high-frequency waveform signals are respectively subjected to filtering processing, and target data is extracted from the filtered high-frequency waveform signals. The target data is displayed in an N-channel waveform chart, and a data storage loop system with an event state machine is constructed using the queue message processor mode. The display data on the N-channel waveform chart is stored through the data storage loop system.
9. The method for acquiring multi-channel high-frequency signals of fiber Bragg grating based on LabVIEW according to claim 8, wherein, The successively subjecting the multi-channel high-frequency data outputted from the adjustable memory capacity buffer to signal recombination processing to obtain N high-frequency waveform signals includes: Converting the multi-channel high-frequency data outputted from the adjustable memory capacity buffer from the U32 type to the DBL type. Then, the multi-channel high-frequency data after type conversion is divided into N groups of parallel array subsets according to specific rules, and each array subset has n numbers. The N groups of array subsets are respectively subjected to signal recombination processing to obtain N high-frequency waveform signals. Among them, the signal recombination processing includes: using the N groups of array subsets as Y and using the sampling rate f of the FPGA module for signal sampling as dt to create a waveform.
10. The fiber Bragg grating multi-channel high-frequency signal acquisition method based on LabVIEW according to claim 9, characterized in that The extracting the target data from the filtered high-frequency waveform signals includes: Extracting the numerical data that is Y in the high-frequency waveform signal from the filtered high-frequency waveform signal to obtain the target data, and the data type of the target data is the DBL type.
Citation Information
Patent Citations
Multi-channel fiber Bragg grating (FBG) demodulator
CN101718942A
High-time-synchronization multichannel fiber bragg grating sensing system
CN103017804A
Multi-channel fiber grating sensor demodulation method based on optical switch cascade
CN107655503A
Method for processing high-throughput-rate torque measurement data based on the labview
CN109540357A
Multi-channel VDMA control method and application thereof
CN112732603A