DSPRelated.com

Neil Robertson (@neirober)

Neil Robertson worked at Scientific Atlanta, Cisco, and ST Micro doing RF design, System Design, and DSP design for cable TV set-top boxes and cable modems. He is retired and lives in Columbus, Ohio.

A Lesson in Statistics Using Random Sequences

Neil RobertsonNeil Robertson March 14, 20267 comments

Statistics may come naturally to some people, but it is a difficult subject for many of us. Using simulations helps to remove some of the mystery of statistics. Luckily, it is trivial to produce a pseudo-random Gaussian or uniform sequence: a single command in Matlab (or Python) does it. In this article, I try to explain a few concepts using Gaussian and uniform random sequences generated in Matlab. First, we’ll generate a Gaussian sequence, calculate its variance, and plot a histogram and probability density function (PDF). Next, we’ll simulate the roll of a single die to illustrate a uniform distribution. Then we’ll simulate rolling two dice and finally, as an illustration of the Central Limit Theorem, we’ll sum the total when rolling several dice to obtain an approximately Gaussian distribution.


Simple but Effective Spectrum Averaging

Neil RobertsonNeil Robertson January 2, 20264 comments

In this article, I provide a Matlab function that performs exponential PSD averaging, using first-order infinite impulse response (IIR) filtering to continuously average the PSD bins. This approach works well for computing the spectrum of a long-duration signal over time, because the spectrum is constantly updated as new PSD’s are computed. Conveniently, the time constant of the PSD averaging is determined by the single adjustable parameter α. I also provide a Matlab function for conventional (unweighted) PSD averaging. Neither function requires any canned code other than the Fast Fourier Transform (FFT), although I do use the Matlab hann window function for convenience.


The First-Order IIR Filter -- More than Meets the Eye

Neil RobertsonNeil Robertson November 16, 20257 comments

While we might be inclined to disdain the simple first-order infinite impulse response (IIR) filter, it is not so simple that we can’t learn something from it. Studying it can teach DSP math skills, and it is a very useful filter in its own right. In this article, we’ll examine the time response of the filter, compare the first-order IIR filter to the FIR moving average filter, use it to smooth a noisy signal, compute the functional form of the impulse response, and find the frequency response.


A Matlab Function for FIR Half-Band Filter Design

Neil RobertsonNeil Robertson July 6, 20259 comments

FIR Half-band filters are not difficult to design. In an earlier post [1], I showed how to design them using the window method. Here, I provide a short Matlab function halfband_synth that uses the Parks-McClellan algorithm (Matlab function firpm [2]) to synthesize half-band filters. Compared to the window method, this method uses fewer taps to achieve a given performance.


The Discrete Fourier Transform of Symmetric Sequences

Neil RobertsonNeil Robertson December 8, 2024

Symmetric sequences arise often in digital signal processing. Examples include symmetric pulses, window functions, and the coefficients of most finite-impulse response (FIR) filters, not to mention the cosine function. Examining symmetric sequences can give us some insights into the Discrete Fourier Transform (DFT). An even-symmetric sequence is centered at n = 0 and xeven(n) = xeven(-n). The DFT of xeven(n) is real. Most often, signals we encounter start at n = 0, so they are not strictly speaking even-symmetric. We’ll look at the relationship between the DFT’s of such sequences and those of true even-symmetric sequences.


Learn to Use the Discrete Fourier Transform

Neil RobertsonNeil Robertson September 28, 2024

Discrete-time sequences arise in many ways: a sequence could be a signal captured by an analog-to-digital converter; a series of measurements; a signal generated by a digital modulator; or simply the coefficients of a digital filter. We may wish to know the frequency spectrum of any of these sequences. The most-used tool to accomplish this is the Discrete Fourier Transform (DFT), which computes the discrete frequency spectrum of a discrete-time sequence. The DFT is easily calculated using software, but applying it successfully can be challenging. This article provides Matlab examples of some techniques you can use to obtain useful DFT’s.


Model a Sigma-Delta DAC Plus RC Filter

Neil RobertsonNeil Robertson March 16, 20246 comments

Sigma-delta digital-to-analog converters (SD DAC’s) are often used for discrete-time signals with sample rate much higher than their bandwidth. For the simplest case, the DAC output is a single bit, so the only interface hardware required is a standard digital output buffer. Because of the high sample rate relative to signal bandwidth, a very simple DAC reconstruction filter suffices, often just a one-pole RC lowpass. In this article, I present a simple Matlab function that models the combination of a basic SD DAC and one-pole RC filter. This model allows easy evaluation of the overall performance for a given input signal and choice of sample rate, R, and C.


DAC Zero-Order Hold Models

Neil RobertsonNeil Robertson January 21, 20242 comments

This article provides two simple time-domain models of a DAC’s zero-order hold. These models will allow us to find time and frequency domain approximations of DAC outputs, and simulate analog filtering of those outputs. Developing the models is also a good way to learn about the DAC ZOH function.


Decimators Using Cascaded Multiplierless Half-band Filters

Neil RobertsonNeil Robertson November 19, 2023

In my last post, I provided coefficients for several multiplierless half-band FIR filters. In the comment section, Rick Lyons mentioned that such filters would be useful in a multi-stage decimator. For such an application, any subsequent multipliers save on resources, since they operate at a fraction of the maximum sample frequency. We’ll examine the frequency response and aliasing of a multiplierless decimate-by-8 cascade in this article, and we’ll also discuss an interpolator cascade using the same half-band filters.


Multiplierless Half-band Filters and Hilbert Transformers

Neil RobertsonNeil Robertson October 7, 20238 comments

This article provides coefficients of multiplierless Finite Impulse Response 7-tap, 11-tap, and 15-tap half-band filters and Hilbert Transformers. Since Hilbert transformer coefficients are simply related to half-band coefficients, multiplierless Hilbert transformers are easily derived from multiplierless half-bands.


Interpolator Design: Get the Stopbands Right

Neil RobertsonNeil Robertson July 6, 20236 comments

In this article, I present a simple approach for designing interpolators that takes the guesswork out of determining the stopbands.


Simple Discrete-Time Modeling of Lossy LC Filters

Neil RobertsonNeil Robertson April 19, 20231 comment

Converting a lossy LC filter into a discrete-time impulse response lets you analyze mixed analog and DSP systems in one time domain. This post walks through computing the LC frequency response via chain (ABCD) parameters including resistive losses, enforcing the Hermitian symmetry required for a real IDFT, and using the IDFT to produce an asymmetrical FIR impulse response. A 5th-order Butterworth example illustrates insertion loss and impulse-shape effects.


The Discrete Fourier Transform as a Frequency Response

Neil RobertsonNeil Robertson February 4, 20238 comments

Neil Robertson shows that the discrete frequency response H(k) of an FIR filter is exactly the DFT of its impulse response h(n). He derives the continuous H(ω) and discrete H(k) using complex exponentials for a four-tap FIR, then replaces h(n) with x(n) to recover the general DFT formula. The post keeps the math simple and calls out topics left for separate treatment, such as windowing and phase.


Add the Hilbert Transformer to Your DSP Toolkit, Part 2

Neil RobertsonNeil Robertson December 4, 20223 comments

This post shows a simple practical route to a Hilbert transformer by starting from a half-band FIR filter and tweaking its symmetry. It walks through a 19-tap example synthesized with Matlab's firpm (Parks-McClellan), explains the required frequency scaling, and shows how even-numbered taps become (or can be forced) zero through symmetry and coefficient quantization. Useful design rules are summarized for choosing ntaps.


Add the Hilbert Transformer to Your DSP Toolkit, Part 1

Neil RobertsonNeil Robertson November 22, 20224 comments

Learn how the Hilbert transformer creates a 90-degree phase-shifted quadrature component without down-conversion, and why it is simply a special FIR filter. Part 1 defines the transformer, derives its ideal frequency response H(ω)=j for ω<0 and -j for ω≥0, and walks through Matlab examples that demonstrate phase shifting and image attenuation for bandpass signals.


Book Recommendation "What is Mathematics?"

Neil RobertsonNeil Robertson June 20, 20227 comments

Richard Courant and Herbert Robbins' What is Mathematics? is a lucid, classic survey that still rewards engineers who want a concept-first refresher. The author praises the book's calculus chapters as concise and readable, recommending specific sections on complex numbers, functions and limits, and calculus for practical study. Note that linear algebra is not covered and the 1996 edition adds a short Ian Stewart chapter on recent developments.


Evaluate Noise Performance of Discrete-Time Differentiators

Neil RobertsonNeil Robertson March 28, 20228 comments

Differentiators can be wildly different at rejecting noise, even when they share the same usable bandwidth. Neil Robertson introduces the Differentiator Noise Power Ratio, a practical Gaussian-noise metric and a compact formula that uses the filter coefficients to quantify output noise and SNR loss. The post also gives MATLAB guidance for designing and comparing FIR differentiators so you can pick or build filters with much better noise performance.


Learn About Transmission Lines Using a Discrete-Time Model

Neil RobertsonNeil Robertson January 12, 20222 comments

A simple discrete-time approach makes lossless transmission-line behavior easy to simulate and visualize. The post introduces MATLAB functions tline and wave_movie to model uniform lossless lines with resistive terminations, compute time and frequency responses, and animate travelling waves. A microstrip pulse example shows how reflections produce ringing and how source matching nearly eliminates it, making this a practical learning tool.


The Discrete Fourier Transform and the Need for Window Functions

Neil RobertsonNeil Robertson November 15, 20212 comments

The FFT alone can mislead: capturing a finite-length signal with a rectangular window smears energy across frequency, producing spectral leakage that hides real components. This post explains the origin of leakage, shows how tapered windows such as the Hanning window suppress sidelobes, and demonstrates the tradeoff between sidelobe suppression and mainlobe widening while covering practical tips on zero-padding and record length.


Modeling Anti-Alias Filters

Neil RobertsonNeil Robertson September 26, 2021

Modeling anti-alias filters brings textbook aliasing examples to life. This post shows how to build discrete-time models G(z) for analog Butterworth and Chebyshev lowpass anti-alias filters, compares bilinear transform and impulse invariance, and simulates ADC input/output including aliasing of sinusoids and Gaussian noise. It concludes that impulse invariance gives better stopband accuracy and includes Matlab helper functions.


Digital Filter Instructions from IKEA?

Neil RobertsonNeil Robertson June 18, 20215 comments

This is a wordless example of a folded FIR filter. Swedish “Bygglek” = build and play.


Setting Carrier to Noise Ratio in Simulations

Neil RobertsonNeil Robertson April 11, 2021

Setting the right Gaussian noise level is easy once you know the math. This post derives simple, practical equations to compute noise density and the rms noise amplitude needed to achieve a target carrier to noise ratio at a receiver output. It shows how to get the noise-equivalent bandwidth from a discrete-time filter, how to compute N0 and sigma, and includes a MATLAB set_cnr function to generate the noise vector.


Add a Power Marker to a Power Spectral Density (PSD) Plot

Neil RobertsonNeil Robertson February 7, 2021

Read absolute power directly from a PSD plot with a simple MATLAB helper. The author presents psd_mkr, a function that computes the PSD with pwelch and overlays a power marker in three modes: normal for narrowband tones, band-power for integrated power over a specified bandwidth, and 1 Hz for noise density readings. Examples show how bin summing, window loss, and scalloping are handled for accurate measurements.


Find Aliased ADC or DAC Harmonics (with animation)

Neil RobertsonNeil Robertson January 11, 20212 comments

If a sinewave drives an ADC or DAC, device nonlinearities create harmonics that can fold back as aliases above Nyquist. This post shows a simple Matlab model, using an NCO, a static nonlinearity, and a DFT to generate spectra and reveal aliased harmonics, with animated illustrations to make aliasing intuitive. The approach works for both ADC and DAC measurement setups and highlights realistic effects like quantization noise.


Compute Images/Aliases of CIC Interpolators/Decimators

Neil RobertsonNeil Robertson November 1, 20202 comments

CIC filters provide multiplier-free interpolation and decimation for large sample-rate changes, but their images and aliases can trip up designs. This post supplies two concise Matlab functions and hands-on examples to compute interpolator images and decimator aliases, showing spectra and freqz plots. Readers will learn how interpolation ratio and number of stages alter passband, stopband, and aliasing behavior.


Design Square-Root Nyquist Filters

Neil RobertsonNeil Robertson July 13, 2020

A multirate signal processing textbook presents a neat method for designing square-root Nyquist FIR filters that combine zero ISI with strong stopband attenuation. This post walks through the principle that matched transmit and receive filters need square-root Nyquist responses, gives the key design relations for excess bandwidth and stopband edge, and includes a Matlab implementation to produce practical FIR matched filters for QAM-style systems.


Third-Order Distortion of a Digitally-Modulated Signal

Neil RobertsonNeil Robertson June 9, 2020

Amplifier third-order distortion is a common limiter in RF and communications chains, and Neil Robertson walks through why it matters using hands-on MATLAB simulations. He shows how a cubic nonlinearity creates IMD3 tones, causes spectral regrowth and degrades QAM constellations, and gives practical notes on estimating k3, computing ACPR from PSDs, and sampling considerations.


Second Order Discrete-Time System Demonstration

Neil RobertsonNeil Robertson April 1, 20202 comments

Want a hands-on way to see how continuous second-order dynamics appear in discrete time? Neil Robertson converts a canonical H(s) to H(z), shows z-plane pole mapping for different damping ratios, and walks through impulse-invariance scaling and zero placement. The post includes a MATLAB function so_demo.m that computes numerator and denominator coefficients, plots poles, and compares impulse and frequency responses so you can experiment with sampling effects.


A Simplified Matlab Function for Power Spectral Density

Neil RobertsonNeil Robertson March 3, 20204 comments

Neil Robertson provides a tiny Matlab wrapper around pwelch that simplifies PSD computation by preselecting a Kaiser window, default overlap, and converting units from W/Hz to dBW/bin. Call psd_simple(x,nfft,fs) to get PdB and a frequency vector, with nfft controlling whether DFT averaging is used. The post includes examples showing the effect of averaging and explains the Kaiser window processing loss.


Fractional Delay FIR Filters

Neil RobertsonNeil Robertson February 9, 202017 comments

You can realize arbitrary fractional-sample delays with standard FIR filters by shifting a sinc impulse response and removing symmetry, then windowing the result. This post shows a practical window-method implementation using Chebyshev windows, gives Matlab functions (frac_delay_fir.m and frac_delay_lpf.m) in the appendix, and walks through examples that demonstrate the delay, magnitude trade-offs, and how increasing taps widens the flat-delay bandwidth.


Model Signal Impairments at Complex Baseband

Neil RobertsonNeil Robertson December 11, 20197 comments

Neil Robertson presents compact complex-baseband channel models for common signal impairments, implemented as short Matlab functions of up to seven lines. Using QAM examples and constellation plots, he demonstrates how interfering carriers, two-path multipath, sinusoidal phase noise, and Gaussian noise distort constellations and affect MER. The examples are lightweight and practical, making it easy to test receiver diagnostics and prototype adaptive-equalizer scenarios.


Compute Modulation Error Ratio (MER) for QAM

Neil RobertsonNeil Robertson November 5, 20192 comments

Neil Robertson shows how to define and compute Modulation Error Ratio (MER) for QAM using a simplified baseband model and decision-slice errors. The post derives per-symbol and averaged MER formulas, explains when MER tracks carrier-to-noise ratio under AWGN and matched root-Nyquist filters, and provides example Pav values for QAM-16 and QAM-64 plus a Matlab script and practical tips.


Plotting Discrete-Time Signals

Neil RobertsonNeil Robertson September 15, 20195 comments

Neil Robertson demonstrates a practical interpolate-by-8 FIR approach to make sampled signals look like their continuous-time counterparts when plotted. The post explains a 121-tap filter designed for signals up to 0.4*fs, shows Matlab examples for a sinusoid and a filtered pulse, and highlights the transient and design trade-offs so you can reproduce clean plots with the supplied interp_by_8.m code.


Interpolation Basics

Neil RobertsonNeil Robertson August 20, 201917 comments

Neil Robertson demonstrates interpolation by an integer factor using a frequency-domain approach, showing how zero-insertion followed by an FIR low-pass filter reconstructs a higher-rate signal. The article walks through spectra, passband and stopband selection, and a 41-tap Parks-McClellan filter example applied to a Chebyshev-window test signal. Matlab code and percent-error plots are included so engineers can reproduce and evaluate the method.


A Direct Digital Synthesizer with Arbitrary Modulus

Neil RobertsonNeil Robertson June 3, 20195 comments

Need exact sampled tones on a coarse grid without a huge sine table? This post shows how to build a Direct Digital Synthesizer with an arbitrary modulus so the output frequency is exactly k·fs/L, using a look-up table as small as 20 entries for the 10 MHz/0.5 MHz-step example. It also explains fixed-point LUT rounding, accumulator bit sizing, and how to produce quadrature outputs when L is multiple of 4.


IIR Bandpass Filters Using Cascaded Biquads

Neil RobertsonNeil Robertson April 20, 201911 comments

This post provides a Matlab function that builds Butterworth bandpass IIR filters by cascading second-order biquad sections. The biquad approach, implemented in Direct Form II, reduces sensitivity to coefficient quantization, which matters most for narrowband filters. The included biquad_bp function computes each section's feedforward and feedback coefficients plus gains from a lowpass prototype order, center frequency, bandwidth, and sampling rate.


Demonstrating the Periodic Spectrum of a Sampled Signal Using the DFT

Neil RobertsonNeil Robertson March 9, 201920 comments

This post makes a basic DSP principle tangible by computing the DFT over an extended set of bins and plotting the results. It demonstrates that a sampled signal's spectrum repeats every sampling rate, explains the k-to-frequency mapping, and contrasts common bin ranges such as 0..N-1 and -N/2..N/2-1. The write-up also highlights symmetry for real sequences and recommends using the FFT for efficiency.


Compute the Frequency Response of a Multistage Decimator

Neil RobertsonNeil Robertson February 10, 20192 comments

This post shows a practical way to compute the full frequency response of a multistage decimator by representing every stage at the input sample rate. The author walks through upsampling lower-rate FIR coefficients, convolving to form the overall impulse response, and taking a DFT, then demonstrates how aliasing and stopband placement affect the aliased components. Example Matlab code and plots illustrate each step.


Use Matlab Function pwelch to Find Power Spectral Density -- or Do It Yourself

Neil RobertsonNeil Robertson January 13, 201938 comments

Neil Robertson walks through using Matlab's pwelch and shows how to implement PSD estimation yourself with fft. The post uses concrete examples and complete m-files to demonstrate window selection, converting pxx (W/Hz) to W/bin, Welch DFT averaging, and a worked C/N0 calculation. Readers get practical, runnable recipes for accurate spectrum units, variance reduction with averaging, and peak-power extraction.


Evaluate Window Functions for the Discrete Fourier Transform

Neil RobertsonNeil Robertson December 18, 20184 comments

Spectral leakage makes DFTs of continuous sinewaves misleading, and windowing is the practical workaround. This post supplies Matlab code to plot spectra of windowed sinewaves and compute figures of merit, so you can compare windows such as flattop and Chebyshev. See how sidelobe level, mainlobe bandwidth, processing loss, noise bandwidth, and scallop loss trade off to guide your window choice.


Design a DAC sinx/x Corrector

Neil RobertsonNeil Robertson July 22, 20188 comments

Neil Robertson provides a compact Matlab function and coefficient tables for designing linear-phase FIR sinx/x correctors to undo the DAC sinc roll-off. The post explains the sinc_corr(ntaps,fmax,fs) call, shows worked examples with ntaps=5 and different fmax values, and demonstrates fixed-point quantization including a k=512 example and CSD digit guidance. Practical notes cover corrector gain and input back-off to avoid clipping.


Digital PLL's, Part 3 -- Phase Lock an NCO to an External Clock

Neil RobertsonNeil Robertson May 27, 201833 comments

Phase-locking a numerically controlled oscillator to an external clock that is unrelated to system clocks is practical and largely unexplored. Neil Robertson presents a time-domain digital PLL that converts the ADC-sampled clock into I/Q with a Hilbert transformer and measures phase error with a compact complex phase detector. The post shows loop-filter coefficient formulas and simulations that reveal how ADC quantization and Gaussian clock noise map into NCO phase noise and how loop bandwidth shapes the result.


ADC Clock Jitter Model, Part 2 – Random Jitter

Neil RobertsonNeil Robertson April 22, 20189 comments

Neil Robertson shows how to simulate ADC sample-clock random jitter in Matlab, moving from band-limited Gaussian noise to wideband and close-in phase noise. The post highlights practical artifacts such as aliasing of wideband clock noise, the 20*log10 dependence of jitter sidebands on input frequency, and why cubic interpolation plus a custom noise_filter produces accurate rms and spectral results engineers can trust.


ADC Clock Jitter Model, Part 1 -- Deterministic Jitter

Neil RobertsonNeil Robertson April 16, 201819 comments

Clock jitter on ADC sample clocks corrupts high-frequency signals, and this post builds a practical MATLAB model to show exactly how deterministic (periodic) jitter maps into phase modulation and discrete sidebands. The author explains a parabolic-interpolation approach using twice-rate samples, demonstrates examples from single tones to pulses, and matches simulation spectra to closed-form sideband formulas so engineers can predict jitter effects.


Phase or Frequency Shifter Using a Hilbert Transformer

Neil RobertsonNeil Robertson March 25, 201821 comments

A Hilbert transformer converts a real input into an analytic I+jQ pair, enabling phase shifts and frequency shifts while keeping real inputs and outputs. This article shows Matlab implementations (31-tap FIR with Hamming or Blackman windows), derives y = I cosθ - Q sinθ for phase and frequency shifting, and highlights practical limits from finite taps and coefficient/NCO quantization.


Coefficients of Cascaded Discrete-Time Systems

Neil RobertsonNeil Robertson March 4, 2018

Multiplying discrete-time transfer functions is just polynomial multiplication, and polynomial multiplication is convolution. Neil Robertson shows that the numerator and denominator coefficients of cascaded systems come from convolving the individual coefficient vectors, then demonstrates the idea with MATLAB code and a 2nd-order IIR cascade that yields a 4th-order response. The approach makes computing time and frequency responses straightforward.


Design IIR Filters Using Cascaded Biquads

Neil RobertsonNeil Robertson February 11, 201828 comments

High-order IIR filters are numerically sensitive, especially at low cutoff frequencies. This article shows how to implement a Butterworth lowpass as a cascade of second-order biquads, deriving the per-section coefficient formulas and giving a Matlab biquad_synth example. It explains computing denominator coefficients from pole pairs, using b = [1 2 1] with K = sum(a)/4 for unity DC gain, and highlights reduced quantization sensitivity.


Design IIR Highpass Filters

Neil RobertsonNeil Robertson February 3, 20182 comments

Neil Robertson walks through a compact, six-step procedure to synthesize IIR Butterworth highpass filters using pre-warping and the bilinear transform. The post gives the pole transformations, the placement of N zeros at z=1, the scaling to unity gain at fs/2, and a ready-to-run MATLAB hp_synth implementation that reproduces MATLAB's butter results.


Design IIR Band-Reject Filters

Neil RobertsonNeil Robertson January 17, 20182 comments

This post walks through designing IIR Butterworth band-reject filters and provides two MATLAB synthesis functions, br_synth1.m and br_synth2.m. br_synth1 accepts a null frequency plus an upper -3 dB frequency, while br_synth2 takes lower and upper -3 dB frequencies. The author demonstrates an example where a 2nd-order prototype yields a 4th-order H(z), prints b and a coefficients, and plots the response using freqz.


Design IIR Bandpass Filters

Neil RobertsonNeil Robertson January 6, 201811 comments

Designing Butterworth IIR bandpass filters is easier than it looks when you start from a lowpass prototype. This post walks through the s-domain lowpass-to-bandpass transform, bilinear digital mapping, and the bp_synth.m Matlab implementation that produces scaled numerator and denominator coefficients. Practical pole-zero intuition and Matlab examples help you verify magnitude and group-delay behavior for real sampling rates and bandwidths.


Design IIR Butterworth Filters Using 12 Lines of Code

Neil RobertsonNeil Robertson December 10, 201711 comments

Build a working lowpass IIR Butterworth filter from first principles in just 12 lines of Matlab using Neil Robertson's butter_synth.m. The post walks through the analog prototype poles, frequency pre-warping, bilinear transform pole mapping, adding N zeros at z = -1, and gain normalization so the result matches Matlab's built-in butter function. It's a compact, hands-on guide with clear formulas and code.


Simplest Calculation of Half-band Filter Coefficients

Neil RobertsonNeil Robertson November 20, 20179 comments

Half-band FIR filters put the cutoff at one-quarter of the sampling rate, and nearly half their coefficients are exactly zero, which makes them highly efficient for decimation-by-2 and interpolation-by-2. This post shows the straightforward window-method derivation of half-band coefficients from the ideal sinc impulse response, providing a clear, hands-on explanation for engineers learning filter design. It also points to equiripple options such as Matlab's firhalfband and a later Parks-McClellan implementation.


There's No End to It -- Matlab Code Plots Frequency Response above the Unit Circle

Neil RobertsonNeil Robertson October 23, 20179 comments

If you want a fresh way to inspect a digital filter, this post introduces plotfil3d, a compact MATLAB function that wraps the magnitude response around the unit circle in the Z-plane so you can view it in 3D. It uses freqz to compute H(z) in dB for N points and accepts an optional azimuth to change the viewing angle; the code is provided in the appendix.


Modeling a Continuous-Time System with Matlab

Neil RobertsonNeil Robertson June 6, 20172 comments

Neil Robertson demonstrates a practical workflow for converting a continuous-time transfer function H(s) into an exact discrete-time H(z) using Matlab's impinvar. He walks through a 3rd-order Butterworth example, shows how to match impulse and step responses, and compares frequency response and group delay so engineers can see where the discrete model stays accurate and when sampling-rate limits cause departure.


Canonic Signed Digit (CSD) Representation of Integers

Neil RobertsonNeil Robertson February 18, 2017

Canonic Signed Digit (CSD) encoding slashes the number of nonzero bits in integer coefficients, enabling multiplierless FIR filters implemented with shifts and adds. This post uses MATLAB code to demonstrate CSD rules, show how negative values work, and plot the distribution of signed digits as bit width changes. It finishes with practical techniques to minimize signed digits per coefficient for area and power efficient filter designs.


Matlab Code to Synthesize Multiplierless FIR Filters

Neil RobertsonNeil Robertson October 31, 20165 comments

Learn how to build multiplierless FIR lowpass filters in Matlab using Canonic Signed-Digit coefficients. The post explains converting Parks-McClellan floating-point taps to scaled integers, then to exact CSD digits, and includes two m-files that search maintap scaling to minimize signed digits while preserving the filter response. Practical notes cover external gain compensation, the 2/3 full-scale CSD limit, and sensitivity to pass/stop edges.


The Power Spectrum

Neil RobertsonNeil Robertson October 8, 2016

You can get absolute power from a DFT, not just relative spectra. In this post Neil Robertson shows how to convert FFT outputs into watts per bin using Parseval's theorem, how to form one-sided spectra, and how to normalize windows so power is preserved. Matlab examples demonstrate bin-centered and between-bin sinusoids, leakage, scalloping, and how to recover component power by summing bins.


Digital PLL's -- Part 2

Neil RobertsonNeil Robertson June 15, 20165 comments

Neil Robertson builds a Z-domain model of a second-order digital PLL with a proportional-plus-integral loop filter, then derives closed-form formulas for KL and KI from the desired loop natural frequency and damping. The post explains the s → (z - 1)/Ts approximation, shows how to form the closed-loop IIR CL(z) for step and frequency responses, and highlights when the linear Z-domain model falls short of nonlinear acquisition behavior.


Digital PLL's -- Part 1

Neil RobertsonNeil Robertson June 7, 201626 comments

A hands-on introduction to time-domain digital phase-locked loops, Neil Robertson builds a simple DPLL model in MATLAB and walks through the NCO, phase detector, and PI loop filter implementations. The post uses phase-in-cycles arithmetic to show how the phase accumulator, detector wrapping, and loop filter interact, and it contrasts linear steady-state behavior with the nonlinear acquisition seen when initial frequency error is large. Part 2 will cover frequency-domain tuning of the loop gains.


Peak to Average Power Ratio and CCDF

Neil RobertsonNeil Robertson May 17, 20164 comments

Setting digital modulator levels depends on peak-to-average power ratio, because random signals produce occasional high peaks that cause clipping. This post shows how to compute the CCDF of PAPR from a signal vector, with MATLAB code and examples for a sine wave and Gaussian noise. The examples reveal the fixed 3.01 dB PAPR of a sine and the need for large sample counts to capture rare AWGN peaks.


Filter a Rectangular Pulse with no Ringing

Neil RobertsonNeil Robertson May 12, 201610 comments

You can filter a rectangular pulse with no ringing simply by using an FIR whose coefficients are all positive, and make them symmetric to get identical leading and trailing edges. This post walks through a MATLAB example that convolves a normalized Hanning window with a 32-sample rectangular pulse, showing that window length controls edge duration and that shorter windows widen the spectrum. It also notes this is not a QAM pulse-shaping solution.


Remembering Tom Lehrer

New thread started 9 months ago
Tom Lehrer died Saturday at age 97.  He wrote and performed "Wernher Von Braun" and other satirical songs.  But his main gig was as a mathematician.  Here is...
Here is perhaps the simplest possible Matlab model of a DAC zero-order hold.  The sample rate of the DAC output signal is 8x that of the DAC input. % function...

Re: FM demod using derivatives

Reply posted 1 year ago (03/26/2025)
Your second comment is apt.  For a block diagram of the differentiator with the delays shown, see section 13.22 of Understanding Digital Signal Processing, 3rd...

Re: FM demod using derivatives

Reply posted 1 year ago (03/21/2025)
Mark,If you need more bandwidth, the 7-tap Lyons differentiator has more bandwidth than a second-difference differentiator and lower noise as well.Note that when...

Re: FM demod using derivatives

Reply posted 1 year ago (03/19/2025)
Hi Mark,Yes, it's important that the differentiator not be an "open barn door" for noise.  I posted about differentiator noise performance here:https://www.dsprelated.com/showarticle/1447.phpHere...

Re: How to render formulas?

Reply posted 1 year ago (03/15/2025)
I think single dollar signs worked for me in the past.  $ a = 6*b + 2$  The quick brown fox jumps over the lazy dog.  But it doesn't seem to work now, as you...

Re: Off Topic: My Heat Pump Story

Reply posted 1 year ago (03/04/2025)
Most people in Ohio look at you funny when you say you have a heat pump.  Some HVAC contractors here are all-in on heat pumps, but others won't even talk to you...

Off Topic: My Heat Pump Story

New thread started 1 year ago
I replaced the gas furnace in my central-Ohio home with a heat pump in March of 2024.  After a winter which included some very cold days, I am pleased with the...

Re: Fractional order IIR

Reply posted 1 year ago (12/28/2024)
I found an article on the Matlab website about fractional delay FIRs.  Besides the approach I used, they also discuss using a Lagrange polynomial interpolator (using...

Re: Fractional order IIR

Reply posted 1 year ago (12/28/2024)
Hi,Another way to obtain a variable delay would be to use a Fractional Delay FIR filter.  You can easily compute the coefficients of a filter with a delay of D...

Re: FIR FILTER

Reply posted 1 year ago (11/25/2024)
Mark,That Samueli paper is now 35 years old!  Just for the record, my DSPrelated post on multiplierless FIR filters does NOT use the bivariate search discussed...

Re: FIR FILTER

Reply posted 1 year ago (11/24/2024)
I think Mark was referring to the CSD optimization technique presented in the following paper:Samueli, Henry, "An Improved Search Algorithm for the Design of Multiplierless...

Re: FIR FILTER

Reply posted 1 year ago (11/23/2024)
Hi,The filter uses the CSD coefficients from the beginning.  Mark can answer the question about the script.-- Neil

Re: FIR FILTER

Reply posted 1 year ago (11/23/2024)
Here is the post that Mark referenced:https://www.dsprelated.com/showarticle/1011.phpI also wrote two posts on Multiplierless halfband filters:https://www.dsprelated.com/showarticle/1585.phphttps://www.dsprelated.com/showarticle/1609.php--...

Re: Reducing IIR filter settling time.

Reply posted 2 years ago (10/05/2024)
Mahesh,A first order IIR filter has similar performance to a boxcar filter.  Here is Matlab code to compute the step response of an example 1st order IIR filter:%...

Re: Reducing IIR filter settling time.

Reply posted 2 years ago (10/05/2024)
As already noted, you may not need a filter.I'm not sure what you mean by "I want values which vary in less than 1 second".  Does this mean you are looking for...

Re: Reducing IIR filter settling time.

Reply posted 2 years ago (10/04/2024)
Since you are specifying a Butterworth filter, there are only two parameters you can control:  order, and -3 dB frequency fc as a fraction of sample frequency fs.Lower-order...

Re: Minimalist high performance Farrow Filters

Reply posted 2 years ago (09/20/2024)
Inspiration can be so fickle.  It usually seems to arrive when you're driving home from work -- which means don't work overtime.  Good luck!

Re: Minimalist high performance Farrow Filters

Reply posted 2 years ago (09/20/2024)
Hi Mark,So my understanding is you are looking for a polynomial interpolator with a lot of selectivity?  I'm probably missing something, but I don't think polynomial...

Re: DSP notation

Reply posted 2 years ago (07/16/2024)
Usually, one discusses either a continuous-time or a discrete-time system.  It does get sticky for mixed systems.  It still feels strange to me to use Ω instead...

Re: DSP notation

Reply posted 2 years ago (07/15/2024)
I can't comment on the history, but regarding frequency, most authors define a continuous radian frequency Ω (rad/s).  This includes Oppenheim and Shafer (as...

Re: Important Events in Our DSP Work

Reply posted 2 years ago (06/18/2024)
Hi Rick,It's best if this second event happens before the design is potted in silicon!-- Neil

Re: Generate 2KHz damped sine wave using DAC

Reply posted 2 years ago (05/30/2024)
Kousik,What you describe is not a damped sinusoid in the usual sense.  If we were to persist in using IIR filters, we could perhaps do the following:1.  Generate...

Re: Generate 2KHz damped sine wave using DAC

Reply posted 2 years ago (05/30/2024)
Hi Kousik,1.  Yes, that is correct.  But the output will be non-zero for longer than 10K samples for a floating-point system -- hence the name IIR (infinite impulse...

Re: Generate 2KHz damped sine wave using DAC

Reply posted 2 years ago (05/17/2024)
Do you want to generate a repeated damped sine or just one?  One way to generate a damped sine is to apply an impulse to a 2nd order IIR filter having the desired...

Re: Farrow Filter

Reply posted 2 years ago (04/06/2024)
Here's a pdf of the Gardner paper:COMM_V41N3.pdf

Re: Farrow Filter

Reply posted 2 years ago (04/06/2024)
Hi,You might find this classic paper helpful:Gardner, F., "Interpolation in Digital Modems, Part 1: Fundamentals", IEEE Transactions on Communications", vol 41,...

Re: IIR filters with FSK signals

Reply posted 2 years ago (03/15/2024)
Sure.  FM demodulation includes differentiation of phase.  The frequency response magnitude of a differentiator is proportional to f.  The noise power passed...

Re: IIR filters with FSK signals

Reply posted 2 years ago (03/15/2024)
In that case, I suspect an IIR filter might be OK, but I am not an expert.  Any filtering after the demodulator can add ringing to an NRZ signal, so an IIR filter...

Re: IIR filters with FSK signals

Reply posted 2 years ago (03/15/2024)
Hi,Where would this filter reside?  After the demodulator?
You can also design for an arbitrary response using the Matlab function firpm (Parks-McClellan synthesis).--Neil

Re: Help identify filter type

Reply posted 2 years ago (01/04/2024)
Vinzz,Try looking up "quadrature down-converter" in a textbook or online.

Re: Help identify filter type

Reply posted 2 years ago (01/04/2024)
Hi Vinzz,What you are describing is not a filter.  The multiplication by sine and cosine of frequency f0 is called quadrature conversion.  It converts a signal...

Re: An Online Mathematics Reference Book

Reply posted 3 years ago (08/29/2023)
Don't some Indian deities have more than two hands?  

Re: An Online Mathematics Reference Book

Reply posted 3 years ago (08/28/2023)
Thanks Rick.  My father had a CRC "Handbook of Chemistry and Physics".  His version was only about 5 x 7 " (but very thick).  Subsequent editions were quite a...
Hi,It would help if you could provide more info about your data:  how many samples, sample rate, and a plot of the (unfiltered) data.  A spectral plot would also...

Re: DSP Processing on ARM Cortex M (FREE BOOK)

Reply posted 3 years ago (07/30/2023)
Thanks.  Funny how the distribution of textbook prices seems to clump at "free" or $250.00.-- Neil

Re:

Reply posted 3 years ago (06/07/2023)
Hi,I don't understand the question.  You need to be more descriptive.

Re: Trying to wrap my head around FFT and SDR...

Reply posted 3 years ago (06/03/2023)
Alex,Are you designing a receiver for the signal?  What do you mean by "isolating the signal"?  Do you mean you need to attenuate nearby signals?  Can you...

Re: All Pole Transfer Functions

Reply posted 3 years ago (05/15/2023)
...

Re: All Pole Transfer Functions

Reply posted 3 years ago (05/13/2023)
By the way, I wrote a post "Second Order Discrete-Time System Demonstration" that might interest you.--Neil

Re: All Pole Transfer Functions

Reply posted 3 years ago (05/12/2023)
Hi Safwan,Thanks for your interesting post.  I tried comparing your 2nd order all-pole with a = 0.8 and phi= .226  to a 2nd order Butterworth with fc = .05 fs,...

Re: How to avoid harmonic distortions in a DAC?

Reply posted 3 years ago (04/03/2023)
This may not directly answer your questions, but Analog devices has an online tool for finding aliases of a signal and its harmonics:https://www.analog.com/en/design-center/interactiv...Also,...
Hi Steve,Great!  Nice to see agreement of results.Neil
I wrote a post on ADC jitter which may be of some help.  Here is a link.https://www.dsprelated.com/showarticle/1157.phpYou also can look at references 1 and 2 at...
Hi Mark,We are talking about the same thing.  The Farrow interpolator is a hardware implementation of a piecewise polynomial interpolator.regards,Neil
Hi,This problem comes up in timing recovery for digital receivers.  As already mentioned, you can use Lagrange polynomial interpolation, also referred to as piecewise...

Re: Help finding textbook for introductory DSP courses

Reply posted 3 years ago (02/01/2023)
I thought I would take a look at DSP First, since the previous repliers recommend it.  But I got sticker shock when I looked on Amazon:  $236.54 (!)--Neil

Re: The Nyquist Sampling Theorem

Reply posted 3 years ago (01/26/2023)
"In the style of Bob Dylan" is a lot to ask -- The song sounds more like a cross between Dylan and Dr. Seuss.

Re: GNURadio BPSK Position Costas Loop and Clocksync

Reply posted 3 years ago (12/03/2022)
No, the timing synchronization must occur before carrier synchronization.  I know this from designing QPSK demods.  There is some limit to the amount of carrier...

Re: Good site for distance Learning

Reply posted 3 years ago (10/22/2022)
Thanks Dave, looks interesting.

Re: Channel power measurement

Reply posted 4 years ago (10/21/2022)
Loganathan,I wrote a post that includes a Matlab function to compute power over a band:https://www.dsprelated.com/showarticle/1387.phpI'm not sure it applies to...

Re: Difference between fft and pspectrum in Matlab

Reply posted 4 years ago (09/19/2022)
Hi MK,I think pspectrum is similar to another Matlab function called pwelch.  Like pspectrum, pwelch computes the power spectral density.  I wrote a tutorial on...

Re: Determine Classical Phase Noise from EVM

Reply posted 4 years ago (03/01/2022)
I haven't tried to calculate phase noise from EVM or MER. I used to measure the noise spectrum of the unmodulated carrier on a spectrum analyzer and record the...

Re: Determine Classical Phase Noise from EVM

Reply posted 4 years ago (03/01/2022)
Hi Maxplus,I wrote a blog post: "Model Signal Impairments at Complex Baseband" that computes a QAM constellation with added phase noise.  It also calculates MER...
Hi,It appears you are not using a window function, so I think you are getting different spectral leakage components, depending on the phase of the sine.  I discussed...

Re: Free book: Software-Defined Radio for Engineers

Reply posted 4 years ago (12/09/2021)
Thanks Marcin!
This pdf book is available on the Analog Devices site here.  I have not read it, but it appears to contain a reasonable mix of theory and practice.  The book...
Rick,I vaguely recall fred harris deprecating Chebyshev windows.  I think it was because the flat sidelobes alias.  By contrast, the Kaiser window has sidelobes...
fred and Rick,Thanks for these very useful comments.  I have been incorrectly using hanning(N) for DFT windowing, when I should have been using hanning(N,'periodic'). ...
For non-RF people:  VNA = Vector Network Analyzer.  This is a piece of lab equipment that is used to measure the complex S-parameters over some frequency range...

Re: Can you find the illegal step?

Reply posted 5 years ago (08/28/2021)
If you let b = 1, then you get the "classic" homework result:2 = 1From this follows the other classic result: 1 = 0. Neil

Re: Overdriven Sine Wave through DSP Filter

Reply posted 5 years ago (05/28/2021)
Hi Groger,What is the sample rate of your A/D converter?  Are you using an anti-aliasing (AA) filter?  What is the AA filter's stopband frequency/attenuation?Note...

Re: Single Sideband Demodulation

Reply posted 5 years ago (04/28/2021)
Hi,Go to "contact" at the bottom and send a message.  The site owner is named StephaneNeil

Re: Real Numbers

Reply posted 5 years ago (04/05/2021)
Rick,I like it too.  But what about lucky numbers and unlucky numbers?  I think they are a subset of the integers.-- Neil

Re: time recovery algorithm and CORDIC

Reply posted 5 years ago (03/05/2021)
...

Re: time recovery algorithm and CORDIC

Reply posted 5 years ago (03/05/2021)
Hi Ali,A good introductory reference for timing recovery is in Michael Rice's book:  "Digital Communications, A Discrete-Time Approach". Pearson Prentice Hall,...
I don't know.  I usually deal with signals that are ac-coupled.
Hi artmez,Actually, S/N in the ENOB formula is full-scale sine power relative to the total noise power.  So you have to integrate the noise power to find the S/N. ...

Re: Dinner's ready!

Reply posted 5 years ago (01/31/2021)
Hallelujah!   Thanks.  If you don't watch out, someone may ask you to explain your demo.-- Neil

Dinner's ready!

New thread started 5 years ago
I may be the last one to know this trick, but if you turn on your computer speakers and type the following code in Matlab, it plays a gong sound: load gong.mat; sound(y) Silly,...

Matlab Basic Functions Reference (pdf)

New thread started 5 years ago
Matlab has posted a pdf document that lists basic functions.  Here is a link to the pdf.-- Neil

Re: Multi-filter Parks McClellan algorithm

Reply posted 5 years ago (12/17/2020)
Woodpecker,I just reviewed the post I referenced -- it turns out I actually used a least-squares approximation (Matlab firls), not PM.  I don't recall if it worked...

Re: Multi-filter Parks McClellan algorithm

Reply posted 5 years ago (12/16/2020)
Hi Woodpecker,It seems to me it could work well for a droop-compensation filter.  For example, I have used the Matlab firls [not PM] algorithm to design sinx/x...

Re: Multi-filter Parks McClellan algorithm

Reply posted 5 years ago (12/16/2020)
Also,If H1(f) has a region where it is very small (e.g. filter stopband), this region can be excluded.  For example, if H1 is a LP, you could just compute H2 over...

Re: Multi-filter Parks McClellan algorithm

Reply posted 5 years ago (12/16/2020)
Hi Woodpecker,Suppose you want overall magnitude response H(f), and you will realize this with cascaded responses H1(f) and H2(f), where H1(f) is given and H2(f)...

Re: Off-topic: Xmas gift for a techie?

Reply posted 5 years ago (12/03/2020)
Hi Woodpecker,I guess we may find out how well AI works next time we buy a car...Neil

Off-topic: Xmas gift for a techie?

New thread started 5 years ago
I am reading Ian Stewart's great book:  In Pursuit of the Unknown, subtitled "17 Equations that Changed the World".  Here are the subjects of some chapters:Pythagoras's...
Maybe a pentagon formed by uniting a square with a triangle on its right edge.  In other words, the same symbol that is used on schematics when a signal comes from...

Re: SDR/DSP Question

Reply posted 6 years ago (08/15/2020)
Hi,A cleaner solution would be to perform the upconversion in the digital domain.  You could use a quadrature Digital UpConverter (DUC) chip, which includes an...

Re: Tilt correction in modulators

Reply posted 6 years ago (08/14/2020)
nbtech,So was the tilt correction a matter of DAC sinx/x correction or something else?regards,Neil

Re: DSPOnlineConference.com - need help testing it.

Reply posted 6 years ago (07/14/2020)
Hi Stephane,The website looks good.  Note it says "Free for early registration", so you may want to change that to "half-price for early registration".Neil
Hi JGruber,You can try changing the dB ripple parameter "r" of the Chebychev window in my function.  It is set at 70 dB -- you can improve accuracy by using a...
As others have said, you can do it in the time domain.  You could use a Farrow interpolator, or for better accuracy of the amplitude response, you could use a Fractional-delay...

Re: Question regarding CIC filter

Reply posted 6 years ago (05/28/2020)
Hi Amin,Take a look at this article if you have not already read it:https://www.dsprelated.com/showarticle/1337.phpregards,Neil
Hi Jon,Looks like progress!  You could of course reduce the number of taps by reducing the number of samples per symbol in the RRC filters.  It is common to use...
Jon,Here is an example of random symbols of value +.5/-.5 filtered by cascaded root-Nyquist filters.  The m-file eye1.m calls the function eyeplot.m.  Both mfile...
Yes, the two cases you mentioned won't be the same length.  However, there will be samples at either end of the cascaded root-Nyquist response that are close to...
Jon,Actually, the 2nd filter should be identical to the first one.  you are correct to upsample before filtering on the transmit side.  Are you viewing an eyeplot...

Re: Covid-19 Stories

Reply posted 6 years ago (03/27/2020)
Hi everyone,I'm in Columbus, Ohio.  I am wondering how long my hair will be before my barber is open for business again.  OK, not a big issue!

Re: Tunable power divider

Reply posted 6 years ago (03/03/2020)
So, if P1 + P2 = Ptotal,P2/Ptotal = 1 - P1/Ptotallet P1 dB = 10log10(P1/Ptotal)    P2 dB = 10log10(P2/Ptotal)thenP2 dB = 10log10(1 - 10^(P1dB/10))e.g.  for...

Re: Tunable power divider

Reply posted 6 years ago (03/03/2020)
Sumit,Sorry, but I don't have anything specific.  Since passive devices tend to be based on transformers, they tend to have a fixed loss.  Maybe you could just...

Re: Tunable power divider

Reply posted 6 years ago (03/03/2020)
Hi Sumit,What is the frequency range required?  Must this be a passive device, or can it be powered?-- Neil

Re: Advice for FM Demodulation Techniques

Reply posted 6 years ago (01/23/2020)
Greg,Make sure to use atan2(Q,I), and not atan(Q/I).  Another option is to use the block diagram in Figure 13-61 (b).Neil

Re: Advice for FM Demodulation Techniques

Reply posted 6 years ago (01/23/2020)
Here is a post by Rick Lyons on FM demodulation.  You can also refer to section 13.22 of his book Understanding Digital Signal Processing (3rd ed.)https://www.embedded.com/dsp-tricks-frequency-demodulation-algorithms/One...

Re: Back online - Migration done

Reply posted 6 years ago (01/19/2020)
It seems to me the site is loading faster.-- Neil

Update to my last blog post

New thread started 6 years ago
I made an update to my blog post:  "Model Signal Impairments at Complex Baseband".  I simplified the math for adding phase noise in section 3, and I updated...

Re: Practical digital communications book

Reply posted 6 years ago (11/13/2019)
Hi Simonzz,A good book that covers theory and practice is Digital Communications, A Discrete-Time Approach, by Michael Rice. (Pearson, 2009).  Among other topics,...

Re: phase change

Reply posted 6 years ago (11/09/2019)
...

Re: New IEEE Signal Processing Society Journal

Reply posted 6 years ago (10/31/2019)
Hi Stephane,I suppose most readers of DSPrelated come here to get informed and instructed about somewhat general DSP theory and tips.  They want to get some education...

Re: New IEEE Signal Processing Society Journal

Reply posted 6 years ago (10/30/2019)
For that price, they should at least throw in a diploma from IEEE School of Truck Driving or IEEE Beauty College.Neil

Re: Designing an IIR comb (peak) filter

Reply posted 7 years ago (09/03/2019)
bobby_k:1.  Since you said your band of interest was 0 -200 Hz, it is ok to decimate by 4 to give fs= 3750 Hz.  You don't have to decimate, but if you don't,...

Re: Designing an IIR comb (peak) filter

Reply posted 7 years ago (09/03/2019)
bobby_k,Your sample rate is 15 kHz.  So you can decimate by 4 to 3750 kHz.  Then this code gives the response you are looking for, I think.regards,Neilfs= 3750; b=...

Re: reconstruct phase-shifted sine tone

Reply posted 7 years ago (08/04/2019)
Hi fred,Thanks for being so helpful!

Re: reconstruct phase-shifted sine tone

Reply posted 7 years ago (08/04/2019)
Note cost of the paper is $33.00 for non-IEEE members.

Re: Clock drift and compensation

Reply posted 7 years ago (06/28/2019)
Are the crystal frequencies equal or related by an integer factor?  If so, it may be easier to drive the DSP chip with the clock from the tuner.

Re: Real to Complex conversion

Reply posted 7 years ago (06/28/2019)
I don't think method a) works.  I discuss the Hilbert transformer in this post:https://www.dsprelated.com/showarticle/1147.phpA Hilbert transformer could work. ...

Re: OFF TOPIC: A Question About PI

Reply posted 7 years ago (06/27/2019)
Rick,The girl in the video asked what pi is good for.  Obviously, it's good for designing the NCO in the demodulator of her smart phone.

Re: Window Impulse Response

Reply posted 7 years ago (06/25/2019)
The impulse response just the output of your system when the input is the unit impulse function.  The Fourier transform of the impulse response is the transfer...

Re: Window Impulse Response

Reply posted 7 years ago (06/25/2019)
Hi Samp17,When using a window, be sure to multiply your signal by the window, sample-by-sample.  That will allow your spectrum to cover the range of 0 to fs/2. ...

Re: Low cost audio DSP Exploration

Reply posted 7 years ago (05/22/2019)
Send a message to stephaneb -- you can contact him by clicking on his name.Neil
To continue the discussion of linear algebra:  the classic application we learned in EE was steady-state simulation of linear RLC circuits.  A circuit with N loops can...

Re: Timing Recovery Loop Filter Rate

Reply posted 7 years ago (05/10/2019)
I agree that there is no advantage to running the loop filter faster than the rate of the TED.  It is not a big deal to do the loop computations with the loop filter...
Maybe the rules for authors that Rick mentions should be modified as follows:After you are done writing the paper add 100 or 200 words to explain "the obvious".

Re: Todo List: Improvements to the Related Sites

Reply posted 7 years ago (05/02/2019)
Hi Stephane,On the home page, I preferred the previous list of recent blogs to the present list, which only contains 6 posts.  The present format causes blogs to...
Hi Naumankalia,What is the difference between your scheme and just applying a full-scale sinewave and then taking the windowed fft?  What is your definition of...

Re: Trying to go live SOON

Reply posted 7 years ago (04/07/2019)
Stephane,Thanks for the intro to New Brunswick humor.Neil
Hi,I have read parts of this book by Lin and Costello.  It may be out of print.  The book was pretty straightforward, however, it is a long slog to get to the...
"Then, I view the "Taking aliasing into account" section as doing all of the decimation in one go"Yes, that's right.Neil
I summarize this process on page 6 of the pdf version.
Weetabixharry,I'm not saying to reorder the filtering and downsampling -- If you look at figure 5, what I am doing is cascading versions of each filter that are...
Hi,Take a look at my post on this subject:https://www.dsprelated.com/showarticle/1228.phpregards,Neil
No need to repost.  You might want to look at Michael Rice's book, Chapter 8.https://www.pearson.com/us/higher-education/progra...

Re: SC FDMA Channel Equalization

Reply posted 7 years ago (02/26/2019)
Hi,I think you posted this around the time dsprelated.com suffered a host outage.  It may have gone unnoticed by some.regards,Neil
Hi Michael,I think you posted this around the time dsprelated.com suffered a host outage.  It may have gone unnoticed by some.regards,Neil

Re: Regarding my recent post on Multistage Decimators

Reply posted 7 years ago (02/11/2019)
Hi Kaz,Your code computes the impulse response of the decimator at the output sample rate of fs/8.  My post computes the impulse response and frequency response...
I posted an article on Multistage decimators yesterday.  I decided it needed some tweaking, so today I updated it to show the stopband requirements in a couple...

Re: 50Hz and harmonics filtering

Reply posted 7 years ago (02/07/2019)
Also, what is the band of the desired signal?

Re: 50Hz and harmonics filtering

Reply posted 7 years ago (02/07/2019)
Hi Dimaios,What is your sample rate?Which harmonics are you trying to attenuate?  Odd? Even? Odd and even?How high in frequency do the harmonics extend?  5th harm,...

Re: Time domain signal slikes

Reply posted 7 years ago (01/14/2019)
Imoshe,I think you will need to provide more details.  Not being a radar person, I can make one comment -- it is probably not a good idea to zero-out data before...

Re: Phase Locked Loop Books in a time of DSP

Reply posted 7 years ago (01/09/2019)
Tim,I'm not sure if it is appropriate, but you could do a search on "Time to Digital Converter" (TDC).regards,Neil

Re: Real to Complex conversion

Reply posted 7 years ago (12/14/2018)
Here is my post that uses a Hilbert xfrmr:https://www.dsprelated.com/showarticle/1147.php
Ah yes -- the Old West, before the color subcarrier.Neil
For the elderly out there (I had to look it up):  ASA = as soon asNeil
I've been reading a P.G. Wodehouse book (Right-Ho, Jeeves) that has several fictional telegrams in it.  For example:Fink-Nottle, Brinkley Court, Market Snodsbury,...
Carneyc,So presumably the varactors are controlled by DC outputs of some kind of DACs (e.g. sigma-delta DACs).  I imagine you have a DAC assigned to each varactor,...
Carneyc,Can you provide more detail about what you mean by "a 4x4 array of bandpass filters"?  Also, how are the filters now tuned/calibrated?  Do they have variable...
Nelson,Pay TV is much more sophisticated now than back in the days of "scrambling" of analog video.  For that matter, analog video is almost non-existent now. ...
Rick,Thanks.  This is an occupational hazard of being an engineer.  Another hazard is getting something to work, but having the wrong explanation of why it works...

Re: Digital lock in amplifier on FPGA

Reply posted 8 years ago (04/30/2018)
Gabrics,I notice there are a lot of articles on this subject on the web.  For example:Microchip App note AN1115:  Implementing Digital Lock-In Amplifiers Using...

Re: DSP diagramming software?

Reply posted 8 years ago (04/15/2018)
Hi,I use Microsoft Visio.  I created my own library of symbols for my particular applications.  It's not perfect, but it does have a lot of flexibility.Another...

Re: MATLAB simulation of bilinear transformation

Reply posted 8 years ago (03/26/2018)
Simon,You have a lot of steps, so it's hard to say quickly where the problem is.  You can design a band-reject filter in one step using:[b,a]= butter(N,[fL fU]*2/fs,'stop')where...

Re: DSP History

Reply posted 8 years ago (03/13/2018)
Yes!  I used a slide rule for my freshman year, and got a Texas Instrument SR-50 scientific calculator (with red LED display) my sophomore year.

Re: DSP History

Reply posted 8 years ago (03/13/2018)
Rick,I was working on analog video modulators back in the early '80's.  Little did I know that these DSP pioneers had set in motion the technology that would replace...

Re: How to Obtain Biquad Coefficients

Reply posted 8 years ago (03/02/2018)
I noticed there is some Matlab code for the A-weighted filter in a DSPrelated post from 2011:https://www.dsprelated.com/showcode/214.phpHere is the code, with the...

Re: How to Obtain Biquad Coefficients

Reply posted 8 years ago (02/19/2018)
Hi,For a biquad, the feedback coeffs are [1 a1 a2] and the feedforward coeffs are [b0 b1 b2].  The a0 coefficient does not appear explicitly in the filter structure. ...

Re: IIR filters

Reply posted 8 years ago (11/29/2017)
Hi,Good point! Thanks,Neil

IIR filters

New thread started 8 years ago
I am curious about the usefulness of IIR filters above 2nd order in DSP applications.  I know that first order IIR's are common, and presumably so are biquads. ...
Konejisimo,I don't want to make specific suggestions that may be totally off the mark for your situation.  A couple of possibilities for phase detectors in an all-digtial...
Konejesimo,Here are posts I wrote on digital PLL design that you might find useful:https://www.dsprelated.com/showarticle/967.phphttps://www.dsprelated.com/showarticle/973.phpUsing...

Re: AGC on FPGA

Reply posted 8 years ago (11/14/2017)
Kaz,I am not expert on AGC.  Maybe that's something I can study and write about sometime in the future.regards,Neil

Re: AGC on FPGA

Reply posted 8 years ago (11/14/2017)
Hi,I think you need to read up on how digital agc is typically done.  At its simplest, digital AGC consists of a threshold detector, integrator, and multiplier.Here...

Re: New DSP FAQ Section - please suggest topics

Reply posted 8 years ago (10/27/2017)
How do I make an FIR filter have gain of 1 at f = 0?

Re: New DSP FAQ Section - please suggest topics

Reply posted 8 years ago (10/27/2017)
What is the difference between FIR and IIR fiters?

Re: New DSP FAQ Section - please suggest topics

Reply posted 8 years ago (10/27/2017)
What is zero padding?

Re: New DSP FAQ Section - please suggest topics

Reply posted 8 years ago (10/27/2017)
I'm not sure I understand what you're getting at here.  I view the bilinear xform as a tool.  Does a hammer matter?regards,Neil

Re: Differential frequency measurement

Reply posted 9 years ago (10/07/2017)
Hi,By way of background, Mitra discusses DTMF decoding in his book, and provides an m-file:Sanjit K. Mitra, Digital Signal Processing 2nd Ed., McGraw-Hill 2001,...

Re: Gapped-signals

Reply posted 9 years ago (10/04/2017)
Tudelft_Res,To get more frequency resolution, you could zero-pad the segments **after** windowing.  For example, if one segment were length 1500, you could window...

Re: Gapped-signals

Reply posted 9 years ago (09/29/2017)
Tudelft_Res,I guess the answer depends on the type of signal and what you are using the signal for.  For example, if your purpose were spectral analysis, you could...
Hi,A delay of length T can be implemented by a series of one-sample delays, and it will have a linear phase slope.  For example, if you want a delay of 5 ms and...

Re: DSP project suggestion

Reply posted 9 years ago (09/11/2017)
Hi,A very simple project would be a one-bit sigma-delta DAC.  You could use various constants as input and measure the DC output of a one-pole RC lowpass filter...
Yeah,I once implemented a TDC phase detector who's input was just an external clock that was captured asynchronously as a single-bit signal.  I forget how much...
Hi John,The analysis in my PLL tutorial still applies -- however, to use that approach you would need to calculate the gain Kp of the time-stamp based phase detector....

Re: DFT of a signal and system

Reply posted 9 years ago (05/05/2017)
Yeah, it stems from the continuous system H(s):  the transfer function H(s) is the Laplace transform of the impulse response, and H(jw) is the Fourier transform...

Re: PAPR (peak to average power ratio)

Reply posted 9 years ago (04/13/2017)
...

Re: The adoption of the frequency measure "Hertz"

Reply posted 9 years ago (03/29/2017)
So you could say that they put Hertz in the driver's seat.

Re: Eye diagram

Reply posted 9 years ago (01/24/2017)
Avi,I have not looked at your code, so this may not apply.  However...If you have RRC filtered data, to look at the eye, you need to filter it again with the same RRC...

Re: Matlab Home-use version

Reply posted 9 years ago (11/08/2016)
Mark,They say "Get the full Capabilities of Matlab", so that implies it is full-featured.  As you noted, the DSP toolbox (a key feature) appears to be extra --...

Matlab Home-use version

New thread started 9 years ago
As many of you know, #Matlab is a very expensive tool -- its cost brings to mind Mylan Pharmeceuticals and the EpiPen.However, besides the student version, they...

Re: Understanding maths behind DFT?

Reply posted 9 years ago (11/07/2016)
Hi,The tricky thing is that textbooks are not always the best at clearly explaining the DFT. You may need to try a few to find an approach you like.  You might...

Re: Power Measurement of Complex Signal

Reply posted 10 years ago (10/19/2016)
...
Hi,This may not relate exactly to your problem, but take a look at this article.  It shows how to plot the image response of a decimator.  This method automatically...
Hi Andy,I'm not an expert, but FEC can be a tricky subject to jump into. The math can be tedious. I have read parts of the Lin and Costello book below -- it...

Re: A digital filter question

Reply posted 10 years ago (07/04/2016)
Rick,As a practical matter, if the sample rate is much higher than the filter passband,  you could insert a delay of one sample in the block diagram without affecting...

Re: A digital filter question

Reply posted 10 years ago (07/04/2016)
Hi Rick,No I have not seen that structure -- I have seen feed-forward structures for that purpose.The transfer function of your structure is of course Ha = 1/(1...

Re: Decimator Image response

Reply posted 10 years ago (05/10/2016)
Rick,Regarding the non-symmetric b_down and u_down: If I change two lines of code     b_down = 4*b(4:4:end);     (instead of (1:4:end) )     u_down = 4*u(2:4:end);...

Re: Decimator Image response

Reply posted 10 years ago (05/09/2016)
Hi Rick,1.  The definition I would propose for image response would be the sum of the undesired component levels that fall in-band due to decimation, with respect...

Decimator Image response

New thread started 10 years ago
...

Use this form to contact neirober

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address