# Non linear device with two frequencies

I got this on an interview question and I still don't know the answer.

What output will have a nonlinear device if we will give two random frequencies $f_1$ and $f_2$?

-
I don't even understand the question. What is it really asking here? "What output will have a nonlinear device .. "? Should it rather be What will the output be of a non-linear device if we give two random frequencies as input?? –  sherrellbc Jun 23 '14 at 15:32

The correct answer is that you don't know without more information about this non-linear device. Non-linear only rules out linear, but can otherwise mean anything else, including putting out a fixed signal regardless of the inputs.

To show that you understand the concept, you should explain that a linear device can produce at most only the frequencies put into it. It can change the amplitude and phase angle of the input frequencies, but it can't create new ones. It could, for example, attenuate either or both frequencies well past the noise floor, so even for a linear device, the answer is none, one, or both of the input frequencies.

What they were probably after with this question is for you to say that the non-linear device can produce additional frequencies beyond those you put in. If the non-linear device happens to include a product term, as Leon is apparently assuming, then you will get the sum and difference of the two frequencies included in the output.

-
+1 While this is a technically accurate answer, it is a bit pedantic. The OP didn't specify the context of the question besides "in an interview", so I understand why you answered this way. I know that if our company had asked this question in an interview, we would prefer an answer like your last sentence. –  TimH Jun 23 '14 at 15:27
@TimH: Actually it could be a good question to see if someone just gives the knee-jerk answer you are assuming, or actually thinks about the question and gives the more general correct answer. I'd answer like I did in the first two paragraphs, but point out that for a product-multiplier you'd get the sum and difference terms, just in case the interviewer is the one making knee-jerk assumptions and doesn't recognize the correct answer for what it is. Dumb interviewers is just as much a problem as dumb interviewees. –  Olin Lathrop Jul 3 '14 at 20:27

In general, you will get:

• the two original frequencies f1,f2
• The sum and difference of the two frequencies f1 + f2, f1 - f2 (aka intermodulation products)
• The harmonics of each of the two frequencies (f1*2, f1*3, f1*n, f2*2, f2*3, f2*n, ...)
• Harmonics of the intermodulation products
• Intermodulation products between any of the above and any other component

TL/DR : a mess.

In practice while you can get all of these, the amplitudes of many of them may be negligibly low or actually zero, depending on the form of the nonlinearity.

One special case is a perfect multiplier or balanced mixer with one carrier on each input. This produces the sum and difference on the output, and nothing else.

Another special case is a device with a square law or quadratic transfer function (vacuum tube triodes and some FET amplifiers can approximate this) - you will get the original frequencies, the sum and difference, and almost purely second harmonics only. Makes for a good guitar amp or an overpriced "audiophile" hi-fi system...

And so on.

-

Do you understand what happens when you put a single frequency into a nonlinear device?

In general, putting any single frequency into a nonlinear device will produce harmonic distortion, which means that you'll see additional frequency components at the output that are integer multiplies of the input frequency.

If you put two frequencies into the nonlinear device, you'll not only get harmonic distortion on each of those frequencies, but you will also get intermodulation distortion, which means you'll also see energy at frequencies that are the sums and differences between all of the possible combinations of the two original frequencies and their harmonics.

In RF circuits, the latter effect is sometimes used deliberately (in conjuction with bandpass filters) to translate signals from one frequency band to another.

-

if f1 and f2 is fed to a non linear transfer function, the output will be the sum of products of f1 and f2 and its harmonics

(f1)(f2)(f1+f2)(f1-f2)(f2-f1)(2f1+2f2)...(3f1+3f2).....infinity

this how rf mixers work

-
This is the common knee-jerk answer, but is not necessarily correct. You are assuming a certain type of non-linear system. A multiplier gives you the sum and difference frequencies. That is certainly a non-linear system, but not all non-linear systems are multipliers. –  Olin Lathrop Jul 3 '14 at 20:32
yes you are correct, but on an interview context the knee jerk answer is usually the best response. –  jun magno Jul 3 '14 at 21:32
Not when I'm the interviewer. –  Olin Lathrop Jul 4 '14 at 11:03
..............Nice! –  jun magno Jul 4 '14 at 15:49