Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit the code of 4QAM to 16QAM #1

Open
jiajy0427 opened this issue Nov 2, 2021 · 1 comment
Open

edit the code of 4QAM to 16QAM #1

jiajy0427 opened this issue Nov 2, 2021 · 1 comment

Comments

@jiajy0427
Copy link

hi, sir, thank you for your code, is there any possible way I can convert the code of 4QAM to produce modulation of 16QAM?

@TheWirelessClassroom
Copy link
Owner

hi, sir, thank you for your code, is there any possible way I can convert the code of 4QAM to produce modulation of 16QAM?

Hi, yes there is a way, but in fact you have to type in a bit more cases for 16QAM compared to 4QAM.
Basically you have to generate 4 random bits per realization as one 16QAM symbol is represented by 4 bits. The encoder has to be modified for your symbol constellation. An example can be found here https://en.wikipedia.org/wiki/Quadrature_amplitude_modulation#/media/File:Rectangular_constellation_for_QAM.svg
This can be achieved e.g. with a swtich-case environment.

The last part which has to be changed is the demodulator, as you now have more options on demodulation. The most intuitiv approach is to just calculate the eucliadean distance to all codewords and choose the one with the smallest distance (this is known as minimum distance decoding).

I hope my answer was helpful. Please consider liking the video and subscribe to the Youtube channel: https://youtu.be/Q9ox769NEN4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants