Phase greater than 180 degree

16 次查看(过去 30 天)
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

采纳的回答

Roger Stafford
Roger Stafford 2014-3-18
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.

更多回答(3 个)

yashvin
yashvin 2014-3-18
Hi, thanks for your prompt reply.
You are perfectly right but I want to get back the initial 200 degree. Another example is : dtr=pi/180
I have G1= 6*exp(i*100*dtr) and G2= 5*exp(i*20*dtr)
If I do G1*G2, I can get the gain of 30 by abs(G1*G2) and phase(G1*G2)/dtr which is 120 degree.
However if G1= 6*exp(i*100*dtr) and G2= 5*exp(i*110*dtr)
I should get the total phase of G1*G2 (100+110)degree and gain (6*5). I get the gain of 30 which right but phase is -150 degree. I want to get phase 210 degree directly.
You are right about the anti/clockwise thing of -150 degree and 210 degree.
Can you please advice how I can get the 210 degree directly because the numerical value of 210 degree is important to my further calculation.
Please advice other possible way of carrying out the task
Thanks
Yash

yashvin
yashvin 2014-3-18
Hi Roger,
Thanks for your reply.
In fact, my phase values of the 2 signals can be of any range. At one instant the phase value of one signal can be 400 degree and the the other signal can be -500 degree such that the resultant phase is -100 degree.
For example G1= 6*exp(i*400*dtr) and G2= 5*exp(-i*500*dtr). I want the resultant phase to be -100 and the gain to be 30 which i get correctly
I would wish to take (400-360) + (-500 +360)= -100 degree but I need to add all phases at one instant to other remaining signals. I cannot modify the phase values.
Any idea on how it can be done for any arbitrary values of phases of the two signals and taking signs in consideration.
Thanks
Yash
  1 个评论
Roger Stafford
Roger Stafford 2014-3-19
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.

请先登录,再进行评论。


yashvin
yashvin 2014-3-19
编辑:yashvin 2014-3-19
In a simple way,here is what I intended to do :
I have got 2 transfer functions G1 and G2. Gn is not a transfer function but has got a gain and a phase.
s=tf('s')
G1=1/s;
G2=5/s^3;
I want to find the overall gain and phase of the system at the frequency w=1. I can get the gain and phase of G1 and G2 at w=1 by:
[m1,p1]=bode(G1,1)
[m2,p2]=bode(G2,1)
m1=1,p1=-90
m2=5,p2=-270
Assuming my gain at w=1 for Gn is 5 and the phase is -100 degree. How can i find the overall gain and phase of the system. The closed loop positive feedback is
Cloop=G1/(1-G1*G2*GN)
My main idea was to convert the gain and phase into exponential form and do the multiplication. But the main problem I am getting is the adding phase which exceeds 180 or -180 degree.
Can you please advice how can i find the gain and phase of the closed loop feedback system at w=1.
Thanks
Yash

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by