Methods and devices for switching filters and medical apparatuses using the same
10126339 ยท 2018-11-13
Assignee
Inventors
Cpc classification
International classification
Abstract
Methods and devices for switching filters and medical apparatuses using the same are described. The method includes: detecting whether or not a frequency range of an input signal is changed from a first frequency range into a second frequency range; if changed, switching from a first filter to a second filter, and taking a sample value of the input signal at a current moment as an input value of the second filter at the current moment and sample values of the input signal at n moments before the current moment as input values of the second filter at the n moments, respectively, and taking output values of the first filter at m moments before the current moment as output values of the second filter at the m moments, to obtain an output value of the second filter at the current moment.
Claims
1. A method for switching filters, comprising: detecting, at a detecting component, that a frequency range of an input signal is changed from a first frequency range into a second frequency range, wherein the first frequency range is a frequency range within which a first filter is able to work, and the second frequency range is a frequency range within which a second filter is able to work; and switching, via one or more switches, from the first filter to the second filter comprising: pushing a sample value of the input signal at a current moment and sample values of the input signal at n moments before the current moment to the first filter in an order of n moments before the current moment and at the current moment; pushing the sample value of the input signal at the current moment and the sample values of the input signal at the n moments before the current moment to one or more delayers in n input branches of the first filter; activating, upon detection that the frequency range of the input signal is changed from the first frequency range into the second frequency range, the one or more switches at the current moment to push the sample values of the input signal at the n moments before the current moment and the sample value of the input signal at the current moment from the one or more delayers in the n input branches of the first filter to n delay-amplifier branches of the second filter; and taking output values of the first filter at m moments before the current moment as output values of the second filter at the m moments, to obtain an output value of the second filter at the current moment using the output values of first filter at the m moments, the sample value of the input signal at the current moment, and the sample values of the input signal at the n moments, wherein n and m are both positive integers.
2. The method according to claim 1, wherein, the step of taking a sample value of the input signal at a current moment as an input value of the second filter at the current moment and sample values of the input signal at n moments before the current moment as input values of the second filter at the n moments, respectively, and taking output values of the first filter at m moments before the current moment as output values of the second filter at the m moments, to obtain an output value of the second filter at the current moment comprises: setting the sample value of the input signal received by the second filter at the current moment and the sample values of the input signal received by the second filter at the n moments before the current moment as (X.sub.0, X.sub.1, . . . , X.sub.n), magnifying the sample values (X.sub.0, X.sub.1, . . . , X.sub.n) according to each corresponding magnification factor (c.sub.0, c.sub.1, . . . , c.sub.n) of the second filter, and summing the magnified sample values to obtain a first sum value S.sub.x; then setting the output values of the second filter at the m moments before the current moment as output values (Y.sub.1, . . . , Y.sub.m) of the first filter at the m moments, magnifying the output values (Y.sub.1, . . . , Y.sub.m) according to each corresponding magnification factor (d.sub.1, . . . , d.sub.m) of the second filter, and summing the magnified output values (Y.sub.1, . . . , Y.sub.m) to obtain a second sum value S.sub.y; and adding the first sum value S.sub.x and the second sum value S.sub.y to obtain the output value Y=S.sub.x+S.sub.y of the second filter at the current moment.
3. The method according to claim 2, before the step of magnifying the sample values (X.sub.0, X.sub.1, . . . , X.sub.n) according to each corresponding magnification factor (c.sub.0, c.sub.1, . . . , c.sub.n) of the second filter, and summing the magnified sample values to obtain a first sum value S.sub.x, further comprising: setting part or all of X.sub.1, . . . , X.sub.n to equal to a first specified value, wherein the first specified value is any one of X.sub.1, . . . , X.sub.n, or the first specified value is an average value of X.sub.1, . . . , X.sub.n or a weighted value of X.sub.1, . . . , X.sub.n.
4. The method according to claim 2, before the step of magnifying the output values (Y.sub.1, . . . , Y.sub.m) according to each corresponding magnification factor (d.sub.1, . . . , d.sub.m) of the second filter, and summing the magnified output values (Y.sub.1, . . . , Y.sub.m) to obtain a second sum value S.sub.y, further comprising: setting part or all of Y.sub.1, . . . , Y.sub.m to equal to a second specified value, wherein the second specified value is any one of Y.sub.1, . . . , Y.sub.m, or the second specified value is an average value of Y.sub.1, . . . , Y.sub.m or a weighted value of Y.sub.1, . . . , Y.sub.m.
5. A device for switching filters, comprising: a detecting component configured to detect whether or not a frequency range of an input signal is changed from a first frequency range into a second frequency range, wherein the first frequency range is a frequency range within which a first filter is able to work, and the second frequency range is a frequency range within which a second filter is able to work; n input branches of the first filter configured to receive a sample value of the input signal at a current moment and sample values of the input signal at n moments before the current moment to the first filter in an order of n moments before the current moment and at the current moment; one or more delayers in the n input branches of the first filter configured to receive the sample value of the input signal at the current moment and the sample values of the input signal at the n moments before the current moment; one or more switches configured to switch from the first filter to the second filter when the frequency range of the input signal is changed from the first frequency range into the second frequency range at the current moment to push, upon detection that the frequency range of the input signal is changed from the first frequency range into the second frequency range, the sample values of the input signal at the n moments before the current moment and the sample value of the input signal at the current moment from the one or more delayers in the n input branches of the first filter to n delay-amplifier branches of the second filter; and an output value obtaining component configured to take output values of the first filter at m moments before the current moment as output values of the second filter at the m moments, to obtain an output value of the second filter at the current moment using the output values of first filter at the m moments, the sample value of the input signal at the current moment, and the sample values of the input signal at the n moments, wherein n and m are both positive integers.
6. The device according to claim 5, wherein the output value obtaining component is configured to set the sample value of the input signal received by the second filter at the current moment and the sample values of the input signal received by the second filter at the n moments before the current moment as (X.sub.0, X.sub.1, . . . , X.sub.n), magnify the sample values (X.sub.0, X.sub.1, . . . , X.sub.n) according to each corresponding magnification factor (c.sub.0, c.sub.1, . . . , c.sub.n) of the second filter, and sum the magnified sample values to obtain a first sum value S.sub.x; then set the output values of the second filter at the m moments before the current moment as output values (Y.sub.1, . . . , Y.sub.m) of the first filter at the m moments, magnify the output values (Y.sub.1, . . . , Y.sub.m) according to each corresponding magnification factor (d.sub.1, . . . , d.sub.m) of the second filter, and sum the magnified output values to obtain a second sum value S.sub.y; and add the first sum value S.sub.x and the second sum value S.sub.y to obtain the output value Y=S.sub.x+S.sub.y of the second filter at the current moment.
7. The device according to claim 6, the device further comprising a first value setting component, wherein the first value setting component is configured to set part or all of X.sub.1, . . . , X.sub.n to equal to a first specified value, wherein the first specified value is any one of X.sub.1, . . . , X.sub.n, or the first specified value is an average value of X.sub.1, . . . , X.sub.n or a weighted value of X.sub.1, . . . , X.sub.n.
8. The device according to claim 6, the device further comprising a second value setting component, wherein the second value setting component is configured to set part or all of Y.sub.1, . . . , Y.sub.m to equal to a second specified value, wherein the second specified value is any one of Y.sub.1, . . . , Y.sub.m, or the second specified value is an average value of Y.sub.1, . . . , Y.sub.m or a weighted value of Y.sub.1, . . . , Y.sub.m.
9. A medical detecting apparatus, wherein the medical detecting apparatus comprises: a detecting component configured to detect whether or not a frequency range of an input signal is changed from a first frequency range into a second frequency range, wherein the first frequency range is a frequency range within which a first filter is able to work, and the second frequency range is a frequency range within which a second filter is able to work; n input branches of the first filter configured to receive a sample value of the input signal at a current moment and sample values of the input signal at n moments before the current moment to the first filter in an order of n moments before the current moment and at the current moment; one or more delayers in the n input branches of the first filter configured to receive the sample value of the input signal at the current moment and the sample values of the input signal at the n moments before the current moment; one or more switches configured to switch from the first filter to the second filter when the frequency range of the input signal is changed from the first frequency range into the second frequency range at the current moment to push, upon detection that the frequency range of the input signal is changed from the first frequency range into the second frequency range, the sample values of the input signal at the n moments before the current moment and the sample value of the input signal at the current moment from the one or more delayers in the n input branches of the first filter to n delay-amplifier branches of the second filter; and an output value obtaining component configured to take output values of the first filter at m moments before the current moment as output values of the second filter at the m moments, to obtain an output value of the second filter at the current moment using the output values of first filter at the m moments, the sample value of the input signal at the current moment, and the sample values of the input signal at the n moments, wherein n and m are both positive integers.
10. The medical detecting apparatus according to claim 9, wherein the output value obtaining component is configured to set the sample value of the input signal received by the second filter at the current moment and the sample values of the input signal received by the second filter at the n moments before the current moment as sample values (X.sub.0, X.sub.1, . . . , X.sub.n), magnify the sample values (X.sub.0, X.sub.1, . . . , X.sub.n) according to each corresponding magnification factor (c.sub.0, c.sub.1, . . . , c.sub.n) of the second filter, and sum the magnified sample values to obtain a first sum value S.sub.x; then set the output values of the second filter at the m moments before the current moment as output values (Y.sub.1, . . . , Y.sub.m) of the first filter at the m moments, magnify the output values (Y.sub.1, . . . , Y.sub.m) according to each corresponding magnification factor (d.sub.1, . . . , d.sub.m) of the second filter, and sum the magnified output values to obtain a second sum value S.sub.y; and add the first sum value S.sub.x and the second sum value S.sub.y to obtain the output value Y=S.sub.x+S.sub.y of the second filter at the current moment.
11. The medical detecting apparatus according to claim 10, the medical detecting apparatus further comprising a first value setting component, wherein the first value setting component is configured to set part or all of X.sub.1, . . . , X.sub.n to equal to a first specified value, wherein the first specified value is any one of X.sub.1, . . . , X.sub.n, or the first specified value is an average of X.sub.1, . . . , X.sub.n or a weighted value of X.sub.1, . . . , X.sub.n.
12. The medical detecting apparatus according to claim 10, the medical detecting apparatus further comprising a second value setting component, wherein the second value setting component is configured to set part or all of Y.sub.1, . . . , Y.sub.m to equal to a second specified value, wherein the second specified value is any one of Y.sub.1, . . . , Y.sub.m, or the second specified value is an average value of Y.sub.1, . . . , Y.sub.m or a weighted value of Y.sub.1, . . . , Y.sub.m.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) In order to illustrate the embodiments of the disclosure or existing technical solutions more clearly, a brief description of drawings that assists the description of embodiments of the disclosure or existing art will be provided below. It would be apparent that the drawings in the following description are only for some of the embodiments of the disclosure. A person having ordinary skill in the art will be able to obtain other drawings on the basis of these drawings without paying any creative work.
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION OF ILLUSTRATED EMBODIMENTS
(6) The following, in conjunction with the accompanying drawings according to various embodiments, clearly describes technical proposals according to various embodiments. It would be obvious that the described embodiments are part but not all of embodiments. All other embodiments obtained by persons having ordinary skill without paying any creative work based on the illustrated embodiments should all be within the protection scope according to various embodiments.
(7) Referring to
(8) Step 210: detecting whether or not a frequency range of an input signal is changed from a first frequency range into a second frequency range.
(9) Referring to
(10) Step 220: switching from the first filter 310 to the second filter 320.
(11) Step 230: taking a sample value of the input signal at a current moment as an input value of the second filter 320 at the current moment and sample values of the input signal at n moments before the current moment as input values of the second filter 320 at said n moments, and taking output values of the first filter 310 at m moments before the current moment as output values of the second filter 320 at said m moments, to obtain an output value of the second filter 320 at the current moment. Specifically, the sample value of the input signal received by the second filter 320 at the current moment can be set as a sample value X.sub.0, and the sample values of the input signal received by the second filter 320 at n moments before the current moment can be set as sample values (X.sub.1, . . . , X.sub.n, respectively. After the sample values and X.sub.0 and (X.sub.1, . . . , X.sub.n) are magnified according to each corresponding magnification factor (c.sub.0, c.sub.1, . . . , c.sub.n) of the second filter 320, the magnified sample values may be summed to obtain a first sum value S.sub.x. The output values of the second filter 320 at m moments before the current moment can be set as output values (Y.sub.1, . . . , Y.sub.m) of the first filter 310 at said m moments, respectively.
(12) After the output values (Y.sub.1, . . . , Y.sub.m) are magnified according to each corresponding magnification factor (d.sub.1, . . . , d.sub.m) of the second filter 320, the magnified output values may be summed to obtain a second sum value S.sub.y. Then the first sum value S.sub.x and the second sum value S.sub.y may be added to obtain the output value Y=S.sub.x+S.sub.y of the second filter 320 at the current moment.
(13) More specifically, as shown in
(14) At the current moment, the switch 330 can be activated, so that the sampled value X.sub.0 in an input branch of the first filter 310 can be input to an amplifier with a magnification factor of c.sub.0 in an input branch of the second filter 320 to obtain an amplified signal c.sub.0X.sub.0, and the sampled value X.sub.1 of the delayer at the delay-amplifier branch of the first input end of the first filter 310 can be input to an amplifier with a magnification factor of c.sub.1 in the delay-amplifier branch of the first input end of the second filter 320 to obtain an amplified signal c.sub.1X.sub.1, . . . , and the like, the sampled value X.sub.n of the delayer at the delay-amplifier branch of the n-th input end of the first filter 310 can be input to an amplifier with a magnification factor of c.sub.n in the delay-amplifier branch of the n-th input end of the second filter 320 to obtain an amplified signal c.sub.nX.sub.n.
(15) The amplified signal c.sub.0X.sub.0, in the input branch of the second filter 320 and all the amplified signals in the delay-amplifier branches from the first to the n-th input end may be input to an adder 321, and be added by the adder 321 to obtain a first sum value S.sub.x, where the first sum value is: S.sub.x=c.sub.0X.sub.0+c.sub.1X.sub.1+ . . . +c.sub.nX.sub.n.
(16) At output ends of the first filter 310, output signals may be output from the first filter 310 in the order of Y.sub.m, . . . , Y.sub.1. At the m-th moment before the current moment, at the same time as that an output signal Y.sub.m is output from the first filter 310, the output signal Y.sub.m may be pushed to a delayer at a delay-amplifier branch of a first output end; at the (m1)th moment before the current moment, the output signal Y.sub.m-1 may be output from the first filter 310, in the meantime, the output signal Y.sub.m may be pushed to a delayer at a delay-amplifier branch of a second output end, while the output signal Y.sub.m-1 may be pushed to a delayer at a delay-amplifier branch of the first output end; and so on, until, at the current moment, the output signal Y.sub.1 may be pushed to a delayer at a delay-amplifier branch of the first output end, . . . , the output signal Y.sub.m may be pushed to a delayer at a delay-amplifier branch of an m-th output end.
(17) At the current moment, the switch 330 can be activated, so that the output value Y.sub.1 for the delayer at the delay-amplifier branch of the first output end of the first filter 310 can be input to an amplifier with a magnification factor d.sub.1 in the delay-amplifier branch of the first output end of the second filter 320, thus obtaining an amplified signal d.sub.1Y.sub.1, and the output value Y.sub.2 of the delayer at the delay-amplifier branch of the second output end of the first filter 310 can be input to an amplifier with a magnification factor d.sub.2 of the second filter 320, thus obtaining an amplified signal d.sub.2Y.sub.2; . . . ; the output value Y.sub.m of the delayer at the delay-amplifier branch of the m-th output end of the first filter 310 can be input to an amplifier with a magnification factor d.sub.m of the second filter 320, thus obtaining an amplified signal d.sub.mY.sub.m.
(18) The amplified signals in the delay-amplifier branches from the first to the m-th output end may be input to the adder 321, and then be added by the adder 321 to obtain a second sum value S.sub.y, where the second sum value is S.sub.y=d.sub.1Y.sub.1+ . . . +d.sub.mY.sub.m. The first sum value S.sub.x, and the second sum value S.sub.y may be summed to obtain the output value Y=(c.sub.0X.sub.0+c.sub.1X.sub.1+ . . . +c.sub.nX.sub.n)+(d.sub.1Y.sub.1+ . . . +d.sub.mY.sub.m) of the second filter 320 at the current moment.
(19) It should be understood that the structures of the first filter 310 and the second filter 320 described-above are just one embodiment of the current disclosure, and that in other embodiments, the first filter 310 and the second filter 320 may also include other structures, which will not be restricted here in embodiments of the current disclosure.
(20) According to the embodiments of the current disclosure, at the moments after switching the filters, the sample value of the input signal received by the second filter 320 at the current moment can be set as a sample value X.sub.0, and the sample values of the input signal received by the second filter 320 at n moments before the current moment can be set as sample values (X.sub.1, . . . , X.sub.n), respectively. After the sample values X.sub.0 and (X.sub.1, . . . , X.sub.n) are magnified according to each corresponding magnification factor (c.sub.0, c.sub.1, . . . , c.sub.n) of the second filter 320, the magnified sample values may be summed to obtain a first sum value. The output values of the second filter 320 at m moments before the current moment can be set as output values (Y.sub.1, . . . , Y.sub.m) of the first filter at said m moments, respectively. After the output values (Y.sub.1, . . . , Y.sub.m) are magnified according to each corresponding magnification factor (d.sub.1, . . . , d.sub.m) of the second filter 320, the magnified output values may be summed to obtain a second sum value S.sub.y. Then the first sum value S.sub.x and the second sum value S.sub.y may be added to obtain the output value of the Y=(c.sub.0X.sub.0+c.sub.1X.sub.1+ . . . +c.sub.nX.sub.n)+(d.sub.1Y.sub.1+ . . . +d.sub.mY.sub.m) of the second filter 320 at the current moment. Thus, the sudden change of the output values caused by the filter switching could be avoided.
(21) It should be understood that, in other embodiments, the sample value X.sub.0 at the current moment and the sample values (X.sub.1, . . . , X.sub.n) of the input signal at the n moments before the current moment can be set to be a first specified value, as input values of the second filter 320, where, the first specified value is any one of X.sub.1, . . . , X.sub.n). For example, the first specified value can be set to be X.sub.1, after the first specified value is magnified according to each corresponding magnification factor (c.sub.0, c.sub.1, . . . , c.sub.n) of the second filter 320, the magnified sample values may be summed to obtain a first sum value S.sub.x=c.sub.0X.sub.1+c.sub.1X.sub.1+ . . . +c.sub.nX.sub.1. Additionally, the output values (Y.sub.1, . . . , Y.sub.m) of the first filter 310 at the in moments before the current moment can be set to be a second specified value, as output values of the second filter 320 at the m moments, where, the second specified value is any one of Y.sub.1, . . . , Y.sub.m. For example, the second specified value can be set to be Y.sub.m, after the second specified value is magnified according to each corresponding magnification factor (d.sub.1, . . . , d.sub.m) of the second filter 320, the magnified output values may be summed to obtain a second sum value S.sub.y=d.sub.1Y.sub.m+ . . . +d.sub.mY.sub.m. Finally, the first sum value S.sub.x and the second sum value S.sub.y can be added to obtain an output value Y=(c.sub.0X.sub.0=c.sub.1X.sub.1+ . . . +c.sub.nY.sub.n)+(d.sub.1Y.sub.1+ . . . +d.sub.mY.sub.m) of the second filter 320 at the current moment.
(22) In other embodiments, it should be understood that part of the sample values (X.sub.0, X.sub.1, . . . , X.sub.n) can be set to equal to the first specified value, and the others to remain unchanged; furthermore, part of the output values (Y.sub.1, . . . , Y.sub.m) can be set to equal to the second specified value, and the others to remain unchanged. Or, the first specified value can be set to equal to an average value of (X.sub.0, X.sub.1, . . . , X.sub.n) or a weighted value of (X.sub.0, X.sub.1, . . . , X.sub.n). Accordingly, the second specified value can be set to equal to an average value or a weighted value of (Y.sub.1, . . . , Y.sub.m).
(23) Referring to
(24) The detecting component 410 may be configured to detect whether or not a frequency range of an input signal is changed from a first frequency range into a second frequency range, wherein the first frequency range is a frequency range within which a first filter is able to work, and the second frequency range is a frequency range within which a second filter is able to work.
(25) The switching component 420 may be configured to switch from the first filter to the second filter when the frequency range of the input signal is changed from the first frequency range into the second frequency range.
(26) The output value obtaining component 430 may be configured to take a sample value of the input signal at a current moment as an input value of the second filter at the current moment and sample values of the input signal at n moments before the current moment as input values of the second filter at the n moments, respectively, and take output values of the first filter at m moments before the current moment as output values of the second filter at the m moments, to obtain an output value of the second filter at the current moment, wherein n and m are both positive integers.
(27) In an optional embodiment, the output value obtaining component 430 may be configured to set the sample value of the input signal received by the second filter at the current moment and the sample values of the input signal received by the second filter at the n moments before the current moment as sample values (X.sub.0, X.sub.1, . . . , X.sub.n) magnifying the sample values (X.sub.0, X.sub.1, . . . , X.sub.n) according to each corresponding magnification factor (c.sub.0, c.sub.1, . . . , c.sub.n) of the second filter, and summing the magnified sample values to obtain a first sum value S.sub.x; then set the output values of the second filter at the m moments before the current moment as output values (Y.sub.1, . . . , Y.sub.m) of the first filter at the m moments, magnifying the output values (Y.sub.1, . . . , Y.sub.m) according to each corresponding magnification factor (d.sub.1, . . . , d.sub.m) of the second filter, and summing the magnified output values to obtain a second sum value S.sub.y; and add the first sum value S.sub.x and the second sum value S.sub.y to obtain the output value Y=S.sub.x+S.sub.y of the second filter at the current moment.
(28) In an optional embodiment, the device for switching filters 400 further includes a first value setting component, the first value setting component may be configured to set all of X.sub.1, . . . , X.sub.n to equal to a first specified value, where, the first specified value is any one of X.sub.1, . . . , X.sub.n.
(29) In an optional embodiment, the device for switching filters 400 further includes a second value setting component, the second value setting component may be configured to set all of Y.sub.1, . . . , Y.sub.m to equal to a second specified value, where, the second specified value is any one of Y.sub.1, . . . , Y.sub.m. The steps of the method for switching filters can be implemented in the device for switching filters 400, which can refer to
(30) A medical detecting apparatus is further provided in one embodiment of the current disclosure, wherein, the medical detecting apparatus includes the device for switching filters 400 as described above.
(31) A person having ordinary skill in the art can realize that part or whole of the processes in the methods according to the above embodiments may be implemented by a computer program instructing relevant hardware. The program may be stored in a computer readable storage medium. When executed, the program may execute processes in the above-mentioned embodiments of methods. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), et al.
(32) The foregoing descriptions are merely embodiments of the current disclosure but not intended to limit the protection scope of the current disclosure. Any variation or replacement made by persons of ordinary skill in the art without departing from the spirit of the current disclosure shall fall within the protection scope of the current disclosure. Therefore, the scope of the current disclosure shall be subject to be appended claims.