# How to tell whether a line coding scheme has DC component or not

I'm new to EE, trying to understand things as a non technical audience. My textbook says one of bipolar encoding schemes called alternate mark inversion (AMI) has no DC component and we can think about it intuitively. If we have a long sequence of 1s, the voltage level alternates between positive and negative; it is not constant. Therefore, there is no DC component. For a long sequence of 0s, the voltage remains constant, but its amplitude is zero, which is the same as having no DC component. In other words, a sequence that creates a constant zero voltage does not have a DC component.

But then the book says return-to-zero (RZ) scheme doesn't have DC component neither as picture below shows:

Here is something I don't get, clearly if we have a long sequence of 1 in RZ scheme, the voltage level will be + 0 + 0 + 0 ...., if add all those up, the sum is clearly a large positive value, given by the intuitive explanation, how come it doesn't have DC component? Is it an another way to tell whether a line coding scheme has DC component or not?

• Why would you add them all up to get a large positive value? What use is there in doing this? Commented May 24, 2020 at 13:27
• A properly designed line code can have no (or a fixed) DC bias over long periods of time (where long periods of time are as long as several tens to hundreds of bits). The description of AMI is accurate if all you send is long sequences of 1s and 0s; a real channel will not do that, but it will (statistically) have no DC bias. All line coding schemes designed for a fixed or zero DC bias (AFAIK) will have some (quite small) DC wander over short periods of time. Commented May 24, 2020 at 13:31
• Don’t sweat over DC content, that’s the user’s control of content. It’s the AC eye pattern that is the challenge at 160 Gbps with RZ in a 1000 km link. In different link cases, RZ or NRZ are each better depending on phase noise, dispersion and nonlinearity. Commented Jul 5, 2021 at 1:19

# How to tell if a signal has a DC component or not?

Every symbol used in the communication should have a signal average of 0 for the duration of the symbol. A single symbol may code multiple bits. In 4-PSK a single symbol codes two bits for example.

In the Polar NZ encoding scheme it is obvious that the symbol for 0 has a negative value and the symbol for 1 has a positive value. Therefore it has a DC Component.

Statistically, if there are as many 0s as 1s over a given time period, the overall DC component for Polar RZ can be close to 0, but you can not guarantee it unless you have control of the higher level protocol and ensure that it has as many 0s as 1s.

# Polar NZ and your textbook statement.

As said, Polar NZ has a DC component, but why does the textbook suggest otherwise?

I found a very similar image on reserach gate, without the colors: https://www.researchgate.net/figure/Polar-RZ-type-coding-Manchester-and-Differential-Manchester-The-awareness-of-RZ_fig30_288180515

I can read in that publication:

Return to Zero (RZ) The main problem with NRZ encoding occurs when the sender and receiver clocks are not synchronized. The receiver does not know when one bit has ended and the next bit is starting. One solution is the return-to-zero (RZ) scheme, which uses three values: positive, negative, and zero. In RZ, the signal changes not between bits but during the bit. In Figure 48 we can see that the signal goes to 0 in the middle of each bit. It remains there until the beginning of the next bit. The main disadvantage of RZ encoding is that it requires two signal changes to encode a bit and therefore occupies greater bandwidth. The same problem we mentioned, a sudden change of polarity resulting in all as interpreted as 1s and all 1s interpreted as 0, still exist here, but there is no DC component problem.

I agree that the explication could be improved, but the exact phrase there is "... there is no DC component *problem*" .

What is a DC component problem? If you decouple a signal towards an input stage, and you would be encoding 1 as a high level and 0 as a low level (classic digital encoding), you would not be able to know whether the signal is a zero or a one in the middle of a communication.

However, with the Polar NRZ encoding, there is a DC Component, but not a DC Component Problem. From the variations in the signal you can determine if you are reading a 0 or a 1.

However there is still an issue. Suppose that the emitter is sending a very long sequence of ones while the receiver is off. And then you switch on the receiver. You will not be able to determine if you are receiving ones or zeros when you switch the device on. You need at least a 1 and a 0 to be sure, only then there is no DC component problem.

The text is not carefully phrased and the sentence "The same problem we mentioned, a sudden change of polarity resulting in all as interpreted as 1s and all 1s interpreted as 0, still exist here, but there is no DC component problem." seems to be wrong they might have meant "The same problem we mentioned, a sudden change of polarity resulting in all *0s* interpreted as 1s and all 1s interpreted as 0, still exist here, but there is no DC component problem." to refer to the issue I just mentionned, but we can agree that this is not very clear.

So I argue that the text does not mean to say that there is no DC Component, but only that there is no DC Component Problem. In other words, the absence or presence of the DC Component is not important (except for long sequences of 0s or 1s at the start of the communication).

• thanks for your answer. I'm still confused, you describe DC component problem as "not be able to know whether the signal is a zero or a one in the middle of a communication.", but isn't that a synchronization problem? isn't that DC component is when the frequency is close to 0 and such a low frequency cannot pass some channel? Commented May 25, 2020 at 9:39
• You can also have coding schemes that track the DC offset, and average it out over multiple symbols, like 8b10b. Commented Apr 1 at 6:22

It depends on the time over which you are measuring an average level of the RZ signal.

If the measurement interval is very long (or infinite), and there are, on average, the same number of ones and zeros transmitted within that interval, then the DC component is zero.

If the measurement interval is finite, and during that interval there is a disparity between the number of ones and zeros, then clearly as you say, there will be a non-zero DC component. You are right to question that claim.