Maker Pro
Maker Pro

mixing sampled sine waves

V

viswanath

Jan 1, 1970
0
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?
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
 
J

John Popelish

Jan 1, 1970
0
viswanath said:
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?
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

In most mixers, the two frequencies are not sampled, but simply
multiplied on a continuous basis (or the signum of one is multiplied
times the other). Multiplication is a nonlinear process (unlike
addition) so new components appear. The trig identity for the product
of two sine waves is:
sin(u)*sin(v)=1/2[cos(u-v)-cos(u+v)]

So I don't follow your mention of sampling in this context.
 
B

Bob Masta

Jan 1, 1970
0
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?
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

It turns out this works exactly the same as for continuous waves.
This is essentially what is done in an FFT analysis, where you
effectively are multiplying the input signal by the sine and cosine
of each frequency you want to measure. If you were to work
through the multiplication of the sampled values, you'd find
that they perform just as you might expect from the continuous
formulas for products of sinusoids.

I've got some tutorials on this at
<www.daqarta.com/0t0ifft1.htm>
and
<www.daqarta.com/eex01.htm>

Hope this helps!


Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
 
A

Animesh Maurya

Jan 1, 1970
0

Hi Bob,

I saw your site earlier also, but never came across those interesting
tutorials.

I read first part and appreciated it a lot, you started from where
books usually stop.

Concepts of imaginary plane and negative frequencies always baffles me
a lot, infact everything goes in imaginary mind, round and round and
round…………

I hope after complete reading a learner like me will get benefited to
really handle those real world problem.

Please put on the source code of those crisp plot, so the reader can
tweak it to learn more, are those MATLAB one.

Thanks

Best regards,
Animesh Maurya
 
B

Bob Masta

Jan 1, 1970
0
Hi Bob,

I saw your site earlier also, but never came across those interesting
tutorials.

I read first part and appreciated it a lot, you started from where
books usually stop.

Concepts of imaginary plane and negative frequencies always baffles me
a lot, infact everything goes in imaginary mind, round and round and
round…………

Note that I avoided the imaginary plane stuff. This is an unneeded
complication when you are trying to understand what is really
going on, although it has a certain charm for the mathematically
inclined. My own casual experience is that many people who
appear to have mastered the imaginary math and integrals don't
really have a clue what is actually going on at the level of "doing
the work". I recall having a gentle debate with a physicist who
seemed to think that FFTs actually used e to imaginary powers
in the computation!
I hope after complete reading a learner like me will get benefited to
really handle those real world problem.

Please put on the source code of those crisp plot, so the reader can
tweak it to learn more, are those MATLAB one.

No source code. All plots are from Daqarta for DOS, which
you can download for free. If you use only the DEMO.ADC
driver instead of a sound card, there is no time limit or
registration required. You can use the built-in STIM3A
signal generator to try different test signals and see what
their waveforms, spectra, spectrograms, histograms, etc
look like. I've tried to include a fair amount of tutorial
info in the built-in Help system.

Note, however, that Daqarta for DOS runs only in
real-mode DOS, so you need Win9x or earlier...
not NT, 2K, XP, etc.

You can also download DaqGen for Windows,
which is freeware. This is like an enhanced STIM3A
signal generator that works with any Windows sound
card, and also includes waveform and
spectrum displays. The next version (in a week or two,
hopefully) will include signal averaging and histograms.
Eventually (several months) Daqarta for Windows
will include this functionality as a subset, and will
allow analysis of inputs as well, just like Daqarta for DOS.

Hope this helps!


Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
 
R

Rich Grise

Jan 1, 1970
0
Bob Masta said:
On 14 May 2004 01:04:10 -0700, [email protected] (Animesh
Maurya) wrote:

Note that I avoided the imaginary plane stuff. This is an unneeded
complication when you are trying to understand what is really
going on, although it has a certain charm for the mathematically
inclined.

I disagree. It helped me immensely to understand what is going on,
especially when talking about phase. The sine and cosine plot nicely
on a polar coordinate plane, and you can draw an impedance with a
line segment at an angle. So when you put an AC signal on a pure
resistance, the point in question just bounces back and forth on
the X axis, but if there's reactance, there's an up-and-down
component. And to visualize the time domain, just imagine a dot
moving around in a circle, or maybe an ellipse, if it's nonlinear
or something.

At least, that helped me.

Good Luck
Rich
 
A

Animesh Maurya

Jan 1, 1970
0
[email protected] (Bob Masta) wrote in message
Thanks for those encouraging words.

Bob, once you told me that your software works only with ISA sound
card, so did you fixed your software to work with PCI sound cards this
time, just want to know from you? I should check your too.

Best regards,
Animesh Maurya
 
B

Bob Masta

Jan 1, 1970
0
Thanks for those encouraging words.

Bob, once you told me that your software works only with ISA sound
card, so did you fixed your software to work with PCI sound cards this
time, just want to know from you?

DaqGen is a true Windows program, so it doesn't care whether the
sound card is ISA or PCI, as long as it has a Windows driver (as all
sound cards do these days!). The same for Daqarta for Windows,
when released.

The problem with Daqarta for DOS is that there are no standards for
DOS sound drivers, so I had to write everything from scratch. That
typically took weeks for each sound card family, considering that
manufacturer's were less than forthcoming with thier documentation.
That's why I only supported a few sound card families.

Regards...





Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
 
B

Bob Masta

Jan 1, 1970
0
I disagree. It helped me immensely to understand what is going on,
especially when talking about phase. The sine and cosine plot nicely
on a polar coordinate plane, and you can draw an impedance with a
line segment at an angle. So when you put an AC signal on a pure
resistance, the point in question just bounces back and forth on
the X axis, but if there's reactance, there's an up-and-down
component. And to visualize the time domain, just imagine a dot
moving around in a circle, or maybe an ellipse, if it's nonlinear
or something.

At least, that helped me.

Good Luck
Rich

My focus was more on understanding what actually
goes on in an FFT. The real/imaginary treatment
doesn't lead (for me, anyway) to an intuitive grasp
of the mechanics, which use sine/cosine multiplication.
It's not obvious to newcomers how to go from the
texbook's complex FFT representation to real hardware
or software, but in fact the actual mechanics involve
nothing more than the "product of sinusoids" formulas
you got in high school.

Regards,



Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
 
R

Rich Grise

Jan 1, 1970
0
My focus was more on understanding what actually
goes on in an FFT. The real/imaginary treatment
doesn't lead (for me, anyway) to an intuitive grasp
of the mechanics, which use sine/cosine multiplication.
It's not obvious to newcomers how to go from the
texbook's complex FFT representation to real hardware
or software, but in fact the actual mechanics involve
nothing more than the "product of sinusoids" formulas
you got in high school.

Apparently, I was answering the wrong question. :)

Yeah, a polar diagram probably doens't help much with FT;
but for that I found that just a plot kinda helps. And,
of course, when I asked someone more knowledgeable than
I how the sidebands of an FM signal are _only_ at the
harmonics of the modulating waveform, he said, "It's the
Fourier Transform." Which kinda wrapped it up for me.

Cheers!
Rich
 
Top