Hi, I am looking for ways to do soft-clipping of waveform, so as to reduce the crest factor of the signal. Can anybody point me to the right direction, or advise the rough overall idea behind it. The implementation will most likely be in FPGA, but anything will do. Thanks _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?
soft clipping of waveform
Started by ●April 4, 2007
Reply by ●April 4, 20072007-04-04
paulwu wrote:> Hi, > > I am looking for ways to do soft-clipping of waveform, so as to reduce the > crest factor of the signal. Can anybody point me to the right direction, or > advise the rough overall idea behind it. > > The implementation will most likely be in FPGA, but anything will do. > > Thanks >Paul, The basic idea behind soft clipping is to map your samples to a curve which is linear in the "unclipped" region and rolls gently towards full scale in the "clipped" region. For example, if you have a system with samples in the range [-1, 1], but some data which needs to be clipped going up to [-5, 5] and want to soft clip to the domain [-1, 1], then you will use a curve which gives results along these lines: In Soft Clip Hard Clip Compressed 0.1 0.1 0.1 0.02 0.5 0.5 0.5 0.1 0.9 0.9 0.9 0.18 1 0.95 1 0.20 2 0.975 1 0.4 4 0.99 1 0.8 5 1 1 1 Exactly how that mapping looks, and which curve you use depends on the application. What application do you have in mind? Cheers Marc> > > _____________________________________ > Do you know a company who employs DSP engineers? > Is it already listed at http://dsprelated.com/employers.php ?
Reply by ●April 4, 20072007-04-04
paulwu wrote:> Hi, > > I am looking for ways to do soft-clipping of waveform, so as to reduce the > crest factor of the signal. Can anybody point me to the right direction, or > advise the rough overall idea behind it.The total amount of distortion produced by clipping equals to the difference between the straight line and the clipped line. You can trade the high order nonlinear products vs low order products by making a softer knee, but this is generally not going to do much of improvement.> > The implementation will most likely be in FPGA, but anything will do. >You can try log() or sqrt() type of curve, however I don't think it will buy you anything compared to just hard clipping of the signal. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●April 4, 20072007-04-04
On Apr 4, 9:43 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> paulwu wrote: > > Hi, > > > I am looking for ways to do soft-clipping of waveform, so as to reduce the > > crest factor of the signal. Can anybody point me to the right direction, or > > advise the rough overall idea behind it. > > The total amount of distortion produced by clipping equals to the > difference between the straight line and the clipped line. You can trade > the high order nonlinear products vs low order products by making a > softer knee, but this is generally not going to do much of improvement. > > > > > The implementation will most likely be in FPGA, but anything will do. > > You can try log() or sqrt() type of curve, however I don't think it will > buy you anything compared to just hard clipping of the signal. > > Vladimir Vassilevsky > > DSP and Mixed Signal Design Consultant > > http://www.abvolt.comI worked on a digital system that required clipping like this and there is an interesting issue to be aware of. Any kind of clipping will produce harmonics and your sampling rate must be high enough to accommodate ALL the harmonics that the clipping generates or you will get ugly aliasing. I'm not sure if there is an elegant solution to this is. If I recall , the solution we considered was to use a clipping function that produced harmonics only to a limited order say up to only 4th order harmonics and NO harmonics above that. Then we set the sample rate accordingly. Its a tough problem because you can't filter these harmonics until after they are created, so the section that creates the clipping and generates the harmonics has to run at the higher sampling rate. AFTER you low pass filter to remove the harmonics, then you can reduce the sample rate. Maybe someone knows a more elegant solution? Is there a way to combine the clipping and filtering so that no section needs to run at the higher sampling rate? thanks Mark
Reply by ●April 4, 20072007-04-04
Mark wrote:> Any kind of clipping will produce harmonics and your sampling rate > must be high enough to accommodate ALL the harmonics that the clipping > generates or you will get ugly aliasing.The clipping produces the intermodulation products, which is much worse then just harmonics. The intermods of the odd orders are falling into the bandwidth of the signal, so it is impossible to filter them out. Since the signal is clipped symmetrically, the odd order distortion has always to be there.> > I'm not sure if there is an elegant solution to this is. > If I recall , the solution we considered was to use a clipping > function that produced harmonics only to a limited order say up to > only 4th order harmonics and NO harmonics above that. Then we set > the sample rate accordingly. Its a tough problem because you can't > filter these harmonics until after they are created, so the section > that creates the clipping and generates the harmonics has to run at > the higher sampling rate. AFTER you low pass filter to remove the > harmonics, then you can reduce the sample rate. > > Maybe someone knows a more elegant solution? Is there a way to > combine the clipping and filtering so that no section needs to run > at the higher sampling rate?The elegant solution is the complex limiter: 1. The signal is converted to X and X* representation by the Hilbert transformer. 2. The complex amplitude A = sqrt(X^2 + X* ^2) is clipped. 3. The signal is converted back to real. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●April 4, 20072007-04-04
On Apr 4, 10:19 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> Mark wrote: > > Any kind of clipping will produce harmonics and your sampling rate > > must be high enough to accommodate ALL the harmonics that the clipping > > generates or you will get ugly aliasing. > > The clipping produces the intermodulation products, which is much worse > then just harmonics. The intermods of the odd orders are falling into > the bandwidth of the signal, so it is impossible to filter them out. > Since the signal is clipped symmetrically, the odd order distortion has > always to be there. > > > > > I'm not sure if there is an elegant solution to this is. > > If I recall , the solution we considered was to use a clipping > > function that produced harmonics only to a limited order say up to > > only 4th order harmonics and NO harmonics above that. Then we set > > the sample rate accordingly. Its a tough problem because you can't > > filter these harmonics until after they are created, so the section > > that creates the clipping and generates the harmonics has to run at > > the higher sampling rate. AFTER you low pass filter to remove the > > harmonics, then you can reduce the sample rate. > > > Maybe someone knows a more elegant solution? Is there a way to > > combine the clipping and filtering so that no section needs to run > > at the higher sampling rate? > > The elegant solution is the complex limiter: > > 1. The signal is converted to X and X* representation by the Hilbert > transformer. > 2. The complex amplitude A = sqrt(X^2 + X* ^2) is clipped. > 3. The signal is converted back to real. > > Vladimir Vassilevsky > > DSP and Mixed Signal Design Consultant > > http://www.abvolt.comThe usual goal is to emulate an analog system that has a clipper followed by a low pass filter. So, yes the intermodulation products are produced but they are also present in an analog system and that is just the nature of clipping. However, in a analog system, the harmonics are produced and those that fall above the upper band limit (say 20 kHz) are filtered and cause no issues. However, in a digitized system, the harmonics above 20 kHz will also produce aliasing if the sampling rate is not high enough. This aliasing is an additional distortion that does not exist in an analog system. The usual objective is to create a digital version of an anlog system so whatever distortions an anlog clipper/ filter would have created are acceptable, but no new additional distortions (or aliasing) due to the digital implementation are acceptable. Does the complex method you described resolve this alisaing problem? Mark
Reply by ●April 4, 20072007-04-04
Mark wrote:>>The elegant solution is the complex limiter: >> >>1. The signal is converted to X and X* representation by the Hilbert >>transformer. >>2. The complex amplitude A = sqrt(X^2 + X* ^2) is clipped. >>3. The signal is converted back to real.> > The usual goal is to emulate an analog system that has a clipper > followed by a low pass filter.The complex limiter action is different from that. It is similar to so-called analog RF limiter. It performs much better then the straightforward limiting of the signal.> The usual objective is to create a digital > version of an anlog system so whatever distortions an anlog clipper/ > filter would have created are acceptable, but no new additional > distortions (or aliasing) due to the digital implementation are > acceptable. > > Does the complex method you described resolve this alisaing problem? >Yes and No. There will be none of the harmonics or aliased harmonics. However there will be the intermods and the aliased intermods. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●April 4, 20072007-04-04
> The complex limiter action is different from that. It is similar to > so-called analog RF limiter. It performs much better then the > straightforward limiting of the signal.OK, is it correct to say that this complex method works the same as using the original signal to create (modulate) an SSB RF signal, apply limiting to the RF SSB signal, then demodulate the SSB RF signal back to baseband? Mark
Reply by ●April 4, 20072007-04-04
Mark wrote:>>The complex limiter action is different from that. It is similar to >>so-called analog RF limiter. It performs much better then the >>straightforward limiting of the signal. > > > OK, is it correct to say that this complex method works the same as > using the original signal to create (modulate) an SSB RF signal, apply > limiting to the RF SSB signal, then demodulate the SSB RF signal back > to baseband?1. The analog complex limiter - yes, this is correct. 2. The digital complex limiter - not quite correct. There is no aliased harmonics, but there are aliased intermods. VLV
Reply by ●April 4, 20072007-04-04
On Apr 4, 1:40 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> Mark wrote: > >>The complex limiter action is different from that. It is similar to > >>so-called analog RF limiter. It performs much better then the > >>straightforward limiting of the signal. > > > OK, is it correct to say that this complex method works the same as > > using the original signal to create (modulate) an SSB RF signal, apply > > limiting to the RF SSB signal, then demodulate the SSB RF signal back > > to baseband? > > 1. The analog complex limiter - yes, this is correct. > 2. The digital complex limiter - not quite correct. There is no aliased > harmonics, but there are aliased intermods. > > VLVthanks Mark