BatchDrake / SigDigger

Qt-based digital signal analyzer, using Suscan core and Sigutils DSP library
https://batchdrake.github.io/SigDigger/
GNU General Public License v3.0
925 stars 91 forks source link

Wrong Decoding Simple BPSK Signal #244

Closed ggenny closed 2 months ago

ggenny commented 2 months ago

I am working on a project where I transmit and receive a BPSK signal using a basic transmission device and an RTL-SDR. The signal is modulated at 1000Hz and was recorded with Gqrx. I can decode this signal easily using URH, but I'm having trouble doing the same in SigDigger.

Schermata del 2024-05-07 15-25-58

I have followed the instructional video available at Using SigDigger to inspect a PSK channel, yet I can't get a clear constellation with two distinct points. The points in the constellation are wrong defined and misplaced, which makes me think I might be missing something in the setup or decoding parameters in SigDigger with input generation parameters.

No problem with ASK e FSK Decoding.

gqrx_20240506_203624_433941600_1800000_fc.zip

BatchDrake commented 2 months ago

This is a bursty signal, and the best way to decode it would be from the Time Window (push to capture, etc). I'll try to look into it later today.

El mar., 7 may. 2024 15:59, GGenny @.***> escribió:

I am working on a project where I transmit and receive a BPSK signal using a basic transmission device and an RTL-SDR. The signal is modulated at 1000Hz and was recorded with Gqrx. I can decode this signal easily using URH, but I'm having trouble doing the same in SigDigger.

Schermata.del.2024-05-07.15-25-58.png (view on web) https://github.com/BatchDrake/SigDigger/assets/8070051/54e71a34-148c-4b90-98a7-d7fa05b521c4

I have followed the instructional video available at Using SigDigger to inspect a PSK channel https://www.youtube.com/watch?v=hZHlinV_6mY, yet I can't get a clear constellation with two distinct points. The points in the constellation are wrong defined and misplaced, which makes me think I might be missing something in the setup or decoding parameters in SigDigger with input generation parameters.

No problem with ASK e FSK Decoding.

gqrx_20240506_203624_433941600_1800000_fc.zip https://github.com/BatchDrake/SigDigger/files/15236478/gqrx_20240506_203624_433941600_1800000_fc.zip

— Reply to this email directly, view it on GitHub https://github.com/BatchDrake/SigDigger/issues/244, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEVET55EQLL3UIHN2EEVJ3ZBDM5JAVCNFSM6AAAAABHLCG4OCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI4DGNBUGM3TGMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

BatchDrake commented 2 months ago

I have been fiddling with the .raw file you shared. It looks to me like you are saturating the receiver. Can you repeat the capture but with lower gain / higher distance?

Cheers,

El mar, 7 may 2024 a las 16:02, Gonzalo José Carracedo Carballal (< @.***>) escribió:

This is a bursty signal, and the best way to decode it would be from the Time Window (push to capture, etc). I'll try to look into it later today.

El mar., 7 may. 2024 15:59, GGenny @.***> escribió:

I am working on a project where I transmit and receive a BPSK signal using a basic transmission device and an RTL-SDR. The signal is modulated at 1000Hz and was recorded with Gqrx. I can decode this signal easily using URH, but I'm having trouble doing the same in SigDigger.

Schermata.del.2024-05-07.15-25-58.png (view on web) https://github.com/BatchDrake/SigDigger/assets/8070051/54e71a34-148c-4b90-98a7-d7fa05b521c4

I have followed the instructional video available at Using SigDigger to inspect a PSK channel https://www.youtube.com/watch?v=hZHlinV_6mY, yet I can't get a clear constellation with two distinct points. The points in the constellation are wrong defined and misplaced, which makes me think I might be missing something in the setup or decoding parameters in SigDigger with input generation parameters.

No problem with ASK e FSK Decoding.

gqrx_20240506_203624_433941600_1800000_fc.zip https://github.com/BatchDrake/SigDigger/files/15236478/gqrx_20240506_203624_433941600_1800000_fc.zip

— Reply to this email directly, view it on GitHub https://github.com/BatchDrake/SigDigger/issues/244, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEVET55EQLL3UIHN2EEVJ3ZBDM5JAVCNFSM6AAAAABHLCG4OCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI4DGNBUGM3TGMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Gonzalo José Carracedo Carballal

ggenny commented 2 months ago

Thank you, I tried doing a test from a greater distance (signal modulation at 10k), and I limited the sample to only the part with the signal (a looping sequence 0000000000000000000000000000000000000000001111111111111100011111111111).

Schermata del 2024-05-09 05-32-03

After a few attempts, I succeeded. The sequence Push to Capture -> Low Pass Filter (20k or greater) -> Quadrature Demodulation -> Sampling Phase, Symbol Rate 10k, Gardner clock -40db, the signal is quite clean with the two phases well-defined. In PSK Analysis, I couldn't figure out how to display the two phases, Perhaps the filtering part is missing because with the same Push to Capture parameters, I only have one phase.

Schermata del 2024-05-09 05-52-33

gqrx_20240509_012607_433944400_1800000_fc.zip

BatchDrake commented 2 months ago

Your signal is a bit weird, I must say. Look at the spectrum: a BPSK signal should not look like two separate peaks with that insidious carrier in the middle. This makes the Costas loop for BPSK go nuts, and makes it think the signal is always at phase 0 (which is wrong).

My bet is that you are either:

Captura de pantalla de 2024-05-09 09-47-32

If you see, the (PLL-locked) signal only covers phases from -45º to 45º. It is like symbols are only 90º apart. Perhaps you are using a QPSK modulator to modulate BPSK? It can be done, but you have to use symbols with opposite phase.

Nonetheless, you can still retrieve your signal simply by opening a PSK inspector around one of the peaks, set the Costas to BPSK, and Clock Recovery to Gardner with 10 kbaud:

Captura de pantalla de 2024-05-09 09-50-05

BatchDrake commented 2 months ago

Also, I would spend some time figuring out what is going on with the transmitter. This is what the spectrum of a BPSK signal looks like:

Captura de pantalla de 2024-05-09 10-00-43

Pay special attention to the fact that, since the phase separation is 180º, the whole phase-modulated signal can be represented by a sequence of real numbers (flipping signs as you transition to a different symbol). This makes the spectrum of the signal symmetric. This does not occur with higher-order PSK constellations like QPSK.

ggenny commented 2 months ago

Thank you for the thorough and detailed analysis. It’s clear that the issue lies either in the generation of test samples or in the transmission phase. It’s a very low-cost device, something must have gone wrong.