mixing sampled sine waves

Discussion in 'VHDL' started by viswanath, May 11, 2004.

  1. viswanath

    viswanath Guest

    Hi,
    I have a question regarding mixing discrete sine waves. If you have
    two sine waves sin(w1*t) and sin(w2*t) and they are sampled at the
    same rate. If you are mixing them in a receiver operation, we are
    supposed to get at the output of the mixer the sum and difference of
    frequencies. But it is just the values that we are multiplying isn't
    it, at the sampled time instants?
    How do we end up getting a difference frequencies and sum frequencies
    which have to be low pass filtered? If I implemented this in VHDL and
    used math_real library functions sin() and real variables, I would
    just be multiplying the two numbers at each time sample. This value
    would encompass the frequency of the sine wave. However I donot
    understand how I would be getting a difference in frequency and sum in
    frequency terms?
    I have read from trigonometry and analog communications but somehow I
    am missing some essence here. Could you please let me know how the
    above is possible?
    I would greatly appreciate a response.
    Thanks,
    Viswanath
     
    viswanath, May 11, 2004
    #1
    1. Advertising

  2. On 11 May 2004 12:35:13 -0700, (viswanath) wrote:

    >Hi,
    >I have a question regarding mixing discrete sine waves. If you have
    >two sine waves sin(w1*t) and sin(w2*t) and they are sampled at the
    >same rate. If you are mixing them in a receiver operation, we are
    >supposed to get at the output of the mixer the sum and difference of
    >frequencies. But it is just the values that we are multiplying isn't
    >it, at the sampled time instants?
    >How do we end up getting a difference frequencies and sum frequencies
    >which have to be low pass filtered? If I implemented this in VHDL and
    >used math_real library functions sin() and real variables, I would
    >just be multiplying the two numbers at each time sample. This value
    >would encompass the frequency of the sine wave. However I donot
    >understand how I would be getting a difference in frequency and sum in
    >frequency terms?
    >I have read from trigonometry and analog communications but somehow I
    >am missing some essence here. Could you please let me know how the
    >above is possible?



    Firstly, find a table of trig identities:
    http://www.google.com.au/search?q=trig identities

    Then find the one that looks like a product of sinusoids on one side
    and a sum (or difference) of sinusoids on the other, e.g.

    cos x - cos y = -2 sin( (x-y)/2 ) sin( (x + y)/2 )

    Express this in terms of your original w1*t and w2*t :

    cos((w1+w2)*t) - cos((w1-w2)*t) = -2 sin(w1*t) sin(w2*t)

    The right hand side is the two sine waves you are multiplying
    together, sample by sample.
    The left hand side is the 'sum' of two sinusoids at the sum and
    difference frequencies that produces identical values, sample by
    sample.


    If you apply a frequency selective filter, you can get rid of the
    (w1+w2) term, and just leave the (w1-w2) term.


    Note: this is not magic, just a trig identity. It may take a while to
    get your head around it though.
    (There is no need to worry about that Fourier guy yet.)

    Please ask this sort of question in comp.dsp in future.

    Regards,
    Allan.
     
    Allan Herriman, May 12, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Albert

    Animating sine waves

    Albert, Jan 18, 2008, in forum: Java
    Replies:
    4
    Views:
    1,331
    Thomas Fritsch
    Jan 20, 2008
  2. Roedy Green

    javax.sound.sampled

    Roedy Green, Sep 1, 2008, in forum: Java
    Replies:
    8
    Views:
    889
    Knute Johnson
    Sep 2, 2008
  3. picnanard
    Replies:
    0
    Views:
    600
    picnanard
    Sep 1, 2008
  4. Java Guy
    Replies:
    13
    Views:
    6,821
    Java Guy
    Mar 7, 2009
  5. Manuel Graune
    Replies:
    1
    Views:
    905
    Terry Reedy
    Aug 10, 2011
Loading...

Share This Page