Phase greater than 180 degree
20 views (last 30 days)
Show older comments
Hi!
I want to use the exp fucntion for phase greater than 180 degree.
For example, a signal has gain of 5 and phase of 20 degree.
When I convert it to exponetial form and dtr=pi/180; G= 5*exp(i*20*dtr)
G=4.6985 + 1.7101i
The magnitude is abs(G) =5 and phase(G)= 0.3491/dtr=20 which is perfectly right!
But if I use a phase angle greater than 180 degree, for example 200 degree
G= 5*exp(i*200*dtr)
G=-4.6985 - 1.7101i
I get the correct magnitude i.e abs (G)=5 but when I do phase(G) it gives be -2.7925 and when i divide it by dtr, it gives me -160 degree which is not the initial 200 degree !!
Can I know how can I use the exp function or other function when I deal with phase which is greater than 180 degree.
Thanks
Yash
0 Comments
Accepted Answer
Roger Stafford
on 18 Mar 2014
If your phase values are always considered to lie in the interval from 0 to 2*pi, then just apply the 'mod' function:
corrected_phase = mod(phase,2*pi);
On the other hand, if you have a series of phase values in which no change is greater in absolute value than pi, but the values can accumulate so as to lie outside the above range, you would need to use matlab's 'unwrap' function.
0 Comments
More Answers (3)
yashvin
on 18 Mar 2014
1 Comment
Roger Stafford
on 19 Mar 2014
In order to adjust the phase by some desired multiple of 2*pi radians (360 degrees) it is of course necessary to have some criterion for doing so. The exponential form that you mentioned simply does not contain enough information within it to do that, as I think you well understand. You need some other kind of information to discriminate between, say, -7/4*pi, 1/4*pi, 9/4*pi, 17/4*pi, etc. The 'unwrap' function I mentioned uses information about previous values to accomplish this, provided an initial value is correctly chosen and no change is beyond pi in absolute value. If you can think of some characteristic of your signals that could provide this missing link of information in however a subtle manner, you should mention it and see if it could be used with matlab to accomplish what you are seeking.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!