cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Node analysis

-MFra-
21-Topaz II

Node analysis

Hi!

Why, in figure 29 of the attached worksheet, do the phases not coincide? And in general, if I have made any mistakes please let me know. Thanks very much to those who will answer.

ACCEPTED SOLUTION

Accepted Solutions
-MFra-
21-Topaz II
(To:-MFra-)

Attached is the version with corrections.

View solution in original post

4 REPLIES 4
Werner_E
25-Diamond I
(To:-MFra-)


@-MFra- wrote:

Hi!

Why, in figure 29 of the attached worksheet, do the phases not coincide?


Because its wrong to just use "atan (Im(z)/Re(z))" to get the phase for any complex number z. To get the correct result you'll have to add or subtract pi if Re(z)<0!

Adding pi gives you the phase in the range ]-pi/2; 3 pi /2] and looks like this:

Werner_E_2-1666260841247.png

Subtracting pi forces the phase to ]-3 pi /2; pi/2)

Werner_E_3-1666260959016.png

 

You may use "atan2" instead of "atan" in your function phi to get the very same results as you get with "arg", that is a phase in }-pi; pi]

Using atan2 also has the advantage that the case of Re(z)=0 is handled correctly and does not throw an error!

Werner_E_4-1666261115623.png

 

Of course "arg" would do the job equally well 😉

Werner_E_1-1666260498995.png

 

BTW, to avoid jump discontinuities in the phase plot you can use the "phasecor( )" function  but you have to turn the continuos function into vectors for plotting.

 

 

-MFra-
21-Topaz II
(To:Werner_E)

Right, we talked about it a while ago, but I had just forgotten it. Thank you.

ttokoro
20-Turquoise
(To:-MFra-)

image.png

-MFra-
21-Topaz II
(To:-MFra-)

Attached is the version with corrections.

Announcements

Top Tags