lesson 15 bme 301 - bioinstrumentationbme 301 - bioinstrumentation by the end of this lesson...

13
Lesson 15 BME 301 - Bioinstrumentation By the end of this lesson students will be able to: Design passive high- and low-pass filters Design active high- and low-pass filters Calculate the cutoff frequency of filters I. Filters A. Filters are circuits used to remove particular frequencies from a signal. B. Literally thousands of circuit designs for different filters; all have trade-offs. C. Can also have software filters, but hardware (circuit) filters are generally more desirable because they filter the signal it becomes digitized II. RC filters (passive) A. Consider the following RC circuit B. What is the transfer function ? V o V i of 1 13

Upload: others

Post on 24-Feb-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

Lesson 15BME 301 - Bioinstrumentation

By the end of this lesson students will be able to:• Design passive high- and low-pass filters• Design active high- and low-pass filters• Calculate the cutoff frequency of filters

I. FiltersA. Filters are circuits used to remove particular frequencies

from a signal.B. Literally thousands of circuit designs for different filters;

all have trade-offs.C. Can also have software filters, but hardware (circuit) filters

are generally more desirable because they filter the signal it becomes digitized

II. RC filters (passive)A. Consider the following RC circuit

B. What is the transfer function ?Vo

Vi

of 1 13

Page 2: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

C. How does this circuit behave at different frequencies? Plot the magnitude vs. frequency to find out.

D. Student question: What type of filter is the circuit shown above, high-pass or low-pass?

E. Another way to think about how the circuit behaves at different frequencies.

of 2 13

1 10 100 1000 104ω (rad/s)

-40

-30

-20

-10

|H(jω)| (dB)

Page 3: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

F. To quantify filters, we need to calculate the corner frequency. We looked at the corner frequency last time, but how do you calculate it?

G. Let’s swap the position of the R & C in the previous circuit and see what happens.

H. Here is how we calculate the corner frequency now.

of 3 13

Page 4: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

I. Here is what the magnitude plot looks like in this rearranged RC circuit.

III. Qualitative description of filteringA. Here is a 50 Hz sine wave

B. Here is a 500 Hz sine wave

of 4 13

1 10 100 1000 104ω (rad/s)

-60

-50

-40

-30

-20

-10

|H(jω)| (dB)

0.01 0.02 0.03 0.04 0.05Time (sec)

-1.0

-0.5

0.5

1.0

Volts (V)

0.01 0.02 0.03 0.04 0.05Time (sec)

-1.0

-0.5

0.5

1.0

Volts (V)

Page 5: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

C. If I add the two sine waves together, I get this

D. Now, I filter this signal with a passive low-pass filter with a corner of 100 Hz. Here is what my signal looks like

1. Notice that the high-frequency sine wave (500 Hz) has become smaller in amplitude whereas the low-frequency sine wave (50 Hz) looks about the same amplitude.

2. Specifically how much has each changed? I need to look at my transfer function and calculate it. In other words, find the magnitude of

j50RC1 + j50RC

= 0.894

of 5 13

0.01 0.02 0.03 0.04 0.05Time (sec)

-2

-1

1

2

Volts (V)

0.01 0.02 0.03 0.04 0.05Time (sec)

-2

-1

1

2

Volts (V)

0.01 0.02 0.03 0.04 0.05Time (sec)

-1.0

-0.5

0.5

1.0

Volts (V)

Filter

Page 6: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

and

E. Now let’s look at a high pass filterF. Here is the sum of the 50 Hz and 500 Hz sine wave again

for reference. I run it through a passive high-pass filter with a corner of 100 Hz, and this is what I get

G. Notice now that the magnitude of the 50 Hz sine wave is less (0.447 times) , while the magnitude of the 500 Hz sine wave remains about the same (0.980 times).

H. How to solve filter design problems. First, read the problem carefully, then follow these steps.1. Figure out if you need a passive or active filter.2. Decide what type of filter you need (high-pass, low-

pass, band-pass, band-stop).3. Pick the corner frequency(ies) that you need and then

calculate appropriate component values.I. Student problem. Design a passive RC filter to remove

breathing noise from an ECG. Assume the ECG signal has frequencies ranging from 2–150 Hz and that breathing noise has frequencies of < 0.5 Hz.

j500RC1 + j500RC

= 0.196

of 6 13

0.01 0.02 0.03 0.04 0.05Time (sec)

-2

-1

1

2

Volts (V)

Filter

0.01 0.02 0.03 0.04 0.05Time (sec)

-1.5

-1.0

-0.5

0.5

1.0

1.5

Volts (V)

Page 7: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

J. Here is an example showing how filtering can remove breathing noise from an ECG.

IV. Looking at signals in the frequency domainA. Sometimes it helps to look at signals in the frequency

domain to figure out how a filter works.B. Recall that any continuous signal can be represented by a

sum of sine and cosine waves. This is called a Fourier Series. Because each of these sine/cosine waves has a frequency, we can plot frequencies and amplitudes in the frequency domain to visualize our signal.

C. Here is the 50 Hz sine wave in the frequency domain:

of 7 13

0.01 0.02 0.03 0.04 0.05Time (sec)

-1.0

-0.5

0.5

1.0

Volts (V)

20 40 60 80 100 120 140Frequency (Hz)

-40

-20

0

20

40Mag (dB)

Time Domain Frequency Domain

Page 8: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

D. Here is the 500 Hz sine wave in the frequency domain:

E. Here is what they look like added together:

F. When I make a filter, I am reducing the amplitude of one or more of the sine waves. Here is the summed waveform before and after filtering.

of 8 13

0.01 0.02 0.03 0.04 0.05Time (sec)

-1.0

-0.5

0.5

1.0

Volts (V)

100 200 300 400 500 600Frequency (Hz)

-40

-20

0

20

40Mag (dB)

Time Domain Frequency Domain

0.01 0.02 0.03 0.04 0.05Time (sec)

-2

-1

1

2

Volts (V)

100 200 300 400 500 600Frequency (Hz)

-80

-60

-40

-20

0

20

40Mag (dB)

Time Domain Frequency Domain

100 200 300 400 500 600Frequency (Hz)

-80

-60

-40

-20

0

20

40Mag (dB)

Low-pass filtered

100 200 300 400 500 600Frequency (Hz)

-80

-60

-40

-20

0

20

40Mag (dB)

High-pass filtered

Page 9: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

G. Here is what a 50 Hz square wave looks like in the frequency domain

V. Types of filtersA. Low-passB. High-passC. NotchD. Bandpass

VI. Active filtersA. Use op-amps + resistors and capacitors to make active

filters.B. You can amplify and filter the signal at the same time

of 9 13

100 200 300 400 500 600Frequency (Hz)

-40

-20

0

20

40Mag (dB)

Page 10: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

C. We will be using the inverting amplifier as the starting circuit to build all our filters. Do not use any other configuration, because it will change the transfer function!

D. Low pass1. Circuit

2. Transfer function

vo

vi= −

Zf

Zi= −

Rf

Ri ( 1jωRf Cf + 1 )

of 10 13

Page 11: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

3. Magnitude plot (assuming Ω, Ω, and µF).

E. High Pass1. Circuit

2. Transfer function

3. Magnitude plot (assuming same and as low-pass with µF).

Rf = 10000 Ri = 1000Cf = 0.1

vo

vi= −

Zf

Zi= −

Rf

Ri

jωRiCi

1 + jωRiCi

Rf RiCi = 100

of 11 13

1 10 100 1000 104 105ω (rad/s)

-20

-10

10

20

|H(jω)| (dB)

1 10 100 1000 104 105ω (rad/s)

-20

-10

10

20

|H(jω)| (dB)

Page 12: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

F. Bandpass1. Circuit

2. Transfer function

3. Magnitude plot (assuming same values from HP and LP above).

G. Notch1. Circuit

of 12 13

1 10 100 1000 104 105ω (rad/s)

-20

-10

10

20

|H(jω)| (dB)

Page 13: Lesson 15 BME 301 - BioinstrumentationBME 301 - Bioinstrumentation By the end of this lesson students will be able to: • Design passive high- and low-pass filters • Design active

2. Magnitude plot

H. Student example. Design an active filter that amplifies an ECG to at least 1 V and filters out wireless communications noise. Assume the ECG contains frequencies in the range 2–150 Hz and has an amplitude of 1 mV. Assume wireless noise has frequencies of 30 kHz and above.

of 13 13