Hacker News new | past | comments | ask | show | jobs | submit login

> I don't know of any widely used definition of "clipping",

But there is one. In electrical engineering, it's any process that arbitrarily limits a signal's amplitude. By far the most common meaning is a signal that exceeds the voltage range of an amplifier or signal pathway.

> nor any definition that fits the context of this discussion, that allows for a signal's peak value not to be reduced.

See above.

> It's called clipping because the extreme values look to have been clipped away, as if by scissors.

Yes, but this can result from trying to pass a signal too large for the circuit, or it can mean an intentional scheme in which a fixed signal amplitude is truncated, the meaning you're discussing.

In the present discussion, in which a volume setting is increased until the speakers are jeopardized, the meaning is clear -- it's an increase in signal amplitude that the amplifier cannot support, resulting in the waveform being clipped at the maximum available amplifier voltage.

> The parts that have been clipped away contain energy, don't they? So won't the clipped signal will carry less energy than the original?

Not if the signal amplitude is increased. In the present discussion, the problem is being caused by raising the volume level too high, which causes the signal to exceed the available amplifier voltage. My diagram shows this case:

http://i.imgur.com/oE5NFZ9.png

The red trace is the maximum volume setting that the amplifier can support without distorting the signal. The green trace is a much higher volume setting that essentially reduced the output to a square wave. In both cases, the peak voltage is the same.

> When you take a sine wave of peak value 1 and clip it, what you get is not a square wave with a peak value of 1.

That depends on how you define "clip". If you increase the size of the sinewave, clipping takes place at the maximum voltage. If you clip by reducing the possible range of voltages, the sinewave remains the same size but maximum amplitude goes down. The present discussion revolves around the first of these choices.




We must be talking past one another. I thought I was speaking in the electrical-engineering sense of clipping (my undergrad studies were in EE).

In any case, to make sure we're talking about the same things, I'll be more formal. Let y(t) by a time varying signal. Now define a maximum amplitude V > 0. Let us say that clipping occurs at time t if |y(t)| > |V|. Define the clipped version of y to be w(t) = max(–V, min(V, y(t))).

Now:

Claim 1: |w(t)| <= |y(t)| for all t. That is, the clipped version of the signal is contained within the unclipped version. Proof: Follows from the definition of min, max, and V.

Claim 2: The clipped version carries less energy than the unclipped. Proof: Follows from Claim 1 and integration.

Now, here's where you lose me. The claim you made that sparked this conversation was this: "the resulting clipped waveform carries a lot more energy than an unclipped one." But this claim seems to contradict my Claim 2.

Can you show me how to reconcile these seemingly contradictory claims?

Edited to add: I'm not claiming that these claims can't be reconciled. Rather, I'm hopeful that thinking about the exercise will help us to see how we're talking past one another.


I think he or she's saying that the speakers were designed with the expectation that the largest signal it would handle is a sine waveform with amplitude = the dynamic range. So when a square waveform comes along (as a result of clipping a higher amplitude waveform) it drives the speaker with 2.4x more power than expected.


Here's the first crossroad, where we diverge:

> Now define a maximum amplitude V > 0.

The problem being discussed is one in which the user cranks up the volume such that the maximum volume level is far exceeded, and the amplifier circuit, which cannot reproduce the higher level, instead clips the waveform at the supply voltage.

> The claim you made that sparked this conversation was this: "the resulting clipped waveform carries a lot more energy than an unclipped one."

And it does, as you can see from this diagram:

http://i.imgur.com/oE5NFZ9.png

The red trace is the 100% volume level for the system, and it is not clipped. The green, "clipped" trace is far above 100%. It's really very simple.

> But this claim seems to contradict my Claim 2.

Yes. Your claim 2 doesn't apply to a case in which the maximum output voltage of the amplifier cannot reproduce the input waveform. So instead the amplifier clips its input signal at its voltage limits, as the above diagram shows.

The interesting thing about this analysis is that two ways to analyze it produce the same result.

If we use a simple integration of the unclipped and clipped cases, we see a power increase of 2.46, as discussed earlier.

If instead we use Fourier analysis to examine the harmonics of a sine wave and a square wave, the square wave's higher harmonic energies sum to 2.46 of the original sine wave's energy level in the speaker (but pi/2 above the sinewave voltage levels):

Sine wave harmonic lines = 1f

Square wave harmonic lines = (4/pi) sum(sin(2 pi f t (2k-1) / (2k-1),k,1,oo) (http://en.wikipedia.org/wiki/Square_wave#Examining_the_squar...)

The outcomes obviously have to come out the same. The above shows how they do it.


OK. I think I see where our signals are getting crossed. I look at your diagram and think, The green signal g is not what you get when you try to output the red signal r but the output stage clips it at the supply voltage (my V). Rather, the green signal g is what you get when you take the red signal r, amplify it by A = Infinity, and then try to output that new signal rA, which the output stage then clips.

For all A > 1, |rA| > |r|. Therefore, I have no problem agreeing that a clipped rA carries more energy than the original r. (In fact, this is just saying that bigger signals carry more energy, regardless of clipping.)

To me, your original statement read as though it made the following claim: If your amplifier tries to output a signal r but clips off the peaks, what you get out is a signal that carries more energy than r. (This is the claim I found hard to believe.)

But what you really meant (I think) was that, if you take a sine wave as input and, as a human controlling the volume knob, keep turning up the volume until the sine wave's maximum amplitude so far exceeds what the amplifier can reproduce that it comes out looking like a square wave, then that square wave carries more energy than the original, un-volume-adjusted sine wave. Is that what you meant?

If that's what you meant, I have no problem believing your claim. It's just that I wouldn't call turning up the volume knob to be part of the "clipping" process, but rather amplifying. When you turn up the volume knob, what you get out is always a "bigger" signal, even if it's clipped.


> It's just that I wouldn't call turning up the volume knob to be part of the "clipping" process, but rather amplifying.

But it is, indeed it's the most common example of clipping in engineering practice. Consider two alternatives -- one in which the amplifier is able to accommodate a great increase in volume without any distortion, and another in which it cannot.

In this image:

http://i.imgur.com/g8txTmC.png

The blue trace represents maximum normal volume (100%). The green trace represents a system in which the amplifier can accommodate a great increase in volume setting (200% of normal), simply because its power supply voltage is at least twice as high as that required for 100% volume. The red trace represents a system that cannot tolerate any volume settings greater than 100%.

In this diagram, the 200%-volume green trace has a higher subjective volume level than the 100%-volume blue trace (i.e. twice as high in voltage, four times as high in speaker power). The red trace, which would sound very distorted to the user, also has a higher power level than the 100% trace, but less than the green trace. The red trace is typical of systems that are limited to 100% volume by power supply voltage.

The red trace represents the most common example of "clipping" as it takes place in actual equipment and in engineering practice. Its output has more energy than the blue trace, and less than the green trace.

-- former NASA engineer


I agree with everything you wrote. Again, however, I think we're talking past one another. When you talk about clipping, you seem to mean turning up the volume until a signal clips. This both amplifies the signal and clips off its extremes. What I mean by clipping is to take a signal and clip off its extremes.

That sole difference explains our entire conversation. In your view, clipping involves making the signal bigger. That bigger signals carry more energy naturally leads to your claim. In my view, clipping a signal makes it smaller, leading to the opposite claim.

Thanks for sticking with me through the conversation.


Consider it in the frequency domain: clipping adds odd harmonics.

The fundamental frequency is reduced in energy a little bit, but the higher frequency harmonics end up containing relatively large amounts of energy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: