1 lab. 3 digital modulation digital modulation: coderdac transmit filter up- conversion channel...
TRANSCRIPT
![Page 1: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/1.jpg)
1
Lab. 3 Digital Modulation
Digital modulation:
Coder DAC Transmitfilter
Up-conversion
ChannelDown-conversion
Receivefilter
ADC Processing Detection Decoder
{1,0,0,1,0,1,...}
{1,0,0,1,0,1,...}
symbolnoise
Baseband equivalent channel model
+
RF
RF
![Page 2: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/2.jpg)
2
Coder (symbol mapper):– Maps the input bits to a symbol (number).
Digital-to-analog converter (DAC)– Convert digital sequence to analogy waveform
Transmit filtering (pulse shaping):– Maps the symbol to an analog waveform.
Receiver filtering (matched filtering)– Match the transmit waveform (noise filtering)
Analog-to-digital conversion (ADC):– Convert analogy waveform to digital sequence (sampling)
Processing/detection– Process and detect the transmit symbol
Decoder:– Demaps the detected symbols to bits
![Page 3: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/3.jpg)
3
Symbol mapping:
Transmit filtering:
Receive filtering:
{1,0,0,1,0,1,...}BPSK
Noise
![Page 4: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/4.jpg)
4
Sampling:
Detection:
Demapping:
{1,0,0,1,0,1,...}
![Page 5: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/5.jpg)
5
Digital equivalent baseband channel model:
Coder (symbol mapping):– PAM (1,3,5,7,..)
– QAM (1/3/5/7,..+j 1/3/5/7)
ComplexChannel h(n)
( ) ( ) ( )I Qa n a n j a n ( ) ( ) ( )I Qy n y n j y n
( ) ( ) ( )y n a n h n
Noise
![Page 6: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/6.jpg)
6
Practice 1:– Generate a 16-QAM mapper (Gray mapping).
– Map a bit sequence with the mappers.
(1110) (1010)(0110)(0010)
(1111) (1011)(0111)(0011)
(1101) (1001)(0101)(0001)
(1100) (1000)(0100)(0000)
* Note: there is no complex operations in C and you have to convert them into real operations
![Page 7: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/7.jpg)
7
We first consider the baseband equivalent system.
Note that the operations of the digital systems can be exactly modeled. However, those of analog systems can only be approximately modeled.
Coder DAC Transmitfilter
Up-conversion
ChannelDown-conversion
Receivefilter
ADC Processing Detection Decoder
{1,0,0,1,0,1,...}
{1,0,0,1,0,1,...}
symbolnoise
Baseband equivalent channel model
+
![Page 8: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/8.jpg)
8
Thus, we conduct simulations all on the digital domain.
This assumes that all the processing in analog domain is either perfect or can be absorbed into the channel and noise effects.
Coder Channel
Processing Detection Decoder
{1,0,0,1,0,1,...}
{1,0,0,1,0,1,...}
symbol
noiseDigital
+
Digital
![Page 9: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/9.jpg)
9
Detection:– Minimum error probability (maximize the posteriori
probability) For PAM:
For QAM:
1 3-1-3
Decision boundary
![Page 10: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/10.jpg)
10
Practice 2– Generate a 16-QAM sequence.
– Add Gaussian noise to have a SNR of 10 dB.
– Check if your generation is right.
Practice 3:– Conduct detection for the QAM symbols.
– Calculate the probability of symbol error.
*Signal power : 4(12+12)/16+8(12+32)/16+4(32+32)/16=10 10log10(10/2)=10 2 =1
* You can write data to a file and use Matlab to plot or calculate.
C: FILE *fp; fp = fopen("noise_r.dat","wb"); fwrite(nr,4,M,fp); fclose(fp);
Matlab:fname=input('Input the file name?');len=input('Input the data length?');fid_1 = fopen(fname,'rb'); x = fread(fid_1,len,'float32'); fclose(fid_1);Length
![Page 11: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/11.jpg)
11
Homework:– Simulate the symbol error rates (SERs) of the 16-QAM
scheme with SNRs of 5dB, 10dB, 15dB, etc such that you can plot a SER curve.
– Calculate the theoretical SERs and also plot a curve.
– Put these two curves in the same figure to see if your simulation results are OK.
Note: you may find that the result is different for different simulation.
![Page 12: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/12.jpg)
rand()– Uniform random variable
– between 0~RAND_MAX
– #include <stdlib.h>
– srand (time(NULL)); //Initialize random seed with system time
– http://www.cplusplus.com/reference/cstdlib/rand/
12
![Page 13: 1 Lab. 3 Digital Modulation Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder](https://reader035.vdocuments.mx/reader035/viewer/2022070415/5697bfe01a28abf838cb3334/html5/thumbnails/13.jpg)
13
Generate Gaussian Noise– Box-Muller method for generating Gaussian distributed
random numbers
– Generate z_1 and z_2 with U(-1,1), which can be done with z = 2y –1, y ~ U(0,1)
– Discard (z_1, z_2) unless r^2 = z_1^2 + z_2^2 1≦
– Consequently, we have