This invention relates to Internet Protocol (IP) networks, and more particularly, to IP networks carrying data modem transmissions.
It is well known that telephonic voice communication, e.g., originated from telephones, such as conventional analog telephones providing what is known as plain old telephone service (POTS), can be carried over Internet Protocol (IP) networks using the well known voice over IP (VoIP) standard. To achieve this, a VoIP gateway converts received voice signals, typically received in analog form, to a digital representation and packages the digital voice representation into IP packets. As part of the packaging process, the samples of digital voice are buffered, at least until enough have been accumulated to form one VoIP packet. The IP packets are carried over the IP network to a remote VoIP gateway, which restores the ordering of received packets, extracts the digital representation of the voice from the IP packets, stores the received chunks of the digital representation of the voice, and typically converts the buffered digital representation back to analog format.
There is a clock used for controlling the timing in digitizing the analog voice signal, typically located in the transmitting VoIP gateway. Similarly, there is a clock used for controlling the timing in reconstructing the analog voice from the received digital samples, typically in the receiving VoIP gateway. Although they are designed to operate at substantially the same rates, these clocks are not locked. The discrepancy between the clocks may cause samples to accumulate in the receiver buffer, in the event that the clock in the receiver is slower than the clock in the transmitter. If so, eventually, samples need to be dropped to avoid buffer overflow. Likewise, in the event that the clock in the receiver is faster than the clock in the transmitter, eventually the buffer will underflow. If so, padding is added to the reconstructed voice signal. Such dropping or padding is typically not noticeable to a human being listening to the resulting reconstructed signal.
When information signals are converted to voice band signals using a modem, and the resulting voice band signals are transmitted over an IP network to a receiving modem, which then reconstructs the information signals therefrom, the discrepancy between the clocks and the resulting buffer overflow or underflow eventually causes a loss of synchronization which results in a need for the modems to retrain. When the information signals are originated from a facsimile machine, the need to do periodic retraining has a limited effect, because the most common facsimile protocols typically retrain fairly often anyway, and the time required for retraining is relatively short. However, when the information signals are data signals, e.g., originated from a computer, the requirement to periodically retrain becomes quite burdensome, because the common data protocols do not require periodic retraining, but instead prefer to remain in constant carrier mode. Also, should retraining be required, the process is relatively lengthy.
One prior art solution to this problem of requiring periodic retraining is to employ so-called “modem relay”. As in known in the art, modem relay involves demodulating at the gateway the transmit modem signal, which uses a clock locked to the transmiting modem's clock; extracting the data being transmitted; packing the data being transmitted into IP packets; transmitting the IP packets to the receiving gateway; extracting the data at the receiving gateway; and remodulating the data onto a new modem carrier, the clock of which is locked to the clock of the receiving modem. Disadvantageously, because of modem relay standards issues and interoperability issues, gateways capable of performing modem relay are not widely deployed. Further disadvantageously, modem relay functionality needs to be implemented at the gateway at each end of the connection.
Although this problem has been presented in terms of VoIP networks, which is presently likely to be the most common manifestation of the problem, it is noted that any packet network that is carrying data modem signals treated as voice and does not convey the timing of the sample clock to the receiver will likely suffer from this problem.
I have recognized that the problem of requiring retraining of modems communicating data signals as voice signals over a packet network, such as a VoIP network, that does not communicate the sample clock of the transmitter to the receiver can be eliminated, in accordance with the principles of the invention, by monitoring the buffer level in the receiving gateway, and adjusting the local clock as a function thereof, so that the long term average of the rate of incoming samples to the buffer is equal to the long term average rate of the codec clock which is used to clock samples out of the receiver buffer. Advantageously, there is no need to communicate clock synchronization information between the transmit and receive gateways. Further advantageously, only one gateway on the connection requires the functionality of the instant invention to be implemented therein.
In the drawing:
The following merely illustrates the principles of the invention. It will thus be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described or shown herein, embody the principles of the invention and are included within its spirit and scope. Furthermore, all examples and conditional language recited herein are principally intended expressly to be only for pedagogical purposes to aid the reader in understanding the principles of the invention and the concepts contributed by the inventor(s) to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions. Moreover, all statements herein reciting principles, aspects, and embodiments of the invention, as well as specific examples thereof, are intended to encompass both structural and functional equivalents thereof. Additionally, it is intended that such equivalents include both currently known equivalents as well as equivalents developed in the future, i.e., any elements developed that perform the same function, regardless of structure.
Thus, for example, it will be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative circuitry embodying the principles of the invention. Similarly, it will be appreciated that any flow charts, flow diagrams, state transition diagrams, pseudocode, and the like represent various processes which may be substantially represented in computer readable medium and so executed by a computer or processor, whether or not such computer or processor is explicitly shown.
The functions of the various elements shown in the FIGs., including any functional blocks labeled as “processors”, may be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software. When provided by a processor, the functions may be provided by a single dedicated processor, by a single shared processor, or by a plurality of individual processors, some of which may be shared. Moreover, explicit use of the term “processor” or “controller” should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, digital signal processor (DSP) hardware, network processor, application specific integrated circuit (ASIC), field programmable gate array (FPGA), read-only memory (ROM) for storing software, random access memory (RAM), and non-volatile storage. Other hardware, conventional and/or custom, may also be included. Similarly, any switches shown in the FIGS. are conceptual only. Their function may be carried out through the operation of program logic, through dedicated logic, through the interaction of program control and dedicated logic, or even manually, the particular technique being selectable by the implementer as more specifically understood from the context.
In the claims hereof any element expressed as a means for performing a specified function is intended to encompass any way of performing that function. This may include, for example, a) a combination of electrical or mechanical elements which performs that function or b) software in any form, including, therefore, firmware, microcode or the like, combined with appropriate circuitry for executing that software to perform the function, as well as mechanical elements coupled to software controlled circuitry, if any. The invention as defined by such claims resides in the fact that the functionalities provided by the various recited means are combined and brought together in the manner which the claims call for. Applicant thus regards any means which can provide those functionalities as equivalent as those shown herein.
Software modules, or simply modules which are implied to be software, may be represented herein as any combination of flowchart elements or other elements indicating performance of process steps and/or textual description. Such modules may be executed by hardware that is expressly or implicitly shown.
Note that as used herein channel quality includes effects from channel properties, such as multipath; interference from other sources, such as other radio sources of the same or other systems as well as cosmic sources; and noise, such as thermal noise within the receiver itself.
Unless otherwise explicitly specified herein, the drawings are not drawn to scale.
In the description, identically numbered components within different ones of the FIGs. refer to the same components.
Each of gateways 103 and 107 is made up of two parts, namely, codec 111 and network interface 113. Each codec 111 converts analog signals received from a modem to digital signals, such as those that are suitable to be carried by conventional time division multiplexed (TDM) communications equipment, e.g., at a sample rate of 8 kilohertz, which is controlled by a clock supplied to codec 111. Typically, although not necessarily, each sample is 8 bits. The resulting digital samples are supplied to the one of network interfaces 113 that is associated therewith by being part of the same gateway.
The associated network interface 113 stores the samples in buffer 133 until they are transmitted. Similarly, each codec 111 converts digital samples received from its associated network interface 113 into corresponding modem signals. Buffer 131 stores samples received from IP network 105 until they are supplied to the associated codec 111.
A problem arises with the arrangement of
Note that since, typically, the connection between gateway 113 and IP network 105 is much faster than the sample rate, there is no problem of transmit buffer 133 filling up. Similarly, the IP connection between gateway 113 and IP network 105 can accept samples whenever they are available, so it is acceptable for buffer 133 to be empty without there being any concern about buffer underflow.
For voice applications, i.e., for a system where modems 101 and 109 are replaced by telephones, the problem with receive buffer 131 becoming over filled or empty can be easily handled by monitoring its fullness and either repeating prior samples when it runs toward empty, or dropping samples when a buffer becomes too full. In either case, the impact on voice quality tends to be minimal. Unfortunately, this solution is unsatisfactory for modem applications.
To this end, each of gateways 203 and 209 now includes clock controller 241, which receives as an input a free running local clock, such as was supplied directly to codec 111 in
Generally, clock adjust circuit 243 is a conventional clock adjusting circuit which responds to a) a clock signal that is input thereto and b) supplied phase information to develop a modified version of the input clock which is supplied as an output. In the embodiment of the invention shown in
Phase lock loop 245 takes as its input an error signal, which is signal BUFFER STATE, which represents the difference from half fullness of buffer 131. Phase lock loop 245 serves to filter the error signal and supplies as an output a clock adjust signal, which indicates the nature of the change in phase and frequency that is required to be performed by clock adjust 243 on the local clock so as to produce the codec clock. Note that the loop being monitored by phase locked loop 245 includes codec 1, which implicitly controls the fullness of buffer 131 in response to the codec clock supplied by clock adjust circuit 243.
In one embodiment of the invention, clock adjust circuit 243 may be implemented by a voltage controlled oscillator. In another embodiment of the invention, clock adjust circuit 243 may be implemented by a digitally controlled clock generator, which develops the output clock from an input clock that is running at a higher frequency than the desired output frequency by adding clock cycles to, or deleting clock cycles from, the input.
Digital delay elements are registers that provide as an output a delayed version of the value they receive as an input. The delay may be one sample delay, e.g., 125 microseconds for conventional voice samples operating at an 8 KHz clock rate. Adder 603 adds the scaled deviation signal to the output of delay element 605. The resulting value is supplied as an input to delay element 605 and to adder 607. The value stored in delay element 605 is indicative of how much of a sample period the local clock differs from the desired clock, in other words, the offset per sample period between the two clocks. The output of delay element 605 is also supplied to multiplier 609, which multiplies the output of delay element 605 by a factor ρ to produce a scaled version of the output of delay element 605. A typical value for ρ is −0.95.
The values of λ and ρ are selected so as to allow the loop to adapt quickly yet smoothly to changes in the buffer fullness deviation. Those of ordinary skill will readily be able to determine values for λ and ρ using conventional techniques for simulating the clock recovery loop. Adder 607 adds the output adder 603 and multiplier 609 and supplies the resulting sum as an input to adder 611.
The output of adder 607 represents the frequency offset of the local clock and the transmit clock, but scaled differently than the output of delay element 605. This output of adder 607 could be used to control a voltage controlled oscillator (VCO) directly, e.g., through a digital to analog (D/A) converter. In a steady operating state, where the adjust clock of the gateway matches the clock of the modem on the other side of the connection, the output of adder 607 should be a constant, and the buffer deviation signal should be zero.
Adder 611 adds the output of adder 607 to a delayed, and possibly adjusted, version of its own output, which is supplied both to digital delay element 613 and to comparator 615. The output of adder 611 represents the cumulative offset of the local clock and the desired clock, i.e., the clock in the gateway on the other side of the connection. The delay provided by digital delay element 613 may be one sample delay, e.g., 125 microseconds for conventional voice samples operating at an 8 KHz clock rate.
The output of adder 611 may be employed to control a digitally controlled clock generator. However, because a digital controlled clock generator can only adjust its clock in discrete intervals, the clock is not adjusted until the cumulative error reaches the level of one discrete adjustment of the digitally controlled clock. This is determined by comparator 615, which compares the output of adder 611 against a supplied value representing the discrete interval by which the clock may be adjusted. When the cumulative error reaches the level of one discrete adjustment of the digital controlled clock, comparator 615 supplies an output to cause the digital controlled clock to be adjusted as the output of phase locked loop 245. Furthermore, at that time, comparator 615 supplies to subtractor 617 the value of one discrete adjustment of the digital controlled clock. This value is subtracted from the value supplied as an output by adder 611, and the resulting adjusted value is stored in delay element 613. When no adjustment is needed, comparator 615 supplies a zero value to subtractor 617.
Returning to
Note that although gateways 203 and 207 are shown as having the same structure, to accrue the benefits of the invention, only one of the gateways employed in a modem-to-modem connection should adjust its buffer in accordance with the principles of the invention. The other modem should not adjust its buffer, even if it has the ability to do so. In fact, should both gateways adjust their buffers in accordance with the principles of the invention, system operation may become unstable, as each gateway is trying to adjust to the other gateway's clock, which can create a feedback loop that may oscillate. This may be avoided, in accordance with an aspect of the invention, by having clock controller 241 of any gateway initially not adjust its buffer, e.g., by having switch 247 connect codec 111 to the local clock and to instead measure the relative speed of its own local clock with respect to the other gateway's local clock by monitoring its input buffer level.
More specifically, initially, no samples are clocked out of any buffer until that buffer reaches a 50% fullness level. Upon achieving 50% fullness, the process of clocking samples out of the buffer is started. The gateway with the slower clock will have its buffer continue to fill up beyond the 50% fullness mark, while the gateway with the faster clock will have its buffer begin to empty. By monitoring the change in buffer fullness, each gateway can determine whether it is the faster of the two gateways or the slower.
A convention may be established for gateways such that only the gateway with the relatively slower clock will adjust its clock in accordance with the principles of the invention, e.g., by changing the position of switch 247 to connect to the output of clock adjust circuit 243. The other gateway will continue with clock adjustment disabled, should it be capable of adjusting its clock, or will not have the ability to adjust its clock implemented. Thereafter, each gateway arranged in accordance with the principles of the invention continues to monitor its buffer. If a gateway arranged in accordance with the invention but which determined that its buffer was the faster buffer, and hence it did not enable clock adjustment, notices that its buffer has become close to empty, which can occur if the other gateway does not incorporate the invention, then the gateway incorporating the invention that has a buffer that is close to empty will enable operation of its clock adjust circuit in accordance with the principles of the invention, e.g., by changing the position of switch 247 to connect to the output of clock adjust circuit 243. This ensures that clock adjusting will not be performed in the gateways on both sides of a connection, and thus operation will be stable.
Those of ordinary skill in the art will readily be able to adapt the forgoing to the convention that the buffer of the gateway to implement the adjusting process is emptying before the adjusting is enabled.
In step 307, the process of outputting samples from the buffer to the codec is begun using the local clock without any adjustments. Step 309 allows a fixed period to pass, during which samples continue to be output from the buffer to the codec using the local clock without any adjustments. After waiting the prescribed period, conditional branch point 311 tests to determine if the buffer is now filled more than its 50% fullness level. If the test result in step 311 is YES, indicating that the buffer has been filling up during the waiting period, and further indicating that the unmodified local clock is slower than the clock of the modem at the other end of the connection, control passes to optional step 313, in which the long-term average of the buffer level is determined, e.g., using a lowpass filter. Such a lowpass filtering function may be performed by phase locked loop 245 (
If the test result in step 311 is NO, indicating that the buffer has been emptying during the waiting period, and further indicating that the unmodified local clock is faster than the clock of the modem at the other end of the connection, control passes to step 319, in which a further period is waited. This further period is waited in order to give the gateway on the other side of the connection time to adjust its clock if it is going to do so in accordance with the invention, since the gateway on the other side of the connection has the slower clock.
Conditional branch point 321 tests to determine if the buffer has continued to empty from the level it was at in step 311. If the test result in step 311 is NO, indicating that the buffer is no less empty, and may indeed be fuller, than its level in step 311, and thus further indicating that the other gateway has begun adjusting its clock, control passes to step 323, in which adjusting of the clock is disabled. The process then exits in step 325. If the test result in step 321 is YES, indicating that the buffer has become even emptier in that its level has reduced even further than the level it had in step 311, control passes to step 313 to begin clock adjusting, and the process proceeds as described above.
A PCM connected modem receives the signal that a conventional modem would receive, but already in digitized, e.g., PCM format, i.e., the 64 kilobit digital format such as is carried in a DS0, which may be μ-law or A-law encoded. PCM connected modems are often employed by dial-up internet service providers which receive their incoming traffic directly as a digital stream, e.g., on a T1 line. Elimination of the codec in the modem and use of the analog signal in a PCM modem provides for less errors in the communication and reduced cost for the equipment.
Gateway 407 is a simplified version of gateway 107 (
Note that unlike gateway 107 in