Abstract:
A method for compensating a baseline wander of a transmission signal and related circuit are provided. The transmission signal includes a plurality of first pulses and a plurality of second pulses for representing digital data coded in the transmission signal. The method includes generating an accumulation result according to a number of the first pulses and a number of the second pulses for estimating the baseline wander of the transmission signal, and compensating the baseline wander of the transmission line according to the accumulation result.

Description:
BACKGROUND OF INVENTION 
   1. Field of the Invention 
   The invention relates in general to a compensation method and related circuits for baseline wander of a transmission signal, and more particularly, to a method and related circuits to compensate baseline wander of a transmission signal by an accumulation result according to numbers of a plurality of pulses for different digital data. 
   2. Description of the Prior Art 
   With the development of an Internet communication system, people all over the world are capable of delivering lots of information to each other in high speed, and which improve the spread of knowledge and technology. Therefore it is extremely rewarding to maintain a high quality data transmission through the Internet, and it is also an enormous challenge for current engineers to focus research on a highly reliable communication system. 
   A schematic diagram for two user systems  10 A and  10 B to communicate through a transmission line  18  is shown in  FIG. 1 . Either one of the user systems could be a data switching system such as a circuit switching or a package switching system, a router, or a terminal. The transmission line  18  could be a network transmission line such as an Unshielded Twisted Pair (UTP)  5  of Ethernet. The user systems  10 A and  10 B comprise transformers  16 A and  16 B, and resistors R 0   a  and R 0   b  respectively to match the impedance of the transmission line  18 . A transmitter  14 A of the user system  10 A generates a transmission signal with differential mode, which means the differential transmission signal comprises a positive and a negative transmission signal out of phase with each other. The positive and the negative transmission signals of the differential transmission signal are correlated to achieve a distant transmission through two connecting wires. The positive and the negative transmission signals of the differential transmission signal from transmitter  14 A are output to node P 0 A and node P 1 A respectively and are coupled to the transmission line  18  by a transformer  16 A. The differential transmission signals are then transmitted to the user system  10 B by way of two connecting wires. Thereafter, the transmission signals are coupled to nodes P 0 B and P 1 B respectively by a transformer  16 B and are received by the differential inputs of a receiver  14 B. As a result, the user system  10 A is able to transfer data to the other user system  10 B through the transmission line  18 . 
   However, there are some problems to be solved in the above described signal transmission process. For instance, although the transformers  16 A and  16 B are utilized to match the impedance of the transmission line  18 , the feature of high pass filtering of transformers will diminish low frequency components of the transmission signals, which thus cause the voltage levels of the transmission signals to drift. Take an Ethernet network for example; some coding process such as MLT-3 coding must be done on the transmission signal for data transmission to the other user system before the signal is coupled to the transmission line by the transformer. After coding, there is a long-term average composed of composed of the low frequency component of the transmission signal. The amplitudes of low frequency components are related to the digital data with different levels in the transmission signal. When the transmission signal passes through the transformer  16 A to the transmission line  18 , the low frequency component of the transmission signal will be filtered by the transformer  16 A which functions as a high pass filter. That is, the long-term average will be removed from the transmission signal. Thus, the baseline wander occurs at the other user system receiving the transmission signal. 
   Please refer to  FIG. 2 , which has a horizontal axis representing time.  FIG. 2  shows a schematic diagram of level drifting of a receiving waveform due to the baseline wander of a transmission signal. While transmitting digital data from one user system  10 A to the other user system  10 B, the waveform of the transmission signal at node P 0 A is shown to be the waveform S 0  in  FIG. 2 . Different digital data in the transmission signal is signified by three different kinds of pulses with different levels. For instance, during the duration Tp, there are first pulses with a plurality of high level periods, and the first pulses represent a plurality of digital data “1” in the transmission signal. During the duration Tn, there are second pulses with low level which represents digital data “−1” in the transmission signal. During the duration Tz, there are third pulses with zero level periods, i.e. level L 0 , which represents digital data “0” in the transmission signal. Therefore the digital data of the transmission signal is generated by coding the transmission signal waveform S 0  utilizing three different types of pulses representing “1”, “0”, and “−1”. After transmitting to node P 0 B through the transmission line  18  and transformers  16 A and  16 B, the long-term average of waveform S 0  is shown to be a waveform D in  FIG. 2  with a reference zero level L 0  shown as a horizontal dashed line. During the duration Ta, since the number of first pulses with the high level is far larger than the number of second pulses with the low level, the long-term average of waveform S 0  is getting higher and the waveform D increases gradually with time. The increasing waveform can be expressed by a mathematic formula of (1−c·exp(t/T)) wherein c is a proportional constant, T is a time constant, and exp is exponential function. In another situation, during the duration Tb, since the number of first pulses with the high level is about the same as the number of second pulses with the low level, the long-term average of waveform S 0  is getting lower and the waveform D decreases gradually with time, in contrast to the duration Ta with the higher longer-term average. The decreasing waveform can be expressed by a mathematic formula of exp(t/T). Similarly, during the duration Tc, since the number of first pulses with the high level is again far larger than the number of second pulses with the low level, the long-term average of waveform S 0  is again getting higher and the waveform D increases gradually with time, in contrast to the duration Tb with the lower longer-term average. The increasing waveform can again be expressed by a mathematic formula of (1−c·exp(t/T)). 
   As described above, the low frequency components comprising the long-term average of the transmission signal is filtered out while the transmission signal passes through the transformer  16 A in one user system  10 A and the transformer  16 B in the other user system  10 B. Hence, the received waveform of the transmission signal at node P 0 B in the user system  10 B is actually the same as the waveform S shown in  FIG. 2 . In other words, waveform S can be obtained by subtracting the waveform D from the waveform S 0 . Because of the filter effect, the waveform D composed of the low frequency component is removed from the waveform S 0 . For that reason, The levels of the pulses of waveform S drift as shown in  FIG. 2 . The received waveform S appears the waveform S 0  carried by the waveform D. Therefore, the baseline wander occurs, and the digital data carried by the transmission signal cannot be retrieved correctly. Generally, the receiver  14 B of the user system  12 B retrieves the digital data from the series of pulses of waveform S based on criteria levels such as the levels of dashed line Lp and Ln shown in  FIG. 2 . Pulse levels higher than the voltage level Lp are represented by a digital “1” of a first pulse, and pulse levels lower than the voltage level Ln are represented by a digital “−1” of a second pulse. However, as the level wander of the pulses of waveform S occurs due to the baseline wander of the transmission signal at node P 0 B, the receiver  14 B is not able to retrieve the digital data from the transmission signal correctly. For example, during the durations Te 1  and Te 2 , due to the loss of low frequency components comprising the long-term average (i.e. waveform D), the downward offset of waveform S causes the levels of the first pulses to shift down below the voltage level Lp. For that reason, a wrong, interpretation of the first pulses, which are supposed to have higher pulse levels than voltage level Lp, occurs due to the baseline wander, and the data transmission is mistaken. Although the baseline wander phenomenon demonstrated in  FIG. 2  is based on the positive transmission signal of the differential transmission signal transmitting from node P 0 A to node P 0 B, similar phenomenon happens to the negative transmission signal transmitting from node P 1 A to node P 1 B, as is well known to those skilled in the art. 
   SUMMARY OF INVENTION 
   It is therefore a primary objective of the claimed invention to provide a method and related circuits to compensate a level drifting of the transmission signal and to prevent the associated baseline wander effect while transmitting the transmission signal. 
   According to the claimed invention, a method for compensating a baseline wander effect imposed upon a transmission signal is provided. The transmission signal comprises a plurality of first pulses and a plurality of second pulses for representing digital data coded in the transmission signal. The method comprises generating an accumulation result according to a number of the first pulses and a number of the second pulses for estimating a long-term average variation of the transmission signal, and compensating the long-term average variation of the transmission signal according to the accumulation result. 
   According to the claimed invention, a signal compensation circuit for compensating a baseline wander effect imposed upon a transmission signal comprises a counter for generating an accumulation result according to a number of first pulses and a number of second pulses to estimate a long-term average variation of the transmission signal and generating corresponding control signals according to the accumulation result. The signal compensation circuit also comprises a correction circuit for compensating the transmission signal according to the control signals. 
   These and other objectives of the claimed invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings. 

   
     BRIEF DESCRIPTION OF DRAWINGS 
       FIG. 1  shows a schematic diagram of a prior art data transmission system. 
       FIG. 2  shows waveforms of related signals due to baseline wander of a positive transmission signal according to the prior art. 
       FIG. 3A  shows a signal compensation circuit for a data transmission system between two user systems according to a first embodiment of the present invention. 
       FIG. 3B  shows a block diagram of a control circuit according to the first embodiment of the present invention. 
       FIGS. 4A and 4B  show related signal waveforms produced in operation of the signal compensation circuit according to the first embodiment of the present invention. 
       FIG. 5  shows waveforms of related signals produced in operation of the signal compensation circuit according to the first embodiment of the present invention. 
       FIG. 6  shows positive and negative waveforms of a differential transmission signal under compensation of the signal compensation circuit according to the present invention. 
   

   DETAILED DESCRIPTION 
   In accordance with a first embodiment of the present invention, a signal compensation circuit  30  utilized for an network system is schematically shown in  FIG. 3A . Two user systems  10 A and  50  are connected to each other through a network transmission line  18 . Either one of the user systems could be a terminal, a router, or a data switching system such as a circuit switching or a package switching system, and the transmission line  18  could be a network transmission line such as an Unshielded Twisted Pair (UTP)  5  for Ethernet. The transmitter  14 A of the user system  10 A is used for signal transmission, and the receiver  36  of the user system S 0  is used for receiving signals. The user systems  10 A and  50  comprise transformers  16 A and  32  and impedance matching resistors R 0   a  and R 0 , respectively. A transmitter  14 A of the user system  10 A generates a differential transmission signal, in which the positive and negative transmission signals are provided on the transmission line  18  from nodes P 0 A and P 1 A respectively. The receiver  36  of the other user system is used to receive the differential transmission signal at nodes N 3  and N 4  from the transmission line  18 . 
   In order to compensate the baseline wander of the transmission signal, such as an MLT-3 coding signal received by the receiver  36 , the signal compensation circuit  30  is incorporated into the user system  50 . The signal compensation circuit  30  comprises a control circuit  38  and a correction circuit  40 . Based on the transmission signals at nodes N 3  and N 4 , the control circuit  38  estimates the level drifting of the transmission signal and generates the corresponding control signals  38 A and  38 B. Thereafter, the correction circuit  40  is able to compensate the level drifting according to the control signals  38 A and  38 B from the control circuit  38 . After the differential transmission signal is coupled to the transformer  32  of the user system  50 , the positive and negative transmission signals are applied to the correction circuit  40  at the input nodes N 1  and N 2  respectively. As shown in  FIG. 3A , there are two signal transmission paths related to the differential transmission signals. Two second resistors R 2  and two current modules  34 A and  34 B are placed through the paths between nodes N 1  and N 3  and between nodes N 2  and N 4  respectively. Two first resistors R 1  are connected between a common-mode voltage source Vcm and two nodes N 3  and N 4  respectively. Take an MLT-3 coding of 100 Base-T for example. The DC voltage supplied by the common-mode voltage source is 1.8V. 
   The current module  34 A of the correction circuit  40  comprises a first pair of controlled current sources  46 A and  48 A with two suitable bias voltages supplied by a pair of bias circuits  41 A and  42 A. Similarly, the current module  34 B of the correction circuit  40  comprises a second pair of controlled current sources  46 B and  48 B with two suitable bias voltages supplied by a pair of bias circuits  41 B and  42 B. Both the current amplitudes of the controlled current sources  48 A and  48 B are controlled by a control signal  38 A generated by the control circuit  38 , and both the current amplitudes of the controlled current sources  46 A and  46 B are controlled by a control signal  38 B generated by the control circuit  38 . With the aid of the first pair of controlled current sources  46 A and  48 A, a compensating current Ic 1  is provided to node N 3 , and with the aid of the second pair of controlled current sources  46 B and  48 B, a compensating current Ic 2  is provided to node N 4 . After the compensating current Ic 1  flows through the first resistor R 1  connected between nodes N 3  and N 5 , a compensating voltage Vc 1  is generated, and after the compensating current Ic 2  flows through the first resistor R 1  connected between nodes N 4  and N 5 , a compensating voltage Vc 2  is generated. While transmitting the differential transmission signal from nodes N 1  and N 2  to nodes N 3  and N 4 , the voltage levels of the positive and negative transmission signals are droped through two second resistors R 2  respectively. Based on the common-mode voltage Vcm as a central level reference and the second resistors R 2  as loads, the voltage levels of the positive and negative transmission signals at N 3  and N 4  provide the compensating voltages Vc 1  and Vc 2  respectively. In accordance with a first preferred embodiment of the present invention, two current levels of the compensating currents Ic 1  and Ic 2  are substantially equal, in conjunction with the same resistance of two first resistors R 1   s , two voltage levels of the compensating voltages Vc 1  and Vc 2  are also equal. After the voltage compensation, the transmission signals at nodes N 3  and N 4  are input to the receiver  36  differentially. 
   The correction circuit  40  controls the correction timing and compensation quantity according to the control signals  38 A and  38 B from the control circuit  38 . A block diagram of the control circuit  38  according to the present invention is shown in  FIG. 3B . Henceforth the explanation of the operation of the control circuit  38  is based on the positive transmission signal of the differential transmission signal to generate the corresponding control signals  38 A and  38 B. Thus, the signal input to node N 3  of the correction circuit  40  is the positive transmission signal. The control circuit  38  comprises two slicers  52 A and  52 B, two weighting adjustors  54 A and  54 B, and a counter  56 . The control circuit  38  operates according to a clock clk. In accordance with the preferred embodiment of the present invention, the clock clk is synchronized with the transmission signal, with a period T 0  shown in  FIG. 2 . The slicer  52 A comprises a level trigger  53 A and a sampler  55 A. The level trigger  53 A is triggered by the pulse of the transmission signal at node N 3  when its voltage level is higher than a first triggering level, and the sampler  55 A outputs the corresponding first triggering signal to node N 7   a  with reference to the clock clk. In the other way, the level trigger  53 B is triggered by the pulse of the transmission signal at node N 3  when its voltage level is lower than a second triggering level, and the sampler  55 B outputs the corresponding second triggering signal to node N 7   b  with reference to the clock clk. Based on the voltage level of the transmission signal at node N 3 , the weighting adjustor  54 A generates a corresponding first weighting value a 1  at node N 8   a  and the weighting adjustor  54 B generates a corresponding second weighting value a 2  at node N 8   b . A first product of the first triggering signal at node N 7   a  and the first weighting value a 1  at N 8   a  is output to node N 9   a . A second product of the second triggering signal at node N 7   b  and the second weighting value a 2  at N 8   b  is output to node N 9   b . The adder  58  is utilized to subtract the second product from the first product and the subtracting result is fed to a counter  56  through node N 10 . According to the input at node N 10 , the counter  56  generates an accumulation result so as to generate control signals  38 A and  38 B according to the control signals  38 A and  38 B, the control circuit  38  controls the correction circuit  40  and compensates the level drifting of the transmission signals at nodes N 3  and N 4 . 
   The timing diagrams of the related signals in the operation of signal compensation circuit  30  are shown in  FIGS. 4A and 4B  with time as the horizontal axis. Referring to  FIG. 4A , clock diagrams, from top to bottom, are the transmission signal Sc at node N 3 , the first triggering signal Tr 1  at node N 7   a , the second triggering signal Tr 2  at node N 7   b , and the accumulation result cnt of the counter  56 , respectively. As aforementioned, the slicer  52 A generates the first corresponding triggering signal according to the transmission signal with voltage levels higher than the first pulse triggering value. A horizontal dashed line shown in  FIG. 4A  is the level of the first triggering value LtP. According to the clock clk, the first triggering signal Tr 1  is high, which means digital “1”, when the transmission signal Sc is higher than the first triggering value LtP. The waveform Tr 1  is low, which means digital “0”, when the transmission signal Sc is lower than the first triggering value LtP. Similarly, the slicer  52 B generates the second corresponding triggering signal Tr 2  according to the transmission signal with voltage level lower than the second pulse triggering value. With reference to the clock clk, the second triggering signal Tr 2  is high when the transmission waveform Sc is lower than the second triggering value LtN, and the second triggering signal Tr 2  is low when the transmission waveform Sc is higher than the second triggering value LtN. In this embodiment, the first triggering value LtP is defined according to high level of the first pulse. The duration of waveform Tr 1  with the high level corresponds to the duration of the first pulse in the transmission signal Sc. Similarly, the second triggering value LtN is defined according to the low level of the second pulse. The duration of waveform Tr 2  with the high level corresponds to the duration of the second pulse in the transmission signal Sc. 
   As described above, there are two products, with one product of the first triggering signal and the first weighting value a 1  and the other product of the second triggering signal and the second weighting value a 2 . These two products are subtracted by an adder, and the subtracting result is applied to the counter  56  to generate an accumulation result, as shown by the waveform cnt in  FIG. 4A . From time t 0  to time t 1 , with reference to the clock clk and the transmission signal, the digital “1” of the waveform Tr 1  is multiplied by the first weighting value a 1  and the product is accumulated to the accumulation result of counter  56 . As the waveform Tr 1  continues to be high, the accumulation result increases with the triggering of clock clk and the increased amplitude of the accumulation result is equal to the first weighting value a 1 . In the same time duration from t 0  to t 1 , waveform Tr 2  is low, so there is no second pulse in this duration and the accumulation result is not affected by the second weighting value a 2 . When the accumulation result increases to the first predetermined value LcP, which is shown as a horizontal dashed line in  FIG. 4A , the counter  56  will control the correction circuit  40  with the corresponding control signals  38 A and  38 B to increase the voltage level of transmission line at node N 3  by a predetermined first compensation value dV. Referring to  FIG. 4A , at time t 1 , as the waveform cnt increases the accumulation result to the first predetermined value LcP, the correction circuit  40  shifts up the waveform Sc by the control signal  38 A with a predetermined value dV simultaneously. Meanwhile, as the accumulation result increases to the first predetermined value LcP, the accumulation result is reset to an initial value Lc 0 , which is also shown as a horizontal dashed line in  FIG. 4A , and the counter  56  starts another counting cycle for the accumulation result to increase from initial value Lc 0 . For instance, at time t 2 , the slicer  52  decreases the accumulation result by the second weighting value a 2 , due to the digital “1” of waveform Tr 2  triggered by the second pulses of waveform Sc. From time t 3  to time t 4 , the waveform Tr 1  is high and the accumulation result of counter  56  thus increases again with reference to the clock clk. At time t 4 , the accumulation result increases to the first predetermined value LcP again, and the counter  56  controls the correction circuit  40  with the control signals  38 A and  38 B to increase the voltage level of transmission line at node N 3  by the first compensation value dV again. The accumulation result is also reset to the initial value Lc 0 . 
   From time t 4  to time t 5 , the accumulation result of counter  56  increases by a first weighting value a 1  in response to each digital “1” of waveform Tr 1 . However, at time t 4   b , the accumulation result decreases by a second weighting value a 2  in response to digital “1” of waveform Tr 2 . At time t 5 , the accumulation result increases to the first predetermined value LcP, and the voltage level of transmission line Sc is thus increased by the first compensation value dV. As a result, according to the present invention, each time when the accumulation result is accumulated to the first predetermined value LcP, control circuit  38  will control the correction circuit  40  via the control signals  38 A and  38 B to compensate the transmission signal Sc. 
   In order to avoid over-correction, according to the present invention, as the voltage level of the waveform Sc of the transmission signal drifts to exceed the first threshold value Lc 1 , the weighting adjustor  54 A reduces the first weighting value a 1  based on a predetermined process. Referring to  FIG. 4A , at time t 5 , the voltage level of the transmission signal Sc exceeds the first threshold value Lc 1  after compensation, so the weighting adjustor  54 A reduces the first weighting value a 1  down to a new weighting value a 1 . Thereafter, the new weighting value a 1  is the new increasing scale for the accumulation result to increase in response to the digital “1” of waveform Tr 1 . Consequently, as shown in  FIG. 4A , after time t 5 , the increasing rate of the waveform cnt of accumulation result slows down, and the time required for accumulation result to reach the first predetermined value LcP is longer due to the smaller first weighting value a 1 . As a result, because of the longer time required for the accumulation result to reach the first predetermined value LcP, the time interval for the waveform Sc of the transmission signal to undergo a compensation process is longer and the possibility of over-correction is reduced. If the voltage level of the transmission signal is again over the first threshold value Lc 1 , the first weighting value a 1  is further reduced, which causes even longer time duration for the accumulation result to reach the first predetermined value LcP and an even longer time interval for the waveform Sc of the transmission signal to undergo a compensation process. In accordance with a preferred embodiment of the present invention, the first weighting value a 1  is decreased exponentially in each adjusting process. In other words, for instance, while in an nth adjusting process, the variation of first weighting value a 1  can be expressed by a 1 ( n )=c*a 1 ( n− 1), wherein a 1 ( n ) is the first weighting value a 1  after the nth adjusting process, a 1 ( n− 1) is the first weighting value a 1  after an (n−1)th adjusting process, and c is a proportional constant less than one. In accordance with the first preferred embodiment, the second weighting value a 2  holds fixed. As shown in  FIG. 4A , at time t 4   b  and at time t 5   b , the decreasing scales of accumulation result in response to the digital “1” of waveform Tr 2  are the same as the second weighting value a 2 . 
   As aforementioned, the first pulses, corresponding to the high level of the transmission signal, cause the long-term average to increase gradually, which in turn causes the baseline of the transmission signal to decrease slowly. On the contrary, the second pulses, corresponding to the low level of the transmission signal, cause the long-term average to decrease gradually, which in turn causes the baseline of the transmission signal to increase slowly. Therefore, according to the present invention, the waveform Tr 1  of the first triggering signal and the waveform Tr 2  of the second triggering signal are utilized to generate an accumulation result according to a number of the first pulses and a number of the second pulses. As the number of first pulses increases, the number of digital “1” of the waveform Tr 1  increases with time, and which corresponds to a gradual increase of the long-term average of the transmission signal. However, referring to  FIG. 2  and the above related description, the transmission signal suffers the loss of the gradual increase of the long-term average at node N 3  and the baseline of the waveform is shown to decrease gradually. In the meanwhile, a positive compensation is required for the corresponding transmission signal to shift the level up. The first weighting value a 1  and the second weighting value a 2  are used to estimate the variation slope of the long-term average drift of the transmission signal. The drifting scale of the long-term average is estimated by the product of the time duration and the corresponding slope. The time duration of increasing long-term average is set to the correlated number of digital “1” of waveform Tr 1  and the rising slope is set to the correlated first weighting value a 1 . On the other hand, the time duration of decreasing long-term average is set to the correlated number of digital “1” of waveform Tr 2  and the falling slope is set to the correlated second weighting value a 2 . The product of the rising time and the first weighting value a 1  minus the product of the falling time and the second weighting value a 2  equals the accumulation result of the counter  56 , and the accumulation result is utilized to estimate the long-term average. Once the drifting value increases to some value, which means the baseline of the transmission signal is reduced by the same value, a positive compensation process is then required to shift up the level of the transmission signal. Therefore, according to the present invention, as the accumulation result increases to the first predetermined value LcP, a positive compensation process is applied to the waveform Sc of the transmission signal and shifts up the voltage level by a first compensation value dV. This invention discloses a corresponding relationship between the first compensation value dV and the first predetermined value LcP to compensate the baseline wander of the transmission signal correctly and efficiently. 
   As aforementioned, the slope of the variation of baseline is not fixed and is actually dependent on time. Referring to the waveform D in  FIG. 2 , during time intervals Ta and Tc, the increasing rate is higher at the beginning of each interval, which means the slope is higher due to the larger increasing scale per unit time. While near the end of each interval, the increasing rate is lower, which means the slope is lower due to the smaller increasing scale per unit time. According to the present invention, the first weighting value a 1  and the second weighting value a 2  corresponding to the slopes of long-term average variation are changing correspondingly. For example, as described above, when the accumulation result increases to the first predetermined value LcP, a positive compensation process is applied to the transmission signal. However, if over-correction occurs, which means the slope is not estimated correctly by the first weighting value a 1  and the second weighting value a 2 , the first weighting value a 1  and the second weighting value a 2  are then adjusted to reflect the variation slope of long-term average with time. Based on the above description, the slope of rising or falling long-term average varies exponentially. According to the present invention, the suitable adjustment of the first weighting value a 1  is sufficient to reflect the variable slope with time, and the second weighting value a 2  can be held fixed to simplify the circuit design and control process of control circuit  38 . When the voltage level of waveform Sc of the transmission signal is higher than the first threshold value Lc 1 , the weighting adjustor  54 A reduces the first weighting value a 1  exponentially and adjusts the estimation of the slope of long-term average. If the voltage level of the transmission signal goes beyond the first threshold value due to over-correction, the first weighting value a 1  is adjusted to be smaller and the variation of accumulation result is slower, which means frequent corrections are not required for a smoother slope of the transmission signal. Each time the transmission signal exceeds the first threshold value Lc 1 , the first weighting value a 1  is further reduced to reflect the smoother slope of the long-term average. 
   The waveforms of the related signals in another embodiment are illustrated with reference to the same time scale along the horizontal axis in  FIG. 4B . Referring to  FIG. 4B , waveforms from top to bottom are the transmission signal Sc, the first triggering signal Tr, the second triggering signal Tr 2 , and the accumulation result cnt. Compared to the operation process in  FIG. 4A , the number of the first pulses corresponding to the high level of the transmission signal Sc is about the same as the number of the second pulses corresponding to the low level of the transmission signal Sc. This causes the baseline waveform to decrease gradually derived from the above discussion on the waveforms in  FIG. 2 . As before, the accumulation result increases a scale of the first weighting value a 1  with each digital “1” of waveform Tr 1  and decreases a scale of the second weighting value a 2  with each digital “1” of waveform Tr 2 . Compared to the waveforms in  FIG. 4A , the number of digital “1” of waveform Tr 1  is relatively smaller and the number of digital “1” of waveform Tr 2  is relatively greater, which causes the accumulation result to decrease gradually and even decrease to less than the initial value Lc 0 . As the accumulation result decreases gradually to a second predetermined value LcN, which is shown as a horizontal dashed line in  FIG. 4B , the counter  56  resets the accumulation result to the initial value Lc 0  and the correction circuit  40  shifts down the waveform level of the transmission signal with a scale of the second compensation value dV 2  according to the control signals  38 A and  38 B. The gradual decrease of accumulation result from initial value Lc 0  means the gradual decrease of long-term average, which corresponds to a gradual increase of waveform Sc of the transmission signal. Therefore, according to the present invention, as the accumulation result decreases to the second predetermined value LcN, a shift-down compensation process is applied to the waveform Sc. For instance, at time t 12  and t 13 , as the accumulation result decreases to the second predetermined value LcN, the voltage level of waveform Sc of the transmission signal is shifted down with a scale of the second compensation value dV 2 . 
   Similar to the feature in  FIG. 4A , the decreasing rate of the long-term average is smaller with time and the upward offset rate of waveform Sc is also smaller, which means frequent downward corrections will cause over-compensation on waveform Sc. Hence, the weighting adjustor  54 A is utilized to adjust the first weighting value a 1  to reflect the variation of long-term average with time. For instance, as the voltage level of waveform Sc of the transmission signal is lower than the predetermined threshold value Lc 2 , the weighting adjustor  54 A increases the first weighting value a 1  to prevent the variation of the long-term average with time. Referring to  FIG. 4B , at time t 13 , as the waveform Sc decreases to the second threshold value Lc 2 , the first weighting value a 1  will increase from a 1  to a 1 ″, accordingly. Thereafter, the time duration for the waveform Sc to decrease to the second predetermined value LcN is longer and the frequency of downward correction of the transmission signal is lower to reflect the slower ascending of the transmission signal. 
   Based on the above discussion with reference to  FIGS. 4A and 4B , according to the present invention, the accumulation result increases a scale of the first weighting value a 1  with each first pulse and decreases a scale of the second weighting value with a 2  each second pulse, and the rising or falling level of the transmission signal is estimated by the accumulation result. As the accumulation result reaches the first predetermined value LcP, the correction circuit  40  is controlled by the counter  56  to shift up the voltage level of the transmission signal with a scale of first compensation value dV, so as to compensate the downward offset of the transmission signal. As the accumulation result reaches the second predetermined value LcN, the correction circuit  40  is controlled by the counter  56  to shift down the voltage level of the transmission signal with a scale of second compensation value dV 2 , so as to compensate the upward offset of the transmission signal. In addition, as the voltage level of the transmission signal increases to exceed the first threshold value Lc 1 , the weighting adjustor  54 A will reduce the first weighting value a 1  to reflect the slower ascending of the transmission signal. On the contrary, as the voltage level of the transmission signal decreases to fall below the second threshold value Lc 2 , the weighting adjustor  54 A will increase the first weighting value a 1  to reflect the slower descending of the transmission signal. 
   The waveforms of the related signals in the operation of signal compensation circuit  30  are illustrated in  FIG. 5  with an expanded time scale along the horizontal axis. Referring to  FIG. 5 , the waveforms, from top to bottom are the uncompensated transmission signal S, the transmission signal Sc under compensation by the present invention, the accumulation result cnt, and the waveform alw of the first weighting value a 1 . Referring to  FIG. 5 , during the time interval Ta, because of the baseline offset of the transmission signal, the uncompensated waveform S is drifting downward. Since the number of the first pulses is much larger than the number of the second pulses, the accumulation result is counting up rapidly in response to a larger long-term average, in conjunction with a larger initial scale of the first weighting value a 1 , and the accumulation result increases to the first predetermined value LcP in short time. Consequently, the correction circuit  40  shifts up the voltage level of the transmission signal frequently under the control of the counter  56 . However, as the initial larger scale compensation turns out to be over-compensation afterward, the first weighting value a 1  is decreased accordingly to lower the increasing rate of the accumulation result as shown by waveform alw in  FIG. 5 , and which reflects the smoother downward offset of the transmission signal. Thereafter, during the time interval Tb, because the number of the first pulses is about the same as the number of the second pulses and the initial scale of the first weighting value a 1  is adjusted to be smaller during time interval Ta, the accumulation result is counting down in response to a lower long-term average, and thus decreases down to the second predetermined value LcN from the initial value Lc 0  in short time. Consequently, the correction circuit  40  shifts down the voltage level of the transmission signal frequently under the control of the counter  56 . However, as the initial larger scale compensation turns out to be over-compensation afterward, the first weighting value a 1  is increased accordingly to lower the decreasing rate of the accumulation result, and which reflects the smoother upward offset of the transmission signal. 
   According to the first embodiment, each of the controlled current sources comprises a plurality of current units, and each current unit provides a constant unit current, a current d 1  for example. The controlled current source is able to increase the output current by enabling a plurality of current units and decrease the output current by disabling partial current units. While the control circuit  38  controls the correction circuit  40  to increase or decrease the voltage level of the transmission signal, two control signals  38 A and  38 B are utilized to control the controlled current sources  46 A,  46 B,  48 A, and  48 B as shown in  FIG. 3A . In order to increase the voltage level of the transmission signal at node  3 , a plurality of current units of controlled current sources  46 A and  46 B are enabled to increase the compensating current Ic 1  and Ic 2  by a current dI. In conjunction with the reference level of the common-mode voltage source Vcm, the voltage level of the transmission signal at node N 3  is increased by a scale of R 1 *dI. As aforementioned, according to the present invention, while compensating the transmission signal, the voltage level of the transmission signal is increased by the first compensation value dV. For that reason, the first compensation value dV can be designed and controlled by the first resistor R 1  and the current d 1 . Similarly, in order to decrease the voltage level of the transmission signal at node  3 , a plurality of current units of controlled current sources  48 A and  48 B are enable to decrease the compensating current Ic 1  and Ic 2  by a current dI 2 . In conjunction with the reference level of the common-mode voltage source Vcm, the voltage level of the transmission signal at node N 3  is decreased by a scale of R 1 *dI 2 . Consequently, the second compensation value dV 2  can be designed and controlled by the first resistor R 1  and the current dI 2 . In a preferred embodiment, the first compensation value dV and the second compensation value dV 2  are substantially equal and the two currents dI and dI 2  are also substantially equal. 
   Although the above discussion is based on the positive transmission signal at N 3 , it is noteworthy that similar compensation process can be inferred by persons skilled in the art for the negative transmission signal at N 4  due to the symmetrical circuit design of the correction circuit  40 . The positive and negative waveforms Sc and ScN of the differential transmission signal under the compensation of signal compensation circuit  30  are schematically graphed to the same time scale along the horizontal axis as shown in  FIG. 6 . The waveform Sc is the positive waveform of the transmission signal at node N 3  and the waveform ScN is the negative waveform of the transmission signal at node N 4 . Two second resistors R 2   s , two first resistors R 1   s , and the related controlled current sources are placed symmetrically based on the central position of the common-mode voltage source Vcm in the correction circuit  40  as shown in  FIG. 3A . Accordingly, the positive and negative waveforms of differential transmission signal  18  at nodes N 3  and N 4  are mirrored to each other based on the central level of common-mode voltage Vcm, which is shown as a horizontal dashed line marked Vcm in  FIG. 6 . Referring to  FIG. 6 , as the output currents of the controlled current sources  48 A and  48 B are increased under the control of control signal  38 B, the compensation currents Ic 1  and Ic 2  are reduced and the compensation voltages Vc 1  and Vc 2  across the two first resistors R 1   s  are also reduced, and the two compensation voltages Vc 1  and Vc 2  with equal scale but out of phase are applied to the compensation processes of waveform Sc and waveform ScN respectively. As a result, according to the present invention, it is able to diminish the baseline wander of differential transmission signal by the compensation process described above and the receiver  36  of the user system  50  can retrieve the digital data from the transmission signal correctly. 
   As aforementioned, according to the first embodiment, with the second weighting value a 2  fixed, the first weighting value a 1  varies to reflect the rising or falling of waveform D. In a second embodiment of the present invention, the situation is reversed. With the first weighting value a 1  fixed, the second weighting value a 2  varies to reflect the rising or falling of the waveform D. Compared to the first embodiment, the increase of the second weighting value a 2  in the second embodiment corresponds to the decrease of the first weighting value a 1  in the first embodiment, and vice versa. 
   Compared to the prior art without the compensation process, the digital data cannot be retrieved correctly from the transmission signal with baseline wander. In the present invention, the baseline wander is estimated with the aid of an accumulation result by a counter and is corrected with a compensation process to ensure a high quality signal transmission. Thereby, a highly reliable communication system is achieved for data transmission and knowledge spreading. 
   Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.