Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

magnitude respones

Status
Not open for further replies.

nomnom

New Member
Hi , im not prety sure about this calculation
From magnitude response H(w) = |(cos w- cos 3w)+j(sin3w-sinw)|
How to become this answer? =2√sin²w=2|sinw|

*note √= square root
Thanks
 
Last edited:
nomnom,

Hi , im not prety sure about this calculation
From magnitude response H(w) = |(cos w- cos 3w)+j(sin3w-sinw)|
How to become this answer? =2√sin²w=2|sinw|

The solution is correct and direct, just a hell of a lot of algebraic manipulation.

|(cos w- cos 3w)+j(sin3w-sinw)| = sqrt((cos(w)-cos(3*w))^2+(sin(3*w)-sin(w))^2) = sqrt(16*cos(w)^2-32*cos(w)^4+16*cos(w)^6+16*sin(w)^2*cos(w)^4-16*sin(w)^2*cos(w)^2+4*sin(w)^2)

So now all the terms contain sin(w)^2 or even powers of cos(w). Substituting cos(w)^2 = 1 - sin(w)^2 we get sqrt(16-12*sin(w)^2-32*(1-sin(w)^2)^2+16*(1-sin(w)^2)^3+16*sin(w)^2*(1-sin(w)^2)^2-16*sin(w)^2*(1-sin(w)^2)) where all the terms contain multiples of sin(w)^2 or a constant. Expanding and collecting like terms gives 2*√sin(w)^2 .

Ratch
 
Last edited:
Hi,

If we take the real part of H(w) and square it, take the imaginary part of H(w) and square it, then add the two parts, we get:
(sin(3*w)-sin(w))^2+(cos(w)-cos(3*w))^2

which comes out to:
sin(3*w)^2-2*sin(w)*sin(3*w)+cos(3*w)^2-2*cos(w)*cos(3*w)+sin(w)^2+cos(w)^2

which can be simplified to:
2-2*sin(w)*sin(3*w)-2*cos(w)*cos(3*w)

which can be further simplified to:
2-2*cos(2*w)

Now to get the magnitude we have to take the square root of that:
sqrt(2-2*cos(2*w))

which factors into:
sqrt(2)*sqrt(1-cos(2*w))

which can also be written as:
sqrt(2)*sqrt(sin(w)^2-cos(w)^2+1)

and now we replace the '1' in the above with the identity sin(w)^2+cos(w)^2=1 and we get:
sqrt(2)*sqrt(sin(w)^2-cos(w)^2+cos(w)^2+sin(w)^2)

and now reducing that we get:
sqrt(2)*sqrt(sin(w)^2+sin(w)^2)

which of course equals:
sqrt(2)*sqrt(2*sin(w)^2)

which also equals:
sqrt(2)*sqrt(2)*sqrt(sin(w)^2)

which simplifies to:
2*sqrt(sin(w)^2)

and finally we simplify that and we end up with:
2*abs(sin(w))
 
Last edited:
another question it seem simple but don't understand... lolz
 

Attachments

  • part 1.jpg
    part 1.jpg
    911.8 KB · Views: 280
  • Part 2.jpg
    Part 2.jpg
    914.2 KB · Views: 287
how about getting phase respones?


Hi again,


You had shown the definition of your H(w) to be this:
H(w) = |(cos w- cos 3w)+j(sin3w-sinw)|

but really from the context you must have really meant this:
H(jw) = (cos w- cos 3w)+j(sin3w-sinw)

which we take to mean this:
H(jw) = (cos(w)-cos(3*w))+j(sin(3*w)-sin(w))

and then the magnitude is then:
magnitude=|H(jw)|

which we already calculated in previous posts in this thread.

The phase shift is then going to be:
TH(w)=atan2(IP,RP)

where we define IP and RP as follows:

IP=imagpart(H(jw))=sin(3*w)-sin(w)
RP=realpart(H(jw))=cos(w)-cos(3*w)

You can then develop an expression for TH(w) and you might be able to reduce it. It will probably help to look for reductions based on 2*w instead of just w.
 
Last edited:
nomnom,

Lots more algebra if you want to consider the term within the ||.

Orthogonal component divided by real is (sin(3*w)-sin(w))/(cos(w)-cos(3*w)) .
Expanding we get 4*sin(w)*cos(w)^2/(4*cos(w)-4*cos(w)^3)-2*sin(w)/(4*cos(w)-4*cos(w)^3) .
Notice the common denominator 4*cos(w)-4*cos(w)^3 . Simplfying, we get (1/2)*(2*cos(w)^2-1)/(sin(w)*cos(w)) .

Which, by the double angle trigonometric identities, is cos(2w)/sin(2w) = cotan(2w) .

Taking the atan of cotan(2w) we get 1/2w for the phase.

Ratch
 
Last edited:
nomnom,

Lots more algebra if you want to consider the term within the ||.

Orthogonal component divided by real is (sin(3*w)-sin(w))/(cos(w)-cos(3*w)) .
Expanding we get 4*sin(w)*cos(w)^2/(4*cos(w)-4*cos(w)^3)-2*sin(w)/(4*cos(w)-4*cos(w)^3) .
Notice the common denominator 4*cos(w)-4*cos(w)^3 . Simplfying, we get (1/2)*(2*cos(w)^2-1)/(sin(w)*cos(w)) .

Which, by the double angle trigonometric identities, is cos(2w)/sin(2w) = cotan(2w) .

Taking the atan of cotan(2w) we get 1/2w for the phase.

Ratch

Hi Ratch,


Just curious, why did you ask him if he saw any phase shift if you were intending to calculate it later?

Also, when we do phase calculations for transfer functions like this we have to use the two argument inverse tangent function we cant use the single argument version. This two argument function takes into consideration the signs of both the real and imaginary parts which of course leads to a different phase shift than 1/2w for various angles. Try again using this two argument function and see what a difference it makes.

The phase shift, any way you care to do it, should always come out to be:
TH(w)=atan2(IP,RP)

where you'll note the atan2() function which unlike atan() takes 2 arguments not just 1.
 
Last edited:
MrAl,

Just curious, why did you ask him if he saw any phase shift if you were intending to calculate it later?

Because I knew there was no phase shift for |H(w)|. Now if he asked for H(w), then would have calculated the phase shift without your suggestion.

Also, when we do phase calculations for transfer functions like this we have to use the two argument inverse tangent function we cant use the single argument version. This two argument function takes into consideration the signs of both the real and imaginary parts which of course leads to a different phase shift than 1/2w for various angles. Try again using this two argument function and see what a difference it makes.

The phase shift, any way you care to do it, should always come out to be:
TH(w)=atan2(IP,RP)

where you'll note the atan2() function which unlike atan() takes 2 arguments not just 1.

My equation solver does not have the atan2 function. I would have to define an atan2 function from atan. In this problem, however, w is always in the first quadrant if w > 0, and the phase approaches zero as w becomes larger.

Ratch
 
nomnom,

Lots more algebra if you want to consider the term within the ||.

Orthogonal component divided by real is (sin(3*w)-sin(w))/(cos(w)-cos(3*w)) .
Expanding we get 4*sin(w)*cos(w)^2/(4*cos(w)-4*cos(w)^3)-2*sin(w)/(4*cos(w)-4*cos(w)^3) .
Notice the common denominator 4*cos(w)-4*cos(w)^3 . Simplfying, we get (1/2)*(2*cos(w)^2-1)/(sin(w)*cos(w)) .

Which, by the double angle trigonometric identities, is cos(2w)/sin(2w) = cotan(2w) .

Taking the atan of cotan(2w) we get 1/2w for the phase.

Ratch



MrAl,



Because I knew there was no phase shift for |H(w)|. Now if he asked for H(w), then would have calculated the phase shift without your suggestion.



My equation solver does not have the atan2 function. I would have to define an atan2 function from atan. In this problem, however, w is always in the first quadrant if w > 0, and the phase approaches zero as w becomes larger.

Ratch


Im not sure what you mean by w always in the first quadrant, i think you meant the phase angle right?

First just to recap, the defining real part and imaginary part of the transfer function Hjw are:
RP=cos(w)-cos(3*w)
IP=sin(3*w)-sin(w)

The phase of Hjw is not generally confined to the first quadrant that's why we usually have to use atan2() instead of the simpler atan(). Like you said, there are times when we can get away with it but we can not investigate this possibility by dividing IP by RP, that's a big no-no for the same reason we can not use atan(IP/RP) instead of atan2(IP,RP). What happens when we try to start with x=IP/RP is we end up losing some solutions to the equation, and that's exactly what happened when you proceeded from there and that makes it look like all the solutions lie between 0 and pi/4 when really i am guessing that they can lie anywhere in the plane (similar to many problems like this one).

All we have to do to be sure is test the real part and imaginary part and see if one or both of them changes sign from positive to negative. If either one of them changes, we will find more solutions in either the 2nd quadrant or the 4th quadrant (or both), and if both change signs we'll find solutions in the 3rd quadrant as well. Since there is a subtraction in the real part and cos(3w) cycles many times over cos(w) there should be times when RP is negative. Likewise, the imaginary part sin(3w) cycles many times over sin(w) so there are going to be times when IP is negative. These two facts when taken together indicate the solution set could occupy at least three quadrants.
The break points for w are probably multiples of pi/4 so we can find out a lot of information just by investigating these multiples plus and minus some increment like 0.1 or so.


Im quite sure that if you look at this again and try to solve it more directly using atan2() instead of atan() you'll get a full solution set that includes at least three quadrants, but probably all 4.
 
Last edited:
Mr. Al,

Yes, you are right. The quadrant sequence from w = 0 to 2*pi is 1,4,3,2,3,2,1,2... . And, yes it does change at every w = pi/4 .

Ratch
 
Last edited:
Hi again,

Here is a closed form solution for the phase shift which uses the standard atan() function:

TH=2*atan((sin(3*t)-sin(t))/(cos(t)-cos(3*t)+sqrt(2-2*cos(2*t))))

There is also a piecewise linear solution that doesnt involve any trig functions (if you care to define the limit points) and there may be other solutions too.
 
Last edited:
Mr Al,

Here is a closed form solution for the phase shift which uses the standard atan() function:

TH=2*atan((sin(3*t)-sin(t))/(cos(t)-cos(3*t)+sqrt(2-2*cos(2*t))))

There is also a piecewise linear solution that doesnt involve any trig functions (if you care to define the limit points) and there may be other solutions too.

Yes, thank you. The term sqrt(2-2*cos(2*t)) can be changed to 2*|sin(t)| so as to make it look a little cleaner. Another closed form solution is 2*atan((2*abs(sin(t))-cos(t)+cos(3*t))/(sin(3*t)-sin(t))) . Don't you just love those half angle formulas?

Ratch
 
Hi Ratch,

Thanks for the identity. I like to avoid function like abs() and sgn() when possible, but i really dont think it matters that much for his purposes.

BTW did you take the time to graph the phase angle? It's quite a cool plot and shows immediately how a piecewise linear solution could be built up.

If he's still around i guess we can move on to his next question. Care to start?
 
Last edited:
Mr Al,

BTW did you take the time to graph the phase angle? It's quite a cool plot and shows immediately how a piecewise linear solution could be built up.

Yes, it looks like a profile for a lumber saw.

If he's still around i guess we can move on to his next question. Care to start?

Maybe, but not right now. I am busy doing yard work.

Ratch
 
Hi again,


Ok i guess i'll start then...

The original question set is shown in the single diagram below.

Since we know that y[k] equals x[k] convolved with h[k]:
y[k]=x[k]*h[k]
(in the above * stands for "convolved with", not "multiply")

one way to solve this would be to try to find an h[k] that satisfies this relationship.
To do this, we could look at each part of the convolution sum and try to figure out how to generate the y[k].

I guess we can do more if he comes back.
 

Attachments

  • PART3.jpg
    PART3.jpg
    132.1 KB · Views: 275
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top