Upsampling and Downsampling

Total Page:16

File Type:pdf, Size:1020Kb

Upsampling and Downsampling Multirate Signal Processing* Tutorial using MATLAB** By, Deborah Goshorn [email protected] I. Signal processing background II. Downsample Example III. Upsample Example * Multrate signal processing is used for the practical applications in signal processing to save costs, processing time, and many other practical reasons. ** MATLAB is an industry standard software which performed all computations and corresponding figures in this tutorial I. Signal processing background Receive an analog signal • Receive an analog signal at 5 Hz (as pictured below left, there are 5 wave cycles in one second.) • The highest frequency component (5 Hz) of the signal is called the signal’s bandwidth, BW, since in the examples in this presentation, the minimum frequency component is 0Hz. • This signal can be represented in two ways: 1 600 500 0.5 400 Peak signal 0 300 strength at 5 Hz SignalValue -0.5 200 SignalStrength 100 -1 0 0.2 0.4 0.6 0.8 1 0 Time (sec) 0 BW 5 10 15 20 25 Frequency (Hz) time representation (sec) frequency representation (Hz) Add high frequency components 1. Original 5 Hz signal BW = 5 Hz Adding high frequency 600 components 2 500 creates 2. Add a 1.5 400 jagged 10 Hz 1 300 edges in 0.5 component 200 0 SignalStrength the original SignalValue 600 1 100 BW = 10 Hz -0.5 5 Hz signal. 5000 -1 0 5 10 15 20 25 0.5 Frequency (Hz) 0 0.2 0.4 0.6 0.8 1 Time (sec) 400 600 0 3 300 500 3. ThenSignalValue add 2 200 -0.5 400 a 15 Hz SignalStrength 1 300100 component!-1 SignalValue 0 200 0 0 0.2 0.4 0.6 0.8 1 SignalStrength Time (sec) 0 5 10 15 20 25 100 Frequency (Hz) BW = 15 Hz -1 0 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 25 Time (sec) Frequency (Hz) Sampling the signal: Nyquist Rate • In order to sample the signal without losing information, use a sampling rate (SR) of at least the Nyquist Rate (NR), which is 2 x BW of the received analog signal. 600 500 400 300 SignalStrength 200 Signal Nyquist Rate NR bandwidth = 2 x 15Hz 100 BW = 15 Hz = 30 Hz 0 0 5 10 15 20 25 30 35 Frequency (Hz) RULE: Sampling Rate SR ≥ Nyquist Rate NR Sampling the signal: Nyquist Rate Since Bandwidth BW = 15 Hz, the Nyquist Rate NR = 2 x 15Hz = 30Hz. RULE #1: Sampling Rate SR ≥ Nyquist Rate NR 200 3 2 150 1 100 Signal SignalValue 0 SignalStrength bandwidth 50 BW = 15 Hz Sample Rate SR = 40 Hz -1 0 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 25 30 35 40 Time (sec) Frequency (Hz) Let Sample Rate S = 40 Hz, R Nyquist Rate so sample signal every 0.025 sec (25 milliseconds). NR = 30 Hz Sampling the signal: Nyquist Freq • The Nyquist Frequency (NF) is equal to half of the sampling rate (SR). The NF must be equal to or greater than the bandwidth BW of the desired signal to reconstruct. Rule #2: Nyquist Frequency200 NF ≥ Bandwidth BW 150 100 SignalStrength 50 Nyquist Freq NF Signal = 40/2 0 bandwidth0 5 10 = 2015 Hz20 25 30 35 40 BW = 15 Hz Frequency (Hz) Sample Rate SR = 40 Hz II. Downsample Example Recall, our original signal at 5Hz… 1. Original 5 Hz signal BW = 5 Hz 2. We added 10 & 15 Hz components! BW = 15 Hz 1 600 500 0.5 400 600 200 0 3 3 300 3. Then we 500 2 SignalValue 2 150 200 -0.5 400 sampled at SignalStrength 1 1 300100 100 SR1 = 40Hz-1 SignalValue 0 SignalValue 200 0 0 SignalStrength 0 0.2 0.4 0.6 0.8 1 SignalStrength 50 Time (sec) 0 5 10 15 20 25 -1 100 Frequency (Hz) BW = 15 Hz -1 0 0 0.2 0.4 0.6 0.8 1 0 0 5 10 15 20 25 0 0.2 0.4 Time0.6 (sec)0.8 1 0 5 10 15 20 25Frequency (Hz) Time (sec) Frequency (Hz) Resample the sampled signal: downsampling Downsample by 4 means to retain only every 4th sample 3 2 4 1 SignalValue 0 -1 0 0.2 0.4 0.6 0.8 1 3 Time (sec) Sample Rate 1 S = 40Hz2 R1 Sample Rate 2 SR2 = 10 Hz 1 N = 20Hz > 15HzSignalValue 0 = BW F1 NF2 = 5Hz < 15Hz = BW -1 0 0.2 0.4 0.6 0.8 1 GOOD! Time (sec) BAD! Nyquist Freq < Bandwidth Cannot recover original signal bandwidth, since new Nyquist Frequency (5Hz) is less than the desired signal bandwdidth BW (15Hz). NF2 < BW means we cannot recover 15Hz BW signal 200 150 100 Signal Nyquist Freq 1 Nyquist Freq 2 SignalStrength 50 bandwidth NF1 = 40/2 NF2 = 10/2 = 5 Hz BW = 15 Hz = 20 Hz 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) Is the original 5Hz signal recoverable? It should be, since NF2 ≥ BW 5 Hz Why 5Hz signal not recoverable: High Frequency band causes aliasing when downsampled Will wrap down to 0Hz 200 150 Nyquist Freq 1 NF1 = 40/2 Nyquist Freq 2 Signal = 20 Hz bandwidth NF2 = 10/2 100 = 5 Hz BW = 15 Hz SignalStrength 50 High 0 0 5 10 15 20 25 30 35 40 frequency Frequency (Hz) band NF2 NF1 High frequency band will wrap down to 0Hz when downsampled Why 5Hz signal not recoverable: Aliasing Effects Due to the high frequency components at 10Hz and 15Hz that show up at 0Hz when the signal is downsampled, the 5Hz component is not recoverable. 180 3 160 140 Recovered 5Hz 2 component 120 1 100 80 SignalValue 0 SignalStrength 60 Aliasing effects: high -1 40 frequency components 20 wrapped around to 0Hz! 0 0.2 0.4 0.6 0.8 1 Time (sec) 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) SR2 = 10 Hz … unless we remove the high frequency components before downsampling. How to Remove the High Frequency components before downsampling using a low-pass filter • A low-pass filter (LPF) removes high frequency components by only letting low frequency components pass through. 200 100 80 60 LPF 150 40 SignalStrength 20 0 100 0 5 10 15 20 25 30 35 40 Frequency (Hz) It removes the jagged edges that were due to high frequencies. SignalStrength 50 3 1 2 0 0 5 10 0.5 15 20 25 30 35 40 1 Frequency (Hz) LPF 0 SignalValue 0 SignalValue -0.5 -1 -1 4 4.2 4.4 4.6 4.8 5 0 0.2 0.4 0.6 0.8 1 Time (sec) Time (sec) Proof in the pudding: No more aliasing effects when using low pass filter! 5 200 4 3 LPF 150 4 2 SignalStrength 1 100 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) S = 40 Hz SignalStrength 50 R1 SR2 = 10 Hz 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) The original 5Hz signal is successfully recovered! Proof in the pudding: LPF+downsampling <==> multirate polyphase filter resampling Sample Rate 2 S = 10 Hz 5 R2 4 LPF 4 3 200 2 SignalStrength 1 150 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) 100 MATLAB’S* Sample Rate 2 SR2 = 10 Hz PolyphaseSignalStrength 50-filter Implemented Sample Rate 1 Resample (0by 1/4) SR1 = 40 Hz 0 5 10 15 20 25 30 35 40 Function Frequency (Hz) * MATLAB is an industry standard software which performed all computations and corresponding figures in this presentation III. Upsampling example Assume our original signal at 5Hz… 1. Original 5 Hz signal BW = 5 Hz Nyquist Rate NR = 2 x BW 5Hz = 10Hz, so sample at sampling rate SR = 15Hz 1 600 250 1 500 0.5 200 2. We sample 0.5 400 150 0 at S = 15Hz 0 300 R1 100 SignalValue SignalStrength SignalValue 200 -0.5 -0.5 SignalStrength 50 BW 100 = 5Hz -1 0 -1 0 5 10 15 20 25 0 0.2 0.4 0.6 0.8 1 Frequency (Hz) 0 0.2 0.4 0.6 0.8 Time1 (sec) 0 Time (sec) 0 5 10 15 20 25 Frequency (Hz) Resample the sampled signal: upsampling If you need to increase the number of samples in a given time by a factor of 5, you upsample by 5 (insert 5-1=4 zeros between each sample). 0.2 sec 0.2 sec 1 0.5 0 5 SignalValue 1 -0.5 0.5 -1 0 0 0.05 0.1 0.15 0.2 SignalValue -0.5 Time (sec) -1 Sample Rate 1 0 0.2 0.4 0.6 0.8 1 Sample Rate 2 Time (sec) SR1 = 15 Hz SR2 = 75 Hz Upsampled signal in frequency representation 0.2 sec 0.2 sec 1 0.5 Sample Rate 1 Sample Rate 2 S0R2 = 75 Hz SR1 = 15 Hz 5 120 Oops! 250 SignalValue 1 -0.5100 200 0.5 80 -1 150 0 60 0 0.05 0.1 0.15 0.2 SignalValue -0.5 Time (sec) 100 SignalStrength 40 -1 SignalStrength 0 0.2 0.4 0.6 0.8 1 50 Time (sec) 20 0 0 0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40 Frequency (Hz) Frequency (Hz) Upsampling causes aliasing in higher frequencies Upsampling causes copies of the original 5Hz component at multiples of original sampling rate, 15Hz, plus/minus 5Hz Mirror Images at: 15 – 5 = 10 Hz 15 + 5 = 20 Hz 2*15 - 5 = 25 Hz 2*15 + 15 = 35 Hz 5 … 120 250 100 Signal 200 bandwidth 80 BW = 5 Hz 150 60 100 SignalStrength Signal 40 SignalStrength Sample Rate 1 bandwidth 50 SR1 = 15 Hz BW = 5 Hz20 0 0 0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40 FrequencyHow (Hz)do we remove these extra high frequency components?Frequency (Hz) How to remove the extra high frequency components caused by upsampling using a low-pass filter 8 6 4 LPF SignalStrength 2 120 100 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) 80 60 SignalStrength 40 Low pass filter removes these extra high frequency20 components 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) Proof in the pudding: No more aliasing effects when using low pass filter! 8 6 5 LPF 4 SignalStrength 2 250 0 0 5 10 15 20 25 30 35 40 200S = 40 Hz R1 SFrequencyR2 = 10 (Hz) Hz 150 100 SignalStrength 50 All high frequency copies of the 5Hz signal are removed! 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) Proof in the pudding: upsampling and lowpass filter <==> multirate polyphase filter resampling 8 Sample Rate 2 SR2 = 75 Hz 6 4 250 5 LPF SignalStrength 2 200 150 0 0 5 10 15 20 25 30 35 40 Frequency (Hz) 100 500 SignalStrength 50 Sample Rate 2 400 S = 75 Hz MATLAB’S* R2 0 0 5 10 15 20 25 30 35 40 300 Frequency (Hz) Polyphase-filter Implemented 200 Sample Rate 1 Resample (by 5) SignalStrength S = 15 Hz R1 Function 100 0 0 5 10 15 20 25 30 35 40 * MATLAB is an industry standard software which performed all Frequency (Hz) computations and corresponding figures in this presentation.
Recommended publications
  • Mathematical Basics of Bandlimited Sampling and Aliasing
    Signal Processing Mathematical basics of bandlimited sampling and aliasing Modern applications often require that we sample analog signals, convert them to digital form, perform operations on them, and reconstruct them as analog signals. The important question is how to sample and reconstruct an analog signal while preserving the full information of the original. By Vladimir Vitchev o begin, we are concerned exclusively The limits of integration for Equation 5 T about bandlimited signals. The reasons are specified only for one period. That isn’t a are both mathematical and physical, as we problem when dealing with the delta func- discuss later. A signal is said to be band- Furthermore, note that the asterisk in Equa- tion, but to give rigor to the above expres- limited if the amplitude of its spectrum goes tion 3 denotes convolution, not multiplica- sions, note that substitutions can be made: to zero for all frequencies beyond some thresh- tion. Since we know the spectrum of the The integral can be replaced with a Fourier old called the cutoff frequency. For one such original signal G(f), we need find only the integral from minus infinity to infinity, and signal (g(t) in Figure 1), the spectrum is zero Fourier transform of the train of impulses. To the periodic train of delta functions can be for frequencies above a. In that case, the do so we recognize that the train of impulses replaced with a single delta function, which is value a is also the bandwidth (BW) for this is a periodic function and can, therefore, be the basis for the periodic signal.
    [Show full text]
  • Efficient Supersampling Antialiasing for High-Performance Architectures
    Efficient Supersampling Antialiasing for High-Performance Architectures TR91-023 April, 1991 Steven Molnar The University of North Carolina at Chapel Hill Department of Computer Science CB#3175, Sitterson Hall Chapel Hill, NC 27599-3175 This work was supported by DARPA/ISTO Order No. 6090, NSF Grant No. DCI- 8601152 and IBM. UNC is an Equa.l Opportunity/Affirmative Action Institution. EFFICIENT SUPERSAMPLING ANTIALIASING FOR HIGH­ PERFORMANCE ARCHITECTURES Steven Molnar Department of Computer Science University of North Carolina Chapel Hill, NC 27599-3175 Abstract Techniques are presented for increasing the efficiency of supersampling antialiasing in high-performance graphics architectures. The traditional approach is to sample each pixel with multiple, regularly spaced or jittered samples, and to blend the sample values into a final value using a weighted average [FUCH85][DEER88][MAMM89][HAEB90]. This paper describes a new type of antialiasing kernel that is optimized for the constraints of hardware systems and produces higher quality images with fewer sample points than traditional methods. The central idea is to compute a Poisson-disk distribution of sample points for a small region of the screen (typically pixel-sized, or the size of a few pixels). Sample points are then assigned to pixels so that the density of samples points (rather than weights) for each pixel approximates a Gaussian (or other) reconstruction filter as closely as possible. The result is a supersampling kernel that implements importance sampling with Poisson-disk-distributed samples. The method incurs no additional run-time expense over standard weighted-average supersampling methods, supports successive-refinement, and can be implemented on any high-performance system that point samples accurately and has sufficient frame-buffer storage for two color buffers.
    [Show full text]
  • Designing Commutative Cascades of Multidimensional Upsamplers And
    IEEE SIGNAL PROCESSING LETTERS: SPL.SP.4.1 THEORY, ALGORITHMS, AND SYSTEMS 0 Designing Commutative Cascades of Multidimensional Upsamplers and Downsamplers Brian L. Evans, Member, IEEE Abstract In multiple dimensions, the cascade of an upsampler by L and a downsampler by L commutes if and only if the integer matrices L and M are right coprime and LM = ML. This pap er presents algorithms to design L and M that yield commutative upsampler/dowsampler cascades. We prove that commutativity is p ossible if the 1 Jordan canonical form of the rational resampling matrix R = LM is equivalent to the Smith-McMillan form of R. A necessary condition for this equivalence is that R has an eigendecomp osition and the eigenvalues are rational. B. L. Evans is with the Department of Electrical and Computer Engineering, The UniversityofTexas at Austin, Austin, TX 78712-1084, USA. E-mail: [email protected], Web: http://www.ece.utexas.edu/~b evans, Phone: 512 232-1457, Fax: 512 471-5907. This work was sp onsored in part by NSF CAREER Award under Grant MIP-9702707. July 31, 1997 DRAFT IEEE SIGNAL PROCESSING LETTERS: SPL.SP.4.1 THEORY, ALGORITHMS, AND SYSTEMS 1 I. Introduction 1 Resampling systems scale the sampling rate by a rational factor R = L=M = LM , or 1 equivalently decimate by H = M=L = L M [1], by essentially upsampling by L, ltering, and downsampling by M . In converting compact disc data sampled at 44.1 kHz to digital audio tap e 48000 Hz 160 data sampled at 48 kHz, R = = . Because we can always factor R into coprime 44100 Hz 147 integers L and M , we can always commute the upsampler and downsampler which leads to ecient p olyphase structures of the resampling system.
    [Show full text]
  • Super-Sampling Anti-Aliasing Analyzed
    Super-sampling Anti-aliasing Analyzed Kristof Beets Dave Barron Beyond3D [email protected] Abstract - This paper examines two varieties of super-sample anti-aliasing: Rotated Grid Super- Sampling (RGSS) and Ordered Grid Super-Sampling (OGSS). RGSS employs a sub-sampling grid that is rotated around the standard horizontal and vertical offset axes used in OGSS by (typically) 20 to 30°. RGSS is seen to have one basic advantage over OGSS: More effective anti-aliasing near the horizontal and vertical axes, where the human eye can most easily detect screen aliasing (jaggies). This advantage also permits the use of fewer sub-samples to achieve approximately the same visual effect as OGSS. In addition, this paper examines the fill-rate, memory, and bandwidth usage of both anti-aliasing techniques. Super-sampling anti-aliasing is found to be a costly process that inevitably reduces graphics processing performance, typically by a substantial margin. However, anti-aliasing’s posi- tive impact on image quality is significant and is seen to be very important to an improved gaming experience and worth the performance cost. What is Aliasing? digital medium like a CD. This translates to graphics in that a sample represents a specific moment as well as a Computers have always strived to achieve a higher-level specific area. A pixel represents each area and a frame of quality in graphics, with the goal in mind of eventu- represents each moment. ally being able to create an accurate representation of reality. Of course, to achieve reality itself is impossible, At our current level of consumer technology, it simply as reality is infinitely detailed.
    [Show full text]
  • Discrete - Time Signals and Systems
    Discrete - Time Signals and Systems Sampling – II Sampling theorem & Reconstruction Yogananda Isukapalli Sampling at diffe- -rent rates From these figures, it can be concluded that it is very important to sample the signal adequately to avoid problems in reconstruction, which leads us to Shannon’s sampling theorem 2 Fig:7.1 Claude Shannon: The man who started the digital revolution Shannon arrived at the revolutionary idea of digital representation by sampling the information source at an appropriate rate, and converting the samples to a bit stream Before Shannon, it was commonly believed that the only way of achieving arbitrarily small probability of error in a communication channel was to 1916-2001 reduce the transmission rate to zero. All this changed in 1948 with the publication of “A Mathematical Theory of Communication”—Shannon’s landmark work Shannon’s Sampling theorem A continuous signal xt( ) with frequencies no higher than fmax can be reconstructed exactly from its samples xn[ ]= xn [Ts ], if the samples are taken at a rate ffs ³ 2,max where fTss= 1 This simple theorem is one of the theoretical Pillars of digital communications, control and signal processing Shannon’s Sampling theorem, • States that reconstruction from the samples is possible, but it doesn’t specify any algorithm for reconstruction • It gives a minimum sampling rate that is dependent only on the frequency content of the continuous signal x(t) • The minimum sampling rate of 2fmax is called the “Nyquist rate” Example1: Sampling theorem-Nyquist rate x( t )= 2cos(20p t ), find the Nyquist frequency ? xt( )= 2cos(2p (10) t ) The only frequency in the continuous- time signal is 10 Hz \ fHzmax =10 Nyquist sampling rate Sampling rate, ffsnyq ==2max 20 Hz Continuous-time sinusoid of frequency 10Hz Fig:7.2 Sampled at Nyquist rate, so, the theorem states that 2 samples are enough per period.
    [Show full text]
  • The Nyquist Sampling Rate for Spiraling Curves 11
    THE NYQUIST SAMPLING RATE FOR SPIRALING CURVES PHILIPPE JAMING, FELIPE NEGREIRA & JOSE´ LUIS ROMERO Abstract. We consider the problem of reconstructing a compactly supported function from samples of its Fourier transform taken along a spiral. We determine the Nyquist sampling rate in terms of the density of the spiral and show that, below this rate, spirals suffer from an approximate form of aliasing. This sets a limit to the amount of under- sampling that compressible signals admit when sampled along spirals. More precisely, we derive a lower bound on the condition number for the reconstruction of functions of bounded variation, and for functions that are sparse in the Haar wavelet basis. 1. Introduction 1.1. The mobile sampling problem. In this article, we consider the reconstruction of a compactly supported function from samples of its Fourier transform taken along certain curves, that we call spiraling. This problem is relevant, for example, in magnetic resonance imaging (MRI), where the anatomy and physiology of a person are captured by moving sensors. The Fourier sampling problem is equivalent to the sampling problem for bandlimited functions - that is, functions whose Fourier transform are supported on a given compact set. The most classical setting concerns functions of one real variable with Fourier transform supported on the unit interval [ 1/2, 1/2], and sampled on a grid ηZ, with η > 0. The sampling rate η determines whether− every bandlimited function can be reconstructed from its samples: reconstruction fails if η > 1 and succeeds if η 6 1 [42]. The transition value η = 1 is known as the Nyquist sampling rate, and it is the benchmark for all sampling schemes: modern sampling strategies that exploit the particular structure of a certain class of signals are praised because they achieve sub-Nyquist sampling rates.
    [Show full text]
  • 2.161 Signal Processing: Continuous and Discrete Fall 2008
    MIT OpenCourseWare http://ocw.mit.edu 2.161 Signal Processing: Continuous and Discrete Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING 2.161 Signal Processing - Continuous and Discrete 1 Sampling and the Discrete Fourier Transform 1 Sampling Consider a continuous function f(t) that is limited in extent, T1 · t < T2. In order to process this function in the computer it must be sampled and represented by a ¯nite set of numbers. The most common sampling scheme is to use a ¯xed sampling interval ¢T and to form a sequence of length N: ffng (n = 0 : : : N ¡ 1), where fn = f(T1 + n¢T ): In subsequent processing the function f(t) is represented by the ¯nite sequence ffng and the sampling interval ¢T . In practice, sampling occurs in the time domain by the use of an analog-digital (A/D) converter. The mathematical operation of sampling (not to be confused with the physics of sampling) is most commonly described as a multiplicative operation, in which f(t) is multiplied by a Dirac comb sampling function s(t; ¢T ), consisting of a set of delayed Dirac delta functions: X1 s(t; ¢T ) = ±(t ¡ n¢T ): (1) n=¡1 ? We denote the sampled waveform f (t) as X1 ? f (t) = s(t; ¢T )f(t) = f(t)±(t ¡ n¢T ) (2) n=¡1 ? as shown in Fig. 1. Note that f (t) is a set of delayed weighted delta functions, and that the waveform must be interpreted in the distribution sense by the strength (or area) of each component impulse.
    [Show full text]
  • Efficient Multidimensional Sampling
    EUROGRAPHICS 2002 / G. Drettakis and H.-P. Seidel Volume 21 (2002 ), Number 3 (Guest Editors) Efficient Multidimensional Sampling Thomas Kollig and Alexander Keller Department of Computer Science, Kaiserslautern University, Germany Abstract Image synthesis often requires the Monte Carlo estimation of integrals. Based on a generalized con- cept of stratification we present an efficient sampling scheme that consistently outperforms previous techniques. This is achieved by assembling sampling patterns that are stratified in the sense of jittered sampling and N-rooks sampling at the same time. The faster convergence and improved anti-aliasing are demonstrated by numerical experiments. Categories and Subject Descriptors (according to ACM CCS): G.3 [Probability and Statistics]: Prob- abilistic Algorithms (including Monte Carlo); I.3.2 [Computer Graphics]: Picture/Image Generation; I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism. 1. Introduction general concept of stratification than just joining jit- tered and Latin hypercube sampling. Since our sam- Many rendering tasks are given in integral form and ples are highly correlated and satisfy a minimum dis- usually the integrands are discontinuous and of high tance property, noise artifacts are attenuated much 22 dimension, too. Since the Monte Carlo method is in- more efficiently and anti-aliasing is improved. dependent of dimension and applicable to all square- integrable functions, it has proven to be a practical tool for numerical integration. It relies on the point 2. Monte Carlo Integration sampling paradigm and such on sample placement. In- The Monte Carlo method of integration estimates the creasing the uniformity of the samples is crucial for integral of a square-integrable function f over the s- the efficiency of the stochastic method and the level dimensional unit cube by of noise contained in the rendered images.
    [Show full text]
  • Signal Sampling
    FYS3240 PC-based instrumentation and microcontrollers Signal sampling Spring 2017 – Lecture #5 Bekkeng, 30.01.2017 Content – Aliasing – Sampling – Analog to Digital Conversion (ADC) – Filtering – Oversampling – Triggering Analog Signal Information Three types of information: • Level • Shape • Frequency Sampling Considerations – An analog signal is continuous – A sampled signal is a series of discrete samples acquired at a specified sampling rate – The faster we sample the more our sampled signal will look like our actual signal Actual Signal – If not sampled fast enough a problem known as aliasing will occur Sampled Signal Aliasing Adequately Sampled SignalSignal Aliased Signal Bandwidth of a filter • The bandwidth B of a filter is defined to be between the -3 dB points Sampling & Nyquist’s Theorem • Nyquist’s sampling theorem: – The sample frequency should be at least twice the highest frequency contained in the signal Δf • Or, more correctly: The sample frequency fs should be at least twice the bandwidth Δf of your signal 0 f • In mathematical terms: fs ≥ 2 *Δf, where Δf = fhigh – flow • However, to accurately represent the shape of the ECG signal signal, or to determine peak maximum and peak locations, a higher sampling rate is required – Typically a sample rate of 10 times the bandwidth of the signal is required. Illustration from wikipedia Sampling Example Aliased Signal 100Hz Sine Wave Sampled at 100Hz Adequately Sampled for Frequency Only (Same # of cycles) 100Hz Sine Wave Sampled at 200Hz Adequately Sampled for Frequency and Shape 100Hz Sine Wave Sampled at 1kHz Hardware Filtering • Filtering – To remove unwanted signals from the signal that you are trying to measure • Analog anti-aliasing low-pass filtering before the A/D converter – To remove all signal frequencies that are higher than the input bandwidth of the device.
    [Show full text]
  • Deep Image Prior for Undersampling High-Speed Photoacoustic Microscopy
    Photoacoustics 22 (2021) 100266 Contents lists available at ScienceDirect Photoacoustics journal homepage: www.elsevier.com/locate/pacs Deep image prior for undersampling high-speed photoacoustic microscopy Tri Vu a,*, Anthony DiSpirito III a, Daiwei Li a, Zixuan Wang c, Xiaoyi Zhu a, Maomao Chen a, Laiming Jiang d, Dong Zhang b, Jianwen Luo b, Yu Shrike Zhang c, Qifa Zhou d, Roarke Horstmeyer e, Junjie Yao a a Photoacoustic Imaging Lab, Duke University, Durham, NC, 27708, USA b Department of Biomedical Engineering, Tsinghua University, Beijing, 100084, China c Division of Engineering in Medicine, Department of Medicine, Brigham and Women’s Hospital, Harvard Medical School, Cambridge, MA, 02139, USA d Department of Biomedical Engineering and USC Roski Eye Institute, University of Southern California, Los Angeles, CA, 90089, USA e Computational Optics Lab, Duke University, Durham, NC, 27708, USA ARTICLE INFO ABSTRACT Keywords: Photoacoustic microscopy (PAM) is an emerging imaging method combining light and sound. However, limited Convolutional neural network by the laser’s repetition rate, state-of-the-art high-speed PAM technology often sacrificesspatial sampling density Deep image prior (i.e., undersampling) for increased imaging speed over a large field-of-view. Deep learning (DL) methods have Deep learning recently been used to improve sparsely sampled PAM images; however, these methods often require time- High-speed imaging consuming pre-training and large training dataset with ground truth. Here, we propose the use of deep image Photoacoustic microscopy Raster scanning prior (DIP) to improve the image quality of undersampled PAM images. Unlike other DL approaches, DIP requires Undersampling neither pre-training nor fully-sampled ground truth, enabling its flexible and fast implementation on various imaging targets.
    [Show full text]
  • ELEG 5173L Digital Signal Processing Ch. 3 Discrete-Time Fourier Transform
    Department of Electrical Engineering University of Arkansas ELEG 5173L Digital Signal Processing Ch. 3 Discrete-Time Fourier Transform Dr. Jingxian Wu [email protected] 2 OUTLINE • The Discrete-Time Fourier Transform (DTFT) • Properties • DTFT of Sampled Signals • Upsampling and downsampling 3 DTFT • Discrete-time Fourier Transform (DTFT) X () x(n)e jn n – (radians): digital frequency • Review: Z-transform: X (z) x(n)zn n0 j X () X (z) | j – Replace z with e . ze • Review: Fourier transform: X () x(t)e jt – (rads/sec): analog frequency 4 DTFT • Relationship between DTFT and Fourier Transform – Sample a continuous time signal x a ( t ) with a sampling period T xs (t) xa (t) (t nT ) xa (nT ) (t nT ) n n – The Fourier Transform of ys (t) jt jnT X s () xs (t)e dt xa (nT)e n – Define: T • : digital frequency (unit: radians) • : analog frequency (unit: radians/sec) – Let x(n) xa (nT) X () X s T 5 DTFT • Relationship between DTFT and Fourier Transform (Cont’d) – The DTFT can be considered as the scaled version of the Fourier transform of the sampled continuous-time signal jt jnT X s () xs (t)e dt xa (nT)e n x(n) x (nT) T a jn X () X s x(n)e T n 6 DTFT • Discrete Frequency – Unit: radians (the unit of continuous frequency is radians/sec) – X ( ) is a periodic function with period 2 j2 n jn j2n jn X ( 2 ) x(n)e x(n)e e x(n)e X () n n n – We only need to consider for • For Fourier transform, we need to consider 1 – f T 2 2T 1 – f T 2 2T 7 DTFT • Example: find the DTFT of the following signal – 1.
    [Show full text]
  • F • Aliasing Distortion • Quantization Noise • Bandwidth Limitations • Cost of A/D & D/A Conversion
    Aliasing • Aliasing distortion • Quantization noise • A 1 Hz Sine wave sampled at 1.8 Hz • Bandwidth limitations • A 0.8 Hz sine wave sampled at 1.8 Hz • Cost of A/D & D/A conversion -fs fs THE UNIVERSITY OF TEXAS AT AUSTIN Advantages of Digital Systems Perfect reconstruction of a Better trade-off between signal is possible even after bandwidth and noise severe distortion immunity performance digital analog bandwidth Increase signal-to-noise ratio simply by adding more bits SNR = -7.2 + 6 dB/bit THE UNIVERSITY OF TEXAS AT AUSTIN Advantages of Digital Systems Programmability • Modifiable in the field • Implement multiple standards • Better user interfaces • Tolerance for changes in specifications • Get better use of hardware for low-speed operations • Debugging • User programmability THE UNIVERSITY OF TEXAS AT AUSTIN Disadvantages of Digital Systems Programmability • Speed is too slow for some applications • High average power and peak power consumption RISC (2 Watts) vs. DSP (50 mW) DATA PROG MEMORY MEMORY HARVARD ARCHITECTURE • Aliasing from undersampling • Clipping from quantization Q[v] v v THE UNIVERSITY OF TEXAS AT AUSTIN Analog-to-Digital Conversion 1 --- T h(t) Q[.] xt() yt() ynT() yˆ()nT Anti-Aliasing Sampler Quantizer Filter xt() y(nT) t n y(t) ^y(nT) t n THE UNIVERSITY OF TEXAS AT AUSTIN Resampling Changing the Sampling Rate • Conversion between audio formats Compact 48.0 Digital Disc ---------- Audio Tape 44.1 KHz44.1 48 KHz • Speech compression Speech 1 Speech for on DAT --- Telephone 48 KHz 6 8 KHz • Video format conversion
    [Show full text]