5. Digital Modulation In this exercise, you will implement digital modulation and maximum likelihood symbol detection for BPSK and QPSK. You are strongly encouraged to build upon the template codes provided at in order to speed your progress (especially in dealing with string variables. Use in the bit mappings specified in Table 1: Table 1: Bit assignments for (a) BPSK and (b) QPSK digital modulation. Input bits MSB, LSEB Symbol 011 +2)/V2 00(-1-j/V2 10 -1 (1-)/V2 (a) Create a function to convert a character string to a sequence of symbols. The inputs should be a character string and an identifier to select a symbol constellation of size 2 (BPSK) or 4 (QPSK); the two outputs should be a list of bits and a list of complex-valued symbols, each of unit magnitude. Study the example template given at Carmen and complete the portions that are left blank (b) Create a function to implement a minimum distance decoder for BPSK and QPSK modula- tion. The inputs should be a complex-valued string of noisy symbols and an identifier to select BPSK or QPSK modulation; the outputs should be a list of detected bits and a character string. (e) Verify that your two functions from steps 5a and 5b work together to properly map characters to bits to symbols and back again. (Save these functions for re-use in suhsequent homework exercises.) I Submit a print-out of your code. And, for the asc string of two characters, "ab, write out all intermediate variables in your code: for char2psk: str binary, bits, a for psk2char: N, tmp, strbin, bits, str 5. Digital Modulation In this exercise, you will implement digital modulation and maximum likelihood symbol detection for BPSK and QPSK. You are strongly encouraged to build upon the template codes provided at in order to speed your progress (especially in dealing with string variables. Use in the bit mappings specified in Table 1: Table 1: Bit assignments for (a) BPSK and (b) QPSK digital modulation. Input bits MSB, LSEB Symbol 011 +2)/V2 00(-1-j/V2 10 -1 (1-)/V2 (a) Create a function to convert a character string to a sequence of symbols. The inputs should be a character string and an identifier to select a symbol constellation of size 2 (BPSK) or 4 (QPSK); the two outputs should be a list of bits and a list of complex-valued symbols, each of unit magnitude. Study the example template given at Carmen and complete the portions that are left blank (b) Create a function to implement a minimum distance decoder for BPSK and QPSK modula- tion. The inputs should be a complex-valued string of noisy symbols and an identifier to select BPSK or QPSK modulation; the outputs should be a list of detected bits and a character string. (e) Verify that your two functions from steps 5a and 5b work together to properly map characters to bits to symbols and back again. (Save these functions for re-use in suhsequent homework exercises.) I Submit a print-out of your code. And, for the asc string of two characters, "ab, write out all intermediate variables in your code: for char2psk: str binary, bits, a for psk2char: N, tmp, strbin, bits, str