Universal multichannel signal collecting, receiving and processing method and system
By introducing the steps of driver initialization, link establishment, parameter configuration, data acquisition and data transmission in the multi-channel signal acquisition technology, the problem of insufficient reliability and universality in the existing technology is solved, and the comprehensive signal acquisition and processing is achieved. Control, suitable for multi-channel signal acquisition scenarios.
Patent Information
- Application Number
- CN202411196306.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-03
AI Technical Summary
The existing multi-channel signal acquisition technology has poor reliability, robustness and versatility, and it is impossible to handle the acquisition tasks of multiple channels at the same time.
A general multi-channel signal acquisition and reception processing method is proposed, including driver initialization, link establishment, parameter configuration, data acquisition and data transmission steps, and perform two-way interaction through Ethernet to achieve complete control of signal acquisition and processing flow and improve acquisition Reliability and versatility of the process.
By refining and decomposing the acquisition process, accurate control of signal acquisition and processing is achieved, the reliability and versatility of the overall acquisition process are improved, and the traditional method of unidirectional transmission of stateless feedback is replaced, and it is suitable for various signal acquisition scenarios.
Smart Images

Figure CN119065298A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of embedded signal acquisition, and in particular relates to a universal multi-channel signal acquisition, receiving and processing method and system. Background Art
[0002] In the field of modern science and engineering, signal acquisition and processing is a crucial technology, which covers a wide range of applications from industrial control to scientific research. With the advancement of sensor technology and the increase in data acquisition needs, effective signal acquisition methods have become particularly critical. Traditional acquisition and control methods often face many challenges and limitations. For example, in multi-channel signal processing, the requirements for data synchronization, accuracy and versatility are becoming more and more significant.
[0003] Therefore, proposing a complete and universal signal acquisition, reception and processing method can not only fill the technical gap of traditional methods in multi-channel data processing, but also provide an innovative solution for engineers and researchers in related fields, thereby promoting the further development and application of signal acquisition technology in the future.
[0004] Through the above analysis, the problems and defects of the existing technology are: the reliability, robustness and versatility of the existing multi-channel signal acquisition process are poor, and it is unable to process the acquisition tasks of multiple channels at the same time. Summary of the invention
[0005] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides a universal multi-channel signal acquisition, receiving and processing method and system. The purpose of the present invention is to solve the shortcomings of the existing multi-channel signal acquisition technology, and propose a universal multi-channel signal acquisition, receiving and processing method, which can fully control the reception and processing processes of signal acquisition, improve the reliability, robustness and versatility of the overall acquisition process, and enable the program to simultaneously process the acquisition tasks of multiple channels, including the processing of steps such as signal acquisition and data upload.
[0006] The technical solution is as follows: A general multi-channel signal acquisition, receiving and processing method, comprising:
[0007] S1, driver initialization. After the system is powered on, the software performs initialization and configuration on each driver device involved in the bottom layer.
[0008] S2, establish a link. After the initialization configuration process is completed, the board and the host computer establish a transceiver link via Ethernet.
[0009] S3, parameter configuration, is performed before each acquisition task, and the acquisition mode is controlled by sending Ethernet messages in a specified format by the host computer;
[0010] S4, data acquisition, is carried out after parameter configuration is completed, and is started or stopped by sending Ethernet messages in a specified format remotely from the host computer;
[0011] S5, data transmission, is carried out after data collection is completed, and the valid data is uploaded to the host computer in the form of grouping.
[0012] In step S1, the software performs initialization configuration process for each driver device involved in the bottom layer, including:
[0013] S101, initializing the hardware platform, performing address mapping on the drivers used by the AXI bus, DDR memory, Ethernet controller, and DMA controller, setting the base address corresponding to each driver and designing the corresponding read-write control function, and implementing the read-write method of the base address plus the offset by calling the read-write control function, thereby realizing the control of the driver;
[0014] S102, the software end performs parameter initialization settings on the IP core of the signal acquisition module on the FPGA end, including enabling settings of sampling channels, sampling rate settings of each channel, sampling mode settings of each channel, sampling time settings of each channel, and sampling times settings of each channel; the configuration parameters are sent from the ARM end to the FPGA end through the AXI LITE interface, and then the signal is input into the IP core through the input port of the IP core;
[0015] S103, initialize the DMA controller, configure both receiving and sending to interrupt mode; initialize the interrupt controller, timer controller and interrupt exception register, etc., and set each interrupt processing function; initialize Ethernet, including the setting of MAC address and IP address and PCB setting, and set the network to TCP mode;
[0016] S104, the ARM end resets the FPGA end by outputting a high level to the custom reset pin RESET for 1us, and then pulling it low to complete the initialization process of each register variable on the FPGA end;
[0017] S105. After the initialization task is completed, the chnX_enable signal is continuously detected to determine whether each data channel is enabled. If the channel is enabled, the corresponding receiving branch function is entered. If not, the channel is skipped. The upper computer transmission data on the network is processed by calling the xemacif_input function, and the stop signal recived_flag is monitored to determine whether there is an Ethernet message input.
[0018] In step S2, a link is established, including:
[0019] S201, the host computer is used as the server, the corresponding Ethernet IP address and mask are set, and the monitoring mode is entered to wait for the connection; the board end is used as the client, and after the initialization process is completed, it actively initiates the connection and establishes a network connection relationship with the server end;
[0020] S202, after the two ends establish a network link through the TCP three-way handshake, the client actively sends a packet of link establishment message in a specified format to the server to indicate to the host computer that the board end is working normally;
[0021] S203, after receiving the link establishment message sent by the client, the server side replies to the board side with a link establishment response message to indicate to the board side that the host computer can normally exchange data with it.
[0022] In step S3, parameter configuration includes:
[0023] S301. Before each acquisition task starts, the host computer configures the enable setting of the sampling channel, the sampling rate setting of each channel, the sampling mode setting of each channel, the sampling time setting of each channel, and the sampling number setting of each channel according to the requirements of this acquisition task;
[0024] S302, after the host computer sets the sampling parameters through the interface, the parameters are packaged into an Ethernet message of a specified format and sent to the board end through the network;
[0025] S303. After receiving the parameter message, the board extracts the configuration parameters according to the specified format, caches them in the corresponding variables, and sends the contents of the variables from the ARM side to the FPGA side through the AXI LITE interface. The configuration is then input into the IP core through the input port of the IP core to complete the mode configuration of the acquisition IP. After the configuration is completed, the IP core performs external acquisition tasks according to the established mode.
[0026] In step S4, data collection includes:
[0027] S401, after the acquisition parameter configuration is completed, the board end replies a parameter configuration response message to the host end, indicating that the IP core has correctly completed the parameter configuration process and started the acquisition task;
[0028] S402, the host computer sends a start acquisition message to the board end. After receiving the message, the board end automatically enters the receiving branch and calculates the length, number of times and tail of the DMA transmission of the message according to the set sampling frequency and sampling time. The calculation method is: total length = number of times × single size + tail;
[0029] S403. After determining the transfer length, number of times and tail parameters, write the control information into the control register of the AXIDMA channel, call the XAxiDma_SimpleTransfer function to configure the DMA hardware, read data from the AD converter to the specified memory address area; enter a loop that continuously monitors the DMA transfer status, and when the DMA transfer of a channel is completed, refresh the cache through the Xil_DCacheInvalidateRange function.
[0030] In step S403, data is read from the AD converter to the specified memory address area, including: updating the receiving buffer pointer RxBufferPtrX_r to point to the start position of the next data block, and updating the channel transmission count chnX_cnt to record the number of completed transmissions;
[0031] Enter a loop that continuously monitors the DMA transfer status, including:
[0032] Step 1: Obtain transmission length data, number of times data, and tail data; clean and process the acquired data;
[0033] Step 2: Based on the abnormal monitoring of the DMA transmission status, the abnormality of the fluctuation characteristics of the receiving flag bit marker is determined from the two dimensions of time and space, and the monitoring behavior of the control register on the receiving flag bit marker is identified;
[0034] Step three: Set the visualization flag marker parameters, and visualize the recognition results and download the overall analysis report based on the set visualization flag marker parameters.
[0035] In step one, the acquired data is cleaned and processed, including:
[0036] First, the acquired data is processed for missing values, data standardization, and outlier detection;
[0037] Secondly, the multi-time dimensions of the received flag marker data are aggregated and transformed, and the processed data are stored in the pre-built basic library and thematic library.
[0038] In step 2, based on the DMA transfer status abnormality monitoring, the abnormality of the fluctuation characteristics of the receiving flag bit marker is determined from the two dimensions of time and space, and the monitoring behavior of the control register on the receiving flag bit marker is identified, including:
[0039] (1) Performing cluster analysis on the processed data to obtain multiple groups, and calculating the intra-group correlation coefficient and inter-group correlation coefficient of the group to which each control register belongs, to obtain data having the characteristics of the receiving flag bit marker string and having the monitoring characteristics;
[0040] (2) DMA transmission status abnormality monitoring: The estimated values of the transmission time dimension t and the spatial dimension P are calculated using the ordinary least squares method, and the corresponding residual sum is obtained; the expression is:
[0041]
[0042]
[0043] Where L is the number of abnormal transmission status monitoring points, i is the i-th abnormal transmission status monitoring point, a i1 is the correlation coefficient value of the i-th monitoring point in the group at the first moment, ρ 1,t-i is the signal transmission density at the first moment under the i-th monitoring point in the forward group under the transmission time, g(z t ) is the signal transmission gravity under multiple transmission times, ε 1,t is the deviation of the signal at the first moment of transmission time, β i1 is the inter-group correlation coefficient of the ith transmission state abnormal monitoring point in the space at the first moment, ρ 2,t-i is the signal transmission density at the second moment under the i-th monitoring point in the forward group under the transmission time in space, η 1,t is the deviation of the signal at the first moment of transmission time in space;
[0044] (3) Compare the residual sums obtained by different segmentation methods and take the segmentation with the minimum residual sum;
[0045] (4) Perform a significance test on whether the marker position changes in the generation process of the time series, obtain a number of marker position abnormal change monitoring points, test whether the time interval divided by two adjacent marker position abnormal change monitoring points has produced fluctuations with long-term memory, and construct a receiving marker position marker change identification table;
[0046] (5) Establish a spatial correlation model for all control registers. Based on the different groups obtained by cluster analysis, use correlation coefficient analysis to calculate the intra-group correlation coefficient and inter-group correlation coefficient of each control register group to obtain data with the characteristics of the receiving flag bit mark string and the monitoring characteristics;
[0047] The spatial correlation analysis model is as follows:
[0048]
[0049] In the formula, δ t is the spatial correlation, a0 is the initial value of the intra-group correlation coefficient, m is the mth monitoring point in the group, a i is the correlation coefficient value of the i-th monitoring point in the group, a t-i is the correlation coefficient value of the i-th monitoring point in the forward group under the transmission time dimension t, j is the j-th inter-group point, s is the number of groupings, βj is the inter-group correlation coefficient of the jth group, δ t-j is the spatial correlation of the jth group of points between the forward groups under the transmission time dimension t;
[0050] In step (1), the intra-group correlation coefficient and the inter-group correlation coefficient of the group where each control register is located are calculated, and the data having the characteristics of the receiving flag bit marker string and the monitoring characteristics are obtained, including:
[0051] 1) In the time dimension, calculate whether two time series have similar change trends. The expression is:
[0052]
[0053] In the formula, CORT(X T ,Y T ) is a similar change trend between two time series, t is the transmission time dimension value, T is the transmission time, X t+1 is the X time series at the transmission time dimension value t+1, X t is the X time series under the transmission time dimension value t, Y t+1 is the Y time series at the transmission time dimension value t+1, Y t is the Y time series under the transmission time dimension value t;
[0054] 2) Determine CORT(X T ,Y T ) property: -1≤CORT(X T ,Y T )≤1, where CORT(X T ,Y T )=1 means that the two time series have the same trend, they will go up or down at the same time, and the increase or decrease is the same; CORT(X T ,Y T )=-1 means the upward and downward trends of the two time series are opposite; CORT(X T ,Y T ) = 0 means that the two time series have no correlation in terms of monotonicity;
[0055] 3) For control registers that have a change in the structure of the receiving flag marker and enter the period of the receiving flag marker change, multiple control registers in the group have a strong system correlation, while the correlation between groups is weak: the correlation within the group and between groups shows a high value-low value feature, and the probability of several control registers with dominant ability to lead the receiving flag marker increases, which has the feature of receiving flag marker collusion; for any control register that has a change in the structure of the receiving flag marker and enters the period of the receiving flag marker change, the correlation between groups within the group shows a low value-low value feature, and it is judged that the control register has a monitoring feature.
[0056] In step S5, data transmission includes:
[0057] S501, after data collection is completed, the valid data will be cached in the memory area, firstly, the length of the collected data is calculated, and it is reasonably divided according to the maximum limit length of a single transmission of Ethernet, and the number of times required to be transmitted is calculated;
[0058] S502, before sending valid data, the board first sends a packet of indication message to the host computer, notifying the host computer to prepare to receive valid data and indicating the length of the valid data; then sends a designated packet of valid data message;
[0059] S503, the host computer receives the valid data message of the specified package and counts it at the same time. After receiving it, it compares it with the valid data length in the first package message to check whether the data is lost. After the data amount is correct, it performs CRC check to determine whether the received data is correct. If the length and content of the received data are correct, it replies to the board end with a data transmission completion message, indicating the end of the transmission.
[0060] Another object of the present invention is to provide a universal multi-channel signal acquisition, reception and processing system, which implements the universal multi-channel signal acquisition, reception and processing method, and the system comprises:
[0061] The driver initialization module is used to initialize and configure the driver devices involved in the underlying layer after the system is powered on.
[0062] Establish a link module, which is used to establish a transceiver link between the board and the host computer through Ethernet after the initialization configuration process is completed;
[0063] The parameter configuration module is used to control the acquisition mode by sending Ethernet messages in a specified format through the host computer before each acquisition task;
[0064] The data acquisition module is used to start or stop the data after the parameter configuration is completed by sending Ethernet messages in a specified format remotely from the host computer;
[0065] The data transmission module is used to upload valid data to the host computer in the form of grouping after data collection is completed.
[0066] In combination with all the above-mentioned technical solutions, the beneficial effects possessed by the present invention are as follows: the process part in the receiving and processing method of the present invention includes driver initialization, link establishment, parameter configuration, data acquisition and data transmission. Based on the steps, accurate control of each process stage of signal acquisition reception and processing can be achieved, thereby improving the reliability, robustness and versatility of the overall acquisition process. Compared with the prior art, the various steps mentioned in the present invention play an indispensable role in the overall process of data acquisition. The two-way handshake interaction method involved in the interaction between the two ends makes communication more reliable, thereby replacing the traditional method of one-way transmission and no state feedback of the signal acquisition system. By decomposing, refining and designing the entire process of data acquisition, the receiving and processing method mentioned in the present invention can be used in various signal acquisition scenarios, which is a universal method. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;
[0068] Figure 1 It is a flow chart of a general multi-channel signal acquisition, receiving and processing method provided by an embodiment of the present invention;
[0069] Figure 2 It is a schematic diagram of a general multi-channel signal acquisition, receiving and processing system provided by an embodiment of the present invention;
[0070] In the figure: 1. Driver initialization module; 2. Link establishment module; 3. Parameter configuration module; 4. Data acquisition module; 5. Data transmission module. DETAILED DESCRIPTION
[0071] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.
[0072] Embodiment 1: The general multi-channel signal acquisition, receiving and processing method provided by the embodiment of the present invention includes driver initialization, link establishment, parameter configuration, data acquisition and data transmission. Specifically, it includes:
[0073] S1, driver initialization. After the system is powered on, the software performs initialization and configuration on each driver device involved in the bottom layer.
[0074] S101, initialize the hardware platform, perform address mapping on the drivers used by AXI bus, DDR memory, Ethernet controller and DMA controller, set the base address corresponding to each driver and design the corresponding read and write control function, implement the "base address + offset" read and write method by calling the read and write control function, and then realize the control function of the driver.
[0075] Exemplarily, the address mapping is automatically performed at the bottom layer, that is, the module is mapped to a corresponding address so that the user can operate it.
[0076] The control function is the most basic read and write function and is the underlying function of the system, namely the xil_in and xil_out functions.
[0077] S102, the software end performs parameter initialization settings on the IP core of the signal acquisition module on the FPGA end, including enabling settings of sampling channels, sampling rate settings of each channel, sampling mode settings of each channel, sampling time settings of each channel, sampling times settings of each channel, etc. The configuration parameters are sent from the ARM end to the FPGA end through the AXI LITE interface, and then the signal is input into the IP core through the input port of the IP core.
[0078] Exemplarily, the enable setting is to enable the channel, the sampling rate setting of each channel is to set the sampling frequency, and the sampling mode of each channel includes different methods such as single sampling and multiple sampling; the sampling time of each channel is the setting of the length of time for this sampling, and the sampling times of each channel correspond to multiple sampling.
[0079] S103, initialize the DMA controller, configure both receiving and sending to interrupt mode. Initialize the interrupt controller, timer controller and interrupt exception register, etc., and set each interrupt processing function. Initialize Ethernet, including the setting of MAC address and IP address and PCB setting, and set the network to TCP mode.
[0080] Exemplarily, the interrupt handling function is a function executed when an interrupt is triggered;
[0081] TCP is a transmission control protocol, a link-oriented, reliable, byte-stream-based transport layer communication protocol, defined by IETF's RFC 793. In the simplified computer network OSI model, TCP completes the functions specified by the fourth layer, the transport layer, and the User Datagram Protocol (UDP) is another important transport protocol in the same layer. In the Internet protocol suite, the TCP layer is an intermediate layer above the IP layer and below the application layer. Reliable, pipe-like links are often used between the application layers of different hosts, but the IP layer does not provide such a stream mechanism, but provides unreliable packet exchange.
[0082] S104, the ARM end resets the FPGA end by outputting a high level to the custom reset pin RESET for 1us, and then pulling it low to complete the initialization process of each register variable on the FPGA end.
[0083] Exemplarily, the reset pin RESET output is led out from a custom ARM-side axi lite register through a custom reset pin.
[0084] S105. After all initialization tasks are completed, the system is in a waiting state until the trigger signal arrives. By continuously detecting the chnX_enable signal, it is determined whether each data channel is enabled. If the channel is enabled, it enters the corresponding receiving branch function. If it is not enabled, it skips the channel. At the same time, the system processes the upper computer transmission data on the network by calling the xemacif_input (netif_ptr) function, and monitors the stop signal (recived_flag) to determine whether there is an Ethernet message input.
[0085] Exemplarily, whether each data channel is enabled is determined to be 1;
[0086] The receiving branch function is the processing function entered when data is received;
[0087] Determine whether there is Ethernet message input. When there is Ethernet data input, the received_flag signal is set to 1.
[0088] S2, establish a link. After the initialization configuration process is completed, the board and the host computer establish a transceiver link via Ethernet. The specific steps are as follows:
[0089] S201, the host computer as the server, set the corresponding Ethernet IP address and mask, etc., enter the monitoring mode to wait for the link. The board end as the client, after the initialization process is completed, will actively initiate a link to establish a network link relationship with the server.
[0090] For example, the monitoring mode is mainly used to solve the problem of the distance between the speaker and the user being too far, and has a high degree of sound restoration, which can more accurately present the original quality of the audio. The monitoring mode is mainly used in audio monitoring, recording and other occasions that require high fidelity and high accuracy.
[0091] S202. After the two ends establish a network link through the TCP three-way handshake, the client will actively send a link establishment message in a specified format to the server to indicate to the host computer that the board is working normally.
[0092] For example, TCP (Transmission Control Protocol) is a protocol that mainly establishes reliable point-to-point link communication between computers. During TCP communication, a three-way handshake is required between two computers to establish a link. The following is a detailed three-way handshake process:
[0093] First handshake: The client sets the SYN flag to 1, randomly generates a sequence number seq=x, and sends the data packet to the server. The client enters the SYN_SEND state and waits for confirmation from the server.
[0094] Second handshake: After the server receives the data packet, it knows from the flag bit SYN=1 that the client requests to establish a link. The server sets the flag bits SYN and ACK to 1, then ack=x+1, randomly generates a value seq=y, and sends the data packet to the client to confirm the link request, that is, the SYN+ACK packet. At this time, the server enters the SYN_RECV state.
[0095] The third handshake: After receiving the confirmation, the client checks it. If it is correct, the flag ACK is set to 1, ack=y+1, and the data packet is sent to the server. The server checks it. If it is correct, the link is successfully established. The client and server enter the ESTABLISHED state, completing the three-way handshake. Then the client and server can start transmitting data.
[0096] The specified format includes an Ethernet message.
[0097] S203, after receiving the link establishment message sent by the client, the server will reply to the board with a link establishment response message to indicate to the board that the host computer can normally exchange data with it.
[0098] S3, parameter configuration, is performed before each acquisition task, and the acquisition method is controlled by sending Ethernet messages in a specified format by the host computer. The specific steps are as follows:
[0099] S301. Before each acquisition task begins, the host computer shall configure the enable settings of the sampling channels, the sampling rate settings of each channel, the sampling mode settings of each channel, the sampling time settings of each channel, the sampling times settings of each channel, etc. according to the requirements of this acquisition task.
[0100] Exemplarily, enable sampling channels 1A and 1B, set the sampling rate of channel 1A to 10K, the sampling mode to single sampling, and the sampling time to 1s; set the sampling rate of channel 1B to 20K, the sampling mode to multiple sampling, the sampling time to 0.5s, and the number of samplings to 10 times.
[0101] S302, after the host computer sets the sampling parameters through the interface, it will package the parameters into an Ethernet message in a specified format and send it to the board end through the network.
[0102] The specified format is a custom Ethernet message format.
[0103] S303, after receiving the parameter message, the board will extract the configuration parameters according to the specified format, cache them in the corresponding variables, and send the contents of the variables from the ARM side to the FPGA side through the AXI LITE interface, and then input the configuration into the IP core through the input port of the IP core to complete the mode configuration of the acquisition IP. After the configuration is completed, the IP core will perform external acquisition tasks according to the established mode.
[0104] Exemplarily, in extracting the configuration parameters according to the specified format, the data is extracted from as many bytes as the data is stored;
[0105] The mode configuration of the acquisition IP includes: writing the specified parameters into the IP core to complete the configuration;
[0106] The established mode is to send the content in the variable from the ARM side to the FPGA side through the AXI LITE interface, and then input the configuration into the IP core through the input port of the IP core to complete the mode configuration of the acquisition IP.
[0107] S4, data collection, is performed after parameter configuration is completed, and is started or stopped by sending Ethernet messages in a specified format remotely from the host computer. The specific steps are as follows:
[0108] S401. After the acquisition parameter configuration is completed, the board will reply a parameter configuration response message to the host computer, indicating that the IP core has correctly completed the parameter configuration process and can start the acquisition task.
[0109] The parameter configuration response message includes an Ethernet message;
[0110] S402, the host computer sends a start acquisition message to the board end. After receiving the message, the board end will automatically enter the receiving branch. The system will calculate the DMA transmission length (dma_len_byte_chnX), number of times and tail of the message according to the set sampling frequency and sampling time. The calculation method is: total length = number of times × single size + tail.
[0111] S403, after determining the relevant parameters such as the transfer length, the system writes these control information into the control register of the AXIDMA channel and calls the XAxiDma_SimpleTransfer function to configure the DMA hardware to read data from the AD converter to the specified memory address area. Subsequently, the system enters a loop that continuously monitors the DMA transfer status. Once the DMA transfer of a channel is completed, the system will refresh the cache through the Xil_DCacheInvalidateRange function to ensure data consistency.
[0112] In step S403, the continuously monitoring DMA transfer status is to continuously determine the receiving flag bit, specifically including:
[0113] Step 1: Obtain transmission length data, number of times data, and tail data; clean and process the acquired data;
[0114] Step 2: Based on the abnormal monitoring of the DMA transmission status, the abnormality of the fluctuation characteristics of the receiving flag bit marker is determined from the two dimensions of time and space, and the monitoring behavior of the control register on the receiving flag bit marker is identified;
[0115] Step three: Set the visualization flag marker parameters, and visualize the recognition results and download the overall analysis report based on the set visualization flag marker parameters.
[0116] The cleaning and processing of the acquired data in step 1 includes:
[0117] First, the acquired data is processed for missing values, data standardization, and outlier detection;
[0118] Secondly, the multi-time dimensions of the received flag marker data are aggregated and transformed; at the same time, the processed data is stored in the pre-built basic library and thematic library;
[0119] In the step 2, based on the DMA transmission state abnormality monitoring, the abnormality of the fluctuation characteristics of the receiving flag bit marker is determined from the two dimensions of time and space, and the monitoring behavior of the receiving flag bit marker by the identification control register includes:
[0120] First, in the time dimension, a multivariate time series model of each control register product is constructed, and the abnormal structural change monitoring points of the received flag bit marker data are identified by combining the DMA transmission status abnormal monitoring, and a DMA transmission status abnormal monitoring model is constructed to determine the abnormality of the received flag bit marker fluctuation characteristics;
[0121] Secondly, in the spatial dimension, a spatial statistical model is constructed to determine the spatial correlation, clustering and abnormality of the receiving flags of different control registers;
[0122] In the step 2, based on the abnormal monitoring of the DMA transmission status, the abnormality of the fluctuation characteristics of the receiving flag bit marker is determined from the two dimensions of time and space, and the monitoring behavior of the receiving flag bit marker by the identification control register specifically includes the following steps:
[0123] (1) Performing cluster analysis on the processed data to obtain multiple groups, and calculating the intra-group correlation coefficient and inter-group correlation coefficient of the group to which each control register belongs, to obtain data having the characteristics of the receiving flag bit marker string and having the monitoring characteristics;
[0124] (2) DMA transmission status abnormality monitoring: Use the ordinary least squares method to calculate the estimated values of the transmission time dimension t and space dimension P, and obtain the corresponding residual sum;
[0125]
[0126]
[0127] Where L is the number of abnormal transmission status monitoring points, i is the i-th abnormal transmission status monitoring point, a i1 is the correlation coefficient value of the i-th monitoring point in the group at the first moment, ρ 1,t-i is the signal transmission density at the first moment under the i-th monitoring point in the forward group under the transmission time, g(z t ) is the signal transmission gravity under multiple transmission times, ε 1,t is the deviation of the signal at the first moment of transmission time, β i1 is the inter-group correlation coefficient of the ith transmission state abnormal monitoring point in the space at the first moment, ρ 2,t-i is the signal transmission density at the second moment under the i-th monitoring point in the forward group under the transmission time in space, η 1,t is the deviation of the signal at the first moment of transmission time in space;
[0128] (3) Compare the residual sums obtained by different segmentation methods and take the segmentation with the minimum residual sum;
[0129] (4) Perform a significance test on whether the marker position changes in the generation process of the time series, obtain a number of marker position abnormal change monitoring points, test whether the time interval divided by two adjacent marker position abnormal change monitoring points has produced fluctuations with long-term memory, and construct a receiving marker position marker change identification table;
[0130] (5) Establish a spatial correlation model for all control registers, and use correlation coefficient analysis to calculate the intra-group correlation coefficient and inter-group correlation coefficient of each control register group based on the different groups obtained by cluster analysis;
[0131] The spatial correlation analysis model is as follows:
[0132]
[0133] In the formula, δ t is the spatial correlation, a0 is the initial value of the intra-group correlation coefficient, m is the mth monitoring point in the group, a i is the correlation coefficient value of the i-th monitoring point in the group, a t-i is the correlation coefficient value of the i-th monitoring point in the forward group under the transmission time dimension t, j is the j-th inter-group point, s is the number of groupings, β j is the inter-group correlation coefficient of the jth group, δ t-j is the spatial correlation of the jth group of points between the forward groups under the transmission time dimension t;
[0134] In the step (1), the intra-group correlation coefficient and the inter-group correlation coefficient of the group where each control register is located are calculated, and the data having the characteristics of the receiving flag bit marker string and the monitoring characteristics are obtained, including:
[0135] 1) In the time dimension, calculate whether two time series have similar change trends. The expression is:
[0136]
[0137] In the formula, CORT(X T ,Y T ) is a similar change trend between two time series, t is the transmission time dimension value, T is the transmission time, X t+1 is the X time series at the transmission time dimension value t+1, X t is the X time series under the transmission time dimension value t, Y t+1 is the Y time series at the transmission time dimension value t+1, Y t is the Y time series under the transmission time dimension value t;
[0138] 2) Determine CORT(X T ,Y T) property: -1≤CORT(X T ,Y T )≤1, where CORT(X T ,Y T )=1 means that the two time series have the same trend, they will go up or down at the same time, and the increase or decrease is the same; CORT(X T ,Y T )=-1 means the upward and downward trends of the two time series are opposite; CORT(X T ,Y T ) = 0 means that the two time series have no correlation in terms of monotonicity;
[0139] 3) For control registers that have a change in the structure of the receiving flag marker and enter the period of the receiving flag marker change, multiple control registers in the group have a strong system correlation, while the correlation between groups is weak: the correlation within the group and between groups shows a high value-low value feature, and the probability of several control registers with dominant ability to lead the receiving flag marker increases, which has the feature of receiving flag marker collusion; for any control register that has a change in the structure of the receiving flag marker and enters the period of the receiving flag marker change, the correlation between groups within the group shows a low value-low value feature, and it is judged that the control register has a monitoring feature.
[0140] In addition, the system will update the receive buffer pointer RxBufferPtrX_r to point to the start of the next data block, and update the channel's transmission count (chnX_cnt) to record the number of completed transmissions.
[0141] S5, data transmission, is carried out after data collection is completed, and valid data is uploaded to the host computer in the form of grouping. The specific steps are as follows:
[0142] S501. After data collection is completed, the valid data will be cached in the memory area. First, the length of the collected data must be calculated, and it must be reasonably divided according to the maximum length limit of a single Ethernet transmission to calculate the number of times it needs to be transmitted.
[0143] The calculation method for calculating the length of the collected data is: total length = number of times × single size + tail;
[0144] The division and the calculation of the number of times required to be transferred are both implemented using the above-mentioned calculation method.
[0145] S502, before sending valid data, the board first sends a packet of indication message to the host computer, the purpose of which is to notify the host computer to prepare to receive valid data and indicate the length of the valid data. Then, the designated packet of valid data message is sent.
[0146] Exemplarily, the indication message may be a fixed value, for example, the message sent is 01, 02, each representing the information of the message.
[0147] S503, the host computer receives the valid data message of the specified package and counts it at the same time. After receiving it, it compares it with the valid data length in the first package message to check whether there is any loss. After the data amount is correct, it performs CRC check to determine whether the received data is correct. If there is no problem with the length and content of the received data, it replies to the board end with a data transmission completion message, indicating the end of the transmission.
[0148] Exemplarily, comparing with the valid data length in the first packet message includes: determining whether the length in the message is equal to the actually received length.
[0149] Through the above embodiments, it can be seen that the present invention provides a universal multi-channel signal acquisition receiving and processing method to improve the deficiencies of the overall control process of data acquisition and transmission of the existing multi-channel signal acquisition technology, and the process part of the method includes driver initialization, link establishment, parameter configuration, data acquisition and data transmission. Based on the steps, accurate control of each process stage of signal acquisition reception and processing can be achieved, thereby improving the reliability, robustness and versatility of the overall acquisition process.
[0150] Compared with the prior art, the various steps mentioned in the present invention play an indispensable role in the overall process of data collection. The two-way handshake interaction method involved in the interaction between the two ends makes the communication more reliable, thereby replacing the traditional method of one-way transmission and no state feedback of the signal collection system. By decomposing, refining and designing the entire process of data collection, the receiving and processing method mentioned in the present invention can be applied to various signal collection scenarios, which is a universal method.
[0151] Embodiment 2, as Figure 2 As shown, the present invention provides a universal multi-channel signal acquisition, receiving and processing system, comprising:
[0152] Driver initialization module 1 is used for initializing and configuring the driver devices involved in the underlying layer after the system is powered on;
[0153] Establishing link module 2, after the initialization configuration process is completed, the board end and the host computer end establish a transceiver link through Ethernet;
[0154] Parameter configuration module 3, used to control the acquisition mode by sending Ethernet messages of a specified format through the host computer before each acquisition task starts;
[0155] Data acquisition module 4, used to start or stop after parameter configuration is completed, by sending Ethernet messages in a specified format remotely from the host computer;
[0156] The data transmission module 5 is used to upload the valid data to the host computer in the form of packaging after the data collection is completed.
[0157] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0158] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the protection scope of the present invention.
Claims
1. A general multi-channel signal acquisition, receiving and processing method, characterized in that: The method includes: S1, driver initialization. After the system is powered on, the software performs initialization and configuration on each driver device involved in the bottom layer. S2, establish a link. After the initialization configuration process is completed, the board and the host computer establish a transceiver link via Ethernet. S3, parameter configuration, is performed before each acquisition task, and the acquisition mode is controlled by sending Ethernet messages in a specified format by the host computer; S4, data acquisition, is carried out after parameter configuration is completed, and is started or stopped by sending Ethernet messages in a specified format remotely from the host computer; S5, data transmission, is carried out after data collection is completed, and the valid data is uploaded to the host computer in the form of grouping.
2. The general multi-channel signal acquisition, receiving and processing method according to claim 1, characterized in that: In step S1, the software performs initialization configuration process for each driver device involved in the bottom layer, including: S101, initializing the hardware platform, performing address mapping on the drivers used by the AXI bus, DDR memory, Ethernet controller, and DMA controller, setting the base address corresponding to each driver and designing the corresponding read-write control function, and implementing the read-write method of the base address plus the offset by calling the read-write control function, thereby realizing the control of the driver; S102, the software end performs parameter initialization settings on the IP core of the signal acquisition module on the FPGA end, including enabling settings of sampling channels, sampling rate settings of each channel, sampling mode settings of each channel, sampling time settings of each channel, and sampling times settings of each channel; the configuration parameters are sent from the ARM end to the FPGA end through the AXI LITE interface, and then the signal is input into the IP core through the input port of the IP core; S103, initialize the DMA controller, configure both receiving and sending to interrupt mode; initialize the interrupt controller, timer controller and interrupt exception register, and set each interrupt processing function; initialize Ethernet, including setting the MAC address and IP address, PCB setting, and set the network to TCP mode; S104, the ARM end resets the FPGA end by outputting a high level to the custom reset pin RESET for 1us, and then pulling it low to complete the initialization process of each register variable on the FPGA end; S105. After the initialization task is completed, the chnX_enable signal is continuously detected to determine whether each data channel is enabled. If the channel is enabled, the corresponding receiving branch function is entered. If not, the channel is skipped. The upper computer transmission data on the network is processed by calling the xemacif_input function, and the stop signal recived_flag is monitored to determine whether there is an Ethernet message input.
3. The universal multi-channel signal acquisition, receiving and processing method according to claim 1, characterized in that: In step S2, a link is established, including: S201, the host computer is used as the server, the corresponding Ethernet IP address and mask are set, and the monitoring mode is entered to wait for the connection; the board end is used as the client, and after the initialization process is completed, it actively initiates the connection and establishes a network connection relationship with the server end; S202, after the two ends establish a network link through the TCP three-way handshake, the client actively sends a packet of link establishment message in a specified format to the server to indicate to the host computer that the board end is working normally; S203, after receiving the link establishment message sent by the client, the server side replies to the board side with a link establishment response message to indicate to the board side that the host computer can normally exchange data with it.
4. The universal multi-channel signal acquisition, receiving and processing method according to claim 1, characterized in that: In step S3, parameter configuration includes: S301. Before each acquisition task starts, the host computer configures the enable setting of the sampling channel, the sampling rate setting of each channel, the sampling mode setting of each channel, the sampling time setting of each channel, and the sampling number setting of each channel according to the requirements of this acquisition task; S302, after the host computer sets the sampling parameters through the interface, the parameters are packaged into an Ethernet message of a specified format and sent to the board end through the network; S303. After receiving the parameter message, the board extracts the configuration parameters according to the specified format, caches them in the corresponding variables, and sends the contents of the variables from the ARM side to the FPGA side through the AXI LITE interface. The configuration is then input into the IP core through the input port of the IP core to complete the mode configuration of the acquisition IP. After the configuration is completed, the IP core performs external acquisition tasks according to the established mode.
5. The universal multi-channel signal acquisition, receiving and processing method according to claim 1, characterized in that: In step S4, data collection includes: S401, after the acquisition parameter configuration is completed, the board end replies a parameter configuration response message to the host end, indicating that the IP core has correctly completed the parameter configuration process and started the acquisition task; S402, the host computer sends a start acquisition message to the board end. After receiving the message, the board end automatically enters the receiving branch and calculates the length, number of times and tail of the DMA transmission of the message according to the set sampling frequency and sampling time. The calculation method is: total length = number of times × single size + tail; S403. After determining the transfer length, number of times and tail parameters, write the control information into the control register of the AXIDMA channel, call the XAxiDma_SimpleTransfer function to configure the DMA hardware, read data from the AD converter to the specified memory address area; enter a loop that continuously monitors the DMA transfer status, and when the DMA transfer of a channel is completed, refresh the cache through the Xil_DCacheInvalidateRange function.
6. The universal multi-channel signal acquisition, receiving and processing method according to claim 5, characterized in that: In step S403, data is read from the AD converter to the specified memory address area, including: updating the receiving buffer pointer RxBufferPtrX_r to point to the start position of the next data block, and updating the channel transmission count chnX_cnt to record the number of completed transmissions; Enter a loop that continuously monitors the DMA transfer status, including: Step 1: Obtain transmission length data, number of times data, and tail data; clean and process the acquired data; Step 2: Based on the abnormal monitoring of the DMA transmission status, the abnormality of the fluctuation characteristics of the receiving flag bit marker is determined from the two dimensions of time and space, and the monitoring behavior of the control register on the receiving flag bit marker is identified; Step three: Set the visualization flag marker parameters, and visualize the recognition results and download the overall analysis report based on the set visualization flag marker parameters.
7. The universal multi-channel signal acquisition, receiving and processing method according to claim 6, characterized in that: In step one, the acquired data is cleaned and processed, including: First, the acquired data is processed for missing values, data standardization, and outlier detection; Secondly, the multi-time dimensions of the received flag marker data are aggregated and transformed, and the processed data are stored in the pre-built basic library and thematic library.
8. The universal multi-channel signal acquisition, receiving and processing method according to claim 6, characterized in that: In step 2, based on the DMA transfer status abnormality monitoring, the abnormality of the fluctuation characteristics of the receiving flag bit marker is determined from the two dimensions of time and space, and the monitoring behavior of the control register on the receiving flag bit marker is identified, including: (1) Performing cluster analysis on the processed data to obtain multiple groups, and calculating the intra-group correlation coefficient and inter-group correlation coefficient of the group to which each control register belongs, to obtain data having the characteristics of the receiving flag bit marker string and having the monitoring characteristics; (2) DMA transmission status abnormality monitoring: The estimated values of the transmission time dimension t and the spatial dimension P are calculated using the ordinary least squares method, and the corresponding residual sum is obtained; the expression is: Where L is the number of abnormal transmission status monitoring points, i is the i-th abnormal transmission status monitoring point, a i1 is the correlation coefficient value of the i-th monitoring point in the group at the first moment, ρ 1,t-i is the signal transmission density at the first moment under the i-th monitoring point in the forward group under the transmission time, g(z t ) is the signal transmission gravity under multiple transmission times, ε 1,t is the deviation of the signal at the first moment of transmission time, β i1 is the inter-group correlation coefficient of the ith transmission state abnormal monitoring point in the space at the first moment, ρ 2,t-i is the signal transmission density at the second moment under the i-th monitoring point in the forward group under the transmission time in space, η 1,t is the deviation of the signal at the first moment of transmission time in space; (3) Compare the residual sums obtained by different segmentation methods and take the segmentation with the minimum residual sum; (4) Perform a significance test on whether the marker position changes in the generation process of the time series, obtain a number of marker position abnormal change monitoring points, test whether the time interval divided by two adjacent marker position abnormal change monitoring points has produced fluctuations with long-term memory, and construct a receiving marker position marker change identification table; (5) Establish a spatial correlation model for all control registers. Based on the different groups obtained by cluster analysis, use correlation coefficient analysis to calculate the intra-group correlation coefficient and inter-group correlation coefficient of each control register group to obtain data with the characteristics of the receiving flag bit mark string and the monitoring characteristics; The spatial correlation analysis model is as follows: In the formula, δ t is the spatial correlation, a0 is the initial value of the intra-group correlation coefficient, m is the mth monitoring point in the group, a i is the correlation coefficient value of the i-th monitoring point in the group, a t-i is the correlation coefficient value of the i-th monitoring point in the forward group under the transmission time dimension t, j is the j-th inter-group point, s is the number of groupings, β j is the inter-group correlation coefficient of the jth group, δ t-j is the spatial correlation of the jth group of points between the forward groups under the transmission time dimension t; In step (1), the intra-group correlation coefficient and the inter-group correlation coefficient of the group to which each control register belongs are calculated, and the data having the characteristics of the receiving flag bit marker string and the monitoring characteristics are obtained, including: 1) In the time dimension, calculate whether two time series have similar change trends. The expression is: In the formula, CORT(X T ,Y T ) is a similar change trend between two time series, t is the transmission time dimension value, T is the transmission time, X t+1 is the X time series at the transmission time dimension value t+1, X t is the X time series under the transmission time dimension value t, Y t+1 is the Y time series at the transmission time dimension value t+1, Y t is the Y time series under the transmission time dimension value t; 2) Determine CORT(X T ,Y T ) property: -1≤CORT(X T ,Y T )≤1, where CORT(X T ,Y T )=1 means that the two time series have the same trend, they will go up or down at the same time, and the increase or decrease is the same; CORT(X T ,Y T )=-1 means the upward and downward trends of the two time series are opposite; CORT(X T ,Y T ) = 0 means that the two time series have no correlation in terms of monotonicity; 3) For control registers that have a change in the structure of the receiving flag marker and enter the period of the receiving flag marker change, multiple control registers in the group have a strong system correlation, while the correlation between groups is weak: the correlation within the group and between groups shows a high value-low value feature, and the probability of several control registers with dominant ability to lead the receiving flag marker increases, which has the feature of receiving flag marker collusion; for any control register that has a change in the structure of the receiving flag marker and enters the period of the receiving flag marker change, the correlation between groups within the group shows a low value-low value feature, and it is judged that the control register has a monitoring feature.
9. The universal multi-channel signal acquisition, receiving and processing method according to claim 1, characterized in that: In step S5, data transmission includes: S501, after data collection is completed, the valid data will be cached in the memory area, firstly, the length of the collected data is calculated, and it is reasonably divided according to the maximum limit length of a single transmission of Ethernet, and the number of times required to be transmitted is calculated; S502, before sending valid data, the board first sends a packet of indication message to the host computer, notifying the host computer to prepare to receive valid data and indicating the length of the valid data; then sends a designated packet of valid data message; S503, the host computer receives the valid data message of the specified package and counts it at the same time. After receiving it, it compares it with the valid data length in the first package message to check whether the data is lost. After the data amount is correct, it performs CRC check to determine whether the received data is correct. If the length and content of the received data are correct, it replies to the board end with a data transmission completion message, indicating the end of the transmission.
10. A universal multi-channel signal acquisition, receiving and processing system, characterized in that: Implementing the universal multi-channel signal acquisition, receiving and processing method as claimed in any one of claims 1 to 9, the system comprises: The driver initialization module (1) is used for initializing and configuring the driver devices involved in the bottom layer after the system is powered on; Establishing a link module (2), which is used to establish a transceiver link between the board and the host computer via Ethernet after the initialization configuration process is completed; A parameter configuration module (3) is used to control the collection mode by sending Ethernet messages of a specified format through the host computer before each collection task; A data acquisition module (4) is used to start or stop the data acquisition after the parameter configuration is completed, by sending a specified format Ethernet message remotely through the host computer; The data transmission module (5) is used to upload the valid data to the host computer in the form of a package after the data collection is completed.
Citation Information
Cited By
Multichannel sampling synchronization method and device of radio frequency direct sampling RFSOC system
CN119727724A
Air-ground cooperative offshore photovoltaic cleaning and maintenance system
CN119910002A
Power simulation waveform real-time acquisition method based on FPGA
CN120295947A
