4

I have an issue regard to the unwrapping of phases over time.

I have a radar which monitors a slow periodic moving object. From the received signal, i want to see the phase of the object over time. The phase-over-time signal is extracted from FFTs (at the same FFT bin for all the FFTs). Here is the result i got: enter image description here

Because the phases are wrapped, so I need to do an unwrapping for the phases. I use the Matlab command "unwrap" to to this. So I got: enter image description here

The issue is marked at the red circle. Here I expect the signal at this time-instant to be unwrapped. However it wasn't, and the reason is:

- From time sample NO. 42 -> 44, the phases take two time samples to being
wrapped, instead of only one (i.e between two consecutive time samples).
Because of this the phase-over-time signal are not unwrapped correctly. 

I also tried to used another phase-unwrapping method (Adaptive numerical integration), however the result is the same as using "unwrap" command from Matlab.

Here is the phase-over-time signal I expected to see (I did the unwrapping manually): enter image description here

What is the problem mentioned above (Is it a well-known problem or has any name for it)? And of course what is the solution for this?

I would really appreciate any help from you! Thanks alot.

2 Answers 2

5

Matlab's unwrap function tries to avoid any jumps between consecutive values larger than tol. By default, tol is pi. Your jumps from -1.644 to -0.7 to 1.55 are not larger than pi, so unwrap doesn't find it necessary to adjust your data. Note, even if the -0.7 wasn't in there, unwrap still wouldn't adjust your data as the jump would still be less than pi.

The tolerance is an optional parameter in unwrap, you can set:

unwrap(x,tol)

I would suggest setting your tolerance to pi/2 or 3*pi/4, depending on your data.

The unwrap documentation probably has more information

http://uk.mathworks.com/help/matlab/ref/unwrap.html?refresh=true

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the reply @RPM If -0.7 was not there, then the jump is (1.55 - -1.644 = 3.194 > pi), so it would be counted as a jump. I think the "unwrap" command is fine. I also tried to unwrap the phases using Adaptive Numerical Integration method, however the result is the same. I think it's somehow a problem of the signal itself. And btw I think "unwrap" command does not work for jump less than pi even if the "tol" value is set e.g pi/2.
3

It seems that your input signal is between -pi and pi an your desired output between 0 and 2pi, so why dont'you simply add 2pi to the negative values ? Here is a try:

I = s<0;
s(I) = s(I) + 2*pi;

That should provide the desired output, in a more simpler way.

Best,

3 Comments

Thanks @Ratbert Actually I don't really care about the absolute value of the signal, I concern more about its correct shape, cause I want to estimate is frequency.
I understand, my point here is not to put the signal in a given range but to transform the signal to the desired output. Give it a try and you'll see that it answers your problem without the use of unwrap.
Thanks very much @Ratbert. I did try and the result looks better. However now it has some problems with parts of signal which are around the zero-level. These parts of signal have some unexpected jumps which is not wanted (not the above signal, it's a very simple one for illustrating my problem. The actually signal is more noisy). I'm trying to find the solution for these incorrectly jumps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.