4 ms·
It's a deceptively tricky DSP problem. The surface issue is that nonlinearities create harmonics that wrap around the Nyquist frequency, which creates aliasing.
by unlinked_dll 7y ago
It's a deceptively tricky DSP problem. The surface issue is that nonlinearities create harmonics that wrap around the Nyquist frequency, which creates aliasing. To deal with it you oversample, which introduces some frequency/phase distortion, and in the cutting edge solutions they run at 8-16x oversampling (which means 8-16x more CPU cycles for the distortion algorithm). And it gets worse with heavier distortion.
On the algorithm side there has been some crazy good work with creating black box models using Volterra Series and dynamic convolution, but it's an O(n^2) algorithm (although I believe there's an O(logn) solution out there). The top of the line modeling amps (mostly Kemper, there are a few others) use these approaches among others to give you hundreds of amps at your fingertips, and they sound great. Plenty of high profile bands use them, Metallica probably the most prolific.
I bet someone has applied convolutional neural nets to the problem, since I'd suspect they're exceptionally well suited for black box modeling of nonlinear distortion. Sub in an atan(kx)/atan(k) for your activation function and each neuron would be it's own first order model of a tube stage. The asymmetry might be more difficult to handle, which is where a lot of the warm tube goodness comes from.
The UI problem is well known. That's really what sets one amp design apart from another. No tube amp is particularly unique in signal path or component choice, the ability to dial in a tone is the secret sauce behind the classic designs imo, also why some newer models from Marshall are so much worse than newer guys on the block, but that's just my opinion.
- dsharlet 7y ago> which introduces some frequency/phase distortion I agree with everything you said here, except this. Can you explain this? Why does oversampling introduce distortion?
- unlinked_dll 7y agoBecause upsampling requires interpolation. I'm using distortion in the abstract/academic sense here. Any signal through a non ideal (or nontrivial, eg a gain) system will introduce distortion, harmonic being new energy at different frequencies, frequency distortion in the relative magnitude at the output that is different than the input, and the same for phase. If you use a polynomial interpolator there will be harmonic distortion. If you use an interpolation filter there will be frequency distortion, which is highly correlated to the phase distortion. What that distortion is and if it is perceptible depends on your design and constraints. But the key element that is at play here is that oversampling for nonlinear system modeling, which introduces harmonic distortion after the fact, is that it can amplify frequency (and therefore phase) distortion and your constraints are tighter than they normally are. If you want an example take a the ideal interpolator, which is a sinc function. Because a true sync is non causal you cannot implement it, therefore lossless interpolation is not achievable. There will always be some loss of information, the design problem is trading off that loss with the resources required. We can do pretty damn good upsampling today however.
- analog31 7y agoOne thing that might work in our favor here, is that for this particular application -- simulating a guitar amplifier -- we are only dealing with the subset of behaviors that are physically realizable in an electronic circuit.