Nelson banner
Signal Processing

The Signal Processing module provides tools for analyzing, filtering, transforming, and resampling sampled signals in Nelson.

It includes windowing functions, FIR and IIR filter design, digital filtering, zero-pole and second-order-section conversions, cross-correlation, and conversions between magnitude, power, and decibel representations.

The module also supports multirate processing, spectral estimation, time-frequency analysis, waveform generation, and common signal measurements.

Signal Generation and Preprocessing

Functions for creating, resampling, smoothing, filtering, and preparing signals.

  • chirp
    Swept-frequency cosine signal.
  • decimate
    Lowpass filter and downsample a vector.
  • downsample
    Downsample a signal by an integer factor.
  • filter2
    2-D digital filter.
  • hampel
    Hampel outlier filtering.
  • interp
    Interpolate a vector by an integer factor.
  • medfilt1
    One-dimensional median filter.
  • rectpuls
    Sampled rectangular pulse.
  • resample
    Change sample rate by a rational factor.
  • sawtooth
    Sawtooth or triangle waveform.
  • sgolay
    Savitzky-Golay filter coefficients.
  • sgolayfilt
    Savitzky-Golay smoothing filter.
  • sinc
    Sinc function.
  • square
    Square waveform.
  • tripuls
    Sampled triangular pulse.
  • upfirdn
    Upsample, FIR filter, and downsample.
  • upsample
    Upsample a sequence by an integer factor.
Measurements and Feature Extraction

Signal measurements, features, and quality metrics.

  • bandpower
    Estimate signal power in a frequency band.
  • findpeaks
    Locate local maxima (peaks) in a 1-D signal.
  • meanfreq
    Mean frequency of a signal spectrum.
  • medfreq
    Median frequency of a signal spectrum.
  • peak2peak
    Difference between maximum and minimum values.
  • rms
    Root mean square value.
  • snr
    Signal-to-noise ratio.
  • thd
    Total harmonic distortion estimate.
Transforms, Correlation, and Modeling

Transforms, correlation estimates, coherence, and transfer-function estimates.

  • cconv
    Circular convolution.
  • cpsd
    Cross power spectral density estimate.
  • dct
    Discrete cosine transform.
  • hilbert
    Analytic signal using the Hilbert transform.
  • idct
    Inverse discrete cosine transform.
  • mscohere
    Magnitude-squared coherence estimate.
  • tfe
    Transfer function estimate compatibility wrapper.
  • tfestimate
    Transfer function estimate.
  • xcorr
    Cross-correlation of discrete-time signals.
  • xcorr2
    2-D cross-correlation.
  • xcov
    Cross-covariance of discrete-time signals.
Digital Filters

Filter design, analysis, conversion, and implementation functions.

  • butter
    Butterworth digital filter design.
  • buttord
    Minimum order for a Butterworth filter.
  • cheb1ord
    Minimum order for a Chebyshev type I filter.
  • cheb2ord
    Minimum order for a Chebyshev type II filter.
  • cheby1
    Chebyshev type I digital filter design.
  • cheby2
    Chebyshev type II digital filter design.
  • ellip
    Elliptic digital filter design.
  • ellipord
    Minimum order for an elliptic filter.
  • fftfilt
    FIR filtering helper.
  • filtfilt
    Forward and reverse digital filtering.
  • filtic
    Initial conditions for digital filtering.
  • filtord
    Digital filter order.
  • fir1
    Window-based FIR filter design.
  • fir2
    Frequency sampling FIR filter design.
  • freqz
    Frequency response of a digital filter.
  • grpdelay
    Group delay of a digital filter.
  • impz
    Impulse response of a digital filter.
  • impzlength
    Length estimate for an impulse response.
  • isfir
    Determine whether a digital filter is FIR.
  • isstable
    Determine whether a digital filter is stable.
  • phasez
    Phase response of a digital filter.
  • sos2tf
    Convert second-order sections to transfer function coefficients.
  • sos2zp
    Convert second-order sections to zero-pole-gain form.
  • sosfilt
    Filter data with second-order sections.
  • stepz
    Step response of a digital filter.
  • tf2sos
    Convert transfer function coefficients to second-order sections.
  • tf2zp
    Convert transfer function coefficients to zero-pole-gain form.
  • zp2sos
    Convert zero-pole-gain form to second-order sections.
  • zp2tf
    Zero-pole to transfer function conversion.
Spectral Analysis

Power spectrum, window, and scale-conversion functions.

Time-Frequency Analysis

Short-time and time-frequency representation functions.

  • istft
    Inverse short-time Fourier transform.
  • spectrogram
    Spectrogram using short-time Fourier transforms.
  • stft
    Short-time Fourier transform.