Frequency doubling

Started by g3rmanium, July 11, 2006, 04:22:43 AM

Previous topic - Next topic

g3rmanium

Hello,

I simulated frequency doubling and produced some audio files along the way.

The interesting part is this:



Frequency doubled at the top, original at the bottom.

Let me know what you think.

Johann
Call me Johann.

bioroids

Interesting...

I don't know much about this anyway.

I wonder how would it work with complex waves instead of sines.

Luck!

Miguel
Eramos tan pobres!

rockhorst

If you can build a circuit that does this, you'll have something very interesting indeed! Very nice octaver. Well, almost. You still need to center that doubled sine around zero again. I had been thinking about a way to do that a few days back. Maybe there's a very easy standard solution, but mathematically speaking this should work:

Follow the doubled signals peak amplitude, divide that in half and add it in real time as a DC current to the doubled signal. Plausible/doable?
Nucleon FX - PCBs at the core of tone

toneman

Most of the "musical" doubler use fullwave rectification.
Using a Four Quadrant Multiplier (also known as a balanced modulator) only works on sine waves.
If U put same amplitude/same frequency sine waves into the carrier & modulation inputs of a 4QM,
U get a frequency-doubled sine wave.
This is done all the time with RF(RadioFrequency) transmitters.
U start out with a lower sine frequency, then double it several times to get the higher frequency U need for broadcasting.
Nearly all of the "musical" doublers use some form of rectification to "flip" the bottom portion of the input
waveform to the top using a fullwave rectification approach.
U can also use some "digital" techniques to get a square/pulse doubler like T.Escobedo's doubler.
An XOR gate is used in this application and seems to work quite well.
Also, pitch shifting is done all the time to get the octave up.
The GR33 and VG8/88 use DSP and sound quite good to my ears.
Double the Trouble???   Not at all....  much harder than that   :)
  • SUPPORTER
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

A.S.P.

#4
Lost Info Society...
Analogue Signal Processing

g3rmanium

Quote from: bioroids on July 11, 2006, 08:08:11 AM
I wonder how would it work with complex waves instead of sines.

I'll try that out sooner or later. The problem is I don't have any really clean guitar sample. Does someone have something like that? Maybe recorded through a DI box?
Call me Johann.

brett

Hi
QuoteUsing a Four Quadrant Multiplier (also known as a balanced modulator) only works on sine waves.
I'm no expert, but I think multipliers work by taking the log of the instantaneous voltages and adding them, then taking the antilog of the result.  Therefore, they work for all signal types (including DC!).

With multipliers such as the 1496, it is fairly easy to get quality octave up.  The 3080 application sheet also showed how to use it as a balanced modulator.  Yet another alternative that may have been tried is to trigger switching between in-phase and out-of phase signals at the zero-crossing point.  An op-amp and a 4066 and a few other components should be able to achieve this.  Then there are the ideal diode circuits.

And there are many octave-up circuits that deliver a mix of fundamental and octave up.

cheers
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

g3rmanium

Quote from: toneman on July 11, 2006, 09:29:08 AM
Also, pitch shifting is done all the time to get the octave up.
The GR33 and VG8/88 use DSP and sound quite good to my ears.

But hey -- that's digital  ;)
Call me Johann.

g3rmanium

Quote from: brett on July 11, 2006, 10:49:09 AM
With multipliers such as the 1496, it is fairly easy to get quality octave up.  The 3080 application sheet also showed how to use it as a balanced modulator.

The spec sheets from the Analog chips I mentioned before also have lots of application notes.
Call me Johann.

GFR

Quote from: g3rmanium on July 11, 2006, 10:46:36 AM
Quote from: bioroids on July 11, 2006, 08:08:11 AM
I wonder how would it work with complex waves instead of sines.

I'll try that out sooner or later. The problem is I don't have any really clean guitar sample. Does someone have something like that? Maybe recorded through a DI box?

Recording through a DI box is ok.

You can also create a complex waveform by adding up a couple of damped sinusoids of various frequencies - there's a post by H. Biseel in this forum where he gives this tip. Use the search.

Check this too:

http://www.geocities.com/gfr.geo/octave.html

rockhorst

I was confused for a split second, but I recon that 'complex wave' on board like this mean guitar/audio signals and such, not complex exponential solutions to wave equations ;). Complex waves are basically a big pill up superposition of pure sines, so I'm not sure that it should give any trouble, as long as there's a wide frequency transparancy.
Nucleon FX - PCBs at the core of tone

R.G.

Even really clean guitar signals are composed of a fundamental plus some harmonics. Mother Nature has decreed that every nonlinear process creates not only harmonic distortion but also intermodulation distortion - the sum and difference frequencies of the input signals. You can have processes that generate more or less of the intermodulation, but you can't get away without it.
Only in time shifting schemes can you really generate an octave up of everything inside the signal without also generating sum-and-difference intermodulation. That effectively means digital. You might be able to do a slightly time delayed signal on an audio delay line, but it would be very complicated indeed.

That being said, pure squaring is likely to produce the least offensive results. Multipliers do this at the cost of some complexity. The simplest setup I know of that does it is my MOS Doubler, which uses the pure-square-law distortion of MOSFET or JFET devices to generate the squared term. A good squarer will produce cleaner octaves up than full wave rectifiers.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

g3rmanium

Quote from: R.G. on July 11, 2006, 11:29:07 AM
That being said, pure squaring is likely to produce the least offensive results. Multipliers do this at the cost of some complexity.

As you mention the word "cost" -- do you think the cost of these chips contributes to their rarity in effects pedals? Do you know any effects pedals that used ICs for doubling?
Call me Johann.

g3rmanium

Call me Johann.

A.S.P.

#14
Lost Info Society...
Analogue Signal Processing

Eb7+9

Quote from: R.G. on July 11, 2006, 11:29:07 AM
A good squarer will produce cleaner octaves up than full wave rectifiers.

... wonder where I heard this mentioned before  :icon_rolleyes:

a single-load differential circuit (FET, triode or bipolar) is nothing as clean as a balanced multiplier based squaring circuit - ie, 80db upper harmonic suppression is easy with the VCS3 ring-mod circuit operating as a squarer ... I wonder if you  would care to explain what prompted you to call that jFET octaver stage (simply a jFET adaptation of the SuperFuzz octaver stage) a clean one ?! ... some analysis please

btw, there's no such thing as a "pure-square-law distortion of MOSFET or JFET devices ..."  their transfer is 3/2^power based - it's not all second harmonics showing up at the Drain ...

R.G.

Quote... wonder where I heard this mentioned before
It's entirely possible that I said it.  :icon_biggrin:
Maybe others did too.

They both produce an octave effect. The FWR makes a different slew of harmonics and intermodulation products than a squarer. They BOTH produce intermodulation as all nonlinear processes do.

Quotea single-load differential circuit (FET, triode or bipolar) is nothing as clean as a balanced multiplier based squaring circuit - ie, 80db upper harmonic suppression is easy with the VCS3 ring-mod circuit operating as a squarer
Well, duh. Of course not. Otherwise balanced modulators would not exist - there being no reason to do better than the cheap circuit. The reason balanced multipliers exist is the need for squeaky-clean multiplication in RF applications. And selected square-law MOSFET mixers are still used in RF work, along side multipliers. Neither one was cooked up to do audio - they just pervert that way well.  ;D

QuoteI wonder if you  would care to explain what prompted you to call that jFET octaver stage (simply a jFET adaptation of the SuperFuzz octaver stage) a clean one ?! ... some analysis please
Sure thing. The Superfuzz stage is a full wave rectifier. Take a look at the output on a scope. This is a result of the very small compliance at the base of a bipolar transistor. A bipolar transistor is an exponential-law device. The circuit is best understood in terms of one stage raising the emitter of the other and cutting off its base, resulting in a FWR waveform.

This is not what you get from subbing in JFETs or MOSFETs in the same circuit. First, the compliance of the gates is larger. Second, the distortion products of a JFET or MOSFET stage run below clipping is largely - although, yes, if you measure carefully, not entirely - second harmonic.

The best part of the analysis is experimental. Hook one up and tweak it in. On a scope, you'll find it does as clean a sine wave doubling as a multiplier if you use closely matched FETS and get it biased  right. That's the reason I cooked up the one with the MOSFETs in the CD4007 - to get matched MOSFETs cheaply. And it listens just like it looks. I guess that's what prompted me to say that - it looks and listens that way.

Quotebtw, there's no such thing as a "pure-square-law distortion of MOSFET or JFET devices ..."  their transfer is 3/2^power based - it's not all second harmonics showing up at the Drain ...
Don't convince me. Go convince these guys:
http://www.ee.iitm.ac.in/~shanthi/iscas2004.pdf
Quote.... FETs, like vacuum tubes,have a I-V transfer function which is more linear than the exponential transfer function of a bipolar  transistor.  As a direct
result  of  this square-law characteristic, FETs produce predominantly even-order harmonics. Figure 10 shows the transfer function of a bipolar transistor and. Fourier  ransformation of both transfer functions reveals the lower odd-order harmonics of the FET.
And these:
http://www.stanford.edu/dept/chemistry/faculty/dai/group/Reprint/63.pdf
QuoteThe solid lines are calculated from the square-law model for MOSFETs to fit the experimental curves...
And these:
http://www.polyfet.com/mosartcl.PDF
QuoteDrain Current to Gate Voltage Relationship

      The classical square law equation describing current flow for MOS devices...
And that's just from a quick scan through google. I have my semiconductor physics book here somewhere in a box. I can dig it out if necessary. All I know is what I read.  :)

By the way - vacuum tubes are a 3/2 law device. We can't make vacuum tube circuits out of FETS because of that fact. Otherwise, we'd have had no trouble.

And besides, FETs produce a nice squaring result when you amplify a signal twice out of phase and then null out the first order products, whatever the current law they follow is. That last result is important.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

brett

Hi.
Thanks for the interesting discussion.

QuoteFETs produce predominantly even-order harmonics.
Stratoblaster booster, JFET doubler, many others, rely on this fact.  It can't be argued, can it?

My simple empirical approach to octave up (for those who struggle with the theory): If it sounds like good octave up, it's probably good octave up.
The Octavia is an example of an octave pedal that works well despite not being a particularly good doubler.

cheers
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

Eb7+9

#18
... that's the point, there's a question of just how predominant that second harmonic stays against rising signal amplitude ...

on the one hand RG you say a good squarer makes a cleaner octave than a full-wave circuit, while the MOS doubler is a FW circuit - I'm curious since we already know multipliers make the best full-range squaring blocks ... I will agree though that you might get a slightly morre curved FW transfer profile using FET's over BJT's in a differential topology (it has a curved profile in the BJT case as well, with a parabolic bottom) ... does that profile difference really cut down on higher harmonic production outside the pseudo quadratic (center) zone which both have ??

text material on jFET analysis typically states very clearly that the square function term K(Vgs - Vt)^2 for describing Drain current in single-ended gain stages (not differential) only applies if you stay well withing the pinch-off range of the device (that's a well known assumption, and both Leong's and Shatan's papers make mention of it if you read carefully) ... let's make this is clear, this is just meant to simplify analysis in some cases - it's only in that limited case that we can ignore the effects of back drain modulation ... otherwise this modulation figures as a product term in the full jFET transfer equation, and that term is a also function of Vgs - this makes the full range functionquite un-quadratic ... this is especially so in a 9v application where drain volatge isn't high enough over Gate to totally ignore the effect (Leong's way of putting it) ... while that assumption may hold most in the MOS/BJT doubler around a low signal amplitude range the circuit will still be a strong producer of harmonics outside this clean band (where the drain voltage goes low) like most other FW circuits of this type ... that's quite unlike a linear "current-mode" multiplier circuit - ignoring IM terms of course ... if you want to see what the full range function for a differential jFET circuit take a look at the well known Sedra uE text (3ed pp 524) - the drain current functions for an unloaded jFET diff pair are quite monstrous and nothing resembling quadratic terms ...

I'm not saying one octaver circuit version has to sound better than another - they all carry their own added set of harmonics, that's the point ... the balanced multiplier based squarer is the exception since it typically can produces fourth harmonics -80dbv below the octave almost regardless of signal amplitude using an off-the-shelf LM1396, well below you can get by simply cancelling a fundemental component of a rich signal pair ... one difference to the player is you don't have to play lightly to maximize the octave component - a trademark with some octaver circuits ...

R.G.

QuoteMy simple empirical approach to octave up (for those who struggle with the theory): If it sounds like good octave up, it's probably good octave up.
In spite of being called a theoretician at times, it's my definition of good octave up, too.  :icon_biggrin:
Quotethat may or may not cut down on "some" harmonic production outside the pseudo quadratic (center) zone which both have ... again, by how much + or - I'm curious to know ...
I'm sure that like everything with FETS - it varies.
Quotewhile that assumption may hold most in the MOS doubler around a low signal amplitude range the circuit will still be a strong producer of harmonics outside this clean band
Yes. By experiment, it does.
Quoteif you want to see what the full range function for a differential jFET circuit take a look at the well known Sedra uE text (3ed pp 524) - the drain current functions for an unloaded diff pair are quite monstrous and nothing like a squaring function ...
I'm sure that you can drive a differential JFET circuit out of the squaring region. But that's not what the circuit I describe does. It is effectively two matched single ended stages which have their outputs mixed. The inputs are arranged to have that single ended outputs cancel. What does not cancel is the even order distortion.  It works.
QuoteI'm not saying one octaver circuit version has to sound better than another ... that's except for balanced multiplyer exception ...I don't think you can compete with that on a large signal basis using differential transfer ..
I'm not competing. I'm trying to explain. But it sure sounds like you're competing. What's the beef, JC?

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.