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

2 ビュー (過去 30 日間)
themanwithoutarms
themanwithoutarms 2015 年 12 月 9 日
コメント済み: Star Strider 2015 年 12 月 9 日
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?

回答 (1 件)

Star Strider
Star Strider 2015 年 12 月 9 日
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 件のコメント
themanwithoutarms
themanwithoutarms 2015 年 12 月 9 日
Sorry, I forgot to mention that I do indeed have a filter designed with the B and A coefficients.
Star Strider
Star Strider 2015 年 12 月 9 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeParametric Spectral Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by