Message Boards Message Boards

0
|
4920 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How do I calculate |In|, magnitude of neutral current, given Ia, Ib, Ic?

Posted 9 years ago

I've been trying to get Mathematica to provide me the magnitude of the neutral current, In; from the sum of the 3, 3-phase current vectors: Ia, Ib, and Ic.

Before I enter the following expression, I tell Mathematica that q, my variable for the angle, has the value 0. I then put the following expression (or a variation of it) on the Mathematica input line:

Abs[Ia Exp[I (q)] + Ib Exp[I (q + 2 [Pi]/3)] +  Ic Exp[I (q + 4 [Pi]/3)]] 

By doing that, I am, I hope, asking Mathematica to sum 3 vectors, with magnitudes Ia, Ib, and Ic; with angles 0 deg, 240 deg, and 120 deg, respectively; and compute the magnitude of the resulting sum, using the Mathematica "Abs" function.

The correct answer, which I computed using paper and pencil, is

Sqrt[Ia^2 + Ib^2 + Ic^2 - IaIb - IbIc -IaIc]

But Mathematica gives me this on the output line:

Abs[Ia + E^((2 I [Pi])/3) Ib + E^(-((2 I [Pi])/3)) Ic]

After I tell Mathematica to "Simplify" the above expression, I get this:

Abs[Ia + (-1)^(2/3) Ib - (-1)^(1/3) Ic]

After I tell Mathematica to "FullSimplify" the above expression, I get this:

Abs[Ia + (-1)^(2/3) Ib - (-1)^(1/3) Ic]

(The same result as above.)

Would someone please tell me why I can't get Mathematica to actually perform the "Abs" function on the above argument.

POSTED BY: Mark Bennett
3 Replies
ComplexExpand[Abs[Ia + E^((2 I*Pi)/3) Ib + E^(-((2 I*Pi)/3)) Ic]]

Also you will want to use appropriate Mathematica syntax. Square brackets are not used for collecting terms; only parens are used for that. Square brackets have a very different meaning in Mathematica.

POSTED BY: Daniel Lichtblau
Posted 9 years ago

That was the key issue: I see that I need to use the "ComplexExpand" function after I use the "Abs" function.

I don't understand yet why that's necessary, but I'll read about the ComplexExpand function very soon.

BTW, in my original post, the square brackets that are not associated with a Mathematica function (for example: [Pi]) were put there by this webpage when I pasted the text from Mathematica.

Thank you.

POSTED BY: Mark Bennett
Posted 9 years ago

Hi Mark,

Mathematica considers the variables you are using to be possibly complex, so it provides expressions which are correct in all cases. In working with circuit problems, I have found it convenient to use my own functions which assume all variables to be real.

circuits

You might find my response in an earlier post helpful. It does not solve your problem directly, but does address this issue.

Kind regards,

David

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract