Measure harmonics: Hammerstein vs stepped tones
-
- KVRist
- Topic Starter
- 65 posts since 1 Apr, 2016
I have been using plugindoctor::hammerstein to analyze harmonic content, but I've noticed that harmonic response is different from measuring tone by tone.
By "tone by tone" I mean sending tones at different frequencies and measuring the amplitude of each harmonic to finally draw a curve joining the different points in the spectrum.
obviously I am misunderstanding , since I was convinced that the result should coincide with "tone by tone" method.
Why do these give different results?
Thanks!
By "tone by tone" I mean sending tones at different frequencies and measuring the amplitude of each harmonic to finally draw a curve joining the different points in the spectrum.
obviously I am misunderstanding , since I was convinced that the result should coincide with "tone by tone" method.
Why do these give different results?
Thanks!
-
- KVRist
- 284 posts since 3 Mar, 2004 from Denmark
How does the "hammerstein" method work? With an exponential sine sweep?
-
- KVRist
- Topic Starter
- 65 posts since 1 Apr, 2016
Yes
Yes, and from what I've seen, it has a length of 12 seconds.kippertoffee wrote: ↑Tue Nov 30, 2021 12:43 pm How does the "hammerstein" method work? With an exponential sine sweep?
-
- KVRist
- Topic Starter
- 65 posts since 1 Apr, 2016
I think I'm understanding what is happening. Being an exponential sweep sine, the low frequencies will have more predominance, so it will have more distortion.
Perhaps the correct way to analyze it is by sending a linear sweep sine.
-
- KVRist
- 374 posts since 4 Oct, 2002
Based on quick search it seems that hammerstein is system model, where you model nonlinear system as sum(Gn(x^n)) where Gn is some linear filter. If plugindoctor displays these estimated filters, it is not the same as for example Farina's approach (where you have spectrum per harmonic), especially for higher order harmonics.kippertoffee wrote: ↑Tue Nov 30, 2021 12:43 pm How does the "hammerstein" method work? With an exponential sine sweep?
-
- KVRist
- 284 posts since 3 Mar, 2004 from Denmark
The Decorrelation process accounts for the additional time spent at low frequencies. If done properly. I did a bit of work with using exp sine sweeps for measuring nonlinearities and if done right it should come out with the same results as tonal analysis. But without actually knowing what's going on under the hood in plugindoctor it's hard to say more.
I don't think you can decorrelate the higher order "impulse responses" when using a linear sweep. It's one of the nice properties of a exponential sweep that you can do that.
-
- KVRist
- 284 posts since 3 Mar, 2004 from Denmark
It's possible to extract the filters from sweep measurements. This references papers demonstrating how:urosh wrote: ↑Wed Dec 01, 2021 12:48 pm Based on quick search it seems that hammerstein is system model, where you model nonlinear system as sum(Gn(x^n)) where Gn is some linear filter. If plugindoctor displays these estimated filters, it is not the same as for example Farina's approach (where you have spectrum per harmonic), especially for higher order harmonics.
https://se.mathworks.com/matlabcentral/ ... in-toolbox
It does assume a certain model of nonlinearity though.
-
- KVRist
- 374 posts since 4 Oct, 2002
It is extracted via sweep, but these filters are not the same as "harmonic spectrums". x^3 for sine input will contain first and third harmonic, estimated filter for this will not be the same as spectrum of third harmonic alone.kippertoffee wrote: ↑Wed Dec 01, 2021 1:48 pm It's possible to extract the filters from sweep measurements.
-
- KVRer
- 7 posts since 19 May, 2020
Can someone please point me to some resources on how to read or interpret the Hammerstein visualization in PluginDoctor?
The manual does not really cover that topic at all. So I‘m not quite sure what I‘m looking at.
Googling it did not help a lot sadly, I’m just more confused about this.
As far as I understand we are looking at the harmonic content of a specific frequency, right?
The manual does not really cover that topic at all. So I‘m not quite sure what I‘m looking at.
Googling it did not help a lot sadly, I’m just more confused about this.
As far as I understand we are looking at the harmonic content of a specific frequency, right?
-
- KVRist
- 284 posts since 3 Mar, 2004 from Denmark
I agree with you, I think we were just using different terms. The link I provided gives a method for separating the actual "harmonic spectrums" from the higher order sweep IRs. So separating out first and third, etc.
- KVRian
- 669 posts since 2 Apr, 2005 from out there
Maybe to clarify this a bit: the peaks in a pure-tone harmonic analysis and in the Hammerstein graph are usually not the same. For instance, if you have a waveshaper like y = x + 0.1*x*x, in the Hammerstein graph you will see one contribution (flat over all frequencies) at 0 dB which comes from the "x" part, and one flat contribution at -20 dB that comes from 0.1*x*x (as you would expect it, because dB = 20*log10(volt)). In the Harmonic Analysis tab, you will see the two peaks, of course, but due to sin^2(x) = 1/2*(1 - cos(2*x)), the contribution at the 2nd harmonic will be at about -26 dB due to the "1/2" factor. You can use the excellent free FuncShaper by RS-MET (if you are on Windows) to experiment with different waveshaping functions and see what they do. It becomes even more complicated with higher terms, as there are contributions of the 2nd harmonic in the 4th harmonic, and so on.
Generally, Plugindoctor follows the approach shown at https://ant-novak.com/pages/sss/ very closely, for those who really want to dive into the mathematical details.
Generally, Plugindoctor follows the approach shown at https://ant-novak.com/pages/sss/ very closely, for those who really want to dive into the mathematical details.
-
- KVRist
- 284 posts since 3 Mar, 2004 from Denmark
Unless I'm mistaken, this part of the example code from that link adjusts for the 2nd order harmonic amplitude effect you are describing - and for higher order examples as well...docdued wrote: ↑Fri Dec 03, 2021 4:33 pm Generally, Plugindoctor follows the approach shown at https://ant-novak.com/pages/sss/ very closely, for those who really want to dive into the mathematical details.
Code: Select all
%% Estimation of filters Gm of Generalized Hammerstein model (Diagonal Volterra Kernels)
% Coefficients A of the transform between the Hm and Gm
A(N,N) = 0;
for n = 1:N
for m = 1:N
if ( (n>=m) && (mod(n+m,2)==0) )
% Eq. (48) of [Novak et al. (2010)]
A(n,m) = (((-1)^(2*n+(1-m)/2))/(2^(n-1)))*nchoosek(n,(n-m)/2) ;
end
end
end
% tranform the HHFR Hm to filters Gm
Gm = Hm/A;
-
- KVRist
- 284 posts since 3 Mar, 2004 from Denmark
Oh no, just realised what a load of shit I'm talking
Right you are!
Right you are!