Real-time processing method and storage medium of diaphragm electromyography based on linear prediction

Through the diaphragm EMG processing method based on linear prediction, the quasi-periodicity and correlation of ECG interference are used to design the filter. Combined with multi-order filtering and adaptive adjustment, the problem of diaphragm EMG signal being interfered by ECG is solved, and high-precision diaphragm EMG signal acquisition is achieved.

CN114969637BActive Publication Date: 2025-09-05SOUTH CHINA UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210401590.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2025-09-05
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

In the existing technology, the diaphragm electromyographic signal collected by the esophageal electrode is easily affected by ECG interference, which makes it difficult to ensure the accuracy of the signal. In particular, the ECG interference signal is much higher than the diaphragm electromyographic amplitude, and traditional filtering methods are difficult to effectively suppress it.

Method used

A diaphragm electromyography processing method based on linear prediction is designed. The quasi-periodicity of ECG interference and the correlation of its sampling values ​​at different times are utilized. A filter is established through a linear prediction model. Combined with convolution operation, super-threshold zeroing processing and multi-order filtering, the filter coefficients are adaptively adjusted to suppress ECG interference and achieve accurate calculation of diaphragm electromyography signals.

Benefits of technology

It effectively suppresses ECG interference, improves the acquisition accuracy of diaphragm EMG signals, adapts to changes in different patients and signal states, and ensures the real-time processing accuracy of diaphragm EMG signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969637B_ABST
    Figure CN114969637B_ABST
Patent Text Reader

Abstract

The present invention provides a diaphragm myoelectricity real-time processing method based on linear prediction, a computer and a storage medium. The linear prediction model of the method is used as a diaphragm myoelectricity filter that uses the measured value of the electrocardiogram interference at the historical moment to predict the electrocardiogram interference value at the current and future moments; the diaphragm myoelectricity filter is used to perform a convolution operation on the diaphragm myoelectricity signal interfered by the electrocardiogram, and the convolved signal is subjected to an over-threshold zeroing process to obtain a signal y(k); a diaphragm myoelectricity segment containing the electrocardiogram is obtained, and the linear prediction model coefficient of the segment is calculated, and the diaphragm myoelectricity filter coefficient is adaptively adjusted using the model coefficient; the signal y(k) is sequentially subjected to a second-order high-pass filter and an M filter. conv The diaphragm EMG signal z(k) after noise reduction is obtained by performing low-pass filtering; the envelope of the diaphragm EMG signal z(k) after noise reduction is calculated to obtain the envelope signal z of the diaphragm EMG signal after noise reduction. e (k) The present invention can improve the accuracy of diaphragm electromyographic signal acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical devices and medical signal processing, and more particularly to a diaphragm myoelectricity real-time processing method and storage medium based on linear prediction. Background Art

[0002] The diaphragm is the primary respiratory muscle, and its electromyographic signal provides important information for assessing its physiological status and respiratory system function. Clinically, monitoring the diaphragm electromyogram (EMG) helps determine the severity of dyspnea and the ability of mechanically ventilated patients to be weaned from the ventilator. The diaphragm EMG envelope can also be used to improve the synchronization of mechanical ventilation.

[0003] Currently, diaphragm EMG signals are commonly collected through surface electrodes, acupuncture electrodes, or esophageal electrodes. The surface electrode method is relatively simple to operate, highly safe, and easily accepted by patients. However, its disadvantages are that it is easily interfered with by EMG signals from the intercostal muscles of the chest wall and abdominal muscles, and the signal is attenuated by the influence of subcutaneous tissue, etc. The acupuncture electrode method inserts the electrode needle directly into the diaphragm to collect its EMG signals, which can avoid interference from other EMG signals. However, its disadvantages are that the electrode insertion process can easily cause bleeding and soft tissue damage, making the operation difficult and dangerous. The esophageal electrode method inserts a catheter with an electrode through the nasal cavity or mouth into the intersection of the esophagus and the stomach to collect diaphragm EMG signals. Because the electrode is directly close to the diaphragm, it reduces interference from EMG signals other than the electrocardiogram, and also avoids attenuation of diaphragm EMG signals by subcutaneous tissue, etc. It is more accurate than the surface electrode method and safer than the acupuncture electrode method.

[0004] The diaphragm's electromyographic signal is weak, requiring an amplifier for acquisition with the esophageal electrode. Due to the proximity of the esophageal electrode to the heart, the resulting signal is highly susceptible to ECG interference. This interference signal is significantly higher than the diaphragm's electromyographic amplitude, making it difficult to directly use the amplified diaphragm's electromyographic signal to assess diaphragm condition. The ECG frequency band overlaps with the diaphragm's electromyographic frequency band, making it difficult to effectively suppress this interference using traditional bandpass filtering. Therefore, it is necessary to study the characteristics of ECG interference and design a noise reduction algorithm to accurately calculate diaphragm EMG strength. Summary of the Invention

[0005] The purpose of the present invention is to overcome the shortcomings and deficiencies in the prior art and to provide a real-time diaphragm electromyography processing method based on linear prediction. This method addresses the problem that diaphragm electromyography collected by esophageal electrodes is susceptible to electrocardiographic interference. The method utilizes the quasi-periodicity of electrocardiographic interference and the correlation of its sampling values ​​at different times to design a filter to suppress electrocardiographic interference, thereby accurately calculating the intensity of the diaphragm electromyography signal and improving the accuracy of diaphragm electromyography signal acquisition.

[0006] The second object of the present invention is to provide a computer for real-time processing of diaphragm myoelectricity based on linear prediction.

[0007] A third object of the present invention is to provide a storage medium.

[0008] In order to achieve the above object, the present invention is implemented by the following technical solution: a real-time processing method of diaphragm electromyography based on linear prediction, characterized in that:

[0009] Setting a linear prediction model as a diaphragm electromyography filter that uses the measured values ​​of the electrocardiographic interference at historical moments to predict the electrocardiographic interference values ​​at current and future moments;

[0010] The diaphragm myoelectric filter is used to perform convolution operation on the diaphragm myoelectric signal interfered by the electrocardiogram, and the convolution signal is subjected to super-threshold zeroing processing to obtain the signal y(k);

[0011] Obtain the diaphragm myoelectric segment containing ECG, calculate the linear prediction model coefficient of the segment, and use the model coefficient to adaptively adjust the diaphragm myoelectric filter coefficient;

[0012] The signal y(k) is sequentially subjected to second-order high-pass filtering and M conv The diaphragm EMG signal z(k) after noise reduction is obtained by performing low-pass filtering; the envelope of the diaphragm EMG signal z(k) after noise reduction is calculated to obtain the envelope signal z of the diaphragm EMG signal after noise reduction. e (k), to achieve real-time processing of diaphragm electromyographic signals; where k is the current moment.

[0013] The method comprises the following steps:

[0014] S1. Parameter initialization: set time sequence k = 0, ECG peak sequence j = 0, initialize ECG cycle t ECG (0), ECG segment length t p (0) and the diaphragm EMG filter coefficient w i (0), i=0, ..., M conv -1;

[0015] Among them, M conv is the filter order;

[0016] S2. Determine ECG peak value x P And its search method, set the initial value of zero threshold Th(0):

[0017] With sampling frequency f s Collect the diaphragm electromyographic signal x(k) interfered by the electrocardiogram, and search for the maximum and minimum values ​​of x(k) within N consecutive seconds, where the maximum and maximum moments are recorded as x max and k max , the minimum value and the minimum time are recorded as x min and k min If x max >|xmin |, then let the ECG peak value x P =x max , and set ECG peak search mode flag = 1; otherwise, let ECG peak value X P =|x min |, and set ECG peak search mode flag = 0; the value of N should ensure that the period includes at least 3 ECG cycles;

[0018] The initial value of the zero threshold is set to Th(0)∈[0.3x P , 0.7x P ];

[0019] S3, with sampling frequency f s Collect the diaphragm electromyographic signal x(k) interfered by the electrocardiogram;

[0020] S4. If k<M conv -1, then k=k+1, and jump to S3; otherwise, use the diaphragm electromyography filter w i (j), i=0, ..., M conv -1 performs convolution operation on the signal x(k), and the convolved signal is recorded as The calculation formula is:

[0021]

[0022] where K conv is the convolution magnification; the order of the diaphragm electromyography filter is M conv ≥2, convolution magnification K conv ∈[1,30];

[0023] S5, threshold processing: Perform super-threshold zeroing processing, record the resulting signal as y(k), and adaptively update the zeroing threshold;

[0024] right Perform super-threshold zeroing processing, and the resulting signal is recorded as y(k). The calculation formula is:

[0025]

[0026] The calculation formula for the adaptive update zero threshold is:

[0027] Th(j+1)=α Th ·Th(j)+(1-α Th )·y(k)

[0028] Among them, α Th is the threshold adjustment factor; threshold adjustment factor α Th ∈[0.9, 0.98];

[0029] S6. Locating the ECG peak moment:

[0030] If flag = 1, then determine whether the current time k satisfies the conditions x(k-1) ≥ x(k-2) and x(k-1) ≥ x(k) and |x(k-1) - x P |<δ;

[0031] If flag = 0, then determine whether the current time k satisfies the conditions x(k-1)≤x(k-2) and x(k-1)≤x(k) and |x(k-1)+x P |<δ;

[0032] If satisfied:

[0033] Record and save k p (j) = k-1;

[0034] If j>0, update the ECG cycle t ECG (j) and ECG segment length t p (j), the calculation formula is:

[0035] t p2p =k p (j)-k p (j-1)

[0036] t ECG (j) = α ECG ·t ECG (j-1)+(1-α ECG )·t p2p

[0037]

[0038] in, is the rounding operation, α ECG is the cardiac cycle regulation factor, α p The time proportion of the ECG segment in the entire ECG cycle;

[0039] Update ECG peak number j+1→j;

[0040] δ∈[0.01X P , 0.2x P ], α ECG ∈[0.9, 0.98], α p ∈[0.5, 0.7];

[0041] S7, determine whether the current moment meets If satisfied:

[0042] The diaphragm myoelectric segment containing ECG is recorded as Calculate the linear prediction model coefficients of s(j)

[0043] If j>0, update the diaphragm EMG filter coefficient w i (j), the calculation formula is:

[0044]

[0045] Among them, α w is the filter coefficient adjustment factor;

[0046] Linear prediction model coefficients The solution is realized by the autocorrelation method;

[0047] S8, perform the cutoff frequency f on y(k) in turn HPc A second-order high-pass filter with a cutoff frequency of f LPc M conv Order low-pass filtering, the filtering result is recorded as z(k);

[0048] S9. Perform envelope calculation on z(k) to obtain envelope signal z e (k):

[0049] Perform logarithmic operation on the absolute value of z(k), and record the result as v(k). The calculation formula is:

[0050] v(k)=ln(|z(k)|+ξ)

[0051] Let the cutoff frequency of v(k) be f LPe M2-order low-pass filtering, the filtering result is recorded as o(k);

[0052] Perform exponential operation on o(k), and the result is the envelope signal z e (k), the calculation formula is:

[0053] z e (k) = e o(k)

[0054] Among them, ξ is a very small positive number, ξ=0.001; M2≥2;

[0055] S10, respectively outputs the signal z(k) after bandpass filtering of S8 (i.e., the diaphragm EMG signal after noise reduction) and the envelope signal z of S9 e (k) (i.e., the envelope of the diaphragm electromyographic signal after noise reduction); update the time sequence number k+1→k, and jump to S3.

[0056] In step S1, the initial value of the ECG cycle The initial value of the ECG segment length The initial value of the diaphragm electromyography filter coefficient wi (0)=0, i=0, ..., M conv -1.

[0057] In step S7, the filter coefficient adjustment factor α w ∈[0.9, 0.98].

[0058] In step S8, f HPc ∈[30, 80]Hz,f LPc ∈[300, 500]Hz.

[0059] In step S9, f LPe ∈[0.5, 2] Hz.

[0060] A computer comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the above-mentioned method for real-time processing of diaphragm electromyography based on linear prediction are implemented.

[0061] A storage medium stores a computer program, characterized in that when the program is executed by a processor, the steps of the above-mentioned diaphragm electromyography real-time processing method based on linear prediction are implemented.

[0062] The principle of the processing algorithm of the present invention is:

[0063] During the measurement of diaphragm electromyography, the relative position of the esophageal electrode and the heart usually does not change frequently, so the resulting diaphragm electromyography and ECG interference signals are relatively stable. The values ​​of ECG interference at different sampling times are correlated, and the measured values ​​at historical moments can be used to predict the ECG interference values ​​at current and future moments. Using this correlation to design a filter, that is, the linear prediction model described in the present invention, can effectively suppress ECG interference. However, since the correlation between ECG interference signals at different moments is different from the correlation between diaphragm electromyography signals at different moments, the filter designed based on the former correlation will not significantly suppress the diaphragm electromyography signal.

[0064] The filter established by the linear prediction model regards the ECG signal of a single ECG cycle as the result of a pulse excitation convolved with the diaphragm electromyography filter. Therefore, step S5 performs super-threshold zeroing processing on the convolved signal, which is equivalent to reducing the energy of ECG interference and can effectively suppress ECG.

[0065] The premise for determining the diaphragm myoelectric filter coefficients is that the ECG signal used to establish the linear prediction model should not be interfered with by diaphragm myoelectricity and other non-ECG signals. However, such a pure ECG signal cannot be obtained during actual measurement. The present invention utilizes the quasi-periodic characteristics of the cardiac signal to solve this problem: the ECG signal can be regarded as a quasi-periodic signal with a heart rate as its frequency, while the diaphragm myoelectricity and other non-ECG interference signals do not have this quasi-periodic characteristic. Therefore, if the ECG segments interfered with by non-ECG signals are averaged over multiple ECG cycles, the non-ECG signals can be greatly suppressed to obtain a relatively pure ECG signal template. In steps S6 and S7, the diaphragm myoelectric filter weights are adaptively adjusted by obtaining ECG segments → calculating linear prediction model coefficients → updating filter weights, which plays the role of weighted averaging. Compared with superimposing multiple ECG segments and averaging them before obtaining model parameters, this method can effectively avoid the phase (time axis alignment) problem that needs to be considered when superimposing multiple ECG segments.

[0066] To solve the linear prediction model coefficients, the present invention adopts the Levinson-Durbin autocorrelation method.

[0067] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0068] 1. The present invention addresses the problem that diaphragm myoelectricity collected by esophageal electrodes is easily interfered with by electrocardiogram (ECG). By utilizing the quasi-periodicity of ECG interference and the correlation of its sampling values ​​at different times, a filter is designed to suppress ECG interference, thereby accurately calculating the intensity of the diaphragm myoelectric signal and improving the accuracy of diaphragm myoelectric signal collection.

[0069] 2. The present invention adaptively updates the coefficients of the electrocardiographic linear prediction model and the diaphragm myoelectric filter coefficients, so that the processing algorithm can adapt to signals from different patients, at different times, and in different states. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 Flowchart of the method for real-time processing of diaphragm electromyography based on linear prediction of the present invention;

[0071] Figure 2(a) is the normalized time domain diagram of the noisy diaphragm EMG signal;

[0072] Figure 2(b) is the spectrum of the noisy diaphragm EMG signal;

[0073] FIG2( c ) is a normalized time domain diagram of the noisy diaphragm EMG signal after being processed by the method of the present invention;

[0074] FIG2( d ) is a spectrum diagram of the noisy diaphragm electromyographic signal after being processed by the method of the present invention;

[0075] Figure 2(e) is the normalized envelope time domain diagram of the diaphragm EMG signal after noise reduction processing;

[0076] Figure 3 Schematic diagram of the method for determining the central electrical position in the diaphragm electromyographic signal. DETAILED DESCRIPTION

[0077] The present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.

[0078] Example 1

[0079] like Figures 1 to 3 As shown, this embodiment provides a real-time diaphragm electromyography processing method based on linear prediction, which is as follows:

[0080] Setting a linear prediction model as a diaphragm electromyography filter that uses the measured values ​​of the electrocardiographic interference at historical moments to predict the electrocardiographic interference values ​​at current and future moments;

[0081] The diaphragm myoelectric filter is used to perform convolution operation on the diaphragm myoelectric signal interfered by the electrocardiogram, and the convolution signal is subjected to super-threshold zeroing processing to obtain the signal y(k);

[0082] Obtain the diaphragm myoelectric segment containing ECG, calculate the linear prediction model coefficient of the segment, and use the model coefficient to adaptively adjust the diaphragm myoelectric filter coefficient;

[0083] The signal y(k) is sequentially subjected to second-order high-pass filtering and M conv The diaphragm EMG signal z(k) after noise reduction is obtained by performing low-pass filtering; the envelope of the diaphragm EMG signal z(k) after noise reduction is calculated to obtain the envelope signal z of the diaphragm EMG signal after noise reduction. e (k), to achieve real-time processing of diaphragm electromyographic signals; where k is the current moment.

[0084] Specifically, the method comprises the following steps:

[0085] S1. Parameter initialization: set time sequence k = 0, ECG peak sequence j = 0, initialize ECG cycle t ECG (0) = 18, ECG segment length t p (0) = 960 and the diaphragm EMG filter coefficient w i (0)=0, i=0, ..., 5;

[0086] S2. Determine ECG peak value x P And its search method, set the initial value of zero threshold Th(0):

[0087] At sampling frequency f s=2000Hz to collect the diaphragm electromyographic signal x(k) interfered by the electrocardiogram, and search for the maximum and minimum values ​​of x(k) within N = 5 seconds, where the maximum and maximum moments are respectively recorded as x max and k max , the minimum value and the minimum time are recorded as x min and k min If x max >|x min |, then let the ECG peak value x P =x max , and set ECG peak search mode flag = 1; otherwise, let ECG peak x P =|x min |, and set the ECG peak search mode flag flag = 0. Wherein, N = 5 ensures that the searched data segment includes at least 3 ECG cycles.

[0088] The initial value of the zero threshold is set to Th(0) = 0.5x P .

[0089] S3, with sampling frequency f s =2000Hz to collect the diaphragm EMG signal x(k) interfered by the ECG;

[0090] S4, if k < 5, then k = k + 1, and jump to S3; otherwise, use the diaphragm electromyography filter w i (j), i = 0, ..., 5, and the convolution operation is performed on the signal x(k). The signal after convolution is recorded as The calculation formula is:

[0091]

[0092] S5, threshold processing: Perform super-threshold zeroing processing, record the resulting signal as y(k), and adaptively update the zeroing threshold;

[0093] ·right Perform super-threshold zeroing processing, and the resulting signal is recorded as y(k). The calculation formula is:

[0094]

[0095] The calculation formula for adaptively updating the zero threshold is:

[0096] Th(j+1)=0.95Th(j)+0.05y(k)

[0097] S6. Locating the ECG peak moment:

[0098] If flag = 1, then determine whether the current time k satisfies the conditions x(k-1) ≥ x(k-2) and x(k-1) ≥ x(k) and |x(k-1) - x P |<δ=0.1x P .

[0099] If flag = 0, then determine whether the current time k satisfies the conditions x(k-1)≤x(k-2) and x(k-1)≤x(k) and |x(k-1)+x P |<δ=0.1x P .

[0100] If satisfied:

[0101] Record and save k p (j) = k-1;

[0102] If j>0, update the ECG cycle t ECG (j) and ECG segment length t p (j), the calculation formula is:

[0103] t p2p =k p (j)-k p (j-1)

[0104] t ECG (j) = 0.95t ECG (j-1)+0.05t p2p

[0105]

[0106] Update the ECG peak number j+1→j.

[0107] in, This is a rounding operation.

[0108] S7, determine whether the current moment meets If satisfied:

[0109] Record the diaphragm myoelectric segment containing ECG as Calculate the linear prediction model coefficients of s(j) The model uses the full-pole model, and the expression is as follows:

[0110]

[0111] If j>0, update the diaphragm EMG filter coefficient w i (j), the calculation formula is:

[0112]

[0113] It should be noted that the full-pole model is used as the ECG generation model for the following two reasons:

[0114] ① The ECG generation model is not completely an all-pole model, but the zero point of the model function can be approximated by enough poles, that is:

[0115]

[0116] As long as the model order is high enough, the pole-zero model can be approximated by the full-pole model;

[0117] ② When estimating model parameters, the all-pole model involves solving linear equations. However, when the model contains a finite number of zeros, the solution becomes a system of nonlinear equations, making it difficult to implement. Therefore, the all-pole model is chosen for its ease of implementation and simpler calculations.

[0118] Preferably, the linear prediction model coefficients The solution is achieved using the autocorrelation method.

[0119] S8. First, set the cutoff frequency of y(k) to f HPc =50Hz second-order high-pass filter and then cutoff frequency f LPc =300Hz sixth-order low-pass filtering, using a Butterworth filter. The filtering result is recorded as z(k).

[0120] S9. Perform envelope calculation on z(k) to obtain envelope signal z e (k):

[0121] Perform a logarithmic operation on the absolute value of z(k), and record the result as v(k). The calculation formula is:

[0122] v(k)=ln(|z(k)|+0.001)

[0123] Set the cutoff frequency of v(k) to f LPe =1Hz third-order low-pass filtering, using a Butterworth filter. The filtering result is recorded as o(k).

[0124] Perform exponential operation on o(k), and the result is the envelope signal z e (k), the calculation formula is:

[0125] z e (k) = e o(k)

[0126] S10, respectively outputs the signal z(k) after bandpass filtering of S8 (i.e., the diaphragm EMG signal after noise reduction) and the envelope signal z of S9 e(k) (i.e., the envelope of the diaphragm EMG signal after noise reduction) Update the time sequence number k+1→k and jump to S3.

[0127] Example 2

[0128] A computer of this embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and is characterized in that when the processor executes the program, the steps of the method for real-time processing of diaphragm electromyography based on linear prediction in the above-mentioned embodiment 1 are implemented.

[0129] Example 3

[0130] A storage medium of this embodiment includes a computer program, characterized in that when the program is executed by a processor, the steps of the method for real-time processing of diaphragm electromyography based on linear prediction in the above-mentioned embodiment 1 are implemented.

[0131] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A method for real-time processing of diaphragm electromyography based on linear prediction, characterized by: Setting a linear prediction model as a diaphragm electromyography filter that uses the measured values ​​of the electrocardiographic interference at historical moments to predict the electrocardiographic interference values ​​at current and future moments; The diaphragm myoelectric filter is used to perform convolution operation on the diaphragm myoelectric signal interfered by the electrocardiogram, and the convolution signal is subjected to super-threshold zeroing processing to obtain the signal y(k); Obtain the diaphragm myoelectric segment containing ECG, calculate the linear prediction model coefficient of the segment, and use the model coefficient to adaptively adjust the diaphragm myoelectric filter coefficient; The signal y(k) is sequentially subjected to second-order high-pass filtering and M conv The diaphragm EMG signal z(k) after noise reduction is obtained by performing low-pass filtering; the envelope of the diaphragm EMG signal z(k) after noise reduction is calculated to obtain the envelope signal z of the diaphragm EMG signal after noise reduction. e (k), to achieve real-time processing of diaphragm electromyographic signals; where k is the current moment.

2. The method for real-time processing of diaphragm electromyography based on linear prediction according to claim 1, characterized in that: The following steps are involved: S1. Parameter initialization: set time sequence k = 0, ECG peak sequence j = 0, initialize ECG cycle t ECG (0), ECG segment length t p (0) and the diaphragm EMG filter coefficient w i (0),i=0,...,M conv -1; Among them, M conv is the filter order; S2. Determine ECG peak value x P And its search method, set the initial value of zero threshold Th(0): With sampling frequency f s Collect the diaphragm electromyographic signal x(k) interfered by the electrocardiogram, and search for the maximum and minimum values ​​of x(k) within N consecutive seconds, where the maximum and maximum moments are recorded as x max and k max , the minimum value and the minimum time are recorded as x min and k min If x max >|x min |, then let the ECG peak value x P =x max , and set ECG peak search mode flag = 1; otherwise, let ECG peak x P =|x min |, and set ECG peak search mode flag = 0; the value of N should ensure that the period includes at least 3 ECG cycles; The initial value of the zero threshold is set to Th(0)∈[0.3x P ,0.7x P ]; S3, with sampling frequency f s Collect the diaphragm electromyographic signal x(k) interfered by the electrocardiogram; S4. If k <M conv -1, then k=k+1, and jump to S3; otherwise, use the diaphragm electromyography filter w i (j),i=0,...,M conv -1 performs convolution operation on the signal x(k), and the convolved signal is recorded as The calculation formula is: where K conv is the convolution magnification; the order of the diaphragm electromyography filter is M conv ≥2, convolution magnification K conv ∈[1,30]; S5, threshold processing: Perform super-threshold zeroing processing, record the resulting signal as y(k), and adaptively update the zeroing threshold; right Perform super-threshold zeroing processing, and the resulting signal is recorded as y(k). The calculation formula is: The calculation formula for the adaptive update zero threshold is: Th(j+1)=α Th ·Th(j)+(1-α Th )·y(k) Among them, α Th is the threshold adjustment factor; threshold adjustment factor α Th ∈[0.9,0.98]; S6. Locating the ECG peak moment: If flag = 1, then determine whether the current time l satisfies the conditions x(l-1) ≥ x(l-2) and x(l-1) ≥ x(k) and |x(k-1)-x P |<δ; If flag = 0, then determine whether the current time k satisfies the conditions x(l-1)≤x(l-2) and x(l-1)≤x(k) and |x(k-1)+x P |<δ; If satisfied: Record and save k p (j) = k-1; If j>0, update the ECG cycle t ECG (j) and ECG segment length t p (j), the calculation formula is: t p2p =k p (j)-k p (j-1) t ECG (j)=α EGG ·t ECG (j-1)+(1-α ECG )·t p2p in, is the rounding operation, α ECG is the cardiac cycle regulation factor, α p The time proportion of the ECG segment in the entire ECG cycle; Update ECG peak number j+1→j; δ∈[0.01x P ,0.2x P ],a ECG ∈[0.9,0.98],α p ∈[0.5,0.7]; S7, determine whether the current moment meets If satisfied: The diaphragm myoelectric segment containing ECG is recorded as Calculate the linear prediction model coefficients of s(j) If j>0, update the diaphragm EMG filter coefficient w i (j), the calculation formula is: Among them, α w is the filter coefficient adjustment factor; Linear prediction model coefficients The solution is realized by the autocorrelation method; S8, perform the cutoff frequency f on y(k) in turn HPc A second-order high-pass filter with a cutoff frequency of f LPc M conv Order low-pass filtering, the filtering result is recorded as z(k); S9. Perform envelope calculation on z(k) to obtain envelope signal z e (k): Perform logarithmic operation on the absolute value of z(k), and record the result as v(k). The calculation formula is: v(k)=ln(|z(k)|+ξ) Let the cutoff frequency of v(k) be f LPe M2-order low-pass filtering, the filtering result is recorded as o(k); Perform exponential operation on o(k), and the result is the envelope signal z e (k), the calculation formula is: with e (k)=e o(k) Among them, ξ is a very small positive number, ξ=0.001; M2≥2; S10, respectively outputs the signal z(k) after bandpass filtering of S8 and the envelope signal z of S9 e (k); Update the time sequence number k+1→k and jump to S3.

3. The method for real-time processing of diaphragm electromyography based on linear prediction according to claim 2, characterized in that: In step S1, the initial value of the ECG cycle The initial value of the ECG segment length The initial value of the diaphragm electromyography filter coefficient w i (0)=0,i=0,...,M conv -1.

4. The method for real-time processing of diaphragm electromyography based on linear prediction according to claim 2, characterized in that: In step S7, the filter coefficient adjustment factor α w ∈[0.9,0.98].

5. The method for real-time processing of diaphragm electromyography based on linear prediction according to claim 2, characterized in that: In step S8, f HPc ∈[30,80]Hz,f LPc ∈[300,500]Hz.

6. The method for real-time processing of diaphragm electromyography based on linear prediction according to claim 2, characterized in that: In step S9, f LPe ∈[0.5,2]Hz.

7. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the diaphragm myoelectric real-time processing method based on linear prediction according to any one of claims 1 to 6 are implemented.

8. A storage medium storing a computer program, characterized in that: When the program is executed by a processor, the steps of the method for real-time processing of diaphragm electromyography based on linear prediction described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Electromyographic signal processing method and device without electrocardiosignal

    CN113967024A

  • Breathing machine control triggering method

    CN114028671A