Allikas: Traadita Wiki by Jan & Co.

DCS e. Digital Coded Squelch e. digitaalselt kodeeritud signaalipiiraja

DCS on digitaalne kodeerimissüsteem, mis võimaldab teil valida ühe 83-st privaatkoodist, et eristada sisenevat signaali teistest samal kanalil tegutsevatest kasutajatest.

Kui kasutate DCS koodi, siis tuleb sidepidamise võimaldamiseks mõlemad saatjad häälestada samale kanalile ja samale DCS privaatkoodile.

DCS koodide tabel

6 50 125 174 255 343 445 526 703
7 51 131 205 261 346 446 532 712
15 53 132 212 263 351 452 546 723
17 54 134 214 265 356 454 565 731
21 65 141 223 266 364 455 606 732
23 71 143 225 271 365 462 612 734
25 72 145 226 274 371 464 624 743
26 73 152 243 306 411 465 627 754
31 74 155 244 311 412 466 631
32 114 156 245 315 413 503 632
36 115 162 246 325 423 506 654
43 116 165 251 331 431 516 662
47 122 172 252 332 432 523 664

DCS is a digital squelch scheme which is sent by a transmitter to control the squelch opening of a receiver. DCS is designed to work in the "so called" sub-audible portion of the communications audio band below 300 Hz. DCS digital code values are actually Golay {23, 12} codes. The {23, 12} notation tells us it is a 23 bit Golay word with 12 data bits included in the total 23 bits. There is lots of information on Golay {23, 12} on the web, so I will not go into those details here. The important feature of Golay {23, 12} is that software in the receiver can detect and correct up to 3 bit errors from the transmitted signal, just by processing the 23 Golay bits from inside the receiver. Golay codes also have an unusual property. The 23 bit word can have its bits rotated to any new position and it still forms a perfect, but different Golay {23, 12} code word. These are a few of the things that make Golay codes so interesting to mathematicians, which is probably why there is so much information on Golay available.

DCS signals are digital square wave signals where the square wave signal represents '1' and '0' data bits. The sharpness of the edge of a square wave signal is determined by the amount of odd harmonics in the signal. The more strong odd harmonics, the sharper the waveform edge is. Since the harmonics are progressively higher in frequency than the original DCS signal, they are clearly audible above 300 Hz. Since DCS creates audio harmonics well above 300 Hz (i.e. into the audible portion of the band from 300 to 3000 Hz), radios must have good filters to remove the unwanted DCS noise. The DCS Tx filter will change the normally sharp rise and fall edges of the square wave into more rounded shapes when it removes these higher frequency harmonics. It is up to the receiver to be able to recover these rounded signals and accurately decode the digital information from the signal. Some radios will actually create rounded edges with the DCS code synthesizer hardware rather than having to completely rely on the DCS Tx filtering.

DCS also includes an optional reverse burst to quietly close off the receiver squelch at the end of a transmission. This eliminates the receiver "squelch tail" noise burst.

The order which this material is explained in, is (hopefully) designed to reduce the confusion about + and - DCS codes. To accomplish this we will start with simplified DCS code theory. This theory section will assume perfect laboratory conditions. All DCS code transmitters will send perfectly encoded DCS and all receivers will perfectly receive the exact same polarity DCS code. However, in the real world, the polarity is not guaranteed to be the same (more on this later).

A DCS code is a mathematical construct that does not have or recognize any polarity concept when examining the structure of any valid DCS word. In other words, even if you invert the DCS word bits, you still have to deal with the 23 bit result as a positive code. As mentioned above, DCS values are actually Golay {23, 12}values. The DCS 11 check bits are used the exact same way as the Golay 11 check bits, for validating the remaining 12 bits and for bit error correction use. This leaves the 12 Golay data bits (bits 12 through 23). The difference from Golay is DCS values require a fixed "100" bit pattern in the 12th, 13th and 14th bits. This only leaves 9 bits for the familiar DCS code that we program into our radio squelch systems. This means DCS codes are a sub-set of Golay {23, 12} codes. Golay codes with 12 data bits have 4096 possible values. DCS codes with 9 data bits have 512 possible values.

DCS digits are in the octal number base. Each code is made up of 3 octal digits also known as 3 octets. An octet is 3 bits, so 9 bits total divided by 3 bits per octet, makes 3 individual DCS code digits. Each DCS code digit can have a value from 0 to 7 (the maximum number of different values you can put into a 3 bit octet). There are 512 decimal DCS codes total from 000 to 777 octal. If you use a calculator that has both octal and decimal (such as the Windows Calculator in scientific view), you can easily convert these octal 000 to 777 numbers back to decimal (777 octal = 511 decimal). Remember, 000 octal is a valid DCS code. So, if you start counting from 0 and count up to 511 decimal you will find there are 512 decimal values total.

A DCS code either is or is not a valid DCS code (there is no gray area). The '100' bit pattern (with a 1 in bit position 12 decimal, a 0 in bit position 13 decimal and a 0 in bit position 14 decimal) is the identifier signature of a 23-bit DCS word. If it does not have this magic '100' bit pattern in exactly this location, it is not a 23-bit DCS word. This '100' bit pattern will be referred too as the 100 signature match.

It turns out, if you perform a circular rotation on all the bits in the entire 23-bit DCS word, you may find more than one valid DCS code in the same 23-bit DCS word. Here is an example of rotating the 23-bit DCS word, starting at the valid DCS code of 023 octal.

11101100011-100-000/010/011 = 023 (valid DCS word)
11110110001-110-000/001/001 - rotate right one bit position, no 100 signature match
11111011000-111-000/000/100 - rotate right one bit position, no 100 signature match
01111101100-011-100/000/010 - rotate right one bit position, no 100 signature match
00111110110-001-110/000/001 - rotate right one bit position, no 100 signature match
10011111011-000-111/000/000 - rotate right one bit position, no 100 signature match
01001111101-100-011/100/000 - rotate right one bit position = 340 (valid DCS word)
00100111110-110-001/110/000 - rotate right one bit position, no 100 signature match
00010011111-011-000/111/000 - rotate right one bit position, no 100 signature match
00001001111-101-100/011/100 - rotate right one bit position, no 100 signature match
00000100111-110-110/001/110 - rotate right one bit position, no 100 signature match
00000010011-111-011/000/111 - rotate right one bit position, no 100 signature match
10000001001-111-101/100/011 - rotate right one bit position, no 100 signature match
11000000100-111-110/110/001 - rotate right one bit position, no 100 signature match
11100000010-011-111/011/000 - rotate right one bit position, no 100 signature match
01110000001-001-111/101/100 - rotate right one bit position, no 100 signature match
00111000000-100-111/110/110 - rotate right one bit position = 766 (valid DCS word)
00011100000-010-011/111/011 - rotate right one bit position, no 100 signature match
10001110000-001-001/111/101 - rotate right one bit position, no 100 signature match
11000111000-000-100/111/110 - rotate right one bit position, no 100 signature match
01100011100-000-010/011/111 - rotate right one bit position, no 100 signature match
10110001110-000-001/001/111 - rotate right one bit position, no 100 signature match
11011000111-000-000/100/111 - rotate right one bit position, no 100 signature match
11101100011-100-000/010/011 - rotate right one bit position = 023 (DCS word) we are back where we started.

In this example, you see the same 23-bit DCS word can produce three different valid DCS codes (023, 340 and 766). The true magic here is the mathematically calculated check bits (11 check bits for each valid 23-bit DCS word) are always completely correct for each of these three different valid DCS codes. This multiple matching code example is not true for all 23-bit DCS words. Some 23-bit DCS words only have a single valid DCS code and others can have up to 6 different DCS codes. It all depends on the specific bit pattern in each of the individual 512 decimal 23-bit DCS words.

An alternative way of thinking about these multiple codes coexisting in the same 23-bit DCS word data stream is to think of the 23 bits as simply being shifted in time. As in, each bit takes some amount of time to send and you are simply beginning your look at the 23 bits starting at different times. So, each individual rotation of the 23 bits can be viewed as an individual incremental time window on the repeated 23-bit DCS word data stream. This concept can be helpful because of the way the receiver works with 23-bit DCS words.

A 23-bit DCS word is transmitted as a continuously repeating 23 bit stream of asynchronous serial bits. This brings up the obvious question, "How do you know which bit was sent first?". The answer is there is absolutely no way to tell. The receiver just has to jump into the 23-bit DCS word bit stream, get 23 bits and rotate them around until it finds the 100 signature match. When it finds a 100 signature match and its DCS code is not the one it is looking for, it can just keep rotating the 23 bit DCS word and check for all possible valid DCS codes in that bit stream. Of course it would stop rotating the 23-bit DCS word after 22 rotations. If the receiver cannot find the DCS code it was looking for, then it will not open the receiver squelch.

Again, a DCS 23 bit word is transmitted as a continuously repeating 23-bit stream of asynchronous serial bits. This means there is no explicit signal to synchronize the bit timing between the transmitter and receiver. Some kind of synchronization is required so the receiver can distinguish one bit from the next bit. Asynchronous protocols accomplish this with a fixed bit timing rate. Since the transmitter and receiver both use the same bit timing rate, then each bit can be sent by the transmitter and successfully decoded by the receiver. For DCS, the bit timing rate is 134.3 Hz.

There is nothing in the DCS math that recognizes or knows about signal inversion. More importantly, there is no way for the transmitter to tell the receiver what the correct polarity is to decode its signal. With these assumed "perfect laboratory conditions" where the transmitter and receiver both have the same signal polarity, what we send is what we get. If we Tx a 023 DCS code, we will Rx a 023 DCS code, after the receiver rotates the 23 bits around to find it.

Notice that even though we sent a 023 DCS code, we could also receive it as DCS code 340 or DCS code 766 if we wanted to. This brings up the question, "How do we know which code to use?". The only answer is there seems to be an un-enforced agreement to only use one DCS code when there are multiple possible DCS codes (more on this later). The other matching DCS codes (like 340 or 766) are still there, they are just ignored. This agreement only applies to the so called "standard" set of 83 DCS codes used by the communications industry.

This is all for the "perfect laboratory conditions", now we will dive into the real world. In the real world there is no guarantee that a transmitter and receiver will have the same signal polarity. Unless you are using the exact same manufacturer and model of radios for Tx and Rx, there just might be an unavoidable polarity inversion between them. Let's take a look at what happens when the equipment inverts the DCS 23 bit word polarity:

11101100011-100-000/010/011 = 023 (valid DCS word)
00010011100-011-111/101/100 - inverted 023 DCS word, no 100 signature match in this rotation

You can see the signal inversion of the 023 valid DCS word turned the 100 signature into an invalid 011 bit pattern. This is where the mathematical properties of DCS codes have a surprise waiting. If you rotate the inverted 23-bit DCS word (as in the above example) you will find these three totally different valid DCS codes hiding inside the inverted signal.

11101100000-100-111/000/111 = 707 (inverted 023 word rotated to the first 100 signature match)
10000010011-100-011/111/101 = 375 (inverted 023 word rotated to the second 100 signature match)
00011111101-100-000/100/111 = 047 (inverted 023 word rotated to the third 100 signature match)

This means that any receiver that inverts the DCS polarity can receive the original 023 DCS code as DCS codes 707, 375 or 047. So, if the station at the transmitter tells you it is transmitting DCS code 023 and you program your receiver (which inverts the Tx DCS code) to Rx DCS code 023, it will not match and your squelch will not open. This is where the fiction of positive and negative polarity DCS codes comes about. I called it a fiction because the mathematical model is very clear and has nothing to do with positive or negative polarity. What the positive and negative polarity really means is applying signal inversion to the DCS code. However, when you invert a valid DCS code with the 100 signature match, it always turns it into an invalid 011-signature mismatch (this means a valid 23-bit DCS word is never valid when it is inverted). However, if you start rotating the inverted 23-bit DCS word, you can find other valid DCS codes. The same as before, the 11 check bits are mathematically correct whenever the 100 signature match is found and any particular 23-bit DCS word may have from one to six valid DCS codes inside it. However, the real solution is to re-invert the DCS signal inside the receiver which will recover the original signal polarity DCS code that the transmitter sent (more below).

The most important point is too recognize that the DCS codes are all treated the same way. The math behind the DCS code has no idea if your signal polarity was inverted or not inverted. It only cares about the 100 signature match and having the 11 check bits come out correctly for the received DCS code. We are the ones who care about the signal inversion. When we are told to use a certain DCS code for our radio communications, we want to be able to make that DCS code work correctly.

The typical notation for normal positive signal polarity is +023 and -023 is inverted signal polarity. The "-" in front of the DCS code means the radio hardware has inverted the 23-bit DCS word signal polarity. This inversion means each 1 bit is turned into a zero bit and each zero bit is turned into a 1 bit.

In the above example where your receiver signal polarity is opposite the transmitter signal polarity, you can simply tell your receiver to invert the DCS signal polarity before using it. This inverts the inverted signal, returning it to normal polarity. This is the most common use for DCS polarity. How many people know, remember or even understand that DCS codes 047, 375 or 707 could be used to Rx an inverted 023 DCS code. The answer is you do not have to know. If someone tells you they are using a 023 DCS code to transmit, then you must try both +023 and -023 in your receiver to find out which one will work.

The transmitter also uses DCS signal inversion. When you setup your transmitter DCS code to work with other radios that are already using a DCS code (like 023), it is not practical to make everyone else change their Rx DCS code polarity to match your transmitter. Again, you must try both +023 and -023 transmit DCS codes to find out which polarity works with all the other already programmed receivers.

The problem is there is no way to tell how each and every particular transmitter sends a FM modulated signal. There is also no way to tell how each and every particular receiver FM discriminator circuit decodes the polarity of the received signal. Being able to apply inversion to the transmitted signal and/or inversion to the received signal is the solution to getting a system of different radios to successfully use the same DCS code.

The effect of the so-called DCS polarity is you have what looks like a set of 512 decimal positive codes (+000 to +777 octal) and what looks like a set of 512 decimal negative codes (-000 to -777 octal). In reality this is an illusion because there are really only 512 total DCS codes (000 to 777 octal). In the above example it was pointed out that an inverted 023 DCS code could be received as a 047, 375 or 707 DCS code. All of these codes are positive DCS codes and it is only the inversion of the signal voltages that makes the difference. So, there is not really a positive and negative set of DCS codes. The - simply indicates that the 23 bit DCS word signal has been inverted by your radio's circuitry and inverted DCS signals produce a different set of codes.

There are four unique DCS codes that all match each other when their 23-bit DCS word is rotated, that do not have any inverted polarity matches. They are 112, 250, 505 and 512. When these are inverted, there is no possible 100 signature match in the entire 23-bit DCS word (more on this later).

Lets say we have a receiver that can display the actual DCS code being received. Since there is no way to tell if the receiver polarity matches the transmitter polarity, it means the transmitter could be sending one of two possible codes (except for the four unique 112, 250, 505 and 512 DCS codes which have no inverted match). My receiver DCS display could say +023 or -047 for the same Tx DCS code. If our receiver polarity matches the transmitter polarity, it means the transmitter is sending +023 (without inversion) or -047 (with inversion). However, if our receiver polarity is opposite the transmitter polarity, then it means the transmitter is sending +047 (without inversion) or -023 (with inversion). Since our display told us +023 and -047, we know these Rx DCS codes will work with that transmitter. The real uncertainty here is we do not know which polarity the transmitter has in relation to out receiver, so we do not know exactly which code the transmitter is using. One way to know is if the transmitter and receiver are both the same brand and model of radio (then they match). The other way to know is ask whoever programmed the transmitter which DCS code they are useing.

DCS koodide tuvastamise tarkvara