Digital automatic gain control apparatus and method

Abstract: A digital automatic gain control apparatus designed to control gain in such a way that when an analog video signal is converted into digital signals for processing, the input of the A-D converter (2) is maintained at a fixed level, and after the analog signal has been converted into digital form, the output of the digital system circuit is also maintained at a fixed level. In this apparatus, an input signal is passed through an analog variable gain amplifier, the signal is converted into digital form, the output of an A-D converter is passed through a digital variable gain amplifier (3). The amplitude level of the output of the digital variable gain amplifier (3) is detected by an amplitude detecting means and is controlled so as to be equal to a specified reference value. At this time, the analog variable gain amplifier (1) is controlled so that the level of the control signal for controlling the digital variable gain amplifier (3) is equal to a specified reference value, thereby maintaining the input signal of the A-D converter (2) at a fixed level. Gain control of the analog signal system and the digital signal system, before and after the A-D converter (2) is effected by a single amplitude detecting means.

Description: BACKGROUND OF THE INVENTION This invention relates to a digital automatic gain control apparatus for controlling a signal so that the signal is at a fixed level in processing the digital signal derived from A-D conversion of video signal in a television set, a video cassette recorder (hereinafter referred to as a VCR), etc. Furthermore, this invention relates to an automatic gain control method. There has been a growing requirement for digital processing of video signals. The automatic gain controller (hereinafter referred to as the AGC circuit) has conventionally been a type in which analog data processing is performed. However, the need has been mounting for AGC circuits in which digital data processing is performed. In digital data processing for gain control, as in analog data processing for gain control, an input signal (video signal) is passed through a variable gain amplifier, a difference between the output and a predetermined reference level is calculated, the difference is integrated, and the result is fed back to the variable gain amplifier, in which the gain is thereby controlled to maintain the output signal at a fixed level. When the input signal is a signal such as a colour signal having added thereto a burst signal which represents the reference level, the burst signal for a fixed period of time is extracted, the level of the extracted burst signal is averaged, the average level obtained is fed back to the variable gain amplifier in which the gain is thereby controlled to maintain the burst signal of the output signal (colour signal) at a fixed level. In such an arrangement, when the level of the input signal is low in relation to the dynamic range of the input to the A-D converter which converts the analog input signal into a digital signal, the output signal of the variable gain amplifier is kept at a fixed level as described above; however, the number of bits of quantization to be allotted to the input signal at the A-D converter is reduced, thus increasing the quantization noise and resulting in a deterioration in the signal-to-noise ratio. Therefore, it is conventionally necessary to increase the number of bits of quantization in the A-D converter or amplify the input signal by providing an analog AGC circuit at the stage prior to the A-D converter in order to prevent the signal-to-noise ratio from deteriorating even if the level of the input to the A-D converter decreases. When the input signal is a colour signal and the burst signal included therein is kept at a fixed level, if the input signal has a narrow band such as the reproduced signal of a VCR (for example, when NTSC video signals are all subjected to FM modulation, the band width expands as wide as 15 MHz, but the VCR is not arranged to be capable of magnetic recording with frequencies higher than 8 MHz), the envelope of the burst signal is not in a rectangular waveform and distorted. Therefore, if the position at which the burst signal is to be extracted to detect the burst signal level deviates from the burst signal, there arises an error in the amplitude value (level) detected, thereby varying the level of the output signal of the variable gain amplifier, which has been a disadvantage of the conventional arrangement. US-A-4 191 995 discloses a digital automatic gain control circuit meant for preventing or eliminating, perturbations of an automatic gain control circuit in the case that a received signal level predetermined upper and lower limits. To this end, a digital attenuator adjustment signal G′ which is an estimate of the amount of attenuation adjustment necessary to be made on the digital attenuator is checked in view of its being within certain prescribed threshold limits by a threshold detector. An analog attenuator is driven or adjusted, only in case that said adjustment signal G′ is out of said limits, by an analog attenuator adjustment signal generated by an up/down counter. If G′ is within the limits the analog attenuator setting is not altered, the digital attenuator alone being adjusted. SUMMARY OF THE INVENTION A fist object of this invention is to realize a digital automatic gain control apparatus and an automatic gain control method, respectively, maintaining the output signal at a fixed level, while making effective use of the dynamic range of the A-D converter. A second object of this invention is to realize a digital automatic gain control apparatus and an automatic gain control method, respectively, resulting in not much change in the level of the output signal even if the detecting position of the burst signal deviates from the burst signal, in other words, even if the burst gate deviates from the burst signal. According to the invention, their is provided a digital automatic gain control apparatus and an automatic gain control method according to claims 1 and 9, respectively. Preferred embodiments are claimed in the subclaims. According to one particular aspect, the amplitude detector, a component of the digital automatic gain control apparatus according to this invention, has a function to calculate the rms (root mean square) value of the burst signal. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing the arrangement of a digital automatic gain control apparatus according to an embodiment of this invention; Figs. 2A through 2C are block diagrams showing the arrangement of a control circuit in the embodiment presented in Fig. 1; Fig. 3 is a block diagram showing the arrangement of an amplitude detector in the embodiment presented in Fig. 1; Figs. 4A through 4D are waveform diagrams showing control signal waveforms of the above amplitude detector; and Figs. 5A through 5D are waveform diagrams showing the operation of the above amplitude detector. DESCRIPTION OF THE PREFERRED EMBODIMENTS The digital automatic gain control apparatus according to an embodiment of this invention will be described with reference to the accompanying drawings. Fig. 1 is a block diagram showing the arrangement of an embodiment of this invention. The solid lines indicate analog signals and the double lines indicate digital signals. In this embodiment, description is made of a case in which the input signal is a colour signal including a burst signal. In Fig. 1, the colour signal of analog form, after amplified by a first variable gain amplifier 1, is converted by an A-D converter 2 into a digital signal, which is output to a second variable gain amplifier 3. The colour signal of digital form is amplified by the second variable gain amplifier 3 and output. The second gain amplifier 3 can be realized by use of an adder, for example. An amplitude detector 4 detects the amplitude level of the burst signal from the output signal of the second variable gain amplifier 3. The amplitude is compared with a reference level A by a first level comparator 5. An integrator 6 integrates the output signal of the first level comparator 5 and controls the second variable gain amplifier 3. As a result, the amplitude level of the burst signal in the output signal of the second variable gain amplifier 3 becomes equal to the reference level A. In the above operation, when the amplitude level of the input signal of the second variable gain amplifier 3 decreases, that is, when the amplitude level of the input signal of the A-D converter decreases, the gain of the second variable gain amplifier 3 increases, thereby controlling the amplitude level of the output signal so as to be at a fixed level at all times. Suppose that into the A-D converter, a colour signal is input which has an amplitude level sufficient to make effective use of the dynamic range thereof, that is to say, sufficient to allot a sufficient number of bits of quantization. If the output of the integrator 6 at this time is denoted by x, when the amplitude level of the colour signal input into the A-D converter 2 decreases, the output of the integrator 6 becomes larger than x, and conversely, when the amplitude level of the colour signal increases, the output of the integrator 6 becomes smaller than x. Therefore, if the output of the integrator 6 is x, it follows that into the A-D converter, a colour signal is currently input which has an optimum amplitude level, namely sufficient to make effective use of the dynamic range thereof. Here, a comparison is made between the output of the integrator 6 and a reference level B by a second level comparator 7, and if, accordingly, the level B is set at the same value as the x of the output of the integrator 6 when a colour signal is input into the A-D converter with an amplitude level sufficient to make effective use of the dynamic range thereof, and if the first variable gain amplifier 1 is controlled by a control circuit 8 to amplify the amplitude of the input colour signal to a specified level, it is possible to input a colour signal with an amplitude level sufficient to allot the optimum number of bits of quantization. Referring to Figs. 2A through 2C showing examples of arrangement of the control circuit 8, their arrangement and operation will be described. Fig. 2A shows a control circuit 8 which is composed of a D-A converter 20 to convert the digital output of the second level comparator 7 into analog form, and an integrator 21 to integrate the converted output of the comparator 7. An analog low-path filter, for example, is used as the integrator 21. Fig. 2B shows a control circuit 8 composed of a PWM (Pulse Width Modulation) circuit 22 and an integrator 23. The PWM circuit 22 modulates the output of the second level comparator 7 into a PWM signal and outputs the signal. The PWM signal is subjected to filtering by a low-pass filter, thereby being converted into an analog voltage. Here, the integrator 23 also serves as a low-pass filter. In this case, a D-A converter is not required which converts the digital signal output by the second level comparator 7 into an analog signal. Fig. 2C shows a control circuit 8 composed of an OR circuit 24 ("0" detection circuit) to find that the output of the second level comparator 7 is "0", a tri-state buffer 25, which allows the passage therethrough of the MSB (Most Significant Bit) of the output of the second level comparator 7 and the output of which has a high impedance when the output of the OR circuit 24 is "0", and an integrating circuit 26 to integrate this output. If the output of the second level comparator 7 is in its 2's complement form, for example, when the output is "0", all bits are "0s", and only in this case the output of the OR circuit is "0". The MSB of the output of the second level comparator 7 represents the polarity of the signal and at the same time indicates the large-small relationship between the output of the integrator 6 and the reference level B in Fig. 1 (for example, output of the integrator 6 > reference level B: MSB = 0, output of the integrator 6 < reference level B: MSB = 1). This MSB is integrated by the integrator 26 and the first variable gain amplifier 1 is controlled so that the output of the integrator 6 is equal to the reference level B. When the output of the integrator 6 has become equal to the reference level B, that is, when the output of the second level comparator 7 has become "0", the output of the OR circuit 24 is "0", which is input into the tri-state buffer 25 to supply output with high impedance, thereby stopping the control of the first variable gain amplifier 1 by the control circuit 8. A case in which the input signal is a colour signal has been described. However, the effect of this invention is not limited to this case, can be applied to any kind of input signal by using a level detecting means (amplitude detector 4) suitable for the kind of a signal to be input, as the amplitude detector 4 is used to detect the amplitude level of the burst signal in this embodiment in which the input signal is a colour signal. Referring to Figs. 3 to 5, description will now be made of the arrangement and operation of the amplitude detector 4 which squares and averages the amplitude of the burst signal in the input signal (colour signal) for the burst period. Fig. 3 is a block diagram showing a concrete arrangement of the amplitude detecting circuit 4. In Fig. 3, the colour signal in digital form output by the second variable gain amplifier 3 undergoes detection of its amplitude by the detection circuit 35. The output is squared by a square-law circuit 30, and is averaged to an output during the burst period by an averaging circuit 36 composed of an adder circuit 31, a D flip-flop 33 and a switch circuit 34, namely, the amplitude of the burst signal is averaged. Various control signals to operate the averaging circuit are shown in Figs. 4A through 4D. Fig. 4A is a clock pulse diagram of the switch circuit 34. Clock pulses are extracted only when the burst gate pulse (Fig. 4B) is high. Those extracted pulses are denoted by the signal x and the signal waveform is shown in Fig. 4C. The burst gate pulse is a pulse which goes to the 1 level during a burst period. The signal x is input into the (C) clock input of the D flip-flop 33. The D flip-flop 33 is first reset by a reset pulse (Fig. 4D). The Q output of the D flip-flop 33 is added with the output of the square-law circuit 30 and fed back to the D input of the D flip-flop 33. Therefore, it follows that the adder circuit 31 averages the output of the square-law circuit 30 during the burst period. The average value (the output of the adder circuit 31) is input into the square root circuit 32 where its square root is calculated. In other words, by the use of this amplitude detection circuit 4, the output of the second variable gain amplifier 3 is controlled so that the rms (root mean square) value of the amplitude of the burst signal included therein is constant. Even if the colour signal to be input is two colour difference signals, a R-Y signal and a B-Y signal, since the R-Y signal and the B-Y signal intersect each other at right angles, it is only necessary to provide two square-law circuits and, after squaring these signals separately, to add these up and input the result into the averaging circuit. The square-law circuit 30 and the square root circuit 32 can be realized by a table of a ROM (Read Only Memory). Referring to Fig. 5, the effect of controlling the rms value so as to be constant will be described in the following. Fig. 5A shows the envelope waveform of a burst signal subjected to a band limitation like a reproduced signal of the VCR. Fig. 5C shows the values obtained by averaging the absolute values of the burst signal of Fig. 5A and Fig. 5D shows the rms values derived from the burst signal of Fig. 5A, both during the time period T of Fig. 5B when the burst gate pulse is at a high level. In Figs. 5C and 5D, the axis of abscissa represents the position relative to the burst of the burst gate. The time when the centre of the burst gate pulse coincides with the centre of the burst signal is indicated by t = 0, and at this time of coincidence, the output is at its maximum. In other words, Figs. 5C and 5D respectively indicate outputs of the average values in relation to the deviation of the burst gate from the burst. The waveform indicated by the dotted lines in Fig. 5B is shown to deviate by τ from the waveform indicated by the solid line. That is to say, the dotted-line waveform is of the burst gate pulse whose centre deviates by τ from the centre of the burst signal. As is clear from Figs. 5C and 5D, the variation of the output in relation to the deviation of the burst gate is greater in the curve of the average absolute values than in the curve of the rms values. For example, if the maximum output in the case where the burst pulse centre coincides with the burst signal centre is expressed by "1" and if the output is compared in terms of a ratio to the maximum output of "1", when the centre of the burst gate pulse deviates by τ from the centre of the burst signal in contrast with the case where these centres coincide with each other (time t = 0), output at τ in the average absolute values (Fig. 5C) is "0.8" and output at τ in the rms values (Fig. 5D) is "0.91". Therefore, an automatic gain controller using the rms values can minimize the variation in output caused by the deviation of the burst gate. In this embodiment, there is provided two feedback loops, one being a digital system control loop to feed data back from the amplitude detector 4 to the second variable gain amplifier 3 and the other being an analog-system feedback loop to feed data back from the second level comparator 7 to the first variable gain amplifier 1, malfunctioning due to interference between the two loops can be prevented by setting the response of the analog-system feedback loop to occur later than the response of the digital-system feedback loop.

Claims: A digital automatic gain control apparatus comprising: a first variable gain amplifier (1) for varying the amplitude of an input signal; an A-D converter (2) for converting the analog output signal of said first variable gain amplifier (1) into digital form; a second variable gain amplifier (3) for varying the amplitude of the output signal of the A-D converter (2); an amplitude detector (4) for detecting the amplitude of the output signal of said second variable gain amplifier (3); a first level comparator (5) for comparing the output of said amplitude detector (4) with a first reference value (A) and outputting the difference; a first integrator (6) for integrating the output of said first level comparator (5) and controlling said second gain amplifier (3); a second level comparator (7) for comparing the output (X) of said first integrator (6) with a second reference value (B) and outputting the difference; and a control circuit (8) for controlling said first variable gain amplifier (1) according to the output of said second level comparator (7). The digital automatic gain control apparatus according to claim 1, wherein the input signal is a colour signal added with a burst signal, and wherein said amplitude detector (4) comprises a square-law circuit (30) for detecting the amplitude of the burst signal and squaring the value of the amplitude, an averaging circuit (36) for averaging the output of said square-law circiut (30) for a fixed period of time, and a square root circuit (32) for calculating a square root of the output of said averaging circuit (36). The digital automatic gain control apparatus according to claim 1, wherein the input signal consists of two colour difference signals added with burst signals, and wherein said amplitude detector (4) comprises two square-law circuits for respectively squaring the levels of the burst signals of the two colour difference signals, an adder circuit (31) for calculating the sum of said two square-law circuits, an averaging circuit (36) for averaging the output of said adder circuit (31) for a fixed period of time, and a square root circuit (32) for calculating a square root of the output of said averaging circuit (36). The digital automatic gain control apparatus according to any preceding claim, comprising: a second integrator (21, 23, 26) for integrating the output of said second level comparator (7) and controlling said first gain amplifier (1). The digital automatic gain control apparatus according to any of claim 1 to 3, wherein said control circuit (8) comprises a D-A converter (20) for converting the output signal in digital form of said second level comparator (7) into an analog signal, and a second integrator (21) for integrating the analog output signal. The digital automatic gain control apparatus according to any of claims 1 to 3, wherein said control circuit (8) comprises a PWM circuit (22) for pulse-width modulation of the output signal in digital form of second level comparator (7), and a second integrator (23) for integrating the output signal. The digital automatic gain control apparatus according to any of claims 1 to 3, wherein said control circuit (8) comprises a "0" detection circuit (24) for finding that the output signal in digital form of said second level comparator (7) is "0", a tri-state buffer (25) for allowing the Most Significant Bit of the output signal of said second level comparator (7) to be input thereinto and supplying an output with high impedance when said "0" detection circuit (24) detects "0", and a second integrator (26) for integrating the output of said tri-state buffer (25). The digital automatic gain control apparatus according to any preceding claim, wherein the second reference value (B) is the output value (X) of said first integrator (6) when a signal with a specified amplitude is input into said A-D converter (2). An automatic gain control method for simultaneously controlling the level of an analog signal passed through an analog variable gain amplifier (1) and inputted to an A-D converter (2) and the level of a digital signal outputted from said A-D converter (2) and passed through a digital variable gain amplifier (3), comprising the steps of: detecting the level of the digital signal as the output of said A-D converter (2); comparing the level of the digital signal with a given reference level (A) to produce a difference signal; integrating said difference signal to produce a control signal (X), thereby controlling the digital variable gain amplifier (3), so that the digital signal is maintained at a fixed level; and comparing the level of the control signal (X) with another given reference level (B) to produce another difference signal; thereby controlling the analog variable gain amplifier (1) so that the analog signal is maintained at a fixed level.

Inventors: MATSUMOTO TOKIKAZU, MATSUMOTO, TOKIKAZU
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1989
Main classification: H03G3
IPC codes: H03G3