Method and circuit for the suppression of switching distortion in digitally controlled attenuators

Abstract: Switching distortion in a digitally controlled attenuator is effectively suppressed by causing a fast turn-on of the selected switch and a slowed-down turn-off of the deselected switch and by connecting in parallel to the portion of the resistive voltage divider pertaining to the change of output tap a shunt resistance, deselected from the signal path downstream of the selected switch. The deselected switch is driven by a ramp of a preset slope. A circuit sensing the sign of the change of attenuation of the contingent command, configures a pair of switches that deselect the shunt resistance.

Description: The present invention concerns analog circuits for signal processing that are adjustable or automatically controllable by means of digital control circuits. More in particular this invention concerns digitally controlled attenuators. In analog signals processors it is often necessary to adjust the signal level, for instance the volume of an audio signal. A remarkable system automation or improved ergonomic criteria of certain manual commands privilege the adoption of digital control techniques of the operation parameters of certain analog circuits of the signal processing system. Typical of these systems, is the employment of digitally controlled attenuators. These are in essence constituted by a voltage divider functionally connected between a first signal input node and a common ground node of the circuit. The voltage divider has a plurality of taps selectable by as many selection switches digitally driven in a mutually exclusive way via software. According to the scheme of Fig. 1, each selectable switch is capable of connecting a certain tap of the voltage divider to a second circuital node (downstream of said first signal input node) of the signal path (for example to the input of an output or coupling buffer). The selection of a particular tap is effected via software command in the form of a «word» composed for example a string of «zeros» and a single «one» that identifies the selected switch. When selecting a different attenuation value, the switches subject to the change of configuration rapidly switch in a mutually exclusive way. The signal is therefore subjected to a higher or lower attenuation in an abrupt manner. When the amplitude variation is relatively large, as in the case of audio systems, this abrupt change may manifest itself by way of a sharp noise (clic). This «switching distortion» is further enhanced when it takes place while the signal is at peak amplitude. The document US-A-4 683 386 of T. KAMIWARA discloses a digital controlled volume attenuator of the type discussed above. Figures 2 and 3 show the switching transient for a 1KHz sinusoid, respectively for a decrement and an increment of the attenuation. By referring to the circuit diagram of Fig. 1 and supposing that the system be in the condition (A), having the S 2 switch closed along the signal path according to the functional scheme illustrated in Fig. 4, the attenuation in such a condition (A) will be given generally by the following expression: A = R 2 + R 3 +...+ R n R 1 + R 2 + R 3 +...+ R n When, through the digital control of the switches, the system is commanded in a different condition (B) where the S 3 switch is the one «selected», then the attenuation becomes: B = R 3 +...+ R n R 1 + R 2 + R 3 +...+ R n Obviously, a similar amplitude jump occurs when switching over from the condition (B) into the condition (A), as schematically shown in Fig. 4. In many cases, specially when the configuration of the digitally controlled attenuator is modified through rather large steps, say of 6 to 10dB, the dynamic distortion that occurs at the switching instant might generate unpleasant audible effects. On the other hand, a more gradual modification of the attenuation might be effected by commanding the execution of a series of attenuation incrementing and decrementing switchings, each switching producing a sufficiently small change of attenuation in order to gradually reach the required (commanded) attenuation level. This system involves a nonnegligible software complication, often incompatible with other requisites of availability of the microprocessor that conducts the execution of adjustment commands for a plurality of functions of the signal processing system. In view of these difficulties, a system has now been found for effectively suppressing the dynamic distortion due to a change of configuration of a digitally controlled attenuator that does not require any complication of the software, but rather, is capable of suppressing said distortions substantially via hardware, in an extremely simple way. Fundamentally, the method of the invention consists in discriminating between a situation of a commanded increment or decrement of the attenuation and to consequently drive in phase opposition a pair of switches that select the signal path downstream of the selection switch that selects the new required level of attenuation or in other words the particular tap of the resistive voltage divider, producing a rapid closing of the switch that is selected via software for modifying the attenuation and a slowed down opening of the deselected switch according to a preestablished switch driving ramp. During the opening phase of the switch deselected by the command of modification of the attenuation, the portion or section of the resistive voltage divider pertaining to the commanded change of «tap» turns out to be connected in parallel with a shunt resistance whose value is adequate to sensibly reduce the rate of change of the attenuation according to the voltage ramp that drives the opening of the deselected switch. The result of all this is a gradual decrease or increase of the attenuation towards the new value selected by the digital command, obtained via hardware in an extremely simple way. The attenuation network of this invention is characterized by the use of a pair of switches driven in phase opposition by a circuit capable of discriminating between a command or increment of decrement of the attenuation. The pair of switches have a current terminal coupled in common to a node of the signal path downstream of the attenuation network, while the other current terminals of the switches are respectively connected to one and to the other end of a second resistive voltage divider having a plurality of taps, respectively connected to the switches for the mutually exclusive selection of the taps of the voltage divider of the attenuator. The various aspects of the invention and its advantages will be even more evident through the following description of several embodiments and by referring to the figures herein enclosed, where: Figure 1 is a basic circuit diagram of a digitally controlled attenuator, according to the prior art; Figures 2 and 3 show the switching transients in one and the other direction of change for a 1KHz sinusoid; Figure 4 is an explanatory diagram of the switching mode of the attenuator depicted in Fig. 1 from a condition (A) to a condition (B) and viceversa; Figure 5 is a basic circuit diagram of a digitally controlled attenuator made in conformity with the present invention; Figures 6 and 7 respectively show the functioning mode and a switching transient in the case of an increment of the attenuation; Figure 8 and 9 respectively show the functioning mode and a switching transient in the case of a decrement of the attenuation. By referring to Fig. 5, the attenuation network of the invention is characterized by the use of a pair of switches driven in phase opposition (Sup and Sdown), which select the signal path downstream of the tap selection switch (S 0 , S 1 , ..., S 7 ), in function of a logic control signal that discriminates between either an increment or decrement of the attenuation to be implemented by modifying the configuration of the selection switches S 0 , ... S 7 . This information or control signal of the pair of switches Sup and Sdown, may be easily generated by the digital control system, which receives (either by a command of the operator or by an impulse produced by an automatic control system) a certain instruction for modifying the current configuration of the selection switches S 0 , ... S 7 . For instance, the driving circuit of the pair of switches Sup and Sdown of the attenuation network of the invention may sense the derivative of the attenuation. Of course, such a circuit is in itself trivial and a thorough illustration thereof is not considered necessary for an exhaustive description of the invention. According to the invention, the selection switches S 0 ... S 7 are not connected directly in common to the virtual ground node represented by the input of the output buffer, but instead connected to as many taps or nodes of a series of resistors (R 1 ', R 2 ', R 6 ') that form a chain, or second resistive «voltage divider», connected between the discrimination switches, Sup and Sdown, as shown in the figure. Case A - Increment of the attenuation Assume that from a certain level of attenuation, as produced by a configuration where the S 2 switch is closed and the others are open, the attenuation must be changed to a higher level by closing the switch S 3 and opening the switch S 2 . The command produced by the digital control system will be such as to determine the Sdown switch to be closed and the Sup switch to be opened. In the above described case, the attenuation for a starting condition (A) will be generally given by the following expression: A = R 2 + R 3 +...+ R n R 1 + R 2 + R 3 +...+ R n Following to the command of attenuation increment, a suitable logic circuit command a fast closing of the S 3 switch, while the opening of the S 2 switch is effected by using a relatively slow ramp signal to drive the switch to an OFF state. This can usually be implemented by connecting a capacitor of suitable value to a purposely dedicated external pin of the semiconductor device, so that the driving signal of the switch S 2 turns out to be shaped like a ramp, in function of the rise of the voltage on the capacitor (with a certain time constant). Any expert technician is conversant with this well known technique that is widely used, for example when implementing a so-called «soft muting» function in audio processors. Although requiring a dedicated pin, the use of an external capacitor permits to adapt the time constant to the requirements of a particular application. The attenuation network of the invention is such that following to the fast switching on of the switch S 3 and until reaching a complete interdiction of the deselected switch S 2 , the instantaneous value of the attenuation will be given by an expression of the type below: B ' = R 2 // R' 2 +...+ R n R 1 + R 2 // R' 2 + R 3 +...+ R n By appropriately dimensioning of the resistors R' n of the second or auxiliary voltage divider, it is trivial to impose the following conditions: B'<A A-B'≤ε where ε represents the largest change or jump of attenuation short of producing noticeable effects (for example unable to produce an audible clic in audio processors). The slow turn-off (opening) of the switch S 3 determines a gradual approach toward the imposed new level of attenuation (new condition B), that will be given by the following expression: B = R 3 +...+ R n R 1 + R 2 + R 3 +...+ R n The diagrams of Fig. 6 show in a schematic way the functioning of the system during a phase of increment of the attenuation. Fig. 7 illustrates a simulated switching transient for the case of a sinusoidal signal having a frequency of 1KHz to be subjected to an amplitude variation (attenuation) of 40dB, through a switch (S 2 ) turn-off ramp of 10 milliseconds (ms). Case B - Decrement of the attenuation In this case, the control circuitry or in other words the circuit that senses the derivative of the attenuation, turns on immediately the switch Sup and simultaneously turns off the switch Sdown. Assuming as a starting condition the one that was attained during the preceding phase of increase of the attenuation, described above and substantially according to which the attenuation (B) is given substantially by the following expression: B = R 3 +...+ R n R 1 + R 2 + R 3 +...+ R n then, at the time of the fast turn-on of the switch S 2 and until the switch S 3 reaches a complete off-state, the attenuation will be instantaneously given by the following expression: B' = R 3 +...+ R n R 1 + R 2 // R' 2 + R 3 +...+ R n whereby the following conditions will be fulfilled: B'>B B'-B≤ε The slow turn-off of the switch S 3 determines a gradual reaching of the final value (A) of the attenuation that is given by the following expression: A = R 2 + R 3 +...+ R n R 1 + R 2 + R 3 +...+ R n Even in this case, the operation is diagrammatically shown in Fig. 8, whereas Fig. 9 shows the switching transient obtained by simulation for the case of a sinusoidal signal having a frequency of 1KHz, undergoing a change of attenuation of 40dB and using a decrement ramp whose duration is 10ms. It is evident that the objective of suppressing the dynamic distortion when commanding large attenuation changes is fully met without resorting to a complication of the software and/or to a burdening of the supervising microprocessor but rather by hardware means with a negligible increment of the circuital complexity. Moreover, it will be clear to any skilled person that the manner in which the signal for discriminating the direction of the commanded modification of the attenuation level is derived, may be different and in any case easily implementable by the use of extremely simple logic circuits. In addition, the way of generating a turn-off signal for the deselected switch in the form of a ramp of predefinable duration, may be different, all being well known and easily realizable by a technician with ordinary knowledge of electronic circuits.

Claims: A method for suppressing switching distortion in digitally controlled attenuators constituted by a resistive voltage divider (R0, R1, ..., R7) having a plurality of output taps that are selectable in a mutually exclusive way via software by a plurality of switches (S0, S1, ..., S7), characterized in that it comprises discriminating between a command of increment or decrement of the attenuation and consequently driving in phase opposition a pair of further switches (Sup, Sdown); determining the fast turn-on of a selected one of said plurality of switches and a slowed down turn-off according to a preestablished driving ramp of a deselected one of said plurality of switches (S0, S1, ..., S7) in execution of a command of a change of attenuation; reducing the rate of change of attenuation during said slowed down turn-off of the deselected switch by connecting in parallel to the portion of said resistive voltage divider (R0, R1, ..., R7) comprised between said selected and deselected switches a shunt resistance (R'1, R'2, ..., R'6) which is selected in the signal path downstream of said selected switch by said pair of further switches (Sup, Sdown). An attenuation network comprising a first resistive voltage divider (R0, R1, ..., R7) coupled to a first node of a signal path and a common ground node and having a plurality of output taps selectable in a mutually exclusive way by a plurality of switches (S0, S1, ..., S7) which is configured by a digital datum generated via software, each of said switches coupling a respective tap of said divider (R0, R1, ..., R7) to a second node of the signal path, characterized in that comprises a pair of further switches (Sup, Sdown) each having a first current terminal coupled in common to said second node and a second current terminal coupled to one and to the other end, respectively, of a second resistive voltage divider (R'1, R'2, ..., R'6) having a plurality of taps, each coupled to a respective switch of said plurality of switches (S0, S1, ..., S7) for mutually exclusively selecting the taps of said first resistive voltage divider (R0, R1, ..., R7); means for driving in phase opposition said pair of further switches (Sup, Sdown) in function of a discrimination between an increment or a decrement of the attenuation command; means for turning off the switch of said plurality of switches (S0, S1, ..., S7) deselected by the new digital datum through a relatively slow ramp compared with a relatively fast turning on of the switch selected by the new digital datum. The attenuation network according to claim 2, characterized in that said means for driving in phase opposition said pair of further switches (Sup, Sdown) comprise a circuit capable of sensing the sign of the derivative of the attenuation. The attenuation network according to claim 2, characterized in that said means for driving in phase opposition said pair of further switches (Sup, Sdown) comprise a circuit capable of generating a logic signal representative of the direction of change of the attenuation of the contingent command. An analog audio processor characterized by comprising a digitally controlled attenuator constituted by an attenuator network as defined in claim 2.

Inventors: ONETTI ANDREA MARIO, PROCURATO SYLVIA, ONETTI, ANDREA MARIO, PROCURATO, SYLVIA
Applicants: ST MICROELECTRONICS SRL, STMICROELECTRONICS S.R.L.
Application year: 1995
Main classification: H03H7
IPC codes: H03K17, H03G3