40
Frequency Response and Continuous-time Fourier Series

Frequency Response and Continuous-time Fourier Seriescarmenere.ucsd.edu/.../mae143a/lectures/5fourierseries.pdfFourier Series of periodic signals Let be a “nice” periodic signal

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

  • Frequency Response andContinuous-time Fourier Series

  • Recall course objectives

    Main Course Objective:Fundamentals of systems/signals interaction

    (we’d like to understand how systems transform or affect signals)

    Specific Course Topics:-Basic test signals and their properties-Systems and their properties-Signals and systems interaction

    Time Domain: convolutionFrequency Domain: frequency response

    -Signals & systems applications:audio effects, filtering, AM/FM radio

    -Signal sampling and signal reconstruction

  • CT Signals and Systems in the FD -part I

    GoalsI. Frequency Response of (stable) LTI systems

    -Frequency Response, amplitude and phase definition-LTI system response to multi-frequency inputs

    II. (stable) LTI system response to periodic signals in the FD

    -The Fourier Series of a periodic signal-Periodic signal magnitude and phase spectrum-LTI system response to general periodic signals

    III. Filtering effects of (stable) LTI systems in the FD

    - Noise removal and signal smoothing

  • Frequency Response of LTI systems

    We have seen how some specific LTI system responses (the IR andthe step response) can be used to find the response to the systemto arbitrary inputs through the convolution operation.

    However, all practical (periodic or pulse-like) signals that can begenerated in the lab or in a radio station can be expressed assuperposition of co-sinusoids with different frequencies, phases,and amplitudes (an oscillatory input is easier to reproduce in the labthan an impulse delta, which has to be approximated)

    Because of this, it is of interest to study (stable) LTI systemresponses to general multi-frequency inputs. This is whatdefines the frequency response of the system.

    We will later see how to use this information to obtain theresponse of LTI systems to (finite-energy) signals (usingFourier and Laplace transforms)

  • Response of Systems to Exponentials

    Let a stable LTI system be excited by an exponential input

    Here, and can be complex numbers!

    From what we learned on the response of LTI systems:

    The response to an exponential is another exponential

    Problem: Determine

    !

    x(t) = Ae"t

    !

    B

    !

    !

    "

    !

    A

    !

    y(t) = Be"t

    !

    x(t) = Ae"t

  • Response of Systems to Exponentials

    Consider a linear ODE describing the LTI system as

    Let andSubstituting in the ODE we see that

    The proportionality constant is equal to the ratio:

    !

    BA

    =

    bk"k

    k= 0

    M

    #

    ak"k

    k= 0

    N

    #=bM "

    M + ....+ b2"2 + b1" + b0

    aN"N + ....+ a2"

    2 + a1" + a0

    !

    akdky(t)dtk

    =k= 0

    N

    " bkdkx(t)dtkk= 0

    M

    "

    !

    x(t) = Ae"t

    !

    y(t) = Be"t

    !

    Be"t ak"k =

    k= 0

    N

    # Ae"t bk"kk= 0

    M

    #

    !

    "

    !

    B =bk"

    k

    k= 0

    M

    #

    ak"k

    k= 0

    N

    #A

  • Response of Systems to Exponentials

    Surprise #1:

    The ratio

    where

    is the Transfer Function which we have obtained beforewith Laplace Transforms!

    !

    BA

    = H(")

    !

    H(s) = bM sM + ....+ b2s

    2 + b1s+ b0aNs

    N + ....+ a2s2 + a1s+ a0

  • Response of Systems to Exponentials

    Surprise #2:

    Ifusing linearity

    With bit of complex algebra we write

    and the response

    where

    !

    x(t) = Acos("t) = A e j"t + e# j"t( ) /2

    !

    y(t) = A H( j")e j"t +H(# j" )e# j"t( ) /2

    !

    H( j" ) = Ce j#

    !

    C = H( j")

    !

    " =#H( j$)

    !

    H(" j#) = Ce" j$

    !

    y(t) = A Ce j"t+# +Ce$ j"t$#( ) /2 = ACcos("t +# )

  • Response of Systems to Exponentials

    The ratio

    is called the Frequency Response

    Observe that is a complex function of

    We can graph the FR by plotting:

    its rectangular coordinates , against

    or its polar coordinates , against

    Polar coordinates are usually more informative

    !

    BA

    = H( j") = bM ( j")M + ....+ b2( j")

    2 + b1( j") + b0aN ( j")

    N + ....+ a2( j")2 + a1( j") + a0

    !

    H( j")

    !

    |H( j") |

    !

    "

    !

    H( j") = Re(H( j"))+ j Im(H( j"))

    !

    Re H ( j" )

    !

    Im H ( j" )

    !

    "

    !

    "H ( j# )

    !

    "

  • Frequency Response Plots

    Compare rectangular (left) versus polar (right) plots

    Polar: only low frequency co-sinusoids are passed, the shift inphase is more or less proportional to frequency

    Rectangular: contains the same information as polarrepresentation. More difficult to see what it does to co-sinusoids. Mostly used in computer calculations

  • System classification according to FR

    Depending on the plot of we will classify systems into*:

    Low-pass filters: for

    High-pass filters: for

    Band-pass filters: for and

    In order to plot the logarithmic scale is frequently used.This scale defines decibel units

    (here we use log_10)

    (*) these plots correspond to the so-called ideal filters, because they keepexactly a set of low, high, and band frequencies

    !

    |H(") |

    !

    |H( j") |# 0

    !

    |" |> K

    !

    |H( j") |# 0

    !

    |" |< K

    !

    |H( j") |# 0

    !

    |" |< K1

    !

    |" |> K2

    !

    |H( j") |

    !

    |H( j") |dB= 20log |H( j") |

    !

    |H(") |

    !

    |H(") |

    !

    |H(") |

    !

    "

    !

    "

    !

    "

  • dB representation of Frequency Response

    A plot in dB makes it possible to see small values of the FRmagnitude . This is important when we want tounderstand the quality of the filter. In particular we canobserve the critical values of the frequency for which thecharacter of the filter changes.

    Example: Linear plot of the low-pass filter!

    |H( j") |

    !

    H( j") = 11+ j"

  • dB representation of Frequency Response

    The same function in dB units has a plot:

  • dB representation of Frequency Response

    Linear plot of the low-pass filter

    !

    H( j") = 1(1+ j")(100 + j")

  • dB representation of Frequency Response

    … and the plot of the same filter in dB:

  • Response of Systems to Co-sinusoids

    The FR of an LTI system has the following properties:

    Because of this, the response of the LTI system to real sinusoidor co-sinusoid is as follows:

    Knowledge of is enough to know how the systemresponds to real co-sinusoidal signals

    This property is what allows compute the FR experimentally

    !

    |H(" j#) |=|H( j#) |

    !

    "H(# j$) = #"H( j$)

    !

    cos("t + #)

    !

    |H( j") | cos("t + # +$H( j"))

    !

    H( j")

  • Response to system to multi-frequency inputs

    Use linearity to generalize the response of stable LTIsystems to multi-frequency inputs

    The system acts on each cosine independently

    !

    y(t) = A1 |H( j"1) | cos("1t + #1 +$H( j"1)) + A2 |H( j"2) | cos("2t + #2 +$H( j"2))

    !

    x(t) = A1 cos("1t + #1) + A2 cos("2t + #2)

  • CT Signals and Systems in the FD -part I

    Goals

    I. Frequency Response of (stable) LTI systems

    -Frequency Response, amplitude and phase definition -LTI system response to multi-frequency inputs

    II. (stable) LTI system response to periodic signals in the FD-The Fourier Series of a periodic signal-Periodic signal magnitude and phase spectrum-LTI system response to general periodic signals

    III. Filtering effects of (stable) LTI systems in the FD

    - Noise removal and signal smoothing

  • Signal decompositions in the TD and FD

    Shift of perspective:• In the Time Domain, we see a signal as a function of time: how

    strong/weak is at each instant of time• In the Frequency Domain, we see a signal as a function of

    frequency: how strong/weak is at each frequency

    A Frequency Domain representation of a signal tells you how muchenergy of the signal is distributed over each cosine/sine

    The different ways of obtaining a FD representation of a signalconstitute the Fourier Transform, which has 2 categories:

    Fourier Series: for periodic signalsFourier Transform: for aperiodic signals

    Each method works for continuous-time and discrete-time signals

  • Fourier Series of periodic signals

    Let be a “nice” periodic signal with period

    Using Fourier Series it is possible to write as

    The coefficients are computed from the originalsignal as

    is the harmonic function, and is the harmonic number

    !

    x(t)

    !

    T0

    !

    x(t) = X[k]e jk" 0tk=#$

    $

    % = X[k]e jk2&f0tk=#$

    $

    %!

    x(t)

    !

    " 0 =2#T0

    = 2#f0

    !

    X[k] = 1T0

    x(t)e" jk#0tdt0

    T0

    $!

    X[k]

    !

    X[k]

    !

    kJBJ Fourier

  • Fourier Example

    Unit square wave

    Compute coefficients

    !

    x(t) =0, 0 < t < 0.51, 0.5 < t

  • Fourier Example

    !

    x(t) = 0.5 + j(2k "1)#

    e j (2k"1)2#tk=1

    $% +

    " j(2k "1)#

    e" j (2k"1)2#tk=1

    $%

    = 0.5 " 2(2k "1)#

    sin 2# (2k "1)t( )k=1

    $%

    Square wave

  • “Proof” of Fourier Series

    Fact #1: For any integer

    if , and if

    Proof: If a Fourier Series exists then

    Multiply by on both sides

    !

    e" ji#0tdt0

    T0

    $ = 0

    !

    e" ji#0tdt0

    T0

    $ = T0

    !

    i = 0

    !

    i " 0!

    i

    !

    x(t) = X[i]e ji"0ti=#$

    $

    %

    !

    x(t)e" jk#0t = X[i]e ji#0te" jk#0t =i="$

    $

    % X[i]e j(i"k )#0ti="$

    $

    %!

    e" jk#0t

  • “Proof” of Fourier Series

    Proof (continued):Integrate over a period on both sides

    and use Fact #1 to show that

    which leads to the Fourier formula

    !

    x(t)e" jk#0tdt0

    T0

    $ = X[i] e j( i"k )#0tdt0

    T0

    $i="%

    %

    &

    !

    X[i] e j( i"k )#0tdt0

    T0

    $i="%

    %

    & = T0X[k]

    !

    X[k] = 1T0

    x(t)e" jk#0tdt0

    T0

    $

  • Graphical description of a periodic signal as afunction of frequency

    The Frequency Domain graphical representation of a periodic signal isa plot of its Fourier coefficients (FC)

    Since the coefficients are complex, the representation consists of:

    1) a plot of for different (the magnitude spectrum)

    2) a plot of for different (the phase spectrum)

    The magnitude spectrum tells us how many frequencies are necessary to obtain a good approximation of the signal

    Square wave: most of the signal can be approximated using lowfrequencies. Discontinuities translate into lots of high frequencies

    !

    | X[k] |

    !

    k

    !

    "X[k]

    !

    k

  • Properties of the Fourier series

    Linearity:

    Time shifting:

    Frequency shifting:

    Time reversal:

    Multiplication-convolution:

    Conjugation:

    A few more properties in the book…

    ! x t( ) + " y t( )F S# $%%! X k[ ]+ "Y k[ ]

    x t ! t0( )F S" #$$ e! j k%0( )t0 X k[ ]

    ej k0!0( )t x t( ) F S" #$$ X k % k0[ ]

    x !t( )F S" #$$ X !k[ ]

    x* t( )F S! "## X* $k[ ]

    x t( )y t( )F S! "## X k[ ]$Y k[ ]

    Useful to simplify computation of Fourier coefficients

    !

    = Y (q)X(k " q)q="#

    q=#

    $

  • System response to a periodic signal

    To find the response of a (stable) LTI system to aperiodic signal of period :

    We use the system FR and change each signalfrequency component as follows:

    !

    X[k] = 1T0

    x(t)e" jk#0tdt0

    T0

    $ , k = ...,"2,"1,0,1,2,...

    !

    y(t) = H(kj"0)X[k]ejk"0t

    k=#$

    $

    % = H[k]X[k]e jk"0tk=#$

    $

    %

    !

    x(t) = X[k]e jk"0tk=#$

    $

    % !

    T0

    !

    y(t) = X[k] |H(kj"0) | ej(k"0t+#H (kj"0 ))

    k=$%

    %

    & = | X[k] ||H[k] | e j(k"0t+#H [k ]+#X [k ])k=$%

    %

    &

  • Graphical signal/systems interaction in the FD

    In this way, the interaction of periodic signals and systems in the FDcan be seen a simple vector multiplication/vector sum:

    !

    | X[k] |

    !

    |H[k] |

    !

    |Y[k] |

    !

    "

    !

    =

    !

    "Y[k] ="X[k]+"H[k]

    Once we have computed the signalspectrum and system FR, the magnitudespectrum of the output can becomputed in a simple way (compare itwith convolution…) The output vectorphase corresponds to a vector sum

  • Example

    Consider system and consider unit square waveas input . Find the system response

    Unit square wave has and harmonic coefficients

    The transfer function of the system is . Therefore,

    The system response is then

    !

    " y (t) + y(t) = x(t)

    !

    x(t)

    !

    y(t)

    !

    H(s) = 11+ s

    !

    T0 =1

    !

    X[k] =jk"

    , k odd0, k even

    # $ %

    & %

    !

    X[0] = 0.5

    !

    H[k] = H( jk2") = 11+ 2"kj

    =1

    1+ 4" 2k 2e# j arctan(2"k )

    !

    y(t) = X[k]H[k]e j 2"ktk=#$

    $

    % = 0.5 + jk"1

    1+ 4" 2k 2e j(2"kt#arctan(2"k ))

    k=#$, k odd

    $

    %

  • Example-cont’d

    Manipulating terms a bit gives the more familiar form

    !

    y(t) = 0.5 + jk"

    11+ 4" 2k 2

    e j(2"kt#arctan(2"k ))k=#$, k odd

    $

    %

    = 0.5 + j(2i #1)"

    11+ 4" 2(2i #1)2

    e j(2" (2i#1)t#arctan(2" (2i#1)))i=1

    $

    %

    + # j(2i #1)"

    11+ 4" 2(2i #1)2

    e# j(2" (2i#1)t#arctan(2" (2i#1)))i=1

    $

    %

    = 0.5 # 2(2i #1)"

    11+ 4" 2(2i #1)2

    sin(2"(2i #1)t # atan(2"(2i #1)))i=1

    $

    %

  • CT Signals and Systems in the FD -part I

    Goals

    I. Frequency Response of (stable) LTI systems

    -Frequency Response, amplitude and phase definition-LTI system response to multi-frequency inputs

    II. (stable) LTI system response to periodic signals in the FD-The Fourier Series of a periodic signal-Periodic signal magnitude and phase spectrum-LTI system response to general periodic signals

    III. Filtering effects of (stable) LTI systems in the FD

    - Noise removal and signal smoothing

  • Noise Removal in the Frequency Domain

    From our previous discussion on filters/multi-frequency inputswe observe the following: rapid oscillations “on top” of slowerones in signals can be “smoothed out” with low-pass filters

    Example: In the signal the high frequencycomponent is , the low frequency component is

    !

    x(t) = cos(t /2) + cos("t)

    !

    cos("t)

    !

    cos(t /2)

  • Noise Removal in the Frequency Domain

    The response of the low-pass filter to the signal is:

    The output signal retains the slow oscillation of the input signalwhile almost removing the high-frequency oscillation

    !

    y(t) = 0.894cos(t /2 " 0.46) + 0.303cos(#t "1.26)

    !

    11+ s

  • Noise Removal in the Frequency Domain

    A low-frequency periodic signal subject to noise can be seen asa low-frequency cosine superimposed with a high-frequencyoscillation. For example consider the following noisy signal:

  • Noise Removal in the Frequency Domain

    The steady-state response of a low-pass filter (e.g., the RC low-pass filter) to the signal is the following:

    (This has exactly the same shape as the uncorrupted signal,and we are able to remove the noise pretty well)

  • Noise Removal in the Frequency Domain

    The use of low-pass filters for noise removal is awidespread technique. We now know why this techniqueworks for periodic signals

    The same technique works for any signal of finite energy.This is explained through the theory of Fourier/Laplacetransforms

    Depending of the type of noise and signal, some filters maywork better than others. This leads to the whole are offilter design in signals and systems.

  • Noise removal in the Frequency Domain

    However, in addition to the noise, we may find:in audio signals: plenty of other high-frequency contentin image signals: edges contribute significantly to high-

    frequency components

    Thus an “ideal” low-pass filter tends to blur the dataE.g., edges in images can become blurred. Observe theoutput to two different low-pass filters:

    This illustrates that one has to be careful in the selection of filter

  • Summary

    Reasons why we study signals in the frequency domain (FD):

    (a) Oscillatory inputs and sinusoids are easier to implementand reproduce in a lab than impulse signals (which usually weneed to approximate) and even unit steps

    (b) A pulse-like signal can be expressed as a combination ofco-sinusoids, so if we know how to compute the response to a co-sinusoid, then we can know what is the response to a pulse-likesignal (and to general periodic signals)

    (c) Once signals and systems are in the FD, computations toobtain outputs are very simple: we don’t need convolutionanymore! This is one of the reasons why signal processing is mainlydone in the FD. For example, deconvolution (inverting convolutions)is more easily done in the FD

    (d) The FD can be more intuitive than the TD. For example,how noise removal works is easier to understand in the FD

  • Summary

    Important points to remember:1. The output of (stable) LTI systems to a complex exponential,

    sinusoid or co-sinusoid, resp., is again another complexexponential, sinusoid or co-sinusoid, resp.,

    2. These outputs can be computed by knowing the magnitude and phase ofthe Frequency Response H(jw) associated with the LTI system

    3. Systems can be classified according to their Frequency Response aslow-pass, high-pass or band-pass filters

    4. We can approximate a wide class of periodic signals as a sum ofcomplex exponentials or co-sinusoid via a Fourier Series (FS) expansion

    5. The FS expansion allows us to see signals as functions of frequencythrough its (magnitude and phase) spectrum

    6. A (stable) LTI system acts on each frequency component of the FS ofa periodic signal independently. This leads to fast computations (comparewith a convolution… )

    7. Low-pass filters are used for signal “smoothing” and noise removal