otvam / fourier_series_pwm_matlab

MATLAB Code for Fourier Series Handling (with FFT)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MATLAB Code for Fourier Series Handling (with FFT)

license - BSD language - MATLAB category - science status - maintained

The MATLAB FFT/IFFT functions are good but not so easy to use for real periodic signal:

  • the ordering of the frequency vector is confusing due to the negative frequencies (spectrums are symmetric)
  • the coefficients are not scaled as in a Fourier series due to the definition of the DFT

The provided MATLAB functions offer different functionalities around Fourier series:

  • get time and frequency vector
  • wrappers around the MATLAB FFT/IFFT functions that scale periodic signals as Fourier series coefficients
  • many signals can be processed at the same time (matrices)

The following functions are offered for signal generation:

  • generate spectrum of arbitrary PWM periodic signals directly in the frequency domain
  • generate PWM signals with a finite/infinite slew rate
  • generate DC and AC sinusoidal signals

Additionally, several transformations can be applied to frequency domain signals:

  • apply low-pass filters (e.g., first-order, second-order)
  • apply simple transformations (eg., delay, phase shift, AC coupling)

Examples

Compatibility

  • Tested with MATLAB R2018b and R2021b.
  • No toolboxes are required.
  • Compatibility with GNU Octave not tested but probably easy to achieve.

Author

Thomas Guillod - GitHub Profile

License

This project is licensed under the BSD License, see LICENSE.md.

About

MATLAB Code for Fourier Series Handling (with FFT)

License:BSD 2-Clause "Simplified" License


Languages

Language:MATLAB 100.0%