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.
Thanks.





RE: Math for balanced mixer...
http://www.onsemi.com/pub/Collateral/AN531-D.PDF
<nbucska@pcperipherals.com>
RE: Math for 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...
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...
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...
TTFN
RE: Math for balanced mixer...
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...
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...
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...
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...
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...
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...
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...
I didn't realize when I started this thread that it would be this hard to find an answer.
RE: Math for balanced mixer...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
Thanks for you input.
RE: Math for balanced mixer...
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...
RE: Math for balanced mixer...
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...
TTFN
RE: Math for balanced mixer...
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>