Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Multiplying a complicated frequency

  1. Jan 12, 2012 #1

    Suppose I have a signal that is the sum of sin waves of varying frequencies. That is, the signal S(x) = Sin(ax) + Sin(bx) + ... where {a,b,...} are integers.

    Is there some kind of circuit or other mechanism that could multiply the frequency of the signal by some scalar λ? In general, I do not know what the signal is, or what the constants {a,b,...} are.

    I've read about circuits that multiply the frequency of a signal, but everything I saw only dealt with multiplying the frequency of a simple signals of the form a*Sin(b*x) with a,b real numbers. I cannot tell whether these types of circuits generalize to more complex signals with unknown frequency.

    I do not have a background in electrical engineering, so forgive me if my terminology is wrong. Let me know if my question is unclear. Thanks everyone.

  2. jcsd
  3. Jan 12, 2012 #2
    Hello Charles (edit that was confusing), welcome to Physics Forums.

    How much trigonometry have you studied?
    You cannot have a single frequency signal that the sum of two different sine waves

    [tex]\sin (a) + \sin (b) = 2\sin \frac{1}{2}\left( {a + b} \right)\cos \frac{1}{2}\left( {a - b} \right)[/tex]

    As you can see from this formula if you only have two different sine waves you get two new frequencies introduced. If you have many sine waves you get many frequencies.

    So your signal does not have a single frequency as soon as you introduce another sine wave.

    This phenomenon is called beat generation or intermodulation.
  4. Jan 12, 2012 #3


    User Avatar
    Science Advisor
    Gold Member

    Studiot, you may want to rephrase that, or maybe I am not reading you correctly. Summing two signals will not generate new signals.
  5. Jan 12, 2012 #4
    But a function f(x) = Sin(a) + Sin(b) is still periodic, correct?

    In more proper terminology, I suppose this means that I want to double the period between beats.

    I'm looking for a circuit device that, given input f(x), produces output g(x) such that g(x) = f(λx) for some integer λ.

    Thanks for your help,
  6. Jan 12, 2012 #5
    In post #1, first quotation, you say you want to multiply the frequency by an integer but in the second quote, post #4, you say you want to double the period. Which do you want to do?

    One way to multiply or divide your signal is to record your signal in static RAM and play it back at a different speed. There are two ways of doing that.

    1. To double the frequency you could double the clock rate at which the signal is played back from RAM.

    2. To multiply the frequency by N, N being an integer, just output every Nth byte from the memory.
    Last edited: Jan 12, 2012
  7. Jan 12, 2012 #6
    Sorry I was inconsistent. I want to either multiply the frequency, period or the wavelength. It doesn't matter - I'm trying to "mark" a certain signal by multiplying one of these characteristics by λ.
  8. Jan 13, 2012 #7
    You can convert it to the frequency domain, upsample or downsample it accordingly, and then convert back to time domain. If you just want to do it to an existing file of time domain data, then most audio editors (audacity, cooledit, goldwave, etc.) can do it for you.
  9. Jan 13, 2012 #8
    Just to clarify here is the result of adding sin(x) and sin(1.1x) :ie a=1, b=1.1

    The red trace is the sum of the sine waves.

    The blue trace is the single sine wave sin(ax) with a=1 for reference

    The green trace is the new frequency (beat) frequency that appears at 0.1 units and is cos((b-a)x). I have shown this as a cosine wave as this is in sync with the red wave as shown by my earlier formula.
    Charles is correct that you get a repetitive wavetrain at this frequency.

    Charles, if you would like to clarify exactly what you are trying to achieve we can help more.
    Please let us know if you need a hardware or software solution and can the signals be sampled (digitised) for processing, either in hardware or software?

    Attached Files:

    Last edited: Jan 13, 2012
  10. Jan 13, 2012 #9
    Thanks for the diagram Studiot.

    I've attached a diagram of what I want the device to do. In the diagram I've used general notation f(x), but I intend f(x) to be some function that is the sum of sine waves. That is

    f(x) = sin(c_1 x) + sin (c_2 x) + ...

    I am looking primarily for a hardware solution.

    If I can, I'd like to avoid digitizing the signal: I'm trying to construct an analog calculator of sorts, so I'm wary of digital components. That said, if the only solution to this problem is a digital one, I welcome any advice to that end.
  11. Jan 13, 2012 #10
    Are you trying to build a sort of analog computer?

    This can be an interesting project and was done for real (the only available way) in the past first with mechanical and later with electronic units.

    I will see what references I can dig up.

    However why can you not represent your signal by voltages? This makes scaling much easier.
  12. Jan 13, 2012 #11
    Yes I am thinking along the lines of an analog computer. Any good analog computing references would be much appreciated.

    What exactly do you mean by representing my signal as voltages? I'm not very knowledgeable about electrical engineering or circuit design so I apologize if that is an overly basic question. If there is a way to represent the signal other than as an alternating current, I am open to that sort of idea.

    As you've probably noticed, my ideas are still in the early stages - none of the specifics are 100% rigid so long as I can output a signal with an arbitrary integer scaled frequency/wavelength/period.
  13. Jan 13, 2012 #12
    Here is a rough sketch showing what I mean.

    Let us say we have a voltage V volts equal to 10x.
    We can very simply divide this down either by a switch as shown in discrete steps or continuously by a potentiometer.

    Thus we can generate a voltage = nx for any n.

    An analog circuit block that takes an input voltage v and outputs the sine of this voltage =sin(v) is a readily obtainable/ constructable unit.

    If you take a number of these for n1, n2, n3 etc you can easily combine them to obtain the sum of these voltages which is therefore the sum you require.

    This is the basis of an analog computer, many other functions besides the sine are availbale this way.

    Traditional analog computers used fixed voltages, which is equivalent to looking up the sine of a certain number in tables.
    If you require scanning you can substitute a ramp voltage at the input so that you can obtain an output voltage which tracks the variation of x at the input and produces an output which is the sum you require over the range of x input.

    Attached Files:

  14. Jan 13, 2012 #13
    Any non-linear device (see, diode) outputs all the harmonies of an input sinusoidal signal. This is due to the fact that the expression
    [tex](sin(\omega t))^{n}[/tex]

    contains (among other frequencies), the harmony

    [tex] sin(n \omega t) [/tex]

    given that you know the input frequency\ies and the desired harmonies n*w are spaced enough, you can cascade band-pass filters at the output of a non-linear device, and thus at the output of the entire system you will have only the desired harmonies.

    Studiot, what kind of analog devices are there that compue a sine function of the input, never heard of these. And how do they help at generating a sine with the input voltage as a frequency?
  15. Jan 13, 2012 #14
    Your equation is only a nice way to introduce an envelope with frequency f1-f2 and the oscillator (of high frequency f1+f2) that is bound by it. It does not mean the signal contains more than the two original frequencies f1 & f2, you still get two pure spectral lines only at f1 & f2.

    But, when you multiply two sinusoids of different frequencies f1 and f2, only then you get the sum of two other frequencies (sum and difference), and looking at the spectrum you get spectral lines at f1+f2 & f1-f2.
  16. Jan 13, 2012 #15
    I didn't say they did.

    I said that if you represent x by a voltage you can easily obtain another voltage given by

    f(x) = sin(n1x)+sin(n2x)+sin(n3x)+..+

    where the ni are coefficients.

    From what we have been told, I think Charles would be better served working with voltage to create his required functions.
  17. Jan 13, 2012 #16

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    i had a friend once who took a signal,

    clipped it with diodes to produce harmonics
    then applied analog filter to detect harmonic of interest.

    he was trying to measure frequency of a nominal 60hz signal in less than one cycle, for purpose of detecting impending grid disturbance..

    it seemed to work on his test bench but we got distracted and i never knew final result.

    it would seem fft might be an approach for you.
  18. Jan 13, 2012 #17
    Does a diode / other non-linear device generate harmonics regardless of the input signal or does it only work for "nice" signals, i.e. sin(x), cos(x), ... ?
  19. Jan 13, 2012 #18
    So suppose I had a periodic signal f(x) = sin(ax) + sin(bx) + .... Suppose I want to generate a signal g(x) with k times the frequency of f(x).

    I don't know what {a,b,...} are but I know that they are elements of some finite set of coefficients C.

    Suppose I build a bank of LC circuits tuned sin(cx) for all c in C. If I run the signal through this bank, it seems like it would "separate" f(x) into its constituent sine waves. Then, for each "separated" sine wave, I could use another LC circuit tuned to the k'th harmonic of that sine wave. Then I could recombine all the outputs to yield g(x).

    Does this make sense? Would I have to put a diode between the "separating" LC circuit and the "k'th harmonic" LC circuit to generate all the harmonics of a given sine wave?
  20. Jan 13, 2012 #19


    User Avatar
    Science Advisor
    Gold Member

    Studiot your diagram in post#8 shows me more than 2 signals on the red trace. It is an AM DSB signal, carrier not suppressed. You cannot achieve that without multiplication, and summing is obviously not multiplication. I think that is what elibj123 is saying and where I was heading in my previous post.
  21. Jan 14, 2012 #20
    Averagesupernova & elibji23.

    Not quite

    First look carefully at the equation in post#2.

    This shows that the sum of two sine waves is the product of a sine wave and a cosine wave..

    Conversely the product of a cosine wave and a sine wave is equal to the sum of two sine waves

    ie they are the same thing.

    So if you have one, of necessity you have the other.

    My traces are a printout of directly adding two sine waves.


    Now in amplitude modulation we do indeed approach from the point of view of multiplying two sine waves. That is we take a carrier


    and replace Ac by Assin(ωst)

    where c and s represent carrier and signal respectively.

    When we transform the product of these two sine waves we use the formula

    [tex]\sin (A)\sin (B) = \frac{1}{2}\{ \cos (A - B) - \cos (A + B)\} [/tex]

    which is different from mine, although the resultant waveform is very similar since they both use sinusoids.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook