# Non-Uniform Quantization

I was reading a research paper on companding schemes for non uniform quantisation. In paper one of the motivations for non-uniform quantisation is that distortion at larger amplitude values is less audible than distortion in lower amplitude values but I can find why this happens?

• I recommend getting started by reading up on the mu-law and A-law companders.
– MBaz
Nov 21 '20 at 16:36
• I read both the pseudo logarithmic schemes, the concept is pretty simple we treat smaller amplitude values on a linear scale and larger amplitude values on a logarithmic scale but this means if I have distortion at lower amplitude the distortion would remain same but if I have distortion at higher amplitude it might increase due to logarithmic scale. Please correct me if I am wrong I am still reading all of these things. Nov 21 '20 at 16:44
• For compandors like the $\mu$-law and A-law, the assumption is that you don't have distortion going into the compandor. Nov 21 '20 at 17:03
• It may help to refer to the papers in question. You are talking about companding, and not sampling that's nonuniform in time, yes? Nov 21 '20 at 17:04
• Yes I am talking about using companding. The paper is not yet published so I can not refer it but the author mentions that one of the reasons for using Non-uniform quantization is that distortion at higher amplitudes is less audible than at lower amplitude and I can not figure out why does this happen. Nov 21 '20 at 18:11

The idea behind nonuniform quantization (for example an a, or mu law for telephony speech) is to make better use of the input signal amplitude distribution in lossy source coding applications..

Over a period of time, it's emprically observed that, most of the speech occurs at low amplitude levels, and occasionally at high amplitude (full dynamic range) levels.

When this is the case, a uniform quantizer would be wasting its bits (its quantization levels) into many of those statistically less used louder signal levels.

In order to make efficient use of the quantizer (number of levels and bits), and to minimize the average quantization error (the distortion), it will be wiser to allocate more bits (finer levels) to the (often used) lower signal levels, while assigning less bits, and (coarse levels) to the (less used) louder signal levels.

The technical term for such a modification to a uniform quantizer is called a pdf optimized Max-Lloyd quantizer. The compander is a simplified example by assuming a fixed typical pdf of input speech and assigning a logarithmic non-uniformity to the step-sizes. This way, softer passages will be assigned more bits and finer resolution while louder passages will be assigned less (than uniform case) bits.

Futhermore, the distortion at the louder passages is perceptually less audible, due to psycho-acoustic principles, in particular to the masking effect; presence of a loud tone, suppresses the perception of nearby quiter tones, and makes them inaudible. Hence the quantization noise will be less audible while occuring with louder tones.

Non-linear scales are quite common in biological phenomena, and sensory perception often expresses logarithmic or power-law relationships between perceived intensity (P) and stimulus intensity (S). The Weber-Fechner law hypothesizes that the minimum stimulus intensity variation ($$\Delta S$$) necessary to produce a noticeable variation in perception is proportional to the initial stimulus intensity, or $$\Delta S/S$$ is constant. It seems that Weber’s observations showed that persons could distinguish weights of 20 and 21 grams, but needed an increase of 2 grams to induced a noticeable difference from a simulus at 40 grams. A multiplicative increase in stimulus intensity leads to a (somehow) additive increase in perceived intensity.

Logarithms may emulate this behavior on numerical signals for the relative error. Recently, Portugal, R. D. and Svaiter, B. F. (2011) in Weber–Fechner law and the optimality of the logarithmic scale showed that logarithmic scaling can minimize worst-case relative error. Other works develop on the expected of the relative squared error. A paper of interest could be A framework for Bayesian optimality of psychophysical laws, 2012 (John Z. Sun, Grace I. Wang, Vivek K. Goyal, Lav R. Varshney), whose abstract follows:

The Weber–Fechner law states that perceived intensity is proportional to physical stimuli on a logarithmic scale. In this work, we formulate a Bayesian framework for the scaling of perception and find logarithmic and related scalings are optimal under expected relative error fidelity. Thus under the Weber–Fechner law, a multiplicative increase in stimulus intensity leads to an additive increase in perceived intensity.

They propose the following "block diagram of the quantization model for perception. Stimulus intensity $$S$$ is transformed by a nonlinear scaling $$C(S)$$, resulting in perceptual intensity $$P$$. Since biological constraints limit perception, only a discrete set of levels are distinguishable. [...]. For example, any two stimulus intensities in the gray region are indistinguishable."

If the interval of value variation and quantization are small enough, concave functions other than logarithms can be used (like a square-root). Yet even for high-dynamic data, and in scientific computing (ie outside the sensory level), we also observe similar behavior: a handful of most-significant bits may suffice. This is a motivation behind recent alternatives to the IEEE 754 arithmetic floating-point format, like UNUM or POSITS.