TDCS-VR multi-modal physiological data acquisition and time alignment system and method
The tDCS-VR multimodal physiological data acquisition system, employing dual-frequency redundant communication and dynamic resampling technology, solves the problems of low clock synchronization accuracy and signal distortion, achieving sub-second-level capture of stimulus-response relationships and improving system stability, making it suitable for long-term monitoring of wearable devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies for tDCS-VR multimodal physiological data acquisition systems suffer from problems such as low clock synchronization accuracy, signal distortion introduced by traditional resampling, inability to capture sub-second stimulus-response relationships due to VR scene marking at the second level, and limitations in system robustness.
The tDCS-VR multimodal physiological data acquisition and time alignment system, comprising a device layer, a communication layer, and a processing layer, utilizes dual-frequency redundant communication via a BLE main link, a LoRa backup link, and a TTL pulse backup link. Combined with Kalman filtering and dynamic resampling techniques, and through timestamp fusion and real-time drift compensation algorithms, it achieves high signal-to-noise ratio and low latency data acquisition.
It achieves stable multimodal data acquisition in complex wireless environments, reduces transmission delay fluctuations, improves signal accuracy and system robustness, supports mixed wireless and wired data acquisition, and meets the microsecond-level synchronization requirements of clinical-grade ERP analysis.
Smart Images

Figure CN121750136A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of biomedical engineering, and in particular to a tDCS-VR multi-modal physiological data acquisition and time alignment system and method. BACKGROUND
[0002] In the field of neuromodulation, especially for the high-precision synchronous acquisition, processing and alignment of multi-modal physiological data of task-related transcranial direct current stimulation (tDCS) combined with virtual reality cognitive behavior therapy (VR-CBT), the following defects exist:
[0003] 1. Insufficient clock synchronization accuracy:
[0004] Under the BLE master-slave mode, the instruction transmission delay has an uncertainty of 10-100 ms (the measured standard deviation is about 43.7 ms);
[0005] The cumulative drift caused by the difference in the crystal oscillator of each device (the typical value is ±50ppm) can reach 8ms in 1 hour of continuous acquisition, which seriously affects the latency analysis of event-related potentials (ERPs) (such as the N200 peak positioning error of up to 12.5%).
[0006] 2. Multi-modal data alignment defects:
[0007] The sampling rates of EEG, heart rate, tDCS and VR scene markers are significantly different (1kHz, 1Hz, 10Hz and artificial second-level markers, respectively), and traditional resampling techniques are prone to introduce signal distortion (such as a 6.8dB reduction in signal-to-noise ratio);
[0008] The VR scene marker is a second-level label, which cannot capture the sub-second stimulus-response relationship (such as the SSVEP window width of visual evoked potential between 40-60ms).
[0009] 3. System robustness limitations:
[0010] Hardware synchronization (such as TTL pulses) requires special wiring and is difficult to adapt to wireless wearable devices;
[0011] The existing dynamic time warping (DTW) algorithm has high computational complexity (O(n²)), which is not suitable for real-time processing. SUMMARY
[0012] The present application aims to overcome the problems of low clock synchronization accuracy, traditional resampling prone to signal distortion and VR scene marker being a second-level label that cannot capture sub-second stimulus-response relationships in the prior art, and provides a tDCS-VR multi-modal physiological data acquisition and time alignment system and method.
[0013] Firstly, a tDCS-VR multimodal physiological data acquisition and time alignment system is provided, including:
[0014] The device layer is used for EEG signal acquisition, heart rate detection and tDCS stimulation. The device layer includes an EEG acquisition module, a heart rate monitoring module and a tDCS stimulation module.
[0015] The communication layer is used to realize wired or wireless communication between the device layer and the processing layer. The communication layer includes a BLE primary link, a LoRa backup link, and a TTL pulse backup link.
[0016] The processing layer is used to dynamically resample the EEG signal and tDCS stimulation parameters, use Kalman filtering to perform timestamp fusion on different clock domains in the device layer, align the time axis with the EEG signal by embedding invisible checkerboard markers in the VR scene, and compensate the sampling clock of the device layer through a real-time drift compensation algorithm.
[0017] The VR terminal is communicatively connected to the processing layer.
[0018] In some possible implementations, the timeline alignment includes:
[0019] An encrypted time synchronization packet is sent from the processing layer to the device layer. The encrypted time synchronization packet includes the current system time of the processing layer, the sampling rate parameter, and the expected synchronization accuracy threshold.
[0020] After receiving the time synchronization packet, the device layer generates a reference timestamp using a hardware clock and calculates the average latency through a three-way handshake.
[0021] Channel occupancy negotiation is performed using the BLE protocol CTS / RTS mechanism, where RTS and CTS are completed within 5ms.
[0022] The ADC sampling circuits of all devices in the device layer are triggered by a TTL pulse, wherein the rising edge of the TTL pulse is less than 1μs;
[0023] Determine if the number of packet losses exceeds 3;
[0024] If the judgment result is yes, then automatically switch to LoRa redundant transmission;
[0025] If the judgment result is negative, the EEG signal is downsampled, and the display time is corrected by cross-correlation analysis between the invisible checkerboard markers embedded in the VR scene and the C1 wave in the EEG signal, so as to achieve a time alignment error of ≤20ms.
[0026] In some possible implementations, the real-time drift compensation algorithm includes:
[0027] Construct a crystal oscillator deviation model;
[0028] The crystal oscillator deviation is estimated in real time using the aforementioned crystal oscillator deviation model;
[0029] Based on the sampling clock of the crystal oscillator deviation compensation device layer.
[0030] In some possible implementations, the calculation formula for the crystal oscillator deviation model is as follows:
[0031] Δt = α*T + β*sin(2πf*T) + ε
[0032] Where α is the linear drift factor, T is the ambient temperature, β reflects the temperature fluctuation effect, f is the frequency factor, and ε is random noise.
[0033] In some possible implementations, a 2ms communication window is allocated to the EEG acquisition module, heart rate monitoring module, and tDCS stimulation module, and key commands are confirmed through the BLE main link and LoRa backup link.
[0034] In some possible implementations, the dynamic resampling preserves the phase information of the γ band.
[0035] In some possible implementations, the LoRa backup link is activated only when the BLE primary link fails.
[0036] In some possible implementations, the sampling frequency of the EEG acquisition module is 0.5kHz-1.5kHz, the sampling frequency of the heart rate monitoring module is 0.5Hz-1.5Hz, and the frequency of the tDCS stimulation module is 9Hz-11Hz.
[0037] In some possible implementations, the sampling frequency of the EEG acquisition module is 1 kHz, the sampling frequency of the heart rate monitoring module is 1 Hz, and the frequency of the tDCS stimulation module is 10 Hz.
[0038] Secondly, a tDCS-VR multimodal physiological data acquisition and time alignment method is provided, including the system described in the first aspect, the method comprising:
[0039] Send an encrypted time synchronization packet containing a Unix timestamp to the device layer;
[0040] Receive the local clock value returned by the device layer and calculate the average network latency;
[0041] Multiple synchronization pulses are continuously sent to dynamically adjust the TDMA time slot allocation, so as to ensure that the time of each device in the device layer is consistent.
[0042] Synchronization is initiated via BLE commands, and timing information is sent. If the BLE command transmission fails, a TTL pulse isolated by an optical coupler is used as a backup trigger signal.
[0043] The EEG signal is resampled according to different frequency bands after undergoing wavelet packet transform;
[0044] Cross-correlation analysis was used to correct the temporal offset between VR scene markers and SSVEP components in EEG;
[0045] Timestamp fusion is performed using Kalman filtering, and clock drift of each device in the device layer is compensated online using RLS filters.
[0046] This application has the following beneficial effects:
[0047] 1. In the system of this application, dynamic resampling and Kalman filtering schemes are used to ensure that the data of each mode maintains a high signal-to-noise ratio and reduces signal distortion under the condition of sampling rate mismatch. By setting up BLE main link, LoRa backup link and TTL pulse backup link, dual-frequency redundant communication is achieved. With online drift compensation, the system can still maintain stable operation in complex wireless environments. It also supports wireless and wired mixed data acquisition, takes into account low power consumption and real-time requirements, and reduces the number of RF chains and low power consumption design to improve the competitiveness of commercial applications.
[0048] 2. The method of this application greatly reduces transmission delay fluctuations through multiple triggers and TDMA time slot allocation, enabling the system timing error to achieve microsecond-level compensation. It not only realizes dual-frequency redundant communication, but also ensures stable system operation in complex wireless environments with online drift compensation, and supports mixed wireless and wired data acquisition. Attached Figure Description
[0049] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.
[0050] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is an architecture diagram of the tDCS-VR multimodal physiological data acquisition and time alignment system of Embodiment 1 of this application;
[0052] Figure 2This is a flowchart of the time axis alignment process in the tDCS-VR multimodal physiological data acquisition and time alignment system of Embodiment 1 of this application;
[0053] Figure 3 This is a schematic diagram of the drift compensation algorithm in the tDCS-VR multimodal physiological data acquisition and time alignment system of Embodiment 1 of this application;
[0054] Figure 4(a) is a comparison diagram of instruction delay distribution in Embodiment 1 of this application;
[0055] Figure 4(b) is a comparison chart of the 24-hour drift trend in Embodiment 1 of this application;
[0056] Figure 4(c) is a comparison chart of ERP recognition accuracy in Embodiment 1 of this application;
[0057] Figure 4(d) is a comparison chart of power consumption in Embodiment 1 of this application;
[0058] Figure 5 This is a flowchart of the tDCS-VR multimodal physiological data acquisition and time alignment method of Embodiment 2 of this application.
[0059] Figure label:
[0060] 100. Equipment Layer; 101. EEG Acquisition Module; 102. Heart Rate Monitoring Module; 103. tDCS Stimulation Module; 200. Communication Layer; 201. BLE Main Link; 202. LoRa Backup Link; 203. TTL Pulse Backup Link; 300. Processing Layer; 400. VR Terminal. Detailed Implementation
[0061] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] Example 1
[0063] like Figure 1 As shown, the tDCS-VR multimodal physiological data acquisition and time alignment system involved in Embodiment 1 of this application includes a device layer 100, a communication layer 200, a processing layer 300, and a VR terminal 400. The device layer 100 achieves real-time wireless or wired communication with the processing layer 300 through the communication layer 200, and the processor achieves real-time communication with the VR terminal 400.
[0064] The device layer 100 includes an EEG acquisition module 101, a heart rate monitoring module 102, and a tDCS stimulation module 103. The EEG acquisition module 101 is used to acquire the user's EEG signal, the heart rate monitoring module 102 is used to detect the user's heart rate, and the tDCS stimulation module 103 is used to dynamically adjust stimulation parameters based on real-time EEG feedback and stimulate specific brain regions of the user through microcurrent. The sampling frequency of the EEG acquisition module 101 is 0.5kHz-1.5kHz, the sampling frequency of the heart rate monitoring module 102 is 0.5Hz-1.5Hz, and the frequency of the tDCS stimulation module 103 is 9Hz-11Hz.
[0065] In this embodiment, the sampling frequency of the EEG acquisition module 101 is 1kHz, the sampling frequency of the heart rate monitoring module 102 is 1Hz, and the frequency of the tDCS stimulation module 103 is 10Hz.
[0066] In another possible embodiment, the sampling frequency of the EEG acquisition module 101 is 0.5 kHz, the sampling frequency of the heart rate monitoring module 102 is 0.5 Hz, and the frequency of the tDCS stimulation module 103 is 9 Hz.
[0067] In another possible embodiment, the sampling frequency of the EEG acquisition module 101 is 1.5 kHz, the sampling frequency of the heart rate monitoring module 102 is 1.5 Hz, and the frequency of the tDCS stimulation module 103 is 11 Hz.
[0068] Communication layer 200 is used to implement wired or wireless communication between device layer 100 and processing layer 300. Communication layer 200 includes BLE primary link 201, LoRa backup link 202 and TTL pulse backup link 203. LoRa backup link 202 is activated only when BLE primary link 201 fails, and adopts a three-level fault-tolerant triggering mechanism.
[0069] Main trigger: BLE command issuance (CTS / RTS handshake, accuracy controlled within ±5ms);
[0070] Backup trigger: Optocoupler isolated TTL pulse (rising edge <1μs);
[0071] Auxiliary trigger: The VSync signal serves as the basis for time confirmation.
[0072] In this embodiment, a 2ms communication window is allocated to the EEG acquisition module 101, the heart rate monitoring module 102, and the tDCS stimulation module 103 respectively. Key commands are confirmed through the BLE main link 201 and the LoRa backup link 202. TDMA time slot allocation is used to ensure that each device in the device layer 100 has a dedicated 2ms communication window, thereby avoiding data conflicts and reducing command delay fluctuations.
[0073] The processing layer 300 comprises three parts: dynamic sampling and resampling, timestamp fusion, and real-time drift compensation. It uses a 32-bit microcontroller (MCU) chip, model STM32U585AI, supporting the IEEE 802.1AS time-sensitive networking protocol. The STM32U585AI acts as the master, while the EEG acquisition module 101, heart rate monitoring module 102, and tDCS stimulation module 103 in the device layer 100 are slaves. Specifically:
[0074] Dynamic resampling: EEG signals are processed by frequency band division through wavelet packet transform: the 8–30Hz components are kept at a sampling rate of 1kHz, dynamic resampling preserves the phase information of the γ band, and the γ band (>30Hz) is downsampled to 250Hz; the tDCS stimulation parameters are resampled to the target frequency (100Hz) using linear interpolation.
[0075] Timestamp fusion: Timestamps are fused across three clock domains using Kalman filtering; time axis alignment is performed by cross-correlation analysis between invisible checkerboard markers embedded in the VR scene (10ms flash) and C1 waves in EEG (latency 40–60ms), achieving a time alignment error ≤20ms.
[0076] like Figure 2 As shown, timeline alignment includes the following steps:
[0077] S1, Pre-synchronization Phase:
[0078] The processing layer 300 sends an encrypted time synchronization packet to the device layer 100 through an encrypted channel. The packet is encrypted using the AES-128 algorithm to prevent tampering. The encrypted time synchronization packet includes the current system time of the processing layer 300, the sampling rate parameter, and the expected synchronization accuracy threshold.
[0079] After receiving the time synchronization packet, device layer 100 generates a reference timestamp using a hardware clock and calculates the average delay Δt_avg through a three-way handshake.
[0080] Triggering phase:
[0081] Wireless communication: Channel occupancy negotiation is performed using the BLE protocol CTS / RTS mechanism; completed within 5ms (≤5ms).
[0082] RTS (Request to Send): The host initiates a request to acquire the device;
[0083] CTS (Clear to Send): The slave device returns the channel ready status.
[0084] Wired communication: The ADC sampling circuit of all devices is triggered by a TTL pulse (rising edge <1μs).
[0085] Using TDMA time slot allocation ensures that each device has a dedicated 2ms communication window, avoiding data conflicts and reducing command latency fluctuations.
[0086] Fault tolerance phase:
[0087] If the number of packet losses exceeds three, LoRa redundant transmission is performed; otherwise, data alignment is performed. The EEG signal is processed by frequency band division using wavelet packet transform: the 8–30Hz component is sampled at 1kHz, the γ band (>30Hz) is downsampled to 250Hz, and the tDCS stimulation parameters are resampled to the target frequency (100Hz) using linear interpolation. The timestamps are fused across three clock domains using Kalman filtering. The display time is corrected by cross-correlation analysis between the invisible checkerboard markers embedded in the VR scene (flashing for 10ms) and the C1 wave in the EEG (latency 40–60ms), achieving a time alignment error ≤20ms.
[0088] like Figure 3 As shown, taking the RLS filter update process as an example, the parameter update, signal compensation, and model prediction processes are illustrated. The drift compensation algorithm includes:
[0089] Constructing a crystal oscillator deviation model:
[0090]
[0091] Where α represents the linear drift factor, β reflects the temperature fluctuation effect, T is the ambient temperature, f is the frequency factor, and ε is the random noise.
[0092] The RLS adaptive filter is used for online parameter estimation, achieving a compensation accuracy of 1 μs / min. A pseudocode example is shown below:
[0093] 1. Initialization: θ = [θ0, θ1], P = initial covariance matrix, λ is the decay factor.
[0094] 2. For each data collection:
[0095] 3. Calculate the gain
[0096] 4. Update parameters
[0097] 5. Update the P matrix
[0098] 6. The slave sampling clock is compensated according to the prediction model Δt = θ[0]*T + θ[1]*sin(2πf·T).
[0099] Figures 4(a), 4(b), 4(c), and 4(d) show the experimental data comparison, illustrating the system synchronization delay, drift, ERP recognition accuracy, and power consumption before and after the improvement.
[0100] As can be seen from the data comparison in 4(a), this embodiment allocates an independent 2ms communication window to each device through TDMA time slot allocation, avoiding random delays caused by data conflicts, reducing the standard deviation of delay from 43.7ms to 2.1ms (a reduction of 95.2%), and compressing the Q3-Q1 interval from 26ms in the traditional method to 0.5ms in this embodiment; dual-band redundant transmission, with key commands confirmed through BLE+LoRa dual channels, reduces the packet loss rate from 15% to 0.3%.
[0101] As can be seen from the data comparison in 4(b), this embodiment uses the RLS dynamic compensation algorithm to estimate the crystal oscillator deviation in real time through the model Δt=αT+βsin(2πfT), and the compensation residual is ≤1μs / min. Temperature fluctuation is suppressed: the β parameter captures the temperature sensitivity of the crystal oscillator (such as data fusion from the built-in temperature sensor of STM32U585AI), which reduces the 24-hour cumulative drift from 326ms to 8ms (an improvement of 97.5%), and optimizes the linear drift slope from 13.6μs / s to 0.33μs / s.
[0102] As can be seen from the data comparison in 4(c), this embodiment eliminates display delay errors through multimodal tag fusion: cross-correlation analysis of VR invisible checkerboard markers (10ms accuracy) and EEG C1 wave; dynamic resampling preserves γ band phase information (signal-to-noise ratio improved by 4.3dB); Kalman timestamp fusion: cross-device clock domain alignment accuracy reaches 20μs (background technology [3.1] compared to 100ms of traditional methods). This improves the N200 component recognition rate from 67.3% to 92.1% and the P300 component recognition rate from 61.5% to 89.7%.
[0103] The comparison of data in 4(d) shows that this embodiment achieves significant improvements through hardware architecture optimization: the STM32U585AI chip's Run mode power consumption is only 89μA / MHz (compared to 200μA / MHz in the traditional solution); the LoRa backup link 202 is only activated in the event of a BLE failure, reducing the power consumption of constantly transmitting beacons. Furthermore, the algorithm is lightweighted: the RLS filter complexity is reduced from O(n²) to O(n), reducing the MCU load by 62%. Peak power consumption is reduced from 5.8 mA to 3.2 mA (a reduction of 44.8%), and idle power consumption is reduced by 57%.
[0104] The system in this embodiment achieves the following through a hybrid synchronization architecture (hardware triggering + software compensation) and cross-layer optimization (physical layer power consumption control → algorithm layer accuracy improvement):
[0105] 1. Breakthrough in timing accuracy: Meets the requirements of clinical-grade ERP analysis for μs-level synchronization (such as precise positioning of the N200 wave within a 40-60ms time window);
[0106] 2. Enhanced system robustness: Dual redundant communication and online drift compensation ensure the equipment remains stable even in complex electromagnetic environments;
[0107] 3. Expanded clinical applicability: The low-power design supports long-term monitoring by wearable devices, and dynamic resampling ensures the availability of multimodal data.
[0108] Example 2
[0109] like Figure 5 As shown, Embodiment 2 of this application relates to a tDCS-VR multimodal physiological data acquisition and time alignment method, which includes the system described in any embodiment of Embodiment 1, and the method includes:
[0110] Pre-synchronization phase:
[0111] S100 and processing layer 300 send encrypted time synchronization packets containing Unix timestamps to device layer 100.
[0112] S200: Receive the local clock value returned by the slave device and calculate the average network delay Δt_avg.
[0113] S300 continuously sends multiple synchronization pulses to dynamically adjust the TDMA time slot allocation, ensuring that the time of each device is consistent.
[0114] Triggering phase:
[0115] S400, Master Trigger: Initiates synchronization and sends timing information via BLE command (CTS / RTS handshake);
[0116] Backup trigger: If BLE transmission fails, an optocoupler-isolated TTL pulse is used as a backup trigger signal.
[0117] Data Acquisition and Post-processing:
[0118] The EEG acquisition module 101, heart rate monitoring module 102 and tDCS stimulation module 103 of the device layer 100 respectively acquire EEG signals, heart rate, tDCS parameters and VR scene marker signals;
[0119] S500 and EEG signals are resampled according to different frequency bands after wavelet packet transformation;
[0120] S600, using cross-correlation analysis to correct the temporal offset between VR scene markers and SSVEP components in EEG;
[0121] The S700 and timestamp are fused using Kalman filtering, and the clock drift of each module is compensated online using an RLS filter.
[0122] Specifically, dynamic resampling: based on the original sampling rate and target frequency of each signal (e.g., downsampling the γ band from 1kHz to 250Hz for EEG), linear interpolation or a dedicated resampling algorithm is used, ensuring that no noise or signal distortion is introduced during the interpolation process.
[0123] RLS drift compensation: The pseudocode for the detailed implementation is as follows:
[0124] 1. Initialization: θ = [θ0, θ1], P = initial covariance matrix, λ is the decay factor.
[0125] 2. For each data collection:
[0126] 3. Calculate the gain
[0127] 4. Update parameters
[0128] 5. Update the P matrix
[0129] 6. Based on the prediction model Compensate the slave sampling clock.
[0130] By combining STM32 series MCUs for real-time computation, low complexity (complexity reduced to O(n)) is ensured to meet real-time processing requirements.
[0131] Interface protocols and data formats: Define the formats and interface specifications for different data streams (BLE commands, TTL pulses, timestamp data) to ensure consistent and efficient data transmission between modules.
[0132] Experimental verification:
[0133] Testing platform: Standard clinical environment equipment and self-made data acquisition platform are used to ensure that experimental conditions such as equipment temperature, humidity and interference are recorded;
[0134] Experimental data: As shown in Figures 4(a), 4(b), 4(c), and 4(d), the measured standard deviation of BLE instruction latency decreased from 43.7ms to 2.1ms; the 24-hour system drift decreased from 326ms to 8ms; the ERP recognition accuracy improved by 36.8% (from 67.3% to 92.1%); and the system power consumption decreased by 44.8% (from 5.8 mA to 3.2 mA).
[0135] In this embodiment, by employing multiple triggering and TDMA time slot allocation, transmission delay fluctuations are significantly reduced, enabling microsecond-level compensation for system timing errors. Dynamic resampling and Kalman filtering schemes ensure high signal-to-noise ratios for each modality even with sampling rate mismatches, while reducing signal distortion. Dual-frequency redundant communication and online drift compensation guarantee stable system operation even in complex wireless environments. It is compatible with existing medical device communication standards, facilitating applications in closed-loop neural modulation and clinical ERP analysis. Reducing the number of RF chains and employing low-power design enhances its competitiveness in commercial applications.
[0136] It should be noted that other specific implementations of the tDCS-VR multimodal physiological data acquisition and time alignment method in this embodiment can be found in the specific implementation of the tDCS-VR multimodal physiological data acquisition and time alignment system described above. To avoid redundancy, they will not be repeated here.
[0137] The above are merely preferred embodiments of this application; however, the scope of protection of this application is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in this application, based on the technical solution and its improved concept, should be covered within the scope of protection of this application.
Claims
1. A tDCS-VR multimodal physiological data acquisition and time alignment system, characterized in that, include: The device layer is used for EEG signal acquisition, heart rate detection and tDCS stimulation. The device layer includes an EEG acquisition module, a heart rate monitoring module and a tDCS stimulation module. The communication layer is used to realize wired or wireless communication between the device layer and the processing layer. The communication layer includes a BLE primary link, a LoRa backup link, and a TTL pulse backup link. The processing layer is used to dynamically resample the EEG signal and tDCS stimulation parameters, use Kalman filtering to perform timestamp fusion on different clock domains in the device layer, align the time axis with the EEG signal by embedding invisible checkerboard markers in the VR scene, and compensate the sampling clock of the device layer through a real-time drift compensation algorithm. The VR terminal is communicatively connected to the processing layer.
2. The tDCS-VR multimodal physiological data acquisition and time alignment system according to claim 1, characterized in that, The timeline alignment includes: An encrypted time synchronization packet is sent from the processing layer to the device layer. The encrypted time synchronization packet includes the current system time of the processing layer, the sampling rate parameter, and the expected synchronization accuracy threshold. After receiving the time synchronization packet, the device layer generates a reference timestamp using a hardware clock and calculates the average latency through a three-way handshake. Channel occupancy negotiation is performed using the BLE protocol CTS / RTS mechanism, where RTS and CTS are completed within 5ms. The ADC sampling circuits of all devices in the device layer are triggered by a TTL pulse, wherein the rising edge of the TTL pulse is less than 1μs; Determine if the number of packet losses exceeds 3; If the judgment result is yes, then automatically switch to LoRa redundant transmission; If the judgment result is negative, the EEG signal is downsampled, and the display time is corrected by cross-correlation analysis between the invisible checkerboard markers embedded in the VR scene and the C1 wave in the EEG signal, so as to achieve a time alignment error of ≤20ms.
3. The tDCS-VR multimodal physiological data acquisition and time alignment system according to claim 1, characterized in that, The real-time drift compensation algorithm includes: Construct a crystal oscillator deviation model; The crystal oscillator deviation is estimated in real time using the aforementioned crystal oscillator deviation model; Based on the sampling clock of the crystal oscillator deviation compensation device layer.
4. The tDCS-VR multimodal physiological data acquisition and time alignment system according to claim 3, characterized in that, The calculation formula for the crystal oscillator deviation model is as follows: Δt = α*T + β*sin(2πf*T) + ε Where α is the linear drift factor, T is the ambient temperature, β reflects the temperature fluctuation effect, f is the frequency factor, and ε is random noise.
5. The tDCS-VR multimodal physiological data acquisition and time alignment system according to claim 1, characterized in that, A 2ms communication window is allocated to each of the EEG acquisition module, heart rate monitoring module, and tDCS stimulation module. Key commands are confirmed through the BLE main link and the LoRa backup link.
6. The tDCS-VR multimodal physiological data acquisition and time alignment system according to claim 1, characterized in that, The dynamic resampling retains the phase information of the γ band.
7. The tDCS-VR multimodal physiological data acquisition and time alignment system according to claim 1, characterized in that, The LoRa backup link is activated only when the BLE primary link fails.
8. The tDCS-VR multimodal physiological data acquisition and time alignment system according to claim 1, characterized in that, The sampling frequency of the EEG acquisition module is 0.5kHz-1.5kHz, the sampling frequency of the heart rate monitoring module is 0.5Hz-1.5Hz, and the frequency of the tDCS stimulation module is 9Hz-11Hz.
9. The tDCS-VR multimodal physiological data acquisition and time alignment system according to claim 1, characterized in that, The sampling frequency of the EEG acquisition module is 1 kHz, the sampling frequency of the heart rate monitoring module is 1 Hz, and the frequency of the tDCS stimulation module is 10 Hz.
10. A method for acquiring and aligning time-dependent multimodal physiological data using tDCS-VR, characterized in that, The system comprising any one of claims 1-9, wherein the method comprises: Send an encrypted time synchronization packet containing a Unix timestamp to the device layer; Receive the local clock value returned by the device layer and calculate the average network latency; Multiple synchronization pulses are continuously sent to dynamically adjust the TDMA time slot allocation, so as to ensure that the time of each device in the device layer is consistent. Synchronization is initiated via BLE commands, and timing information is sent. If the BLE command transmission fails, a TTL pulse isolated by an optical coupler is used as a backup trigger signal. The EEG signal is resampled according to different frequency bands after undergoing wavelet packet transform; Cross-correlation analysis was used to correct the temporal offset between VR scene markers and SSVEP components in EEG; Timestamp fusion is performed using Kalman filtering, and clock drift of each device in the device layer is compensated online using RLS filters.