"All You Ever Wanted to Know About NICAM but were Afraid to Ask"
History:
-
Version 1.0: 21.Sep.1995.
-
Version 1.1: 29.Nov.1995.
-
Version 1.2: 8.Mar.1996.
-
Version 1.3: 2.Apr.1996.
-
Version 1.4: 30.May.1996.
-
Version 1.5: 3.Sep.1997.
-
Version 1.6: 5.Nov.1997.
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:
-
One digital stereo sound channel.
-
Two completely different digital mono sound channels.
-
One digital mono sound channel and a 352Kbit/sec data channel.
-
One 704Kbit/sec data channel.
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:
-
Sound is digitised to 14 bits accuracy at a sampling rate of 32KHz.
-
The upper frequency limit of a sound channel is 15KHz due to anti-aliasing
filters at the encoder.
-
The 14 bit original sound samples are companded digitally to 10 bits for
transmission.
(Digital compansion ensures that the encoding and decoding algorithms can
track perfectly).
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:
-
In stereo mode, the 704 bit payload of each NICAM packet consists of a
companding block of L-channel data
interleaved
word-for-word with a companding block of R-channel data.
-
In twin-mono mode, odd-numbered NICAM packet payloads contain two companding
blocks in succession, each of M1 sound channel data.
Similarly, even-numbered packet payloads contain two companding blocks in
succession, each of M2 sound channel data.
-
In single-mono-plus-data mode, odd-numbered packet payloads contain two
companding blocks in succession, each of M1 sound channel data as before.
Even-numbered packets contain 704 bits of raw data (format unspecified).
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:
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:
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:
-
Programme material is fed to the encoder and both channels are pre-emphasised
to the CCITT "J.17" curve. An anti-aliasing filter limits the bandwidth
of the audio signals to 15KHz.
-
A pair of 14-bit ADCs digitise the signals at a sampling rate of 32KHz.
-
32 samples from one of the channels are read into a buffer.
-
The biggest absolute sample is found and sets the range bits (R0l, R1l and
R2l).
-
The range bits determine which bits of all samples in the buffer get
transmitted.
-
Even-parity protection for each sample is calculated on the top six bits
actually transmitted.
That's constructed one companding block. Now the same procedure is
performed on the matching 32 samples of the other channel yielding another
companding block and the range bits R0r, R1r and R2r.
-
The first 11-bit word of the payload is word 0 of the left channel
companding block, this is followed by word 0 of the right channel
companding block, then word 1(L), 1(R), 2(L) ... etc to word 31(R).
-
The signalling-in-parity is performed to convey range-bits and CIB[0] and
CIB[1].
-
If range bit R2l is '1', the parity bit of samples 0, 6, 12, 18 ... 48 are
inverted.
-
If range bit R2r is '1', the parity bit of samples 1, 7, 13, 19 ... 49 are
inverted.
-
If range bit R1l is '1', the parity bit of samples 2, 8, 14, 20 ... 50 are
inverted.
-
If range bit R1r is '1', the parity bit of samples 3, 9, 15, 21 ... 51 are
inverted.
-
If range bit R0l is '1', the parity bit of samples 4, 10, 16, 22 ... 52 are
inverted.
-
If range bit R0r is '1', the parity bit of samples 5, 11, 17, 23 ... 53 are
inverted.
-
If extra bit CIB[0] is '1', the parity bit of samples 54, 55, 56, 57, 58 are
inverted.
-
If extra bit CIB[1] is '1', the parity bit of samples 59, 60, 61, 62, 63 are
inverted.
-
The payload is bit-interleaved so that if the bits of the raw payload
were numbered 0, 1 ... 703, they get transmitted in the order
0, 44, 88, ..... 659, 703.
-
The FAW (8 bits: 01001110),
CI (one toggling bit, 3 mode bits: 000, and a 'mono fallback' bit),
and the AD word (11 bits: all zeros currently)
are prepended to the interleaved payload.
-
The FAW is transmitted as-is, but the rest of the bits are exclusive-ored
with the output of a 511 bit pseudo random bit generator.
-
Actual transmission consists of taking bits in pairs from the 728Kbit/sec
datastream, thus generating 356Ksymbols/sec.
-
If a symbol is '00', the phase of the NICAM carrier is left unchanged
from its previous value.
-
If a symbol is '01', the phase of the NICAM carrier is retarded 90 degrees.
-
If a symbol is '11', the phase of the NICAM carrier is inverted.
-
If a symbol is '10', the phase of the NICAM carrier is advanced 90 degrees.
This modulation method is known as DQPSK, or Differential Quadrature
Phase-Shift Keying.
-
Finally, the spectrum of the modulated NICAM signal is shaped by filters.
In system I it is bandlimited to about 700KHz at the -30dB points,
in System B/G (having a narrower transmission channel) it is limited
to about 500KHz.
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:
-
A phase-locked loop tuned to the NICAM carrier frequency recovers the
phase-changes which represent the encoded symbols of the bitstream.
-
The symbols give rise to the 728Kbits/sec raw datastream.
-
Instances of the FAW are found and the following bit is examined to
test for the giveaway 8 frames high / 8 frames low behaviour. Also,
a true FAW re-occurs every 728 bits. Between them, this allows
the decoder to lock and the bitstream to be split into its 728 bit
NICAM packets.
-
The bits of each raw NICAM packet are exclusive-ored with
a locally generated version of the pseudo-random sequence,
which recovers the real NICAM packets.
-
NICAM packets are split into FAW, CI bits, AD bits and payload. The
middle 3 CI bits carry the mode information (in this case 000 which
indicates stereo sound). If bit CI[4] is high, then the FM TV sound
is a fallback stereo-sum signal, should we lose lock.
-
The payload bit interleaving is reversed by writing the payload bits
into a 44 by 16 matrix on the long axis and reading them out on the
short axis.
-
The signalling-in-parity is decoded:
-
A majority vote is taken on the parity of samples 0, 6, 12 .. 48.
If even then range bit R2l is '0', if odd then R2l is '1'.
-
A majority vote is taken on the parity of samples 1, 7, 13 .. 49.
If even then range bit R2r is '0', if odd then R2r is '1'.
-
A majority vote is taken on the parity of samples 2, 8, 14 .. 50.
If even then range bit R1l is '0', if odd then R1l is '1'.
-
A majority vote is taken on the parity of samples 3, 9, 15 .. 51.
If even then range bit R1r is '0', if odd then R1r is '1'.
-
A majority vote is taken on the parity of samples 4, 10, 16 .. 52.
If even then range bit R0l is '0', if odd then R0l is '1'.
-
A majority vote is taken on the parity of samples 5, 11, 17 .. 53.
If even then range bit R0l is '0', if odd then R0l is '1'.
-
A majority vote is taken on the parity of samples 54, 55, 56, 57, 58.
If even then extra bit CIB[0] is '0', if odd then CIB[0] is '1'.
-
A majority vote is taken on the parity of samples 59, 60, 61, 62, 63.
If even then extra bit CIB[1] is '0', if odd then CIB[1] is '1'.
-
Because we are in stereo-sound mode, the L and R companding blocks
are recovered by reversing the word-interleave in the payload.
-
The left channel companding block, together with its R0l, R1l, R2l
range bits are now subjected to the following activities:
-
Any samples with whose parity disagreed with the vote for their
signalling-in-parity group are ignored and are replaced with
a simple linear interpolation based on the nearest adjacent correct values.
-
The range bits tell the decoder how many bits below the sign bit
went missing in encoding. They are easily reconstructed by merely
duplicating the sign bit into those positions.
This means we now have the 32 left channel samples de-companded
to their correct 14-bit accuracy.
The right channel companding block is treated in exactly the same
way, accompanied by its R0r, R1r and R2r range bits.
-
Left and Right samples are passed to a pair of 14-bit DACs,
and the signal is finally back in the analogue domain.
-
Both signals are de-emphasised according to the CCITT "J.17"
curve.
And that's all folks! What happens next is up to your TV.
5.1: Adventures of a Mono Signal:
-
Programme material is fed to the encoder and is pre-emphasised
to the CCITT "J.17" curve. An anti-aliasing filter limits the bandwidth
of the audio to 15KHz.
-
A 14-bit ADC digitises the signal at a sampling rate of 32KHz.
-
32 samples are read into a buffer.
-
The biggest absolute sample is found and sets the range bits (R0a, R1a and
R2a).
-
The range bits determine which bits of all samples in the buffer get
transmitted.
-
Even-parity protection for each sample is calculated on the top six bits
actually transmitted.
That's constructed one companding block. Now the same procedure is
performed on the next 32 samples of the channel yielding another
companding block and the range bits R0b, R1b and R2b.
-
The payload is consists of the words of the first companding block
followed by the second companding block.
-
The signalling-in-parity is performed to convey range-bits and CIB[0] and
CIB[1].
-
If range bit R2a is '1', the parity bit of samples 0, 3, 6, 9 ... 24 are
inverted.
-
If range bit R1a is '1', the parity bit of samples 1, 4, 7, 10 ... 25 are
inverted.
-
If range bit R0a is '1', the parity bit of samples 2, 5, 8, 11 ... 26 are
inverted.
-
If range bit R2b is '1', the parity bit of samples 27, 30, 33 ... 51 are
inverted.
-
If range bit R1b is '1', the parity bit of samples 28, 31, 34 ... 52 are
inverted.
-
If range bit R0b is '1', the parity bit of samples 29, 32, 35 ... 53 are
inverted.
-
If extra bit CIB[0] is '1', the parity bit of samples 54, 55, 56, 57, 58 are
inverted.
-
If extra bit CIB[1] is '1', the parity bit of samples 59, 60, 61, 62, 63 are
inverted.
-
The payload is bit-interleaved so that if the bits of the raw payload
were numbered 0, 1 ... 703, they get transmitted in the order
0, 44, 88, ..... 659, 703.
-
The payload must appear in the correct NICAM packet for its channel, i.e.
odd packets for channel M1, even packets for M2.
The FAW (8 bits: 01001110),
CI (one toggling bit, 3 mode bits: 000, and a 'mono fallback' bit),
and the AD word (11 bits: all zeros currently)
are prepended to the interleaved payload.
-
The FAW is transmitted as-is, but the rest of the bits are exclusive-ored
with the output of a 511 bit pseudo random bit generator.
-
Actual transmission consists of taking bits in pairs from the 728Kbit/sec
datastream, thus generating 356Ksymbols/sec.
-
If a symbol is '00', the phase of the NICAM carrier is left unchanged
from its previous value.
-
If a symbol is '01', the phase of the NICAM carrier is retarded 90 degrees.
-
If a symbol is '11', the phase of the NICAM carrier is inverted.
-
If a symbol is '10', the phase of the NICAM carrier is advanced 90 degrees.
This modulation method is known as DQPSK, or Differential Quadrature
Phase-Shift Keying.
-
Finally, the spectrum of the modulated NICAM signal is shaped by filters.
In system I it is bandlimited to about 700KHz at the -30dB points,
in System B/G (having a narrower transmission channel) it is limited
to about 500KHz.
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:
-
A phase-locked loop tuned to the NICAM carrier frequency recovers the
phase-changes which represent the encoded symbols of the bitstream.
-
The symbols give rise to the 728Kbits/sec raw datastream.
-
Instances of the FAW are found and the following bit is examined to
test for the giveaway 8 frames high / 8 frames low behaviour. Also,
a true FAW re-occurs every 728 bits. Between them, this allows
the decoder to lock and the bitstream to be split into its 728 bit
NICAM packets.
-
The bits of each raw NICAM packet are exclusive-ored with
a locally generated version of the pseudo-random sequence,
which recovers the real NICAM packets.
-
NICAM packets are split into FAW, CI bits, AD bits and payload. The
middle 3 CI bits carry the mode information (in this case 001 which
indicates twin-mono sound). If bit CI[4] is high, then the FM TV sound
is a fallback M1 signal, should we lose lock. No backup is available for
the M2 channel.
We can tell which mono channel is which by knowing if this is an odd
NICAM packet (i.e. channel M1) or even (i.e. channel M2).
-
The payload bit interleaving is reversed by writing the payload bits
into a 44 by 16 matrix on the long axis and reading them out on the
short axis.
-
The signalling-in-parity is decoded:
-
A majority vote is taken on the parity of samples 0, 3, 6 .. 24.
If even then range bit R2a is '0', if odd then R2a is '1'.
-
A majority vote is taken on the parity of samples 1, 4, 7 .. 25.
If even then range bit R1a is '0', if odd then R1a is '1'.
-
A majority vote is taken on the parity of samples 2, 5, 6 .. 26.
If even then range bit R0a is '0', if odd then R0a is '1'.
-
A majority vote is taken on the parity of samples 27, 30, 33 .. 51.
If even then range bit R2b is '0', if odd then R2b is '1'.
-
A majority vote is taken on the parity of samples 28, 31, 34 .. 52.
If even then range bit R1b is '0', if odd then R1b is '1'.
-
A majority vote is taken on the parity of samples 29, 32, 35 .. 53.
If even then range bit R0b is '0', if odd then R0b is '1'.
-
A majority vote is taken on the parity of samples 54, 55, 56, 57, 58.
If even then extra bit CIB[0] is '0', if odd then CIB[0] is '1'.
-
A majority vote is taken on the parity of samples 59, 60, 61, 62, 63.
If even then extra bit CIB[1] is '0', if odd then CIB[1] is '1'.
-
The first companding block, together with its R0a, R1a, R2a
range bits are now subjected to the following activities:
-
Any samples with whose parity disagreed with the vote for their
signalling-in-parity group are ignored and are replaced with
a simple linear interpolation based on the nearest adjacent correct values.
-
The range bits tell the decoder how many bits below the sign bit
went missing in encoding. They are easily reconstructed by merely
duplicating the sign bit into those positions.
This means we now have the first 32 samples de-companded
to their correct 14-bit accuracy.
The second companding block is treated in exactly the same
way, accompanied by its R0b, R1b and R2b range bits.
-
All 64 samples are passed to a 14-bit DAC, and the signal is
finally back in the analogue domain.
-
The signal is de-emphasised according to the CCITT "J.17"
curve.
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.