Abstract:
A codec (coder/decoder), having particular utility in a pulse code modulation (PCM) communications system employing per-line coding and decoding, employs a common digital-to-analog (DAC) converter. A PCM signal to be reconstructed is decoded at two points of time within the basic sampling interval, preferably at twice the basic sampling frequency. In order to realize the desired analog reconstruction level, the PCM signal is first decoded at a first decision level lying on one side of the desired reconstruction level; then modified and again decoded at a different decision level lying on the other side of the desired reconstruction level. The average of the two decoded analog signals then lies on the desired reconstruction level. In a conventional PCM system, the two PCM samples differ by only one least significant bit (LSB) in the PCM word used in setting the common DAC. In a preferred embodiment of the invention, separate storage registers are respectively employed for the encoding and decoding, together with a selector for switching between the two registers during the two desired decoding intervals. In this way, the encoding operation may be carried on during a substantial portion of the basic sampling cycle, being interrupted only for generation of decoded samples. The invention is applicable to PCM systems generally, including compressed pulse code modulation (CPCM) systems operating in accordance with the U-law or the A-law.

Description:
This is a continuation of application Ser. No. 830,779 filed Sep. 6, 1977, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     My invention relates to codecs (coder-decoders), primarily intended for encoding and decoding of analog signals, e.g., speech of similar signals, in Pulse Code Modulation (PCM) systems, and is particularly applicable to so-called per-line codecs which are not time-shared by several PCM channels. 
     A particular and commonly-used category of such codecs relies on so-called digital-to-analog converters (DAC&#39;s) for encoding and decoding. The DAC usually comprises a resistor network in combination with a number of electronic switches which are set by the digital code to be converted. The analog output signal from the combination network will then be related to a reference input signal according to the setting of the switches and the desired transfer characteristic. This reference signal is usually a fixed voltage of selectable polarity. 
     In order to accommodate great variations in the signal levels to be encoded, while yet maintaining an acceptable signal-to-quantization-noise ratio, compressed pulse code modulation (CPCM) employing companding is customarily used. This may follow one of the companding laws accepted as standard in the communications industry, e.g., the so-called Mu-Law or the so-called A-Law. As is well-known, companding requires a nonlinear transfer characteristic between the input signal and the resulting CPCM code. An inverse transfer characteristic is applied in the decoding process in order to provide an overall transfer charactertistic that is linear after the speech signal has been both coded and decoded. This requirement can be met, at least approximately, by using identical DAC&#39;s for both encoding and decoding. Since the DAC is one of the most complex and costly components of a PCM system using per-line codecs, such standardization of the DAC for both the encoding and the decoding processes is highly desirable. 
     Even more desirable from the standpoint of economy and circuit simplification would be the use of a single DAC for both encoding and decoding in each line. However, upon closer examination of such multiple use of a DAC in a codec, one encounters a dilemma. Regardless of whether companding is used or not, the decision levels during encoding and the reconstruction levels during decoding do not coincide. As a matter of fact, in order to achieve minimum overall signal degradation in an end-to-end connection, the reconstruction levels during decoding should be exactly midway between the corresponding decision levels during encoding. Thus, it has previously been considered necessary to use separate DAC&#39;s for encoding and decoding, or else to add complexity to the DAC so that its transfer characteristic can be modified by a control signal between the encode and decode modes. 
     SUMMARY OF THE INVENTION 
     My invention offers a simple solution to the above dilemma so that the same DAC can be used for both encoding and decoding without the necessity of adding circuit complexity to the DAC. The basic principle, according to the invention, is to generate two samples, i.e., analog signal levels, in the decoding for each received PCM word, in contrast to the normal procedure of generating only one sample for each PCM word. 
     In conventional PCM systems, the analog signal waveform to be transmitted as PCM signals is sampled at an 8 khz quantized and then encoded into PCM words at a rate of 8 KHz, i.e., at 125 μs intervals. The transmitted PCM words are received at an 8 khz rate. Each received PCM word is decoded by generating a single analog signal sample. The analog signal samples which also occur at an 8 khz rate are filtered to reconstruct an analog output. One aspect of my invention, during decoding, samples are generated at twice this rate, i.e., at 16 KHz, preferably at 62.5 μs intervals. The first of the two samples per received PCM word is generated by setting the DAC to the decision level corresponding to the quantization level represented by the received PCM word. This decision level corresponds to the nearest decision level above the desired reconstruction level. The second sample is generated by modifying the received PCM word to represent a decision level below the desired reconstruction level and by setting the DAC to the nearest decision level below the desired reconstruction level. The second sample is then applied to the output of the codec 62.5 μs later, assuming an 8 KHz basic sampling rate in the system. Of course, the order of the samples may be reversed, i.e., the lower amplitude sample may be generated first and the higher amplitude sample may be generated 62.5 μs later. The choice is a matter of practical implementation. Since the two samples differ by only one least significant bit (LSB) in the PCM word used for setting the DAC, it takes only the quantization level, which is represented by the simple additional digital circuitry in the control logic for the DAC to modify the incoming PCM word. Included in the modification of the control logic necessary to implement the invention are also timing arrangements to generate two samples, equally separated, per basic decoding interval, rather than one sample. With modern large-scale-integration (LSI) technology developed by the semiconductor industry, such modifications or additions of circuitry can still be made at much lower cost than the cost of providing separate DAC&#39;s for encoding and decoding or the cost of modifying a single DAC to provide different levels during encoding and decoding. 
     The result of providing two samples during a basic sampling interval, e.g., an interval of 125 μs, is that the analog signal value generated received during the interval will lie midway between the two generated signal levels. This is exactly what is desired in order to arrive at the proper reconstruction level. A conventional filter that receives the decoded output signal can then provide at its output the proper average signal corresponding to the desired reconstruction level. 
     Two such samples, differing in amplitude by a quantization level represented by the LSB of a PCM word LSB and generated at twice the conventional sampling rate, may be regarded as amplitude modulation signals of square waveform having a basic modulation frequency equal to the conventional sampling rate, e.g., 8 KHz. In such a square waveform, there will also be unwanted odd harmonics but since their amplitudes are much lower than the amplitude of the fundamental, they can be adequately attenuated by any filter that is suitable for conventional types of PCM decoders. It can readily be shown, for example, that they may be adequately attenuated by a low-pass filter having a high rejection of 4 KHz and higher frequencies in a communication system conventionally having signal frequencies lying in the 300-3400 KHz band. Furthermore, the degree of modulation at harmonic frequencies is very low for all signal levels of concern, i.e., for signal levels higher than approximately 40 dB below maximum signal level. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     In the accompanying drawing: 
     FIG. 1 is a simplified schematic diagram illustrating one form of codec using a common DAC for encoding and decoding a PCM signal in accordance with my invention; 
     FIG. 2 is another similar schematic diagram illustrating a modified form of codec with a common DAC embodying the invention; and 
     FIG. 3 is a timing diagram comprising a set of exemplary waveforms which will be particularly referred to in connection with the description of the codec of FIG. 2. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In the codec represented schematically in FIG. 1, one-line connections have been shown between major components to simplify the drawing. It will be apparent to those skilled in the art that each line may represent several conductors or control paths. The major components of this version of my improved codec comprise an Input Sample-and-Hold Circuit (Input S/H Circuit) 100, a Comparator 101, Control Logic and Timing Circuits 102, and 8-bit Register 103, a common Digital-to-Analog Converter (DAC) 104, an Output Sample-and-Hold Circuit (Output S/H Circuit) 105, an Output Low-Pass Filter 106 and a Clock 107. 
     Analog signals to be encoded are supplied over Input Path 110 and the sampled signal level to be encoded is supplied over a path 111 to Comparator 101. The Control Logic and Timing Circuits 102, which receive the output of Comparator 101 over a path 112, are controlled by clock pulses over a path 113 and by conventional Start or Strobe pulses from suitable circuits (not shown) over a path 114. Input PCM signals are also supplied over a Bus 115. The outputs of the Control Logic and Timing Circuits 102 comprise the 8-bit leads 116 to the 8-bit register 103 and a Read-Out Control path 117. Outputs from the 8-bit Register 103 comprise the 8-bit Leads 118 interconnecting it with the common DAC 104. The PCM Output Bus is represented conventionally by reference numeral 119. An output path 130 from the DAC 104 supplies signals both to Comparator 101 over path 131 and to Output S/H Circuit 105 over a path 132. Finally, the decoded analog output signals are supplied over a path 133 and through Low-Pass Filter 106 to the Output Path 134. Sample-and-Hold circuits 100 and 105 are also controlled from the Control Logic and Timing Circuit 102, as indicated schematically by control paths 150 and 151, respectively. 
     The procedure for encoding in the system of FIG. 1 will now be briefly described. Assume that an 8 KHz sampling rate is used so that the basic sampling cycle occupies a time interval of 125 μs. The input analog signal on path 110 is then sampled by Input S/H Circuit 100 at the beginning of each sampling cycle and is held there for the balance of the 125-μs interval. This analog signal level, supplied over path 111, is compared in Comparator 101 with the analog output on paths 130-131 from the DAC 104. The output of Comparator 101 on path 112 causes the Control Logic and Timing Circuits 102 to vary the output from the 8-bit Register 103 in a direction tending to make the analog output from DAC 104 match the analog input signal from the Input S/H circuit 100. 
     For this matching process, many alternative strategies or algorithms may be used. The most efficient, from the standpoint of speed of response, is to approach the final value by conventional successive approximation techniques. Regardless of the method used, final result of the manipulations of the bits controlling DAC 104 should be a setting (i.e., a PCM word) which corresponds to an analog output on paths 130-131 which differs from the sampled input signal on path 111 by less than 1 step, corresponding to one least significant bit (LSB), from the output of 8-bit Register 103. Stated another way, the output from Comparator 101 on path 112 should change in response to a change in the LSB only. 
     A logic signal level supplied over path 150 determines whether the Input S/H Circuit 110 is tracking the analog input signal (i.e. sampling this signal) or whether it is holding the value of this input signal as it existed at the start of the holding interval. The Output S/H Circuit 105 is similarly controlled by a logic signal level over path 151. 
     With conventional D2/D3 PCM format used in the United States, each PCM word includes a sign bit and magnitude bits. The magnitude bits are the logic complements of a conventional binary word which expresses the amplitude of the sampled level on an approximately logarithmic basis. In accordance with this complementary representation, a decrease in the sampled level results in a corresponding increase in the magnitude portion of the PCM word. 
     The contents of the 8-bit Register 103 are used as the magnitude portion of an outgoing PCM word and are transmitted together with a sign bit over the PCM output bus 119 as representing the encoded signal. Hence, when the content of the 8-bit Register 103 is such that a difference of only one LSB will change the logic output of the Comparator 101, it represents the desired PCM word which is now taken out on the Output Bus 119 at a time determined by the Control Logic and Timing Circuits 102. It will be appreciated by those skilled in the art that this word can be transmitted in either parallel or serial form, as the particular application dictates. 
     The frequencies supplied by the Clock 107 and the parameters of the Control Logic and Timing Circuits 102 must be so chosen that the complete encoding operation will be completed during a first portion of the 125-μs cycle such that the remaining time in the cycle will be sufficient for the circuit to perform the decoding operation by use of the common DAC 104. 
     The decoding process in the system of FIG. 1 requires considerably less time than the encoding process. In principle, decoding only requires that the incoming PCM code on the Input Bus 115 be applied to the common DAC 104 through the 8-bit Register and that thereafter the Output S/H Circuit 105 be switched to &#34;sample&#34; for a time period within the 125-μs interval such that the analog output signal on path 130 can be acquired and stored. The Output S/H Circuit 105 may thereafter be switched to &#34;hold&#34;, freeing DAC 104 for a subsequent encoding operation. 
     According to a preferred form of my invention, decoding is executed in two similar steps at 62.5-μs intervals. This means that the encoding must take place within one of the two 62.5-μs intervals or that it must be interrupted during the second decode sampling. The latter method makes the control logic and timing circuitry somewhat more complex but it has the advantage that more total time is available for encoding. This in turn improves the accuracy and imposes less stringent speed requirements on Comparator 101 or common DAC 104, or both. This preferred embodiment is illustrated in the schematic block diagram shown in FIG. 2. In analyzing the operation of this embodiment, reference will also be made to the timing diagrams of FIG. 3. 
     Referring now to FIG. 2, many of the components may be essentially the same as components in the circuit of FIG. 1 and will therefore not be described again in detail. Such similar components include the Analog Input Path 210, Input S/H Circuit 200, Comparator 201, common Digital-to-Analog Converter (DAC) 204, Output S/H Circuit 205, Output Low-Pass Filter 206, and Clock 207. Various other input signal paths also correspond to those of FIG. 1 and will not be described in detail: for example, paths 210 and 211. Various control paths also correspond to those of FIG. 1, such as the Start or Strobe path 214, logic control path 250 to the Input S/H Circuit 200 and logic control path 251 to the Output S/H Circuit 205, as well as clock pulses supplied over path 213. Similarly, many of the output paths correspond to those of FIG. 1 including paths 230-231, 232, 233, and 234. The principal differences, as compared to similar elements of FIG. 1, are that the Control Logic and Timing Circuits 102 and 8-bit Register 103 of FIG. 1 have now been replaced by master Control Logic and Timing Circuits 260, a Successive Approximation Register Control circuit (SARC) 261, including an associated Register R 1  which provides the PCM output over Output Bus 219, a separate Register R 2  which receives the PCM input over Input Bus 215 and a common Selector 262 receiving inputs from Registers R 1  and R 2  over 8-bit leads 218A and 218B, respectively. Finally, Selector 262 is interconnected with the common DAC 204 by a set of 8-bit leads 218C. 
     In order to simplify the schematic diagram of FIG. 2, only one control path 263 is shown between the Control Logic and Timing Circuits 260 and the SARC 261. Likewise, only one control path 264 is shown between the Control Logic and Timing Circuits 260 and the Register R 2 . In actual practice, several paths will be required for each indicated control connection, as will be understood by those skilled in the art. For example, the control of SARC 261 and its associated Register R 1  will require interconnections with the Control Logic and Timing Circuit 260 to accomplish at least the following functions: (a) to read out the contents of R 1 , either serially or in parallel, (b) to operate the SARC 261 at an appropriate secondary clock rate adequate to complete the encoding cycle in available encoding time (as will be described shortly in greater detail) and (c) to zero-set the Register R 1 . Similarly, control of register R 2  requires interconnections with the Control Logic and Timing Circuits 260 to accomplish the following functions: (a) to read in a received PCM word, either serially or in parallel, during the appropriate time interval, and (b) to alter the contents of Register R 2  at an appropriate point of time, to be discussed below. The Selector 262 is also indicated schematically as being controlled from the Control Logic and Timing Circuits 260 over readout control path 217 so as to determine which of the two registers R 1  and R 2  is alternatively connected to the common DAC 204. 
     The basic encoding and decoding functions of the circuit of FIG. 2 will now be described in greater detail. In this connection, reference will also be made to the illustrative waveforms in the timing diagram of FIG. 3. As previously mentioned, it is preferred that the decoding be executed in two similar steps at 62.5-μs intervals, which means that the encoding must either be accomplished within one of the two 62.5-μs intervals or that the encoding process must be interrupted during the second decoding interval. In the illustrative embodiment shown in FIG. 2, and as shown in the waveforms of FIG. 3, a serial PCM output has been assumed with 8 bit positions, within approximately 5.2 μs intervals, corresponding to a bit rate of 1.544 Mb/s. This in turn corresponds to the basic 8 KHz sampling rate. One complete 125-μs cycle is represented during the time interval t 0  -t 0  &#39; in FIG. 3, with certain points of time, referred to below, indicated by t 0  -t 8 . The clock pulses (not precisely to scale) are indicated by waveform A in FIG. 3. These may, for example, recur at a frequency of 128 KHz. 
     On occurrence of a Start or Strobe pulse over path 214 at time t 0 , represented by waveform B in FIG. 3, the Control Logic and Timing Circuits 260 activate the Register R 1  through the SARC 261 and control path 263. At the same time, the Register R 2  is enabled over control path 264x to receive the PCM input signal on Input Bus 215. During the first 5.2 μs (approximately), the PCM word residing in register R 1 , as a result of encoding an analog input sample during the preceding 125-μs cycle, is read out to the PCM Output Bus 219. Simultaneously, a new incoming PCM word is read into register R 2  from the PCM Input Bus 215. These operations are represented by the waveform C in FIG. 3. Within the time period t 0  -t 3 , as represented by waveform D, the Input S/H Circuit 200 is set into its &#34;sample&#34; mode to accept a new input analog sample from input path 210. This sampling period is not critical and may for example be of the order of  15μs or more, as this sample cannot be used before the common DAC 204 is again available. This relatively long sampling time helps to improve the precision of the sample and to reduce the speed requirements on the Input S/H Circuit 200. 
     At time t 1 , immediately after reception of the input PCM word, the Selector 262 is set to receive signals from the Register R 2  so that its content defines the analog output from the DAC 204. This is represented by waveform E. After a short time, t 1  -t 2 , to allow DAC 204 to settle, the Output S/H Circuit 205 is set to its &#34;sample&#34; mode so that it acquires the analog signal from DAC 204. This is represented within the interval t 2  -t 3  by waveform F. The sampling time must be determined from the acquisition time of the DAC 204 and by the required accuracy. A time interval t 2  -t 3  of the order of 10 μs may be adequate in a practical system. 
     After completion of the output sampling interval within t 2  -t 3 , the Output S/H Circuit 205 is set to its &#34;hold&#34; mode and the Selector 262 is set to receive the 8-bit signals from Register R 1 . This then prepares the codec for the encoding process which will be initiated just after time t 3 , by control of the SARC 261 from the Control Logic and Timing Circuits 260 over path 263. The encoding intervals are represented by waveform H. For this first encoding interval within t 3  -t 5 , according to the assumptions made above, a time frame of the order of 40-45 μs is available before it is again interrupted at time t 5 . Then immediately thereafter, during the time interval t 6  -t 7 , the SARC is interrupted so that the DAC 204 may be &#34;borrowed&#34; within the time interval t 6  -t 7  to decode the modified input PCM word in order to provide the second output sample approximately one-half frame later (e.g., at time t 6  which is about 65 μs from the start of a cycle). As represented in FIG. 3, the output sampling interval of waveform F is preferably terminated just before the start of the encoding interval of waveform H to allow the circuits to settle, e.g., just before and just after time t 3 , respectively. 
     During this first encoding interval between t 3  and t 5 , an extra reset pulse, represented by waveform G, is sent to Register R 2  at time t 4  to modify its content in accordance with the principles of my invention. If, according to the preceding descriptiond, the so-called D2/D3 code format is used, this modification will consist of adding one bit to the code word in the least significant bit (LSB) position. Of course, by logic addition, this may also result in a change of the &#34;higher order&#34; bits in the code word. For example, there is one special case where the original unmodified code word has 1&#39;s in all magnitude - bit positions. In this case, the modification should result in a change in the most significant bit (MSB) position with all seven &#34;amplitude bits&#34; left unchanged as 1&#39;s. This special case can easily be handled by proper digital logic techniques familiar to those skilled in the art. 
     The overall result of this addition should be that the absolute output level of the DAC 204 is reduced by one step size. This step size depends on the level being sampled, as determined by the position of the chord on which this sample is located. The exact point of time t 4  for modification of the P 2  is not critical, as will be evident from the timing diagram. 
     As previously stated, approximately, 62.5 μs after the start of the cycle, the operation of the SARC 261 is interrupted within the time interval t 5  -t 7 . After a suitable guard time, t 5  -t 6 , Selector 262 is again set to receive the 8-bit sample during interval t 6  -t 7  from Register R 2  (per waveform E). Output S/H Circuit 205 is concurrently set to its &#34;sample&#34; mode within the interval t 6  -t 7 , as illustrated by waveform F, thereby acquiring the second analog signal level, which is one LSB lower in amplitude, from the DAC 204. As previously mentioned, the sampling time must be determined from the acquisition time of DAC 104 and by the required system accuracy. A decoding time of the order of about 10 μs may be adequate in a particular system, as previously mentioned. As only a relatively small shift in level is imposed on Output S/H Circuit 205, this second sample interval t 6  -t 7  may be made shorter than the first output sample interval t 2  -t 3  if total available time in the cycle becomes critical. 
     After restoring Output S/H Circuit 205 to &#34;hold&#34; condition and resetting Selector 262 to receive pulses from Register R 1 , the encoding process may be resumed, as previously described, by operation of SARC 261. Accordingly, an additional encoding time of the order of about 40 μs is now available for encoding from time t 7  up to the time t 8  near the end of the sampling cycle. 
     The interrupt arrangement just described provides almost twice the total time for encoding as compared to the system of FIG. 1 (e.g., within time interval t 3  -t 5  plus time interval t 7  -t 8 .). This is a significant advantage as the speed requirements for the encoding circuits can thereby be reduced to a minimum. 
     While I have described certain preferred features and embodiments of my invention with reference to the encoding and decoding laws and speeds typically used in the United States, it will be apparent to those skilled in the art that the basic principles are generally applicable to systems having other types of encoding and decoding laws and speeds, such as the European CCITT telecommunications systems with companding according to the A-law. For a general discussion of industry standards applicable to digital transmission systems and recommendations for encoding and decoding, reference may be made to the so-called &#34;Green Book&#34; of the CCITT, reporting on the &#34;Fifth Plenary Assembly&#34;, Geneva, 4-15 December 1972, Vol. III-2, Section 7 (and especially pages 372-377), published by the International Telecommunication Union, 1973. My invention is also applicable to systems with other sampling frequencies and other channel sizes (numbers of channels). The specific timing arrangements shown for purposes of illustration may also be modified, if desired, e.g., for plesiochronous operation, where the encode and decode operations are not in full synchronism. The invention may also be used in PCM systems which employ linear encoding, rather than companded encoding, although in the latter case the advantages obtained by use of my invention may be less outstanding. 
     While I have disclosed certain specific embodiments of my invention, it will be understood that these are purely exemplary and that I intend to be limited only by the scope and spirit of the appended claims.