# Clipping a sine wave

#### jun 2008

Clipping a sine wave (especially at the a/d converter) will create harmonics and intermods. To show what occurs a model was made with:
• complex sine wave with 16 cycles in 4096 points.
• noise added to sine wave 1e-9 of amplitude of sine wave
• sine wave is clipped at 70% of maximum/minimum. This is done for real,imaginary and then just for real.
The plots show the clipped sine wave results (.ps) (.pdf):
• Page 1: time domain samples. top real samples, bottom imaginary samples. Horizontal offsets have been added for display puroses.
• black: no clipping
• red: clip positive, negative amplitudes to  +/- .7
• green: clip the real single to +/- .7 .
• blue:  clip +/- amplitudes. Add .1% dc offset to both real and imaginary.
• purple: clip +/- amplitudes. Add .1% dc to real and -.2% dc to imaginary
• Page 2: spectra:
• The vertical dotted green lines are every 16 cycles (the period of the sine wave).
• top: the spectra without any clipping.
• There is 1 spike at 16 cycles.
• 2nd: clip sine to +/- .7
• for a single rectangle harmonics would appear at 1,3,5,7,9 odd harmonics
• When clipping both the positive and negative peaks of a sine wave, you get 2 rectangles for each period of the sine wave, it's just that one is inverted. Since the rectangles occur twice as often they are spread twice as far in the frequency domain: 1,5,9...
• 3rd:  Clip just the real signal to +/- 7.
• The I,Q phase is now lost for the clipping (real but not imaginary clipped) so we get an image in the other side.
• They now occur at 1,3,5,7
• 4th: Add .1% to each clipped sine wave.
• We now get mixing products between dc and the sine wave. The appear on both side of the sine wave spaced by the sine wave frequency.
• 5th: Add .1% dc to real, -.2% dc to imaginary.
• There is now an asymmetry between real and imaginary so we get an image in the other side. They show up at -1, +3...
• Page 3: Blowup of spectra showing amplitudes of spikes.
• this is the same as page 2 but I've blown up the vertical scale so you can see how large the spikes are:
The table below shows the amplitudes of the first harmonic on the left (+5th) and first negative (-3rd) for +/- clipping of the amplitude with no dc offsets  (the red plots)

 clipping Level -3rd Harmonic +5th harmonic .9 -30 -33 .7 -18 -32 .5 -13 -27 .3 -11 -18
processing: 101/080624/clippedSineWave.pro

page_up