|
6 | 6 | addpath(genpath('WARPLab-Matlab-Wrapper')) |
7 | 7 | addpath(genpath('Power-Amplifier-Model')) |
8 | 8 |
|
9 | | -rms_input = 0.20; |
| 9 | +rms_input = 0.50; |
10 | 10 |
|
11 | 11 | % Setup the PA simulator or TX board |
12 | | -PA_board = 'WARP'; % either 'WARP', 'webRF', or 'none' |
| 12 | +PA_board = 'webRF'; % either 'WARP', 'webRF', or 'none' |
13 | 13 | switch PA_board |
14 | 14 | case 'WARP' |
15 | 15 | warp_params.nBoards = 1; % Number of boards |
|
20 | 20 | board = PowerAmplifier(7, 4); |
21 | 21 | Fs = 40e6; % WARP board sampling rate. |
22 | 22 | case 'webRF' |
23 | | - board = webRF(); |
| 23 | + dbm_power = -26; |
| 24 | + board = webRF(dbm_power); |
24 | 25 | Fs = 200e6; % webRF sampling rate. |
25 | 26 | end |
26 | 27 |
|
27 | 28 | % Setup OFDM |
28 | | -ofdm_params.nSubcarriers = 300; |
| 29 | +ofdm_params.nSubcarriers = 600; |
29 | 30 | ofdm_params.subcarrier_spacing = 15e3; % 15kHz subcarrier spacing |
30 | 31 | ofdm_params.constellation = 'QPSK'; |
31 | 32 | ofdm_params.cp_length = 144; % Number of samples in cyclic prefix. |
|
38 | 39 | tx_data = normalize_for_pa(upsampled_tx_data, rms_input); |
39 | 40 |
|
40 | 41 | % Setup DPD |
41 | | -dpd_params.order = 7; |
42 | | -dpd_params.memory_depth = 3; |
43 | | -dpd_params.nIterations = 3; |
| 42 | +dpd_params.order = 11; |
| 43 | +dpd_params.memory_depth = 4; |
| 44 | +dpd_params.nIterations = 2; |
44 | 45 | dpd_params.block_size = 50000; |
| 46 | + |
| 47 | +dpd_params.use_conj = 1; |
| 48 | +dpd_params.use_dc_term = 1; |
| 49 | +conj_dpd = ILA_DPD(dpd_params); |
| 50 | + |
| 51 | +dpd_params.use_conj = 0; |
| 52 | +dpd_params.use_dc_term = 0; |
45 | 53 | dpd = ILA_DPD(dpd_params); |
46 | 54 |
|
47 | 55 | %% Run Expierement |
48 | 56 | w_out_dpd = board.transmit(tx_data); |
| 57 | +conj_dpd.perform_learning(tx_data, board); |
| 58 | +w_conj_dpd = board.transmit(conj_dpd.predistort(tx_data)); |
| 59 | + |
49 | 60 | dpd.perform_learning(tx_data, board); |
50 | 61 | w_dpd = board.transmit(dpd.predistort(tx_data)); |
51 | 62 |
|
52 | 63 | %% Plot |
53 | 64 | plot_results('psd', 'Original TX signal', tx_data, 40e6) |
54 | 65 | plot_results('psd', 'No DPD', w_out_dpd, 40e6) |
55 | | -plot_results('psd', 'With DPD', w_dpd, 40e6) |
| 66 | +plot_results('psd', 'With Normal DPD', w_dpd, 40e6) |
| 67 | +plot_results('psd', 'With Conjug DPD', w_conj_dpd, 40e6) |
56 | 68 |
|
57 | 69 | %% Some helper functions |
58 | 70 | function out = up_sample(in, Fs, sampling_rate) |
|
0 commit comments