0:01

That is fine for signals if all the signals were always positive.

So you could go, going to zero to, zero to plus voltage values.

But what about if the signals are going the other way too?

We want to make this thing symmetrical. And so, all we're going to do is add

another diode flipped around the other direction.

And so now, when the voltage of, when I get a voltage plus to minus, this side

becomes higher then that side. So that means V out is negative voltage.

So when V out is negative, then current's going to flow through D one.

When v-out is positive, current's going to flow through D2.

And the current, the magnitude of the current is going to be exactly the same

in both cases. Si if v-out is plus one volt then I'm

going to have current flowing through D2 of a certain amount.

If v-out is negative one volt, then I'll have exactly the same current flowing

through D1, the same magnitude, but going the other direction.

And so by just adding this second diode on this symmetric pair, then I'll make

the output characteristic and symmetrical.

So, as I just said, D1 conducts when Vin is greater than zero, and that means when

Vin is greater than zero, Vout's going to be negative.

So that makes this, is a lower potential than that, and this diode is going to be

forward-biased. And when Vin is less than zero, Vout

becomes positive. And the and so in that case, this is

positive side, let's see, V out is positive, that's zero and so the D2 dial

is going to conduct. Okay, now so here's this symmetrical

Transfer characteristic. And what we're going to do now is a

little MatLab simulation with a transfer characteristic of this sort, and see what

it does to signals and listen to it a little bit.

Oh, and just to finish up. I just want to point out in this part,

positive V in, I'm just repeating what I said here, but positive V in, D two is

forward biased, negtaive V in D one is forward biased.

And when D2 is forward-biased, D1 is then reverse-biased and there's virtually no

current going through it. So it essentially takes it out of the

circuit when it's reverse-biased. And then the last thing is that I want to

point out is that the initial slope of this blue line Is determined by rf for

rn, just for very, very small signals. This thing hardly, the diodes have very

little effect, and I just have the regular DC op amp gain for a amplifier.

3:26

Okay, so now it's time to listen to the demonstration.

In this Matlab demonstration, I've simulated the kind of non-linearity that

we were just talking about for the op amp circuit with diode feedback.

Now, what I've done here is to start off, let me just run this once.

[NOISE] Now, what I've done is I've modeled a non-linearity of the sort that

we were just describing. So if you -- this is the output versus

the input of the op amp. And so the blue line is just a linear

Output-input relationship. So that's if there was no distortion at

all or no compression. Now, the red line is the non-linearity

that we've that we're modeling in this case.

So what this shows is that near 0, just as in the curves on the previous few

graphs, you see the slope is quite steep, so there's a lot of gain near 0.

But then as the input signal becomes larger, moving up the curve this way, the

output does not continue to go up as fast and the gain actually rolls off to less

than one. And, of course this is set up so it's

symmetric, so it does the same thing the negative Now, it's just an interesting

aside. Vacuum tubes aren't necessarily

symmetric, so the in fact, they're not symmetric, and, in their distortion

characteristics. And so, this diode circuit that we're,

that we've built into the guitar amplifier is sort of an approximation of

what you get with a tube amplifier, but there are differences.

So anyway, in the simulation. I take this red input/output

characteristic. And then we run just a sine wave through

it. So here's the original sine wave.

Two cycles of 440 hertz. And this is the distorted output.

So I just, every point on this sine wave. You look up where that is on the input,

and then you just read off what the output would be.

And so if you do a point-bypoint mapping of the sine wave using the red transfer

characteristic you'd get the red output signal here.

And then, finally, down below I plotted the spectrogram of the original signal.

So this is a 440 hertz sine wave. So remember back when we were talking

about spectrograms. This is the time axis along here, so it's

one second worth of. Sounds that you heard and the frequency

axis I'm only going up to 11,025 hertz in, in this spectral analysis.

But in the original pure sine wave there is a single strong component at 440

hertz. And then in the distorted sign wave

there's that same component at 4 40 plus all of the harmonics and in fact these

are the odd harmonics. So it's 4 40 and whatever 3 times 440 is

so you do the math and then 5 times 440 is 2200.

So, here's 2200 and so on and so forth. And so you get all of these on harmonics

making up this distorted wave form. Now let's listen to that again.

[NOISE] Okay, now I'm going to take and make the non-linearity less extreme.

So I want the parameters over here, I just have to change them a bit.

[NOISE] So let me go further. Make it almost linear.

[SOUND] So you see the output doesn't have that, as much of an S shape to it

and the distorted output wave is not as sharp near the zero crossings.

And there's not as much power up here in the higher harmonics either.

So let's listen to that and then I'll turn up the distortion in steps to get

back to where we started.

[SOUND]

Go up some. [SOUND] I'm going to go up a little more.

[NOISE] I'll go up one more notch, see what happens.

[NOISE] Okay, so it's just more of the same.

Now, with this same Matlab program I can also read in a short clip of a wave file.

And then apply the distortion to that same file.

So, this is about three or four seconds of a guitar sound that we used a couple

of weeks ago. So let's run that through.

[MUSIC] So, there's the spectrogram of the original waveform.

Now that already had a lot of harmonic overtone structure to it, but by running

it through the distortion, that really accentuated that quite a bit, and that's

what you're hearing. So let's also just take, and for fun

let's zoom in on the end of here. So here's the more or less Sinusoidal.

So this is what has happened to that signal.

This is more or less the same place. In fact you see those two peaks?

That looks like it's those two. So there's the original and the

distorted. So let's listen to that once more.

[SOUND] Okay, so this actually is, this simulation is a fairly close facsimile to

what you should hear after you build the amplifier and turn up the gain control

knob, turn up the distortion.