How to plot the frequency response using freqz and pwelch/psd

3 vues (au cours des 30 derniers jours)
themanwithoutarms
themanwithoutarms le 9 Déc 2015
Commenté : Star Strider le 9 Déc 2015
Hey guys, I have a signal that I used pwelch on. I would like to see the frequency response using the freqz function and plot it with the pwelch or psd figure.
An example would be at about 6:53 on this video
How would I go about doing this?

Réponses (1)

Star Strider
Star Strider le 9 Déc 2015
The freqz function is used to plot the frequency response of a discrete filter you’ve already designed. You don’t seem to have designed a filter to use it with.
The pwelch power spectral density calculates a version of the Fourier transform of the signal, so you get the output in the frequency domain. See the documentation for pwelch for an example demonstrating how to plot the output of the function.
  2 commentaires
themanwithoutarms
themanwithoutarms le 9 Déc 2015
Sorry, I forgot to mention that I do indeed have a filter designed with the B and A coefficients.
Star Strider
Star Strider le 9 Déc 2015
O.K. How does that work with the PSD? The YouTube demonstration used the fft, which is the usual way to characterise a signal you’re going to filter.
Use the freqz function to assess the transfer function of your signal and you filter stability. The second-order-section implementation of a filter is generally preferable because it is more stable than the transfer function implementation.
Using the pwelch PSD estimate is appropriate if you want to get the statistical characteristics of your signal, but I would do that on the filtered, rather than unfiltered, signal.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Parametric Spectral Estimation dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by