×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Math for balanced mixer...

Math for balanced mixer...

Math for balanced mixer...

(OP)
Can anyone provide me with the math for a balanced mixer.  I looked thru all of my old textbooks, and can only find the math for a simple mixer.  I.e., 2 * Cos(A) * Cos(B).

Thanks.

RE: Math for balanced mixer...

(OP)
Hi nbucska, thanks for the reply.  However, the MC1496 is actually a double-balanced mixer.  Otherwise known as a Gilbert Cell mixer, named after Barrie Gilbert.  I have a 1975 datasheet for this part, having used many of them in the past, and still have a few dozen kicking around in the junk box.  The 1975 datasheet clearly describes this as a double-balanced mixer.

Also, the equation I am looking for would have the result expressed as the product of 2 trig functions plus some other stuff.

Thanks for trying.

RE: Math for balanced mixer...

The literature I quoted has the equations for both
high and low level signals. What do you need or what is
your application ? You could use SPICE or you could
write a simulation using an ideal xistor easily enough.

 

<nbucska@pcperipherals.com>

RE: Math for balanced mixer...

(OP)
Hi nbucska,
My application is a carrier suppressor after frequency shifting for a medical monitor.
Yes, I could do it in Spice, but can't get the data required for this application.  I need to do a mathematical analysis to prove my theory.  The application will be done with a DSP, so transistor simulation doesn't help.  I need a "raw" math equation.

Thanks for any help you can give.

Lewis

RE: Math for balanced mixer...

I'm confused, isn't what you're asking for in Eq. 13 or 15 or 16 on the datasheet?  Eq. 15 shows a product of 2 cosines, while 16 is re-written as a quadrature form?

TTFN

RE: Math for balanced mixer...

(OP)
I guess I am doing a poor job of explaining the problem.  I want to replicate a balanced mixer inside a DSP.  No transistor parameters involved.

The equation for a simple mixer is 2 * Cos(A) * Cos(B) which yields Cos(A+B)+Cos(A-B).  This is what you see in Eq. 13 with the emitter resistances and the long-tailed pair resistance thrown in.  I.E. the "RE" and the "Re".

Doing away with any reference to the behavior of a bipolar transistor, what does the equation for a balanced mixer look like?

RE: Math for balanced mixer...

The mixer works better if it is overdriven -- i.e. the signal levels are high.
 
It has two diff. inputs: A to xtors 1-2-3-4 and B to xtors 5-6.I suggest to assume at least signal A to be very high
relative to Vbe (~.65 V).

For very large positive A:
For small signals the output voltage is B*Rc/Re where Rc
is R from Coll to coll and Re is from Em to Em.

For large signal the output is square wave with the
amplitude of Iem*Re (iem is one emitter current).
For intermediate: trapesoidal with a limited rise/fall time.

The effect of overdriven A is to multiply B*Rc/Re with
F(A)= sign(A) where F(A)=1 if A positive, -1 when negative
and never 0 ( assume A to be so high that it crosses 0
 "instantly".)

I hope your DSP is fast enough. If not : Do U have to do it
in real time or can U do it on stored data ?


<nbucska@pcperipherals.com>

RE: Math for balanced mixer...

(OP)
To nbucska et all, I know how the 1496/1596 works.  I have used lots of the 1596 in military projects.  I want to know how to duplicate a balanced mixer in DSP code.
Yes, I have to do it in a DSP.  The signal is a 55 KHz signal that has been sampled at 40 Megasamples/second.  After a 100:1 decimation, I have plenty of time to process the data.
So...., the question still remains, what is the algebraic equation for a balanced mixer, independent of how it is implemented.  The equation 2*Cos(A)*Cos(B) does not depend on electronic components to work.  This is a pure Communication Theory question.  No electronics necessary.  Just like a Fourier Transform is not dependant on electronics to work.

RE: Math for balanced mixer...

To simplify: Pick a gain for signal B;  with this the output
is Vout=G.B.  

With signal A included: Vout= sign(A)* G * B
where sign() is define as +/- 1 with the sign of A.

If this is not enough, perhaps we should know more about
your problem.



<nbucska@pcperipherals.com>

RE: Math for balanced mixer...

Doesn't your forumala depend on what nonlinear method you choose for modulation?  I am looking through my Analog and Digital Communication Theory book, and they show a circuit for a square-law (balanced) modulator.  The point is that the balanced modulator is designed using the effects of a nonlinear device / circuit.

Basically, the block diagram is:

s(t) -> [summer with cos 2*PI*fc*t] -> [Nonlinear]

-s(t) -> [summer with cos 2*PI*fc*t] -> [Nonlinear]

where both outputs are then summed together and sent through a bandpass filter.

Hopefully, this will help.

RE: Math for balanced mixer...

(OP)
nbucska, the equation you give is for a synchronous detector mixer.

Please see the previous post.  I have an amplitude modulated 55KHz signal and I want to mix it with a 55KHz carrier and extract the sum and difference signals without the 55KHz carrier.  A double or triple balanced mixer would be better, but I don't think I have the processing time to implement those.

RE: Math for balanced mixer...

Melone: The switch/(abs.value)/sign() is equivalent with
a polynomial of even degree (2,4,6,8,etc )i.e. nonlinear!!

Lewish: use B=55KHz AM, A=55KHz CW. You will get abs(B)
if the 55 KHz-s are in sync. You could get the same with rectification.

In circuit you would use a PLL to generate "A".

<nbucska@pcperipherals.com>

RE: Math for balanced mixer...

(OP)
Hi melone, thanks for the input, but a balanced mixer doesn't have to be square-law or non-linear.  That is just the most common way to do it.  Jones of Honeywell filed in 1963 and received in 1966 a patent on a linear mixer based on feedback.  Unfortunately that is too far back to be online to read.  The concept was actually originated back around 1918-1925, but at that time there was no way to implement it as tubes are very non-linear.  I am old enough to have played with tubes, and still have a few in stock.

I didn't realize when I started this thread that it would be this hard to find an answer.

RE: Math for balanced mixer...

Hi Lewish,

I had a look in some text books and found the circuits for the balanced mixer and double balanced mixer.   There were no equations given with either other than the classic product of cosines you gave above.   In terms of the desired outputs from the mixer (sum and difference frequencies) they are the same.  Do you want the DSP to mimic an ideal mixer or replicate the actual (including non-ideal) behaviour of a balanced mixer?  

RE: Math for balanced mixer...

(OP)
Hi brennaj,  I want the DSP to mimic an ideal linear balanced mixer.  The result would be the sum and difference between the signal and the carrier, with the carrier canceled.  The equation I gave above lets the carrier come thru also.

I have at least 5 textbooks on communication theory, and not one gives anything but the above equation.  I wonder why.  Someone told me that in the 1930s and 40s engineers knew how to derive all this stuff and it wasn't printed in the texts.  I guess my college education was a little lacking, OR maybe I didn't pay close enough attention.

RE: Math for balanced mixer...

I did the math and I don't see any carrier term.  Check this:

cos(A+B)=cosAcosB-sinAsinB  (Eq 1)
cos(A-B)=cosAcosB+sinAsinB  (Eq 2)

Add Eq 1 to Eg 2

cos(A+B)+ cos(A-B)=2cosAcosB

Divide both sides by 2

0.5(cos(A+B)) + 0.5(cos(A-B))= cosAcosB

 

RE: Math for balanced mixer...

Hi Lewish,
My approach to model the balanced mixer would be to go all the way to the diode equation. A single diode mixer would look like I = esp(qV/nkT) - 1, where V is your A + B. Let's let qV/nkT = x.
Then the equation for the balanced mixer would be:

I = [exp(x) - 1] + [exp(-x) -1]

For the balanced mixer the odd powered terms cancel and the even powered terms remain.

Hope this helps.

RE: Math for balanced mixer...

Brennaj:
Your eq. shows that in the case of overmodulation the carrier disappears.

For general case Y= cos(A) * ( 1 + cos(b)) where B is
the modulation and A the carrier.

Lewish:
If you want synchronous demodulation,
set up an oscillator and at every 0-xing of the input
 measure the phase error and use this to keep the osc. in  
 sync (PLL)  Use PID control in the PLL !

Rectify it syncronously ( invert whenever the OSC <0 ):
-----------------
The zero-xing:
Whenever a sample has different polarity from the previous one. If sample rate is small, you may use linear interpolation to calculate the time of 0-xing.

<nbucska@pcperipherals.com>

RE: Math for balanced mixer...

Nbrucksa:

I don't think we're comparing apples to apples here.

The equation in the original post 2cosAcosB is the mixer equation and yields double side band suppressed carrier modulation.  There is no carrier term as the math shows.

cosAcosB = 0.5cos(A+B) + 0.5cos(A-B)

This latest equation Y=cosA(1+cosB)is for standard amplitude modulation or double sideband with carrier modulation.

cosA(1 + cosB) = cosA + 0.5cos(A-B) + 0.5cos(A+B)

These are two different modulation types.   

RE: Math for balanced mixer...

1)  Sorry Nbucska I spelled your name wrong in my last post.

2) Lewish:  I found this is an old scribbler of course notes I have.  Assume cosA is the input and cosB is the local oscillator.

Single Balanced Mixer (2 diodes)
The simple mathematical explanation is the input cosA is multiplied by a square wave of frequency B.  Obviously it won't exactly be a square wave but it will be a periodic signal with a dc offset due to only two diodes (so there is an average value in the fourier series).  Assuming a square wave the mixer outputs are cosA plus DSBSC of cosA at B, 3B, 5B etc with decreasing amplitudes according to the fourier series of a square wave.


Double balanced mixer (4 diodes)   
Same cosA input multiplied by same pseudo-square wave of frequency B except this time the pseudo-square wave has no dc offset (average =0) due to 4 diodes.  So the mixer outputs are DSBSC of cosA at B, 3B, 5B etc.

The difference between the two is the inherent suppression of the unwanted cosA term in the double balanced version.  Obviously filtering is required to extract the desired signal, bandpass for the single balanced and low pass for the double balanced.

Note I used a square wave to make the math simple.  Suffice to say that the signal multiplied by cosA will be a periodic function which will have a dc offset for the single balanced case and none for the double balanced case.   So the real fourier series of that signal may contain even harmonics.  It just means DSBSC of cosA at those frequencies as well.  Either way they are unwanted signals.

Hope this helps.

 
  

RE: Math for balanced mixer...

(OP)
Update Time.
 Here is what I have done so far.  I created a one million sample file of a 55KHz signal in cosine form.  Call it Cos(A).  I did a FFT of this file in Matlab and verified that I have only one signal.  Then I created a second file of the same signal but with a 3 Hz modulation on it.  Again I did a FFT and verified that only 2 signals existed.  Call this Cos(B).  Then using Matlab, I did 2*Cos(A)*Cos(B) to create the mixer output file.  When I did a FFT of this file I see 3 signals - one at 3 Hz, one at 55KHz and one at 110.003KHz.
From this I conclude my reference book is correct that the equation 2*Cos(A)*Cos(B) is indeed the equation for a simple mixer.

So, what is the equation for a balanced mixer where there is no carrier term in the output?  
Please no replies about modeling diodes or transistors or other non-linear devices.  I don't have the resources in the DSP to do that, and I don't think I should need to do it.

RE: Math for balanced mixer...

"I have an amplitude modulated 55KHz signal and I want to mix it with a 55KHz carrier and extract the sum and difference signals without the 55KHz carrier"

What I get from the above is you have a 55kHz carrier with two sidebands and you want to extract the sidebands and ditch the carrier.

You last post indicated that when you modulated the 55kHz carrier with 3Hz, the FFT gave two signals - I assume at 54.997kHz and 55.003kHz.  So the amplitude modulation you did in Matlab was suppressed carrier - just a straight mixing of 3Hz and 55kHz -is that right?  Otherwise I would have expected 3 terms, i.e a 55 kHz carrier as indicated above.

Assuming signals at 54.997 kHz  and 55.003 kHz and then mixing these (mathematically) with 55kHz  I get 109.997kHz, 110.003KHz and 3 Hz.  I don't get anything at 55kHz.

By the way when I did the same thing assuming a non supressed carrier I get 3Hz, 109.997 kHz, 110kHz and 110.003kHz - still no 55kHz

Are you sure you aren't getting any artifacts from the FFT?   

This is probably not helping with your problem or your patience but I'd just like to make sure we're talking about the same thing.

 



   

RE: Math for balanced mixer...

(OP)
Hi brennaj, thanks for the reply.  A staight modulated carrier should contain 2 terms only.  In my case 3 Hz and 55KHz.  That is what I see in the FFT in Matlab.  Maybe I am using the term modulation incorrectly here.  What I have in the real world is an oscillator putting out a very pure 55KHz sinewave.  In the setup, a 3 Hz signal is being impressed onto the 55KHz carrier.  They are not being mixed, so I don't expect to see the 2 sidebands you refer to.  My FFT extends out to 1MHz, and I only see these 2 signals on the sampled waveform.
Since the amplitude of the 55KHz is variable, not due to modulation, just random noise, I want to run the signal thru a mixer to strip off the 55KHz and leave the 3Hz signal and some other signal which will be removed by filtering.
Any additional thoughts would be appreciated.

RE: Math for balanced mixer...

Give me a bit more info.  How is the 3Hz being modulated on the 55KHz or are they being modulated at all, perhaps just added?  Is the '3 Hz modulation' being done on purpose or is this the problem you are dealing with?

Maybe you could post the mathematical equation of the 'signal'  - ie 55kHz plus the 3Hz 'modulation'

I know this isn't getting you closer to your answer but I'd like to understand the problem you're trying to solve.   

RE: Math for balanced mixer...

(OP)
Hi brennaj, OK, lets see if this helps any.  The 55KHz is a differential signal impressed across a human body.  As blood flows, it changes the impedance presented to the drive signal.  This changes the voltage across the body, which is then seen by a differential amplifier acting as the receiver.  The body's impedance as we are connected is typically about 3Kohms.  This value will change by about 3 ohms as blood is pumped.  From this it is possible to estimate the volumetic efficiency of the heart.  This is an oversimplified explanation.  The "modulating signal will of course change with the heart rate.  One Hz being a more typical signal.  Because of the tiny signal levels involved, I am not sure whether simple addition or AM modulation is occuring.  That is part of what I am trying to resolve.  But either way, I think a balanced mixer should strip off the 55KHz carrier.  Yes - No??
Thanks for you input.

RE: Math for balanced mixer...

Actually not... What you are describing is conventional heterodyne AM detection, which is mixing the AM signal with the local oscillator at the carrier frequency, which results in the baseband signal and the AM signal shifted up by the LO frequency.  You then have to run through a lowpass filter to get the baseband by itself.

from your description, the process is essentially AM modulation x(t)*cos(2*pi*f*t), except that x(t) is 1/Z(t), where Z(t) is the impedance function.

The following article describes AM demodulation:
http://umech.mit.edu/weiss/PDFfiles/lectures/lec23wm.pdf

TTFN

RE: Math for balanced mixer...

(OP)
Hi IRstuff, thanks for the math to prove that the resultant signal from the body is indeed AM modulated.  What I believed, but hadn't arrived at a proof for.

RE: Math for balanced mixer...

Lewish:
Based on your explanation of the system I agree with IRStuff's logic that the 55kHz signal is amplitude modulated by the 1 to 3Hz "tone".  The spectrum of that is a 55kHz tone and two sidebands.  Assuming you want to recover the 1 to 3Hz tone the simplest method is an envelope (peak) detector - can you implement that in a DSP?

The balanced mixer(with a synchronous LO) would work as well with a low pass filter as both you an IRStuff said but from an electronic standpoint the peak detector is far easier.  From a DSP standpoint - I couldn't say as I'm no expert

RE: Math for balanced mixer...

The other choice with DSP is to digitize and brute force filter in the digital domain.

TTFN

RE: Math for balanced mixer...

Lewish:
You have the oscillator : Use it for synchronous demodulation in hardware. Why do it with DSP ?

You could make a PLL in DSP, but it would be less
accurate and more noisy that the osc. itself.

<nbucska@pcperipherals.com>

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources