Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > mixing sampled sine waves

Reply
Thread Tools

mixing sampled sine waves

 
 
viswanath
Guest
Posts: n/a
 
      05-11-2004
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
 
Reply With Quote
 
 
 
 
Allan Herriman
Guest
Posts: n/a
 
      05-12-2004
On 11 May 2004 12:35:13 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
numpy/scipy: calculate definite integral of sampled data Manuel Graune Python 1 08-10-2011 12:13 AM
Unable to open the line: javax.sound.sampled.LineUnavailableException Java Guy Java 13 03-07-2009 01:32 PM
javax.sound.sampled Roedy Green Java 8 09-02-2008 04:33 PM
when sampled signal falling or rising edge picnanard VHDL 0 09-01-2008 11:43 AM
Animating sine waves Albert Java 4 01-20-2008 04:18 PM



Advertisments