e40m bode plots, db - stanford university · inventing bode plots used to describe the frequency...

32
M. Horowitz, J. Plummer, R. Howe 1 E40M Bode Plots, dB

Upload: others

Post on 16-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 1

E40M Bode Plots, dB

Page 2: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 2

Reading

•  Reader –  7.1-7.2 – Bode Plots

Page 3: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 3

EKG Lab

•  Concepts –  Amplifiers –  Impedance –  Noise –  Safety –  Filters

•  Components –  Capacitors –  Inductors –  Instrumentation and

Operational Amplifiers

In this project we will build an electrocardiagram (ECG or EKG). This is a noninvasive device that measures the electrical activity of the heart using electrodes placed on the skin.

Page 4: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 4

vin vout R=11KΩ

C=0.1µF

0

0.2

0.4

0.6

0.8

1

0 500 1000 1500 2000

Gain vs. Freq

Vout

FRCjFCj

R

FCjVV

in

out

ππ

π2*11

2*1

2*1

+=

+=

Analyzing RC Circuits Using Impedance – Review (Low Pass Filter)

Page 5: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 5

vin vout

R=110KΩ

C=0.1µF

FRCjFRCj

FCjR

RVV

in

out

ππ

π2*12*

2*1 +

=+

=

RC = 11ms; 2πRC is about 70ms

0 0.2 0.4 0.6 0.8

1

0 50 100 150 200

Gain vs. Freq

Vout

Analyzing RC Circuits Using Impedance – Review (High Pass Filter)

Page 6: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 6

Analyzing RC Circuits Using Impedance – Review (Band Pass Filter)

0

0.2

0.4

0.6

0.8

1

1.2

0 200 400 600 800 1000

Gain of Filters

Low Pass High Pass Band Pass

Vout/Vin

F (Hz)

VoutVin

=j∗2πFR4C3

1+ j∗2πF(R4C3 +R1C2 +R1C3)+ j∗2πF( )2R1C2R4C3vin

R1=11K

C2=0.1µF

vout

R4=110K

C3=0.1µF v1

•  We’ll use a filter

that operates like this in the ECG lab project.

Page 7: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 7

BODE PLOTS

Page 8: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 8

Our Plots Are Not Very Good

•  Most of the plot is for the “high frequency” –  Your ear is very interested in each octave (2x) in freq –  If you plot the full audio spectrum (20-20kHz)

•  50% of the plot will be from 10-20kHz –  And that is only one octave of ten!

•  You won’t be able to see the first five octaves!

0

0.2

0.4

0.6

0.8

1

1.2

0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000

GainofFilters

LowPass HighPass BandPass

Page 9: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 9

More Plot Issues

•  The plots usually are proportional to: –  Constant, or F or F-1 or F2 or F-2 –  It would be great if these were easy to see on a plot

0

0.2

0.4

0.6

0.8

1

1.2

0 200 400 600 800 1000

Gain of Filters

Low Pass High Pass Band Pass

Page 10: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 10

There is an Easy Way to Fix Both Issues

•  Use a log-log plot –  That is plot the log(Gain) vs log(F) –  Usually labeled with Gain and F

•  But the spacing between numbers is their log •  Any power of F is a straight line log(Fn) = n* log(F)

So the slope of the line is the power of F

Freq 0.01

0.1

1

0.1 1 10 100 1000 10000 100000

Gain

Page 11: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 11

Example – Low Pass Filter

vin vout R=11KΩ

C=0.1µF

0

0.5

1

0 1000 2000

VoutVin

=

1j * 2πFC

R + 1j * 2πFC

=1

1+ j * 2πFRC=

11+ jF / Fc

0.01

0.1

1

0.1 1 10 100 1000 10000 100000

2πRC is about 7ms; Fc= 140Hz

Page 12: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 12

Low Pass

vin vout R=11KΩ

C=0.1µF

0

0.5

1

0 1000 2000

VoutVin

=

1j * 2πFC

R + 1j * 2πFC

=1

1+ j * 2πFRC=

11+ jF / Fc

0.01

0.1

1

0.1 1 10 100 1000 10000 100000

2πRC is about 7ms; Fc= 140Hz

Page 13: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 13

High-Pass

vin vout

R=110KΩ

C=0.1µF

FRCjFRCj

FCjR

RVV

in

out

ππ

π2*12*

2*1 +

=+

=

2πRC is about 70ms; F= 14Hz

0.01

0.1

1

0.1 1 10 100 1000 10000 100000 0

0.2 0.4 0.6 0.8

1

0 100 200

Page 14: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 14

Band Pass – Combining the Low and High Pass

0 0.2 0.4 0.6 0.8

1

0 500 1000 Band Pass

0.01

0.1

1

0.1 1 10 100 1000 10000

Band Pass vin

R1=11K

C2=0.1µF

vout

R4=110K

C3=0.1µF v1

Page 15: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 15

One More Trick With Log-Log Plots

•  Remember: log(A*B) = log(A) + log(B), and log(A/B) = lob(A) – log(B)

•  So:

–  Can add two lines •  One slope +1 •  One flat and then slope -1

FRCjFRCj

VV

in

out

ππ2*12*

+=

Log

Gain

Log F

Page 16: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 16

Log-Log Plot Tricks, cont’d •  Our bandpass filter earlier had a gain function of the form

•  If we can factor the polynomial, then we can add lines as on the last slide

VoutVin

=j∗2πFR2C2

1+ j∗2πF(R1C1+R2C2)+ j∗2πF( )2R1C1R2C2

VoutVin

=j∗2πFR2C2

1+ j∗2πFR1C1( )∗ 1+ j∗2πFR2C2( )

Log F

Log

Gain

Page 17: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 17

dB

Page 18: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 18

Use of Logarithmic Scales to Represent Wide Ranges

Page 19: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 19

dB

•  In many places you will see the symbol dB –  This is decibel –  It is a logarithmic measure of power gain

•  dB = 10 * log (Powerout/Powerin)

•  It is logarithmic so –  10dB is a 10x change in power –  20dB is a 100x change in power –  3dB is a 2x change in power

•  Since power is proportional to V2

–  A 10x change in voltage is a 100x change in power •  This is a 20dB change

–  6dB is a 2x change in voltage

Page 20: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 20

Plotting Gain vs. Frequency

•  Want to plot log(gain) vs. log(frequency)

•  dB is already log of the gain –  So the plots look semilog

•  Log of frequency in the x direction •  dB in the y direction

–  But this is the log-log plot that we want

•  Please remember that dB measures power –  10x in voltage = 20dB

Page 21: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 21

Plotting dB vs. Frequency

•  Consider the simple low pass filter we looked at earlier

vin vout R

C

Gain =VoutVin

=1

1+ j * 2πFRC=

11+ jF / Fc

GaindB = 20log101

1+ jF / Fc

⎝⎜⎜

⎠⎟⎟

= 20log10 1( )− 20log10 1+ jF / Fc( ) ≅ 0− 20log10 F / Fc( )

(assuming F is large and

neglecting the phase)

-20

-40

0

Freq

Hz 103 104 102 100 10

Gain

dB

Page 22: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 22

FYI – Hendrik Bode

•  Bode (1905 –1982) spent most of his career at Bell Labs.

•  He worked on control system theory and electronic filters and during WW II he worked on using radar information to direct antiaircraft guns to try to intercept enemy aircraft and missiles like the German V2 missile.

•  But today he’s best remembered for inventing Bode plots used to describe the frequency behavior of linear systems.

(Wikipedia)

Page 23: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 23

Plotting the Output

•  We use a Bode Plot to plot the transfer function of a circuit –  Remember that this is the log of gain vs. log of frequency

•  Remember, on log-log plot –  F, constant, 1/F, 1/F2 are all straight lines! Freq

Gain

dB 0

-20

-40

-60

-80

1 10 100 104 103 105 106

Freq

Hz

Page 24: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 24

Circuit Bode Plots

•  These are generally easy to draw –  Know the slopes at different frequency ranges

•  Plot those straight lines –  These lines will intercept at the F where the terms are equal

i.e. F = 1/2πτ = 1/2πRC

•  Actual curve will be close to the straight lines

dB

Log (F) F = 12πτ

Page 25: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 25

Example

vin vout C1

10nF C2

15nF R1

4.7kΩ

VoutVin

=ZR1 || ZC2

ZC1+ ZR1 || ZC2

ZR1 || ZC2 =ZR1∗ZC2ZR1+ ZC2

=R1

1+ 2πFR1C2

VoutVin

=

R11+ 2πFR1C21

2πFC1+

R11+ 2πFR1C2

=2πFR1C1

1+ 2πFR1 C1+C2( )

Fc =1

2πR1 C1+C2( )=1.35kHz

GaindB@HighF = 20logC1

C1+C2

⎝⎜⎜

⎠⎟⎟ = −7.96dB

Gain

dB

-20

-40

0

Freq

Hz 103 104 102 100 10

Page 26: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 26

EveryCircuit – Frequency Resonse

•  EveryCircuit can be used to calculate and plot Bode plots for circuits. We’ll demo this in class.

•  This is very useful for checking answers to HW problems or for developing understanding about circuit frequency response.

Page 27: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 27

WHAT DOES (1 + j*x) REALLY MEAN?

Bonus Section (Not on HW, Exams) See Class Reader For Details

Page 28: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 28

An Example - High Pass RC Filter Bonus Material – See Class Reader For Details

vin vout

R

C VoutVin

=R

R + 1j * 2πFC

=j * 2πFRC

1+ j * 2πFRC

(Electronic Tutorials)

2πFRC =1 or F = 12πRC

Page 29: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 29

•  Notice that when the two terms are the same, F = 1/2πRC –  The overall gain is -3dB –  This might seem right since -3dB is ½, BUT –  This is the power ratio!

•  The voltage ratio is only !

•  What is going on?

•  To understand, we’ll need to think about what (1 + j*x) means

3dB? Bonus Material – See Class Reader For Details

1/ 2

Page 30: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 30

•  1 + j*x means the waveform is the sum of –  A sinewave with amplitude 1 –  With a cosine wave with amplitude “x”

•  The good news is that this always results in a sinusoidal waveform –  With some phase shift between a sin and cos (+90˚) –  So we can write

–  And we want to find A and

Adding Sine and Cosine Waveforms Bonus Material – See Class Reader For Details

Asin 2πFt + φ( ) = sin 2πFt( )+ x ∗cos 2πFt( )φ

Page 31: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 31

•  This equation is always true so –  At t = 0, the sine term is zero

–  At t = 1/(4F), the cosine term is zero, so

–  So the amplitude of the resulting sine wave is

The Trick Bonus Material – See Class Reader For Details

C∗sin 2πFt + φ( ) = A ∗sin 2πFt( )+B∗cos 2πFt( )

C∗sin φ( ) =B

C∗cos φ( ) = A

A2 +B2

A

B C

Page 32: E40M Bode Plots, dB - Stanford University · inventing Bode plots used to describe the frequency behavior of linear systems. (Wikipedia) M. Horowitz, J. Plummer, R. Howe 23 Plotting

M. Horowitz, J. Plummer, R. Howe 32

Learning Objectives For Today

•  Understand how to create Bode plots for RC circuits

–  You plot two straight lines that intercept at F=1/2πRC

•  (Bonus Section) Understand what an amplitude of (1+ j*2πRCF) means –  The result is a sum of a sine and cosine wave