Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - mixing sampled sine waves

 
Thread Tools Search this Thread
Old 05-11-2004, 08:35 PM   #1
Default mixing sampled sine waves


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
  Reply With Quote
Old 05-12-2004, 07:02 AM   #2
Allan Herriman
 
Posts: n/a
Default Re: mixing sampled sine waves
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
  Reply With Quote
Reply

« Counting bits | CRC »

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46