Author Topic: Mathematics of mixers  (Read 5696 times)

0 Members and 1 Guest are viewing this topic.

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Mathematics of mixers
« on: August 20, 2018, 11:41:20 pm »
This is a nit-picky question.

The standard mathematical representation of a mixer is the product of the input signals. So, if one input is v1(t) = V1sin(w1(t)) and the other input is v2 = V2sin(w2(t)), where Vi is the amplitude of the ith input signal (i=1,2) and wi is the frequency of the ith input signal, then the mixed signal is represented as:

V1sin(w1(t)) * V2sin(w2(t)).

However, the mixer output is a voltage, whereas the quantity specified above has units voltage squared. So, it seems this simple mathematical representation is missing something, say a square root somewhere. For example, the mixer equation might be:

sqrt(V1)sin(w1(t)) * sqrt(V2)sin(w2(t))

This would result in an output signal with the appropriate units.

Any signal analysis experts out there who care to comment?
 

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: us
Re: Mathematics of mixers
« Reply #1 on: August 21, 2018, 12:06:19 am »
I consider any signal represented on a block or signal-flow diagram to be effectively dimensionless, abstracted away from the physical implementation.  A signal could be a voltage signal, a current signal, or something else.
 

Offline rfeecs

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
Re: Mathematics of mixers
« Reply #2 on: August 21, 2018, 12:14:28 am »
You might look at this app note on analog multipliers:
http://www.analog.com/media/en/training-seminars/tutorials/MT-079.pdf
They describe the output as Vout = (Vx * Vy) / K.  K is a scale factor that takes care of the units.

In a real RF mixer, the situation is more of the RF is being switched on and off by the LO.  So you are multiplying a sine wave by a square wave.  This classic app note gives some of the math:
http://www.rfcafe.com/references/articles/wj-tech-notes/Mixers_in_systems_part1.pdf
 

Offline Doc Daneeka

  • Contributor
  • Posts: 36
  • Country: it
Re: Mathematics of mixers
« Reply #3 on: August 21, 2018, 02:40:47 am »
Mathematically the argument of trig functions is dimensionless (angle) and their value is dimensionless, this is for any transcendental function. that mixer function is dimensionless. Units are just a linear scale factor - you dont need to do anything to make the output units 'right' - you can scale by anything you want, sqrt(V), V, V^2018 anything
« Last Edit: August 21, 2018, 02:46:09 am by Doc Daneeka »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Mathematics of mixers
« Reply #4 on: August 21, 2018, 02:48:42 am »
Right, the units wouldn't work out.  That's why there's a gain coefficient with units of V/V^2 on such a multiplier. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5226
  • Country: us
Re: Mathematics of mixers
« Reply #5 on: August 21, 2018, 04:19:26 am »
I agree with OP.  There is a subtle truth here, the output of a mixer is proportional to power.
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Mathematics of mixers
« Reply #6 on: August 21, 2018, 05:31:21 am »
I agree with OP.  There is a subtle truth here, the output of a mixer is proportional to power.
Proportional to the power of what exactly?

  As has been said, you can measure the output of the mixer in volts, so units is volts, transistors doesn't care for units, that's just out convention to agree on something, they just take the input signal and do whatever they are set up to do.

  Now, if you feed the same signal to both inputs of an ideal mixer now you will be seeing something proportional to the instantaneous power of that signal, as the math happens match that. But if the signals are different you are just half way to find one point of the intercorrelation between both signals, if you integrate the output from start to finish of the universe, you have a single point of the autocorrelation of both signals, the point of t=0. Or, at any point, you have the product of both signals which is what you are usually interested when you placed a mixer in the circuit.

JS
If I don't know how it works, I prefer not to turn it on.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Mathematics of mixers
« Reply #7 on: August 21, 2018, 09:18:39 am »
Proportional to the power of what exactly?

Hrm, it would be the geometric average of the two voltages, as applied to a resistance say.

So,
V^2 / R = P
where
V = sqrt(V1*V2)

This doesn't explain how you get a voltage back out again, or what the resistance is.  Again, those are just unit conversion constants... :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Neganur

  • Supporter
  • ****
  • Posts: 1138
  • Country: fi
Re: Mathematics of mixers
« Reply #8 on: August 21, 2018, 11:12:09 am »
sin(a) * sin(b) = 1/2 * (cos(a-b) - cos(a+b))

not sure I understand the question oh I see, v(local oscillator) * v(rf),  voltage squared is the issue?

they are just magnitudes
« Last Edit: August 21, 2018, 11:25:13 am by Neganur »
 

Offline xaxaxa

  • Regular Contributor
  • *
  • Posts: 248
  • Country: ca
Re: Mathematics of mixers
« Reply #9 on: August 21, 2018, 11:13:50 am »
I don't think most real-life mixers are actually multipliers; the LO port is distinct from the RF/IF port and is generally amplified to saturation before driving either diode switches or FET switches. I think a better model is a inverting/noninverting amplifier with a digital input that determines whether it inverts.
Although there are analog mixer ICs but those cost orders of magnitude more...
 

Online CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5226
  • Country: us
Re: Mathematics of mixers
« Reply #10 on: August 21, 2018, 01:20:08 pm »
The ability to measure the output in volts is a red herring.  Think of a multplier chip with both inputs fed by the same voltage.  Output is voltage squared, which is proportional to power.  Details will involve impedance of the input (which determines power at input) and impedance of the load on the output, which determines proportionality constant.

In mixers which saturate on one of the inputs the simple equation no longer applies.  The v on that leg is no longer relevant, only the saturation voltage.  But even there a power interpretation is not wrong.  All other things being equal the output of a mixer run on ten volts will be greater than one run on five.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3238
  • Country: gb
Re: Mathematics of mixers
« Reply #11 on: August 21, 2018, 01:35:54 pm »
I don't think most real-life mixers are actually multipliers; the LO port is distinct from the RF/IF port and is generally amplified to saturation before driving either diode switches or FET switches. I think a better model is a inverting/noninverting amplifier with a digital input that determines whether it inverts.

That pretty much defines the difference between a mixer and a multiplier.
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Mathematics of mixers
« Reply #12 on: August 21, 2018, 04:03:46 pm »
The reason I asked this question is I am studying the principles behind heterodyne based phase noise measurements of oscillators. It is pretty standard in the mathematical formulation of the problem to represent the mixer as the product of the output of the two oscillators (for example, see section 8.9.1 in Time and Frequency: Theory and Fundamentals). I think they model a mixer as a multiplier because they don't want to get bogged down in the mixer details, e.g., whether it is a diode double balanced mixer, a gilbert cell mixer, etc.

In any case, the literature in this field has settled on this model, so I am trying to understand how to use it appropriately. So far, the most promising approach was suggested by rfeecs, who referenced this tutorial. Since the mixer introduces conversion loss/gain, wouldn't it be possible to introduce a constant Kmixer that has units Volts-1 and use it as a multiplier? That is,

Mixer output = Kmixer*V1sin(w1(t)) * V2sin(w2(t))

From what I have read, the conversion loss for a passive mixer is normally on the order of 5 dB to 10 dB, which would put K in the range of .56 to .1. Any reason why this would not work?
 

Online CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5226
  • Country: us
Re: Mathematics of mixers
« Reply #13 on: August 21, 2018, 05:03:59 pm »
I think it would work with the caveat that conversion loss is probably in dB power (10 log 10) and you may need a factor of two to get where you are headed.
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Mathematics of mixers
« Reply #14 on: August 21, 2018, 10:48:54 pm »
I think it would work with the caveat that conversion loss is probably in dB power (10 log 10) and you may need a factor of two to get where you are headed.

Good point. Thanks.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Mathematics of mixers
« Reply #15 on: August 22, 2018, 12:12:18 am »
Right, multiplication works to the first order but real mixers are higher order, usually a few exponentials thanks to semiconductor diodes.

If you consider the transfer function of a diode in terms of its Taylor series, the terms go as x^n / n! (for the exponential).  Put a sinusoid in, and you get powers of sines, which once you apply trig identities (polynomial in sin^n x <--> polynomial in sin n*x), gives harmonics.

Because the terms get smaller as the order (n) increases: for small inputs, the first few terms dominate.  We can approximate it as a parabolic section, i.e., of the form x^2, give or take a constant offset, a linear error and a gain term (out = gain * x^2 + linear * x + offset).

So if we use a single diode as a mixer for small signals, we can use this approximation, and it acts as a multiplier.

(More specifically, when you apply two sinusoids -- two frequencies, that is -- you get the sum and difference frequencies, as well as the 2nd harmonics.  This is just as easy to show with trig identities, it's just that much more tedious.. :P )

Conversely, when the input is large, the higher order terms dominate, and you get higher harmonics, IM3 and so on.  You can calculate IM3 intercept this way, for example, by equating the amplitude of terms (after doing the trig transform, mind).

As it happens, there are many downsides to operating in the small signal regime.  It's better to overdrive one port, which makes the mixer more like a switching element.  Indeed, the LO port (voltage) waveform will be a sloppy square wave, in a typical (over-driven LO, under-driven RF) balanced diode mixer.

The biggest downside is probably that you can't guarantee a very strong RF signal won't show up and overdrive your LO -- in other words, you don't get a linear response, well, a bilinear response to be more precise, over as much range as you can get otherwise.  Total dynamic range is set by thermal noise at the bottom, and nonlinearity at the top (typically in terms of compression and IMD).  Probably also, impedance is too high for practical bandwidth purposes (diode impedance is inversely proportional to forward current), and for introducing yet more insertion / mixer loss (in addition to the ideal ~6dB mixer loss you are expecting).

Likewise, the downside for overdriving the mixer is you need to deal with all the harmonics and higher order mixing products.  This is overall better: a strategic change, rather than having to somehow figure out a better circuit.  The usual choice is to pick your LO above the tuning band, such that the band width lands neatly between LO harmonics and IF lands well below the RF band.  Thus keeping images at maximum distance where they can be filtered effectively.

The double downside is, if you want a truly vast tuning range (like for a spectrum analyzer), you need IF either at zero (direct conversion) (or in whatever gap is left below the RF band, if your RF doesn't include DC), or IF above RF, and LO that much further above.  Which is very demanding on LO range, stability and purity!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Mathematics of mixers
« Reply #16 on: August 22, 2018, 02:18:52 am »
V1sin(w1(t)) * V2sin(w2(t)).
Technically, it's V*sin(wt), not V*sin(w(t)).  The frequency is constant, not a function of time, and the sine is a function of an angle, not a frequency.

As for the units... Given a phase offset p2 (with p1 = 0):

V1sin(w1t)*V2sin(w2t+p2)
 = V1V2sin(w1t)sin(w2t+p2)
 = V1V2*1/2[cos((w1-w2)t-p2) - cos((w1+w2)t+p2)]
 = 1/2*V1V2cos((w1-w2)t-p2) - 1/2*V1V2cos((w1+w2)t+p2)
 = 1/2*V1V2sin(π/2-(w1-w2)t+p2) - 1/2*V1V2sin(π/2-(w1+w2)t+p2)
 = 1/2*V1V2sin(π/2-(w1-w2)t+p2) + 1/2*V1V2sin((w2-w1)t+p2-π/2)

To answer your question, it's easy to see why the unit of the 1/2 factor must be V-1 ("per volt").

As you can see the mixing is a little more complex than just multiplying the magnitudes as you get two mirrored cosine products.  These are called side bands; one is the upper side band the other the lower side band.  The phase difference carries through to both side bands.  (As a result, if it's unimportant relative to the input it's constant and can be dropped for convenience.) The spectrums of the two side bands are mirrored (a low spur in the USB becomes a high spur in the LSB and vice versa).

Oh, and note: the phase difference is NOT a reactive AC phase (between voltage and current).  It's purely a relative signal phase!
« Last Edit: August 22, 2018, 02:28:36 am by bson »
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Mathematics of mixers
« Reply #17 on: August 22, 2018, 03:18:48 am »
V1sin(w1(t)) * V2sin(w2(t)).
Technically, it's V*sin(wt), not V*sin(w(t)).  The frequency is constant, not a function of time, and the sine is a function of an angle, not a frequency.

Yes, I failed to proof the equation. I also should have written v2(t) = V2sin(w2t), not v2 = V2sin(w2(t)).

As for the units... Given a phase offset p2 (with p1 = 0):

V1sin(w1t)*V2sin(w2t+p2)
 = V1V2sin(w1t)sin(w2t+p2)
 = V1V2*1/2[cos((w1-w2)t-p2) - cos((w1+w2)t+p2)]
 = 1/2*V1V2cos((w1-w2)t-p2) - 1/2*V1V2cos((w1+w2)t+p2)
 = 1/2*V1V2sin(π/2-(w1-w2)t+p2) - 1/2*V1V2sin(π/2-(w1+w2)t+p2)
 = 1/2*V1V2sin(π/2-(w1-w2)t+p2) + 1/2*V1V2sin((w2-w1)t+p2-π/2)

To answer your question, it's easy to see why the unit of the 1/2 factor must be V-1 ("per volt").

I don't follow you. The 1/2 factors (there are two of them) are:

1/2*V1V2sin(π/2-(w1-w2)t+p2), and

1/2*V1V2sin((w2-w1)t+p2-π/2)

The unit of both are is Volts2, not Volts-1. Perhaps I misunderstand what you mean by "the 1/2 factor".
« Last Edit: August 22, 2018, 04:51:44 am by dnessett »
 

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: 00
  • mmwave RFIC/antenna designer
Re: Mathematics of mixers
« Reply #18 on: August 22, 2018, 06:19:46 am »
I think the key here is that mixers (or multipliers, depending on how you want to define them) are not multiplying voltages - they are multiplying signals, represented in your case by voltages. However, they could just as well be represented by currents (as is common when discussing Gilbert cell mixers) or power levels. Given in most cases your ports will be of a certain well-controlled impedance, you can just switch between these units with some basic math. You can't really keep the two signals with their units, and they become unit-less, and the unit is inside of the K factor.

The multiplication is just a simple way of representing it. Think of a very basic diode being used as mixer:

On the input we apply the sum of our signals:

$$ V_{in}(t) = V_{LO}(t) + V_{RF}(t) = v_{LO} \cdot \sin(\omega_{LO} t) + v_{RF} \cdot \sin(\omega_{RF} t) $$

If we use the Shockley diode equation, the output current is given by:

$$ I_{out}(t) = I_{S} \Bigg(\text{exp}\bigg(\frac{V_{in}(t)}{n V_{T}}\bigg)-1\Bigg)$$

This is then usually approximated with the Taylor series:

$$e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots $$
$$\text{exp}\bigg(\frac{V_{in}(t)}{n V_{T}}\bigg)- = 1 + \frac{V_{in}(t)}{n V_{T}} + \frac{\bigg(\frac{V_{in}(t)}{n V_{T}}\bigg)^2}{2!} + \frac{\bigg(\frac{V_{in}(t)}{n V_{T}}\bigg)^3}{3!} + \cdots $$

And that is how we get that typical multiplying behavior with all those harmonics. Note that unlike what some people have suggested, there are actually 'true' multiplying mixers that do not have all these harmonics, such as potentiometric mixers. But we then drive them hard for noise reasons, that all those harmonics are still on the output, not due to the mixer but because our LO is a square wave that has a bunch of harmonics itself.

But let me get back to the question at hand - where do the units go in the first place?

The Shockley diode equation actually gave us a clue. Look at all the units there, and you will figure out what is going on. Inside that exponential we have the input signal, units of Volt, that is divided by the thermal voltage, unit of, you guessed it, Volt. In other words, that entire exponential is a unit-less value. The unit of Ampere actually comes from this saturation current \$I_{S}\$, which depends on the design of our diode. So when we use the Taylor series (well, Maclaurin series) to give us the multiplying representation, we need to 'take into account' the fact that our value of x in the exponential has lost its unit, and thus the fact that it is squared doesn't give any strange squared voltages. I think it speaks for itself that you can just use your impedance to get from output current to output voltage, and all of this scaling and conversion is just lumped together in the \$K_{mixer}\$ term, as is the scaling you should do with the \$V_{T}\$ term.

Of course, this is just for a very simple diode mixer (not even a ring mixer, but literally just a diode), however, you will find that in other mixer types, you have similar conversions - for example in the potentiometric mixer, the LO the input voltage is converted into a conductance with the saturated mos equation, and then this conductance is multiplied with the second input voltage to give us the output current, which can then be turned into an output voltage using the output impedance of the system. Again, this is all captured in the \$K_{mixer}\$ term, and we just pretend our input signals are unit-less. you could, I guess, just say that the \$K_{mixer}\$ contains a 1/V term, but the reason we don't is because we are already making a lot of hand-wavy unit-ignoring assumptions - we pretend that DC term is not there, and that we only have only one output frequency, which we don't, and generally ignore any phase component, etc... So while we are at it, why don't we just ditch those units too?

EDIT: I'm fixing some of the math appearance








« Last Edit: August 22, 2018, 06:28:48 am by TheUnnamedNewbie »
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 
The following users thanked this post: T3sl4co1l

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Mathematics of mixers
« Reply #19 on: August 22, 2018, 06:26:02 am »

I don't follow you. The 1/2 factors (there are two of them) are:

1/2*V1V2sin(π/2-(w1-w2)t+p2), and

1/2*V1V2sin((w2-w1)t+p2-π/2)

The unit of both are is Volts2, not Volts-1. Perhaps I misunderstand what you mean by "the 1/2 factor".
Factors and their units:

1/2 is V-1
V1 is V
V2 is V
sin(...) is unitless

The product, 1/2*V1V2sin(...) is V-1V2

Which of course is V.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3481
  • Country: us
Re: Mathematics of mixers
« Reply #20 on: August 23, 2018, 01:17:43 am »
 A "mixer" performs a frequency shift. In the frequency domain, when you "mix" two signals, you're performing a convolution.  A convolution in either domain is a multiplication in the other.  It's been 30+ years since I took Integral Transforms I & II, but I'm fairly certain that this applies to all integral transforms, not just the Fourier variety.   They all involve an integration of a multiplication by an exponential kernel.

Whereas an analog mixer is unavoidably non-linear, you can do linear mixing in the discrete domain.  However, TANSTAFL, you've moved the error terms from the multiplier to the ADC and AFE. As a wild guess, Armstrong coined the term "mixer" and when Wiener et al  set to work they called it a "multiplier".  They pretty much had to as Fourier had already set the mathematical terminology 100 years before Armstrong invented the heterodyne concept.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf