Event Reconstruction by Digital Filtering
Total Page:16
File Type:pdf, Size:1020Kb
Load more
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. -
Moving Average Filters
CHAPTER 15 Moving Average Filters The moving average is the most common filter in DSP, mainly because it is the easiest digital filter to understand and use. In spite of its simplicity, the moving average filter is optimal for a common task: reducing random noise while retaining a sharp step response. This makes it the premier filter for time domain encoded signals. However, the moving average is the worst filter for frequency domain encoded signals, with little ability to separate one band of frequencies from another. Relatives of the moving average filter include the Gaussian, Blackman, and multiple- pass moving average. These have slightly better performance in the frequency domain, at the expense of increased computation time. Implementation by Convolution As the name implies, the moving average filter operates by averaging a number of points from the input signal to produce each point in the output signal. In equation form, this is written: EQUATION 15-1 Equation of the moving average filter. In M &1 this equation, x[ ] is the input signal, y[ ] is ' 1 % y[i] j x [i j ] the output signal, and M is the number of M j'0 points used in the moving average. This equation only uses points on one side of the output sample being calculated. Where x[ ] is the input signal, y[ ] is the output signal, and M is the number of points in the average. For example, in a 5 point moving average filter, point 80 in the output signal is given by: x [80] % x [81] % x [82] % x [83] % x [84] y [80] ' 5 277 278 The Scientist and Engineer's Guide to Digital Signal Processing As an alternative, the group of points from the input signal can be chosen symmetrically around the output point: x[78] % x[79] % x[80] % x[81] % x[82] y[80] ' 5 This corresponds to changing the summation in Eq. -
Designing Filters Using the Digital Filter Design Toolkit Rahman Jamal, Mike Cerna, John Hanks
NATIONAL Application Note 097 INSTRUMENTS® The Software is the Instrument ® Designing Filters Using the Digital Filter Design Toolkit Rahman Jamal, Mike Cerna, John Hanks Introduction The importance of digital filters is well established. Digital filters, and more generally digital signal processing algorithms, are classified as discrete-time systems. They are commonly implemented on a general purpose computer or on a dedicated digital signal processing (DSP) chip. Due to their well-known advantages, digital filters are often replacing classical analog filters. In this application note, we introduce a new digital filter design and analysis tool implemented in LabVIEW with which developers can graphically design classical IIR and FIR filters, interactively review filter responses, and save filter coefficients. In addition, real-world filter testing can be performed within the digital filter design application using a plug-in data acquisition board. Digital Filter Design Process Digital filters are used in a wide variety of signal processing applications, such as spectrum analysis, digital image processing, and pattern recognition. Digital filters eliminate a number of problems associated with their classical analog counterparts and thus are preferably used in place of analog filters. Digital filters belong to the class of discrete-time LTI (linear time invariant) systems, which are characterized by the properties of causality, recursibility, and stability. They can be characterized in the time domain by their unit-impulse response, and in the transform domain by their transfer function. Obviously, the unit-impulse response sequence of a causal LTI system could be of either finite or infinite duration and this property determines their classification into either finite impulse response (FIR) or infinite impulse response (IIR) system. -
Finite Impulse Response (FIR) Digital Filters (II) Ideal Impulse Response Design Examples Yogananda Isukapalli
Finite Impulse Response (FIR) Digital Filters (II) Ideal Impulse Response Design Examples Yogananda Isukapalli 1 • FIR Filter Design Problem Given H(z) or H(ejw), find filter coefficients {b0, b1, b2, ….. bN-1} which are equal to {h0, h1, h2, ….hN-1} in the case of FIR filters. 1 z-1 z-1 z-1 z-1 x[n] h0 h1 h2 h3 hN-2 hN-1 1 1 1 1 1 y[n] Consider a general (infinite impulse response) definition: ¥ H (z) = å h[n] z-n n=-¥ 2 From complex variable theory, the inverse transform is: 1 n -1 h[n] = ò H (z)z dz 2pj C Where C is a counterclockwise closed contour in the region of convergence of H(z) and encircling the origin of the z-plane • Evaluating H(z) on the unit circle ( z = ejw ) : ¥ H (e jw ) = åh[n]e- jnw n=-¥ 1 p h[n] = ò H (e jw )e jnwdw where dz = jejw dw 2p -p 3 • Design of an ideal low pass FIR digital filter H(ejw) K -2p -p -wc 0 wc p 2p w Find ideal low pass impulse response {h[n]} 1 p h [n] = H (e jw )e jnwdw LP ò 2p -p 1 wc = Ke jnwdw 2p ò -wc Hence K h [n] = sin(nw ) n = 0, ±1, ±2, …. ±¥ LP np c 4 Let K = 1, wc = p/4, n = 0, ±1, …, ±10 The impulse response coefficients are n = 0, h[n] = 0.25 n = ±4, h[n] = 0 = ±1, = 0.225 = ±5, = -0.043 = ±2, = 0.159 = ±6, = -0.053 = ±3, = 0.075 = ±7, = -0.032 n = ±8, h[n] = 0 = ±9, = 0.025 = ±10, = 0.032 5 Non Causal FIR Impulse Response We can make it causal if we shift hLP[n] by 10 units to the right: K h [n] = sin((n -10)w ) LP (n -10)p c n = 0, 1, 2, …. -
ELEG 5173L Digital Signal Processing Ch. 5 Digital Filters
Department of Electrical Engineering University of Arkansas ELEG 5173L Digital Signal Processing Ch. 5 Digital Filters Dr. Jingxian Wu [email protected] 2 OUTLINE • FIR and IIR Filters • Filter Structures • Analog Filters • FIR Filter Design • IIR Filter Design 3 FIR V.S. IIR • LTI discrete-time system – Difference equation in time domain N M y(n) ak y(n k) bk x(n k) k 1 k 0 – Transfer function in z-domain N M k k Y (z) akY (z)z bk X (z)z k 1 k 0 M k bk z Y (z) k 0 H (z) N X (z) k 1 ak z k 1 4 FIR V.S. IIR • Finite impulse response (FIR) – difference equation in the time domain M y(n) bk x(n k) k 0 – Transfer function in the Z-domain M Y (z) k H (z) bk z X (z) k 0 – Impulse response h(n) [b ,b ,,b ] 0 1 M • The impulse response is of finite length finite impulse response 5 FIR V.S. IIR • Infinite impulse response (IIR) – Difference equation in the time domain N M y(n) ak y(n k) bk x(n k) k1 k0 – Transfer function in the z-domain M k bk z Y(z) k0 H (z) N X (z) k 1 ak z k1 – Impulse response can be obtained through inverse-z transform, and it has infinite length 6 FIR V.S. IIR • Example – Find the impulse response of the following system. Is it a FIR or IIR filter? Is it stable? 1 y(n) y(n 2) x(n) 4 7 FIR V.S. -
Fourier Ptychographic Wigner Distribution Deconvolution
FOURIER PTYCHOGRAPHIC WIGNER DISTRIBUTION DECONVOLUTION Justin Lee1, George Barbastathis2,3 1. Department of Health Sciences and Technology, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02139, USA 2. Department of Mechanical Engineering, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02139, USA 3. Singapore–MIT Alliance for Research and Technology (SMART) Centre Singapore 138602, Singapore Email: [email protected] KEY WORDS: Computational Imaging, phase retrieval, ptychography, Fourier ptychography Ptychography was first proposed as a method for phase retrieval by Hoppe in the late 1960s [1]. A typical ptychographic setup involves generation of illumination diversity via lateral translation of an object relative to its illumination (often called the probe) and measurement of the intensity of the far-field diffraction pattern/Fourier transform of the illuminated object. In the decades following Hoppes initial work, several important extensions to ptychography were developed, including an ability to simultaneously retrieve the amplitude and phase of both the probe and the object via application of an extended ptychographic iterative engine (ePIE) [2] and a non-iterative technique for phase retrieval using ptychographic information called Wigner Distribution Deconvolution (WDD) [3,4]. Most recently, the Fourier dual to ptychography was introduced by the authors in [5] as an experimentally simple technique for phase retrieval using an LED array as the illumination source in a standard microscope setup. In Fourier ptychography, lateral translation of the object relative to the probe occurs in frequency space and is obtained by tilting the angle of illumination (while holding the pupil function of the imaging system constant). In the past few years, several improvements to Fourier ptychography have been introduced, including an ePIE-like technique for simultaneous pupil function and object retrieval [6]. -
Enhanced Three-Dimensional Deconvolution Microscopy Using a Measured Depth-Varying Point-Spread Function
2622 J. Opt. Soc. Am. A/Vol. 24, No. 9/September 2007 J. W. Shaevitz and D. A. Fletcher Enhanced three-dimensional deconvolution microscopy using a measured depth-varying point-spread function Joshua W. Shaevitz1,3,* and Daniel A. Fletcher2,4 1Department of Integrative Biology, University of California, Berkeley, California 94720, USA 2Department of Bioengineering, University of California, Berkeley, California 94720, USA 3Department of Physics, Princeton University, Princeton, New Jersey 08544, USA 4E-mail: fl[email protected] *Corresponding author: [email protected] Received February 26, 2007; revised April 23, 2007; accepted May 1, 2007; posted May 3, 2007 (Doc. ID 80413); published July 27, 2007 We present a technique to systematically measure the change in the blurring function of an optical microscope with distance between the source and the coverglass (the depth) and demonstrate its utility in three- dimensional (3D) deconvolution. By controlling the axial positions of the microscope stage and an optically trapped bead independently, we can record the 3D blurring function at different depths. We find that the peak intensity collected from a single bead decreases with depth and that the width of the axial, but not the lateral, profile increases with depth. We present simple convolution and deconvolution algorithms that use the full depth-varying point-spread functions and use these to demonstrate a reduction of elongation artifacts in a re- constructed image of a 2 m sphere. © 2007 Optical Society of America OCIS codes: 100.3020, 100.6890, 110.0180, 140.7010, 170.6900, 180.2520. 1. INTRODUCTION mismatch between the objective lens and coupling oil can Three-dimensional (3D) deconvolution microscopy is a be severe [5,6], especially in systems using high- powerful tool for visualizing complex biological struc- numerical apertures. -
Digital Signal Processing Filter Design
2065-27 Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis 26 October - 20 November, 2009 Digital Signal Processing Filter Design Massimiliano Nolich DEEI Facolta' di Ingegneria Universita' degli Studi di Trieste via Valerio, 10, 34127 Trieste Italy Filter design 1 Design considerations: a framework |H(f)| 1 C ıp 1 ıp ıs f 0 fp fs Passband Transition Stopband band The design of a digital filter involves five steps: Specification: The characteristics of the filter often have to be specified in the frequency domain. For example, for frequency selective filters (lowpass, highpass, bandpass, etc.) the specification usually involves tolerance limits as shown above. Coefficient calculation: Approximation methods have to be used to calculate the values hŒk for a FIR implementation, or ak, bk for an IIR implementation. Equivalently, this involves finding a filter which has H.z/ satisfying the requirements. Realisation: This involves converting H.z/ into a suitable filter structure. Block or flow diagrams are often used to depict filter structures, and show the computational procedure for implementing the digital filter. 1 Analysis of finite wordlength effects: In practice one should check that the quantisation used in the implementation does not degrade the performance of the filter to a point where it is unusable. Implementation: The filter is implemented in software or hardware. The criteria for selecting the implementation method involve issues such as real-time performance, complexity, processing requirements, and availability of equipment. 2 Finite impulse response (FIR) filter design A FIR filter is characterised by the equations N 1 yŒn D hŒkxŒn k kXD0 N 1 H.z/ D hŒkzk: kXD0 The following are useful properties of FIR filters: They are always stable — the system function contains no poles. -
Lecture 2 - Digital Filters
Lecture 2 - Digital Filters 2.1 Digital filtering Digital filtering can be implemented either in hardware or software; in the first case, the numerical processor is either a special-purpose chip or it is assembled out of a set of digital integrated circuits which provide the essential building blocks of a digital filtering operation – storage, delay, addition/subtraction and multiplication by constants. On the other hand, a general-purpose mini-or micro-computer can also be programmed as a digital filter, in which case the numerical processor is the computer’s CPU, GPU and memory. Filtering may be applied to signals which are then transformed back to the analogue domain using a digital to analogue convertor or worked with entirely in the digital domain. 33 2.1.1 Reasons for using a digital rather than an analogue filter The numerical processor can easily be (re-)programmed to implement a num- • ber of different filters. The accuracy of a digital filter is dependent only on the round-off error in • the arithmetic. This has two advantages: – the accuracy is predictable and hence the performance of the digital signal processing algorithm is known apriori. – The round-off error can be minimized with appropriate design techniques and hence digital filters can meet very tight specifications on magnitude and phase characteristics (which would be almost impossible to achieve with analogue filters because of component tolerances and circuit noise). The widespread use of mini- and micro-computers in engineering has greatly • increased the number of digital signals recorded and processed. Power sup- ply and temperature variations have no effect on a programme stored in a computer. -
Digital Signal Processing Tom Davinson
First SPES School on Experimental Techniques with Radioactive Beams INFN LNS Catania – November 2011 Experimental Challenges Lecture 4: Digital Signal Processing Tom Davinson School of Physics & Astronomy N I VE R U S I E T H Y T O H F G E D R I N B U Objectives & Outline Practical introduction to DSP concepts and techniques Emphasis on nuclear physics applications I intend to keep it simple … … even if it’s not … … I don’t intend to teach you VHDL! • Sampling Theorem • Aliasing • Filtering? Shaping? What’s the difference? … and why do we do it? • Digital signal processing • Digital filters semi-gaussian, moving window deconvolution • Hardware • To DSP or not to DSP? • Summary • Further reading Sampling Sampling Periodic measurement of analogue input signal by ADC Sampling Theorem An analogue input signal limited to a bandwidth fBW can be reproduced from its samples with no loss of information if it is regularly sampled at a frequency fs 2fBW The sampling frequency fs= 2fBW is called the Nyquist frequency (rate) Note: in practice the sampling frequency is usually >5x the signal bandwidth Aliasing: the problem Continuous, sinusoidal signal frequency f sampled at frequency fs (fs < f) Aliasing misrepresents the frequency as a lower frequency f < 0.5fs Aliasing: the solution Use low-pass filter to restrict bandwidth of input signal to satisfy Nyquist criterion fs 2fBW Digital Signal Processing D…igi wtahl aSt ignneaxtl? Processing Digital signal processing is the software controlled processing of sequential data derived from a digitised analogue signal. Some of the advantages of digital signal processing are: • functionality possible to implement functions which are difficult, impractical or impossible to achieve using hardware, e.g. -
Lecture 5 - Digital Filters
Lecture 5 - Digital Filters 5.1 Digital filtering Digital filtering can be implemented either in hardware or software; in the first case, the numerical processor is either a special-purpose chip or it is assembled out of a set of digital integrated circuits which provide the essential building blocks of a digital filtering operation – storage, delay, addition/subtraction and multiplica- tion by constants. On the other hand, a general-purpose mini-or micro-computer can also be programmed as a digital filter, in which case the numerical processor is the computer’s CPU and memory. Filtering may be applied to signals which are then transformed back to the analogue domain using a digital to analogue convertor or worked with entirely in the digital domain (e.g. biomedical signals are digitised, filtered and analysed to detect some abnormal activity). 5.1.1 Reasons for using a digital rather than an analogue filter The numerical processor can easily be (re-)programmed to implement a number of different filters. The accuracy of a digital filter is dependent only on the round-off error in the arithmetic. This has two advantages: – the accuracy is predictable and hence the performance of the digital signal processing algorithm is known a priori. – The round-off error can be minimized with appropriate design tech- niques and hence digital filters can meet very tight specifications on magnitude and phase characteristics (which would be almost impossi- ble to achieve with analogue filters because of component tolerances and circuit noise). 59 The widespread use of mini- and micro-computers in engineering has greatly increased the number of digital signals recorded and processed. -
Sequences Systems Convolution Dirac's Delta Function Fourier
Sequences Dirac’s Delta Function ( 1 0 x 6= 0 fxngn=−∞ is a discrete sequence. δ(x) = , R 1 δ(x)dx = 1 1 x = 0 −∞ Can derive a sequence from a function x(t) by having xn = n R 1 x(tsn) = x( ). Sampling: f(x)δ(x − a)dx = f(a) fs −∞ P1 P1 Absolute summability: n=−∞ jxnj < 1 Dirac comb: s(t) = ts n=−∞ δ(t − tsn), x^(t) = x(t)s(t) P1 2 Square summability: n=−∞ jxnj < 1 (aka energy signal) Periodic: 9k > 0 : 8n 2 Z : xn = xn+k Fourier Transform ( 0 n < 0 j!n un = is the unit-step sequence Discrete Sejong’s of the form xn = e are eigensequences with 1 n ≥ 0 respect to a system T because for any !, there is some H(!) ( such that T fxng = H(!)fxng 1 n = 0 1 δn = is the impulse sequence Ffg(t)g(!) = G(!) = R g(t)e∓j!tdt 0 n 6= 0 −∞ −1 R 1 ±j!t F fG(!)g(t) = g(t) = −∞ G(!)e dt Systems Linearity: ax(t) + by(t) aX(f) + bY (f) 1 f Time scaling: x(at) jaj X( a ) 1 t A discrete system T transforms a sequence: fyng = T fxng. Frequency scaling: jaj x( a ) X(af) −2πjf∆t Causal systems cannot look into the future: yn = Time shifting: x(t − ∆t) X(f)e f(xn; xn−1; xn−2;:::) 2πj∆ft Frequency shifting: x(t)e X(f − ∆f) Memoryless systems depend only on the current input: yn = R 1 2 R 1 2 Parseval’s theorem: 1 jx(t)j dt = −∞ jX(f)j df f(xn) Continuous convolution: Ff(f ∗ g)(t)g = Fff(t)gFfg(t)g Delay systems shift sequences in time: yn = xn−d Discrete convolution: fxng ∗ fyng = fzng () A system T is time invariant if for all d: fyng = T fxng () X(ej!)Y (ej!) = Z(ej!) fyn−dg = T fxn−dg 0 A system T is linear if for any sequences: T faxn + bxng = 0 Sample Transforms aT fxng + bT fxng Causal linear time-invariant systems are of the form The Fourier transform preserves function even/oddness but flips PN PM real/imaginaryness iff x(t) is odd.