This disclosure is related to the field of signal processing, and, more particularly, to a signal processing circuit utilizing variable scaling during re-quantization to reduce quantization noise and increase dynamic range without causing a transient audible phenomena referred to in the art as a “pop”.
The following background is provided with specific examples to show issues related to quantization, with it being understood that this disclosure itself is in no way limited to the types and contexts of the examples provided in this background.
A first prior art signal processing chain 1 is now described with reference to
The noise shaping quantizer 2 includes a noise shaping filter 3 that receives a noise shaping input signal nshin. The noise shaping filter 3 performs filtering and utilizes error feedback to produce a quantizer input signal quantizerinput. A quantizer 4 receives the quantizer input signal quantizerinput and performs re-quantization to produce a noise shaping output signal nshout. The receiver 15 may apply a single fixed factor α to the noise shaping output signal nshout.
The quantizer 4 includes a summer 5 through which a dither signal dither_in is injected to the quantizer input signal quantizerinput prior to division by a fixed factor γ in a divider 6. A truncation circuit 7 operates on the output of the divider 6, resulting in data loss, for example by rounding, saturation, or introducing of other non-linearities, producing the noise shaping output signal nshout. A feedback multiplier 8 multiplies the noise shaping output signal nshout by the same fixed factor γ to produce a quantizer output signal quantizeroutput provided to the noise shaping filter 3. The fixed factor γ is set to a minimum sufficient value for expected values of the noise shaping input signal nshin. This means, however, that at certain values of the noise shaping input signal nshin, the factor γ is higher than strictly necessary, with the result being that dynamic range is lower than it could be.
Attempts at correcting this issue have been made. Refer now to
This can be observed in the graphs of the operation of the audio playback circuit 1 shown in
As such, further development is needed.
Disclosed herein is a signal processing circuit including a transmitter section. The transmitter section includes a noise shaper receiving a noise shaping input signal and a quantizer output signal, the noise shaper configured to generate a quantizer input signal based upon the noise shaping input signal and the quantizer output signal, and a quantizer receiving the quantizer input signal and configured to divide the quantizer input signal by a scaling factor to produce a noise shaping output signal and to multiply the noise shaping output signal by the scaling factor to product the quantizer output signal.
The signal processing circuit also includes a receiver section, the receiver section including receiver circuitry receiving the noise shaping output signal, the receiver circuitry configured to scale the quantizer output signal by a second scaling factor, and a dynamic range optimization circuit. The dynamic range optimization circuit is configured to determine whether an absolute value of the noise shaping input signal is less than a threshold value, lower the scaling factor in response to the absolute value of the noise shaping input signal being less than the threshold value, and decrease the second scaling factor in response to the absolute value of the noise shaping input signal being less than the threshold value, proportionally to the lowering of the scaling factor such that a ratio between the scaling factor and the second scaling factor remains substantially constant.
The dynamic range optimization circuit is further configured to increase the scaling factor in response to the absolute value of the noise shaping input signal being greater than the threshold value and increase the second scaling factor in response to the absolute value of the noise shaping input signal being greater than the threshold value, proportionally to the increase in the scaling factor such that the ratio between the scaling factor and second scaling factor remains substantially constant.
A dither generator may be configured to generate a dither signal having a range defined by the scaling factor, and the transmitter section may include a summing circuit configured to inject the dither signal into the quantizer input signal prior to quantization thereof by the quantizer.
The quantizer may apply a truncation to the quantizer input signal after division thereof by the scaling factor.
The scaling factor may be a power of two.
The quantizer input signal and quantizer output signal may be digital, and the quantizer may be implemented digitally.
The quantizer input signal and quantizer output signal may be analog, and the quantizer may be implemented in an analog fashion, with the quantizer including an analog to digital converter (ADC) receiving the quantizer input signal and digitizing the quantizer input signal to produce the noise shaping output signal such that it is scaled by the scaling factor, and a digital to analog converter (DAC) receiving the noise shaping output signal and converting the noise shaping output signal to produce the quantizer output signal such that it is multiplied by the scaling factor.
The receiver section may be implemented digitally.
The receiver section may be implemented in an analog fashion.
The noise shaper may include an input summer configured to subtract an error signal from the noise shaping input signal to produce the quantizer input signal, an error summer configured to subtract the quantizer input signal from the quantizer output signal to produce an intermediate output, and a noise shaping filter configured to apply a noise shaping filter function to the intermediate output to produce the error signal.
The noise shaper may include a sigma delta modulator receiving the noise shaping input signal and the quantizer output signal as output and applying a two-input one-output filtering thereto to produce the quantizer input signal. The two-input one-output filtering may have a transfer function of:
Y(z)=L1(z)U(z)−L1(z)V(z),
with the noise shaping input signal being U(z) and the quantizer output signal being V(z).
The absolute value of the noise shaping signal may be determined from a current value of the noise shaping input signal.
Also disclosed herein is a signal processing method including generating a quantizer input signal based upon a noise shaping input signal and a quantizer output signal, dividing the quantizer input signal by a scaling factor to produce a noise shaping output signal, and multiplying the noise shaping output signal by the scaling factor to product the quantizer output signal. The method further includes scaling the quantizer output signal by a second scaling factor, determining whether an absolute value of the noise shaping input signal is less than a threshold value, lowering the scaling factor in response to the absolute value of the noise shaping input signal being less than the threshold value, and decreasing the second scaling factor in response to the absolute value of the noise shaping input signal being less than the threshold value, proportionally to the lowering of the scaling factor such that a ratio between the scaling factor and the second scaling factor remains substantially constant.
The method may further include generating an analog output signal from at least the noise shaping output signal by selectively connecting or disconnecting current sources and current sinks to differential outputs in response to the noise shaping output signal (the current sources and current sinks being scaled by the second scaling factor), amplifying the analog output signal, and driving a speaker with the analog output signal. Adjustment of the scaling factor and the second scaling factor proportionally to one another may serve to prevent transients resulting from scaling factor adjustment from being present in the noise shaping output signal and therefore from causing audible pops to be played by the speaker.
The method may include increasing the scaling factor in response to the absolute value of the noise shaping input signal being greater than the threshold value and increasing the second scaling factor in response to the absolute value of the noise shaping input signal being greater than the threshold value, proportionally to the increase in the scaling factor such that the ratio between the scaling factor and second scaling factor remains substantially constant.
The method may include generating a dither signal having a range defined by the scaling factor and injecting the dither signal into the quantizer input signal prior to quantization thereof.
The method may include applying a truncation to the quantizer input signal after division thereof by the scaling factor.
The scaling factor may be a power of two.
The following disclosure enables a person skilled in the art to make and use the subject matter disclosed herein. The general principles described herein may be applied to embodiments and applications other than those detailed above without departing from the spirit and scope of this disclosure. This disclosure is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed or suggested herein.
A. Broad Concept and Associated Embodiment
Now described herein with initial reference to
Described now is a generic case, applicable to both analog and digital implementations. The noise shaping quantizer 21 includes a noise shaping filter 23 that receives a noise shaping input signal nshin. The noise shaping filter 23 performs filtering and utilizes error feedback to produce a quantizer input signal quantizerinput. A quantizer 24 receives the quantizer input signal quantizerinput and, under control of a dynamic range optimization circuit (DYRO control circuit) 34 as will be explained below, performs noise shaping and on-the-fly scaling on the noise shaping input signal nshin to produce a noise shaped output signal nshout.
The quantizer input signal quantizerinput is divided by an adjustable factor γ (e.g., a scaling factor) in a divider 26. A truncation circuit 27 operates on the output of the divider 26, resulting in data loss, for example by rounding, saturation, or introducing of other non-linearities, producing the noise shaping output signal nshout. A feedback multiplier 28 multiplies the noise shaping output signal nshout by the same adjustable factor γ to produce a quantizer output signal quantizeroutput provided to the noise shaping filter 23 for use in performing noise shaping. The receiver section 35 multiplies the noise shaping output signal nshout by another adjustable factor α (e.g., a scaling factor) to produce an output signal OUT. The adjustable factor γ and adjustable factor α may also be referred to as scaling factors herein. The different potential valuables of the adjustable factors γ and α may be represented by an index k, for example, γk and αk.
The DYRO control circuit 34 monitors the noise shaping input signal nshin and based upon the amplitude thereof, adjusts the adjustable factor γ and the adjustable factor α on the fly so as to balance output signal OUT swing with its quantization noise, as will be described below, with such adjusting maintaining the ratio α/γ as being a fixed constant.
There are physical limits to the divider 26 and the feedback multiplier 28, as well as to the receiver section 35, that limits the output signal OUT swing. To work within these constraints, the DYRO control circuit 34 compares the noise shaping input signal nshin to a series of accurately defined thresholds, and sets the adjustable factor γ and the adjustable factor α on the fly based upon those comparisons.
In detail, γ and α may each take one of i different values. As a first order approximation, the following relationship is present:
For a given maximum value of the absolute value of the noise shaping output signal nshout, denoted as nshout
nsh
in
(i)≅nshout
nshin
Assume, as an example, that i=1, . . . , 3. Therefore, γi=[γ1; γ2; γ3], with γ1>γ2>γ3, and at =[α1; α2; α3], with α1>α2>α3, and with those values being such that α/γ remains a fixed constant. Given the example value of i=1, . . . ,3 the thresholds are therefore THi=[TH1, TH2, and TH3], with TH1>TH2>TH3. In general, the greater the adjustable factors γ and α, the greater the output signal OUT swing but also the greater the quantization noise. Conversely, the lesser the adjustable factors γ and α, the lesser the output signal OUT swing and the lesser the quantization noise.
During operation, the DYRO control circuit 34 compares the current value (e.g., a current value) of the noise shaping input signal nshin to the thresholds TH1, TH2, and TH3. If the noise shaping input signal nshin is greater than TH1, then the adjustable factors are set by the DYRO control circuit 34 as follows:
γ=γ1 and α=α1.
If the noise shaping input signal nshin is greater than TH2 but less than TH1, then the adjustable factors are set by the DYRO control circuit 34 as follows:
γ=γ2 and α=α2.
If the noise shaping input signal nshin is greater than TH3 but less than TH2, then the adjustable factors are set by the DYRO control circuit 34 as follows:
γ=γ3 and α=α3.
If i were to be greater than 3, then additional thresholds and adjustable factors would be present, and further comparisons consistent with the above described comparisons would be performed.
The result of this above-described operation is that the quantizer output quantizeroutput will practically have the same amplitude as the quantizer quantizerinput while the quantization noise will be reduced.
These comparison and adjustable factor setting operations are performed continuously or periodically on the noise shaping input signal nshin, and therefore the adjustment of the adjustable factors γ and α is performed continuously or periodically. The result of this is that the output signal OUT will practically have the same amplitude while quantization noise present at the receiver section 35 OUT will be reduced—thus, dynamic range at OUT is increased.
In some implementation instances, the DYRO control circuit 34 may implement a margin in its thresholds and therefore in its threshold comparisons. The margin value is greater than zero but less than one. The thresholds can be calculated as:
th(i)=nshin
Time filtering may be performed on the threshold comparisons by the DYRO control circuit 34 in the falling direction. In the falling direction (such as when the noise shaping input signal nshin was previously greater than TH1, but is now less than TH1 and greater than TH2) for example, the DYRO control circuit 34 may wait to take action to change the adjustable factor γ and the adjustable factor α until after the noise shaping input signal nshin has fallen below and remained below the threshold in question (e.g., has fallen below TH1) for a given period of time. Such time filtering may optionally be performed in the rising direction (such as when the noise shaping input signal nshin was previously less than TH1 and greater than TH2, but is now greater than TH1) as well, although this may not be desired in some situations.
Further details of the principles of operation of the DYRO control circuit 34 may be found in U.S. Pat. No. 7,239,258, incorporated by reference above.
B. Dither
Optionally, as shown in the embodiment of
In instances where the quantizer 24 is digital, the injected dither may have a triangular probability distribution function as shown in
The injected dither may instead have a rectangular probability function, also in instances where the quantizer 24 is digital. In instances where the quantizer 24 is analog, the dither circuit 38, under control of the DYRO control circuit 34, may supply the dither signal dither_in as two random analog values.
In the example generic quantizer 24 described above, the dither signal dither_in is injected to the quantizer input quantizerinput prior to operation thereon by the divider 26, but is not subtracted from the quantizer output quantizeroutput. However, as shown in the example of
The dither signal dither_in in embodiments in which the quantizer 24 is digital, the dither signal may be generated through the sum of two linear feedback shift registers (LFSRs), or as the sum of two separated branches of a single LFSR. The dither signal may be generated through any suitable circuit, and may take any suitable form.
In the above example generic quantizer 24, dither is injected. However, as shown in
C. Quantizer Types
In the above example, the transmitter section 21 is described generically, and such description of operation applies to either an analog or a digital transmitter section. Also in the above example, the receiver section 35 is described generically, and such description of operation applies to either an analog or digital receiver section 35. With this being said, specific examples will be provided below, in which:
Each of these will be described, but first, digital and analog quantizers for use therein will be described. Note that any digital functions or components described herein may be incorporated within a microprocessor, digital signal processor, or programmable logic device, and any analog functions or components described herein may be incorporated within discrete analog components.
A sample digital quantizer 24′ is shown in
A sample generic analog quantizer 24″ is shown in
One potential implementation of the analog quantizer 24″ which is intended for use with a digital receiver section 35 is shown in
As illustrated, threshold voltages VTH1, . . . , VTHk and −VTH1, . . . , −VTHk are generated at taps between the resistors of the voltage ladder. The resistor directly connected to +Vγ has a resistance of RT/2, as does the resistor directly connected to −Vγ. The remainder of the resistors each have a resistance of RT.
The ADC 26′ in this analog quantizer 24″ shown in
The comparators 41(1), . . . , 41(2k) each have a non-inverting input terminal coupled to receive the quantizer input signal quantizerinput, which is an analog voltage Vquantizer_in in this instance. The comparators 41(1), . . . , 41(2k) have respective inverting input terminals connected to different ones of the threshold voltages VTH1, . . . , VTHk and −VTH1, . . . , −VTHk. In the illustrated example, comparator 41(1) has its inverting input terminal connected to the threshold voltage VTHk, comparator 41(2) has its inverting input terminal connected to the threshold voltage VTH1, comparator 41(3) has its inverting input terminal connected to the threshold voltage −VTH1, and comparator 41(2k) has its inverting input terminal connected to the threshold voltage −VTHk. The flip flop 42(1) has its input receiving the output of the comparator 41(1) and has its output connected to provide a selection signal to the switch circuit 44(1), the flip flop 42(2) has its input receiving the output of the comparator 41(2) and has its output connected to provide a selection signal to the switch circuit 44(2), flip flop 42(3) has its input receiving the output of the comparator 41(3) and has its output connected to provide a selection signal to the switch circuit 44(3), and flip flop 42(2k) has its input receiving the output of the comparator 41(2k) and has its output connected to provide a selection signal to the switch circuit 44(2k).
Each switch circuit 44(1), . . . , 44(2k) operates to selectively connect an associated resistor (each such resistor having a resistance of R1) between either +Vγ or −Vγ and an inverting input terminal of an amplifier 45, under control of the output of a respective flip flop 42(1), . . . , 42(2k). When the output of a respective flip flop 42(1), . . . , 42(2k) is asserted, the associated switch circuit 44(1), . . . , 44(2k) connects its respective resistor to −Vγ and otherwise connects its respective resistor to Vγ.
The amplifier 45 has its non-inverting input terminal grounded, and a resistor R2 is connected between the inverting input terminal and output of the amplifier 45. The output of the amplifier 45 is the quantizer output quantizeroutput, which is an analog voltage Vquantizer_out in this instance.
The relationship in resistance value between R1 and R2 is as follows:
R1=(m−1)·R2
The output of each flip flop 42(1), . . . , 42(2k) is also connected to circuit 46 (illustratively a thermometric to signed converter 46 that generates the noise shaping output nshout in digital form therefrom).
As stated, the voltages +Vγ and −Vγ are based upon the adjustable factory. For example, the voltages +Vγ and −Vγ may be generated by a programmable voltage generator, with Vγ depending on the adjustable factor γ (e.g., where the adjustable factor γ changes from γ1 to γ2, Vγ changes from Vγ1 to Vγ2).
As another example, the ADC 26′ and DAC 28′ may be integrated within a noise shaper utilizing either an error feedback or sigma-delta modulator arrangement.
A first potential implementation of the analog quantizer 24″ which is intended for use with an analog receiver section 35 is shown in
Each switch circuit 47(1), . . . , 47(2k) operates to selectively connect an associated resistor (each such resistor having a resistance of R3) between either +Vα or −Vα and a non-inverting input terminal of an amplifier 48, under control of the output of a respective flip flop 42(1), . . . , 42(2k). When the output of a respective flip flop 42(1), . . . , 42(2k) is asserted, the associated switch circuit 47(1), . . . , 47(2k) connects its respective resistor to −Vα and otherwise connects its respective resistor to Vα.
The voltages +Vα and −Vα are based upon the adjustable factor α. For example, the voltages +Vα and −Vα may be generated by a programmable voltage generator, with Vα depending on the adjustable factor α (e.g., where the adjustable factor α changes from α1 to α2, Vα changes from Vα1 to Vα2).
The amplifier 48 has its non-inverting input terminal grounded, and a resistor R4 is connected between the inverting input terminal and output of the amplifier 48. The output of the amplifier 48 may be used for desired purposes.
The relationship in resistance value between R3 and R4 is as follows:
R3=(m−1)·R4
A second potential implementation of the analog quantizer 24″ is shown in
D. Digital Transmitter Section, Analog Receiver Section A signal processing chain 100 is shown in
The analog receiver section 35 includes a current steering DAC 150 that converts the noise shaping output signal nshout to produce an analog output signal Aout. The current steering DAC 150 includes a thermometric code conversion circuit that selects elementary contributions to the analog output signal Aout that are scaled by the adjustable factor α. A low pass filter 151 filters quantization noise from the analog output signal Aout, and the analog output signal Aout is then amplified by a power amplifier 152 that drives a speaker 153 or other output device.
An example implementation of the current steering DAC 150 is now described with additional reference to
The DAC 150 provides differential current outputs generated by N=2n respective current sources and current sinks that are selectively connected to the input by switches based upon the noise shaping output signal nshout, with n being, for example, 6 such that 2n=64. The current sources and current sinks each respectively source or sink a current Iref having a same magnitude multiplied by α. Stated differently, these currents are equal and each changed in magnitude proportionally to the current reference.
For example, where n=6, and therefore, N=26=64, there are 64 current sources and 64 current sinks in the DAC 150. The current sources are labeled in
E. Digital Transmitter Section, Digital Receiver Section A signal processing chain 100′ is shown in
The digital receiver section 35 includes a scaling circuit 154 that scales the noise shaping output nshout by α to produce a digital output signal Dout. The digital output signal Dout is thereafter passed through a decimating low-pass filter 155 and then a digital elaboration circuit 156.
F. Analog Transmitter Section, Digital Receiver Section
A signal processing chain 101 is shown in
The digital receiver section 35 includes a scaling circuit 154 that multiplies the noise shaping output nshout by α (with α≥1 or α<1) to produce a digital output signal Dout. The digital output signal Dout is thereafter passed through a decimating low-pass filter 155 and then a digital elaboration circuit 156.
G. Analog Transmitter Section, Analog Receiver Section
A signal processing chain 101′ is shown in
The analog transmitter section 22 operates as described above with reference to
H. Noise Shaping Filter Specifics
The noise shaping filter 23 used in the above-described embodiments may utilize error feedback or sigma-delta modulation.
Now described with reference to
The above-described error feedback arrangement may also be used with an analog quantizer 24″, as shown in
Now described with reference to
Sample sigma-delta modulator designs such as may be used in the embodiment of
I. Audio Output Circuit with Digital Transmitter Section, Analog Receiver Section
Now described with reference to
During operation, the DYRO control circuit 14 compares the values of the noise shaping input nshin to a series of thresholds, and based thereupon, adjusts the adjustable factor γ and the adjustable factor α on the fly, with such adjusting maintaining the ratio α/γ as being a fixed constant. γ and α may each take one of i different values, and in this embodiment, γ=2β.
The thresholds for this example will now be discussed. Assume here that the noise shaping filter 23c is a finite impulse response filter with coefficients fircoeffk. The relationship between the maximum noise shaping input nshin
An expression factori may be written as:
Therefore, nshin
nsh
in
(i=(2β
The thresholds can then be set as follows, assuming margin is used:
th(i)=nshin
Example operation is now described with additional reference to
γ=2β=217
Assume the current reference Iref used by the DAC 15 is 1 μA. Prior to time T1, the input audio signal i_audio (which is interpolated to produce the noise shaping input nshout) is playing audio and not muted. At time T1, the input audio signal i_audio is muted, and the noise shaping at the output nshout of the noise shaping circuit 23 can be observed between times T1 and T2. The quantization noise prior to filtering within the noise shaping circuit 23 can be observed between times T1 and T2 as o_prefilt, and after filtering can observed between times T1 and T2 as o_filt.
At time T2, nshin is below the first threshold for the given period of time, and therefore the β is reduced to 16 by the DYRO control circuit 14, so the adjustable factor γ is set such that:
γ=2β=216
Since β is being reduced by one, the DYRO control circuit 14 adjusts the reference current Iref within the DAC 14 accordingly by properly scaling α (keeping in mind that α/γ remains as a fixed constant), which in this case yields a reduction in the reference current α·Iref from 1 μA to ½ μA. The reduction of the quantization noise prior to filtering within the noise shaping circuit 23 can be observed between times T2 and T3 as o_prefilt, and after filtering can observed between times T2 and T3 as o_filt.
At time T3, nshin is below the second threshold (which is lower than the first threshold), and therefore β is reduced to 15 by the DYRO control circuit 14. Since the adjustable factor β is being reduced by one, the DYRO control circuit 14 adjusts the reference current α·Iref within the DAC 14 accordingly, which in this case is a reduction from ½ μA to ¼ μA. The further reduction of the quantization noise prior to filtering within the noise shaping circuit 23 can be observed after time T3 as o_prefilt, and after filtering can observed after time T3 as o_filt.
Observe that at the changing of the adjustable factor β at times T2 and T3, there is no occurrence of a transient disturbance which would manifest as an audible “pop”.
Although not expressly shown on in the graph of
J. Audio Sampling Embodiment
The above dynamic range expansion performed through the use of variable scaling of re-quantization during digital to analog conversion is equally applicable to analog to digital conversion. To that end, an embodiment of an audio sampling circuit 200 using variable scaling of re-quantization during analog to digital conversion is now described with reference to
The audio sampling circuit 200 includes a microphone 201 receiving input sound waves and converting them to an analog audio signal, which is then preconditioned by a preconditioning amplifier 202 to produce an analog audio input signal Ain. The preconditioning amplifier 202 may have a low-pass filtering behavior because the noise shaping input signal nshin is within a limited bandwidth range. A noise shaping converter 203, here a sigma-delta based analog to digital converter controlled based upon the adjustable factor γ, receives the analog audio input signal Ain and digitizes the analog audio input signal Ain to produce the noise shaping input signal nshin, which is then compensated by a compensation circuit 204 according to the adjustable factor α, and in turn decimated by a decimation filter 205 to produce output that may be used for suitable purposes, for example by a digital elaboration unit for further processing, for example in a wave file writing system. The DYRO control circuit 206 operates as described above, comparing the analog input signal Ain to the thresholds and adjusting the adjustable factors γ and α accordingly.
It is clear that modifications and variations may be made to what has been described and illustrated herein, without thereby departing from the scope of this disclosure, as defined in the annexed claims.
While the disclosure has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this disclosure, will appreciate that other embodiments can be envisioned that do not depart from the scope of the disclosure as disclosed herein. Accordingly, the scope of the disclosure shall be limited only by the attached claims.