简体   繁体   English

信号错误产生的相位谱Matlab

[英]phase spectrum of signal wrong generation matlab

I've got 129 samples of some signal. 我有一些信号的129个样本。 I have to discover what signal it is (what components it has) and try to reconstruct it. 我必须发现它是什么信号(它具有什么成分)并尝试对其进行重构。 so after I have done FFT i wanted to find phase of signal so i try: 所以在完成FFT之后,我想找到信号的相位,所以我尝试:

       phs=unwrap(angle(y));
    pha_wek=(0:length(y)-1)'/length(y)*129; 
    plot(pha_wek,phs)

Result I've got it's not what I expected. 结果我知道这不是我期望的。 Can you point me what is wrong ? 你能指出我哪里错了吗?

在此处输入图片说明

The plot looks exactly right to me, depending upon what the original signal is. 根据原始信号是什么,该图对我而言似乎完全正确。 The discontinuities in the phase angle are due to zero-crossings in the magnitude. 相角的不连续性是由于幅度的过零。 However, the phase jumps are less than pi (which is what you might expect if the input signal were originally real and had been windowed when applying the FFT). 但是,相位跳变小于pi(如果输入信号最初是实信号,并且在应用FFT时已加窗,则可能会期望该跳变)。 So my guess is that this signal is some form of complex modulation with some discrete frequencies. 因此,我的猜测是该信号是具有某些离散频率的某种复杂调制形式。

Generally viewing the phase tells you a lot less about the signal than its magnitude. 通常,查看相位可以告诉您的信号要比其幅度小得多。 It is essential for reconstructing the signal, but much harder to interpret (particularly as it is subject to dramatic changes with a simple shift in the time domain). 这对于重建信号至关重要,但是却难以解释(特别是由于时域发生简单变化,信号会发生巨大变化)。

You might be better plotting the phase without using the unwrap command In this case, the issue is the unwrap command - its aim is to limit jumps in phase to be less than pi, which is why the final phase is around -4pi. 在不使用unwrap命令的情况下,可能会更好地绘制阶段。在这种情况下,问题在于unwrap命令-其目的是将相位跳变限制为小于pi,这就是为什么最终阶段在-4pi左右。

I'm not sure what your challenge is, but it isn't clear what you mean by reconstructing the samples. 我不确定您面临的挑战是什么,但是不清楚重构样本的含义。 You've already got these, so what's the issue? 您已经有了这些,那是什么问题? (Are you being asked to reconstruct interpolated samples)? (是否要求您重构插值样本)?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM