Pulse stimulation real-time control system and method based on electromyographic signals and accelerometer signals

Through a real-time pulse stimulation control system based on electromyography and accelerometer signals, idiopathic tremors can be judged and alleviated in real time, and the interference problem of existing treatment methods to patients' daily life is solved, achieving efficient tremor treatment in daily life.

CN119587880APending Publication Date: 2025-03-11SHANGHAI MISTAR MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411412632.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing treatment methods for idiopathic tremor require patients to receive treatment in specific environments and places, interrupting the patient's daily life behavior and causing inconvenience in life.

Method used

The pulse stimulation real-time control system based on electromyography signals and accelerometer signals is adopted to collect data in real time through the accelerometer and electromyography collector, and data processing is performed using the signal input module and control system to judge tremor in real time and calculate the tremor frequency, output the pulse stimulation frequency to the pulse stimulator, and stimulate the peripheral nerves.

Benefits of technology

Real-time judgment and reduction of idiopathic tremors in patients' daily life are achieved, time and place limitations for treatment are avoided, and convenience of patients are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119587880A_ABST
    Figure CN119587880A_ABST
Patent Text Reader

Abstract

The invention provides a pulse stimulation real-time control system and method based on electromyographic signals and accelerometer signals, and belongs to the field of signal transmission and control systems. The pulse stimulation real-time control system based on the electromyographic signal and the accelerometer signal comprises an accelerometer, an electromyographic collector, a signal input module, a control system, a control signal output module and a pulse stimulator. When a patient has an idiopathic tremor disease symptom in daily life, tremor judgment is made in real time and tremor related parameters are calculated by combining an electromyographic signal and an accelerometer signal or independently using one of the electromyographic signal and the accelerometer signal, the tremor related parameters are sent to a pulse stimulator, and the pulse stimulator stimulates peripheral nerves of the patient in real time according to the parameters, so that tremor treatment is completed. The influence of idiopathic tremor on the life of a patient is relieved, and specific treatment time and specific treatment places do not need to be limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal transmission and control systems, and in particular to a pulse stimulation real-time control system and method based on electromyographic signals and accelerometer signals. Background Art

[0002] Essential tremor is one of the most common movement disorders, characterized by involuntary tremors in the patient's limbs when performing specific movements. Mild tremors can be tolerated by patients, but severe tremors can seriously affect the patient's daily life behavior.

[0003] The commonly used treatment for essential tremor is transcutaneous pulse nerve stimulation, but the current treatment method generally requires patients to receive treatment for a period of time in a specific environment and place when the disease occurs. This treatment will interrupt the patient's current daily life and cause inconvenience to the patient's life. Summary of the invention

[0004] In order to overcome the above technical defects, the first aspect of the present invention provides a real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals, which comprises:

[0005] An accelerometer, used to collect the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency;

[0006] The electromyographic collector is used to collect the electromyographic signal data of the patient in real time at a certain sampling frequency;

[0007] The signal input module is used to receive the X, Y, and Z three-channel data of the accelerometer transmitted by the accelerometer and the electromyographic signal data transmitted by the electromyographic collector, and further transmit them to the control system;

[0008] A control system is used to receive data transmitted by the signal input module, use the accelerometer signal mode and / or the electromyography signal mode to process the data, make a tremor judgment in real time and calculate the tremor frequency, and use the tremor frequency as the pulse stimulation frequency;

[0009] A control signal output module, used for outputting the pulse stimulation frequency to the pulse stimulator;

[0010] The pulse stimulator is used to receive the pulse stimulation frequency transmitted by the control signal output module, and send stimulation pulses to the peripheral nerves according to the pulse stimulation frequency.

[0011] For example, the accelerometer can be used in the form of a wearable wristband

[0012] Furthermore, when the control system uses the accelerometer signal mode alone, the pulse stimulation real-time control method includes the following steps:

[0013] Step S1: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency;

[0014] Step S2: performing the following data processing on the X, Y, and Z three-channel data respectively: firstly obtain a plurality of first data through a high-pass filter; then obtain a plurality of corresponding second data through a band-pass filter; calculate the square sum of all data in the plurality of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the plurality of second data, the result of which is the square sum value of the second data;

[0015] Step S3: comparing the values ​​of the second data square sums of the three channels, and taking the channel corresponding to the maximum value as the tremor channel;

[0016] Step S4: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data;

[0017] Step S5: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps S2 to S6 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; when it is determined to be tremor, determine whether the value of the flag bit Flag is equal to 1, and perform the following processing respectively:

[0018] When the flag bit Flag = 0, the following processing is performed:

[0019] S6.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0020] S6.1.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data;

[0021] S6.1.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate the ratio of the power within the window to the power of the first frequency domain data, TremorRatio, each time;

[0022] S6.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window;

[0023] S6.1.5: Determine whether the number of cyclic processing times of steps S6.1.1-S6.1.4 is equal to a specific threshold: If the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; If the number of processing times is equal to the specific threshold, the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and with F_Ave as the center and the specific sliding window length as the range, the corresponding frequency point range [F low , F up ]; Flag is set to 1;

[0024] When the flag bit Flag = 1, the following processing is performed:

[0025] S6.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0026] S6.2.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data;

[0027] S6.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time;

[0028] S6.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window;

[0029] S6.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0030] S6.2.6: The pulse stimulator delivers stimulation pulses at a frequency F to the peripheral nerve.

[0031] Furthermore, when the control system uses the electromyographic signal mode alone, the pulse stimulation real-time control method includes the following steps:

[0032] Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency;

[0033] Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken;

[0034] Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data;

[0035] Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data;

[0036] Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data;

[0037] Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a square sum value of the first data, and add the square values ​​of all the data in the plurality of third data to obtain a square sum value of the third data;

[0038] Step 7: Calculate the ratio of the first data square sum value to the third data square sum value;

[0039] Step 8: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps 2 to 7 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor;

[0040] Step 9: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively:

[0041] When the flag bit Flag = 0, the following processing is performed:

[0042] Step 9.1.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data;

[0043] Step 9.1.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power;

[0044] Step 9.1.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data;

[0045] Step 9.1.4: Select the maximum ratio TremorRatio, and take the frequency corresponding to the maximum spectrum line in the calculation window as the tremor frequency F;

[0046] Step 9.1.5: Determine whether the number of cyclic processing times of step 9.1.1 to step 9.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerve at a frequency F; if the number of processing times is equal to the specific threshold, calculate the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data TremorRatio and multiply it by the proportional coefficient to obtain the result Ratio_Ave, calculate the average value F_Ave of F of the specific threshold number of times; and take F_Ave as the center and the specific sliding window length as the range, and record the corresponding frequency point range [F low , F up ]; Flag is set to 1;

[0047] When the flag bit Flag = 1, the following processing is performed:

[0048] Step 9.2.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data;

[0049] Step 9.2.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power;

[0050] Step 9.2.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data;

[0051] Step 9.2.4: Select the maximum ratio TremorRatio and save the frequency F corresponding to the maximum spectral line in the window;

[0052] Step 9.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0053] Step 9.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerves.

[0054] Furthermore, when the control system uses the accelerometer signal mode and the electromyography signal mode at the same time, the accelerometer enters a sleep state, the electromyography collector collects signals in real time and determines whether it is a tremor. When a tremor is detected, the accelerometer is awakened. At this time, the accelerometer starts to collect signals for a second determination as to whether it is a tremor. If it is a tremor, the tremor frequency is calculated and the tremor frequency is used as the pulse stimulation frequency. The pulse stimulator starts to send stimulation pulses to the peripheral nerves at the pulse stimulation frequency.

[0055] Furthermore, when the control system uses the accelerometer signal mode and the electromyographic signal mode at the same time, the pulse stimulation real-time control method includes the following steps:

[0056] Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency;

[0057] Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken;

[0058] Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data;

[0059] Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data;

[0060] Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data;

[0061] Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a square sum value of the first data, and add the square values ​​of all the data in the plurality of third data to obtain a square sum value of the third data;

[0062] Step 7: Calculate the ratio of the first data square sum value to the third data square sum value;

[0063] Step 8: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps 2 to 7 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor;

[0064] Step 9: When it is determined to be a tremor, wake up the accelerometer;

[0065] Step 10: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency;

[0066] Step 11: Perform the following data processing on the X, Y, and Z three-channel data respectively: first obtain a number of first data through a high-pass filter; then obtain a number of corresponding second data through a band-pass filter; calculate the square sum of all data in the number of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the number of second data, the result of which is the square sum value of the second data;

[0067] Step 12: Compare the values ​​of the second data square sums of the three channels, and take the channel corresponding to the maximum value as the tremor channel;

[0068] Step 13: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data;

[0069] Step 14: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps S2 to 15 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor;

[0070] Step 16: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively:

[0071] When the flag bit Flag = 0, the following processing is performed:

[0072] Step 16.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0073] Step 16.1.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power;

[0074] Step 16.1.3: Use a sliding window within the spectral range of the second frequency domain data power representing a specific frequency, and calculate each time the ratio of the power within the window to the power of the first frequency domain data, TremorRatio;

[0075] Step 16.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectrum line in the window;

[0076] Step 16.1.5: Determine whether the number of cyclic processing times of step 16.1.1-step 16.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerve at a frequency F; if the number of processing times is equal to the specific threshold, calculate the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data and then multiply the proportional coefficient to obtain the result Ratio_Ave, calculate the average value F_Ave of F of the specific threshold number of times; and record the corresponding frequency point range [F_Ave] with F_Ave as the center and the specific sliding window length as the range. low , F up ]; Flag is set to 1;

[0077] When the flag bit Flag = 1, the following processing is performed:

[0078] Step 16.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0079] Step 16.2.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power;

[0080] Step 16.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time;

[0081] Step 16.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectrum line in the window;

[0082] Step 16.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0083] Step 16.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerve.

[0084] The second aspect of the present application provides a real-time control method for pulse stimulation based on electromyographic signals and accelerometer signals, which includes: using accelerometer signal patterns and / or electromyographic signal patterns to make real-time tremor judgments and calculate tremor frequencies, and using the tremor frequency as the pulse stimulation frequency to send pulse stimulation in real time.

[0085] Furthermore, when the accelerometer signal mode is used alone, the pulse stimulation real-time control method includes the following steps:

[0086] Step S1: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency;

[0087] Step S2: performing the following data processing on the X, Y, and Z three-channel data respectively: firstly obtain a plurality of first data through a high-pass filter; then obtain a plurality of corresponding second data through a band-pass filter; calculate the square sum of all data in the plurality of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the plurality of second data, the result of which is the square sum value of the second data;

[0088] Step S3: comparing the values ​​of the second data square sums of the three channels, and taking the channel corresponding to the maximum value as the tremor channel;

[0089] Step S4: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data;

[0090] Step S5: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps S2 to S6 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; when it is determined to be tremor, determine whether the value of the flag bit Flag is equal to 1, and perform the following processing respectively:

[0091] When the flag bit Flag = 0, the following processing is performed:

[0092] S6.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0093] S6.1.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data;

[0094] S6.1.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate the ratio of the power within the window to the power of the first frequency domain data, TremorRatio, each time;

[0095] S6.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window;

[0096] S6.1.5: Determine whether the number of cyclic processing times of steps S6.1.1-S6.1.4 is equal to a specific threshold: If the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; If the number of processing times is equal to the specific threshold, the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and with F_Ave as the center and the specific sliding window length as the range, the corresponding frequency point range [F low , F up ]; Flag is set to 1;

[0097] When the flag bit Flag = 1, the following processing is performed:

[0098] S6.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0099] S6.2.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data;

[0100] S6.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time;

[0101] S6.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window;

[0102] S6.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0103] S6.2.6: The pulse stimulator delivers stimulation pulses at a frequency F to the peripheral nerve.

[0104] Furthermore, when the electromyographic signal mode is used alone, the pulse stimulation real-time control method includes the following steps:

[0105] Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency;

[0106] Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken;

[0107] Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data;

[0108] Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data;

[0109] Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data;

[0110] Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a square sum value of the first data, and add the square values ​​of all the data in the plurality of third data to obtain a square sum value of the third data;

[0111] Step 7: Calculate the ratio of the first data square sum value to the third data square sum value;

[0112] Step 8: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps 2 to 7 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor;

[0113] Step 9: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively:

[0114] When the flag bit Flag = 0, the following processing is performed:

[0115] Step 9.1.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data;

[0116] Step 9.1.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power;

[0117] Step 9.1.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data;

[0118] Step 9.1.4: Select the maximum ratio TremorRatio, and take the frequency corresponding to the maximum spectrum line in the calculation window as the tremor frequency F;

[0119] Step 9.1.5: Determine whether the number of cyclic processing times of step 9.1.1 to step 9.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerve at a frequency F; if the number of processing times is equal to the specific threshold, calculate the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data TremorRatio and multiply it by the proportional coefficient to obtain the result Ratio_Ave, calculate the average value F_Ave of F of the specific threshold number of times; and take F_Ave as the center and the specific sliding window length as the range, and record the corresponding frequency point range [F low , F up ]; Flag is set to 1;

[0120] When the flag bit Flag = 1, the following processing is performed:

[0121] Step 9.2.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data;

[0122] Step 9.2.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power;

[0123] Step 9.2.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data;

[0124] Step 9.2.4: Select the maximum ratio TremorRatio and save the frequency F corresponding to the maximum spectral line in the window;

[0125] Step 9.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0126] Step 9.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerves.

[0127] Furthermore, when the accelerometer signal mode and the electromyography signal mode are used at the same time, the accelerometer enters a sleep state, and the electromyography collector collects signals in real time and determines whether it is a tremor. When a tremor is detected, the accelerometer is awakened. At this time, the accelerometer starts to collect signals for a second determination as to whether it is a tremor. If it is a tremor, the tremor frequency is calculated, and the pulse stimulator starts to send stimulation pulses to the peripheral nerves at the same frequency as the tremor frequency.

[0128] Furthermore, when the accelerometer signal mode and the electromyographic signal mode are used simultaneously, the pulse stimulation real-time control method includes the following steps:

[0129] Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency;

[0130] Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken;

[0131] Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data;

[0132] Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data;

[0133] Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data;

[0134] Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a square sum value of the first data, and add the square values ​​of all the data in the plurality of third data to obtain a square sum value of the third data;

[0135] Step 7: Calculate the ratio of the first data square sum value to the third data square sum value;

[0136] Step 8: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps 2 to 7 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor;

[0137] Step 9: When it is determined to be a tremor, wake up the accelerometer;

[0138] Step 10: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency;

[0139] Step 11: Perform the following data processing on the X, Y, and Z three-channel data respectively: first obtain a number of first data through a high-pass filter; then obtain a number of corresponding second data through a band-pass filter; calculate the square sum of all data in the number of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the number of second data, the result of which is the square sum value of the second data;

[0140] Step 12: Compare the values ​​of the second data square sums of the three channels, and take the channel corresponding to the maximum value as the tremor channel;

[0141] Step 13: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data;

[0142] Step 14: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps S2 to 15 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor;

[0143] Step 16: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively:

[0144] When the flag bit Flag = 0, the following processing is performed:

[0145] Step 16.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0146] Step 16.1.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power;

[0147] Step 16.1.3: Use a sliding window within the spectral range of the second frequency domain data power representing a specific frequency, and calculate each time the ratio of the power within the window to the power of the first frequency domain data, TremorRatio;

[0148] Step 16.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectrum line in the window;

[0149] Step 16.1.5: Determine whether the number of cyclic processing times of step 16.1.1-step 16.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerve at a frequency F; if the number of processing times is equal to the specific threshold, calculate the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data and then multiply the proportional coefficient to obtain the result Ratio_Ave, calculate the average value F_Ave of F of the specific threshold number of times; and record the corresponding frequency point range [F_Ave] with F_Ave as the center and the specific sliding window length as the range. low , Fup ]; Flag is set to 1;

[0150] When the flag bit Flag = 1, the following processing is performed:

[0151] Step 16.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0152] Step 16.2.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power;

[0153] Step 16.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time;

[0154] Step 16.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectrum line in the window;

[0155] Step 16.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0156] Step 16.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerve.

[0157] Compared with the prior art, the above technical solution has the following beneficial effects:

[0158] The present invention provides a real-time control system and method for pulse stimulation based on electromyographic signals and accelerometer signals. When a patient has symptoms of essential tremor in daily life, by combining electromyographic signals and accelerometer signals or using one of the two alone, a tremor judgment can be made in real time and tremor-related parameters can be calculated and sent to a pulse stimulator. The pulse stimulator stimulates the patient's radial nerve and / or median nerve and other peripheral nerves according to the parameters to reduce the impact of essential tremor on the patient's life. The technical solution of the present application is a real-time treatment method for adaptively treating essential tremor. It does not need to limit specific treatment time and specific treatment location. It only requires patients to use wearable devices (such as pulse stimulators, electromyographic collectors, and wearable bracelets with accelerometers) in daily life to achieve real-time treatment of essential tremor anytime and anywhere. BRIEF DESCRIPTION OF THE DRAWINGS

[0159] Figure 1 The principle flow chart of the real-time control method of pulse stimulation when the accelerometer signal mode is used alone;

[0160] Figure 2This is an example of accelerometer signal acquisition;

[0161] Figure 3 This is the result of judging the tremor frequency when the accelerometer signal mode is used alone;

[0162] Figure 4 The principle flow chart of the pulse stimulation real-time control method when the electromyographic signal mode is used alone;

[0163] Figure 5 This is an example of electromyographic signal acquisition;

[0164] Figure 6 This is the result of judging the tremor frequency when the electromyographic signal mode is used alone;

[0165] Figure 7 The principle flow chart of the real-time control method of pulse stimulation when the accelerometer signal mode and the electromyography signal mode are used in combination;

[0166] Figure 8 The tremor frequency determination result when the accelerometer signal mode and the electromyography signal mode are used together;

[0167] Fig. 9 This is the module structure diagram of the pulse stimulation real-time control system based on electromyographic signals and accelerometer signals. DETAILED DESCRIPTION

[0168] The advantages of the present invention are further described below in conjunction with the accompanying drawings and specific embodiments. Those skilled in the art should understand that the following specific description is illustrative rather than restrictive, and should not be used to limit the scope of protection of the present invention.

[0169] Example 1

[0170] This embodiment provides a real-time control method for pulse stimulation based on electromyographic signals and accelerometer signals. The method uses the accelerometer signal mode and / or electromyographic signal mode to make a real-time tremor judgment and calculate the tremor frequency, and sends pulse stimulation in real time using the tremor frequency as the pulse stimulation frequency. The real-time control method for pulse stimulation has three modes:

[0171] (1) Using the accelerometer signal alone, the tremor determination results and stimulation parameters were calculated;

[0172] (2) Using the electromyographic signal alone, the tremor determination result and stimulation parameters are calculated;

[0173] (3) Using the accelerometer signal and the electromyographic signal simultaneously, the tremor judgment result and stimulation parameters are obtained by calculating the combined data of the two.

[0174] 1. Use accelerometer signal mode alone

[0175] like Figure 1 As shown, when the accelerometer signal mode is used alone, the pulse stimulation real-time control method includes the following steps S1-S6:

[0176] Step S1: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency;

[0177] For example, Figure 2 As shown, patient data is collected in real time at a certain sampling frequency Fs. The data is three channels DataX, DataY, and DataZ. The sampling frequency includes but is not limited to 50, 100, 150, 200, 250, 300, 350, and 400. Here, the typical value Fs = 100. Each time a certain amount of data is collected, it is processed once, and the amount of data processed each time is 2 n The number of sampling points includes but is not limited to 128, 256, 512, 1024, and 2048. The typical value here is that every 256 data points are collected and processed.

[0178] Step S2: performing the following data processing on the X, Y, and Z three-channel data respectively: firstly obtain a plurality of first data through a high-pass filter; then obtain a plurality of corresponding second data through a band-pass filter; calculate the square sum of all data in the plurality of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the plurality of second data, the result of which is the square sum value of the second data;

[0179] Here, the data processing takes the X channel as an example, and the other two channels are processed in the same way. DataX is passed through a high-pass filter with a cutoff frequency of 1 Hz to obtain data DataX_HP, wherein the filter can be an IIR or FIR filter.

[0180] Then let DataX_HP pass through a bandpass filter with a cutoff frequency of 4Hz-12Hz to obtain data DataX_BP.

[0181] Then calculate the square value of the data of DataX_HP and DataX_BP respectively.

[0182] Further, the square values ​​are added to calculate the square sum of DataX_HP and DataX_BP, and the results are SquareSumX_HP and SquareSumX_BP, respectively. For example, DataX_HP and DataX_BP each contain 256 data, and each of the 256 data is squared, and then the 256 squared data of the two are added to obtain the sum of the two.

[0183] The above processing is performed on the data of the three channels.

[0184] Step S3: comparing the values ​​of the second data square sums of the three channels, and taking the channel corresponding to the maximum value as the tremor channel;

[0185] Compare the values ​​of the three channels SquareSumX_BP, SquareSumY_BP, and SquareSumZ_BP, and take the channel corresponding to the maximum value as the tremor channel.

[0186] Step S4: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data;

[0187] Use the tremor channel data to calculate, here assuming the tremor channel is the X channel. Calculate the ratio of SquareSumX_BP to SquareSumX_HP.

[0188] Step S5: Determine whether the ratio is greater than a threshold value: When the ratio is less than the threshold value, it is determined not to be a tremor and is ignored, and steps S2 to S6 are repeated; when the ratio is greater than the threshold value, it is determined to be a tremor; the threshold value can be set to a value greater than 0.3, and the appropriate threshold value range is 0.6-0.8, and the typical value here is 0.6. For example, the acceleration signal tremor frequency determination result is as follows: Figure 3 shown.

[0189] When it is judged to be a tremor, it is determined whether the value of the flag is equal to 1, and the following processing is performed respectively:

[0190] When the flag bit Flag = 0, the following processing is performed:

[0191] S6.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0192] DataX_BP and DataX_HP are transformed into the frequency domain to obtain Data_BP_FD and Data_HP_FD. General methods such as Fourier transform and Laplace transform can be used.

[0193] S6.1.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data;

[0194] The power of Data_BP_FD and Data_HP_FD is calculated to obtain Power_BP_FD and Power_HP_FD.

[0195] S6.1.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate the ratio of the power within the window to the power of the first frequency domain data, TremorRatio, each time;

[0196] A sliding window is used in the spectrum range of 4 to 12 Hz represented by Power_BP_FD. The window length includes but is not limited to all spectrum lines from 1, 2, 3, 4, 5 to 4 to 12 Hz. Here, the window length is 3. The window starts from the spectrum line representing 4 Hz and slides to the spectrum line of 12 Hz without overlap. If the last sliding spectrum line is less than the window length, the spectrum line of the remaining length is automatically extended. The ratio of the power in the window WindowPower to Power_HP_FD TremorRatio is calculated and saved each time.

[0197] S6.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window;

[0198] Select the TremorRatio with the maximum ratio, and take the frequency corresponding to the maximum spectrum line in the calculation window as the tremor frequency F.

[0199] S6.1.5: Determine whether the number of cyclic processing times of steps S6.1.1-S6.1.4 is equal to a specific threshold: If the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; If the number of processing times is equal to the specific threshold, the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and with F_Ave as the center and the specific sliding window length as the range, the corresponding frequency point range [F low , F up ]; Flag is set to 1;

[0200] For example, if the specific threshold is 10, the above calculation is repeated 10 times, where the number of cycles includes but is not limited to 5, 10, 15, 20, 25, 30...100, etc. After the cycle is completed, the average value of TremorRatio is calculated 10 times and then multiplied by the proportional coefficient G = 0.8 to obtain the result Ratio_Ave, where the value range of G is (0,1). Calculate the average value F_Ave of F 10 times, and take F_Ave as the center and the sliding window length 3 as the range, and record the corresponding frequency point range [F low , F up ].

[0201] When the flag bit Flag = 1, the following processing is performed:

[0202] S6.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0203] DataX_BP and DataX_HP are transformed into the frequency domain to obtain Data_BP_FD and Data_HP_FD, and methods such as Fourier transform and Laplace transform can be used.

[0204] S6.2.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data;

[0205] The power of Data_BP_FD and Data_HP_FD is calculated to obtain Power_BP_FD and Power_HP_FD.

[0206] S6.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time;

[0207] A sliding window is used in the spectrum range of 4 to 12 Hz represented by Power_BP_FD. The window length includes but is not limited to all spectrum lines from 1, 2, 3, 4, 5 to 4 to 12 Hz. Here, the window length is 3. The window starts from the spectrum line representing 4 Hz and slides to the spectrum line of 12 Hz without overlap. If the last sliding spectrum line is less than the window length, the spectrum line of the remaining length is automatically extended. The ratio of the power in the window WindowPower to Power_HP_FD, TremorRatio, is calculated each time.

[0208] S6.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window;

[0209] Select the TremorRatio with the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window.

[0210] S6.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0211] S6.2.6: The pulse stimulator delivers stimulation pulses at a frequency F to the peripheral nerve.

[0212] The pulse stimulator sends stimulation pulses at a frequency F, and the duty cycle of the stimulation pulses can be 1%, 2%, 3%...100%, and 30% is taken here. According to the parameters, the patient's radial nerve and / or median nerve and / or ulnar nerve and / or tibial nerve and other peripheral nerves are stimulated.

[0213] 2. Use EMG signal mode alone

[0214] like Figure 4 As shown, when the electromyographic signal mode is used alone, the pulse stimulation real-time control method includes the following steps:

[0215] Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency;

[0216] For example, Figure 5 As shown, patient data is collected in real time at a certain sampling frequency Fs, including but not limited to 50, 100, 500, 1000, 2000, 3000, 4000, etc., where the typical value Fs = 1000. Each time a certain amount of data is collected, it is processed once, and the amount of data processed each time is 2 n The number of sampling points includes but is not limited to 128, 256, 512, 1024, and 2048. The typical value here is that 512 data points are collected and processed once.

[0217] Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken;

[0218] Data is filtered through a bandpass filter with a cutoff frequency of 1 to 40 Hz to obtain data Data_BP01, wherein the filter can be an IIR or FIR filter. The absolute value of Data_BP01 is taken.

[0219] Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data;

[0220] The absolute value of Data_BP01 is filtered through a 40 Hz low-pass filter to obtain Data_LP.

[0221] Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data;

[0222] Data_LP passes through a bandpass filter with a cutoff frequency of 4 Hz-12 Hz to obtain data Data_BP02.

[0223] Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data;

[0224] The square values ​​of the data of Data_BP01 and Data_BP02 are calculated respectively.

[0225] Step 6: Add the square values ​​of all the data in the plurality of first data, the result is the square sum value of the first data, the result is SquareSum_BP01, and add the square values ​​of all the data in the plurality of third data, the result is the square sum value of the third data, the result is SquareSum_BP02.

[0226] Step 7: Calculate the ratio of the first data square sum value SquareSum_BP01 to the third data square sum value SquareSum_BP02;

[0227] Step 8: Determine whether the ratio is greater than the threshold: When the ratio is less than the threshold, it is determined not to be tremor and is ignored, and steps 2 to 7 are repeated; when the ratio is greater than the threshold, it is determined to be tremor; the threshold can be set to a value greater than 0.3, and the appropriate threshold range is 0.6-0.8, and the typical value here is 0.6. For example, the result of judging the tremor frequency of the electromyographic signal is as follows: Figure 6 shown.

[0228] Step 9: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively:

[0229] When the flag bit Flag = 0, the following processing is performed:

[0230] Step 9.1.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data;

[0231] Data_BP01 and Data_BP02 are transformed into the frequency domain to obtain Data_BP01_FD and Data_BP02_FD. General methods such as Fourier transform and Laplace transform can be used.

[0232] Step 9.1.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power;

[0233] The power of Data_BP01_FD and Data_BP02_FD is calculated to obtain Power_BP01_FD and Power_BP02_FD.

[0234] Step 9.1.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data;

[0235] A sliding window is used in the spectrum range of 4 to 12 Hz represented by Power_BP02_FD. The window length includes but is not limited to all spectrum lines from 1, 2, 3, 4, 5 to 4 to 12 Hz. Here, the window length is 3. The window starts from the spectrum line representing 4 Hz and slides to the spectrum line of 12 Hz without overlap. If the last sliding spectrum line is less than the window length, the spectrum line of the remaining length is automatically extended. The ratio of the power in the window WindowPower to Power_BP01_FD TremorRatio is calculated and saved each time.

[0236] Step 9.1.4: Select the maximum ratio TremorRatio, and take the frequency corresponding to the maximum spectrum line in the calculation window as the tremor frequency F;

[0237] Step 9.1.5: Determine whether the number of cyclic processing times of step 9.1.1 to step 9.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerve at a frequency F; if the number of processing times is equal to the specific threshold, calculate the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data TremorRatio and multiply it by the proportional coefficient to obtain the result Ratio_Ave, calculate the average value F_Ave of F of the specific threshold number of times; and take F_Ave as the center and the specific sliding window length as the range, and record the corresponding frequency point range [F low , F up ]; Flag is set to 1;

[0238] When the specific threshold is 10, the above calculation is repeated 10 times, where the number of cycles includes but is not limited to 5, 10, 15, 20, 25, 30...100, etc. After the cycle is completed, the average value of TremorRatio is calculated 10 times and then multiplied by the proportional coefficient G = 0.8 to obtain the result Ratio_Ave, where the value range of G is (0,1). Calculate the average value F_Ave of F 10 times, and take F_Ave as the center and the sliding window length 3 as the range, and record the corresponding frequency point range [F low , F up ]. The flag bit Flag is set to 1.

[0239] When the flag bit Flag = 1, the following processing is performed:

[0240] Step 9.2.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data;

[0241] Data_BP01 and Data_BP02 are transformed into the frequency domain to obtain Data_BP01_FD and Data_BP02_FD. General methods such as Fourier transform and Laplace transform can be used.

[0242] Step 9.2.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power;

[0243] The power of Data_BP01_FD and Data_BP02_FD is calculated to obtain Power_BP01_FD and Power_BP02_FD.

[0244] Step 9.2.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data;

[0245] A sliding window is used in the spectrum range of 4 to 12 Hz represented by Power_BP02_FD. The window length includes but is not limited to all spectrum lines from 1, 2, 3, 4, 5 to 4 to 12 Hz. Here, the window length is 3. The window starts from the spectrum line representing 4 Hz and slides to the spectrum line of 12 Hz without overlap. If the last sliding spectrum line is less than the window length, the spectrum line of the remaining length is automatically extended. The ratio of the power in the window WindowPower to Power_BP01_FD TremorRatio is calculated each time.

[0246] Step 9.2.4: Select the maximum ratio TremorRatio and save the frequency F corresponding to the maximum spectral line in the window;

[0247] Step 9.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0248] Step 9.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerves.

[0249] The pulse stimulator sends stimulation pulses at a frequency F, and the duty cycle of the stimulation pulses can be 1%, 2%, 3%...100%, and 30% is taken here. According to the parameters, the patient's radial nerve and / or median nerve and / or ulnar nerve and / or tibial nerve and other peripheral nerves are stimulated.

[0250] 3. Combined use of accelerometer signal mode and electromyography signal mode

[0251] When the accelerometer signal mode and the electromyography signal mode are used in combination, the accelerometer enters a sleep state, and the electromyography collector collects signals in real time and determines whether it is a tremor. When a tremor is detected, the accelerometer is awakened. At this time, the accelerometer starts to collect signals for a second determination as to whether it is a tremor. If it is a tremor, the tremor frequency is calculated and the tremor frequency is used as the pulse stimulation frequency. The pulse stimulator starts to send stimulation pulses to the peripheral nerves at the pulse stimulation frequency.

[0252] Specifically, when the accelerometer signal mode and the electromyographic signal mode are used together, the main purpose of this mode is to reduce power consumption, so that the method can be deployed on different devices and can be worn by patients all day to meet the needs of daily activities. The electromyographic collector collects signals in real time and determines whether it is tremor. When tremor is found, the accelerometer is awakened. At this time, the accelerometer starts to collect signals for a second determination of whether it is tremor. If it is tremor, the tremor parameters are calculated, and the pulse stimulator starts to work according to the parameters.

[0253] like Figure 7 As shown, when the accelerometer signal mode and the electromyography signal mode are used in combination, the pulse stimulation real-time control method includes the following steps:

[0254] Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency;

[0255] The electromyographic signal collector collects patient data in real time at a certain sampling frequency Fs, including but not limited to 50, 100, 500, 1000, 2000, 3000, 4000, etc., where the typical value Fs = 1000. A certain amount of data is collected and processed once, and the amount of data processed each time is 2n sampling points, including but not limited to 128, 256, 512, 1024, 2048, where the typical value is once every 512 data are collected and processed.

[0256] Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken;

[0257] Data is filtered through a bandpass filter with a cutoff frequency of 1 to 40 Hz to obtain data Data_BP01, wherein the filter can be an IIR or FIR filter. The absolute value of Data_BP01 is taken.

[0258] Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data;

[0259] The absolute value of Data_BP01 is filtered through a 40 Hz low-pass filter to obtain Data_LP.

[0260] Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data;

[0261] Data_LP passes through a bandpass filter with a cutoff frequency of 4 Hz-12 Hz to obtain data Data_BP02.

[0262] Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data;

[0263] The square values ​​of the data of Data_BP01 and Data_BP02 are calculated respectively.

[0264] Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a first data square sum value SquareSum_BP01, and add the square values ​​of all the data in the plurality of third data to obtain a third data square sum value SquareSum_BP02;

[0265] Step 7: Calculate the ratio of the first data square sum value to the third data square sum value;

[0266] Calculate the ratio of SquareSum_BP01 to SquareSum_BP02.

[0267] Step 8: Determine whether the ratio is greater than a threshold: When the ratio is less than the threshold, it is determined not to be tremor and is ignored, and steps 2 to 7 are repeated; when the ratio is greater than the threshold, it is determined to be tremor; the threshold can be set to a value greater than 0.3, and the appropriate threshold range is 0.6-0.8, and the typical value here is 0.6. For example, the tremor judgment result of the combined mode is as follows: Figure 8 shown.

[0268] Step 9: When it is determined to be a tremor, wake up the accelerometer;

[0269] Step 10: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency;

[0270] When the electromyography collector determines that it is tremor, the accelerometer is awakened. The accelerometer collects patient data in real time at a certain sampling frequency Fs. The data is three channels DataX, DataY, and DataZ. The sampling frequency includes but is not limited to 50, 100, 150, 200, 250, 300, 350, and 400. The typical value Fs=100. Each time a certain amount of data is collected, it is processed once, and the amount of data processed each time is 2 n The number of sampling points includes but is not limited to 128, 256, 512, 1024, and 2048. The typical value here is that every 256 data points are collected and processed.

[0271] Step 11: Perform the following data processing on the X, Y, and Z three-channel data respectively: first obtain a number of first data through a high-pass filter; then obtain a number of corresponding second data through a band-pass filter; calculate the square sum of all data in the number of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the number of second data, the result of which is the square sum value of the second data;

[0272] Here, the data processing takes the X channel as an example, and the other two channels are processed in the same way. DataX is passed through a high-pass filter with a cutoff frequency of 1Hz to obtain the data DataX_HP, where the filter can be an IIR or FIR filter. Then let DataX_HP pass through a band-pass filter with a cutoff frequency of 4Hz-12Hz to obtain the data DataX_BP. Then, the square values ​​of the data of DataX_HP and DataX_BP are calculated respectively. Further, the square values ​​are added to calculate the sum of the squares of DataX_HP and DataX_BP, and the results are SquareSumX_HP and SquareSumX_BP respectively.

[0273] The above processing is performed on the data of the three channels.

[0274] Step 12: Compare the values ​​of the second data square sums of the three channels, and take the channel corresponding to the maximum value as the tremor channel;

[0275] Compare the values ​​of the three channels SquareSumX_BP, SquareSumY_BP, and SquareSumZ_BP, and take the channel corresponding to the maximum value as the tremor channel.

[0276] Step 13: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data;

[0277] Use the tremor channel data to calculate, here assuming the tremor channel is the X channel. Calculate the ratio of SquareSumX_BP to SquareSumX_HP.

[0278] Step 14: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be a tremor, and steps S2-15 are repeated to ignore it; when the ratio is greater than the threshold value, it is determined to be a tremor; the threshold value can be set to a value greater than 0.3, and the appropriate threshold value range is 0.6-0.8, and the typical value here is 0.6.

[0279] Step 16: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively:

[0280] When the flag bit Flag = 0, the following processing is performed:

[0281] Step 16.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0282] DataX_BP and DataX_HP are transformed into the frequency domain to obtain Data_BP_FD and Data_HP_FD. General methods such as Fourier transform and Laplace transform can be used.

[0283] Step 16.1.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power;

[0284] The power of Data_BP_FD and Data_HP_FD is calculated to obtain Power_BP_FD and Power_HP_FD.

[0285] Step 16.1.3: Use a sliding window within the spectral range of the second frequency domain data power representing a specific frequency, and calculate each time the ratio of the power within the window to the power of the first frequency domain data, TremorRatio;

[0286] A sliding window is used in the spectrum range of 4 to 12 Hz represented by Power_BP_FD. The window length includes but is not limited to all spectrum lines from 1, 2, 3, 4, 5 to 4 to 12 Hz. Here, the window length is 3. The window starts from the spectrum line representing 4 Hz and slides to the spectrum line of 12 Hz without overlap. If the last sliding spectrum line is less than the window length, the spectrum line of the remaining length is automatically extended. The ratio of the power in the window WindowPower to Power_HP_FD TremorRatio is calculated and saved each time.

[0287] Step 16.1.4: Select the maximum ratio TremorRatio and save the frequency F corresponding to the maximum spectral line in the window;

[0288] Step 16.1.5: Determine whether the number of cyclic processing times of step 16.1.1-step 16.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerve at a frequency F; if the number of processing times is equal to the specific threshold, calculate the average value of the ratio of the window power of the specific threshold number of times to the power of the first frequency domain data and then multiply the proportional coefficient to obtain the result Ratio_Ave, calculate the average value F_Ave of F of the specific threshold number of times; and record the corresponding frequency point range [F_Ave] with F_Ave as the center and the specific sliding window length as the range. low , F up ]; Flag is set to 1;

[0289] For example, when the specific threshold is 10, the above calculation is repeated 10 times, where the number of cycles includes but is not limited to 5, 10, 15, 20, 25, 30...100, etc. After the cycle is completed, the average value of TremorRatio is calculated 10 times and then multiplied by the proportional coefficient G = 0.8 to obtain the result Ratio_Ave, where the value range of G is (0,1). Calculate the average value F_Ave of F 10 times, and take F_Ave as the center and the sliding window length 3 as the range, and record the corresponding frequency point range [F low , F up ]. The flag bit Flag is set to 1.

[0290] When the flag bit Flag = 1, the following processing is performed:

[0291] Step 16.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data;

[0292] DataX_BP and DataX_HP are transformed into the frequency domain to obtain Data_BP_FD and Data_HP_FD, and methods such as Fourier transform and Laplace transform can be used.

[0293] Step 16.2.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power;

[0294] The power of Data_BP_FD and Data_HP_FD is calculated to obtain Power_BP_FD and Power_HP_FD.

[0295] Step 16.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time;

[0296] A sliding window is used in the spectrum range of 4 to 12 Hz represented by Power_BP_FD. The window length includes but is not limited to all spectrum lines from 1, 2, 3, 4, 5 to 4 to 12 Hz. Here, the window length is 3. The window starts from the spectrum line representing 4 Hz and slides to the spectrum line of 12 Hz without overlap. If the last sliding spectrum line is less than the window length, the spectrum line of the remaining length is automatically extended. The ratio of the power in the window WindowPower to Power_HP_FD, TremorRatio, is calculated each time.

[0297] Step 16.2.4: Select the maximum ratio TremorRatio and save the frequency F corresponding to the maximum spectral line in the window;

[0298] Step 16.2.5: When TremorRatio ≥ Ratio_Ave and F low ≤F≤F up When , it is judged as a tremor signal, and the tremor frequency is F;

[0299] Step 16.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerve.

[0300] The pulse stimulator sends stimulation pulses at a frequency F, and the duty cycle of the stimulation pulses can be 1%, 2%, 3%...100%, and 30% is taken here. According to the parameters, the patient's radial nerve and / or median nerve and / or ulnar nerve and / or tibial nerve and other peripheral nerves are stimulated.

[0301] Example 2

[0302] This embodiment provides a real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals. Fig. 9As shown, the real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals in this embodiment includes: an accelerometer, an electromyographic collector, a signal input module, a control system, a control signal output module and a pulse stimulator. The real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals can make a tremor judgment and calculate tremor-related parameters in real time when the patient has symptoms of essential tremor disease in his daily life by combining electromyographic signals and accelerometer signals or using one of them alone, and send them to the pulse stimulator to stimulate the patient's radial nerve and / or median nerve according to the parameters, thereby reducing the impact of essential tremor on the patient's life.

[0303] The accelerometer is used to collect the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency.

[0304] The electromyography collector is used to collect the patient's electromyography signal data in real time at a certain sampling frequency.

[0305] The signal input module is used to receive the accelerometer X, Y, Z three-channel data transmitted by the accelerometer and the electromyographic signal data transmitted by the electromyographic collector, and further transmit them to the control system.

[0306] The control system is used to receive data transmitted by the signal input module, use the accelerometer signal mode and / or the electromyographic signal mode, perform data processing, make tremor judgment in real time and calculate the tremor frequency, and use the tremor frequency as the pulse stimulation frequency. Specifically, the control system uses the three modes in the real-time control method of pulse stimulation based on electromyographic signals and accelerometer signals in Example 1 to perform tremor judgment and stimulation parameter control. It will not be repeated here.

[0307] The control signal output module is used to output the pulse stimulation frequency to the pulse stimulator.

[0308] The pulse stimulator is used to receive the pulse stimulation frequency transmitted by the control signal output module, and send stimulation pulses to the peripheral nerves according to the pulse stimulation frequency.

[0309] It should be noted that the embodiments of the present invention have better practicability and do not impose any form of limitation on the present invention. Any technician familiar with the field may use the technical content disclosed above to change or modify it into an equivalent effective embodiment. However, any modification or equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals, characterized in that: include: An accelerometer, used to collect the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency; The electromyographic collector is used to collect the electromyographic signal data of the patient in real time at a certain sampling frequency; The signal input module is used to receive the X, Y, and Z three-channel data of the accelerometer transmitted by the accelerometer and the electromyographic signal data transmitted by the electromyographic collector, and further transmit them to the control system; A control system is used to receive data transmitted by the signal input module, use the accelerometer signal mode and / or the electromyography signal mode to process the data, make a tremor judgment in real time and calculate the tremor frequency, and use the tremor frequency as the pulse stimulation frequency; A control signal output module, used for outputting the pulse stimulation frequency to the pulse stimulator; The pulse stimulator is used to receive the pulse stimulation frequency transmitted by the control signal output module, and send stimulation pulses to the peripheral nerves according to the pulse stimulation frequency.

2. The real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals as claimed in claim 1, characterized in that: When the control system uses the accelerometer signal mode alone, the pulse stimulation real-time control method includes the following steps: Step S1: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency; Step S2: performing the following data processing on the X, Y, and Z three-channel data respectively: firstly obtain a plurality of first data through a high-pass filter; then obtain a plurality of corresponding second data through a band-pass filter; calculate the square sum of all data in the plurality of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the plurality of second data, the result of which is the square sum value of the second data; Step S3: comparing the values ​​of the second data square sums of the three channels, and taking the channel corresponding to the maximum value as the tremor channel; Step S4: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data; Step S5: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps S2 to S6 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; when it is determined to be tremor, determine whether the value of the flag bit Flag is equal to 1, and perform the following processing respectively: When the flag bit Flag = 0, the following processing is performed: S6.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data; S6.1.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data; S6.1.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate the ratio of the power within the window to the power of the first frequency domain data, TremorRatio, each time; S6.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window; S6.1.5: Determine whether the number of cyclic processing times of steps S6.1.1-S6.1.4 is equal to a specific threshold: If the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; If the number of processing times is equal to the specific threshold, the average value of the ratio of the power in the window of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and with F_Ave as the center and the specific sliding window length as the range, the corresponding frequency point range is recorded. ; Set the flag bit Flag to 1; When the flag bit Flag = 1, the following processing is performed: S6.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data; S6.2.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data; S6.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time; S6.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window; S6.2.5: When TremorRatio ≥ Ratio_Ave and When , it is judged as a tremor signal, and the tremor frequency is F; S6.2.6: The pulse stimulator delivers stimulation pulses at a frequency F to the peripheral nerve.

3. The real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals as claimed in claim 1, characterized in that: When the control system uses the electromyographic signal mode alone, the pulse stimulation real-time control method comprises the following steps: Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency; Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken; Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data; Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data; Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data; Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a square sum value of the first data, and add the square values ​​of all the data in the plurality of third data to obtain a square sum value of the third data; Step 7: Calculate the ratio of the first data square sum value to the third data square sum value; Step 8: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps 2 to 7 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; Step 9: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively: When the flag bit Flag = 0, the following processing is performed: Step 9.1.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data; Step 9.1.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power; Step 9.1.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data; Step 9.1.4: Select the maximum ratio TremorRatio, and take the frequency corresponding to the maximum spectrum line in the calculation window as the tremor frequency F; Step 9.1.5: Determine whether the number of cyclic processing times of step 9.1.1-step 9.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; if the number of processing times is equal to the specific threshold, the average value of the ratio TremorRatio of the window power of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and the corresponding frequency point range is recorded with F_Ave as the center and the specific sliding window length as the range. ; Set the flag bit Flag to 1; When the flag bit Flag = 1, the following processing is performed: Step 9.2.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data; Step 9.2.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power; Step 9.2.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data; Step 9.2.4: Select the maximum ratio TremorRatio and save the frequency F corresponding to the maximum spectral line in the window; Step 9.2.5: When TremorRatio ≥ Ratio_Ave and When , it is judged as a tremor signal, and the tremor frequency is F; Step 9.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerves.

4. The real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals as claimed in claim 1, characterized in that: When the control system uses the accelerometer signal mode and the electromyography signal mode at the same time, the accelerometer enters a sleep state, and the electromyography collector collects signals in real time and determines whether it is a tremor. When a tremor is detected, the accelerometer is awakened. At this time, the accelerometer starts to collect signals for a second time to determine whether it is a tremor. If it is a tremor, the tremor frequency is calculated and the tremor frequency is used as the pulse stimulation frequency. The pulse stimulator starts to send stimulation pulses to the peripheral nerves according to the pulse stimulation frequency.

5. The real-time control system for pulse stimulation based on electromyographic signals and accelerometer signals as claimed in claim 4, characterized in that: When the control system uses the accelerometer signal mode and the electromyographic signal mode at the same time, the pulse stimulation real-time control method includes the following steps: Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency; Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken; Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data; Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data; Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data; Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a square sum value of the first data, and add the square values ​​of all the data in the plurality of third data to obtain a square sum value of the third data; Step 7: Calculate the ratio of the first data square sum value to the third data square sum value; Step 8: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps 2 to 7 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; Step 9: When it is determined to be a tremor, wake up the accelerometer; Step 10: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency; Step 11: Perform the following data processing on the X, Y, and Z three-channel data respectively: first obtain a number of first data through a high-pass filter; then obtain a number of corresponding second data through a band-pass filter; calculate the square sum of all data in the number of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the number of second data, the result of which is the square sum value of the second data; Step 12: Compare the values ​​of the second data square sums of the three channels, and take the channel corresponding to the maximum value as the tremor channel; Step 13: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data; Step 14: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps S2 to 15 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; Step 16: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively: When the flag bit Flag = 0, the following processing is performed: Step 16.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data; Step 16.1.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power; Step 16.1.3: Use a sliding window within the spectral range of the second frequency domain data power representing a specific frequency, and calculate each time the ratio of the power within the window to the power of the first frequency domain data, TremorRatio; Step 16.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectrum line in the window; Step 16.1.5: Determine whether the number of cyclic processing times of step 16.1.1-step 16.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; if the number of processing times is equal to the specific threshold, the average value of the ratio of the power in the window of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and the corresponding frequency point range is recorded with F_Ave as the center and the specific sliding window length as the range. ; Set the flag bit Flag to 1; When the flag bit Flag = 1, the following processing is performed: Step 16.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data; Step 16.2.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power; Step 16.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time; Step 16.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectrum line in the window; Step 16.2.5: When TremorRatio ≥ Ratio_Ave and When , it is judged as a tremor signal, and the tremor frequency is F; Step 16.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerve.

6. A real-time control method for pulse stimulation based on electromyographic signals and accelerometer signals, characterized in that: include: Using the accelerometer signal mode and / or the electromyography signal mode, the tremor judgment is made in real time and the tremor frequency is calculated, and the pulse stimulation is sent in real time using the tremor frequency as the pulse stimulation frequency.

7. The real-time control method of pulse stimulation based on electromyographic signals and accelerometer signals as claimed in claim 6, characterized in that: When the accelerometer signal mode is used alone, the pulse stimulation real-time control method includes the following steps: Step S1: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency; Step S2: performing the following data processing on the X, Y, and Z three-channel data respectively: firstly obtain a plurality of first data through a high-pass filter; then obtain a plurality of corresponding second data through a band-pass filter; calculate the square sum of all data in the plurality of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the plurality of second data, the result of which is the square sum value of the second data; Step S3: comparing the values ​​of the second data square sums of the three channels, and taking the channel corresponding to the maximum value as the tremor channel; Step S4: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data; Step S5: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps S2 to S6 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; when it is determined to be tremor, determine whether the value of the flag bit Flag is equal to 1, and perform the following processing respectively: When the flag bit Flag = 0, the following processing is performed: S6.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data; S6.1.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data; S6.1.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate the ratio of the power within the window to the power of the first frequency domain data, TremorRatio, each time; S6.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window; S6.1.5: Determine whether the number of cyclic processing times of steps S6.1.1-S6.1.4 is equal to a specific threshold: If the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; If the number of processing times is equal to the specific threshold, the average value of the ratio of the power in the window of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and with F_Ave as the center and the specific sliding window length as the range, the corresponding frequency point range is recorded. ; Set the flag bit Flag to 1; When the flag bit Flag = 1, the following processing is performed: S6.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data; S6.2.2: Calculate power of the first frequency domain data and the second frequency domain data to obtain power of the first frequency domain data and power of the second frequency domain data; S6.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time; S6.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectral line in the window; S6.2.5: When TremorRatio ≥ Ratio_Ave and When , it is judged as a tremor signal, and the tremor frequency is F; S6.2.6: The pulse stimulator delivers stimulation pulses at a frequency F to the peripheral nerve.

8. The real-time control method of pulse stimulation based on electromyographic signals and accelerometer signals as claimed in claim 6, characterized in that: When the electromyographic signal mode is used alone, the pulse stimulation real-time control method includes the following steps: Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency; Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken; Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data; Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data; Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data; Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a square sum value of the first data, and add the square values ​​of all the data in the plurality of third data to obtain a square sum value of the third data; Step 7: Calculate the ratio of the first data square sum value to the third data square sum value; Step 8: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps 2 to 7 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; Step 9: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively: When the flag bit Flag = 0, the following processing is performed: Step 9.1.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data; Step 9.1.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power; Step 9.1.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data; Step 9.1.4: Select the maximum ratio TremorRatio, and take the frequency corresponding to the maximum spectrum line in the calculation window as the tremor frequency F; Step 9.1.5: Determine whether the number of cyclic processing times of step 9.1.1-step 9.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; if the number of processing times is equal to the specific threshold, the average value of the ratio TremorRatio of the window power of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and the corresponding frequency point range is recorded with F_Ave as the center and the specific sliding window length as the range. ; Set the flag bit Flag to 1; When the flag bit Flag = 1, the following processing is performed: Step 9.2.1: transform the first data and the third data into the frequency domain to obtain first frequency domain data and third frequency domain data; Step 9.2.2: Calculate the power of the first frequency domain data and the third frequency domain data to obtain the first frequency domain data power and the third frequency domain data power; Step 9.2.3: Use a sliding window within the range of the spectrum line where the power of the third frequency domain data represents a specific frequency, and calculate each time the ratio TremorRatio of the power within the window to the power of the first frequency domain data; Step 9.2.4: Select the maximum ratio TremorRatio and save the frequency F corresponding to the maximum spectral line in the window; Step 9.2.5: When TremorRatio ≥ Ratio_Ave and When , it is judged as a tremor signal, and the tremor frequency is F; Step 9.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerves.

9. The real-time control method of pulse stimulation based on electromyographic signals and accelerometer signals as claimed in claim 6, characterized in that: When the accelerometer signal mode and the electromyography signal mode are used at the same time, the accelerometer enters a sleep state, and the electromyography collector collects signals in real time and determines whether it is a tremor. When a tremor is detected, the accelerometer is awakened. At this time, the accelerometer starts to collect signals for a second determination of whether it is a tremor. If it is a tremor, the tremor frequency is calculated, and the pulse stimulator starts to send stimulation pulses to the peripheral nerves at the same frequency as the tremor frequency.

10. The real-time control method of pulse stimulation based on electromyographic signals and accelerometer signals according to claim 9, characterized in that: When the accelerometer signal mode and the electromyography signal mode are used simultaneously, the pulse stimulation real-time control method includes the following steps: Step 1: The electromyographic collector collects the patient's electromyographic signal data in real time at a certain sampling frequency; Step 2: The electromyographic signal data is filtered through a first bandpass filter to obtain a number of first data, and the absolute value is taken; Step 3: The absolute values ​​of the first data are passed through a low-pass filter to obtain corresponding second data; Step 4: The plurality of second data pass through a second bandpass filter to obtain corresponding third data; Step 5: respectively calculating square values ​​for all data in the plurality of first data, and calculating square values ​​for all data in the plurality of third data; Step 6: Add the square values ​​of all the data in the plurality of first data to obtain a square sum value of the first data, and add the square values ​​of all the data in the plurality of third data to obtain a square sum value of the third data; Step 7: Calculate the ratio of the first data square sum value to the third data square sum value; Step 8: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps 2 to 7 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; Step 9: When it is determined to be a tremor, wake up the accelerometer; Step 10: The accelerometer collects the patient's accelerometer X, Y, and Z three-channel data in real time at a certain sampling frequency; Step 11: Perform the following data processing on the X, Y, and Z three-channel data respectively: first obtain a number of first data through a high-pass filter; then obtain a number of corresponding second data through a band-pass filter; calculate the square sum of all data in the number of first data, the result of which is the square sum value of the first data, and calculate the square sum of all data in the number of second data, the result of which is the square sum value of the second data; Step 12: Compare the values ​​of the second data square sums of the three channels, and take the channel corresponding to the maximum value as the tremor channel; Step 13: Calculate the ratio of the first data square sum value to the second data square sum value using the tremor channel data; Step 14: Determine whether the ratio is greater than a threshold value: when the ratio is less than the threshold value, it is determined not to be tremor, and steps S2 to 15 are repeated; when the ratio is greater than the threshold value, it is determined to be tremor; Step 16: When it is determined to be a tremor, determine whether the value of the flag is equal to 1, and perform the following processing respectively: When the flag bit Flag = 0, the following processing is performed: Step 16.1.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data; Step 16.1.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power; Step 16.1.3: Use a sliding window within the spectral range of the second frequency domain data power representing a specific frequency, and calculate each time the ratio of the power within the window to the power of the first frequency domain data, TremorRatio; Step 16.1.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectrum line in the window; Step 16.1.5: Determine whether the number of cyclic processing times of step 16.1.1-step 16.1.4 is equal to a specific threshold: if the number of processing times is less than the specific threshold, the pulse stimulator sends stimulation pulses to the peripheral nerves at a frequency F; if the number of processing times is equal to the specific threshold, the average value of the ratio of the power in the window of the specific threshold number of times to the power of the first frequency domain data is calculated and then multiplied by the proportional coefficient to obtain the result Ratio_Ave, and the average value F_Ave of F of the specific threshold number of times is calculated; and the corresponding frequency point range is recorded with F_Ave as the center and the specific sliding window length as the range. ; Set the flag bit Flag to 1; When the flag bit Flag = 1, the following processing is performed: Step 16.2.1: transform the first data and the second data into the frequency domain to obtain first frequency domain data and second frequency domain data; Step 16.2.2: Calculate the power of the first frequency domain data and the second frequency domain data to obtain the first frequency domain data power and the second frequency domain data power; Step 16.2.3: Use a sliding window within the range of the spectrum line where the power of the second frequency domain data represents a specific frequency, and calculate and save the ratio of the power within the window to the power of the first frequency domain data each time; Step 16.2.4: Select the maximum ratio and save the frequency F corresponding to the maximum spectrum line in the window; Step 16.2.5: When TremorRatio ≥ Ratio_Ave and When , it is judged as a tremor signal, and the tremor frequency is F; Step 16.2.6: The pulse stimulator sends stimulation pulses at a frequency F to the peripheral nerve.