mcandre / rouge

a work in progress BPSK modem
Other
9 stars 1 forks source link

Attempt QPSK #3

Open mcandre opened 4 years ago

mcandre commented 4 years ago

Try to find a set of slope patterns that yield stable, more clear and interesting byte data on PO-32 Tonic backup signals.

mcandre commented 4 years ago

For example, the sinusoid shifted by (2m+1) pi/4, m in [0 = 00b, 1 = 01b, 2 = 10b, 3 = 11b]:

qpsk

Where the BPSK decoder simply tracked the up and down peaks (6 peaks in PO-32 Tonic frames), we may need to buffer and analyze the particular points within the frames.

m is 0 or 1 when a magnitudinous sample begins the frame at a positive value. (The first bit in the pair is 0).

m is 2 or 3 when a magnitudious sample begins the frame at a negative value. (The first bit in the pair is 1).

For bit pairs leading 0, the second bit is 0 when the frame has a (brief) rising trend followed by a falling trend. Otherwise, the second bit is 1.

For bit pairs leading 1, the second bit is 0 when the frame has a (brief) falling trend followed by a rising trend. Otherwise, the second bit is 1.

That should be enough information to yield a byte encoding from an analog QPSK signal.

At that point, we have 4! = 24 possible mappings of the particular QPSK encoding to the four final values, in case for some reason Teenage Engineering uses a slightly different process to produce their QPSK.

So create 24 binary file decodings, run these through a hex dumper, and eyeball them to see if any (praying for an ASCII TE copyright or such) obvious byte data appears.

If not, then we can compare these 24 decodings of the stock configuration, to 24 decodings where the second drum pattern configured active. Expected to have a relatively short difference between one of these pairs of decodings, as we saw when we tried BPSK.

mcandre commented 4 years ago

Would be helpful to accept parameters to specify the bit mapping, in order to flexibly handle alternative QPSK mappings.

mcandre commented 4 years ago

An even easier method would be to scan for "mini" peaks and "macro" peaks. As long as both of these take a regularly bounded magnitude range, should be straightforward to write the QPSK decoder along basic if first peak is mini else if else if... end.

mcandre commented 4 years ago

As one example shows, the QPSK encoding angles are somewhat arbitrary.

qpsk-variants

Let's look at the PO-32 dump and see what the (6-peak window?) angles appear to be.

mcandre commented 4 years ago

psk4bits

Still not entirely convinced the signal is a QPSK. Some examples online show QPSK signals being exceptionally choppy, with gaps between certain bit pairs. But the PO-32 signal is more continuous. No sudden vertical drops.

mcandre commented 4 years ago

Maybe QPSK gaps are smoothed out.

Maybe the digital signal just happens to not begin with a stem, but a complete peak.

Maybe the signal is DBPSK.

mcandre commented 4 years ago

Occasionally, I do seem some mutant peaks, where the center sample is an innie belly button rather than an outie.

Screen Shot 2020-08-13 at 11 51 00 PM

Maybe they're just noise.

Maybe these are the mutant mini peaks of a QPSK. If so, they should only ever appear at the start or end of a full symbol window.

mcandre commented 4 years ago

Also noticing tiny jumps along the way, where a sample appears to lurch suddenly toward a peak, faster than the local trend would progress.

Screen Shot 2020-08-13 at 11 58 30 PM

Could just be poor audio resolution in the PO-32 or the TASCAM.

This can happen by itself, or in concert with the innie belly buttons mentioned earlier.