简体   繁体   中英

phase spectrum of signal wrong generation matlab

I've got 129 samples of some signal. 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:

       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). 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.

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)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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