Frequency doubling

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

Previous topic - Next topic

Eb7+9

#20
I'm not saying it doesn't work - I'm asking how clean is it really ... with amplitude ...

no beef ... get technical already


Paul Perry (Frostwave)

I use an AD633 multiplier chip in my Blue Ringer ring modulator (if I didn't care about bleed through, I'd use half a LM13700 and save $6).
I'd just like to say, that ALL non-linear processes will give SOME frequency multiplication. As it happens, a perfect multiplier fed with a single frequency sine wave gives a sine doubled in frequency. With a chord, it gives a mess... and so does any ohter non-linear circuit.
How accdeptable or musical the 'mess' is, depends on the circuit, the signal in, and the ear of the beholder.

Eb7+9

... non-linear transfer is really the cause of harmonics production, the side terms you get from multiplying two non-pure signals is another issue ... let's not confuse things, we're talking about added harmonics a circuit that either multiplies or mimmics "ideal" muliplication (ie., f(x)=x^2) will introduce in the process ... even though one may want to measure those added harmonics against a pure input signal - with a multi-tone waveform like a guitar signal the IM dirt will have more or less added harmonics depending on the linearity of the transfer stage (as well as other factors) ... so you'll get your IM dirst as well as varying degrees of added harmonics dirt - we're talking octaver "cleanlyness" in the analogue sense, not digital ...

A.S.P.

#23
Lost Info Society...
Analogue Signal Processing

R.G.

QuoteI'm not saying it doesn't work - I'm asking how clean is it really ... with amplitude ...no beef ... get technical already
I said it earlier -
QuoteThat 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.
What exactly else is there? A purpose-built circuit that does the mathematically correct operation as closely as the semiconductor process can be tweaked will follow the mathematical process more closely than simpler, cheaper setups that produce the desired result as a side effect. The square-law distortion (and they are square law devices for small signals) of JFETs and MOSFETs produces squaring if you cancel out the main signal. The MOS Doubler does this, and it's relatively easy to verify on a scope, and by ear. Is it perfect? No. The squaring is a side effect with the Doubler.

If you want to concoct a test case where a multiplier will do a better job, say with large signals, it can be done pretty easily. The MOS Doubler will not work well with 10V signals like a synth's, and a suitably set up multiplier might. My guitars don't do 10V outputs. Do yours? Do we need to search for a threshold for a particular set of devices?

Furthermore, the output of a MOS Doubler is small. Cancelling the volts worth of main signal leaves a distortion-plus-uncancelled main that's smaller than the typical guitar signal. That's what you get when you cancel the main signal of a circuit which puts out a couple of volts and has only a few percent distortion. It needs post amplifying to be usable as a signal in a guitar effects chain.

If what you'd like me to do is to get me to do the first-principles math to precalculate the performance of a MOS Doubler, I can do a lot of algebra, but that won't help. That's because - as I said - the FETs will vary. They will not match any model you care to start with. So the real performance will not be whatever the algebra says. This same thing is true with multipliers. The difference is that mutlipliers have been set up, tweaked and tuned to get as close to analog math as they can, over a long period of time. That's their primary purpose, and if something cheaper and simpler did it better, they would not exist.
Quote... non-linear transfer is really the cause of harmonics production,
OK, we agree on that one.
Quotethe side terms you get from multiplying two non-pure signals is another issue ...
So multiplying signals is a linear-transfer process? Quick - what's the square of (a +b)?

Quotelet's not confuse things, we're talking about added harmonics a circuit that either multiplies or mimmics "ideal" muliplication (ie., f(x)=x^2) will introduce in the process ... even though one may want to measure those added harmonics against a pure input signal - with a multi-tone waveform like a guitar signal the IM dirt will have more or less added harmonics depending on the linearity of the transfer stage (as well as other factors) ... so you'll get your IM dirst as well as varying degrees of added harmonics dirt - we're talking octaver "cleanlyness" in the analogue sense, not digital ...
I'm having a bit of trouble tranlating that one. Did you mean to say that there are differences in how perfectly a multiplier squares and how a side-effect circuit squares? And particularly in the real-world of guitar signals with imperfect harmonics? OK - that's fine, a purpose-built squarer calculates squares better. And both are better than listening to full wave rectified signals.

But as to listening, I agree completely with Paul - the more complex the signal, the worse a nonlinearity sounds, even a really, honest-to-Pete squarer.
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.

Eb7+9

#25
Quote from: R.G. on July 12, 2006, 09:30:48 AM
Did you mean to say that there are differences in how perfectly a multiplier squares and how a side-effect circuit squares? And particularly in the real-world of guitar signals with imperfect harmonics? OK - that's fine, a purpose-built squarer calculates squares better. And both are better than listening to full wave rectified signals.

right, calculating squares better is tantamount to producing a clean octave from a pure sine input, even though a guitar signal isn't pure that difference translates into an octaver effect that has more pronounced octave component in the harmonics mix ...

two somewhat independent processes are going on here: (i) the IM terms produced by the harmonics of an impure input signal going through the reflective FW process - this doesn't produce harmonics in same way an amplifier's non-linearity produces harmonics - these IM terms can be called harmonics as well, I call them IM-harmonics ... and (ii) the harmonic content of the octave output when inputing a clean sinewave due to the non-linearity and shape of the actual transfer function itself, the result of how the actual transfer function approximating the FW function actually is shaped ... yes, because of the non-linear process you can't just add both sets of harmonics independently, but we can try reducing the later which is what you're trying to do when applying a good squarer to a non-pure input source ... to null out other harmonics and bring out the 2nd more - same reason why some turn down their treble all the way and pick midway on the strings when playing an octaver ...

Quote
Furthermore, the output of a MOS Doubler is small. Cancelling the volts worth of main signal leaves a distortion-plus-uncancelled main that's smaller than the typical guitar signal. That's what you get when you cancel the main signal of a circuit which puts out a couple of volts and has only a few percent distortion. It needs post amplifying to be usable as a signal in a guitar effects chain.

this circuit does not cancel a fundamental as much as it mirrors every other half cycle - no need to loose signal amplitude with this circuit - the only reason why lots of gain is produced in the octave stage of the SuperFuzz is because it's needed to clip the Si fuzz diodes following it ... I sim'd a couple of DC Transfers for both kinds of differential FW circuits, even without a bypass cap the output shows good amplitude transfer for one ...

http://www.diystompboxes.com/DIYFiles/up/differentialFullWaveTransfers.pdf

the top case is for the Super-Fuzz Bipolar based stage, the second MOS doubler using 2n5484 models and 4k/10k biasing, and third MOS doubler with increase Drain load ... theory does suggests a limit to the quadratic range of that differential stage - this needs to be pointed out - and notice how the limits of this quadratic range are plainly visible in the center plot ... question is how do you play with that range and tweak the overall full-range transfer profile so it can generate less harmonics outside the required 2nd and the IM shit ...

the waveforms these stages (transfer) produce from an ideal input sinewave input varied from quite antisymetric with a sharp point at one end (top) case, to pseudo-sine - ie with straight walls (center), to a fairly nice sine producing transfer with no straight wall portions and symmetric top and bottom caping (bottom) ...

I haven't done FFT's on the TRAN waveforms but it's pretty clear from the DC Transfer plots that the jFET differential FW cures the sharp corner of the BJT version (which mimmics f(x)=|x| and is responsioble for producing lots of higher harmonics) ... the middle case (stock MOS doubler values using 2N5484 devices) is somewhat like the transfer of a diode-based FW circuit (Green Ringer) but with the inflection corners rounded off ... the simulator comes in handy at showing how a shift in biasing can produce a change in transfer shape that will give an even cleaner octave sine wave from a pure input one - as in the bottom case where the straight walls (a transfer component which also produces harmonics outside the 2nd) are squeezed out ... of course this is based on me using a 2N5484 model - your biasing scheme might already be producing a transfer like the one on the bottom graph with your devices ...

this is what I was wondering about - how does the back-drain component act on the transfer shape ... the answer is suggested by these sims, the Drain load can be adjusted so the inflections in the transfer curves are more symmetric shape-wise and absent of straight walls, which otherwise tends to increase the transfer dirt ... in this desireable state the dynamic range is still plenty high for guitar signals - I was able to pump in a +/- 200mv sinewave and still not see gross shape distortion ... the output was maybe +/- 180mv ... that's without a bypass cap across the source resistor ...

Quote
But as to listening, I agree completely with Paul - the more complex the signal, the worse a nonlinearity sounds, even a really, honest-to-Pete squarer.

playing a really clean squarer makes a noticeable difference aside from this ... I'm impressed with what the MOS doubler achieves and how it does it - I'm looking forward to checking it out using the shape control (25k pot instead of 10k load) to see how close it can get to a super clean squarer ...




brett

Hi
Quoteplaying a really clean squarer makes a noticeable difference aside from this ...
Clean?  Dirty?  Are we talking about food or fighting or music?  These value-laden words are surely being misused here.

For example, anybody who ever played a chord (or even plucked a single string) has done somthing really dirty.  Can anybody seriously espouse that "clean" in the sense used above is somehow better?  C'mon...  we'd all be playing sine wave generators through hi-fi amps if "clean" sounded better.

Would anybody like to address the real question:  How do we make new/different/more musical octave pedals?  Or do we use the Doubler, Tycho and Octavia. (Bobtavia, Rambler, etc....)
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

g3rmanium

Quote from: g3rmanium on July 11, 2006, 02:59:11 PM
Hear for yourself.

In that entry, I said the doubled version was twice the frequency, whereas it really is just full wave rectified at lower frequencies. That error is corrected now.

As the frequency goes up, more of the signal is really doubled and not rectified. If you look at the spectrum moving up, you can see the relationship between fundamental and second harmonic varying a lot.
Call me Johann.

Eb7+9

#28
Quote from: brett on July 13, 2006, 03:03:08 AM
Would anybody like to address the real question:  How do we make new/different/more musical octave pedals?

more musical depends on taste and circumstances - but new/different might well be found by exploring untried squaring function blocks, and of course by modifying existing octavers like we're talking about here ... Seevink has a current-mode (translinear) squarer which belongs to the same family as the Gilbert Current-Multiplying cell - heart of the LM1496 ... his squarer may be part of the AnalogueDevices catalogue, I'm not sure ...

I used the LM1496 in my Harmonic Multiplier circuit which is based on the Synthi/VCS3 Ring-Mod ... the tech notes for the Synthi/VCS3 explain how to adjust the RM's balance by wiring it as a squarer and tuning out the fundamental and 4th harmonics to better than -80db ... this is the cleanest analogue octaver circuit I know of so far ... sounds very unique

ok, back to you Ge ...

Joe Kramer

From a previous thread on octaves(http://www.diystompboxes.com/smfforum/index.php?topic=46092.0)

Quote
Hi!

I've also done some thinking about how to restore the symmetry of a FWR signal.  Here's what I came up with, but it involves a few steps:

1) FWR the signal and "fold" it in half, which gives you the basic octave-ized signal.

2) Level-shift the signal to restore the zero-crossings.  This can be done simply by AC coupling with a capacitor.

3) Half-wave rectify this signal again, keeping the rounded top half and discarding the spiked lower half.

4) Invert the above signal and shift it 180 degrees out-of-phase.

5) Mix the non-inverted and inverted signals produced by steps 3 and 4 back together again.

This will give you something like a symmetrical waveform that's an octave up from the original.  The problem, as far as I can see, lies in the 180-degree phase-shift step.  You have to phase-shift the inverted signal before you mix it or else it will simply cancel both signals out.  There would be two ways of doing this.  The easiest way would be to use a fixed phase shift network, but the problem here is that only certain areas of the frequency spectrum would be shifted while others would not be: some notes would sound, and some would be nulled-out altogether.  You might be able to get away with a control that lets you dial-in the frequency range that you expect to play in, but that might be too restrictive.  The second approach would be to use a very slight fixed delay.  This would give a uniform phase shift across the whole frequency range, but would be sort of like going around the world to get across the street--once you start using BBDs in your simple analog octave device, it's not so simple any more.

Anyway, those were my thoughts on the subject.  Probably others might have ideas for solutions more elegant than mine.

Regards,
Joe

Hope that's of some use!

Joe
Solder first, ask questions later.

www.droolbrothers.com

billings

I can't speak for the phase shift network, but the slight fixed delay would not work;  it would work correctly only for the wavelength it was tuned to and its even harmonics.

g3rmanium

Quote from: Joe Kramer on July 14, 2006, 02:27:35 PM
From a previous thread on octaves(http://www.diystompboxes.com/smfforum/index.php?topic=46092.0)

Quote
1) FWR the signal and "fold" it in half, which gives you the basic octave-ized signal.

2) Level-shift the signal to restore the zero-crossings.  This can be done simply by AC coupling with a capacitor.

3) Half-wave rectify this signal again, keeping the rounded top half and discarding the spiked lower half.

4) Invert the above signal and shift it 180 degrees out-of-phase.

5) Mix the non-inverted and inverted signals produced by steps 3 and 4 back together again.

When I draw this on paper, the frequency isn't doubled but increases by 150 %?

Quote from: Joe Kramer on July 14, 2006, 02:27:35 PM
QuoteThe problem, as far as I can see, lies in the 180-degree phase-shift step.

And from what I know, you can only get 180 ° of phase shift at DC, right?

Btw: Anyone has a formula to calculate the phase shift at a certain frequency (knowing R and C)? I know the formula for 90 °.
Call me Johann.

g3rmanium

Quote from: brett on July 13, 2006, 03:03:08 AM
Would anybody like to address the real question:  How do we make new/different/more musical octave pedals?  Or do we use the Doubler, Tycho and Octavia. (Bobtavia, Rambler, etc....)

Well, I would rather design something new than look at the thousandth copy of Roger Mayers Octavia.
Call me Johann.

g3rmanium

I was thinking about the software I wrote. In fact, I don't have 180 ° of phase shift at DC with the constant 24 samples delay I'm using. Instead the phase shift increases constantly -- which doesn't happen in real all-pass filters from what I know.

So I'm looking for a program to help me write a real all-pass filter. I tried out some programs but none did all-pass filters.

Any hints or links?

Thanks
Call me Johann.