• The move to the new server is done. There are some software and database maintenance updates in process. This has us passing the hat around to help out. We appreciate any donations. Seriously, even a dollar helps. The payment page may be found here - https://www.audiokarma.org/support.html

10kHz Square Wave - How To Use & Interpret It

THD+N

Portus
Subscriber
Apparently, asking questions and commenting from empirical experience is frowned upon depending on who you ask on this forum.

So, to everyone who uses test equipment and such, when you run a 10kHz square wave through your amp, at what power level do you use and why?

Also, do you perform a power response test?
 
Register to hide this ad
I generally run squares at 2 volts peak to peak on the scope. The idea is to test the response, not power output, and I don't want to try and produce enough power that there is any chance of the results being skewed because of amplifier or transformer power output limitations.

also I've found my scope tends to indicate seriously bogus things if the V/Div is set too high. Not sure what ails it but it will show overshoot on the leading edge on channel 1 that isn't really there at settings above 1v/div.
 
I use a 1W level. It's a step response measurement, so there is no use in exceeding 1W and risk harming the amp.

A 1W square wave has all the info you need to interpret your test results.
 
I haven't worked on tubes in a while but running a 10 kHz square wave doesn't sound like anything useful. I test with square waves a lot and can see everything I need to see at 1 kHz or less, usually a few hundred Hz. Depending on your test equipment, square waves can have way high harmonics that audio inputs and circuitry aren't designed for. There was an old analog signal generator, Interstate I think, with adjustable rise and fall times. The newer digital generators probably have that as well. It would be interesting to see how that affects test results.
 
I haven't worked on tubes in a while but running a 10 kHz square wave doesn't sound like anything useful. I test with square waves a lot and can see everything I need to see at 1 kHz or less, usually a few hundred Hz. Depending on your test equipment, square waves can have way high harmonics that audio inputs and circuitry aren't designed for. There was an old analog signal generator, Interstate I think, with adjustable rise and fall times. The newer digital generators probably have that as well. It would be interesting to see how that affects test results.

While it's true that you can "see" quite a bit at 1kHz, many of the more experienced builders here will recommend using a 10kHz square wave to take a more detailed look at any ultrasonic issues in a feedback amplifier that may lead to instability or oscillation.
 
Apparently, asking questions and commenting from empirical experience is frowned upon depending on who you ask on this forum.

So, to everyone who uses test equipment and such, when you run a 10kHz square wave through your amp, at what power level do you use and why?

Also, do you perform a power response test?

I seems to be generally accepted practice to test at 1 watt output. When working with a new type of output transformer, a power response test would appear to be a good indication of the transformer's strengths or shortcomings. Dave Gillespie's W5 thread spends a good bit of time documenting the power limitations imposed by the output transformer and how to overcome the problem.
 
when you run a 10kHz square wave through your amp, at what power level do you use and why?
The 10kHz square wave is useful as a general qualifier of a feedback amplifier's high frequency stability. The square wave causes the output signal to ring on the rising and falling edges at the amplifier's resonant frequency. This visible presentation allows one to suppress the unwanted energy - which can lead to oscillation - through various means. There is no reason to perform this testing with more than a volt or two of output, as the cause and effect are not amplitude dependent.

Square waves at significantly lower frequencies have no useful function. By its nature, the square wave does not allow quantitative analysis, nor does it present a meaningful indication of low frequency response. Frequency response requires swept sines or a calibrated noise source with spectrum analysis.

Also, do you perform a power response test?
I test output power at 1kHz and 20Hz. 20kHz is immaterial IMO because music contains only a small fraction of the average spectral power at that frequency. I do confirm small signal response over the entire spectrum.

Jack
 
Square wave testing at high power output levels can sometimes actually make a poor square wave look better, because the peaks of any ringing can get cut off, making the waveform look better than it really does. As a result, with square waves, I always test at a 1 watt power level (for power amplifiers), and at frequencies of 200 Hz & 2kHz for preamps, and 5, 10, or 15 kHz for power amplifiers, depending on how good the frequency response of the amplifier is. If I recall correctly, Tremaine states that to realistically pass a square wave faithfully, the circuit it is passing through must have a flat frequency response from one tenth to ten times the fundamental frequency of the square wave signal passing through it.

Dave
 
For power response, I do test for maximum undistorted power output (no visible or contorted sine wave break up) at 20 Hz, 1kHz, and 20 kHz, as sometimes, clipping can go pretty wonky at 20 kHz if too much NFB ( or feedback compensation) is used. Plus, it is reasonable to expect the power rating of any quality vacuum tube amplifier to be produced within 1 db across the full audio spectrum. As Jack says, little if hardly any power is really required at the highest octave, but still as a measurement tool, it is useful in assessing the capabilities of one amplifier to another. All else being equal, I’d rather have one with a flat power response across the entire audio spectrum, than not.

Dave
 
From just the perspective of assessing small-signal high frequency response of a valve amp with GNFB, imho it is the edge transition of the waveform that needs to be fast enough to ring the transient response of the output stage's feedback loop and typically allow output transformer resonances to be observed (especially those in say the 50kHz to 500kHz range).

For that application, I'd suggest that the frequency of the squarewave doesn't matter, apart from allowing your waveform capture and display to show you what happens. On some scopes, that can be easier to discern using say a 10kHz signal as the transient response may then extend to an appreciable portion of the top or bottom being displayed, but if your scope can just as easily zoom in to the edge related response using say 100Hz then you should see the same detail (although you should check both transitions of the squarewave). Not all signal generators, or interfacing circuitry in an amp, allow the basic performance of the power stage to be assessed if they allow the edge transition to be mollified before it gets to the output stage.

For this type of assessment, small signal testing avoids introducing unexpected or complicating responses into the waveform you are trying to observe, especially if the amp has a high frequency gain peak that may well be pushing into non-linear operation just short of outright oscillation.
 
Tremaine states that to realistically pass a square wave faithfully, the circuit it is passing through must have a flat frequency response from one tenth to ten times the fundamental frequency of the square wave signal passing through it.
A bandwidth of 10X the fundamental will indeed present a reasonably good square wave. However, the issue of low frequency contribution to the wave's structure isn't so simple. A square wave contains no energy below the fundamental. Because of this, amplitude response below the fundamental of the wave has no effect on its appearance. The tilt that appears on the top and bottom of the wave when the rolloff begins below the fundamental is in fact due to phase shift. The phase shift created by a circuit acting as a high pass filter extends into the region well above its cutoff frequency, and that affects the phase relationship between the fundamental and lower harmonics that comprise the square wave. For this reason, it's not clear to me that the 1/10 rule will necessarily apply. I would expect the end result to vary as a function of the Q of the circuit creating the rolloff. All these concepts can be demonstrated with SPICE simulations.

Jack
 
Last edited:
I also test using 10KHz square wave at 1W output. It's much more useful for stability testing with a variety of output loading options when tuning the amplifier than the sine wave. Any oscillations are showing up quickly due to the abrupt nature of the signal as I understand. One thing I'd like to learn is how to "read" the frequency region of instability or excessive ringing on 10KHz square wave display. This is probably fundamental knowledge that many here know from their formal education. Is there a simple explanation or tutorial for hobbyists?
 
One thing I'd like to learn is how to "read" the frequency region of instability or excessive ringing on 10KHz square wave display.
You have to zoom in on the ripple at the leading and trailing edges with a scope and calculate its frequency. My analog scope has delayed sweep for this. I trigger on the main 10kHz wave, then use delayed sweep to magnify the area of interest. I'm sure a high frequency spectrum analyzer could also be used for this purpose.

Jack
 
You have to zoom in on the ripple at the leading and trailing edges with a scope and calculate its frequency. My analog scope has delayed sweep for this. I trigger on the main 10kHz wave, then use delayed sweep to magnify the area of interest. I'm sure a high frequency spectrum analyzer could also be used for this purpose.
I have Tektronix scope that probably has a lot of useful functions but I don't know them. Still using my 20 MHz Tenma scope for its simplicity.
Is the horizontal pane between leading and trailing edges represent frequency in logarithmic scale? I'd love to have an expansion on this subject
 
The ringing after the edge of the squarewave is interpreted by its magnitude, dampening and frequency.

Suppressing the initial squarewave overshoot magnitude is effectively lowering the magnitude of a resonance peak on a spectrum plot (eg. a flat frequency spectrum out past the audio band that then decides to rise up to a single peak at say a 100kHz resonance). That peak is likely impacting the gain margin of the feedback loop, so bringing the peak magnitude down towards a 'flat' response is a typical aim of say the compensation capacitor across a feedback resistor.

The rate at which the ringing waveform damps itself to nothing relates to the effective Q of the L, C and R parts that cause the resonance. That aspect is typically not able to be managed by external circuit compensation parts.

The frequency of the ringing is typically easy to determine if there is just one single dominant peak in the response. Frequency is the reciprocal of cycle duration on the scope waveform. So a simple 100kHz resonance would exhibit a ringing waveform where you could identify each single cycle of the waveform having a span of 10 microsecond (100,000 Hz = 1/0.00001 sec). Perhaps best to try and eyeball the number of scope x-axis divisions that make up single up-and-down dampening sinewave portions, and then repeat for further along the ringing waveform to confirm the same number of divisions - then identify your scope timebase for x-axis divisions - so a 100kHz sinewave that spans 1 major division on the x-axis would occur for a 10us/div timebase setting. Some transient ringing waveforms damp down very quickly, making it quite difficult to identify a single full cycle of a waveform from which to 'measure' the time duration. Similarly, some transient waveforms are a blend of multiple resonant frequencies, making it similar difficult to discern the lowest frequency in a messy waveform. And some responses just have a low level of undulations from which not much can be deduced except that there is no obvious ringing aspect - which is good!

A typical analog or digital scope would display the x-axis in a linear format of say 10us/div, which for a display screen that had 5 major divisions to the left of the centre-line, and 5 major divisions to the right, would provide a full screen width of 10 major divisions, such that 10x10us=100us. In that case, a 10kHz squarewave would show up as one 'cycle' across the full width of the graduated screen (ie. the horizontal shift could be used to position a transition at the full left side, the middle, and again at the full right side).

If you were lucky enough to have a spectrum analyser or Bode style plotting scope and software (eg. a few of us now have a Picoscope and FRA4 software to do this, and to show off the frequency spectrum response) then the squarewave ringing frequency calculation should align with a frequency spectrum peak, and the peaks magnitude should rise and fall with changing say compensation capacitor value.
 
Last edited:
Is the horizontal pane between leading and trailing edges represent frequency in logarithmic scale?
It's a linear scale. The idea is to zoom in so several cycles of the ringing are present across a few horizontal divisions, then read the sweep rate for that section of the display. The delayed sweep function on analog scopes has a second horizontal sweep knob that's usually concentric with the main sweep selector. It points to the time/div being viewed when delayed sweep is activated.
Some transient ringing waveforms damp down very quickly, making it quite difficult to identify a single full cycle of a waveform from which to 'measure' the time duration.
In the absence of a phase advance cap and other stabilization methods, the ringing will usually be pretty pronounced. In my experience, the ringing frequency doesn't shift when those techniques are (re)employed to dampen the wave. Also, it's not necessary or even particularly useful to determine the exact frequency. Because tuning is mostly a cut and try process, the difference between, say, 120kHz and 160kHz likely won't change the procedure or impact the degree of difficulty. 60kHz would be a different story, because it's close to the upper end of the 20kHz hi-fi band.

Jack
 
There are a few reasonably priced software based audio testing solutions available. After the tests are set-up (depending on what you want to measure), you just hit the "Go" button and get a sweep of data. Some of these solutions, if they use your computer sound card, are not the greatest for very low THD numbers but for everything else, they are great.

Picoscope is one. I don't have one, but if my AP ever fails (ugh), I'd look into the Picoscope.
 
I'm sort of considering swapping my 40 year old analog scope that is developing some issues for something that doesn't eat so much bench space and basically just works. Having something that lets me just click a button and get response and THD and all that data gathered in moments vs a lot of manual datalogging sure sounds appealing.
 
FWIW, if you get one of the popular Siglent SDS800X series scopes, it will connect to their waveform generators with a USB cable and give you built-in bode plots. Check for model compatibility, but this is a reasonably priced solution if you need 12-bit scope and waveform generator anyway.
 
Some of these solutions, if they use your computer sound card, are not the greatest for very low THD numbers but for everything else, they are great.
I use ARTA and a M-Audio PCI card in an old Win XP machine. The PC is dedicated to this use and resides on my workbench. This system allows frequency response sweeps to within fractions of a dB and can be calibrated to extract a saved baseline from the measurement. That lets me insert a reverse RIAA for calibration, then test a phono preamp to produce a flat line. The system THD in loopback mode is 0.00025%. This is sufficient for any type of tube gear and even for most solid state equipment. One of the best things about this approach (and the reason I didn't buy a Sound Tech or HP distortion analyzer) is the display of spectral content. This has been extremely useful for characterizing and tuning amplifiers.

It cost very little to assemble this system compared to most other methods. The main shortcoming is hum and noise. The PC environment creates a fairly high level of residual 60Hz and 120Hz, so I never measure THD+N with this system. In fact, I have never found that particular measurement to be meaningful. THD and noise are two different quantities and wholly unrelated to each other. I see no reason to ever combine them into one measurement, and always measure them separately. For the latter, I'm using a high quality AC millivolt meter (Ballantine) that I restored a few years ago. Again, an inexpensive solution.

I realize not all sound cards will provide such a low level of residual distortion. However, compared to vacuum tubes, I suspect most are more than adequate for the needs of DIY builders.

Jack
 
Back
Top Bottom