0
|
12105 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Using Phasors in Mathematica (adding Cos[])

Posted 9 years ago
 Hi, I am calculating both the amplitude and phase angle in electrical circuits that contain capacitors and inductors. Therefore I need to sum Cos[]'s in Mathematica in which I am having difficulty. Additionally I tried to use Phasor Notation to perform the summations without any success. The calculations are easily performed using my TI-89 calculator, but cannot duplicate the calculations using Mathematica: however I would much prefer to use Mathematica. Please review the attached Mathematica file for details and give me your thoughts. My version of Mathematica is 9.0.1.0. Thanks, Mitch Sandlin Attachments:
4 Replies
Sort By:
Posted 9 years ago
 Now realized that Mitchell said he has MMA 9. To/FromPolarCoordinates are new in 10. So: toPolarCoordinates[vect : {x_, y_}] := {Norm@vect, ArcTan[x, y]} fromPolarCoordinates[{r_, ?_}] := r {Cos@?, Sin@?} 
Posted 9 years ago
 This is one way of many: phasorAdd°[{rA_, ?A_}, {rB_, ?B_}] := MapAt[ #/°&, ToPolarCoordinates[ FromPolarCoordinates[{rA, ?A °}] + FromPolarCoordinates[{rB, ?B °}] ], 2 ] phasorAdd°[{5, 36.87}, {10, -53.13}] {11.1803, -26.5649} 
Posted 9 years ago
 In:= eq1 = a1 Exp[I ( \[Omega] t + \[Phi]1)] + a2 Exp[ I (\[Omega] t + \[Phi]2)] Out= a1 E^(I (\[Phi]1 + t \[Omega])) + a2 E^(I (\[Phi]2 + t \[Omega])) In:= eq2 = CoefficientList[eq1, Exp[I \[Omega] t]] Out= {0, a1 E^(I \[Phi]1) + a2 E^(I \[Phi]2)} In:= eq3 = eq2[] /. { a1 -> 5, a2 -> 10, \[Phi]1 -> 36.87 Degree, \[Phi]2 -> - 53.13 Degree} Out= 10. - 4.99998 I In:= {1., 1./Degree} * CoordinateTransform["Cartesian" -> "Polar", ReIm[eq3]] Out= {11.1803, -26.5649} 
Posted 9 years ago
 You can replace the Cos[x] by a complex exponential E^(I x). All operations are easier with the exponentials. At the end, take the real part of the result.