16 May 2016

phase keyed signals, SA, and fake demodulations

Playing with a STANAG-4285 signal and SA (Signals Analayzer) I met some problems in understanding correctly the synchronization sequence pattern of this waveform: the solution is very simple indeed and must be sought in the way the SA phase-plane module demodulator works. Below the story.
 
SA phase-plane demodulating a STANAG-4285 signal
 "The synchronization phase of the STANAG-4285 waveform consists of 80 symbols and is transmitted recurrently every 106.6 ms. This sequence uses 2-bit phase shift keying (2-PSK) modulation and the modulation rate is equal to 2400 bauds. The sequence is identical to a pseudorandom sequence of length 31, which is repeated periodically within the 80-symbol window, i.e., the synchronization sequence consists of 2 periods of length 31 plus the first 18 symbols of another period. A generator for the synchronization sequence is described in pic. 1. The generator polynomial is: x^5 + x^2 +1.
At the beginning of every frame the generator is initially set to the following value: 11010. The first symbol of the synchronization sequence is identical to the least significant bit of this initial value. The remaining 79 symbols are obtained by applying the clock 79 times.
The scrambling operation is carried out on reference and data symbols only, not on the synchronization sequence."
pic. 1 - S-4285 sync sequence generator
Coding into 8-ary is achieved by mapping one-bit to one-symbol according to the following rule in pic. 2: "000" for bit "0" (symbol 0) and "100" for bit "1" (symbol 4)
pic. 2 - coding 04
Such sync sequence generator can be simulated running a simple Lua program: since the sync sequence is not subjected to the scrambling, the output file generated by the program is just the STANAG-4285 sync sequence that we want. The pattern of the sync sequence is visible using the BEE bitstream analyzer (pic. 3).

pic. 3 - sync sequence pattern (mapping 0-4)
Curiously, looking at a real world STANAG-4285 signal demodulated by SA phase-plane, its 80 symbols sync sequence has a different pattern than the one expected (pic. 4)

pic. 4 - sync sequence pattern of a S4285 real-world signal
Inspecting the same sync sequence of a STANG-4285 modem, an orignal and clean signal, things seem even worse (pic. 5)
pic. 5 - sync sequence pattern of a S4285 modem
  
The interesting matter is that editing the mapBit() function of the Lua code as below:
  
local function mapBit(Ubit)
   if (Ubit == "0") then 
      8ary_symbol = {"1","1","1"} -- # symbol number 7
   else  
      8ary_symbol = {"0","1","1"} -- # symbol number 3
   end
    return 8ary_symbol
end

we can get the same sync sequence pattern of the modem sample just by using the mapping 7-3 rather than 0-4, which is equivalent to add a negative π/4 phase rotation to the original mapping 0-4 (pics 6,7)

pic. 6
 
pic. 7
Same conclusions for the over-the-air (real world) STANAG-4285 signal: in this case the used mapping is 4-0, equivalent to a π phase rotation or phase opposition (pics 8,9)

local function mapBit(Ubit)
   if (Ubit == "0") then 
      8ary_symbol = {"1","0","0"} -- # symbol number 4
   else  
      8ary_symbol = {"0","0","0"} -- # symbol number 0
   end
    return 8ary_symbol
end
pic. 8
pic. 9
The reason of the above incongruencese between the expected pattern and the obtained ones,  is very simple: SA is a signal analyzer and not a decoder (and I had forgotten!).
Being part of an analyzer, the SA phase-plane module uses a sort of "universal demodulator" that does not match  any particular protocol to exactly sync its demodulator, as it happens instead in STANAG-4285  (for example) "suited" decoders such as Sorcerer, Sigmira and many others. In other words, SA  phase-plane demodulator is not synchronized with the waveform being analyzed and the resulting phase-offset may cause different (fake) results for the same waveform. So, the more the phase values, the more the variants that the demodulator produces: for example, in case of a π/4 DQPSK modulation  24 different decodings are possible, and it isn't surely the worst case. 
Working phase keyed signals, the SA phane-plane demodulator produces correct interpretations and view under a "quantitative" profile (number of phases, angles, modulation speed, carrier frequency,...) but uncertain results under a qualitative (demod) one.

No comments:

Post a Comment