Convolution and Filtering: the Convolution Theorem Linear

Total Page:16

File Type:pdf, Size:1020Kb

Convolution and Filtering: the Convolution Theorem Linear Convolution and Filtering: The Convolution Theorem Convolution and Filtering: The Convolution Theorem CS 450: Introduction to Digital Signal and Image Processing Bryan Morse BYU Computer Science Convolution and Filtering: The Convolution Theorem Introduction Linear Systems and Responses Time/Spatial Frequency Input f F Output g G Impulse Response h Transfer Function H Relationship g = f ∗ h G = FH Is there a relationship? Convolution and Filtering: The Convolution Theorem Convolution Theorem The Convolution Theorem Let F, G, and H denote the Fourier Transforms of signals f , g, and h respectively. g = f ∗ h g = fh implies implies G = FH G = F ∗ H Convolution in one domain is multiplication in the other and vice versa. Convolution and Filtering: The Convolution Theorem Convolution Theorem The Convolution Theorem Thus, F(f (t) ∗ g(t)) = F(f (t))F(g(t)) Likewise, F(f (t)g(t)) = F(f (t)) ∗ F(g(t)) Convolution and Filtering: The Convolution Theorem Convolution Theorem Filtering: Frequency-Domain vs. Spatial (Convolution) Convolution and Filtering: The Convolution Theorem Convolution Theorem Linear Systems and Responses Time/Spatial Frequency Input f F Output g G Impulse Response h Transfer Function H Relationship g = f ∗ h G = FH Relationship: the Transfer Function H(u) is the Fourier Transform of the impulse response h(u) Convolution and Filtering: The Convolution Theorem Applications of the Convolution Theorem Example 1: Frequency Analysis of Convolution If the impulse response is a Gaussian with standard deviation σ, what does this do to frequencies going through the system? 0.6 0.4 0.5 0.3 0.4 0.3 0.2 0.2 0.1 0.1 -10 -5 5 10 20 40 60 80 100 120 Time Domain Frequency Domain Impulse Response Transfer Function Convolution and Filtering: The Convolution Theorem Applications of the Convolution Theorem Example 2: Truncating a Signal What is the Fourier Transform of a truncated signal? 10 cos(2πst) + 10 if −π ≤ t ≤ π f (t) = 0 otherwise 20 15 10 5 -4 -2 2 4 (10 cos(2πst) + 10)(Rect2π(t)) F(10 cos(2πst) + 10) ∗ F(Rect2π(t)) (10 F(cos(2πst)) + 10 F(1)) ∗ F(Rect2π(t)) 1 (10 [δ(u − s) + δ(u + s)] + 10 δ(u)) ∗ sinc(2π2u) 2 [5 δ(u − s) + 5 δ(u + s) + 10 δ(u)] ∗ sinc(2π2u) 5 sinc(2π2(u − s)) + 5 sinc(2π2(u + s)) + 10 sinc(2π2u) Convolution and Filtering: The Convolution Theorem Applications of the Convolution Theorem Example 2 (cont’d) 200 175 150 125 100 75 50 25 50 100 150 200 250 Time Domain Frequency Domain Convolution and Filtering: The Convolution Theorem Applications of the Convolution Theorem Example 3: Frequency Multiplexing Suppose that we modulate (multiply) a carrier signal of a particular frequency s by a signal f (t): f (t) cos(2πst) 20 Fourier Transform: 15 10 F(f (t) cos(2πst)) = F(f (t)) ∗ F(cos(2πst)) 5 1 1 = F(u) ∗ [ δ(u − s) + δ(u + s)] -4 -2 22 4 2 1 1 = F(u − s) + F(u + s)] 2 2 This just shifts the signal in the frequency domain by the frequency s of the carrier (splits between s and −s). Convolution and Filtering: The Convolution Theorem Applications of the Convolution Theorem Example 3 (cont’d) Signal Carrier Frequency 20 Carrier Frequency 40 1 1 1 0.75 0.75 0.8 0.5 0.5 0.6 0.25 0.25 0.4 -3 -2 -1 1 2 3 -3 -2 -1 1 2 3 -0.25 -0.25 0.2 -0.5 -0.5 -0.75 -0.75 -3 -2 -1 1 2 3 -1 -1 4 4 4 3.5 3.5 3.5 3 3 3 2.5 2.5 2.5 2 2 2 1.5 1.5 1.5 1 1 1 0.5 0.5 0.5 100 200 300 400 500 50 100 150 200 250 50 100 150 200 250 Convolution and Filtering: The Convolution Theorem Applications of the Convolution Theorem Example 3 (cont’d) What if we add together multiple signals, each modulated by a different carrier? Can carry multiple signals through a single medium, each carried by a different carrier frequency. I Frequency multiplexing I AM Radio Just have to make sure the frequency-shifted signals don’t overlap in the frequency-domain. Convolution and Filtering: The Convolution Theorem Applications of the Convolution Theorem Convolution in the Frequency Domain One application of the Convolution Theorem is that we can perform time-domain convolution using frequency-domain multiplication: f ∗ g = F −1(F(f )F(g)) What is the computational complexity of doing it this way? Convolution and Filtering: The Convolution Theorem Convolution and Correlation Correlation Convolution is Z ∞ f (t) ∗ g(t) = f (τ) g(t − τ) dτ −∞ Correlation is Z ∞ f (t) ∗ g(−t) = f (τ) g(t + τ) dτ −∞ Correlation is the “unflipped kernel” version of convolution that we saw earlier as weighted neighborhood masks. Convolution and Filtering: The Convolution Theorem Convolution and Correlation Correlation in the Frequency Domain Can also do correlation in the frequency domain: Convolution f (t) ∗ g(t) ↔ F(s) G(s) Correlation f (t) ∗ g(−t) ↔ F(s) G∗(s) Convolution and Filtering: The Convolution Theorem Convolution and Correlation Autocorrelation Autocorrelation is the correlation of a function with itself: f (t) ∗ f (−t) Useful for finding periodicity in a function (as the shifted copies match the original, the output of the correlation is high). In the Frequency Domain: F(u) F ∗(u) = |F(u)|2 This is the same as the power spectrum. Convolution and Filtering: The Convolution Theorem Deconvolution Deconvolution - Basic Idea If G = FH, can’t you reverse the process by F = G/H? This is called deconvolution—the “undoing” of a convolution. Problem: most systems have noise, which limits deconvolution. (More on this later.).
Recommended publications
  • Convolution! (CDT-14) Luciano Da Fontoura Costa
    Convolution! (CDT-14) Luciano da Fontoura Costa To cite this version: Luciano da Fontoura Costa. Convolution! (CDT-14). 2019. hal-02334910 HAL Id: hal-02334910 https://hal.archives-ouvertes.fr/hal-02334910 Preprint submitted on 27 Oct 2019 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Convolution! (CDT-14) Luciano da Fontoura Costa [email protected] S~aoCarlos Institute of Physics { DFCM/USP October 22, 2019 Abstract The convolution between two functions, yielding a third function, is a particularly important concept in several areas including physics, engineering, statistics, and mathematics, to name but a few. Yet, it is not often so easy to be conceptually understood, as a consequence of its seemingly intricate definition. In this text, we develop a conceptual framework aimed at hopefully providing a more complete and integrated conceptual understanding of this important operation. In particular, we adopt an alternative graphical interpretation in the time domain, allowing the shift implied in the convolution to proceed over free variable instead of the additive inverse of this variable. In addition, we discuss two possible conceptual interpretations of the convolution of two functions as: (i) the `blending' of these functions, and (ii) as a quantification of `matching' between those functions.
    [Show full text]
  • The Convolution Theorem
    Module 2 : Signals in Frequency Domain Lecture 18 : The Convolution Theorem Objectives In this lecture you will learn the following We shall prove the most important theorem regarding the Fourier Transform- the Convolution Theorem We are going to learn about filters. Proof of 'the Convolution theorem for the Fourier Transform'. The Dual version of the Convolution Theorem Parseval's theorem The Convolution Theorem We shall in this lecture prove the most important theorem regarding the Fourier Transform- the Convolution Theorem. It is this theorem that links the Fourier Transform to LSI systems, and opens up a wide range of applications for the Fourier Transform. We shall inspire its importance with an application example. Modulation Modulation refers to the process of embedding an information-bearing signal into a second carrier signal. Extracting the information- bearing signal is called demodulation. Modulation allows us to transmit information signals efficiently. It also makes possible the simultaneous transmission of more than one signal with overlapping spectra over the same channel. That is why we can have so many channels being broadcast on radio at the same time which would have been impossible without modulation There are several ways in which modulation is done. One technique is amplitude modulation or AM in which the information signal is used to modulate the amplitude of the carrier signal. Another important technique is frequency modulation or FM, in which the information signal is used to vary the frequency of the carrier signal. Let us consider a very simple example of AM. Consider the signal x(t) which has the spectrum X(f) as shown : Why such a spectrum ? Because it's the simplest possible multi-valued function.
    [Show full text]
  • The Discrete-Time Fourier Transform and Convolution Theorems: a Brief Tutorial
    The Discrete-Time Fourier Transform and Convolution Theorems: A Brief Tutorial Yi-Wen Liu 25 Feb 2013 (Revised 21 Sep 2015) 1 Definitions and interpretation 1.1 Units Throughout this semester, we will use the integer-valued variable n as the time variable for discrete-time signal processing; that is, n = −∞, ..., −1, 0, 1, ..., ∞. In this convention, the unit of n is dimensionless, but be aware that in reality the sampling period is 1/fs, where fs denotes the sampling rate. In some text books, 1/fs is denoted as T , and its unit is second. In this course we do not do this, thereby favoring conciseness of notations. 1.2 Definition of DTFT The discrete-time Fourier transform (DTFT) of a discrete-time signal x[n] is a function of frequency ω defined as follows: ∞ ∆ X(ω) = x[n]e−jωn. (1) n=−∞ X Conceptually, the DTFT allows us to check how much of a tonal component at fre- quency ω is in x[n]. The DTFT of a signal is often also called a spectrum. Note that X(ω) is complex-valued. So, the absolute value |X(ω)| represents the tonal component’s magnitude, and the angle ∠X(ω) tells us the phase of the tonal component. Also note that Eq. (1) defines the DTFT as the inner product between the signal and the complex exponential tone e−jωn. Because complex exponentials {e−jωn,ω ∈ [−π, π]} form a complete family of orthogonal bases for (practically) all signals of interest, what Eq. (1) essentially does is to project x[n] onto the space spanned by all complex exponen- tials.
    [Show full text]
  • Fourier Transforms & the Convolution Theorem
    Convolution, Correlation, & Fourier Transforms James R. Graham 11/25/2009 Introduction • A large class of signal processing techniques fall under the category of Fourier transform methods – These methods fall into two broad categories • Efficient method for accomplishing common data manipulations • Problems related to the Fourier transform or the power spectrum Time & Frequency Domains • A physical process can be described in two ways – In the time domain, by h as a function of time t, that is h(t), -∞ < t < ∞ – In the frequency domain, by H that gives its amplitude and phase as a function of frequency f, that is H(f), with -∞ < f < ∞ • In general h and H are complex numbers • It is useful to think of h(t) and H(f) as two different representations of the same function – One goes back and forth between these two representations by Fourier transforms Fourier Transforms ∞ H( f )= ∫ h(t)e−2πift dt −∞ ∞ h(t)= ∫ H ( f )e2πift df −∞ • If t is measured in seconds, then f is in cycles per second or Hz • Other units – E.g, if h=h(x) and x is in meters, then H is a function of spatial frequency measured in cycles per meter Fourier Transforms • The Fourier transform is a linear operator – The transform of the sum of two functions is the sum of the transforms h12 = h1 + h2 ∞ H ( f ) h e−2πift dt 12 = ∫ 12 −∞ ∞ ∞ ∞ h h e−2πift dt h e−2πift dt h e−2πift dt = ∫ ( 1 + 2 ) = ∫ 1 + ∫ 2 −∞ −∞ −∞ = H1 + H 2 Fourier Transforms • h(t) may have some special properties – Real, imaginary – Even: h(t) = h(-t) – Odd: h(t) = -h(-t) • In the frequency domain these
    [Show full text]
  • Fourier Analysis
    Chapter 1 Fourier analysis In this chapter we review some basic results from signal analysis and processing. We shall not go into detail and assume the reader has some basic background in signal analysis and processing. As basis for signal analysis, we use the Fourier transform. We start with the continuous Fourier transformation. But in applications on the computer we deal with a discrete Fourier transformation, which introduces the special effect known as aliasing. We use the Fourier transformation for processes such as convolution, correlation and filtering. Some special attention is given to deconvolution, the inverse process of convolution, since it is needed in later chapters of these lecture notes. 1.1 Continuous Fourier Transform. The Fourier transformation is a special case of an integral transformation: the transforma- tion decomposes the signal in weigthed basis functions. In our case these basis functions are the cosine and sine (remember exp(iφ) = cos(φ) + i sin(φ)). The result will be the weight functions of each basis function. When we have a function which is a function of the independent variable t, then we can transform this independent variable to the independent variable frequency f via: +1 A(f) = a(t) exp( 2πift)dt (1.1) −∞ − Z In order to go back to the independent variable t, we define the inverse transform as: +1 a(t) = A(f) exp(2πift)df (1.2) Z−∞ Notice that for the function in the time domain, we use lower-case letters, while for the frequency-domain expression the corresponding uppercase letters are used. A(f) is called the spectrum of a(t).
    [Show full text]
  • Fourier Transform, Convolution Theorem, and Linear Dynamical Systems April 28, 2016
    Mathematical Tools for Neuroscience (NEU 314) Princeton University, Spring 2016 Jonathan Pillow Lecture 23: Fourier Transform, Convolution Theorem, and Linear Dynamical Systems April 28, 2016. Discrete Fourier Transform (DFT) We will focus on the discrete Fourier transform, which applies to discretely sampled signals (i.e., vectors). Linear algebra provides a simple way to think about the Fourier transform: it is simply a change of basis, specifically a mapping from the time domain to a representation in terms of a weighted combination of sinusoids of different frequencies. The discrete Fourier transform is therefore equiv- alent to multiplying by an orthogonal (or \unitary", which is the same concept when the entries are complex-valued) matrix1. For a vector of length N, the matrix that performs the DFT (i.e., that maps it to a basis of sinusoids) is an N × N matrix. The k'th row of this matrix is given by exp(−2πikt), for k 2 [0; :::; N − 1] (where we assume indexing starts at 0 instead of 1), and t is a row vector t=0:N-1;. Recall that exp(iθ) = cos(θ) + i sin(θ), so this gives us a compact way to represent the signal with a linear superposition of sines and cosines. The first row of the DFT matrix is all ones (since exp(0) = 1), and so the first element of the DFT corresponds to the sum of the elements of the signal. It is often known as the \DC component". The next row is a complex sinusoid that completes one cycle over the length of the signal, and each subsequent row has a frequency that is an integer multiple of this \fundamental" frequency.
    [Show full text]
  • Numerical Analysis of Elastic Contact Between Coated Bodies
    Hindawi Advances in Tribology Volume 2018, Article ID 6498503, 13 pages https://doi.org/10.1155/2018/6498503 Research Article Numerical Analysis of Elastic Contact between Coated Bodies Sergiu Spinu 1,2 1 Department of Mechanics and Technologies, Stefan cel Mare University of Suceava, 13th University Street, 720229, Romania 2Integrated Center for Research, Development and Innovation in Advanced Materials, Nanotechnologies, and Distributed Systems for Fabrication and Control (MANSiD), Stefan cel Mare University of Suceava, Romania Correspondence should be addressed to Sergiu Spinu; [email protected] Received 31 May 2018; Revised 28 September 2018; Accepted 11 October 2018; Published 1 November 2018 Academic Editor: Patrick De Baets Copyright © 2018 Sergiu Spinu. Tis is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Substrate protection by means of a hard coating is an efcient way of extending the service life of various mechanical, electrical, or biomedical elements. Te assessment of stresses induced in a layered body under contact load may advance the understanding of the mechanisms underlying coating performance and improve the design of coated systems. Te iterative derivation of contact area and contact tractions requires repeated displacement evaluation; therefore the robustness of a contact solver relies on the efciency of the algorithm for displacement calculation. Te fast Fourier transform coupled with the discrete convolution theorem has been widely used in the contact modelling of homogenous bodies, as an efcient computational tool for the rapid evaluation of convolution products that appear in displacements and stresses calculation.
    [Show full text]
  • Generalized Poisson Summation Formula for Tempered Distributions
    2015 International Conference on Sampling Theory and Applications (SampTA) Generalized Poisson Summation Formula for Tempered Distributions Ha Q. Nguyen and Michael Unser Biomedical Imaging Group, Ecole´ Polytechnique Fed´ erale´ de Lausanne (EPFL) Station 17, CH–1015, Lausanne, Switzerland fha.nguyen, michael.unserg@epfl.ch Abstract—The Poisson summation formula (PSF), which re- In the mathematics literature, the PSF is often stated in a lates the sampling of an analog signal with the periodization of dual form with the sampling occurring in the Fourier domain, its Fourier transform, plays a key role in the classical sampling and under strict conditions on the function f. Various versions theory. In its current forms, the formula is only applicable to a of (PSF) have been proven when both f and f^ are in appro- limited class of signals in L1. However, this assumption on the signals is too strict for many applications in signal processing priate subspaces of L1(R) \C(R). In its most general form, ^ that require sampling of non-decaying signals. In this paper when f; f 2 L1(R)\C(R), the RHS of (PSF) is a well-defined we generalize the PSF for functions living in weighted Sobolev periodic function in L1([0; 1]) whose (possibly divergent) spaces that do not impose any decay on the functions. The Fourier series is the LHS. If f and f^ additionally satisfy only requirement is that the signal to be sampled and its weak ^ −1−" derivatives up to order 1=2 + " for arbitrarily small " > 0, grow jf(x)j+jf(x)j ≤ C(1+jxj) ; 8x 2 R, for some C; " > 0, slower than a polynomial in the L2 sense.
    [Show full text]
  • Lecture 6 Basic Signal Processing
    Lecture 6 Basic Signal Processing Copyright c 1996, 1997 by Pat Hanrahan Motivation Many aspects of computer graphics and computer imagery differ from aspects of conven- tional graphics and imagery because computer representations are digital and discrete, whereas natural representations are continuous. In a previous lecture we discussed the implications of quantizing continuous or high precision intensity values to discrete or lower precision val- ues. In this sequence of lectures we discuss the implications of sampling a continuous image at a discrete set of locations (usually a regular lattice). The implications of the sampling pro- cess are quite subtle, and to understand them fully requires a basic understanding of signal processing. These notes are meant to serve as a concise summary of signal processing for computer graphics. Reconstruction Recall that a framebuffer holds a 2D array of numbers representing intensities. The display creates a continuous light image from these discrete digital values. We say that the discrete image is reconstructed to form a continuous image. Although it is often convenient to think of each 2D pixel as a little square that abuts its neighbors to fill the image plane, this view of reconstruction is not very general. Instead it is better to think of each pixel as a point sample. Imagine an image as a surface whose height at a point is equal to the intensity of the image at that point. A single sample is then a “spike;” the spike is located at the position of the sample and its height is equal to the intensity asso- ciated with that sample.
    [Show full text]
  • Convolution and Filtering
    Convolution and 7 Filtering Lab Objective: The Fourier transform reveals information in the frequency domain about signals and images that might not be apparent in the usual time (sound) or spatial (image) domain. In this lab, we use the discrete Fourier transform to eciently convolve sound signals and lter out some types of unwanted noise from both sounds and images. This lab is a continuation of the Discrete Fourier Transform lab and should be completed in the same Jupyter Notebook. Convolution Mixing two sounds signalsa common procedure in signal processing and analysisis usually done through a discrete convolution. Given two periodic sound sample vectors f and g of length n, the discrete convolution of f and g is a vector of length n where the kth component is given by n−1 X (f ∗ g)k = fk−jgj; k = 0; 1; 2; : : : ; n − 1: (7.1) j=0 Since audio needs to be sampled frequently to create smooth playback, a recording of a song can contain tens of millions of samples; even a one-minute signal has 2; 646; 000 samples if it is recorded at the standard rate of 44; 100 samples per second (44; 100 Hz). The naïve method of using the sum in (7.1) n times is O(n2), which is often too computationally expensive for convolutions of this size. Fortunately, the discrete Fourier transform (DFT) can be used compute convolutions eciently. The nite convolution theorem states that the Fourier transform of a convolution is the element-wise product of Fourier transforms: Fn(f ∗ g) = n(Fnf) (Fng): (7.2) In other words, convolution in the time domain is equivalent to component-wise multiplication in the frequency domain.
    [Show full text]
  • Review of Fourier Analysis
    Review of Fourier Analysis. A. The Fourier Transform. Definition 0.1 The normed linear space L1(R) consists of all functions f, Lebesgue mea- surable on R with the property that the norm Z 1 kfk1 = jf(x)j dx −∞ is finite. Remarks. (a) L1(R) is a linear space under the usual addition and scalar multiplication of functions. 2 1 (b) We saw before that L [0; 1] ⊆ L [0; 1] which follows from the inequality kfk1 ≤ kfk2 (where the norms are on the spaces Lr[0; 1], r = 1; 2). However this is false if [0; 1] is replaced by R. 1 1 (c) The spaces Cc(R) and Cc (R) are both dense in L (R). Definition 0.2 The Fourier transform of f 2 L1(R), denoted fb(γ), is given by, Z 1 fb(γ) = f(x) e−2πiγx dx: −∞ Remarks. (a) Note a superficial resemblance to the definition of the Fourier coefficients of a function on [0; 1], namely Z 1 fb(n) = f(x) e−2πinx dx: 0 We will explore this relationship later. (b) We assume that f 2 L1(R) in order to guarantee that the integral converges. This is only technical as the integral can be interpreted for a variety of function spaces. Definition 0.3 The Fourier inversion formula is the following. If fb(γ) is the Fourier trans- form of f(x) then, Z 1 f(x) = fb(γ) e2πiγx dγ: −∞ Remarks. (a) Fourier inversion is not always valid. Indeed a major focus of a rigorous course in Fourier analysis is to determine conditions under which the inversion formula holds pointwise and in other senses.
    [Show full text]
  • Fourier Transforms of a Few Functions
    – 1 – 6. FOURIER TRANSFORM, CONVOLUTION AND CORRELATION Reference: ”The Fourier Transform and Its Applications”, by R. N. Bracewell. 6.1 Fourier Transform A function f(t) can be expressed as Z ∞ f(t) = F(ν) e−i2πνt dν, (6.1) −∞ where F(ν) is the Fourier Transform of f(t). This expression can be understood to mean that f(t) can be decomposed into a sum of ”Fourier components” – e−i2πνt – over a continuous range of ν. In other words, f(t) is decomposed into its frequency components. To show the frequency decomposition more directly, one can express equation (6.1) as Z ∞ Z ∞ f(t) = F(ν) cos(2πνt) dν + i F(ν) sin(2πνt) dν. −∞ −∞ F(ν) then specifies how much each frequency component, e−i2πνt, is present in the sum. Equation (6.1) is analogous to the decomposition of a vector V into its basis vectors, xi, 3 X V = vixi, i=1 −i2πνt where vi and xi are analogs of F(ν) and e . Just as in the case of vectors where one can specify the vector V by its components vi, one can specify f(t) by its Fourier Transform F(ν). For instance, if t and ν are time and frequency respectively, instead of plotting the entire f(t) = 2cos(2πνot) over the infinite t-axis, one can simply specify the Fourier Transform which consists of two delta functions (see below) at frequencies: ±νo. Given f(t), its Fourier Transform can be found by Z ∞ F(ν) = f(t) e+i2πνt dt. −∞ Table 1 gives a list of useful functions and their Fourier Transform.
    [Show full text]