electronic instrumentation signalsbrd4.ort.org.il/~ksamuel/elin.31361/lectures/013 analog... ·...

Post on 26-Apr-2020

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Electronic instrumentationAnalog Signals in FD

Lecturer: Dr. Samuel Kosolapov

Items to be discussed

2

• Idea of decomposition• Fourier approach• Spectrum concept• Examples of spectrum usage• Laboratory Device: spectrum analyzer

This presentation deals with Analog Signals in FDDigital Signals in FD will be discussed later

Real-life Analog Signal: Graphic Presentation in the TD

3

Example: Real-life Audio Signal. Digitized short music fragment stored in Windows “ding.wav” file

Graphic Presentation in TD reveals that math description of audio signals in TD is not trivial

Real-life Medical Analog Signals: Graphic Presentation in the TD

4

Examples: ECG (ElectroCardioGram ) & EEG (ElectroEncephaloGram– important medical diagnostic tools

Graphic Presentation in TD reveals that math description of those IMPORTANT signal in TD is not trivial

Bright Idea: Decompose “sophisticated” signal to sum of basis(elementary) functions

5

When set of “basis functions” is known, set of factors provides alternative description of the X(t)

a1j1

Signal X (t)

a2j2

anjn

𝑋 𝑡 = a𝑖j𝑖 𝑡

Constant factor

Basis Function

Fourier Analysis

6

Jean Baptiste Joseph Fourier, 1768-1830French Physicist

Any (even bad-behaved) function can be representedas infinite series of harmonic sinusoids

ATTENTION: Be aware of different forms of modern Fourier analysis:

Fourier Series (real / complex),Integral Fourier (Fourier Transform)Digital Fourier Transform Fast Fourier Transform (FFT)n-dimensional Fourier Transform Image Processing, Cosine Fourier Transform DCFFT … JPEG, MP3 …

Signal Decomposition: Fourier Series

7

We’ll start with Fourier Series now and will finish with Fourier Transform.

If the function X(t) is defined in the “t” range [0..T], then it can be expressed as a Fourier Series of the form:

;)2sin()2cos(

...)2sin(...)32sin()22sin()2sin(

...)2cos(...)32cos()22cos()2cos(

)(

1

000

0030201

0030201

0

n

nn

n

n

tnfbtnfaa

tnfbtfbtfbtfb

tnfatfatfatfa

atX

Where:constant a0 is the DC component (average value of X(t) ),constants {an } and {bn } are the “Fourier coefficients”.f0 = 1/T – fundamental frequency – (the lowest AC frequency)

Signal Decomposition: Fourier Series

8

Calculation of the Fourier coefficients:

Technical problem (for advanced students):Mathematicians require “Dirichlet conditions”: X(t) must be periodic function with period T.

Modern approach is: ANY function can be presented using Fourier series.

The price is Gibbs phenomenon – spikes at X(t) presentation.

T

n

T

n

T

dtTnttXT

bdtTnttXT

a

dttXT

a

00

0

0

;)/2sin()(2

;)/2cos()(2

;)(1

Not a “theoretical declaration” but a practical way of coefficients calculationExplain why any reasonable function can be decomposed by Fourier: Even Dirac function can be integrated

Explain why a0 is called DC

Signal Decomposition: Complex Fourier Series

9

Fourier Series: mess of sin and cos:

Alternative is to use “complex Fourier series”:

;)sin()cos()(

2;2

;)2sin()2cos()(

1

000

000

1

000

n

nn

n

nn

tnbtnaatX

Tf

tfnbtfnaatX

dtetXT

dtetXT

cectXtjn

T

T

tjn

T

n

tjnn

n

n000

2/

2/0

)(1

)(1

;)(

Fourier Series: “Exact” or “Approximation”

10

If we take only limited set of cos/sin or complex exponents,(that is {n=1 to k} and k< infinity),

then we have approximation of X(t) by Fourier series.

In case we KNOW that our signal does not contain frequencies larger than “k*fo”, then “approximation” is “exact function presentation”

"";)2sin()2cos()(

"";)2sin()2cos()(

1

000

1

000

ionApproximattfnbtfnaatX

ExacttfnbtfnaatX

k

n

nn

n

nn

"";)(

}"{";)(

0

0

ionApproximatectX

ExactectX

tjnkn

kn

n

tjnn

n

n

Fourier Series: “Exact” or “Approximation”

11

Suppose we definitely know that some specific signaldoes not contains components above some max frequency.

For example, Human cannot produce sounds above ~ 8 kHz there is no need to allow high frequencies (>8 kHz) in the telephone apparatus It is bad idea to listen music by (old) telephone

"";)(

}"{";)(

0

0

ionApproximatectX

ExactectX

tjnkn

kn

n

tjnn

n

n

Nyquist Frequency and Nyquist Rate

12

Wikipedia claims that the Nyquist frequency should not be confused with the Nyquist rate.

Thus, Nyquist rate is a property of a continuous-time signal, whereas Nyquist frequency is a property of a discrete-time system.

We will discuss Nyquist frequency later

13

Example: Good Looking Polynomial

X:=proc(t)

> 4*t*(1-t):

> end:

Considering T=1, let’s approximate X(t)

Using n=2 only !!!

n:=2:

> for i from -n to +n do

> c[i]:=evalf( int( X(t)*exp(-I*2*Pi*i*t/T ),t=0..1) );

> end;

C[-2] = - 0.051C[-1]= - 0.203C[0] = 0.667C[1] = - 0.203C[2] = - 0.051

Example: Approximation by Fourier SeriesQ: What is common between Parabola and sin ???

Reminder from Math:Coefficients C[i] are Real and “symmetrical” in this case

C[0] is “DC” level

X(t)

Quality of Fourier Series Approximation

14

N=16. Looks good except …

X(t); n = 16X(t); n = 2

Problem with Fourier Series Approximation

15

Mathematicians have told us…. (that X must be periodical)

. Gibbs Effect: X(t) is not periodical .But Fourier Approximation

is “Periodical” Additionally:

1st Derivatives now have “Jump”near 0 and 1

Approximation is the best possible (but according to Least squares method)

X(t); n = 16

Example” Fourier Series Approximation

16

Another example: SAWTOOTH signal:

n=16

Explain: Approx(0) = Approx(1) =0.5

For t=0 is function 0 or 1?“Fourier Auto Decision”:

(0+1)/2=0.5

Extremely strong MACROGibbs effect.High n does not help: Error is not 0

X(t); n = 16

Important Concept: Spectrum

17

Frequency, Wavelength

Spectrum of Ideal “White” light

“Filtered” white light == some color

Use Graph of Energy versus wavelength/frequency

to “describe” light “content”

~ Energy

White light is dispersed/decomposed

by a prism to a number of colors

Spectrum example: Astronomy: {Energy- Wavelength} graphical presentation

18

~ “White” light(~ Equal energy for any wavelength)

~ Dirac functionSignificant Energy absorption in the narrow frequency bandShape of the spectrum is very informative

Spectral analysis enable to knowwhat is the chemical content of the star

we will never visit

Spectrum example: Chemistry: {Energy- Wavelength} graphical presentation

19

By analyzing absorbance spectrum one can estimate amount of specific substance

Start to think how to build primitive (but useful) spectrometer by using:Arduino board,

set of LEDs of different colors,photoresistor

See pulse oximeter example:http://www.howequipmentworks.com/pulse_oximeter/

Important EE Concept: Spectrum

20

Set of Coefficients { C[n] } is good function presentation.

Each function has its own unique set of { C[n] }

What is the meaning of each coefficient C[i]– weight (importance) of specific frequency i*0

More exactly: Energy about the frequency i*0

Analogy with OPTICS Graphic presentation {C[n], n} describes signal in FD

In most our cases C[-i] = C[i] use range [0..n] (explain *2) + omission of some technical details

We need “Energy” ~C2,

but in many cases we’ll speak about voltage amplitude |C|

Because any function can be reconstructed

(well, approximately reconstructed)By using known set of {C[n]} )

BTW: DSP can do this very fast (press “play” button

and listen music immediately)

Example of Spectrum: Signal Presentation in FD

21

Parabola Sawtooth

Spectrum (set of {C[n]}) is different for different functions. {Compare DC}

{ X(n) , n } { X(n) , n }

Extremely Important feature C[n] 0 for large n

That is: most of the energy is in DC

and in LOW frequencies.

Fast explanation about MP2 compression for audio signals. Details later

Example of Important Analog Voltage Signal:Square wave (compare with sine wave)

22

Fourier coefficient ~ 1/n

Example of Important Analog Voltage Signal:Square wave: TD FD

23

Example of Important Analog Voltage Signal:Triangle wave

24

:

:

~ 1/k2

Compare with 1/k for Square Wave

Example of Analog Voltage Signal:Sawtooth wave

25

Explain duty cycle practical limitations

Important Laboratory Instrument:Spectrum Analyzer

26

Presents spectrum (signal in FD). For many signals this presentation is more convenient than that of TD

The amplitude of the signal at the input is plotted

against the frequency of the signal.

Arduino-based spectrum analyzer will be discussed later

Virtual Laboratory. Simulation ExampleSpectrum Analyzer Demo

27

Sin wave selected

Spectrum Analyzer Symbol in Multisim

~ Single base frequency is seen (spectrum of sin)Explain why not ideal: “digitization …

Mind “lin”, “dB”, dBmoptions

Virtual Laboratory. Simulation ExampleSpectrum Analyzer Demo

28

Spectrum of the Square Wave.Basic frequency (= ?)

Pulse/Rectangle wave is selected

Harmonics are seen Amplitude ~ 1/n

This “peak” must be smaller. Defect of “digital” simulation. Beware.

top related