So, I guess this might not be really possible? My basic idea was just to spot the differences between input and output after processing and applying them to another signal. The reason why I thought the signal should gain in volume was that I'd have "difference spectrums" for every possible input volume. Of course, this might be tricky to do, but if the CPU power would be enough to do this in realtime, wouldn't this "different volumes" thing eliminate some of the "non-linearity" problems? (I'm not a good mathematican, so please understand if my stuff sounds a bit silly :) but I was able to program a parametric equalizer, so at least I understand the basic FFT stuff. But try to avoid answering with mathematic formulas only :D )
Would this approach be possible (for analog modeling)?
Started by ●July 30, 2007
Reply by ●July 31, 20072007-07-31
Reply by ●July 31, 20072007-07-31
Rock Lobster wrote:> So, I guess this might not be really possible?The above discussion was on the use of FFT as analysis tool for non- linear systems. Modeling non-linear systems is a different story, and has been done before.> > My basic idea was just to spot the differences between input and output > after processing and applying them to another signal. The reason why I > thought the signal should gain in volume was that I'd have "difference > spectrums" for every possible input volume. Of course, this might be > tricky to do, but if the CPU power would be enough to do this in realtime, > wouldn't this "different volumes" thing eliminate some of the > "non-linearity" problems?Somebody already cooked up (and patented, I believe) an algorithm that is similar to your ideas: http://www.sintefex.com/docs/appnotes/dynaconv.PDF It describes an alternative to the Volterra Series approach for modeling non-linearities. I don't know how well it works (never heard it), but Sintefex is using the algorithm in their pro-audio "vintage gear modelling" units (a guitar amp can also be described as "vintage gear" in these days of virtual guitars :-), and just received an award for their technology (details on their website).> > (I'm not a good mathematican, so please understand if my stuff sounds a > bit silly :) but I was able to program a parametric equalizer, so at least > I understand the basic FFT stuff. But try to avoid answering with > mathematic formulas only :D )The level of maths in that article doesn't exceed the usual convolution sums. The idea is to interpolate different filters, depending on the level of the input signal. Regards, Andor
Reply by ●August 9, 20072007-08-09
Hi, I may have a good answer, although I'm not sure if it still fits your question anymore... Using FFT to get a simple frequency response is a standard technique. Divide FFT(out) by FFT(in) sample-by-sample (complex), and you'll get the complex frequency response. IFFT gives you the impulse response, plug that into a convolutional reverb and you'll get exactly the undistorted amp sound (probaby with a huge delay but still). But you seem to be after a model for the amplifier nonlinearity. That works even without FFT: - Create a suitable test signal, record some low and high notes. The better the statistics of your model match what's later encountered during operation, the more accurate the model (in a least-squares sense). - Play the signal, record the output, oversample as needed, time-align input and output signal. Alignment accuracy is most critical. - Build a set of base vectors [1; x; x^2; x^3; x^4; ...] where x is your input signal - Use the backslash operator in matlab to decompose your recorded signal into the base vectors, least-squares sense. If you get warnings about rank, use less terms. - the result vector gives the polynomial coefficients for your amplifier nonlinearity. Double precision arithmetics may allow using for example up to 17th order. - Evaluate the polynomial at 100 different points, straight line interpolation in-between works OK. That's the model of your amplifier nonlinearity. If you want to take frequency response into account, include delayed signals as your base vectors. This already goes towards simple Volterra series modeling. I've been wondering for a while whether this works for guitar, but it sure does work for radio frequency amplifiers. I use this frequently in the lab, a two-tap model usually leaves about 1/10000 of the received signal power unexplained (-40 dBc). If interested, search for AMAM/AMPM model for power amplifiers on the web. The difference is that you use only real numbers, so there is no AMPM, and your polynomial coefficients are real valued. The method works for weakly nonlinear systems, you may be out of luck with fuzz or heavy sounds Cheers Markus PS: I might post some example code on a dsprelated.com blog in a while (assuming it actually works with audio amps). Stay tuned...