what is the relation between π*radian/sample and Hz in frequency axis of wvtool for windowing?
199 ビュー (過去 30 日間)
古いコメントを表示
While using wvtool for windowing the frequency domain horizontal axis is represented in either π*radian/sample or Hz. I am unable to find the relation between then in order to convert from one to other.
For example the frequency domain of rectangular window of length 45 (rectiwin(45)) is giving the -3dB main-lobe width is repredented as 19.531 mHz (or) in normailized frequency as 0.039062 π*radian/sample.
I used 'freqz' function on rectangular window of length 45 to plot its frequency domain seperately. It is giving peak mainlobe maginitude as 33.0642502755069dB at sample 1 and the -3dB of it i.e. 30.1062744728910 (I considered it as approximately 30.0642502755069dB) at sample 11.
So how to convert this into mHz or π*radian/sample?
Also I can't find the how the frequency axis is normalized.
0 件のコメント
採用された回答
Paul
2022 年 2 月 24 日
Very short answer: In discrete time* using the nomenclature of wvtool and freqz, "Hz" means cycles/sample (not cycles per sec). Here, a cycle is one trip around the unit circle. So 1 cycle / sample = 1 Hz = 2*pi rad / sample. Applying to the numbers in the Question from wvtool:
% 0.039062*pi (rad/sample) * 1 Hz / 2pi (rad/sample)
fHz = 0.039062*pi / (2*pi)
Convert to milli-Hz
fmHz = fHz*1000
Or we can invent a new unit called pi-rad (or prad), which is what fvtool and freqz use for plotting, in which case 1 Hz = 2 prad/sample
fHz = 0.039062 /2
However, be careful with freqz, because freqz without output arguments (and an unspecified sample rate) will plot the angular frequency using prad/sample on the x-axis
freqz(rectwin(45))
but requesting the angular frequency as an output argument returns rad/sample, which we can see by calling freqz() using the default frequency points that only traverse the top half of the unit circle
[h,w] = freqz(rectwin(45),1,10000);
w(end) % should be ~pi rad/sample
*discrete time in this context simply refers to sequences indexed by an integer w/o reference to any sampling of continuous signals.
0 件のコメント
その他の回答 (1 件)
Star Strider
2022 年 2 月 24 日
The radians/sample notation is the normalised frequency. The highest frequency that can be uniquely represented in a sampled signal is the Nyquist frequency, equal to one-half the sampling frequency.
The relation between them is that π radians/sample is equivalent to the Nyquist frequency in Hz.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Windows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!