It was mostly the fact that Simulink couldn't handle the computation for the transmitter/receiver on a single PC (I think!) that was causing my synchronization woes.
When I moved it to a second computer for the receiver, the constellation got a lot better (no more (0,0i) points). The synchronization issues at the receiver were handled using 3 different blocks:
- A coarse frequency estimator and frequency offset to try and correct for the inaccuracies of the ADALM-Pluto internal oscillator. This made the constellation rotate a little less around the origin.
- A carrier synchronizer configured for BPSK and for the correct oversampling factor. This concentrated the constellation to the real axis, but didn't have the "two dot" shape at -1 and +1.
- A symbol synchronizer block to sample the symbol at the correct phase. This finally gave me my final constellation with two circular points at +/-1, as expected for BPSK.
The rest of the synchronization was for the binary frame itself, in order to detect when it started. For this reason, I started my data frame with a 13bit barker code, which has the characteristic of having an auto-correlation value of 13 when and only when it has a zero sample offset. So, at the receiver, I made sure to capture a number of samples equal to the length of two whole frames. This ensured that I had at least a complete frame in every capture. Then, I simply ran a correlation on the captured data and a 13bit barker code, and measured where it was equal to 13 (or close to, because my symbols weren't perfect +/-1). You can do this with a Preamble Detector block in Simulink, which returns the index of the end of the detected preamble. Then, it was only a question of extracting the data from the frame and
VoilĂ ! My simple BPSK ASCII transceiver was complete!
I still have a bit of an issue at the moment though. There is a phase ambiguity because of the PLLs used for synchronization (the synchronization is valid for both pi and 0 degrees in BPSK). The effect is that sometimes, all the bits in my frame are flipped, so instead of receiving 001101, I would receive 110010. I'll get back in touch if I find an elegant solution
P.S.: This will be used as an introductory project for students at Uni, so I don't think I'm allowed to share my files. That being said, if you're working on something similar and are having some issues, please don't hesitate to get in touch! I couldn't find a lot of info on how to do this with BPSK rather than QPSK.
Cheers