# calculate magnitude and phase

This topic is 2852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I'm stuck with a problem for a few days, it's for structural engineering project. Say there is a point on an xy plane at zero. if the point oscillates in the x direction with a magnitude of 6 and a phase of 25 degrees, and also oscillates in the y direction with a magnitude of 8 and phase of 90 degrees, how do I find the maximum extension from zero that the point will make? and at what phase will that occur? I first thought it would be simple addition of complex numbers, but that doesn't seem to work. Any ideas? Best regards Albert

##### Share on other sites
Quote:
 Original post by acp693... if the point oscillates in the x direction with a magnitude of 6 and a phase of 25 degrees, and also oscillates in the y direction with a magnitude of 8 and phase of 90 degrees...
Does this mean that the point is given as a vector of 2 sine functions with the same frequency but different phases (and amplitudes, of course)?

##### Share on other sites
Hi, Yes that's right.

##### Share on other sites
Quote:
 how do I find the maximum extension from zero that the point will make? and at what phase will that occur? I first thought it would be simple addition of complex numbers, but that doesn't seem to work.

It should work. Maybe you're getting the sign on the phase wrong? Think about it with phasors, or equivalently remember the trig identity,

M cos(omega t - phi) = A cos(omega t) + B sin(omega t)

where

A = M cos(phi)
B = M sin(phi) .

Notice that the relationship between (M, phi) and (A,B) is precisely the relationship between polar and cartesian coordinates.

##### Share on other sites
Thanks, That's what I first thought, however consider the simpler case of
x direction vector= Magnitude 6, phase 0 degrees, (6+0i)
y direction vector= magnitude 6, phase 90 degrees,(0+6i)

the point should then describe a circle of radius 6?

However addition of the complex numbers 6+0i + 0+6i = 6+6i.

magnitude = |6+6i| = 8.4853 ?

That would be the correct answer if x and y had the same phase.

I don't know where I'm going wrong with this.

Best regards

Albert

##### Share on other sites
Quote:
 Original post by acp693Thanks, That's what I first thought, however consider the simpler case of x direction vector= Magnitude 6, phase 0 degrees, (6+0i) y direction vector= magnitude 6, phase 90 degrees,(0+6i)the point should then describe a circle of radius 6? However addition of the complex numbers 6+0i + 0+6i = 6+6i.magnitude = |6+6i| = 8.4853 ?
AFAIS, you're dropping the time dependency here with the result that the vector you construct for the addition has x and y components at different times.

The correct vector would be
v(t) := [ 6 * sin( wt ), 6 * sin( wt + pi/2 ) ]t = [ 6 * sin( wt ), 6 * cos( wt ) ]t
with an expected magnitude of
|v(t)| = sqrt( 36 * sin2( wt ) + 36 * cos2( wt ) ) = 6

Now, the complex number you have used are results e.g. at
v( t=0 ) = [ 0, 6 ]t
and
v( t=pi/(2w) ) = [ 6, 0 ]t
where obviously 2 different times are used. Hence is is not correct to add them up.

EDIT: Uhh, I recently saw that I've exchanged the phases in comparison to your original example. But the reasoning is still the same, though.

##### Share on other sites
Thank you Haegarr for your help. I'm still stuck with this, although your example seems to work for the simple example, I can't get it to work with my original example?

I have drawn on graph paper the expected path of the point of the original example using 5 degrees as increments. The maximum magnitude would seem to be 8.64

How do I determine what t would be at maximum magnitude?

Best regards

Albert

##### Share on other sites
OMG, you need a bag full of ugly math! The following is a correct mathematical way AFAIK, but I'm not a mathematician, so be warned. Hence I invite people to check that solution, of course.

The vector is defined as
v(t) := [ Ax sin( ωt + φx ), Ay sin( ωt + φy ) ]T
and its length is
|v(t)| = sqrt( Ax2 sin2( ωt + φx ) + Ay2 sin2( ωt + φy ) )

There is a correspondence in trigonometry that says
sin2( α ) = ( 1 - cos( 2α ) ) / 2

So we get
|v(t)| = sqrt( Ax2 + Ay2 - Ax2 cos( 2ωt + 2φx ) - Ay2 cos( 2ωt + 2φy ) ) / sqrt( 2 )
=: sqrt( p(t) ) / sqrt( 2 )

To get the t where |v(t)| is maximum, the usual way is to compute the derivative, set it to 0, resolve for t, and check whether the function has the correct sign reversal. Now, if |v(t)| is maximal, then also p(t) must be maximal (AFAIK), so we actually compute
d p(t) / dt = 0
what makes things easier.

So we get
d p(t) / dt = Ax2 2ω sin( 2ωt + 2φx ) + Ay2 2ω sin( 2ωt + 2φy )

Setting this to 0 and resolving for t ... is not in my power! But there is the superposition principle of harmonics to our rescue! It says that
A1 sin( ωt + φ1 ) + A2 sin( ωt + φ2 ) == A sin( ωt + φ )
where
A = ... (not of particular interest here)
tan( φ ) = ( A1 sin( φ1 ) + A2 sin( φ2 ) ) / ( A1 cos( φ1 ) + A2 cos( φ2 ) )

With the substitutions
A1 := Ax2
A2 := Ay2
φ1 := 2φx
φ2 := 2φy
ω := 2ω
we can compute the φ.

Now, the formula (using the original ω)
A sin( 2ωt + φ ) == 0
means that
2ωt + φ == n π (( err, that writing is "en by pi"))
where n is a natural number. Hence it is possible to compute a t, verify it, set it into the original formula of |v(t)| and yield in the maximum magnitude.

BTW: I will damn everybody who provides an easier solution after this post ;) There was so much time from the beginning of this thread up to now...

##### Share on other sites
Wow, thank you very much Haegarr, It will take me a while to look through this,
Actually, my problem is really in 3 dimensions and not 2 as in my example, I just thought it would be easier to try and find out how to do it in 2 dimensions first.

Thanks again

Albert

##### Share on other sites
Quote:
 Original post by acp693Actually, my problem is really in 3 dimensions and not 2 as in my example, I just thought it would be easier to try and find out how to do it in 2 dimensions first.
If the way shown above works well, then its extension to 3 dimensions is not a problem: The derivation works the same for 3 dimensions, and the superposition principle can be extended to any dimensions (according to my Bronstein, just for the case you know it ;)

##### Share on other sites
Quote:
 Original post by acp693Thanks, That's what I first thought, however consider the simpler case of x direction vector= Magnitude 6, phase 0 degrees, (6+0i) y direction vector= magnitude 6, phase 90 degrees,(0+6i)

Oh, your problem is not the problem I thought you had...

Anyway, here's how I'd think about it. From my last post you see how you can represent a phase-shifted sinusoid either in "polar" (magitude/phase), or "cartesian" (cosine term, sine term) form. Well that means that you can write your point (x,y)(t) as,

[ x(t) ]   [ A1   B1 ] [ cos(t) ][      ] = [         ] [        ][ y(t) ]   [ A2   B2 ] [ sin(t) ]

or more simply, just

p(t) = M u(t)

where u(t) is a unit vector for all time, and p=(x,y).

What unit vector u maximizes the norm of the expression "M u" ? Simply the one corresponding to the largest singular value of M! Equivalently: The eigenvector corresponding to the largest eigenvalue of MT M.

##### Share on other sites
I was about to post the exact same thing Emergent posted, only less clearly exposed. :)

##### Share on other sites

This topic is 2852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

• ### Forum Statistics

• Total Topics
628735
• Total Posts
2984449

• 25
• 11
• 10
• 16
• 14