Library

Course: Learn signal processing in MATLAB and Python

Learn signal processing in MATLAB and Python

  • Life Time Access
  • Certificate on Completion
  • Access on Android and iOS App
About this Course

Why you need to learn digital signal processing.

Nature is mysterious, beautiful, and complex. Trying to understand nature is deeply rewarding, but also deeply challenging. One of the big challenges in studying nature is data analysis. Nature likes to mix many sources of signals and many sources of noise into the same recordings, and this makes your job difficult.

Therefore, one of the most important goals of time series analysis and signal processing is to denoise: to separate the signals and noises that are mixed into the same data channels.

The big idea of DSP (digital signal processing) is to discover the mysteries that are hidden inside time series data, and this course will teach you the most commonly used discovery strategies.


What's special about this course?

The main focus of this course is on implementing signal processing techniques in MATLAB and in Python. Some theory and equations are shown, but I'm guessing you are reading this because you want to implement DSP techniques on real signals, not just brush up on abstract theory.

The course comes with over 10,000 lines of MATLAB and Python code, plus sample data sets, which you can use to learn from and to adapt to your own coursework or applications.

In this course, you will also learn how to simulate signals in order to test and learn more about your signal processing and analysis methods.

Are there prerequisites?

You need some programming experience. I go through the videos in MATLAB, and you can also follow along using Octave (a free, cross-platform program that emulates MATLAB). I provide corresponding Python code if you prefer Python. You can use any other language, but you would need to do the translation yourself.

I recommend taking my Fourier Transform course before or alongside this course. However, this is not a requirement, and you can succeed in this course without taking the Fourier transform course.

I hope you to see you in class!

Basic knowledge
  • You need high-school-level math, and you need at least basic programming skills in either MATLAB or in Python
What you will learn

By the end of this course, you will gain an understanding of the theory and computer-implementation of the most important digital signal processing operations, including

  • Time series denoising
  • Spectral and rhythmicity analyses
  • Working with complex numbers
  • Filtering
  • Convolution
  • Wavelet analysis
  • Resampling, interpolating, extrapolating
  • Outlier detection
  • Feature detection
  • Variability
Curriculum
Number of Lecture: 92
Total Duration: 12:05:17
Introductions
  • Signal processing = decision-making + tools  

    It's all in your head. Really.

  • Using MATLAB  

    If you have MATLAB available, that's really the best way to follow this course.

  • Using Octave online (no installation!)  

    Online Octave is also great.

  • Using Python (no installation)  

    Python is fine as well.

  • Writing code vs. using toolboxes/programs  

    A philosophical discussion about using your own code, others code, or a mixture.

Time series denoising
  • MATLAB and Python materials for this section  
  • Mean-smooth a time series  

    The mean-smoothing filter is a simple yet effective denoising tool.

  • Gaussian-smooth a time series  

    Like the mean-smoothing filter, but smoothier.

  • Gaussian-smooth a spike time series  

    Application of Gaussian-smoothing filter to spike time series.

  • Denoising EMG signals via TKEO  

    Reduce noise and enhance signal by converting to TKEO energy.

  • Median filter to remove spike noise  

    Elimiate spike artifacts using the threshold-median filter.

  • Remove linear trend (detrending)  

    Got a trend? Remove it by detrending!

  • Remove nonlinear trend with polynomials  

    Disappointed with linear trends? Try the nonlinear variety!

  • Averaging multiple repetitions (time-synchronous averaging)  

    Strength in numbers.

  • Remove artifact via least-squares template-matching  

    Use least-squares projection to remove an artifact.

  • Code challenge: Denoise these signals!  

    Apply your skills to solve the mystery!

Spectral and rhythmicity analyses
  • MATLAB and Python materials for spectral section  
  • Crash course on the Fourier transform  

    A quick intro to what you need to know about the Fourier transform.

  • Fourier transform for spectral analyses  

    Examples of the FFT for spectral analyses.

  • Welch's method and windowing  

    Increase SNR for non-stationary signals.

  • Spectrogram of birdsong  

    What does a birdsong look like?

  • Code challenge: Compute a spectrogram!  

    Apply your skills to solve this mystery!

Working with complex numbers
  • MATLAB and Python codes for complex numbers section  
  • From the number line to the complex number plane  

    1D numbers are for kids. Welcome to the adult numbers.

  • Addition and subtraction with complex numbers  

    Adding complex numbers works how you think it should.

  • Multiplication with complex numbers  

    Multiplying complex numbers is not what you probably think!

  • The complex conjugate  

    How to get to the upside down.

  • Division with complex numbers  

    Use the complex conjugate to simplify your life.

  • Magnitude and phase of complex numbers  

    Intersection of complex numbers and trigonometry.

Filtering
  • MATLAB and Python materials for filtering section  

    Download the zip and follow along!

  • Filtering: Intuition, goals, and types  

    This video provides an introduction to this entire section. Don't skip it!

  • FIR filters with firls  

    Design FIR filters using the firls kernel function.

  • FIR filters with fir1  

    Can't count to 6? Use fir1 instead!

  • IIR Butterworth filters  

    IIR filters are smooth. Just like butter.

  • Causal and zero-phase-shift filters  

    Does time flow forwards or backwards? Or both?

  • Avoid edge effects with reflection  

    Learn how to use reflection to avoid those pesky edge effects!

  • Low-pass filters  

    Let the slow-pokes through.

  • Windowed-sinc filters  

    sin(x)/x: The. Best. Function. Ever.

  • High-pass filters  

    Take the fast lane to signal processing!

  • Narrow-band filters  

    See the importance of appropriate parameter selections!

  • Two-stage wide-band filter  

    The better way to filter across a "wide" frequency band.

  • Quantifying roll-off characteristics  

    Learn one way to characterize FIR and IIR filters.

  • Remove electrical line noise and its harmonics  

    Application of super-narrow notch filters for removing pesky electrical artifacts.

  • Use filtering to separate birds in a recording  

    Use temporal filtering to separate different souces of signals.

  • Code challenge: Filter these signals!  

    Apply your skills to solve this mystery!

Convolution
  • MATLAB and Python materials for convolution section  

    Download the zip and follow along!

  • Time-domain convolution  

    Learn how to implement convolution in the time domain.

  • Convolution in MATLAB  

    See convolution implemented in code.

  • Why is the kernel flipped backwards?!?!!?  

    Sometimes, truth is stranger than fiction.

  • The convolution theorem  

    All roads lead to Rome.

  • Thinking about convolution as spectral multiplication  

    New perspective -> new insight.

  • Convolution with time-domain Gaussian (smoothing filter)  

    Example of convolution for signal processing.

  • Convolution with frequency-domain Gaussian (narrowband filter)  

    Example of convolution for signal processing.

  • Convolution with frequency-domain Planck taper (bandpass filter)  

    Example of convolution for signal processing.

  • Code challenge: Create a frequency-domain mean-smoothing filter  

    Apply your skills to solve this mystery!

Wavelet analysis
  • MATLAB and Python materials for wavelet section  

    Get the zip and follow along!

  • What are wavelets?  

    Introduction to wavelets and some examples of common wavelets.

  • Convolution with wavelets  

    See what happens when you convolve a signal with wavelets.

  • Wavelet convolution for narrowband filtering  

    Morlet wavelets are great for narrowband filtering.

  • Overview: Time-frequency analysis with complex wavelets  

    Complex wavelets can be used for time-frequency analysis.

  • MATLAB: Time-frequency analysis with complex wavelets  

    See the theory put into practice

  • Time-frequency analysis of brain signals  

    See an example of time-frequency analysis in real data.

  • Code challenge: Compare wavelet convolution and FIR filter!  

    Apply your skills to solve this mystery!

Resampling, interpolating, extrapolating
  • MATLAB and Python materials for session 8  
  • Upsampling  

    Unsatisfied with how much data you have? Upsample to get more!

  • Downsampling  

    Uh oh, too much data? Try downsampling!

  • Strategies for multirate signals  

    How to deal with multivariate signals that have different sampling rates.

  • Interpolation  

    Missing data? No worries, just interpolate!

  • Resample irregularly sampled data  

    Irregular sampling rate? Watch this video to find out what to do!

  • Extrapolation  

    To infinity, and beyond!

  • Spectral interpolation  

    Interpolate based on smooth transitions in frequency.

  • Dynamic time warping  

    See how similar two signals can get!

  • Code challenge: Denoise and downsample this signal!  

    Apply your skills to solve this mystery!

Outlier detection
  • MATLAB and Python materials for outlier section  

    Get the zip and follow along!

  • Outliers via standard deviation threshold  

    Identify outliers based on extreme standard deviation.

  • Outliers via local threshold exceedance  

    For non-stationary time series, a "global" threshold might not work.

  • Outlier time windows via sliding RMS  

    Identify and remove excessively noisy time windows.

  • Code challenge  

    Apply your skills to solve this mystery!

Feature detection
  • MATLAB and Python materials for feature detection section  

    Download and follow along!

  • Local maxima and minima  

    Identifying local extrema is not as trivial as you might think!

  • Recover signal from noise amplitude  

    Convert noise into signal.

  • Wavelet convolution for feature extraction  

    Application of convolution for automatic feature extraction and averaging.

  • Area under the curve  

    Bringing some elementary calculus into signal processing.

  • Application: Detect muscle movements from EMG recordings  

    Application of feature detection for muscle movements.

  • Full width at half-maximum  

    Learn how to characterize the width of a Gaussian or Gaussian-like features.

  • Code challenge: find the features!  

    Apply your skills to solve this mystery!

Variability
  • MATLAB and Python materials for variability section  

    Download and follow along!

  • Total and windowed variance and RMS  

    Quantify root-mean-square over large and small windows.

  • Signal-to-noise ratio (SNR)  

    The various ways to think about and compute SNR

  • Coefficient of variation (CV)  

    Hint: It's similar to SNR, but upside down.

  • Entropy  

    Compute the total "information" in a signal.

  • Code challenge: variability edition  

    Apply your skills to solve this mystery!

Reviews (0)