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

3 visualizaciones (últimos 30 días)
themanwithoutarms
themanwithoutarms el 9 de Dic. de 2015
Comentada: Star Strider el 9 de Dic. de 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?

Respuestas (1)

Star Strider
Star Strider el 9 de Dic. de 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 comentarios
themanwithoutarms
themanwithoutarms el 9 de Dic. de 2015
Sorry, I forgot to mention that I do indeed have a filter designed with the B and A coefficients.
Star Strider
Star Strider el 9 de Dic. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Parametric Spectral Estimation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by