Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:eval:user-guides:ad-fmcomms2-ebz:software:datafiles [21 Oct 2013 23:24] – save Di Puresources:eval:user-guides:ad-fmcomms2-ebz:software:datafiles [27 Jan 2021 22:20] (current) – use wp> interwiki links Robin Getz
Line 1: Line 1:
-~~UNDERCONSTRUCTION~~under construction+====== AD-FMCOMMS2/3/4 Datafiles ======
  
-====== Introduction ======+<WRAP round important 65%> 
 +This is work in progress, and is not yet 100% complete. 
 +</WRAP>
  
-In this section, we provide the reference data files of several frequently used digital baseband modulation schemes and their corresponding Simulink models. With these data files, you are ready to transmit them using FMComms2 and test your board. By changing the given Simulink models, you can easily generate your own data files.+In this section, we provide the reference data files of several frequently used digital baseband modulation schemes and their corresponding Simulink models. With these data files, you are ready to transmit them using the AD9361 found on the FMComms2 / FMComms3 and test your board. By changing the given Simulink models, you can easily generate your own data files.
  
 <WRAP round info 65%> <WRAP round info 65%>
Line 12: Line 14:
   * DSP System Toolbox Version 8.5                                                             * DSP System Toolbox Version 8.5                                                          
 </WRAP> </WRAP>
 +
 +===== Data transfer =====
 +
 +Once files have been created by MATLAB/Simulink, they can be [[/resources/tools-software/linux-software/zynq_images#accessing_files|transferred to the target]].
 +
  
 ===== QPSK ===== ===== QPSK =====
Line 17: Line 24:
 PSK is one type of the phase modulation (PM) schemes. In this section, two flavors of QPSK data are generated, one with raised cosine pulse shaping filters, and the other one without. PSK is one type of the phase modulation (PM) schemes. In this section, two flavors of QPSK data are generated, one with raised cosine pulse shaping filters, and the other one without.
  
-Since we would like to transmit the QPSK at a sample rate of 20M Symbols/s with AD-FMCOMMS2, the sample time specified in "Random-Integer Generator" block is 1/(20e6). The users can specify their own sample rate.+Since we would like to transmit the QPSK at a sample rate of 20M Symbols/s with AD9361, the sample time specified in "Random-Integer Generator" block is 1/(20e6). The users can specify their own sample rate.
  
 ==== QPSK without Pulse Shaping ==== ==== QPSK without Pulse Shaping ====
Line 36: Line 43:
  
 === Data === === Data ===
 +<WRAP round info 65%>
 +Once the transmitted signals are in workspace, we use the following two lines to write them to a text file:
 +
 +<code matlab>
 +newdata = [I1 Q1 I2 Q2];
 +
 +dlmwrite('qpsk.txt',newdata,','); 
 +</code>
 +
 +You open this text file and manually add the word "TEXT" at the very beginning, and then save the file.
 +                                                        
 +</WRAP>
 +
 +
 <WRAP round download 80%> <WRAP round download 80%>
 You can download the generated data from below: You can download the generated data from below:
Line 56: Line 77:
 === Model === === Model ===
  
-The figure below shows a QPSK transmission model with the pulse shaping filters. Since pulse shaping filters are often distributed as a matched pair between transmitter and receiver, we use the filter shape of ‘Square root’(([[http://en.wikipedia.org/wiki/Root-raised-cosine_filter|Root-raised-cosine filter]])).+The figure below shows a QPSK transmission model with the pulse shaping filters. Since pulse shaping filters are often distributed as a matched pair between transmitter and receiver, we use the filter shape of ‘Square root’(([[wp>Root-raised-cosine_filter|Root-raised-cosine filter]])).
  
 {{QPSKwithfilter.png?900|Subsystem diagram}}   {{QPSKwithfilter.png?900|Subsystem diagram}}  
Line 85: Line 106:
 <WRAP round download 80%> <WRAP round download 80%>
 You can download the generated data from below: You can download the generated data from below:
-  * {{qpskwithfilt_30.72mdata.zip}}+  * {{qpskwithfilt_txt.zip}}
 The data rate is 30.72 MSPS.   The data rate is 30.72 MSPS.  
  
Line 93: Line 114:
 ==== Data Verification ==== ==== Data Verification ====
  
-Since there is no match filter on FMCOMMS2 receive path, the data obtained from FMCOMMS2 receiver side does not show the constellation of QPSK clearly. Therefore, by looking at the ADI IIO Oscilloscope(([[http://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/linux/applications/iio_scope|ADI IIO Oscilloscope]])).it is difficult to see whether the received data is valid or not, as shown in the figure below. +Before you look at the IIO Oscilloscope (([[/resources/tools-software/linux-software/iio_oscilloscope|ADI IIO Oscilloscope]])), make sure the sampling rate of ADC and DAC is set at 30.72 MSPS, as shown in the figure below. Otherwise, it may incur some problems. In this panel, there are quite a few other parameters you can tune (DCXO, RF Bandwidth, LO Frequency), in order to get the optimal transmission and reception performance for your system.
  
-{{qpsk_osc.png?600}}+{{iiosetting_new.png?500}} 
 + 
 +<WRAP round info 80%> 
 +The DCXO setting can be different from board to board. You are suggested to find a proper setting using signal generator and spectrum analyzer in the lab.                                                                     
 +</WRAP> 
 + 
 +Since there is no match filter on AD9361 receive path, the data obtained from AD9361 receiver side does not show the constellation of QPSK clearly. Therefore, by simply looking at the ADI IIO Oscilloscope, it is difficult to see whether the received data is valid or not, as shown in the figure below.  
 + 
 +{{qpsk_osc_new.png?500}}
  
 However, with the ''save data'' function of the IIO application, we can now save the received data in MATLAB compatible format (.mat file), let the data pass through a match filter in Simulink, and then verify whether the received data is a QPSK or not. The ''save data'' function can be accessed via "File"-"Save As", as shown in the figure below. There are several data formats available. Since we want the data to be used in MATLAB, we will pick up the .mat format.   However, with the ''save data'' function of the IIO application, we can now save the received data in MATLAB compatible format (.mat file), let the data pass through a match filter in Simulink, and then verify whether the received data is a QPSK or not. The ''save data'' function can be accessed via "File"-"Save As", as shown in the figure below. There are several data formats available. Since we want the data to be used in MATLAB, we will pick up the .mat format.  
  
-{{savedata.png?600}}+{{savedata.png?450}}
  
-Before you save the data, make sure the sampling rate of ADC and DAC is set properly. In this example, we  
-set the sample rate of ADC and DAC 2 times of the generated data rate (30.72 MSPS), which is 61.44 MSPS shown in the figure below. In this panel, there are quite a few other parameters you can tune, in order to get the optimal transmission and reception performance for your system. 
  
-{{iiosetting.png?600}} 
  
 Given the received data, we can now proceed to the Simulink receiver model to verify the data. After you launch MATLAB and the receiver model ''qpsk_receiver.slx'', the next step is to load the .mat file in workspace, because the ''Signal From Workspace'' blocks use the data as input. Given the received data, we can now proceed to the Simulink receiver model to verify the data. After you launch MATLAB and the receiver model ''qpsk_receiver.slx'', the next step is to load the .mat file in workspace, because the ''Signal From Workspace'' blocks use the data as input.
-In this model, the data rate is the same as the generated data rate (30.72 MSPS), and the receive filter is the match of the transmit filter. When looking at the IIO scope, we found the received signal from FMCOMMS2 shows a 45 degree rotation compared to the transmitted signal, so a ''Phase/Frequency Offset'' block is employed here to compensate for the phase offset. According to the constellation plot, it is very clear that the received data is a QPSK, so the FMCOMMS2 Tx/Rx chain gets verified.+In this model, the data rate is the same as the generated data rate (30.72 MSPS), and the receive filter is the match of the transmit filter. When looking at the IIO scope, we found the constellation of the received signal from the AD9361 shows a rotation compared to the transmitted signal, so a ''Phase/Frequency Offset'' block is employed here to compensate for the phase offset. The value of the phase offset is calculated in Simulink Callbacks. According to the constellation plot below, it is very clear that the received data is a QPSK, so the AD9361 Tx/Rx chain gets verified.
  
-{{qpsk_waveform_verify.png?700}}+{{qpsk_waveform_verify_new.png?450}}
  
  
 <WRAP round download 80%> <WRAP round download 80%>
 You can download the saved mat data file from below: You can download the saved mat data file from below:
-  * {{qpsk_3072.zip}}  +  * {{qpskwithfilt_mat.zip}}  
  
 You can download the receiver model from below: You can download the receiver model from below:
-  * {{qpsk_receiver.zip}}  +  * {{qpsk_receiver_new.zip}} 
 + 
 +Make sure you load the mat data file in the workspace first. Otherwise, the model will not run.   
 The data rate is defined in the parameter ''Fs'' and the phase offset is defined in the parameter ''PhaseOffset''. The data rate is defined in the parameter ''Fs'' and the phase offset is defined in the parameter ''PhaseOffset''.
 </WRAP> </WRAP>
Line 125: Line 154:
   * Make the data rate consistent in data generation and receiver.   * Make the data rate consistent in data generation and receiver.
   * Set the IIO parameters properly, such as ADC and DAC sample rate.   * Set the IIO parameters properly, such as ADC and DAC sample rate.
-  * Compensate for the phase offset occurred in FMCOMMS2.+  * Compensate for the phase offset occurred in AD9361.
 </WRAP> </WRAP>
  
Line 155: Line 184:
 ==== Data Verification ==== ==== Data Verification ====
  
-Since there is no match filter on FMCOMMS2 receive path, the data obtained from FMCOMMS2 receiver side does not show a clear constellation of 16-QAM. Actually, since the order of 16-QAM is higher than that of QPSK in the previous section, the constellation here is even more noisy compared to QPSK, as shown in the figure below. +Since there is no match filter on AD9361 receive path, the data obtained from AD9361 receiver side does not show a clear constellation of 16-QAM. Actually, since the order of 16-QAM is higher than that of QPSK in the previous section, the constellation here is even more noisy compared to QPSK, as shown in the figure below. 
  
 {{qam16.png?600}} {{qam16.png?600}}
Line 167: Line 196:
  
  
-Given the received data, we can now proceed to the Simulink receiver model to verify the data. After you launch MATLAB and the receiver model ''qam16_receiver.slx'', the next step is to load the .mat file in workspace, because the ''Signal From Workspace'' blocks use the data as input. In this model, the data rate is the same as the generated data rate (20 MSPS), and the receive filter is the match of the transmit filter. When looking at the IIO scope, we found the received signal from FMCOMMS2 shows a 45 degree rotation compared to the transmitted signal, so a ''Phase/Frequency Offset'' block is employed here to compensate for the phase offset. According to the constellation plot, it is very clear that the received data is a 16-QAM, so the FMCOMMS2 Tx/Rx chain gets verified.+Given the received data, we can now proceed to the Simulink receiver model to verify the data. After you launch MATLAB and the receiver model ''qam16_receiver.slx'', the next step is to load the .mat file in workspace, because the ''Signal From Workspace'' blocks use the data as input. In this model, the data rate is the same as the generated data rate (20 MSPS), and the receive filter is the match of the transmit filter. When looking at the IIO scope, we found the received signal from AD9361 shows a 45 degree rotation compared to the transmitted signal, so a ''Phase/Frequency Offset'' block is employed here to compensate for the phase offset. According to the constellation plot, it is very clear that the received data is a 16-QAM, so the AD9361 Tx/Rx chain gets verified.
  
 {{qam16_verified.png?700}} {{qam16_verified.png?700}}
Line 179: Line 208:
 ===== MSK ===== ===== MSK =====
  
-MSK stands for minimum shift keying. It is one type of the continuous phase modulation (CPM) schemes (([[http://en.wikipedia.org/wiki/Minimum-shift_keying|Minimum-shift keying]])). In this section, we use "MSK Modulator Baseband" block to modulate the input random binary bits. In other words, the input is either 0 or 1.+MSK stands for minimum shift keying. It is one type of the continuous phase modulation (CPM) schemes (([[wp>Minimum-shift_keying|Minimum-shift keying]])). In this section, we use "MSK Modulator Baseband" block to modulate the input random binary bits. In other words, the input is either 0 or 1.
 ==== Model ==== ==== Model ====
  
Line 204: Line 233:
 ==== Data Verification ==== ==== Data Verification ====
  
-Since there is no match filter on FMCOMMS2 receive path, the data obtained from FMCOMMS2 receiver side does not show a clear constellation of MSK signals, as shown in the figure below. However, it matches the "Rx Without Receive Filter" plot from Simulink.+Since there is no match filter on AD9361 receive path, the data obtained from AD9361 receiver side does not show a clear constellation of MSK signals, as shown in the figure below. However, it matches the "Rx Without Receive Filter" plot from Simulink.
  
 {{msk_osc.png?600}} {{msk_osc.png?600}}
Line 215: Line 244:
 </WRAP> </WRAP>
  
-Given the received data, we can now proceed to the Simulink receiver model to verify the data. After you launch MATLAB and the receiver model ''msk_receiver.slx'', the next step is to load the .mat file in workspace, because the ''Signal From Workspace'' blocks use the data as input. In this model, the data rate is the same as the generated data rate (20 MSPS), and the receive filter is the match of the transmit filter. According to the constellation plot, it is very clear that the received data is a MSK, so the FMCOMMS2 Tx/Rx chain gets verified.+Given the received data, we can now proceed to the Simulink receiver model to verify the data. After you launch MATLAB and the receiver model ''msk_receiver.slx'', the next step is to load the .mat file in workspace, because the ''Signal From Workspace'' blocks use the data as input. In this model, the data rate is the same as the generated data rate (20 MSPS), and the receive filter is the match of the transmit filter. According to the constellation plot, it is very clear that the received data is a MSK, so the AD9361 Tx/Rx chain gets verified.
  
 {{msk_receiver.png?700}} {{msk_receiver.png?700}}
Line 237: Line 266:
 The figure below shows a LTE example according to the specifications developed by the Third Generation Partnership Project (3GPP). It highlights only the downlink physical channel (PDSCH) processing.  In order to obtain the transmitted data, we add a “Signal to Workspace” block on the transmitter side (circled in red). By double clicking the "Model Parameters" block, we can change the model settings such as channel bandwidth, antenna configuration and etc. The figure below shows a LTE example according to the specifications developed by the Third Generation Partnership Project (3GPP). It highlights only the downlink physical channel (PDSCH) processing.  In order to obtain the transmitted data, we add a “Signal to Workspace” block on the transmitter side (circled in red). By double clicking the "Model Parameters" block, we can change the model settings such as channel bandwidth, antenna configuration and etc.
  
-Since LTE is a sophisticated standard, you are encouraged to read the Help Document of this example and its related references to get more information (([[http://www.mathworks.com/help/comm/examples/lte-phy-downlink-with-spatial-multiplexing.html|LTE PHY Downlink with Spatial Multiplexing]])).+Since LTE is a sophisticated standard, you are encouraged to read the Help Document of this example and its related references to get more information (([[mw>help/comm/examples/lte-phy-downlink-with-spatial-multiplexing.html|LTE PHY Downlink with Spatial Multiplexing]])).
  
 {{LTE.png?900|Subsystem diagram}} {{LTE.png?900|Subsystem diagram}}
  
-After you run the model, the transmitted data named "Tx" will be saved in workspace. Since it is a Nx2 complex vector, we need to do some processing on it to make the data format compatible with FMComms2 transmission.    +After you run the model, the transmitted data named "Tx" will be saved in workspace. Since it is a Nx2 complex vector, we need to do some processing on it to make the data format compatible with AD9361 transmission.    
  
 <WRAP round download 80%> <WRAP round download 80%>
Line 248: Line 277:
 </WRAP> </WRAP>
  
-When the data is transmitted and received by real-world hardware, like FMComms2, it is difficult to observe the clear constellation without proper synchronization techniques. However, even with the basic settings, you are still expected to observe the transmit and receive spectrum, which is similar to the following:+When the data is transmitted and received by real-world hardware, like AD9361 , it is difficult to observe the clear constellation without proper synchronization techniques. However, even with the basic settings, you are still expected to observe the transmit and receive spectrum, which is similar to the following:
  
 {{LTEspectrum.png}} {{LTEspectrum.png}}
resources/eval/user-guides/ad-fmcomms2-ebz/software/datafiles.1382390691.txt.gz · Last modified: 21 Oct 2013 23:24 by Di Pu