Digital Signal Processing-Period of Harmonic Signal

Discussion in 'Homework Help' started by naickej4, Mar 6, 2016.

  1. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hello all,
    Please can you assist me with my home work for test preparation.

    upload_2016-3-6_14-3-15.png
    I have attempted this question.

    [​IMG]

    w1= 0.2pi
    and w2 = 0.3pi
    Angular frequency

    I took Period equals T= 2pi/0.2pi = 10
    and T = 2pi/0.3pi = 20/3

    Now I am confused will the total period be 10 + 20 = 30

    Or will I have to take the CBD common best denominator ?

    in this case it will be 10.

    Please can you guide me.
    thanks

    regards
    Joe
     
  2. MrAl

    Well-Known Member

    Jun 17, 2014
    2,439
    492
    Hi,

    The period of a signal is 1/f, where f is the lowest harmonic. So find the lowest harmonic first.

    One way to approach this is to convert this into sines and cosines using Euler's relationships, or just by inspection.
    Before i give anything else away, try that.
     
  3. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir MrAI,

    I get this:
    upload_2016-3-7_9-55-59.png
    I wont worry about the trig functions with complex number j,

    Here I will work out the frequency for each F= 0.5pi X0.2pi = 1/10
    and F= 0.5pi X 0.3pi = 3/20
    So we take the GCD(10,20) = 10
    So the period will be 10?
    Is this correct?

    regards
    Joe
     
  4. MrAl

    Well-Known Member

    Jun 17, 2014
    2,439
    492
    Hi there,

    Well, i was hoping you would graph the function and look at the waveform. That will tell you a lot.
    Do you have a way to graph the wave you produced (which looks right so far) ?
    When you look at the wave, look for the period between where everything repeats itself.
    You can then figure out the more analytical way of doing it and compare to your graph.
    The graph provides a 'graphical' solution and might be hard to interpret for more extreme examples, but it helps to confirm that you have the right solution when you do it analytically, and you can even take it one step further and solve for the zero crossings and that will give you a definite result which you can also compare to the more direct calculation which you seem to have started in your first post. Although zero crossings themselves dont specify the period in every case, knowing what the graph looks like means you can eliminate some zero crossings and then you'd be left with only the ones that do define the period.

    If you dont have a way to graph this, i guess i can graph it for you this time, but i should mention that you should find some way to graph functions so that you can double check your results. If you had already graphed this function you would have been able to tell whether your numerical result was correct or not right away. Graphing is an invaluable tool and that is one reason why graphing calculators became so popular. A picture is worth a thousand words, or in our case, worth a thousand solutions :)
     
    Last edited: Mar 7, 2016
  5. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hello Sir MrAI,

    no sir
    Hello MrAI,

    No Sir, I don't know how to graph this. Is there software on the Internet that I can download and use?

    So from my working out is the answer correct. Where the Period = 10?

    Thank you very much.

    regards
    Joe.
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,768
    4,804
    How does F= 0.5pi X0.2pi = 1/10

    Seems like 0.5 pi x 0.2 pi would be 0.1 pi²

    Try

    ω = 2πƒ; ƒ = 1/T

    T = ω/(2π)

    Next think about what it is you are looking for.

    If I have a waveform that starts over every 20 seconds and I have a waveform that starts over every 30 seconds, how long do I have to wait between times when they are both starting over at the same time? Hint, the answer is NOT 10 seconds.
     
  7. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi WBahn,

    Thank you.

    So if I calculated based on the formulae T = ω/(2π) for ω1
    T = 0.2π/2π = 0.1 = 1/10

    and for T = ω/(2π) for ω2
    T = 0.3π/2π = 0.15 = 3/20

    so I will take 2/20 - 1/10 = 0.05 = 1/20

    Am I on the right track?

    regards
    joe
     
  8. MrAl

    Well-Known Member

    Jun 17, 2014
    2,439
    492
    Hi again,

    As promised, i graphed this for you, but you can see the address of that graphing program in the top of the attachment. It is a free online graphing tool that does basic graphing.

    Here is the graph for the two added cosines. See if you can figure it out from this. If not, no problem, we'll look at it in more depth and figure out the analytical form too in order to calculate it directly from the expression.
     
    Last edited: Mar 8, 2016
    naickej4 likes this.
  9. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi MrAI,

    Thanks Sir!!!

    Wow the answer is 20, Am I correct?

    SO this means my analytical solution is correct.

    regards
    Joel
     
  10. MrAl

    Well-Known Member

    Jun 17, 2014
    2,439
    492
    Hello again,

    I did not see your post #7 when i posted my previous post.

    Yes, the answer is 20. The graph shows this approximately and that gives us a chance to solve for it using the function itself just to make sure it is right. Graphs like that show the information approximately so sometimes it looks like it is exact when it is not. For example, that graph would look the same even if the period was really 20.001 and not exactly 20. That means it's good to solve for something to make sure. I decided to solve for the peaks rather than the zeros, but either way you can look at the graph and then test your guesses.

    Since i did not see your post #7 before now, i'd like to ask a few questions. Where did you get the technique where you subtract the two like that? How did you know that would lead to the right result? Also, will that lead to the right result with any two frequencies?
    I ask these questions because any technique you use you want to be sure it can work in any situation. I havent tested it myself yet so i thought i would ask where you got that from as there are other ways to do it too :)
     
    naickej4 likes this.
  11. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi MrAI,
    Thank you so much for this concern. I read what Mr WBahn said about the difference and thought of it carefully and looked that the difference. and Eular equations, Thanks Mr WBahn.

    MrAI please can you provide me with a link where i can plot graphs of this nature. I am going to try this technique on other examples if this works.

    regards
    Joe
     
  12. MrAl

    Well-Known Member

    Jun 17, 2014
    2,439
    492
    Hi,

    The link was in the top left corner of the picture i posted. That's the site, but i'll see if i can post the actual link here.

    I asked where you got that subtraction technique from for a good reason. When you get a new technique or method you need to try it out on more than just one example. You need to verify (or disprove) the method before you can take it as fact. I think you will be VERY surprised at what you find.

    You already did this one:
    cos(0.3*pi*x)+cos(0.2*pi*x)

    now for example, try this one:
    cos(0.7*pi*x)+cos(0.1*pi*x)

    To test your results, graph the functions and try to spot the true period.

    Another hint would be to graph each term individually, but in the same plot, so you can see when they coincide:
    y1=cos(0.7*pi*x)
    y2=cos(0.1*pi*x)

    graph those two at the same time, and if you like you can graph your previous function terms on a different graph.

    https://www.desmos.com/calculator

    Note you may have to expand the graph by setting the range and x axis limits to see the whole graph, the important parts.
     
    naickej4 likes this.
  13. WBahn

    Moderator

    Mar 31, 2012
    17,768
    4,804
    How is 2/20 - 1/10 = 0.05 = 1/20 ?

    What is the basis for subtracting the periods to find the period of the combined waveform?

    What would be the period to two signals that start out with the same period? Wouldn't it seem reasonable that if you add them that you will end up with a waveform having that same period? But what period to you get if you subtract the two periods (which, remember, are the same)?

    You need to ask if your method makes physical sense.
     
    naickej4 likes this.
  14. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir MrAI,

    The Period is 20?
    Wow thank you sir so much for this link. I really, really appreciate this.

    regards
    Joe
     
  15. MrAl

    Well-Known Member

    Jun 17, 2014
    2,439
    492
    Hi again,

    Yes the period of THAT example is 20, but you got to that result using a method that does not work for all problems, that's why i gave you the next problem to try:
    cos(0.7*pi*x)+cos(0.1*pi*x)

    You should apply that same method and verify that you dont get the right result :)

    The graphing is your best friend for these kind of problems because it tells you so much about the general solutions. You just have to keep in mind that graphs are not accurate in that small differences that really do exist do not always show themselves in the graph because graphing always has limited resolution, and it's usually very limited. But if you see a period on the graph that looks like 100 and you are calculating only 30 for example, then you know something is wrong. If you see 100 and it's really 100.001 however, you probably wont see that on the graph, so you have to be a little careful when using a graph to extract results and rather calculate the solutions using a numerical solver of some type when needed unless of course it works out completely algebraically.
     
    naickej4 likes this.
  16. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi MrAI,

    Thank you Sir, awesome stuff, thank you for that link its the coolest think i came across.

    you the best man. I makes sense to me now. I now see the light lol

    regards
    joe
     
  17. MrAl

    Well-Known Member

    Jun 17, 2014
    2,439
    492

    Hi there,

    I forgot to comment on that post so here goes :)

    I took that 2/20-1/10 to be a typo but i am not completely sure. I also dont know if the OP understands that the way to get to the right result needs to be looked at a little more.
     
    naickej4 likes this.
Loading...