如何将归一化频率转换为实际频率 [英] how to convert normalized frequency to actual frequency

查看:928
本文介绍了如何将归一化频率转换为实际频率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我们有以下代码

function [ x ] = generate1(N,m,A3)
f1 = 100;
f2 = 200;
T = 1./f1;
t = (0:(N*T/m):(N*T))'; %'
wn = randn(length(t),1); %zero mean variance 1
x = 20.*sin(2.*pi.*f1.*t) + 30.*cos(2.*pi.*f2.*t) + A3.*wn;
%[pks,locs] = findpeaks(x);
 plot(x)
end

我已经使用以下命令生成了信号

i have generated signal using following command

y=generate1(3,500,1);

我有501个长度的样本,现在我想使用音乐方法来检测频率,即100和200,假设参数的数量是2,所以我尝试了

and i have got 501 length sample,now i want to use music method to detect frequencies,namely 100 and 200,assume that number of parameter is 2,so i have tried

pmusic(y,4)

如何确定这张图片中的实际频率?我认为我需要将归一化频率转换为实际频率,因为我知道归一化频率与$ f/f_s $相同,其中$ f_s $是采样频率,但是在此遇上我该怎么办?

how determine actually frequencies from this picture?i think that i need to convert a from normalized frequency to actual frequency,as i know normalized frequency is same as $f/f_s$ where $f_s$ is sampling frequency,but in this case what i should do?

推荐答案

您需要将采样率乘以一半.也就是说,归一化频率"1.0"为Fsample/2.

You need to multiply by half the sampling rate. I.e., the normalized frequency "1.0" is Fsample/2.

举一个简单的例子,这是一个以4KHz采样的200 Hz信号:

For a simple example, here's a 200 Hz signal sampled at 4KHz:

x=sin(2*pi*200/4000*[0:1000])

运行pmusic(x, 2)在归一化频率0.1处给出一个明显的峰值. 转换为Hz,即0.1 * 4000/2 = 200 Hz.

Running pmusic(x, 2) gives a pronounced peak at the normalized frequency 0.1. Converted to Hz, this is 0.1*4000/2 = 200 Hz.

我修改了您的函数以使其更易于分析(只有一个正弦函数,没有随机性):

I have modified your function to make it easier to analyze (just one sine function and no randomness):

 function x = gen(N,m)
    f1 = 100;
    T  = 1/f1;
    dt = N*T/m;

    x = sin(2*pi*f1*dt*[0:num_of_samples]);
 end

 x = gen(3,500,1e3);

要获得更好的分辨率,请使用pmusic(x,2,[0:.01:0.2]).

To get better resolution use pmusic(x,2,[0:.01:0.2]).

这篇关于如何将归一化频率转换为实际频率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆