Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

** Community Tip** - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question.
X

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Sep 18, 2019
03:23 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 18, 2019
03:23 AM

Bode trap

Hi,

A friend asked me for a phase diagram of a transfer function (see photo and file). I distractedly used the arg(Im(W (iω))/Re(W(iω))) operator for the phase graph. I know this is an old problem, this graph was actually incorrect as seen from the comparison with the correct graph of the function φ1. Why does this happen?

Labels:

3 REPLIES 3

Sep 18, 2019
05:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 18, 2019
05:26 AM

The real part of X01 is always negative. So I would expect angles in the range [pi/2; pi] or [-pi/2,-pi[ for the phase.

The atan function never would give you these values (its restricted to [-pi/2; pi/2]). You would have to use atan2.

Sep 18, 2019
06:15 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 18, 2019
06:15 AM

It seems to me that even with atan2, nothing changes:

Sep 18, 2019
06:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 18, 2019
06:36 AM

@-MFra- wrote:

It seems to me that even with atan2, nothing changes:

Correct. This is because both arg and atan2 give you the correct results and I think your phi1 is wrong (phase shifted by pi).

When you calculated (symbolically) Im(X1)/Re(X2) the denominator was cancelled and the result was (b-w^2)/(a*w). This was the place where you lost the signs of the real- and imaginary parts. The real part ALWAYS is negtive and so the phase can't be anything in the range (-pi/2; pi).

atan2 and also the arg function always return values in the range ]-pi; pi]. This is the reason for the jump when w^2=b at w=4.47 when the phase is +- pi (and not 0!)

You may consider creating your own arg or arctan function which instead always returns values in the range [0; 2pi[ to avoid that jump.

I used the modulo function to do the job but you could as well use an if statement or the if function to achieve the same effect. In case you'd prefer negative phase angles, you would replace the +2 pi by - 2pi.