Where should an increase in harmonic frequencies go in the Nyquist formula?

From the Nyquist formula that $Capacity = 2 \times Bandwidth \times log_2(L)$, where $L$ is the level the signal represents, the total number of possible bit combinations the signal can represent.

Say I have these current values of $Bandwidth=8Hz$, $L=8$, then based on the Nyquist formula, I will get $2 \times 8Hz \times 3 = 48bps$ as the capacity.

Suppose I decided to increase (should I use the word "increase" or "add"?) 5 harmonics to the frequency, then my bandwidth would be $8 \times 5=40Hz$.

Now, if I insist to let the signal level, $L$ remain constant at $3$, then the equation will force the Capacity to increase: $2 \times 40Hz \times 3 = 240bps$. But, since the frequency increased was due to the number of harmonics which would "form" a more precise signal "shape of the digital signal, it hasn't increased the frequency of the whole digital signal, has it? That's, I should still get $48bps$ but with a better quality of digital signals. But in this Nyquist formula, it seems that my capacity is increased immediately if I insist to let my $L$ remain constant.

Where should the extra bandwidth value be in the Nyquist formula if the signal level is constant? The capacity shouldn't increase, should it?

Yes, your capacity increases. If your bandwidth is limited to 8Hz you can just have one sine period per 125ms, and that sine can represent 3 bits of data if you modulate 8 levels in it. That could be 8 levels of amplitude, but also a combination of for instance 4 amplitude levels times 2 phase levels. So 8 periods per second $\times$ 3 bits $\times$ 2 = 48bps like you said. (I'm not sure where the factor of 2 comes from, but I'll assume it is correct.)
Adding up to the fifth harmonic will get you 5 sine waves in the same 125ms, each of them able to represent 3 bits of data. So that gives you 5 $\times$ 48bps = 240bps.

If you would use the larger bandwidth to construct an approximation of a square wave, you're not using the extra information capacity of the higher harmonics. That's because phase and amplitude of those harmonics would be determined by the phase and amplitude of the fundamental to create the square wave, and they wouldn't carry any information of their own.

• I'm still a little confused. hmm..When adding up to the fifth harmonic, I will get a more precise square wave. But, if my square wave was 8Hz, it would still be running at 8Hz only with a more precise square wave, wouldn't it? Even if there were 5sine waves in the same 125ms, they are just waves that form the square wave and the representation of the bits still is determined by the frequency of the square wave and not the smaller harmonic sine waves, isn't it? Commented Sep 3, 2011 at 11:07
• @xEnOn - That's right. You just modulate 3 bits as 8 levels of the square wave instead of 8 levels of the sine. If you would modulate each of the 5 sines of the 5th harmonic with their own levels your "square wave" would look different each time, very asymmetrical to start with. Commented Sep 3, 2011 at 11:16
• If this is true, then my capacity bits/sec should remain the same at 48bps because the addition of the 5th harmonic does not increase the bits per second but only a more precise square wave shape. Then since that is true, after the addition of the 5th harmonic, the bits/sec does not change and levels remain at 8, although with a more better digital wave shape, the Nyquist formula wouldn't equate because $2 \times (5 \times 8Hz) \times log_2(8) \neq 48bps$? Commented Sep 3, 2011 at 11:58
• The capacity does increase, but you're not using this extra capacity, because you're using if for copies of the information in the fundamental wave. If you would use each of the 5 successive sines to encode different parts of your information you would have time division multiplex. If you would also use the other harmonics, then you combine TDM with frequency division multiplexing. Commented Sep 3, 2011 at 15:14
• Oh....So I could say that the capacity that the Nyquist formula gives is like the maximum bit rate I could use and not the bit rate I would achieve at a frequency. And for the amount of capacity of bit rate, it is up to me to use how much of that capacity. I could use it for other encoding such as the time division multiplexing or increase the signal levels or increase the harmonics for better signal quality, which would then not affect the actual data rate at all or even just don't use it at all. Is this interpretation right? Commented Sep 4, 2011 at 17:42

If you have a bridge that can carry 8 full lanes of traffic at 200 mph, that doesn't mean that there is always a full 8 lanes of traffic zipping across at 200 mph at all times. Sometimes there's just a single, slow car crossing the bridge.

The Shannon–Hartley theorem, given a little information about a channel, tells you how many bits/second are required to completely describe any possible signal that might ever be transmitted through that channel. The actual number of bits/second of good data transmitted through that channel can never ever be more than that; usually it is less than that.

Most electronic devices send and receive data at some constant symbol rate at some constant number of bits per symbol. It is the responsibility of the engineer to make sure the channel between the devices has at least enough bandwidth and low enough noise levels that the data can get through.

Most of the time we directly connect devices with a channel that has far more bandwidth and far lower noise levels than we really "need" to carry that data -- for example, we often use twisted-pair wires or coax cable to carry baseband single-channel audio a few feet from a television receiver to a loudspeaker.

Say some transmitter is sending 16 symbols/s of good data through some cable to a receiver. If I swap in a cable that includes a filter that limits its bandwidth to 10 Hz (i.e., a maximum of 20 symbols/s), then all the edges of the signal will be horribly rounded off, but (with careful design) the receiver can correctly decode the full 16 symbols/s of good data. If I swap in a cable that has a bandwidth limited to less than 8 Hz, then it is impossible to send 16 symbols/s of good data through the cable -- the data decoded by the receiver will be incorrect. If I swap in a CAT5e cable with a bandwidth of 65 000 000 Hz (?), then all the edges of the signal will look really crisp, the eye diagram will look excellent, and the receiver will correctly decode the full 16 symbols/s of good data -- a wire can't somehow "pull more data" out of the transmitter.

Often the available channel has a lower bandwidth or higher noise than we "need" to directly carry our data signal. As long as the Shannon-Hartley capacity of a channel is sufficient to carry our data, we can design a converter/modulator at the near end ends of the channel and a reconstructor/demodulator at the far end, so all our data gets through without error.

For example, say we want to send high-quality (2^16 level) audio from Hollywood to New York. Directly connecting them with a cable with adequate noise levels would be very expensive. A T1 telephone circuit is far less expensive, and it has far more bandwidth than we really "need" to carry the data, but alas, it is too noisy to directly carry high-quality audio. So we use data converters in Hollywood to convert the audio from a low-bandwidth, high-resolution audio signal to a more noise-resistant low-resolution signal, at the cost of a wider bandwidth, send it through the T1 line, and then in New York we use a matching data converter to reconstruct that signal back to high-quality audio with very low noise.

Data Transfer Bandwidth and Channel Usage/Allocation Bandwidth are very different things.

Data Transfer Bandwidth is the actual rate of digital data you transfer per unit time.
Channel Usage/Allocation Bandwidth is how much frequency range you consume on your physical medium while transferring your data.

When you only say Bandwidth you don't clarify which of these bandwidths you are implying. And what I understood from your question, you are confusing these two bandwidth types.