Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lab. 3 Digital Modulation  Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder.

Similar presentations


Presentation on theme: "1 Lab. 3 Digital Modulation  Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder."— Presentation transcript:

1 1 Lab. 3 Digital Modulation  Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder {1,0,0,1,0,1,...} symbol noise Baseband equivalent channel model + RF

2 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

3 3  Symbol mapping:  Transmit filtering:  Receive filtering: {1,0,0,1,0,1,...} BPSK Noise

4 4  Sampling:  Detection:  Demapping: {1,0,0,1,0,1,...}

5 5  Digital equivalent baseband channel model:  Coder (symbol mapping): –PAM (  1,  3,  5,  7,..) –QAM (  1/  3/  5/  7,..+j  1/  3/  5/  7) Complex Channel h(n) Noise

6 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

7 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. CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder {1,0,0,1,0,1,...} symbol noise Baseband equivalent channel model +

8 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 ProcessingDetectionDecoder {1,0,0,1,0,1,...} symbol noise Digital +

9 9  Detection: –Minimum error probability (maximize the posteriori probability)  For PAM:  For QAM: 1 3 -3 Decision boundary

10 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(1 2 +1 2 )/16+8(1 2 +3 2 )/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

11 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.

12  rand() –Uniform random variable –between 0~RAND_MAXRAND_MAX –#include –srand (time(NULL)); //Initialize random seed with system time –http://www.cplusplus.com/reference/cstdlib/rand/ 12

13 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


Download ppt "1 Lab. 3 Digital Modulation  Digital modulation: CoderDAC Transmit filter Up- conversion Channel Down- conversion Receive filter ADC ProcessingDetectionDecoder."

Similar presentations


Ads by Google