IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Tube Amp Modeling
gurkitier
post Aug 20 2013, 19:10
Post #1





Group: Members
Posts: 1
Joined: 20-August 13
Member No.: 109713



I'd like to dig into modeling tube amps with digital equipment. I have basic knowledge about DSP, FIR/IIR filters, phase shift in IIR filters and such.
Now for a try, I've ran a ~300Hz sine wave through an tube amplifier (OR120-like).
This is the sine wave:

This is the output:

The pictures are NOT centered vertically with respect to the y=0 axis.
In the output, you can see, that the amplifier is Class-A as the upper and lower half of the signal are amplified differently. The upper wave halves of the output wave are longer in time.
Also, the input sine wave has vertical symmetry axes going through every minimum and every maximum. But the output wave has no vetrical symmetry axis at all. It rises steeply into saturation and then lowers first slowly then more quickly into the other half of the waveform.
Now my question is: How can I model the above behaviour digitally?
First off, I will have to use a nonlinear mapping of the input samples, thus modeling the saturating tube stage of the amplifier. But that alone would not create an asymmetric wave from a symmetric one. I think I have to use some IIR filters after that.
So what do you think, by which criteria should I choose the filters?
Also, literature hints for digital amp modeling would be appreciated wink.gif
Go to the top of the page
+Quote Post
saratoga
post Aug 20 2013, 19:40
Post #2





Group: Members
Posts: 4926
Joined: 2-September 02
Member No.: 3264



SPICE is a pretty good way to model the behavior of analog circuits with relatively high accuracy. Its just really slow since you're doing a full time domain model of the underlying electronics rather than black boxing it.

If you want something less accurate but faster, take a look at Google scholar. People have proposed an enormous number of approximate models that simulate the nonlinearity and feedback of tube amplifier circuits without the full simulation of the underlying electronics, at least to some degree.
Go to the top of the page
+Quote Post
DVDdoug
post Aug 20 2013, 21:35
Post #3





Group: Members
Posts: 2568
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454



I think you just need to make a (non linear) transfer function. i.e. For small values, input = output. At larger values, you reduce the gain proportional to the input level, so you eventually get limiting/clipping.

You can use different transfer functions for positive & negative half-cycles.

Some low-pass filtering should help too. The waveform looks a lot like a clipped waveform through a low-pass filter.

Remember that the sound of a guitar amp also depends on the speaker & cabinet.

And, there may be another effect you are not seeing with a constant sine wave... If the power supply is unregulated (or intentionally "soft") You can get more power on the attack (when you pluck the string), and then the voltage starts to "sag", and you get clipping/limiting, or more clipping/limiting... Like a compressor/limiter with a relatively slow attack.

You should be able to get something of a "tube sound", but modeling the sound of a particular amp won't be easy, and it's going to take more than one measurement at one frequency and one output level. wink.gif

QUOTE
In the output, you can see, that the amplifier is Class-A
You really can't (practically) make a 100W class A amplifier!!! biggrin.gif Class-A amplifiers are something like 20% efficient, so it would need to consume 500W (even at low output-volume) and the output tube would have to dissipate all of that wasted power. Guitar amps are usually Class-A/B design (with 2 or 4 output tubes). The input/preamp stage could be class A, but a class-A amplifier can be just as linear as any other amplifier design. Or for a guitar amp, it might be designed to have "character".

One way to create asymmetry (in hardware) is to use different gains for the positive & negative half of the waveform. i.e. In the Class-A/B output stave, the "top" tube stage has different gain than the "bottom" tube stage. (I've read about that being done in guitar amps.... Actually I read about a guy who "fixed" a guitar amp by making both halves equal, and the guitar player was not happy with the reapair!)

This post has been edited by DVDdoug: Aug 20 2013, 21:38
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Aug 22 2013, 13:36
Post #4





Group: Members
Posts: 3706
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (gurkitier @ Aug 20 2013, 14:10) *
I'd like to dig into modeling tube amps with digital equipment. I have basic knowledge about DSP, FIR/IIR filters, phase shift in IIR filters and such.
Now for a try, I've ran a ~300Hz sine wave through an tube amplifier (OR120-like).
This is the sine wave:

This is the output:

The pictures are NOT centered vertically with respect to the y=0 axis.
In the output, you can see, that the amplifier is Class-A as the upper and lower half of the signal are amplified differently. The upper wave halves of the output wave are longer in time.
Also, the input sine wave has vertical symmetry axes going through every minimum and every maximum. But the output wave has no vetrical symmetry axis at all. It rises steeply into saturation and then lowers first slowly then more quickly into the other half of the waveform.
Now my question is: How can I model the above behaviour digitally?
First off, I will have to use a nonlinear mapping of the input samples, thus modeling the saturating tube stage of the amplifier. But that alone would not create an asymmetric wave from a symmetric one. I think I have to use some IIR filters after that.
So what do you think, by which criteria should I choose the filters?
Also, literature hints for digital amp modeling would be appreciated wink.gif


It kinda depends on what you want to do. If you want to experiment with the effects of component and circuit configuration changes on system performance with audio signals, then the SPICE model approach seems like the way to go.

If you want to experiment with the effects of various input-output characteristics on system performance with audio signals then you have other options. I'm not a Matlab guru (way over my pay grade) but I understand that it or possibly some freeware version of it would be the way to go. I seem to recall Woodinville posting something here lately about some software that might fit your need.

The basic idea is that you model the frequency response/impulse response of the amplifier with a linear model and model the input-output nonlinearities with a nonlinear model and cascade the two.

There are also hybrid approaches were you use SPICE models to develop parameters for Matlab (-like) mathematical models.
Go to the top of the page
+Quote Post
knutinh
post Aug 22 2013, 20:28
Post #5





Group: Members
Posts: 569
Joined: 1-November 06
Member No.: 37047



QUOTE (Arnold B. Krueger @ Aug 22 2013, 13:36) *
It kinda depends on what you want to do. If you want to experiment with the effects of component and circuit configuration changes on system performance with audio signals, then the SPICE model approach seems like the way to go.

If you want to experiment with the effects of various input-output characteristics on system performance with audio signals then you have other options. I'm not a Matlab guru (way over my pay grade) but I understand that it or possibly some freeware version of it would be the way to go. I seem to recall Woodinville posting something here lately about some software that might fit your need.

The basic idea is that you model the frequency response/impulse response of the amplifier with a linear model and model the input-output nonlinearities with a nonlinear model and cascade the two.

There are also hybrid approaches were you use SPICE models to develop parameters for Matlab (-like) mathematical models.

There are many tools for implementing algorithms on a PC. Some allow for realtime audio i/o (if your hardware is capable of doing the desired number-crunching). Some are free, some are not. In many cases, there will be a demo version/student version/limited trial available.

Common prototyping tools seems to be:
MATLAB
Octave
Python
LabView

Now, I think that the problem of doing good tube-amplifier/loudspeaker modelling is harder than implementing the math in some software language. Can you input the block-diagram of some tube amplifier into Spice and get a reasonable prediction of the response of a physical implementation of that circuit? I was under the impression that stuff like non-ideal transformers, heating etc made this task complicated.

Is there some sensible theoretical framework that can both describe e.g. tube-amps and be used as an aid for adapting the model to some given system, like the LTI framework does for things like room reverb? I had hoped that Volterra Series would be such a thing, but I am not so sure anymore.

-k

This post has been edited by knutinh: Aug 22 2013, 20:32
Go to the top of the page
+Quote Post
saratoga
post Aug 22 2013, 21:32
Post #6





Group: Members
Posts: 4926
Joined: 2-September 02
Member No.: 3264



Tubes are not linear nor time invariant and they tend to feedback a lot. So you're looking at a nonlinear system that is also recursive to some extent. Models are pretty much all you can use in this case, with complexity well correlated with accuracy.

Many have been proposed over the years.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 3rd September 2014 - 08:09