Configurable multi-channel synchronous trigger signal generation device and system and control method

By designing a configurable multi-channel synchronous trigger signal generation device, the problems of flexibility and accuracy in generating multi-channel synchronous trigger signals were solved, enabling synchronous acquisition and correct recovery of sensor data, and improving the performance and reliability of the system.

CN121396211APending Publication Date: 2026-01-23SUZHOU ZHONGDE RUIBO INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511482233.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing technologies cannot achieve flexible configuration and accurate generation of multi-channel synchronous trigger signals, resulting in inconsistent sensor data acquisition timing, which affects system performance and data recovery accuracy.

Method used

A configurable multi-channel synchronous trigger signal generation device is designed, including a synchronous trigger configuration module, a reference signal detection and switching module, and a multi-channel synchronous trigger signal generation module. It can generate synchronous trigger signals according to sensor parameters and output them stably when the reference signal is lost, ensuring synchronous sensor acquisition and data timing recovery.

Benefits of technology

It enables rapid and accurate generation of multi-channel synchronous trigger signals, improves the accuracy and flexibility of system synchronous acquisition, and ensures the correct recovery of sensor data and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121396211A_ABST
    Figure CN121396211A_ABST
Patent Text Reader

Abstract

The invention discloses a configurable multi-channel synchronous trigger signal generation device and system and a control method, and the device comprises a synchronous trigger configuration module which is used for receiving a configuration information data packet and analyzing the configuration information data packet to obtain trigger signal parameter configuration information of each channel; the reference signal detection and switching module is used for continuously detecting whether an input reference trigger signal exists or not and generating an internal reference trigger signal and corresponding time information, and if the input reference trigger signal is not detected, the internal reference trigger signal is generated; the multi-channel synchronous trigger signal generation module is used for synchronously generating a multi-channel synchronous trigger signal according to the parameter configuration information by taking the internal reference trigger signal as a reference, and outputting a trigger signal state of each channel; and the state information output module is used for outputting the trigger signal state information of each channel and the time information of the internal reference trigger signal. According to the invention, the multi-channel synchronous trigger signal can be quickly and accurately generated, and the trigger signal of each channel can be flexibly configured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of multi-channel data acquisition, and particularly relates to a configurable multi-channel synchronous trigger signal generation device, system and control method. BACKGROUND

[0002] The synchronous acquisition of multiple sensors is to control the acquisition time sequence of multiple sensors in the same way or with a fixed time sequence relationship, so as to ensure that the data acquisition time of the sensors has a fixed time sequence relationship.

[0003] The traditional distributed sensor data acquisition unit usually realizes data acquisition of an external sensor module by means of an external interface and an internal processing unit. The sensor signal to be acquired is triggered by the sensor module according to the time sequence of the internal processing module. The sensor data acquisition unit usually only records the system time when each sensor module data is received. The system time recorded by the sensor data acquisition unit is usually the time after the complete data packet is received, and is not the acquisition time of the sensor module. After data acquisition, the sensor needs to process and transmit the data, including signal processing at the sensor end, data transmission, and data preprocessing at the acquisition end. Therefore, there will be a time delay between the acquisition time and the receiving time. For a scene requiring synchronous data acquisition, especially in the data acquisition scene of multiple motion sensor modules, strict synchronous acquisition of each sensor is often required. The delay caused by different acquisition times will seriously affect the performance of the system. Therefore, the acquisition trigger time of different sensors needs to be synchronized as much as possible to ensure that the data of the sensors is the data at the same time.

[0004] In the prior art, multi-channel synchronous control is usually realized by using a synchronous control signal, that is, each channel is triggered synchronously under the control of a unified synchronous control signal. However, on the one hand, this type of method can only realize the triggering of multiple channels at the same time, and cannot form a trigger scheme suitable for the characteristics of different sensors. On the other hand, this type of method can only obtain the time of multi-channel synchronous triggering, that is, the synchronous acquisition time of each sensor. The delay from the acquisition time to the receiving time of different sensors is different. If the sensor data acquisition unit directly recovers the time sequence according to the received time, it may lead to incorrect recovery. SUMMARY

[0005] The technical problem solved by the present application is that: in view of the above problems existing in the prior art, the present application provides a configurable multi-channel synchronous trigger signal generation device, system and control method which is simple in implementation, low in cost, high in generation efficiency and precision and strong in flexibility, can quickly and accurately generate a multi-channel synchronous trigger signal, ensures multi-sensor synchronous acquisition, and each channel trigger signal can be flexibly configured to form a suitable trigger scheme for different sensors, and at the same time, the time sequence data of the synchronous trigger signal can be generated, so that the trigger time sequence of the sensor can be reconstructed, and the acquisition data of each sensor can be correctly recovered.

[0006] To solve the above technical problems, the technical scheme provided by the present application is: A configurable multi-channel synchronous trigger signal generation device, comprising: A synchronous trigger configuration module for receiving a configuration information data packet containing parameter configuration information of each channel trigger signal in a multi-channel trigger signal, and outputting the parameter configuration information of each channel trigger signal after analysis; A reference signal detection and switching module for continuously detecting whether there is an input reference trigger signal, and generating an internal reference trigger signal and corresponding time information output, wherein if an input reference trigger signal is detected, the input reference trigger signal is taken as the internal reference trigger signal, and if no input reference trigger signal is detected, the internal reference trigger signal is simulated according to the parameter information of the reference trigger signal; A multi-channel synchronous trigger signal generation module for receiving the parameter configuration information of each channel trigger signal output by the synchronous trigger configuration module and the internal reference trigger signal output by the reference signal detection and switching module, generating a multi-channel synchronous trigger signal in accordance with the parameter configuration information of each channel trigger signal with the internal reference trigger signal as the reference trigger signal, and outputting to each sensor for control of synchronous acquisition, and obtaining channel trigger signal state information for the state information output module; A state information output module for outputting the trigger signal state information of each channel output by the multi-channel synchronous trigger signal generation module and the time information of the internal reference trigger signal output by the reference signal detection and switching module to each sensor data acquisition unit to reconstruct the time sequence.

[0007] Further, the parameter configuration information includes any one or more of channel frequency, effective level, duty cycle, input frequency and trigger mode, and the trigger mode includes rising edge trigger and falling edge trigger.

[0008] Further, the reference signal detection and switching module comprises: An input unit for receiving an externally input reference trigger signal; The detection judgment unit is used for continuously detecting whether there is an input reference trigger signal, when detecting that there is an input reference trigger signal, providing the input reference trigger signal as an internal reference trigger signal to the output unit, and when not detecting that there is an input reference trigger signal, executing the internal trigger signal generation unit; The internal trigger signal generation unit is used for simulating an internal reference trigger signal according to parameter information of the reference trigger signal, and providing the generated internal reference trigger signal and corresponding time information to the output unit, wherein the parameter information includes frequency and phase; The output unit is used for outputting the internal reference trigger signal and corresponding time information.

[0009] Further, the internal trigger signal generation unit is an MCU internal timer, when there is an input reference trigger signal, setting the value of the register ARR of the MCU internal timer according to the frequency of the input reference trigger signal to set the timer period value, realizing the calibration between the timer and the input reference trigger signal, when the input reference trigger signal is lost or interrupted and cannot be detected, starting the MCU internal timer to generate a signal with the same frequency and consistent phase as the input reference trigger signal as the internal reference trigger signal.

[0010] Further, the multi-channel synchronous trigger signal generation module is a multi-channel PWM timer with PWM output, each channel of the PWM timer is configured according to the parameter configuration information of each channel trigger signal to correspondingly generate each channel trigger signal; the state information output module obtains the trigger state information of each channel trigger signal by reading the state timer of each channel of the PWM timer.

[0011] A multi-sensor synchronous data acquisition system, comprising a sensor data acquisition unit and a plurality of sensor modules connected to the sensor data acquisition unit respectively, further comprising the multi-channel synchronous trigger signal generation device as described above, the multi-channel synchronous trigger signal generation device is connected to each of the sensor modules and the sensor data acquisition unit, generates multi-channel synchronous trigger signals through the multi-channel synchronous trigger signal generation device and provides the multi-channel synchronous trigger signals as acquisition trigger time to each of the sensor modules, controls the acquisition trigger time of each of the sensor modules to be synchronous, and generates the trigger signal state information of each channel and the time information of the internal reference trigger signal to each of the sensor data acquisition units to control the reconstruction of the time sequence of each of the sensor data acquisition units.

[0012] A control method for the configurable multi-channel synchronous trigger signal generation device, comprising the following steps: Step S01. Generating configuration information data packet according to the required multi-channel trigger signal package, the data packet containing the parameter configuration information of each channel trigger signal in the multi-channel trigger signal; Step S02. After receiving the data packet containing the parameter configuration information of each channel trigger signal in the multi-channel trigger signal, parsing the data packet to obtain the parameter configuration information of each channel trigger signal; Step S03. Continuously detecting whether there is an input reference trigger signal, if detecting the input reference trigger signal as the internal reference trigger signal, if not detecting the input reference trigger signal, simulating the internal reference trigger signal according to the parameter information of the reference trigger signal, outputting the internal reference trigger signal and the time information corresponding to the internal reference trigger signal; Step S04. Taking the internal reference trigger signal as the reference trigger signal, generating the multi-channel synchronous trigger signal according to the parameter configuration information of each channel trigger signal, and obtaining the state information of each channel trigger signal and the time information of the internal reference trigger signal; Step S05. Correspondingly outputting each generated channel synchronous trigger signal to each sensor data acquisition unit, controlling the acquisition trigger time of each sensor data acquisition unit to be synchronous, and correspondingly outputting the state information of each channel trigger signal and the time information of the internal reference trigger signal to each sensor data acquisition unit, controlling the reconstruction timing of each sensor data acquisition unit.

[0013] Further, the frame structure of the configuration information data packet includes frame length, frame sequence number, frame type, frame content, CRC check and frame tail, the frame type includes channel frequency, effective level, duty cycle, input frequency and trigger mode, by analyzing the frame type and frame content in the configuration information data packet, the parameter configuration information of each channel trigger signal is obtained.

[0014] Further, step S03 includes: When there is an input reference trigger signal and the trigger mode is set by the Ext_Pluse_Mode() function, the value of the register ARR of the internal timer of the MCU is set according to the frequency of the input reference trigger signal to set the timer period value, so as to realize the calibration between the timer and the input reference trigger signal; When the input reference trigger signal is lost or interrupted and cannot be detected, the internal timer of the MCU is started to generate a signal with the same frequency and consistent phase as the input reference trigger signal as the internal reference trigger signal.

[0015] Further, in step S04, each channel trigger signal is generated by configuring the PWM timer according to the parameter configuration information of each channel trigger signal, and the duty cycle of the PWM timer is determined according to the values of the CCR1 register and the ARR register; in step S05, the state of each PWM timer is read at the maximum frequency of the PWM timer to obtain the trigger state of each PWM timer, and the state information of whether each channel trigger signal is triggered is output.

[0016] Compared with the prior art, the present application has the following advantages: 1. The present application can quickly and accurately generate multi-channel trigger signals, thereby providing strict synchronization acquisition for each sensor, and the parameters of each channel trigger signal can be flexibly set to match different sensors and provide appropriate trigger strategies, greatly improving the accuracy and flexibility of system synchronization acquisition. 2. On the basis of ensuring synchronization triggering of each sensor, the state information of each channel trigger signal and the time information of the internal reference trigger signal are provided to the sensor acquisition unit, so that the sensor data acquisition unit can obtain data containing the synchronization trigger signal timing, thereby reconstructing the trigger timing of the sensor and ensuring correct data recovery of the sensor data acquisition unit. 3. The present application can still stably output multi-channel trigger signals in the case of loss or interruption of the reference trigger signal, and can ensure the stability and reliability of the multi-sensor acquisition system. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 is a timing relationship diagram between acquisition time and receiving time in the prior art multi-sensor synchronization acquisition system.

[0018] Figure 2 is a structure principle diagram of the multi-channel synchronization trigger signal generation device of the present embodiment.

[0019] Figure 3 is an implementation flow diagram of the present embodiment for analyzing and obtaining each channel configuration information.

[0020] Figure 4 is an implementation flow diagram of the internal timer setting in the present embodiment.

[0021] Figure 5 is a configuration flow diagram of the PWM output timer in the present embodiment.

[0022] Figure 6 is a flow diagram of the MCU obtaining the trigger signal state in the specific application embodiment.

[0023] Figure 7 This is a schematic diagram of the experimental results obtained in a specific application embodiment of the present invention. Detailed Implementation

[0024] The present invention will be further described below with reference to the accompanying drawings and specific preferred embodiments, but this does not limit the scope of protection of the present invention.

[0025] As disclosed in this invention, unless the context clearly indicates otherwise, words such as "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Words such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connected" or "linked" are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect.

[0026] by Figure 1 For example, in a multi-sensor synchronous acquisition system, the acquisition time of sensor 1 at the first moment is t. 1,1 The acquisition time at the second moment is t. 1,2 After data acquisition, it undergoes signal processing, data transmission, and data preprocessing at the sensor end before being transmitted to the sensor data acquisition unit. The sensor data acquisition unit receives the data from sensor 1 at time t. 1,1 The data reception time at each moment is t. 1,1 ', received from sensor 1 at t 1,2 The data reception time at each moment is t. 1,2 Correspondingly, the acquisition time of sensor 2 at the first moment is t. 2,1 The data collection time at the second moment is t. 2,2 The sensor data acquisition unit receives data at t 2,1 The data reception time at each moment is t. 2,1 '、In t 2,2 The data reception time at each moment is t. 2,2 By synchronizing the acquisition trigger times of sensor 1 and sensor 2, i.e., controlling t... 1,1 With t 2,1 Synchronization, t 1,2 With t 2,2 Synchronization ensures that the data collected by sensor 1 and sensor 2 are from the same moment. Since sensor 1 and sensor 2 are different types of sensors, the required trigger signal frequency, effective level, duty cycle, and triggering method may differ, thus necessitating different triggering schemes. Furthermore, the time delay from acquisition time to reception time is different for sensor 1 and sensor 2; for example, from t... 1,1 to t1,1 the time delay between t 2,1 and t 2,1 is different, if the sensor data acquisition unit directly uses the receiving time to recover the time sequence of the collected data, it may cause time sequence recovery error. For example, due to the shorter time delay of sensor 2, the receiving time t 2,2 of the second collection time may be earlier than the receiving time t 1,1 of sensor 1 at the first collection time, if the sensor data acquisition unit uses the receiving time to recover the time sequence, the collection data of sensor 2 at the second collection time will be earlier than the collection data of sensor 1 at the first collection time, resulting in time sequence error.

[0027] The application combines the synchronous trigger configuration module, the reference signal detection and switching module, the multi-channel synchronous trigger signal generation module and the state information output module to form a configurable multi-channel synchronous trigger signal generation device. The synchronous trigger configuration module receives the parameter configuration information of each channel trigger signal, and at the same time, the reference signal detection and switching module continuously detects whether there is an input reference trigger signal. If there is, the input reference trigger signal is directly output as a trigger reference signal, otherwise an internal reference trigger signal is simulated according to the parameters of the reference trigger signal. Then, the multi-channel synchronous trigger signal generation module generates multiple trigger output signals with different parameters by combining the internal reference trigger signal and the configuration information of each channel. The parameters of each channel trigger signal can be flexibly set to match different sensors and provide appropriate trigger strategies, greatly improving the accuracy and flexibility of system synchronous acquisition. At the same time, on the basis of ensuring synchronous triggering of each sensor, by obtaining the state information of each channel trigger signal and the time information of the internal reference trigger signal, the sensor acquisition unit is provided, so that the sensor data acquisition unit can obtain data containing the time sequence of the synchronous trigger signal, and then the trigger time sequence of the sensor can be reconstructed to ensure correct data recovery of the sensor data acquisition unit.

[0028] As shown in Figure 2 , the configurable multi-channel synchronous trigger signal generation device of the embodiment includes: a synchronous trigger configuration module for receiving a configuration information data packet containing parameter configuration information of each channel trigger signal in the multi-channel trigger signal, and outputting the parameter configuration information of each channel trigger signal after analysis; The reference signal detection and switching module is configured to continuously detect whether there is an input reference trigger signal, and to generate an internal reference trigger signal and corresponding time information output, wherein if the input reference trigger signal is detected, the input reference trigger signal is taken as the internal reference trigger signal, and if the input reference trigger signal is not detected, the internal reference trigger signal is simulated according to parameter information of the reference trigger signal; The multi-channel synchronous trigger signal generation module is configured to receive the parameter configuration information of each channel trigger signal output by the synchronous trigger configuration module and the internal reference trigger signal output by the reference signal detection and switching module, to generate the multi-channel synchronous trigger signal according to the parameter configuration information of each channel trigger signal and taking the internal reference trigger signal as the reference trigger signal, and to output the multi-channel synchronous trigger signal to each sensor data acquisition unit to control synchronous acquisition and to obtain channel trigger signal state information to provide the state information output module. The state information output module is configured to output the channel trigger signal state information output by the multi-channel synchronous trigger signal generation module and the time information of the internal reference trigger signal output by the reference signal detection and switching module to each sensor data acquisition unit to reconstruct timing.

[0029] In the multi-channel synchronous trigger signal generation device, the synchronous trigger configuration module and the reference signal detection and switching module are connected to the input end of the multi-channel synchronous trigger signal generation module, the output end of the multi-channel synchronous trigger signal generation module and the output end of the reference signal detection and switching module are connected to the input end of the state information output module, the input of the synchronous trigger configuration module is the trigger signal parameter configuration information of each channel, the reference signal detection and switching module inputs the reference trigger signal and corresponding time information, the time information can also be obtained by internal detection, the output of the reference signal detection and switching module is the internal reference trigger signal and corresponding time information, the multi-channel synchronous trigger signal generation module inputs the parameter configuration information of each channel trigger signal output by the synchronous trigger configuration module and the internal reference trigger signal output by the reference signal detection and switching module, and outputs the multi-channel trigger signal with different parameters of channel 1 to channel n, n is the number of channels, and the input of the state information output module is the time information of the reference trigger signal and the state information of whether each channel is triggered. The multi-channel trigger signal generated by the above structure is provided to each sensor to ensure that each sensor is triggered synchronously, and the time information of the reference trigger signal and the state information of whether each channel is triggered are further provided to the sensor acquisition unit. The specific trigger time of each acquisition data can be determined by the time information of the reference trigger signal, and whether each channel is triggered can be determined by the state information of whether each channel is triggered. Therefore, the sensor acquisition unit can effectively reconstruct the timing by using the time information of the reference trigger signal and the state information of whether each channel is triggered, to ensure the accuracy of data recovery.

[0030] In the embodiment, the parameter configuration information can specifically include channel frequency, effective level, duty cycle, input frequency, and trigger mode, etc. The trigger signal required by different sensors has different frequency, effective level, duty cycle, etc. Therefore, by configuring the frequency, effective level, duty cycle, etc. of the trigger signal of each channel, different types of sensors can be flexibly applied to trigger. For example, when four cameras are connected in front, back, left and right, the frequency of the image generated by the camera is related to the input trigger frequency. Therefore, the frequency required by the cameras in different directions can be different. For example, the front and back cameras need to generate images at a frequency of 20 Hz, while the left and right cameras only need 10 Hz. The frequency and trigger mode required by each camera are different.

[0031] In the specific application embodiment, the user can input the configuration information according to the actual required trigger signal. After the synchronization trigger configuration module receives the input configuration information, the frequency, effective level, duty cycle, etc. of each channel signal in the multi-channel trigger signal can be set. Different frequencies, effective levels, duty cycles, and trigger modes can be generated to adapt to different types of sensors and form a corresponding trigger scheme. The configuration information can be automatically stored in the multi-channel synchronization trigger signal generation module after being configured by the synchronization trigger configuration module, and maintained until the next information update.

[0032] In the embodiment, the reference signal detection and switching module specifically includes: An input unit configured to receive an externally input reference trigger signal; A detection and judgment unit configured to continuously detect whether there is an input reference trigger signal. When it is detected that there is an input reference trigger signal, the input reference trigger signal is provided as an internal reference trigger signal to the output unit. When it is detected that there is no input reference trigger signal, the internal trigger signal generation unit is executed; An internal trigger signal generation unit configured to simulate an internal reference trigger signal according to parameter information of the reference trigger signal, and provide the generated internal reference trigger signal and corresponding time information to the output unit. The parameter information includes frequency and phase; An output unit configured to output the internal reference trigger signal and corresponding time information.

[0033] The reference signal detection and switching module continuously monitors the externally transmitted reference trigger signal, the triggering mode and frequency of which can be predetermined, but the reference trigger signal can disappear or be interrupted during transmission. For example, in a navigation system, a 1PPS signal transmitted by a GNSS positioning module is usually used as a reference trigger signal, but the signal will be interrupted when the device enters a tunnel, underground parking lot or other scenarios where it cannot communicate with the satellite. The reference signal detection and switching module continuously monitors the externally transmitted reference trigger signal, and judges the input state of the externally transmitted reference trigger signal. When no input reference trigger signal is detected, the internal trigger signal generation unit is executed to internally simulate a trigger signal consistent with the triggering mode and frequency of the external reference trigger signal.

[0034] The reference signal detection and switching module can ensure continuous output of the internal reference signal and the internal reference signal corresponding time information regardless of the effectiveness of the input reference trigger signal, so that the system can still stably output the trigger signal when the reference trigger signal is lost or temporarily interrupted, ensuring the reliability and stability of the system. When it is detected that the input reference trigger signal is valid, the internal reference signal directly uses the input reference trigger signal, and the time information corresponding to the internal reference signal directly uses the time information corresponding to the reference trigger signal. Correspondingly, when it is detected that the input reference trigger signal is lost or temporarily interrupted, an internal signal with the same frequency and phase as the input reference trigger signal is generated in the module as the internal reference trigger signal, and the time information corresponding to the internal reference trigger signal is maintained, so that the internal reference signal and the time information corresponding to the internal reference signal are always valid.

[0035] Specifically, the reference trigger signal input anomaly can be divided into the following two cases: When the input reference trigger signal goes from nothing to something, the input frequency and triggering mode are set according to the predetermined protocol format, wherein the protocol format defines the input frequency and triggering mode of the reference trigger signal, and the triggering mode includes falling edge triggering or rising edge triggering, etc. A trigger signal consistent with the reference trigger signal is generated in the multi-channel synchronous trigger signal generation module, which simulates the input reference trigger signal; When the input reference signal changes from having to not having, by setting the input frequency and the trigger mode, when the input reference trigger signal triggers in the set trigger mode, the signal inside the multi-channel synchronous trigger signal generation module will also trigger, so that the input reference signal and the internal signal trigger at the same time, so as to achieve the effect of using the input reference trigger signal to calibrate the internal signal, so when the input reference trigger signal is lost or interrupted, because the internal signal has been calibrated and the input frequency and trigger mode of the internal signal are set by the protocol, the internal generated trigger signal and the lost or interrupted input reference trigger signal are the same frequency and phase.

[0036] In a specific application embodiment, the internal trigger signal generation unit can use an MCU internal timer, when there is an input reference trigger signal, set the value of the register ARR of the MCU internal timer according to the frequency of the input reference trigger signal to set the timer period value, realize the calibration between the timer and the input reference trigger signal, when the input reference trigger signal is lost or interrupted and cannot be detected, start the MCU internal timer to trigger, that is, generate a signal with the same frequency as the input reference trigger signal and the same phase as the internal reference trigger signal.

[0037] In a specific application embodiment, the multi-channel synchronous trigger signal generation module can use multiple PWM timers with PWM output, for example, an MCU with serial communication, external input detection and PWM timer output can be used as the master control, the number of channels that the MCU can realize for synchronous trigger signal generation can be determined according to the number of PWM timers that the MCU has. Each PWM timer is configured according to the channel trigger signal parameter configuration information to correspondingly generate each channel trigger signal. The multi-channel synchronous trigger signal generation module generates the multi-channel synchronous trigger signal output according to the continuous uninterrupted internal reference trigger signal output by the synchronous signal detection and switching module and the configuration information of each channel, by setting the frequency division, counting, duty cycle, effective level, etc. of the PWM timer, and sends the information of whether each channel synchronous trigger output signal is triggered at the current time to the state information output module.

[0038] When using a PWM timer to generate each channel synchronous trigger output signal, the counting state of the PWM timer and whether the PWM signal is generated can be obtained by reading the timer state, and then the information of whether each channel synchronous trigger output signal is triggered can be obtained in real time. In a specific application embodiment, the state information output module can read the state timer of each PWM timer to obtain the trigger state of each PWM timer, that is, the state information output of whether each channel trigger signal is triggered can be obtained.

[0039] In a specific application embodiment, the state information output module outputs information on whether each channel synchronization trigger output signal output by the multi-channel synchronization trigger signal generation module is triggered and time information corresponding to the internal reference signal output by the reference signal detection and switching module. The output frequency of the module can be configured as the least common multiple or an integer multiple of the least common multiple of the frequencies of all output channels and input channels. Specifically, the output information of the state information output module includes: 1) time information corresponding to the current reference trigger signal; 2) whether the currently input reference trigger signal is valid, for example, using 1 to indicate that the input reference trigger signal is valid, using 0 to indicate that the input reference trigger signal is invalid, and using the internally generated reference trigger signal; 3) whether each trigger channel is triggered, for example, using 1 to indicate that the channel is triggered, and using 0 to indicate that the channel is not triggered.

[0040] In a specific application embodiment, STM32 is used as an MCU master control chip, and one serial port is used to realize the functions of receiving configuration information and outputting time and synchronization trigger signal state information. After obtaining the configuration information of each channel, the information is recorded in the code as parameters of the PWM timer and external input detection. In the reference signal detection and switching module, after obtaining the externally input reference trigger signal, the Ext_Pluse_Mode() function is used to set whether the input reference trigger signal is valid when it changes from high to low or when it changes from low to high. In the reference signal detection and switching module, the frequency of the input reference trigger signal has been set, so the internal timer of the MCU can be used to generate a signal synchronized with the input reference signal.

[0041] Specifically, when the input reference signal exists and is triggered in the trigger mode set by the Ext_Pluse_Mode() function, the Ext_Pluse_Mode() function can be used to set whether the input reference signal is obtained from the rising edge or the falling edge. For different input reference trigger signals, the value of the ARR register of the internal timer of the MCU needs to be reset to calibrate the internal timer and the input reference signal, so that the internal timer is synchronized with the input reference signal. Even if the external reference trigger signal is lost or interrupted, the multi-channel synchronization trigger signal generation module can also be triggered according to the internal timer.

[0042] After the configuration of the internal timer is completed in the reference signal detection and switching module, the PWM timer needs to additionally set the effective level and duty cycle compared with the internal timer, and the configuration information obtained in the synchronization configuration module is combined to configure the PWM output timer by taking STM32 as the MCU master chip. The duty cycle of the PWM timer is determined by the CCR1 register and the ARR register, and the duty cycle is the value of the CCR1 register divided by the value of the ARR register. For example, if CRR1 is 10000 and ARR is 50000, the duty cycle is 20%, and the CCER register determines the level of the duty cycle. When the CCER register is set to high level, in one cycle of PWM, 20% of the time is high level and 80% of the time is low level, and vice versa.

[0043] TIMx_SR is the state timer of the PWM timer, and the trigger state of the PWM timer can be obtained by reading the state of the timer. When there are multiple timers with different frequencies outputting at the same time, the frequency of the serial output protocol should be consistent with the highest frequency timer. Taking the output of 200Hz and 10Hz signals as an example, the 200Hz trigger signal is generated by the timer TIM1, the 10Hz signal is generated by TIM2, and the trigger state information is output.

[0044] The embodiment also provides a multi-sensor synchronous data acquisition system, which comprises a sensor data acquisition unit and a plurality of sensor modules connected with the sensor data acquisition unit respectively, and further comprises the multi-channel synchronous trigger signal generation device as described above. The multi-channel synchronous trigger signal generation device is connected with each sensor module and the sensor data acquisition unit respectively, generates a multi-channel synchronous trigger signal and provides the trigger time to each sensor module as an acquisition trigger time, controls the acquisition trigger time of each sensor module to be synchronous, and generates channel trigger signal state information and internal reference trigger signal time information and outputs them to each sensor data acquisition unit to control the reconstruction of the timing of each sensor data acquisition unit.

[0045] The multi-sensor synchronous data acquisition system described above can strictly control the synchronous acquisition trigger of multiple sensors, and can also ensure that the sensor acquisition unit restores data according to the correct timing, effectively ensuring the accuracy and reliability of multi-sensor data acquisition.

[0046] The steps of the control method for the configurable multi-channel synchronous trigger signal generation device include: Step S01. Generate a configuration information data packet according to the required multi-channel trigger signal package, and the data packet contains the parameter configuration information of each channel trigger signal in the multi-channel trigger signal; Step S02. After receiving the data packet containing the parameter configuration information of each channel trigger signal in the multi-channel trigger signal, the data packet is parsed to obtain the parameter configuration information of each channel trigger signal. Step S03. Continuously detecting whether there is an input reference trigger signal, if the input reference trigger signal is detected, the input reference trigger signal is taken as an internal reference trigger signal, if no input reference trigger signal is detected, an internal reference trigger signal is simulated according to the parameter information of the reference trigger signal, and the internal reference trigger signal and the time information corresponding to the internal reference trigger signal are outputted. Step S04. Taking the internal reference trigger signal as a reference trigger signal, generating a multi-channel synchronous trigger signal according to the parameter configuration information of each channel trigger signal, and obtaining the state information of each channel trigger signal and the time information of the internal reference trigger signal. Step S05. Correspondingly outputting each generated channel synchronous trigger signal to each sensor data acquisition unit, controlling the synchronous acquisition trigger time of each sensor data acquisition unit, and correspondingly outputting the state information of each channel trigger signal and the time information of the internal reference trigger signal to each sensor data acquisition unit, and controlling the re-timing of each sensor data acquisition unit.

[0047] In this embodiment, the frame structure of the configuration information data packet specifically includes frame length, frame sequence number, frame type, frame content, CRC check and frame tail, and the frame type includes channel frequency, effective level, duty cycle, input frequency and trigger mode, etc., and specifically as shown in Table 1. Figure 3 As shown, by analyzing the configuration information, after analyzing the frame header and frame tail check and CRC check, the frame type and frame content in the data packet are extracted, and the parameter configuration information of each channel trigger signal such as channel frequency, duty cycle, effective level, input frequency and trigger mode is obtained.

[0048] Specifically, the configuration information can be sent to the multi-channel synchronous trigger signal generation module in the form of serial communication, and the communication protocol uses binary data protocol, with low bits in front and high bits in back.

[0049] Table 1: Frame structure of configuration information data packet

[0050] Among them, the configuration information protocol includes four types of setting channel frequency, setting channel duty cycle, setting effective level, setting input frequency and trigger mode, and specifically as shown in Tables 2-5.

[0051] Table 2: Protocol format for setting channel frequency

[0052] Table 3: Protocol Format for Setting Channel Duty Cycle

[0053] Table 4: Protocol Format for Setting Active Level

[0054] Table 5: Protocol format for setting input frequency and triggering method

[0055] In this embodiment, step S03 includes: When there is an input reference trigger signal and the trigger mode is set by the Ext_Pluse_Mode() function, the value of the ARR register of the MCU's internal timer is set according to the frequency of the input reference trigger signal to set the timer period value, thereby realizing the calibration between the timer and the input reference trigger signal; When the input reference trigger signal is lost or interrupted and cannot be detected, the MCU's internal timer is started to generate a signal with the same frequency and phase as the input reference trigger signal as the internal reference trigger signal.

[0056] like Figure 4 As shown, when setting the MCU's internal timer, first, the frequency of the external reference trigger signal is obtained. The timer PSC register is then configured to set the division factor, for example, PSC=1680. Next, the value of the timer's ARR register is set to set the timer period value, for example, ARR=50000. In this way, the internal timer frequency is set to 1Hz. When the input reference trigger signal is lost or interrupted and cannot be detected, the MCU's internal timer can be directly triggered to generate a signal of that frequency as the internal reference trigger signal. Figure 5 As shown, when setting the PWM timer, the frequency, effective level, and duty cycle are obtained. The timer PSC register is set to set the frequency division factor, and the timer ARP register is set to set the timer period value to obtain the internal timer frequency. Then, the duty cycle is set by setting the timer CCR1 register, and the effective level is set by setting the timer CCER register, finally obtaining the required PWM signal output.

[0057] Taking the acquisition of trigger signal status after the MCU obtains two PWM-generated trigger signals as an example, such as... Figure 6 As shown, it includes: Determine the frequencies of TIM1 and TIM2, and determine the frequency of the status output information based on the frequency of TIM1. Construct the array contents, read the timer status and fill it into the bytes storing the status information in the array; Before sending the status information, read TIM1_SR, TIM2_SR; Fill TIM1_SR, TIM2_SR into the corresponding byte of the array, and reset TIM1_SR, TIM2_SR; Recalculate the CRC check value in the array; Send the status information at the frequency of TIM1.

[0058] In this embodiment, in step S04, each channel trigger signal is generated by configuring each PWM timer according to the parameter configuration information of each channel trigger signal, and the duty cycle of the PWM timer is determined according to the values of the CCR1 register and the ARR register; in step S05, the state timer of each PWM timer is read at the frequency of the PWM timer with the maximum frequency to obtain the trigger state of each PWM timer, and the state information output of whether each channel trigger signal is triggered is obtained. When reading the state value of the PWM timer, it must be read at the frequency of the PWM timer with the maximum frequency, otherwise the situation that the high-frequency timer has triggered many times and the low-frequency timer has triggered will occur, resulting in the situation that the timer state is missed.

[0059] In a specific application embodiment, the trigger information can be sent using the protocol format shown in Table 6.

[0060] Table 6: Status information sending protocol format

[0061] The following takes the input reference trigger signal of the multi-channel synchronous trigger signal generation module in a specific application embodiment as an example, which is 1Hz, rising edge valid, and its time information is the second count value after starting work, and its output is 2 channels, which are configured as: 1) Channel 1: frequency 5Hz, duty cycle 50%, rising edge valid; 2) Channel 2: frequency 10Hz, duty cycle 50%, rising edge valid, and the results are as follows: During operation, it is assumed that the input reference trigger signal is missing in the time period from 3 seconds to 4 seconds, then the input reference trigger signal, the missing trigger signal after completion, the complete internal reference trigger signal, and the output signals of the 2 channels are as shown in Figure 7 .

[0062] At t=1 second, the input reference trigger signal, the complete internal reference trigger signal, the channel 1 (5Hz) output signal, and the channel 2 (10Hz) output signal are all aligned at the rising edge, and the output information at this time includes: time information: 1 (second); external input reference trigger signal: valid; channel 1 (5Hz) output signal: valid; channel 2 (10Hz) output signal: valid.

[0063] At t=3 seconds, the input reference trigger signal is missing, the complete internal reference trigger signal, the channel 1 (5Hz) output signal and the channel 2 (10Hz) output signal are all up edge aligned. At this time, the output information includes: time information: 3 (seconds); the external input reference trigger signal: invalid; the channel 1 (5Hz) output signal: valid; and the channel 2 (10Hz) output signal: valid.

[0064] At t=5.7 seconds, the input reference trigger signal, the complete internal reference trigger signal, the channel 1 (5Hz) output signal and the channel 2 (10Hz) output signal are all up edge aligned. At this time, the output information includes: time information: 5 (seconds); the external input reference trigger signal: valid; the channel 1 (5Hz) output signal: invalid; and the channel 2 (10Hz) output signal: valid.

[0065] From the above results, it can be seen that the application can still stably output multi-channel trigger signals in the case of missing or interrupting the reference trigger signal, and can ensure the stability and reliability of the multi-sensor acquisition system.

[0066] The above is only a preferred embodiment of the application, and does not limit the application in any form. Although the application has been disclosed as above with a preferred embodiment, it is not intended to limit the application. Therefore, any simple modification, equivalent change and modification made to the above embodiment without departing from the technical solution of the application, and according to the technical essence of the application, should fall within the protection scope of the technical solution of the application.

Claims

1. A configurable multi-channel synchronous trigger signal generation device, characterized in that, include: The synchronous trigger configuration module is used to receive a configuration information data packet containing the configuration information of the trigger signal parameters of each channel in the multi-channel trigger signal, and after parsing, output the configuration information of the trigger signal parameters of each channel. The reference signal detection and switching module is used to continuously detect whether there is an input reference trigger signal and generate an internal reference trigger signal and corresponding time information output. If an input reference trigger signal is detected, the input reference trigger signal is used as the internal reference trigger signal. If no input reference trigger signal is detected, the internal reference trigger signal is simulated and generated according to the parameter information of the reference trigger signal. The multi-channel synchronous trigger signal generation module is used to receive the parameter configuration information of each channel trigger signal output by the synchronous trigger configuration module and the internal reference trigger signal output by the reference signal detection and switching module. Using the internal reference trigger signal as the reference trigger signal, it synchronously generates multi-channel synchronous trigger signals according to the parameter configuration information of each channel trigger signal, outputs them to each sensor to control synchronous acquisition, and obtains the status information of each channel trigger signal to provide to the status information output module. The status information output module is used to output the trigger signal status information of each channel output by the multi-channel synchronous trigger signal generation module and the time information of the internal reference trigger signal output by the reference signal detection and switching module to each sensor data acquisition unit to reconstruct the timing sequence.

2. The configurable multi-channel synchronous trigger signal generation device according to claim 1, characterized in that, The parameter configuration information includes any one or more of the following: channel frequency, effective level, duty cycle, input frequency, and trigger mode. The trigger mode includes rising edge triggering and falling edge triggering.

3. The configurable multi-channel synchronous trigger signal generation device according to claim 1, characterized in that, The reference signal detection and switching module includes: The input unit is used to receive reference trigger signals from external inputs; The detection and judgment unit is used to continuously detect whether there is an input reference trigger signal. When an input reference trigger signal is detected, the input reference trigger signal is provided to the output unit as an internal reference trigger signal. When no input reference trigger signal is detected, the internal trigger signal generation unit is executed. An internal trigger signal generation unit is used to simulate and generate an internal reference trigger signal based on the parameter information of a reference trigger signal, and to provide the generated internal reference trigger signal and corresponding time information to the output unit. The parameter information includes frequency and phase. The output unit is used to output the internal reference trigger signal and the corresponding timing information.

4. The configurable multi-channel synchronous trigger signal generation device according to claim 3, characterized in that, The internal trigger signal generation unit is an internal timer of the MCU. When there is an input reference trigger signal, the value of the ARR register of the internal timer of the MCU is set according to the frequency of the input reference trigger signal to set the timer period value, so as to realize the calibration between the timer and the input reference trigger signal. When the input reference trigger signal is lost or interrupted and cannot be detected, the internal timer of the MCU is started to trigger and generate a signal with the same frequency and phase as the input reference trigger signal as the internal reference trigger signal.

5. The configurable multi-channel synchronous trigger signal generation device according to any one of claims 1 to 4, characterized in that, The multi-channel synchronous trigger signal generation module consists of multiple PWM timers with PWM output. Each PWM timer is configured according to the trigger signal parameter configuration information of each channel to generate the corresponding trigger signal. The status information output module obtains the trigger status of each PWM timer by reading the status timer of each PWM timer, and outputs the status information of whether the trigger signal of each channel is triggered.

6. A multi-sensor synchronous data acquisition system, comprising a sensor data acquisition unit and a plurality of sensor modules respectively connected to the sensor data acquisition unit, characterized in that, It also includes a multi-channel synchronous trigger signal generation device as described in any one of claims 1 to 5, wherein the multi-channel synchronous trigger signal generation device is connected to each of the sensor modules and the sensor data acquisition unit respectively, generates multi-channel synchronous trigger signals and provides them to each sensor module as acquisition trigger times, controls the synchronization of acquisition trigger times of each sensor module, and generates trigger signal status information of each channel and time information of internal reference trigger signals and outputs them to each sensor data acquisition unit to control the reconstruction timing of each sensor data acquisition unit.

7. A control method for a configurable multi-channel synchronous trigger signal generation device according to any one of claims 1 to 5, characterized in that the step include: Step S01. Generate a configuration information data packet based on the required multi-channel trigger signals. The data packet contains the parameter configuration information of each channel trigger signal in the multi-channel trigger signals. Step S02. After receiving the data packet containing the parameter configuration information of each channel trigger signal in the multi-channel trigger signal, parse the data packet to obtain the parameter configuration information of each channel trigger signal; Step S03. Continuously detect whether there is an input reference trigger signal. If an input reference trigger signal is detected, the input reference trigger signal is used as the internal reference trigger signal. If no input reference trigger signal is detected, the internal reference trigger signal is simulated and generated according to the parameter information of the reference trigger signal, and the internal reference trigger signal and the time information corresponding to the internal reference trigger signal are output. Step S04. Using the internal reference trigger signal as the reference trigger signal, generate a multi-channel synchronous trigger signal synchronously according to the parameter configuration information of each channel trigger signal, and obtain the status information of each channel trigger signal and the time information of the internal reference trigger signal; Step S05. Output the generated channel synchronization trigger signals to each sensor data acquisition unit respectively, control the acquisition trigger time synchronization of each sensor data acquisition unit, and output the channel trigger signal status information and the internal reference trigger signal time information to each sensor data acquisition unit respectively, control each sensor data acquisition unit to reconstruct the timing.

8. The control method according to claim 7, characterized in that, The frame structure of the configuration information data packet includes frame length, frame sequence number, frame type, frame content, CRC check, and frame tail. The frame type includes channel frequency, effective level, duty cycle, input frequency, and triggering mode. By parsing the frame type and frame content in the configuration information data packet, the configuration information of the trigger signal parameters for each channel can be obtained.

9. The control method according to claim 7 or 8, characterized in that, Step S03 includes: When there is an input reference trigger signal and the trigger mode is set by the Ext_Pluse_Mode() function, the value of the ARR register of the MCU's internal timer is set according to the frequency of the input reference trigger signal to set the timer period value, thereby realizing the calibration between the timer and the input reference trigger signal; When the input reference trigger signal is lost or interrupted and cannot be detected, the MCU's internal timer is started to generate a signal with the same frequency and phase as the input reference trigger signal as the internal reference trigger signal.

10. The control method according to claim 7 or 8, characterized in that, In step S04, each PWM timer is configured according to the parameter configuration information of each channel trigger signal to generate the corresponding channel trigger signal. The duty cycle of the PWM timer is determined according to the values ​​of the CCR1 register and the ARR register. In step S05, the status timer of each PWM timer is read at the frequency of the PWM timer with the maximum frequency to obtain the trigger status of each PWM timer and output the status information of whether each channel trigger signal is triggered.