Decimating filter
The invention relates in general to filters, and in particular to switched-capacitor decimating filters. 
     It is well known that input signals applied to sampled data systems, such as switched-capacitor filters, require band-limiting in order to prevent aliasing. Typically, anti-aliasing prefilters are connected to an input stage of the switched-capacitor filter. For a low-pass switched-capacitor filter operating at a predetermined sampling frequency and exhibiting a predetermined cut-off frequency, the anti-aliasing filter is required to band-limit input signals to frequencies not greater than the predetermined sampling frequency minus the predetermined cut-off frequency. 
     Prior art analog anti-aliasing filters are typically in the form of active RC filters fabricated in conjunction with the switched-capacitor filter on an integrated circuit chip. The RC filters are typically implemented in polysilicon or diffusion layers of the chip such that inaccuracies in the fabrication process typically result in large tolerances which degrade filter performance. 
     One prior art alternative anti-aliasing filter utilizes external or post trimmed RC filters. This alternative suffers from the disadvantage that the cost of an external RC filter may exceed that of the switched-capacitor filter, and furthermore, monolithic active RC filters typically exhibit a relatively high pole frequency due to technological limitations imposed on the tolerances of capacitor and resistor values. 
     A second prior art alternative to expensive anti-aliasing filters is to increase the sampling frequency of the switched-capacitor filter. Accordingly, the anti-aliasing filter pass band is considerably enlarged, resulting in less stringent analog filter requirements such that inexpensive, easily fabricated RC anti-aliasing filters can be used. However, increasing the sampling frequency of the switched-capacitor filter generally increases the spread of capacitance values among the various capacitors as well as increasing sensitivity of filter response to parasitic capacitances and design tolerances, resulting in deterioration of filter sensitivity. 
     A further alternative is to increase the sampling frequency on an input stage of the switched-capacitor filter subsequent to filtering via an inexpensive analog anti-aliasing filter. This alternative is known in the art as decimation. 
     By sampling a band-limited input signal at a first frequency equal to an integer multiple of the switched-capacitor sampling frequency, transfer function zeroes appear in the amplitude response of the switched-capacitor filter at submultiples of the first frequency. Hence, the preceeding analog anti-aliasing filter is required to band-limit the input signal only to frequencies less than the first frequency minus the switched-capacitor cut-off frequency. 
     One such decimation technique is described in an article entitled SWITCHED-CAPACITOR DECIMATION AND INTERPOLATION CIRCUITS, by Roubik Gregorian and William E. Nicholson, published in the IEEE Transactions on Circuits and Systems, Vol., CAS-27, No. 6, June 1980, pages 509-514. According to the Gregorian technique, an input signal is sampled at twice the switched-capacitor sampling frequency. Decimation is performed and accordingly, the input analog anti-aliasing filter is required to band-limit the input signal to a frequency of only twice the sampling frequency minus the switched-capacitor cut-off frequency. 
     However, the Gregorian circuit exhibits numerous stray capacitances due to interconnections on the integrated circuit. These stray capacitances result in finite attenuation of input signal frequencies at the sampling frequency. As discussed above, it is desired that the filter transfer function exhibits a zero at the sampling frequency, (i.e. infinite attenuation), otherwise aliasing will typically occur. 
     Another decimation technique is disclosed in an article entitled INTEGRATED SWITCHED-CAPACITOR LOW-PASS FILTER WITH COMBINED ANTI-ALIASING DECIMATION FILTER FOR LOW FREQUENCIES, by Daniel C. von Grunigen et al, which appeared in the IEEE Journal of Solid-State Circuits, vol., SC-17, No. 6, December 1982, page 1024. 
     The circuit of von Grunigen et al overcomes the disadvantages of stray capacitance in the Gregorian circuit, yet requires complex timing generation in order to sample an input signal at a multiple of the filter sampling rate. 
     Also, it has been found that while the circuit of von Grunigen et al is suitable for systems with low input signal frequencies (e.g. bio-electronic systems), it is unsuitable for systems with high input signal frequencies, such as digital signal transmission systems. For example, in a typical digital signal transmission system having a 2.56 MHz transmission rate and switched-capacitor implementation, approximately 200 nanoseconds are allotted per sample for charging the capacitors and allowing internal operational amplifiers to settle to a final output level. Design constraints of the internal capacitors and operational amplifiers generally prohibit sampling of the input signal at much greater than 2.56 MHz. 
     According to the present invention, an input signal to be applied to a sampled data system (such as a switched-capacitor filter) is initially filtered in a simple RC analog anti-aliasing low pass filter in a well known manner and then sampled on both phases of a sampling clock signal. By sampling the input signal on both phases of the sampling clock signal, the signal is effectively sampled at twice the frequency of the sampling clock signal, resulting in decimation. The input signal samples are integrated, filtered and sampled again at the frequency of the sampled data system, which is typically equal to approximately one-half the frequency of the sampling clock signal. 
     Hence, according to the present invention a decimating filter is provided which overcomes the disadvantages of prior art anti-aliasing techniques requiring high sampling frequencies or expensive analog anti-aliasing filters, yet is useful for systems requiring a high sampling frequency, such as digital signal transmission systems. Also, the present invention incorporates design features for eliminating stray capacitances, yet requires no complex timing circuitry as in the circuit of von Grunigen et al. 
     In general, the invention is a decimating filter comprised of an input for receiving a first input signal, and a circuit for generating first and second clock signals having first and second sampling frequencies respectively, the first frequency being a multiple of the second frequency. The invention is further comprised of a first switched-capacitor circuit for receiving the first clock signal, sampling the received input signal on a first phase of the first clock signal and generating a first sample signal in response thereto, and a second switched-capacitor circuit for receiving the first clock signal, sampling the received input signal on an opposite phase of the first clock signal and generating a second sampled signal in response thereto, whereby the input signal is effectively sampled at twice the first sampling frequency as a result of being sampled on opposite phases of the first clock signal. In addition, the invention includes an integrator circuit for receiving the second clock signal, integrating the first and second sampled signals, sampling the integrated signals at the second sampling frequency and generating a filtered output signal in response thereto. 
     The invention is also a decimating filter, comprised of a first input for receiving a first input signal, a second input for receiving a second input signal including a reduced version of the first input signal, and a circuit for generating first and second clock signals having first and second sampling frequencies respectively, the first frequency being a multiple of the second frequency. The invention is further comprised of a first switched-capacitor for receiving the first clock signal, sampling the first input signal on a first phase of the first clock signal and generating a first sampled signal in response thereto, a second switched-capacitor for receiving the first clock signal, sampling the first input signal on an opposite phase of the first clock signal and generating a second sampled signal in response thereto, a third switched-capacitor for receiving the first clock signal, sampling the second input signal on the first phase of the first clock signal, and generating a third sampled signal in response thereto, and a fourth switched-capacitor for receiving the first clock signal, sampling the second input signal on the opposite phase of the first clock signal, and generating a fourth sampled signal in response thereto. In addition, the invention is comprised of circuitry for subtracting the third and fourth sampled signals from the first and second sampled signals, whereby the reduced versions of the first input signal are substantially cancelled from the second input signal, and an integrator for receiving the second clock signal, integrating the subtracting signals, sampling the integrated signals at the second sampling frequency and generating a decimated filtered output signal in response thereto. 
    
    
     A better understanding of the invention will be obtained by reference to the detailed description below, in conjunction with the following drawings in which: 
     FIG. 1 is a schematic diagram of a decimating filter according to a preferred embodiment of the invention, and 
     FIG. 2 is a timing diagram of sampling clock signals according to the preferred embodiment. 
    
    
     With reference to FIG. 1, a switched-capacitor decimating filter is shown connected via line input and output terminals L IN  and L OUT  to a transformer T1 connected to a balanced line, such as a tip and ring lead pair, T and R. The portion of the schematic diagram designated by dashed line 1--1 does not form part of the present invention but is the environment in which the invention typically operates. A transmit terminal T x  is connected to the L OUT  terminal and via an output resistor R OUT  to the transformer T1 and the L IN  terminal. 
     As discussed in greater detail below, signals appearing on the L IN  terminal are predominantly comprised of signals originating from a remote signal source (i.e. a subscriber set) and carried by the tip and ring lead pair, T and R, yet may be partially comprised of reduced versions of near end signals originating on the T x  terminal and transmitted through the output resistor, R OUT . 
     An incoming signal received on the L IN  terminal is filtered by a simple RC anti-aliasing filter 1 in a well known manner and then applied via transistor switches 2 and 3 to first terminals of capacitors 5 and 7 respectively. Similarly, a signal received on the L OUT  terminal is filtered by a further simple RC anti-aliasing filter 8 and then applied via transistor switches 9 and 11 to first terminals of capacitors 13 and 15 respectively. The first terminals of capacitors 5, 13, 15 and 17 are connected to ground via transistor switches 17, 19, 21 and 23 respectively. 
     In a successful prototype of the invention, capacitors 5 and 7 were of twice the capacitance of capacitors 13 and 15 in order to perform rudimentary echo signal cancellation of output signals from the T x  terminal appearing on the L IN  terminal as described in greater detail below. 
     Second terminals of capacitors 5 and 13 are connected together and via transistor switch 25 to an inverting input of an operational amplifier 27, and also to ground via transistor switch 29. Likewise, second terminals of capacitors 7 and 15 are connected together and to the inverting input of operational amplifier 27 via transistor switch 31, and to ground via transistor switch 33. 
     An integrating capacitor 35 is connected to an output of operational amplifier 27 and to the inverting input thereof, and the non-inverting input of amplifier 27 is connected to ground. A feedback capacitor 37 is connected in parallel with integrating capacitor 35, via transistor switches 39 and 41 to the inverting input and the output respectively of operational amplifier 27, and to ground via transistor switches 43 and 45. 
     The output of operational amplifier 27 is connected via transistor switch 47 to a switched-capacitor filter 49 of well known design having a signal output terminal RX and a clock input for receiving a clock signal φ3. The switched-capacitor filter 49 can alternatively be any sampled data system for which anti-aliasing prefiltering is required. 
     Each of the aforementioned transistor switches has a control input thereof for receiving one of clock signals φ1, φ2 or φ3 as illustrated. The transistor switches are typically in the form of CMOS transmission gates, comprised of a pair of NMOS and PMOS transistors operated under control of clock signals φ1, φ2 or φ3. Logic compliment or inverted versions of the φ1, φ2 and φ3 signals are also applied to further control inputs of the corresponding aforementioned transmission gates but are not illustrated for ease of description. 
     Considering operation of the circuit with reference to signals on the L IN  terminal and filtered by filter 1, (momentarily disregarding signals on the L OUT  terminal), capacitor 5 charges to the instantaneous voltage level of a signal on the L IN  terminal filtered by filter 1, via transistor switches 2 and 29 in response to a positive half cycle of clock signal φ1, as shown in FIG. 2. Simultaneously, capacitor 7 is discharged to ground via switch 23, and a charge similar to that discharged from capacitor 7, but with opposite polarity, is induced across integrating capacitor 35 via transistor switch 31. 
     In response to a subsequent positive half cycle of the φ2 clock signal, capacitor 7 is charged to the voltage level of the signal then appearing on the L IN  terminal filtered in filter 1, via switches 3 and 33. Capacitor 5 is simultaneously discharged via switch 17 such that a similar but opposite polarity charge is induced across integrating capacitor 35 in parallel with feedback capacitor 37, via switches 25, 39 and 41. 
     The voltage appearing across integrating capacitor 35 and at the output of integrator 50 is designated as &#34;V OUT ,n&#34;, and is represented by the following relation: 
     
         V.sub.OUT,n=[V.sub.OUT,n-1/2]-[AV.sub.OUT,n]-[BV.sub.IN,n] 
    
     where &#34;V OUT ,n-1/2&#34; designates the voltage across integrating capacitor 35 at a time &#34;n-1/2&#34; shown in FIG. 2, &#34;A&#34; designates the ratio of capacitance of feedback capacitor 37 to integrating capacitor 35, &#34;B&#34; designates the ratio of capacitance of capacitor 5 (or 7) to integrating capacitor 35, and the term &#34;V IN ,n&#34; designates the instantaneous voltage on the L IN  terminal at time &#34;n&#34;. 
     The above mentioned relation can be expressed in the sampled frequency domain as follows: 
     
         V.sub.OUT =V.sub.OUT z.sup.-1/2 -AV.sub.OUT -BV.sub.IN 
    
     where the term &#34;z -1/2  &#34; designates a one-half sample delay of the φ1 (or φ2) clock signal. 
     During a subsequent positive half cycle of the φ1 clock signal (i.e. &#34;n+1/2&#34; in FIG. 2), capacitor 5 is again charged to the instantaneous voltage on the L IN  terminal filtered by filter 1. Also, capacitor 7 is discharged such that a similar but opposite polarity charge is induced across integrating capacitor 35, capacitor 37 being disconnected therefrom via switches 39 and 41 and discharged via switches 43 and 45. 
     The voltage across integrating capacitor 35, and hence the output voltage of integrator 50 can be designated at time &#34;n+1/2&#34; as follows: 
     
         V.sub.OUT, n+1/2=[V.sub.OUT,n]-[BV.sub.IN,n+1/2] 
    
     which can be transformed to a sampled frequency domain relation as follows: 
     
         V.sub.OUT z.sup.-1/2 =V.sub.OUT z.sup.-1 -BV.sub.IN z.sup.-1/2 
    
     It will be noted that the feedback term &#34;AV OUT  &#34; has been eliminated in relation to the previous sampled frequency domain relation with respect to samples taken at time &#34;n&#34;. This is due to capacitor 37 being discharged and thereby disconnected from the circuit. Thus, it can be seen that no filtering function is performed during positive half cycles of the φ1 clock signal. 
     The first frequency relation can be algebraically manipulated to yield a transfer function, as follows: ##EQU1## where the term &#34;1+z -1/2  &#34; represents a decimation transfer function, and the term ##EQU2## represents a well known low-pass filter transfer function. 
     The output of integrator 50 is sampled via switch 47 during positive half cycles of the φ3 clock signal, shown in FIG. 2, in order to conform to the φ3 clock signal sampling frequency of the switched capacitor filter 49 and additional circuitry (such as D/A converters, RAM, etc.) which may be connected to the RX terminal. 
     Operational amplifier 27, in conjunction with capacitors 35 and 37 exhibits a predetermined settling time such that during a positive half cycle of the φ3 clock signal the output of integrator 50 settles to a quiescent level at a predetermined instant of time within the positive half cycle of the φ2 signal. The output of integrator 50 is effectively sampled via switch 47 when it reaches the quiescent level. 
     Both decimation and filtering are performed according to the present circuit whereby the input signal on the L IN  terminal is effectively sampled twice (i.e. at times n-1/2 and n in FIG. 2) for each half-cycle of the φ1 (or φ2) clock signal, resulting in decimation by two, yet requiring only the φ1 and φ2 clock signals and no additional higher frequency clock signal, as in the prior art device of von Grunigen et al. Filters 1 and 8 are required to band-limit the input signal only to frequencies less than the frequency of the φ1 (or φ2) clock signal minus the cut-off frequency of switched-capacitor filter 49. Thus, filters 1 and 8 are preferably simple inexpensive RC anti-aliasing filters. 
     Considering operation of capacitors 13 and 15, capacitor 13 is discharged via switches 19 and 29, and capacitor 15 is charged to the instantaneous voltage level of a signal on the L OUT  terminal filtered in filter 8, via transistor switch 11 during a positive half cycle of the φ1 clock signal. A similar charge of like polarity is developed across integrating capacitor 35 via switch 31. 
     In response to a positive half cycle of the φ2 clock signal, capacitor 13 charges to the voltage level on the L OUT  terminal filtered by filter 8, via switch 9, and a similar charge develops across capacitor 35 via switch 25, while capacitor 15 is discharged via switches 21 and 33. 
     Due to the phase relationship of the various switching transistors and the φ1 and φ2 clock signals, it is seen that samples of the signal on the L IN  terminal are stored on capacitors 5 and 7, and charge is negatively transferred to integrator 50 whereas samples of the signal on the L OUT  terminal are stored on capacitors 13 and 15, and charge is positively transferred to integrator 50. Thus, capacitors 5 and 7 function effectively as negative resistances, whereas capacitors 13 and 15 function as positive resistances. 
     A well known problem in signal transmission along balanced lines, (such as tip and ring lead pairs T and R), is the phenomenon of transhybrid loss, wherein a reduced version of a transmitted output signal on the T x  terminal appears on the L IN  terminal. In particular, the amplitude of the output signal appearing on the L IN  terminal is equal to approximately one-half the amplitude of the original output signal on the T x  terminal, due to voltage drop across the output resistor R OUT . 
     As discussed above, capacitors 5 and 7 are preferably of twice the capacitance of capacitors 13 and 15. Hence, capacitors 5 and 7 function as negative resistances having effective resistances equal to approximately one-half the effective resistances of capacitors 13 and 15 (which function as positive resistances). Accordingly, near-end echo or transhybrid loss of the output signal appearing on the L IN  terminal is effectively cancelled at the inverting input of operational amplifier 27, which acts as a summing node. 
     Thus, by substantially eliminating near-end signal, rudimentary echo cancellation is performed, thereby improving the dynamic range of a signal carried by on the tip and ring leads, T and R, and received on the L IN  terminal (FIG. 1). 
     A person skilled in the art understanding this invention may now conceive of other embodiments or variations using the principles described herein. 
     For example, switches 25 and 39, and 29 and 45 perform substantially the same function. Thus, switches 39 and 45 can be omitted and the first terminal of capacitor 37 can be connected to the node connecting the second terminals of capacitors 5 and 13. 
     Also, whereas the invention has been described in relation to a decimating filter having differential inputs (L IN  and L OUT ) for performing rudimentary echo cancellation, it is also useful for other applications, such as a simple decimating filter having one input, (for instance L IN ) and comprised of two input capacitors and associated switches (for instance capacitors 5 and 13, and switches 1, 9, 17, 19, 25 and 29). 
     All these and other variations are considered to be within the sphere and scope of this invention, as defined in the claims appended hereto.