GithubHelp home page GithubHelp logo

lubossmolik / autofft Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 3.0 9.93 MB

autofft is a Matlab package which performs the time-frequency analysis without the need of Signal Processing Toolbox™. It mimics options of the Brüel & Kjaer FFT analysers and focuses on fast and accurate estimates of averaged autospectra (also called modified periodograms) and spectrograms.

License: BSD 3-Clause "New" or "Revised" License

MATLAB 100.00%
frequency-analysis time-frequency-analysis fft-analysis

autofft's Introduction

autofft - A time-frequency analyser for Matlab

The Signal Processing Toolbox™ provides several functions to power spectrum estimation, including pspectrum, pwelch and stft. Although these functions are of high quality and well-documented, they might be cumbersome in some engineering applications. These applications include estimating magnitudes of vibration, noise and other discrete-time signals in engineering units or comparing theoretical results with measurements.

In such applications, you can use autofft to estimate the discrete Fourier transform (DFT), which mimics the properties of the Brüel & Kjaer FFT analysers. Based on your input, autofft segments signal, applies window functions and performs spectral averaging. The resulting averaged spectrum, also called modified periodogram, can be returned in various engineering spectral units, including decibels, magnitude, root mean square (RMS), peak-to-peak and power spectral density (PSD). autofft can also estimate spectral derivation or spectral integral of DFT and perform the short-time Fourier transform (STFT).

In such applications, you can use the autofft package which mimics the properties of the Brüel & Kjaer FFT analysers. Based on your input, autofft automatically filter signal, separates it into segments, applies window functions and performs spectral averaging. The resulting averaged spectrum, also called modified periodogram, can be returned in various engineering spectral units, including decibels, root mean square (RMS) and peak-to-peak magnitudes, and power spectral density (PSD). autofft can also estimate spectral derivation or spectral integral of the spectrumm and perform the short-time Fourier transform (STFT).

Capabilities of autofft

  • Does not require the Signal Processing Toolbox™.
  • Performs significantly better than pwelch and pspectrum in computationally intensive problems.
  • Estimates magnitudes of components in your data in engineering units, e.g. dB, V or Pa.
  • Provides control over the setup of the frequency analyser, which is impossible with library functions.
  • Can apply high-pass and frequency weighting filters per ISO 61672, spectral derivation or spectral integration.

What's new in v1.5?

  • v1.5.3: New functionality: The results are now visualised automatically or manually using 'PlotLayout' and 'EngineeringUnit' parameters.
  • v1.5.3: Changed functionality: 'HighPassFrequency' parameter now also accepts a filter object or numerator and denominator coefficients b and a. This feature allows experienced users to use their own filters and store them in the setup structure array.
  • v1.5.3: Documentation: New example added.
  • v1.5.3: Documentation: Nomenclature have been unified and simplified.
  • v1.5.2: Changed functionality: The package no longer requires the Signal Processing Toolbox™.
  • v1.5.2: Changed functionality: A first-order Butterworth digital filter is now used for high-pass filtering rather than a first-order elliptic filter.
  • v1.5.2: New functions: The package is now distributed with functions that can construct Blackman-Harris, flat-top, Hamming, Hann, Kaiser and uniform windows and can design an n-th order Butterworth digital filter. These functions can be found in +utilities directory.
  • v1.5.1: Code optimisation: The STFT is now computed more efficiently.
  • v1.5.1: Bug fix: In same cases, times for the STFT were evaluated more than once. This has been fixed.
  • New functionality: The output spectra can be returned in decibel scale using the 'dbReference' parameter.
  • New function: A freqWeight function, which applies frequency weighting filters to the power spectrum, is now included in the package.
  • Documentation: New example added.
  • Code optimisation: Times at which the STFT is evaluated are computed more efficiently.

Getting started

For more information read user manual or visit View Frequency and time-frequency analysis in Matlab on File Exchange

autofft's People

Contributors

lubossmolik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

autofft's Issues

Poblems runnig Auto_FFT function,

Code exmaple:
Fs = 1 / (time(2) - time(1)); %sampling frequency
N = length(amplitude);
fs = Fs * (0:(N/2))/N;
set = struct("SamplingFrequency",fs,"FFTLength",N,"Mode","onesided");
[s,f,set] = autofft(amplitude,fs, set);
%amplitude_spectrum_dbv = 20 * log10(abs(s(1:N/2+1)));
disp(set)
figure;
plot(fs, s);
xlabel('Frequency (Hz)');
ylabel('Amplitude (Amplitude)');
title('Frequency Spectrum using autofft');
grid on;

The above is the code that i'm working on, its for creating frequency plot from amplitude , time data. I've installed the Auto_FFT from Add-ons in Matlab. I already shared the error i'm facing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.