DSPRelated.com
Free PDFs
Filtered by topic: MATLAB/Simulink [clear filter]
Savitzky Golay Filter

Savitzky Golay Filter

Josef Hoffmann
TimelessIntermediate

The Savitzky-Golay filter is a mathematical smoothing filter that is often used in signal processing. It was first described in 1964 by Abraham Savitzky and Marcel Golay. The filter uses a polynomial regression over a series of values to find a smoothed value. One advantage of the Savitzky-Golay filter is that, unlike other smoothing filters, high-frequency components are not simply cut off, but are included in the calculation. As a result, the filter shows excellent properties with regard to the relative maxima, minima and scatter. In this article, the principle of the Savitzky Golay filter is explained and accompanied with MATLAB scripts. Two simple examples will be examined and provided with meaningful representations of the results to help understand these filters. The MATLAB function sgolay and its parameters are also explained and applied so that you can better understand this function and use it for your own applications.


Decimation and Interpolation with
IFIR Filters

Decimation and Interpolation with IFIR Filters

Josef Hoffmann
Still RelevantIntermediate

In this article, the principle of the IFIR filter is first explained and accompanied by simulation. It also shows how to use the IFIR filters efficiently in the process of decimation and interpolation. Here, too, simulations with Simulink are used to explain the subject in an understandable manner.


Decimation and Interpolation with
Polyphase Filters

Decimation and Interpolation with Polyphase Filters

Josef Hoffmann
Still RelevantIntermediate

This article deals with decimation and interpolation in classical and polyphase realizations. The topic is accompanied by many simulations with MATLAB and Simulink, so that the facts can be easily fixed. The simulations can be creatively expanded with your own ideas.


A Simplified Matlab Function for Power Spectral Density

A Simplified Matlab Function for Power Spectral Density

Neil Robertson
Still RelevantIntermediate

In an earlier post, I showed how to compute power spectral density (PSD) of a discrete-time signal using the Matlab function pwelch.  Pwelch is a useful function because it gives the correct output, and it has the option to average multiple Discrete Fourier Transforms (DFTs).  However, a typical function call has five arguments, and it can be hard to remember how to set them all and how they default.

In this post, I create a simplified PSD function by putting a wrapper on pwelch that sets some parameters and converts the output units from W/Hz to dBW/bin.  The function is named psd_simple.m, and its code is listed in the appendix.


Digital Filtering in the Frequency Domain

Digital Filtering in the Frequency Domain

Andreas Schwarzinger
TimelessIntermediate

Time domain digital filtering, whether implemented using FIR or IIR techniques, has been very well documented in literature and been thoroughly used in many base band processor designs. However, with the advent of software defined radios as well as CPU support in more recent baseband processors, it has become possible and often desirable to filter signals in software rather than digital hardware. Whereas, time domain digital filtering can certainly be implemented in software as well, it becomes highly inefficient as the number of filter taps grows. Frequency domain filtering, using FFT and IFFT operations, is significantly more efficient and surprisingly easy to understand. This document introduces the reader to frequency domain filtering both in theory and in practice via a MatLab script.


Model Signal Impairments at Complex Baseband

Model Signal Impairments at Complex Baseband

Neil Robertson
Still RelevantIntermediate

In this article, we develop complex-baseband models for several signal impairments: interfering carrier, multipath, phase noise, and Gaussian noise. To provide concrete examples, we'll apply the impairments to a QAM system. The impairment models are Matlab functions that each use at most seven lines of code. Although our example system is QAM, the models can be used for any complex-baseband signal.


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

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

Neil Robertson
Still RelevantIntermediate

In this article, I'll present some examples to show how to use pwelch. You can also "do it yourself", i.e. compute spectra using the Matlab fft or other fft function. As examples, the appendix provides two demonstration mfiles; one computes the spectrum without DFT averaging, and the other computes the spectrum with DFT averaging.


Design IIR Filters Using Cascaded Biquads

Design IIR Filters Using Cascaded Biquads

Neil Robertson
TimelessIntermediate

This article shows how to implement a Butterworth IIR lowpass filter as a cascade of second-order IIR filters, or biquads. We'll derive how to calculate the coefficients of the biquads and do some examples using a Matlab function biquad_synth provided in the Appendix. Although we'll be designing Butterworth filters, the approach applies to any all-pole lowpass filter (Chebyshev, Bessel, etc). As we'll see, the cascaded-biquad design is less sensitive to coefficient quantization than a single high-order IIR, particularly for lower cut-off frequencies.


Design IIR Bandpass Filters

Design IIR Bandpass Filters

Neil Robertson
TimelessIntermediate

In this post, I present a method to design Butterworth IIR bandpass filters. My previous post [1] covered lowpass IIR filter design, and provided a Matlab function to design them. Here, we'll do the same thing for IIR bandpass filters, with a Matlab function bp_synth.m


Design IIR Butterworth Filters Using 12 Lines of Code

Design IIR Butterworth Filters Using 12 Lines of Code

Neil Robertson
TimelessIntermediate

While there are plenty of canned functions to design Butterworth IIR filters [1], it's instructive and not that complicated to design them from scratch. You can do it in 12 lines of Matlab code.