"All You Ever Wanted to Know About NICAM but were Afraid to Ask"

Copyright (c) 1995,1996,1997 Steven Hosgood BSc, Ph.D


History:
Thanks to the following contributors:
Bevis King , Hany Ferdinando , Hugh Robjohns and Herranen Henrik (proof reading)
Ed Ellers (information about US stereo-multiplex sound)
Otto Peter , Frederic Pauly , Colum Mylod and others (corrections to information about German "A2" stereo/twin-mono sound)
Steve Edwards (information about British use of the 11Kbit/sec "spare channel")
[email protected] (spotted bug in table of Range Bits used in companding)
Frederic Pauly (subcarrier and ID tones for mode-switching in German "Zweiton")
Colum Mylod (moan about S/N ratio of Zweiton(!) and info about Brussels Cable TV)



1.0: Introduction:

This file attempts to be a quickly-readable summary of the features and workings of NICAM digital TV sound, currently the EBU's recommended system for upgrading a current mono-sound TV service to stereo or dual-language sound. Most of the detail for this file comes from [BOWE89], a BBC Research Dept. Report. However, [BOWE87] may be more easily available and contains most of the same text.

DISCLAIMER: This article is just for technical information. I (Steve Hosgood) don't maintain lists of what NICAM decoder chipsets are available from manufacturers, have no idea of their relative merits and I don't know the prices, pinouts or suppliers of such chipsets. I don't know if there are any add-on NICAM decoders available for your TV, nor do I know if there are plans to introduce a NICAM service in your part of the world. Dammit - I don't even know when the BBC transmissions from my own local TV transmitter (Carmel, South Wales) are due to get upgraded.

As far as readers in the UK are concerned, once apon a time Maplin sold a stand-alone NICAM decoder kit complete with tuner and PSU in a box. Maybe they still do. Ask them. They also used to sell a decoder chipset. Also, SENDZ Components in the UK used to sell surplus (but working) NICAM boards which need to be wired into your TV in order to work - they need wiring to the TV's video demodulator and access to the TV's power supplies.

I don't maintain the addresses of these companies nor of any others which might sell similar products. I will admit to having sucessfully used the surplus board that SENDZ were supplying in 1993, but I cannot speak for whatever they supply now - if indeed they still do supply such a thing. An article in the UK's "Television" magazine Feb 1993 entitled "NICAM on a Shoestring" gave some practical do-it-yourself details of how to use surplus NICAM boards like the SENDZ offering. Also it gave details of how (if necessary) to modify a system B/G board to work in a system I country (and vice versa of course).

1.1: Specification (In Brief):

NICAM stands for "Near Instantaneous Companded Audio Multiplex" , the "Near Instantaneous Companding" being due to the fact that 1ms worth of sound data has to be input before the companding process can do its work. The "Audio Multiplex" term implies that the system is not limited just to stereo operation (as shown below).

NICAM currently offers the following possibilities, autoselected by the inclusion of a 3-bit type field in the data-stream:

The four other options could be implemented at a later date. Only the first two of the ones listed are known to be in general use however.

Other facts:

2.0: History:

NICAM (or to give it its full name, NICAM 728) was invented during the early 1980's by the BBC Research Centre, Kingswood Warren. It was first applied to the British "System I" 625 line PAL colour TV broadcasting system, and premiered in 1986 on the "First Night of the Proms" concert programme. Since that time it has been slightly modified by the Nordic broadcasters to work with the more common System B/G used over much of continental Europe. It has been demonstrated to work also with System D/K used in some of eastern Europe, and with System L used in France. Theoretically, it could work with 525-line Systems M and N in the Americas, Canada and Japan.

NICAM is certainly not the first stereo/twin-mono sound system to be used in Europe. German broadcasters invented a system known as "A2" or "Zweiton" back in about 1975 and have been using it ever since. Other countries have adopted it too, amongst them: Australia, Austria and Switzerland. Basically it adds an extra FM sound carrier to System B/G at 5.7421875 Mhz (in addition to the standard one on 5.50MHz). In stereo mode, the 5.50MHz channel carries stereo-sum, and the 5.74MHz extra channel carries stereo-right. (Yes, really!) This is done so that people with old single sound-channel TVs get a compatable mono signal on stereo broadcasts, but why they didn't choose to send stereo-difference on the other carrier is beyond me. In twin-mono mode (a.k.a "Zweiton"), each channel carries independent services.

So that TVs can automatically tell the difference between a stereo and a "Zweiton" transmission, the 5.74MHz sound carrier is amplitude-modulated with a 54.6875 Khz (i.e 3.5 times line-timebase frequency) subcarrier. This subcarrier is itself 50% amplitude-modulated with low frequency "identification" sinewaves: 117.5Hz (line-timebase / 133) for Stereo Mode or 235.5 (line-timebase / 57) for twin-mono Mode. If the 5.74MHz carrier is missing, or doesn't have a recognisable ID-tone, the TV reverts to simple-mono mode.

The "A2" system suffers to some extent from multipath distortion effects, has a rather poor signal-to-noise ratio, plus all the usual troubles with achieving decent linearity with FM modulators and demodulators. It also exhibits poor utilisation of bandwidth by modern standards. NICAM offers a totally different approach, providing a completely new all-digital stereo/twin-mono service in addition to the one provided by the existing FM sound. Theoretically, a NICAM equipped TV service could offer 3-language support: the FM sound plus NICAM (in twin-mono mode) all carrying different services. There must be places in Europe where this would be useful, indeed, according to Colum Mylod, some of the cable TV services in Brussels use it thus.

Other stereo systems are in use in other parts of the world.

It seems that Japan is the only NTSC country to adopt the EIAJ system, the others would have had no reason not to adopt the BTSC system.

3.0: How NICAM works:

A high frequency subcarrier (5.85MHz on System B/G or 6.552MHz on System I) is digitally modulated with a 728Kbits/sec datastream. The datastream consists of 728bit NICAM packets transmitted continuously, one packet every millisecond.

3.1: NICAM Packet Format (overall):

Each packet consists of an 8-bit "frame alignment word" (FAW) followed by 5 bits of Control Information (CI), followed by 11 bits of Additional Data (AD), followed by a 'payload' packet of 704 data bits.

Three of the Control Information (CI) bits are 'mode bits' and tell the NICAM decoder what mode it should be in (i.e what to do with the payload data bits). Another CI bit tells the decoder if the FM TV sound can be used as a fallback should the NICAM signal fail. The other CI bit just toggles high for 8 packets, low for 8 packets and is used (amongst other things) to allow identification of "odd" and "even" NICAM packets.

In stereo mode the 704 data bits of each NICAM packet's payload carry one millisecond's worth of sound for both L and R channels. In twin-mono mode, the payload of odd NICAM packets carry two milliseconds' worth of sound for channel M1 and the even packets carry two milliseconds' worth of sound for channel M2. In single-mono-plus-data mode, the odd NICAM packet payloads (as above) carry two milliseconds' worth of sound for channel M1, but the even packets carry 704 unspecified raw data bits.

The format of the mono or stereo 704 bits of sound data is the same as the "companded, first-level protected" sound signal used in the C-MAC, D-MAC or D2-MAC systems. This was intended to permit commonality of decoder circuitry in MAC/NICAM decoders, but in practice this feature doesn't seem to have been used. NICAM decoders are usually in the TVs and VCRs, MAC decoders are usually separate units.

3.2: Packet Format:

3.2.1: Audio Packet Payload Format:

If a given NICAM packet carries sound, the payload contains two companding blocks of sound samples. The arrangement depends on the mode as was tabulated above, but first let's look at the companding blocks themselves.
3.2.1.1: Companding Blocks:
The first level of audio processing consists of taking 1 millisecond's worth of raw 14-bit samples (i.e. 32 samples) and reducing them from 14 bits to 10. The ADC supplies a 2's complement sample, centred about all-zeroes for 0V:
       01111111111111     represents positive full-scale

       00000000000001
       00000000000000     represents 0V
       11111111111111

       10000000000000     represents negative full-scale
The numerically largest (positive or negative) sample of the 32 is used to choose which 10 bits of all 32 samples in the block will actually be transmitted. This avoids transmitting redundant bits. There are eight possible decisions tabulated below. So that the decoder can re-expand the 10 bit samples to 14 bits, three "range bits" are associated with each possible companding action, and this value is also transmitted in the companding block of course.
      Largest Sample       Range Bits      Bits Transmitted
     B13...........B0       R2 R1 R0       B13...........B0
      01XXXXXXXXXXXX         1  1  1        YYYYYYYYYYNNNN
      001XXXXXXXXXXX         1  1  0        YNYYYYYYYYYNNN
      0001XXXXXXXXXX         1  0  1        YNNYYYYYYYYYNN
      00001XXXXXXXXX         0  1  1        YNNNYYYYYYYYYN
      000001XXXXXXXX         1  0  1        YNNNNYYYYYYYYY
      0000001XXXXXXX         0  1  0        YNNNNYYYYYYYYY
      0000000XXXXXXX         0  0  X        YNNNNYYYYYYYYY
      1111111XXXXXXX         0  0  X        YNNNNYYYYYYYYY
      1111110XXXXXXX         0  1  0        YNNNNYYYYYYYYY
      111110XXXXXXXX         1  0  0        YNNNNYYYYYYYYY
      11110XXXXXXXXX         0  1  1        YNNNYYYYYYYYYN
      1110XXXXXXXXXX         1  0  1        YNNYYYYYYYYYNN
      110XXXXXXXXXXX         1  1  0        YNYYYYYYYYYNNN
      10XXXXXXXXXXXX         1  1  1        YYYYYYYYYYNNNN
As can be seen, the "sign bit" of samples is always transmitted, but unused MSBs are discarded. This means that small-amplitude signals get transmitted effectively to 14 bits resolution, but large amplitude signals only to 10 bits resolution. The reduction in S/N ratio on large amplitude signals is (allegedly) masked by the signal of course.

Notice that what gets transmitted for Range Bits 011 -> 000 is always the same. The differing values of range-bits are used in the decoder to offer a slight increase in error-protection. More on this later.

Notice also that there is ambiguity about Range Bits 000 and 001. This needn't be the case, but it was done that way in MAC, and NICAM copies it for compatability. Basically, the decoder does the same thing in both cases.

Important: Notice that the binary value of the range-bits subtly does not increment linearly with increasing signal amplitude. I have no idea why this should be so, but thanks to "[email protected]" for spotting it! ( Werner found this bug the hard way - he actually built a NICAM encoder based on this page and an article in the May 1997 issue of Dutch magazine "Elektuur" [ELEC97]. )

One bit of parity protection is added to each sample, and the 3 bits of "range bits" (which convey to the decoder what companding factor was used so that the companding can be reversed) are cunningly added too by twiddling some of the parity bits.

Details of this "signalling in parity" procedure, which conveys the range bits are left to later! Suffice to say that the process slightly weakens the protection offered by the parity bits, but passes 3 bits of information without adding any bits to the data stream. Very clever...

So a companding block carries 1ms of sound in 352 bits.

3.2.1.2: Transmission of Companding Blocks:
How the companding blocks are fitted into the NICAM payload depends on the system mode: Thus: the decoder's processing of sound packets depends primarily on whether they are stereo or not. The reason for word-interleaving L and R channels in stereo mode is to make sure that noise-bursts affect both channels fairly symmetrically and simultaneously.

Notice that the companding process operates independently on the L and R channels in stereo-mode. This prevents loud signals in one channel introducing "pumping" effects in the other.

3.2.1: Data Packet Payload Format:

None specified as yet. The 704 bits are application specific.

3.3: Transmission of Sound or Data Payloads:

Once a sound or data payload has been constructed (see above), one more thing is done before it is tagged onto the FAW, CI bits and Additional Information bits. A final bit-interleave is performed in that the 704 bits are effectively written into a 44 by 16 array on the 'long' dimension and read out from the 'short' dimension.

So originally-adjacent bits from the raw original payload end up 44 bits apart in the NICAM packet. This is done to try to spread the effects of short noise bursts, which (if the noise burst lasts for less than 44 bits duration) will drop a single error into many words, which in turn ought to be detectable by means of the parity bit on each word.

3.4: Transmission of NICAM Packets:

The whole NICAM packet body, consisting of the CI bits, AI bits and data is xor-ed with the output of a nine-bit pseudo-random bit-generator:
[schematic of pseudo-random bit generator with a polynominal of X9+X4+1]
The topology of this pseudo-random generator yields a bitstream with a repetition period of 511 bits, and is used to make the NICAM bitstream look more like white noise so that the final modulated NICAM signal has less chance of producing patterning on an adjacent-channel vision signal.

Notice that the FAW is not subject to this scrambling - this is to aid the resynchronisation of the receiver. At the start of each NICAM packet (i.e while the FAW is being sent) the pseudo-random bit generator's shift-register is reset to all-ones.

4.0: Details:

4.1: Pre-emphasis:

Before sampling, the sound signals are pre-emphasised to the CCITT "J.17" curve:

[plot of J.17 pre-emphasis curve]

This process is course reversed at the decoder, and its purpose is to reduce the effects of noise modulation which occur as a result of the companding procedure's block-by-block processing.

4.2: Control Information Bits:

Bit CI[0] just toggles between '0' for 8 frames and '1' for 8 frames. Its purpose is partly to identify which frames are "odd" or "even". When the bit changes from '0' to '1', the frame in which it happens is frame 1 (odd). Odd/even identification has importance in twin-mono mode and single-mono-plus-data mode.

The other purpose of this toggling action is to aid identification of the FAW. The idea is that the FAW (being only 8 bits long) has a high chance of appearing spuriously in the datastream. However, the chance of a spurious occurance of a fake FAW followed by a bit toggling 8 frames high followed by 8 frames low is astronomically remote. The result is to permit a decoder to aquire sync within a few frames of losing lock (or on changing channel).

4.3: Parity

In order to strengthen parity protection for the sound samples, the parity bit is calculated on only the top six bits of each sample, not all ten. This is because tests showed that uncorrected errors in the least significant four bits were preferable to the reduced overall protection offered by parity-protecting all ten bits.

4.4: Signalling in Parity:

Three "range bits" must be sent for each companding block, and they must be heavily protected against errors. Errors in the range bits would result in a large-amplitude error affecting all 32 samples in the companding block.

A range bit of '0' is sent by calculating even parity on a given set of 9 samples in the payload, for a range bit of '1', odd parity is calculated on that sample-set.

It does however pose a problem in decoding. What happens at the decoder is that (for a given range bit) the odd/even parity of its associated samples in the payload are found and a majority vote taken. If the majority parity vote is "even" in a sample-set, then the associated range bit must have been '0', and any data samples whose received parity was odd are deemed to be in error. Likewise if the majority parity is "odd" in a sample set, the associated range bit is '1', and any even-parity samples in that set are deemed to be in error.

So each range bit is effectively protected by 8 backup bits, more than half of which have to be wrong to cause the range bit to come out wrong.

4.5: Spare capacity.

Within a payload block, the parity of samples 54 thru 63 are not involved in the signalling-in-parity system conveying the range bits. There is however a capability of using signalling-in-parity on samples 54 thru 58 and 59 thru 63 to convey two bits (known as CIB[0] and CIB[1] respectively) with moderate robustness.

Currently (in Britain) these are not used for anything, though decoders are required to do the parity vote anyway in case they come into use sometime. So, NICAM has a 2Kbit/sec ruggedly protected spare data channel available in stereo or twin-mono mode, and 1Kbit/sec in single-mono-plus-data mode (only payloads carrying sound use signalling-in-parity).

Amongst the header of every NICAM packet (regardless of payload) are 11 bits of Additional Data, again currently not officially used in Britain. So that's another 11Kbits/sec available bandwidth - though unprotected this time.

There was mention in IBC94 of using this 11Kbit/sec channel for carrying a 9.6Kbit/sec audio channel of extra descriptive voice-over for visually impaired viewers (see [LODG94]). ( Some US TV stations apparently carry a "Descriptive Video Service" on the Secondary Audio Program subcarrier. )

It would seem that Channel 4 in Britain uses it for carrying a studio voice channel for cueing purposes during sports programmes. [email protected] (Steve Edwards) wrote to me saying: I recall reading an article in PCW some time ago about the use of data compression in encoding audio. Apparantly it's possible to achieve "telephony quality speech" using only 5k (or so) bits/s. The article said that channel 4 were using some of the spare bits in broadcast NICAM to control outside broadcast of sports meetings, especially channel 4 racing. Basically, so the article said, the OB points a suitable aerial at the relevant transmitter to receive spoken instructions from their OB control centre.

5.0: A Walkthrough:

It is sometimes easier to look at a signal processing sequence from the point of view of being the sound samples themselves, and listing what happens to them on their travels from encoder to decoder.

5.1: Adventures of a Stereo Pair:

The shaped-spectrum NICAM signal is added to all the other components of the TV signal (i.e the baseband video and the FM mono sound carrier).

In the receiver, the NICAM signal is separated from the other components by a bandpass filter with characteristics matching the transmitter's filter. Then is is processed as follows:

And that's all folks! What happens next is up to your TV.

5.1: Adventures of a Mono Signal:

The shaped-spectrum NICAM signal is added to all the other components of the TV signal (i.e the baseband video and the FM mono sound carrier).

In the receiver, the NICAM signal is separated from the other components by a bandpass filter with characteristics matching the transmitter's filter. Then is is processed as follows:

And that's all folks! What happens next is up to your TV.

6.0: Bibliography:

BOWE87:	Bower A.J: "NICAM 728 - Digital Two-Channel Sound for Terrestial
	Television", IEEE Trans. Consumer Electronics, Aug 1987 page 286 et al.
BOWE89:	Bower A.J: "NICAM 728 - Digital Two-Channel Sound for Terrestial
	Television", BBC Research Dept. Report, 8/89.
ELEC97: Elektuur magazine, May 1997, pages 48-51. (Dutch Version). This
	reference is presumably also true of the English version "Elektor"
LODG94: Lodge N.K, Green N.W, Nunn J,P: "AUDETEL: Audio Described Television -
	the Launch of National Test Transmissions", Proceedings of IBC 94,
	pages 140-145.