Positive and negative symmetric and asymmetric signal generation method and generator for electrical stimulation control
Through analog-to-digital conversion and signal offset gain processing, high-precision positive and negative symmetric and asymmetric electrical stimulation signals are generated, which solves the complexity and accuracy of signal generators in the prior art, and realizes multi-parameter adjustability and signal stability.
Patent Information
- Application Number
- CN202411607826.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, the circuit structure of the electrical stimulation signal generator is complex, and the signal stability debugging is difficult. Due to the influence of saturation voltage drop of devices such as transistors, the signal accuracy is affected, and improving the signal accuracy requires additional circuit adjustment.
By analog to digital conversion of the digital signal, the initial target signal, amplitude regulation signal and DC offset signal are generated. Based on these signals, the target signal with amplitude controllable amplitude is generated, and the DC offset signal is processed through the inverter. Finally, the signal is input into the same-direction amplifier for gain or compensation, and the DC offset signal is regulated to generate positive and negative symmetric and asymmetric signals.
It simplifies the signal generation process, improves signal accuracy, and avoids the influence of discrete devices on the output signal accuracy. It has the characteristics of multi-waveform selectable, multi-parameter adjustable and signal stability, and is suitable for electrical stimulation control.
Smart Images

Figure CN119656469A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of instruments and equipment, and in particular to a method and a generator for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control. Background Art
[0002] Electrical stimulation equipment is a commonly used instrument in the field of rehabilitation and is widely used in hospitals, rehabilitation institutions and other scenarios. Electrical stimulation equipment mostly stimulates body parts with electric current. The current generated by electrical stimulation will cause a potential difference on both sides of the cell membrane. For neurons, it will trigger action potentials, resulting in nerve impulses; for muscle cells, it will cause depolarization of the cell membrane, resulting in muscle contraction. The stimulation current is usually a current with positive and negative waveforms to prevent the accumulation of charges in the stimulated parts of the body from causing discomfort or pain, and then causing damage to body tissues. In order to achieve accurate output and multi-parameter adjustable electrical stimulation signals, positive and negative symmetrical and asymmetrical multi-waveform signals are crucial. Common signal generators are mostly multi-waveform signals with positive polarity. Traditional positive and negative signal generators are generally built with transistor analog circuits. For example, a multi-channel switch composed of triodes is used to switch the output of voltage / current signals at a certain frequency, so as to achieve the alternating output of positive polarity signal waveforms and negative polarity signal waveforms. This type of signal generator not only has a complex circuit structure and is difficult to debug for signal stability, but also has a direct impact on the accuracy of the signal generator's output signal due to the saturation voltage drop of devices such as transistors. Improving the signal accuracy requires additional circuits for adjustment. Summary of the invention
[0003] The present application provides a method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control, in order to solve the problem in the prior art that common signal generators not only have complex circuit structures and high difficulty in debugging signal stability, but also directly affect the accuracy of the signal generator output signal due to the saturation voltage drop of devices such as transistors, and the improvement of the signal accuracy requires additional circuits for adjustment.
[0004] Correspondingly, the present application also provides a positive and negative symmetrical and asymmetrical signal generator for electrical stimulation control, which is used to ensure the implementation and application of the above method.
[0005] In order to solve the above technical problems, the present application discloses a method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control, the method comprising:
[0006] Perform analog-to-digital conversion on the digital signal to generate an initial target signal, an amplitude control signal, and a DC offset signal;
[0007] Based on the initial target signal and the amplitude control signal, an amplitude-controllable target signal is obtained;
[0008] Inputting the DC offset signal into an inverter to obtain a reverse DC offset signal;
[0009] Based on the DC offset signal and the target signal with adjustable amplitude, or based on the reverse DC offset signal and the target signal with adjustable amplitude, obtaining a target signal with DC offset with adjustable amplitude;
[0010] The target signal with a DC offset whose amplitude can be controlled is input into a co-directional amplifier for gain or compensation;
[0011] By adjusting the DC offset signal or the reverse DC offset signal, the target signal of the DC offset with adjustable amplitude is adjusted to be a symmetrical signal or an asymmetrical signal.
[0012] The present application also discloses a positive and negative symmetrical and asymmetrical signal generator for electrical stimulation control, the signal generator comprising:
[0013] A signal generation module is used to perform analog-to-digital conversion on the digital signal to generate an initial target signal, an amplitude control signal and a DC offset signal;
[0014] The signal generating module is further used to obtain an amplitude-adjustable target signal based on the initial target signal and the amplitude-adjusting signal;
[0015] The signal generating module is further used to input the DC offset signal into the inverter to obtain a reverse DC offset signal;
[0016] A signal offset module, used to obtain a target signal with an amplitude-adjustable DC offset based on a DC offset signal and an amplitude-adjustable target signal; or to obtain a target signal with an amplitude-adjustable DC offset based on a reverse DC offset signal and an amplitude-adjustable target signal;
[0017] A signal gain / compensation module is used to input a target signal with an adjustable DC offset into a co-directional amplifier for gain or compensation;
[0018] By adjusting the DC offset signal, the target signal of the DC offset with adjustable amplitude is adjusted to be a symmetrical signal or an asymmetrical signal.
[0019] In the present application, the digital signal is converted into analog to digital to generate an initial target signal, an amplitude control signal and a DC offset signal; based on the initial target signal and the amplitude control signal, an amplitude controllable target signal is obtained; the DC offset signal is input into an inverter to obtain a reverse DC offset signal. Based on the DC offset signal and the amplitude controllable target signal, or based on the reverse DC offset signal and the amplitude controllable target signal, an amplitude controllable DC offset target signal is obtained. Wherein, by regulating the DC offset signal or the reverse DC offset signal, the amplitude controllable DC offset target signal is symmetrical or asymmetrical. The amplitude controllable DC offset target signal is input into a co-directional amplifier for gain or compensation. The method generates positive and negative symmetrical and asymmetrical signals by signal generation, offset, gain / compensation, and has the characteristics of multiple waveform options, multiple adjustable parameters and signal stability, and the implementation method is simple, the signal accuracy is high, and it is not affected by discrete devices, and can provide accurate control signals for electrical stimulation.
[0020] Additional aspects and advantages of the present application will be given in the following description, which will become apparent from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0022] Figure 1 A flow chart of a method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control provided in an embodiment of the present application;
[0023] Figure 2 A schematic diagram of the structure of a positive and negative symmetrical and asymmetrical signal generator for electrical stimulation control provided in an embodiment of the present application;
[0024] Figure 3 A schematic diagram of the structure and function of the signal generation module provided in the embodiment of the present application;
[0025] Figure 4 A schematic diagram of the structure and function of the signal offset module provided in the embodiment of the present application;
[0026] Figure 5 A schematic diagram of the structure and function of the signal gain / compensation module provided in the embodiment of the present application;
[0027] Figure 6 A schematic diagram of signal generation of a signal generator based on STM32F767 provided in an embodiment of the present application;
[0028] Figure 7A schematic diagram of a DC offset circuit for a sine wave / square wave / triangle wave signal based on an OPA354 adding amplifier and an OPA354 differential amplifier provided in an embodiment of the present application;
[0029] Figure 8 A schematic diagram of a sine wave / square wave / triangle wave signal gain / compensation circuit based on an OPA354 co-directional amplifier provided in an embodiment of the present application;
[0030] Fig. 9 The generated waveform, DC offset waveform and gain / compensation waveform of the square wave signal provided in the embodiment of the present application;
[0031] Fig.10 A square wave signal offset and gain / compensation circuit based on OPA354 is provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0033] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0034] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the field to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0035] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0036] The embodiment of the present application provides a method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control, which generates positive and negative symmetrical and asymmetrical signals with adjustable parameters such as frequency, amplitude, duty cycle, phase, etc. by means of signal generation, signal offset and signal gain / compensation. Figure 1 As shown in , the method specifically comprises the following steps:
[0037] Step 101, performing analog-to-digital conversion on a digital signal to generate an initial target signal, an amplitude control signal and a DC offset signal.
[0038] Wherein, the target signal is a sine wave signal, a square wave signal, a triangle wave signal or other signals;
[0039] The other signals are synthesized based on any one or more of a sine wave signal, a square wave signal and a triangle wave signal.
[0040] In the embodiment of the present application, firstly, an initial sine wave / square wave / triangular wave digital signal, an amplitude control digital signal, and a DC offset digital signal are generated by a digital signal generating unit. Then, the digital signal is converted into an analog signal by analog-to-digital conversion (DC) to obtain an initial sine wave / square wave / triangular wave analog signal, an amplitude control analog signal, and a DC offset analog signal. Among them, the digital signal generating unit includes but is not limited to a microcontroller unit (MCU). It should be noted that, in the embodiment of the present application, for the convenience of description, the initial sine wave / square wave / triangular wave signal, the amplitude control signal, and the DC offset signal can be used to refer to the initial sine wave / square wave / triangular wave analog signal, the amplitude control analog signal, and the DC offset analog signal, respectively.
[0041] Step 102: obtaining an amplitude-adjustable target signal based on the initial target signal and the amplitude-adjustable signal.
[0042] Based on the initial sine wave signal and the amplitude control signal, an amplitude-controllable sine wave signal is obtained; based on the initial square wave triangular wave and the amplitude control signal, an amplitude-controllable square wave signal is obtained; based on the initial triangular wave signal and the amplitude control signal, an amplitude-controllable triangular wave signal is obtained.
[0043] Step 103: input the DC offset signal into an inverter to obtain a reverse DC offset signal.
[0044] This step uses the inverter integrated computing chip or circuit as the core to reversely process the input signal.
[0045] Step 104 : obtaining a target signal with a DC offset having an adjustable amplitude based on the DC offset signal and the target signal with an adjustable amplitude, or based on the reverse DC offset signal and the target signal with an adjustable amplitude.
[0046] Specifically, based on an amplitude-adjustable sine wave / square wave / triangle wave signal and a DC offset signal, or based on an amplitude-adjustable sine wave / square wave / triangle wave signal and a reverse DC offset signal input to a differentiator, an amplitude-adjustable DC offset sine wave / square wave / triangle wave signal can be obtained.
[0047] By adjusting the DC offset signal or the reverse DC offset signal, the target signal of the DC offset with adjustable amplitude is adjusted to be a symmetrical signal or an asymmetrical signal.
[0048] Step 105: input the target signal with DC offset whose amplitude is adjustable into the same-direction amplifier for gain or compensation.
[0049] A sine wave / square wave / triangle wave signal with an adjustable DC offset or a sine wave signal with a phase offset is input into a co-directional amplifier, and the signal can be amplified or compensated to restore the amplitude of the output signal to the initial amplitude of the sine wave / square wave / triangle wave signal, or the amplitude of the output signal can be increased or decreased by a certain gain multiple.
[0050] In an embodiment of the present application, the signal generation step includes converting the digital signal into analog-to-digital format to generate an initial target signal, an amplitude control signal, and a DC offset signal; based on the initial target signal and the amplitude control signal, an amplitude controllable target signal is obtained; and the DC offset signal is input into an inverter to obtain a reverse DC offset signal. The signal offset step includes obtaining an amplitude controllable DC offset target signal based on a DC offset signal and an amplitude controllable target signal, or based on a reverse DC offset signal and an amplitude controllable target signal. Wherein, by regulating the DC offset signal or the reverse DC offset signal, the amplitude controllable DC offset target signal is symmetrical or asymmetrical. The signal gain / compensation step includes inputting the amplitude controllable DC offset target signal into a co-directional amplifier for gain or compensation. The method generates positive and negative symmetrical and asymmetrical signals by signal generation, offset, and gain / compensation, and has the characteristics of multiple waveform options, multiple adjustable parameters, and signal stability, and is simple to implement, has high signal accuracy, is not affected by discrete devices, and can provide accurate control signals for electrical stimulation.
[0051] In an optional embodiment, the method further includes:
[0052] Inputting different initial sinusoidal wave signals into a signal modulator to obtain sinusoidal wave signals with phase shift;
[0053] The phase-shifted sine wave signal is input into the same-direction amplifier for gain or compensation.
[0054] This method can achieve signal phase adjustment.
[0055] In an optional embodiment, obtaining an amplitude-adjustable target signal based on an initial target signal and an amplitude-adjustable signal includes:
[0056] The initial target signal and the amplitude control signal are input into the multiplier to obtain the amplitude controllable target signal.
[0057] This step uses a multiplier integrated operation chip or circuit as the core to multiply the input signals.
[0058] In an optional embodiment, obtaining a target signal with an amplitude-adjustable DC offset based on a DC offset signal and an amplitude-adjustable target signal, or based on a reverse DC offset signal and an amplitude-adjustable target signal, includes:
[0059] The amplitude-adjustable target signal and the DC offset signal are input into an adder, or the amplitude-adjustable target signal and the reverse DC offset signal are input into a differentiator to obtain an amplitude-adjustable DC offset target signal.
[0060] In an optional embodiment, when the target signal is a sine wave signal or a triangular wave signal, if the absolute value of the amplitude of the DC offset signal or the reverse DC offset signal is half of the amplitude of the amplitude-adjustable target signal, then the target signal of the amplitude-adjustable DC offset is a symmetrical signal; otherwise, the target signal of the amplitude-adjustable DC offset is an asymmetrical signal.
[0061] In an optional embodiment, when the target signal is a square wave signal, if the absolute value of the amplitude of the DC offset signal or the reverse DC offset signal is half of the amplitude of the amplitude-adjustable target signal, and the duty cycle is 50%, then the target signal of the amplitude-adjustable DC offset is a symmetrical signal; otherwise, the target signal of the amplitude-adjustable DC offset is an asymmetrical signal.
[0062] As a first example, the steps for generating positive and negative symmetrical and asymmetrical sinusoidal wave signals are as follows:
[0063] 1. Signal generation:
[0064] (1) For DC offset:
[0065] ① Generate the initial sine wave signal through analog-to-digital conversion:
[0066] f(t)=sinαt+b
[0067] Among them, α and b are both constants, and b≥1.
[0068] ② Generate amplitude control signal through analog-to-digital conversion:
[0069] g(t)=A
[0070] Wherein, A is a constant and A>0.
[0071] ③ Input the f(t) and g(t) signals into the multiplier to obtain a sine wave signal with adjustable amplitude:
[0072] h(t)=f(t)·g(t)=Asinαt+Ab
[0073] ④ Generate DC offset signal through analog-to-digital conversion:
[0074] y(t)=B
[0075] Wherein, B is a constant and B>0.
[0076] ⑤Then input the DC offset signal into the inverter to obtain the reverse DC offset signal:
[0077] y′(t)=-B
[0078] (2) For phase offset:
[0079] ① Generate two initial sinusoidal wave signals through analog-to-digital conversion, which are:
[0080] f1(t)=sinαt+m
[0081] f2(t)=cosαt+n
[0082] Among them, α, m, and π are all constants, and m≥1, π≥1.
[0083] ② Generate three amplitude control signals through analog-to-digital conversion, which are:
[0084] g(t)=A
[0085] g1(t)=B
[0086] g2(t)=C
[0087] Among them, A, B, and C are constants, and A>0, B>0, and C>0.
[0088] ③ Input the f1(t) and g1(t), f2(t) and g2(t) signals into the multiplier to obtain the corresponding amplitude-adjustable sine wave signals:
[0089] h1(t)=f1(t)·g1(t)=B sinαt+Bm
[0090] h2(t)=f2(t)·g2(t)=C cosαt+Cn
[0091] 2. Signal offset
[0092] (1) For DC offset:
[0093] Input h(t) and y′(t) into the adder to obtain a sine wave signal with adjustable DC offset:
[0094] s d (t)=h(t)+y′(t)=Asinαt+Ab-B
[0095] Alternatively, h(t) and h(t) can be input into a differentiator to obtain a sine wave signal with adjustable DC offset:
[0096] s d (t)=h(t)-h(t)=Asinαt+Ab-B
[0097] Among them, when Ab-B=0, that is, B=Ab, B d (t) is a symmetrical signal; when B≠Ab, s d (t) is an asymmetric signal.
[0098] (2) For phase offset:
[0099] Input h1(t) and h2(t) to the signal modulator to obtain a phase-shifted sine wave signal:
[0100] s′ p (t)=h1(t)+h2(t)=B sinαt+C cosαt+Bm+Cn
[0101] Right now
[0102]
[0103] where α is the offset phase, and
[0104]
[0105] Then s′ p (t) and g(t) are input into the multiplier to obtain a sine wave signal with adjustable amplitude and phase shift:
[0106]
[0107] 3. Signal gain / compensation:
[0108] Will s d (t) or s p (t) Input to the same-direction amplifier to restore the amplitude to the initial sine wave signal amplitude, or increase or decrease it to obtain the DC offset sine wave signal s after gain / compensation da (t) or a phase-shifted sinusoidal signal s pa (t), that is
[0109] s da (t) = k·s d (t) = kAsinαt + kAb - kB
[0110]
[0111] Where k is the gain / compensation factor.
[0112] As a second example, the steps for generating positive and negative symmetrical and asymmetrical square wave or triangle wave signals are as follows:
[0113] 1. Signal generation:
[0114] ① Generate the initial square wave signal through digital-to-analog conversion:
[0115]
[0116] Among them, t1 and T are constants, and t1≤T, so the duty cycle of the square wave signal is:
[0117]
[0118] Or generate the initial triangle wave signal through digital-to-analog conversion:
[0119] f tri (t) = at, 0 ≤ t < T
[0120] Among them, a is a constant.
[0121] ② Generate amplitude control signal through analog-to-digital conversion:
[0122] g(t)=A
[0123] Wherein, A is a constant and A>0.
[0124] ③F sq The g(t) and g(t) signals are input into the multiplier to obtain a square wave signal with adjustable amplitude:
[0125]
[0126] Or f triThe g(t) and g(t) signals are input into the multiplier to obtain a triangle wave signal with adjustable amplitude:
[0127] h tri (t) = f tri (t)·g(t)=aAt,0≤t<T
[0128] ④ Generate DC offset signal through analog-to-digital conversion
[0129] y(t)=B
[0130] Where B is a constant and B>0.
[0131] ⑤Then input the signal into the inverter to obtain the reverse DC offset signal
[0132] y′(t)=-B
[0133] 2. Signal offset:
[0134] For a DC offset of a square wave signal, h sq (t) and y′(t) are input to the adder to obtain a square wave signal with adjustable DC offset:
[0135]
[0136] Or put h sq By inputting y(t) and y(t) into the differentiator, a square wave signal with DC offset and adjustable amplitude can be obtained:
[0137]
[0138] Among them, when AB=B, that is, A=2B, and η=50%, s sqd (t) is a symmetrical signal; when When sqd (t) is an asymmetric signal.
[0139] For the DC offset of the triangle wave signal, h tri (t) and y′(t) are input to the adder to obtain a triangle wave signal with adjustable DC offset:
[0140] s trid (t) = h tri (t)+y′(t)=aAt-B, 0≤t<T
[0141] Or h tri By inputting y(t) and y(t) into the differentiator, a triangle wave signal with DC offset and adjustable amplitude can be obtained:
[0142] s trid (t) = h triq(t)-y(t)=aAt-B,0≤t<T
[0143] Among them, when aAT-B=B, that is When trid (t) is a symmetrical signal; when When trid (t) is an asymmetric signal.
[0144] 3. Signal gain / compensation:
[0145] Will s sqd (t) or s trid (t) Input into the same-direction amplifier to restore the amplitude to the original square wave signal or triangle wave signal, or increase or decrease it to obtain the DC offset square wave signal s after gain / compensation sqa (t) or triangular wave signal s tria (t), that is
[0146]
[0147] s tria (t) = k·s trid (t) = akAt - kB, 0 ≤ t < T
[0148] Where k is the gain / compensation factor.
[0149] The methods for generating positive and negative symmetrical and asymmetrical signals corresponding to other signals in the embodiments of the present application refer to the methods for generating signals in the first and second examples above. Among them, other signals include but are not limited to the synthesis signals of sine waves, sine waves, square waves, and triangular waves, the synthesis signals of square waves, square waves, and triangular waves, and the synthesis signals of triangular waves and triangular waves.
[0150] In the embodiments of the present application, based on the above method, the frequency, amplitude and other parameters of various signal waveforms such as sine waves, square waves, and triangular waves can be adjusted, and the phase of the sine wave signal, the duty cycle of the square wave, the waveform slope of the triangular wave and other parameters can be adjusted. At the same time, other waveform-related parameters after the modulation combination of various signals such as sine waves, square waves, and triangular waves can also be adjusted.
[0151] Based on the same principle as the method provided in the embodiment of the present application, the embodiment of the present application also provides a positive and negative symmetrical and asymmetrical signal generator for electrical stimulation control, such as Figure 2 As shown, the signal generator comprises:
[0152] The signal generating module 201 is used to perform analog-to-digital conversion on the digital signal to generate an initial target signal, an amplitude control signal and a DC offset signal.
[0153] The target signal is a sine wave signal, a square wave signal, a triangle wave signal or other signals.
[0154] The other signals are synthesized based on any one or more of a sine wave signal, a square wave signal and a triangle wave signal.
[0155] In the present application embodiment, Figure 3 As shown, the signal generation module 201 includes a digital signal generation unit and an analog-to-digital conversion unit. The digital signal generation unit includes but is not limited to a microcontroller unit (MCU), and generates an initial sine wave / square wave / triangular wave digital signal, an amplitude control digital signal, and a DC offset digital signal through the digital signal generation unit. The analog-to-digital conversion unit is centered on a digital-to-analog conversion (DA) chip, and converts the initial sine wave / square wave / triangular wave digital signal, the amplitude control digital signal, and the DC offset digital signal into corresponding analog signals, thereby generating an initial sine wave / square wave / triangular wave analog signal, an amplitude control signal, and a DC offset signal.
[0156] The signal generating module 201 is further configured to obtain an amplitude-adjustable target signal based on the initial target signal and the amplitude-adjusting signal.
[0157] Specifically, the signal generating module 201 obtains an amplitude-controllable sine wave signal based on the initial sine wave signal and the amplitude control signal; obtains an amplitude-controllable square wave signal based on the initial square wave triangle wave and the amplitude control signal; obtains an amplitude-controllable triangle wave signal based on the initial triangle wave signal and the amplitude control signal.
[0158] The signal generating module 201 is further used to input the DC offset signal into the inverter to obtain a reverse DC offset signal.
[0159] like Figure 3 As shown, the signal generating module 201 further includes an inverter unit, which has an inverter integrated operation chip or circuit as its core and performs reverse processing on the input signal.
[0160] The signal offset module 202 is used to obtain a target signal with an amplitude-adjustable DC offset based on a DC offset signal and an amplitude-adjustable target signal; or to obtain a target signal with an amplitude-adjustable DC offset based on a reverse DC offset signal and an amplitude-adjustable target signal.
[0161] Specifically, based on an amplitude-adjustable sine wave / square wave / triangle wave signal and a DC offset signal, or based on an amplitude-adjustable sine wave / square wave / triangle wave signal and a reverse DC offset signal input to a differentiator, an amplitude-adjustable DC offset sine wave / square wave / triangle wave signal can be obtained.
[0162] By adjusting the DC offset signal, the target signal of the DC offset with adjustable amplitude is adjusted to be a symmetrical signal or an asymmetrical signal.
[0163] The signal gain / compensation module 203 is used to input the target signal with DC offset whose amplitude can be adjusted into the same-direction amplifier for gain or compensation.
[0164] like Figure 5 As shown, the signal gain / compensation module 203 includes a unidirectional amplifier unit, which is based on a triode circuit or an integrated operational amplifier (i.e., a unidirectional amplifier) that can realize the unidirectional amplification function, and is used to gain / compensate the DC offset sine wave / square wave / triangle wave signal so that the amplitude of the output signal is restored to the initial sine wave / square wave / triangle wave signal amplitude, or the amplitude of the output signal is increased or decreased by a certain gain multiple.
[0165] In the embodiment of the present application, the signal generation module performs analog-to-digital conversion on the digital signal to generate an initial target signal, an amplitude control signal and a DC offset signal; based on the initial target signal and the amplitude control signal, an amplitude controllable target signal is obtained; the DC offset signal is input into the inverter to obtain a reverse DC offset signal. The signal offset module obtains an amplitude controllable DC offset target signal based on the DC offset signal and the amplitude controllable target signal, or based on the reverse DC offset signal and the amplitude controllable target signal. Among them, by adjusting the DC offset signal or the reverse DC offset signal, the target signal of the DC offset with adjustable amplitude is a symmetrical signal or an asymmetrical signal. The signal gain / compensation module inputs the target signal of the DC offset with adjustable amplitude into the same-direction amplifier for gain or compensation. The signal generator generates positive and negative symmetrical and asymmetrical signals by signal generation, offset, gain / compensation, and has the characteristics of multiple waveform options, multiple adjustable parameters and signal stability, and the hardware circuit is simple, the function is stable, and there is no influence of discrete devices on the accuracy of the output signal, which can provide accurate control signals for electrical stimulation.
[0166] In an optional embodiment, the signal shift module 202 is further used to input different initial sinusoidal wave signals into a signal modulator to obtain a phase-shifted sinusoidal wave signal;
[0167] Specifically, Figure 4 As shown, the signal shift module 202 includes a signal modulation unit, which is based on a signal modulator and is used to shift the phase of a sine wave signal. The signal phase can be adjusted by the signal modulation unit.
[0168] The signal gain / compensation module 203 is also used to input the phase-shifted sinusoidal wave signal into the co-directional amplifier for gain or compensation.
[0169] like Figure 5 As shown, the unidirectional amplifier unit of the signal gain / compensation module 203 is also used to perform gain / compensation on the phase-shifted sinusoidal wave signal so that the amplitude of the output signal is restored to the initial amplitude of the sinusoidal wave signal, or the amplitude of the output signal is increased or decreased by a certain gain multiple.
[0170] In an optional embodiment, if Figure 3 As shown, the signal generating module 201 includes a multiplier unit, which is used to input the initial target signal and the amplitude control signal into the multiplier to obtain the target signal with adjustable amplitude.
[0171] The multiplier unit uses a multiplier integrated operation chip or circuit as its core and performs multiplication processing on its input signals.
[0172] In an optional embodiment, if Figure 4 As shown, the signal offset module 202 also includes:
[0173] The adder unit is used for inputting the amplitude-adjustable target signal and the DC offset signal into the adder to obtain the amplitude-adjustable DC offset target signal.
[0174] The differentiator unit is used to input the amplitude-adjustable target signal and the reverse DC offset signal into the differentiator to obtain the amplitude-adjustable DC offset target signal.
[0175] The adder unit / differentiator reaction is based on a triode circuit or an integrated operational amplifier that can realize the addition / differential operation function. It is used to DC offset the sine wave, square wave, or triangle wave signal to obtain a target signal with an adjustable DC offset. By adjusting the DC offset signal / reverse DC offset signal, the sine wave, square wave, or triangle wave signal with an adjustable DC offset can be adjusted to be a symmetrical signal or an asymmetrical signal.
[0176] In an optional embodiment, when the target signal is a sine wave signal or a triangular wave signal, if the absolute value of the amplitude of the DC offset signal or the reverse DC offset signal is half of the amplitude of the amplitude-adjustable target signal, then the target signal of the amplitude-adjustable DC offset is a symmetrical signal; otherwise, the target signal of the amplitude-adjustable DC offset is an asymmetrical signal.
[0177] In an optional embodiment, when the target signal is a square wave signal, if the absolute value of the amplitude of the DC offset signal or the reverse DC offset signal is half of the amplitude of the amplitude-adjustable target signal, and the duty cycle is 50%, then the target signal of the amplitude-adjustable DC offset is a symmetrical signal; otherwise, the target signal of the amplitude-adjustable DC offset is an asymmetrical signal.
[0178] In the present application embodiment, based on Figures 3 to 5 The structure and functional composition shown can realize the adjustment of parameters such as frequency and amplitude of various signal waveforms such as sine wave, square wave, triangle wave, etc., and can realize the adjustment of parameters such as phase of sine wave signal, duty cycle of square wave, waveform slope of triangle wave, etc. At the same time, it can also realize the adjustment of other waveform-related parameters after the modulation combination of various signals such as sine wave, square wave, triangle wave, etc.
[0179] As a third example, the signal generation module of the signal generator is composed of an STM32F767 microcontroller unit and an AD5689 digital-to-analog conversion chip; the signal offset module and the signal gain / compensation module are composed of addition / differential / co-directional amplifier circuits based on an OPA354 operational amplifier chip, an AD633 multiplier circuit, and an inverter circuit based on a TPS60400 charge pump chip.
[0180] like Figure 6 As shown, the initial sine wave / square wave / triangle wave digital signal S D1 , amplitude control digital signal S D2 , DC offset digital signal S D3 , generated by the STM32F767 microcontroller unit through a direct digital frequency synthesis (DDS) algorithm. Subsequently, the initial sine wave / square wave / triangle wave digital signal S D1 , amplitude control digital signal S D2 , DC offset digital signal S D3 Input to the AD5689 digital-to-analog converter chip to obtain the initial sine wave / square wave / triangle wave analog signal S A1 , amplitude control analog signal S A2 , DC offset analog signal S A3 The initial sine wave / square wave / triangle wave analog signal S A1 , amplitude control analog signal S A2 Input to AD633 multiplier circuit to obtain amplitude adjustable sine wave / square wave / triangle wave signal S A1(*A2) The above DC offset analog signal S A3 That is the DC offset signal S DC The DC offset signal is input into the TPS60400 charge pump chip circuit to obtain the reverse DC offset signal S DC(-1) .
[0181] Since the initial sine wave / square wave / triangle wave analog signal S generated by the signal generation module A1 , amplitude control analog signal S A2 , DC offset analog signal S A3The signals are all positive signals, and are not positive-negative symmetrical or positive-negative asymmetrical signals. Therefore, the initial sine wave / square wave / triangular wave analog signal S A1 The signal is converted into positive and negative symmetrical or positive and negative asymmetrical signals. A1(*A2) and the reverse DC offset signal S DC(-1) Input to the OPA354 based summing amplifier to get a DC offset sine wave / square wave / triangle wave signal S shft ,like Figure 7 (a), where R is a resistor; or the amplitude-adjustable sine wave / square wave / triangle wave signal S A1(*A2) and the reverse DC offset signal S DC Input to the OPA354-based differential amplifier to obtain a DC-biased sine / square / triangle wave signal S shift ,like Figure 7 (b) is shown, where R is a resistor. By adjusting the DC offset of the sine wave / triangle wave signal, the symmetry and asymmetry of the sine wave / triangle wave signal can be achieved; by adjusting the DC offset of the square wave signal and the duty cycle value, the symmetry and asymmetry of the square wave signal can be achieved. For the phase offset of the signal generated by the signal generator in the embodiment of the present application, the sine wave signal and the phase offset signal (sine wave signal) generated by the signal generation module are input into the signal modulation circuit based on OPA354 to obtain the phase-shifted sine wave signal S shift .
[0182] like Figure 8 As shown, the signal gain / compensation module can gain or compensate the amplitude of the sine wave / square wave / triangle wave signal to increase, decrease or restore the signal amplitude. shft Input to the same-direction amplifier as OPA354, output the sine wave / square wave / triangle wave signal S after gain or compensation out The schematic diagram of the sine wave / square wave / triangle wave signal gain / compensation circuit based on the OPA354 co-directional amplifier is as follows: Figure 8 As shown, R, R g Adjust resistor for gain / compensation factor.
[0183] Based on the above signal generator, a square wave signal is used as an example for explanation. The signal generation module generates a square wave signal with a low level of 0, a high level of 2.5V, and a duty cycle of 50%. Fig. 9 The square wave signal is input to the OPA345 summing amplifier (such as Fig.10As shown), the DC offset of the signal is -1.25V, thereby obtaining a positive and negative symmetrical square wave signal with a low level of -1.25V, a high level of 1.25V, and a duty cycle of 50%, as shown in FIG. Fig. 9 The waveform is shown in the oscilloscope XSC2; then the offset square wave signal is input to the OPA354 co-directional amplifier (such as Fig.10 As shown in FIG. 1 , the gain / compensation coefficient of the unidirectional amplifier is 2, thereby obtaining a positive and negative symmetrical square wave signal with a low level of -2.5V, a high level of 2.5V, and a duty cycle of 50%, as shown in FIG. Fig.10 The waveform is shown on the oscilloscope XSC3.
[0184] The positive and negative symmetrical and asymmetrical signal generator for electrical stimulation control provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented in the method embodiment are not described here.
[0185] The positive and negative symmetrical and asymmetric signal generator for electrical stimulation control in the embodiments of the present application can execute the positive and negative symmetrical and asymmetric signal generation method for electrical stimulation control provided in the embodiments of the present application, and the implementation principle is similar. The actions performed by each module and unit in the positive and negative symmetrical and asymmetric signal generator for electrical stimulation control in each embodiment of the present application correspond to the steps in the positive and negative symmetrical and asymmetric signal generation method for electrical stimulation control in each embodiment of the present application. For the detailed functional description of each module of the positive and negative symmetrical and asymmetric signal generator for electrical stimulation control, please refer to the description in the corresponding positive and negative symmetrical and asymmetric signal generation method for electrical stimulation control shown in the previous text, which will not be repeated here.
[0186] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control, characterized in that: The method comprises: Perform analog-to-digital conversion on the digital signal to generate an initial target signal, an amplitude control signal, and a DC offset signal; Based on the initial target signal and the amplitude control signal, obtaining an amplitude-controllable target signal; Inputting the DC offset signal into an inverter to obtain a reverse DC offset signal; Based on the DC offset signal and the target signal with adjustable amplitude, or based on the reverse DC offset signal and the target signal with adjustable amplitude, obtaining a target signal with DC offset with adjustable amplitude; The target signal with a DC offset whose amplitude can be controlled is input into a co-directional amplifier for gain or compensation; Wherein, by regulating the DC offset signal or the reverse DC offset signal, the target signal of the DC offset with adjustable amplitude is regulated to be a symmetrical signal or an asymmetrical signal.
2. The method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control according to claim 1, characterized in that: The target signal is a sine wave signal, a square wave signal, a triangle wave signal or other signals; The other signals are synthesized based on any one or more of a sine wave signal, a square wave signal and a triangle wave signal.
3. The method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control according to claim 2, characterized in that: The method further comprises: Inputting different initial sinusoidal wave signals into a signal modulator to obtain sinusoidal wave signals with phase shift; The phase-shifted sine wave signal is input into the same-direction amplifier for gain or compensation.
4. The method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control according to claim 1, characterized in that: The step of obtaining an amplitude-adjustable target signal based on the initial target signal and the amplitude-adjustable signal comprises: The initial target signal and the amplitude control signal are input into a multiplier to obtain an amplitude controllable target signal.
5. The method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control according to claim 1, characterized in that: The step of obtaining a target signal with an amplitude-adjustable DC offset based on the DC offset signal and the amplitude-adjustable target signal, or based on the reverse DC offset signal and the amplitude-adjustable target signal, comprises: The amplitude-adjustable target signal and the DC offset signal are input into an adder, or the amplitude-adjustable target signal and the reverse DC offset signal are input into a differentiator to obtain an amplitude-adjustable DC offset target signal.
6. The method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control according to claim 2, characterized in that: When the target signal is a sine wave signal or a triangular wave signal, if the absolute value of the amplitude of the DC offset signal or the reverse DC offset signal is half of the amplitude of the amplitude-adjustable target signal, the target signal of the amplitude-adjustable DC offset is a symmetrical signal; otherwise, the target signal of the amplitude-adjustable DC offset is an asymmetrical signal.
7. The method for generating positive and negative symmetrical and asymmetrical signals for electrical stimulation control according to claim 2, characterized in that: When the target signal is a square wave signal, if the absolute value of the amplitude of the DC offset signal or the reverse DC offset signal is half of the amplitude of the amplitude-adjustable target signal, and the duty cycle is 50%, then the target signal of the amplitude-adjustable DC offset is a symmetrical signal; otherwise, the target signal of the amplitude-adjustable DC offset is an asymmetrical signal.
8. A positive and negative symmetrical and asymmetrical signal generator for electrical stimulation control, characterized in that: The signal generator comprises: A signal generation module is used to perform analog-to-digital conversion on the digital signal to generate an initial target signal, an amplitude control signal and a DC offset signal; The signal generating module is further used to obtain an amplitude-adjustable target signal based on the initial target signal and the amplitude-adjusting signal; The signal generating module is further used to input the DC offset signal into an inverter to obtain a reverse DC offset signal; A signal offset module, used to obtain a target signal with an amplitude-adjustable DC offset based on the DC offset signal and the amplitude-adjustable target signal; or to obtain a target signal with an amplitude-adjustable DC offset based on the reverse DC offset signal and the amplitude-adjustable target signal; A signal gain / compensation module is used to input a target signal with an adjustable DC offset into a co-directional amplifier for gain or compensation; Wherein, by regulating the DC offset signal, the target signal of the DC offset with adjustable amplitude is symmetrical signal or asymmetrical signal.
9. The positive and negative symmetrical and asymmetrical signal generator for electrical stimulation control according to claim 1, characterized in that: The target signal is a sine wave signal, a square wave signal, a triangle wave signal or other signals; The other signals are synthesized based on any one or more of a sine wave signal, a square wave signal and a triangle wave signal.
10. The positive and negative symmetrical and asymmetrical signal generator for electrical stimulation control according to claim 9, characterized in that: The signal generator also includes a signal shift module, which is also used to input different initial sinusoidal wave signals into the signal modulator to obtain a sinusoidal wave signal with a phase shift; The signal gain / compensation module is also used to input the phase-shifted sinusoidal wave signal into the same-direction amplifier for gain or compensation.