Distortion Surface: old measurement, new approach

Discussion in 'Audio Science' started by atomicbob, Sep 4, 2023.

  1. rfernand

    rfernand Almost "Made"

    BWC Contributor
    Joined:
    Oct 10, 2022
    Likes Received:
    732
    Trophy Points:
    93
    Location:
    Kirkland, WA
    My example is deliberately over-smooth.
     
  2. Armaegis

    Armaegis Friend

    Pyrate BWC
    Joined:
    Sep 27, 2015
    Likes Received:
    7,599
    Trophy Points:
    113
    Location:
    Winnipeg
    Ok see, now I want a program that lets me map the individual harmonic surfaces, overlays them all on a glorious 3d plot, then make it interactive and let me put in coefficients for each harmonic. I want multi-visualizations to really draw out potential patterns.
     
  3. Biodegraded

    Biodegraded Friend

    Pyrate Contributor
    Joined:
    May 28, 2017
    Likes Received:
    8,153
    Trophy Points:
    113
    Location:
    Vancouver BC
    Near 3000 Hz, I think you mean :)

    Interpolation. The input data are sparse - see @rfernand 's table, there are 4 5 data columns: 50, 100, 500, 1000 & 5000 Hz - so different contouring routines used by different programs might be expected to produce different results (and some might have options for contouring algorithm or degree of smoothing). Here's yet another example (yes that's a log scale along the bottom, but I couldn't figure out how to make this program number it correctly):

    [​IMG]

    The low-distortion area in @atomicbob 's 3F graph is between columns of data points. Obviously to be comparable, graphs for different amps produced from these sorts of data distributions should use the same contouring parameters.
     
    Last edited: Sep 11, 2023
  4. Clemmaster

    Clemmaster Friend

    Pyrate Contributor
    Joined:
    Sep 28, 2015
    Likes Received:
    3,274
    Trophy Points:
    113
    It's just the depth of the colormap. Bob is using a more coarse map (with ~20 levels), while the others are probably using smoother maps (256?).
     
    • Agreed, ditto, +1 Agreed, ditto, +1 x 1
    • List
  5. dasman66

    dasman66 Self proclaimed lazy ass - friend

    Pyrate Contributor
    Joined:
    Mar 13, 2018
    Likes Received:
    2,535
    Trophy Points:
    113
    Location:
    NW Pennsylvania
    Yes... :oops::rolleyes:o_O

    I get the issue with interpolation/color mapping, etc. But colormap on AtomicBob's matched the 3d plot/stealth fighter plot. The other colormaps do not appear to match. If the data input was enough to create the stealth fighter shape in 3d, then I think it would be enough data to generate a similar looking profile.
    I guess that's my point. If the graphs use the same data set, then the hope would be that they generate similar graphs... or yet we come up with yet another way for other sites to fudge/tailor to results to their "benefactors".
     
  6. Biodegraded

    Biodegraded Friend

    Pyrate Contributor
    Joined:
    May 28, 2017
    Likes Received:
    8,153
    Trophy Points:
    113
    Location:
    Vancouver BC
    No, it's more than that. The 'hole' centred around -5 dBu & 3kHz in Bob's 3F graph is down in the high -90s dB distortion because a trough has been interpolated into that area from the high -90s data points at the top of the 5k column. But in the @rfernand & @earnmyturns graphs, and mine, the same areas are ~10dB less -ve.
     
    Last edited: Sep 11, 2023
  7. Biodegraded

    Biodegraded Friend

    Pyrate Contributor
    Joined:
    May 28, 2017
    Likes Received:
    8,153
    Trophy Points:
    113
    Location:
    Vancouver BC
    Many bad decisions on where or whether to drill expensive oil wells have been made on interesting contouring of sparse data by promoters keen to sell their prospects. I'm happy to be retired :p
     
  8. artur9

    artur9 Facebook Friend

    Joined:
    Sep 6, 2016
    Likes Received:
    172
    Trophy Points:
    43
  9. earnmyturns

    earnmyturns Smartest friend

    Pyrate
    Joined:
    Sep 25, 2016
    Likes Received:
    3,265
    Trophy Points:
    113
    Location:
    Palo Alto
    Home Page:
    Contours, they make the "hole" more evident:

    [​IMG]
     
  10. rfernand

    rfernand Almost "Made"

    BWC Contributor
    Joined:
    Oct 10, 2022
    Likes Received:
    732
    Trophy Points:
    93
    Location:
    Kirkland, WA
    Huh huh huh… hole… heh heh heh
    [​IMG]
     
    • Like Like x 5
    • Epic Epic x 1
    • List
  11. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,976
    Trophy Points:
    113
    Location:
    On planet
    I am delighted to see so many exploring the possibilities this new approach has to offer.

    Taking the plunge and updating my PSIPlot from v8 to v10.5 I find the addition of macros, templates, projects, etc. All of which facilitate automation and less work from input to outputs desired.

    Some thoughts on why the data capture was so time consuming as a manual process:
    Distortion vs Amplitude - Amp 50 Hz manual data export step 1 annotated.png
    First step was to run a sweep at a particular frequency. Then select each trace individually and turn off the trace marks which are distracting to the analysis at hand. And again select each trace individually for export.

    Distortion vs Amplitude - Amp 50 Hz manual data export step 2 annotated.png
    Upon selection of a trace press the button to display a list of values for the trace. Then select export to CSV. Note the columns this method will export.

    Distortion vs Amplitude - Amp 50 Hz manual data export step 3 annotated.png
    Now manually enter a descriptive filename for the CSV data to reside in. Repeat for each trace on the sweep.
    Then sweep for each frequency. Many manual operations.

    dScope automation has multiple methods. I use a hybrid of measurement setups used in an auto-sequence and the built-in VBScript language which can take care of housekeeping at the end of a measurement sweep:
    Distortion vs Amplitude - Amp dScope VBScript fragment.png
    With this combination approach I have been able to export only the data I wish, into columns desired and reduce many manual steps. Now the data capture is about 30 minutes instead of several hours with great reduction in potential errors from operator manual filename entries. There still is a need for a shell script to concatenate the data output and then copy results to a directory associated with the component being measured.

    Next is import into my plotting program using a template followed by a macro to generate the desired outputs.

    Last step is into a picture manipulation editor for watermarking and any desired annotation.
     
    • Like Like x 6
    • Epic Epic x 3
    • List
  12. purr1n

    purr1n Desire for betterer is endless.

    Staff Member Pyrate BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    90,228
    Trophy Points:
    113
    Location:
    Padre Island CC TX
    dScope software is betterer than APx555 in more than a few ways, especially if you want to do science. APx555 seems better for Internet e-peening. Saying this as an APx555 owner.

    On the graphs (or any visualization method) - IMPORTANT:
    • Indicate the area of interest / actual usage. For measurement into a given load (which likely indicates a large set of headphones), there will be an area where the amp will be typically used. That is, no one listens to music at 100db. Best to point out the output levels of the where people will listen between 60-90db. @atomicbob already did this.
    • Limit THDN or distortion floor to -100db. CDs, Spotify, microphone preamps aren't going to do better than this. Measurements for the sake of measurements doesn't make sense. Noted already done here. Just mentioning it in case some goofball who claims interest in science perverts the idea and starts to go down to -140db.
    • The BBC THD idea is worth considering. Punishes higher harmonics. Not 100%, but decent correlation with this in my listening experience.
     
    • Like Like x 2
    • heart heart x 1
    • List
    Last edited: Sep 12, 2023
  13. Biodegraded

    Biodegraded Friend

    Pyrate Contributor
    Joined:
    May 28, 2017
    Likes Received:
    8,153
    Trophy Points:
    113
    Location:
    Vancouver BC
    (This might be better in the distortion thread, but...): For history buffs, the source for this that's usually quoted is

    DEL Shorter (1950) The influence of high-order products on non-linear distortion: Electronic Engineering 22, p. 152-153.

    I haven't been able to find this online, but a preliminary report available here which also gives the formula is

    DEL Shorter (1949) An investigation into non-linear distortion - first interim report: BBC Research Department Report 1949/30, 7pp.

    Some great quotes in this one, e.g.: "... cases arise in which the non-linear distortion observed subjectively is not proportional to that expected from the customary measurements."; "It has long been recognized that high-order harmonics are more offensive than low ..."; and the one in my sig. There's also reference to a 1937 Radio Manufacturers Association publication noting the same effects and proposing a (different) weighting factor.

    Whatever sort of correction might be found most appropriate, whether it be a BBC-like weighting or something like @atomicbob 's crap factor, it's interesting that the observed-vs-measured (THD) disconnect has been talked about for so long yet apparently remains unknown to certain "Audio Science" experts.
     
  14. Dzerh

    Dzerh Friend

    Pyrate
    Joined:
    Apr 1, 2018
    Likes Received:
    425
    Trophy Points:
    63
    Location:
    San Ramon, CA, US
    Just a thought, - maps for harmonic distortions may exhibit correlation between shapes and "second order" sound characteristics ("airy", "smooth", "open" etc)
     
    • Like Like x 1
    • Agreed, ditto, +1 Agreed, ditto, +1 x 1
    • List
  15. earnmyturns

    earnmyturns Smartest friend

    Pyrate
    Joined:
    Sep 25, 2016
    Likes Received:
    3,265
    Trophy Points:
    113
    Location:
    Palo Alto
    Home Page:
    Great update! When you have the intended exported data format, please post it here, and I'll try to package and share my Python script to read it and generate graphs like the ones I shared above.
     
  16. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,976
    Trophy Points:
    113
    Location:
    On planet
    Here are the current formats with about 90% of the process automated. Still more manual steps in this latest development than I would like. Have been splitting my time between this and creating All-In-One measurement suite for iFi Diablo which has some unique challenges combing DAC and Amp into a single measurement set with multiple 0 dBFS output levels depending on mode.

    The contour map Legend will range all the way to Red if I obtain data above -48 dBu or create a fake data set to generate the Legend and then make a template from that. On the todo list.

    Frequency data sets are acquired using a 1-2-5 sequence, which was always the plan. However given the entirely manual process at the beginning I chose to leave out 200 and 2000 Hz.
    Data set frequencies: 50, 100, 200, 500, 1000, 2000, 5000 Hz.

    iFi Diablo at 300R in ECO mode, balanced output.
    01 Diablo THD+N surface + contour 300R annotated.png

    02 Diablo D2 surface + contour 300R annotated.png

    03 Diablo D3 surface + contour 300R annotated.png

    04 Diablo 4+HD+N surface + contour 300R annotated.png

    05 Diablo THD+N contour 300R annotated.png

    06 Diablo D2 contour 300R annotated.png

    07 Diablo D3 contour 300R annotated.png

    08 Diablo 4+HD+N contour 300R annotated.png

    09 iFi Diablo Distortion vs Level vs Freq.gif
     
    • Epic Epic x 5
    • Like Like x 3
    • List
  17. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,976
    Trophy Points:
    113
    Location:
    On planet
    DSHA-3F 300R load:
    01 DSHA-3F THD+N surface 300R annotated.png

    02 DSHA-3F D2 surface 300R annotated.png

    03 DSHA-3F D3 surface 300R annotated.png

    04 DSHA-3F 4+HD+N surface 300R annotated.png

    05 DSHA-3F THD+N contour annotated.png

    07 DSHA-3F D2 contour annotated.png

    08 DSHA-3F D3 contour annotated.png

    06 DSHA-3F 4+HD+N contour annotated.png

    09 DSHA-3F_Distortion vs Level vs Freq.gif
     
    • Epic Epic x 8
    • Like Like x 4
    • List
    Last edited: Sep 13, 2023
  18. purr1n

    purr1n Desire for betterer is endless.

    Staff Member Pyrate BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    90,228
    Trophy Points:
    113
    Location:
    Padre Island CC TX
    For clarity... just to drive home the point as simply as possible.

    upload_2023-9-13_8-57-14.png
     
    • Like Like x 8
    • heart heart x 2
    • Epic Epic x 1
    • Agreed, ditto, +1 Agreed, ditto, +1 x 1
    • List
  19. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,976
    Trophy Points:
    113
    Location:
    On planet
    For those wishing to play with visualizations I've attached the DSHA-3F sweep data sets.
     

    Attached Files:

  20. rfernand

    rfernand Almost "Made"

    BWC Contributor
    Joined:
    Oct 10, 2022
    Likes Received:
    732
    Trophy Points:
    93
    Location:
    Kirkland, WA
    Limited to 16 colors this time:

    sample2.png

    And only the relevant region:
    sample3.png

    Really appreciate the culture of sharing data. Offer stands to set up a (private) GitHub repo for data and code sharing in the spirit of reproducibility.
     
    • Like Like x 6
    • Epic Epic x 4
    • List

Share This Page