WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-May-20 04:02:44

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Problems for WARPLab with WARP v3 and v2 platforms

Hi,

We have used WARPLab 6 to implement an SISO OFDM transceiver with WARP v2 and v3 platforms. The OFDM bandwidth is 5 MHz, subcarrier number N is 256, and QAM modulation is used.

For WARP v2 platforms, the performance is good and the constellations of the received signal are shown as follows.

http://csp.ee.cgu.edu.tw/Labweb/image_files/shapeimage_1.png

However, for WARP v3 platforms, the constellations of the received signal have some scattered (distortion) points, shown below. And we found that the subcarriers of these scattered points are always located at +/- 10 subcarrier around the DC subcarrier (n=0);

http://csp.ee.cgu.edu.tw/Labweb/image_files/shapeimage_3.png

The MATLAB programs (.m file) used for WARP v2 and v3 platforms are the same. So, we think maybe the FPGA of WARPLab6 for WARP v3 platform may produce some distortions around the DC. And we found that the FPGAs of WARPLab6 for WARP v2 and v3 platforms have some differences.


For WARP v2 platform:
http://csp.ee.cgu.edu.tw/Labweb/image_files/shapeimage_2.png



For WARP v3 platform:
http://csp.ee.cgu.edu.tw/Labweb/image_files/shapeimage_4.png


Could this be the reason that produces the distortion points for the WARP v3 platforms?
Or are there some another reasons?
What could we do to avoid these distortions for the WARP v3 platforms?


PS. We also used WARPLab 7 for the WARP v2 platforms to implement the same OFDM tranceiver system.
The same scattered points of the received constellations were generated.
But WARPLab 6 for the WARP v2 platforms would not produce these scattered points in the received constellations.

Last edited by oyyuan (2014-May-20 04:49:14)

Offline

 

#2 2014-May-20 11:37:55

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Problems for WARPLab with WARP v3 and v2 platforms

Are you using AGC at the Rx nodes? Are the nodes connected by cable+attenuator or over-the-air?

Debugging PHY designs from constellations is hard- I would suggest eliminating as many variables as possible (especially unpredictable ones like the a wireless propagation channel) to isolate the underlying cause.

Offline

 

#3 2014-May-21 07:38:49

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Re: Problems for WARPLab with WARP v3 and v2 platforms

We did not using the AGC at the RX nodes and we connected the nodes by cable+ attenuator to eliminating the wireless channel effects.

We use the same transmit data for WARPLab TX nodes and the same MATLAB (.m) file to demodulate the signals. So from the mechanism of WARPLab, the demodulation results should be the same for WARP v2 and WARP v3 platforms. But some distortions come when we use WARP v3 platforms.   

After many checks, It seems that if we use the WARPLab FPAG for WARP v3 platform, the distortion around the DC subcarrier would appear. Would these distortion really come from the  WARPLab FPAG for WARP v3 platform, which we mentioned in the first post? Or there is another possible reason.

Offline

 

#4 2014-May-22 09:14:00

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Problems for WARPLab with WARP v3 and v2 platforms

After many checks, It seems that if we use the WARPLab FPAG for WARP v3 platform, the distortion around the DC subcarrier would appear. Would these distortion really come from the  WARPLab FPAG for WARP v3 platform, which we mentioned in the first post? Or there is another possible reason.

Can you expand on this- what were the degradations near DC? What is your subcarrier spacing (bandwidth / num subcarriers)? Is the DC subcarrier always zero? Can you isolate the issue to a Tx or Rx path, perhaps by using a WARP v2 - v3 link and running the experiment in both directions?

The only thing I can think that is related to degradations around DC would be the Rx high pass filter in the MAX2829. The filter bandwidth is controlled by the RXHP signal on the MAX2829. When RXHP=1 the corner frequency is 600kHz; when RXHP=0 it is 30kHz. The RXHP signal should be asserted any time the Rx gains change to avoid large DC transients being fed to the I/Q outputs. The AGC core handles this- it asserts RXHP while changing gains, then de-asserts for the rest of the reception. I'm actually not sure how RXHP is set in manual gain control mode. I'll look into this today.

Offline

 

#5 2014-May-23 04:18:00

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Re: Problems for WARPLab with WARP v3 and v2 platforms

Can you expand on this- what were the degradations near DC? What is your subcarrier spacing (bandwidth / num subcarriers)? Is the DC subcarrier always zero? Can you isolate the issue to a Tx or Rx path, perhaps by using a WARP v2 - v3 link and running the experiment in both directions?

We have tested the experiment of a WARP v2 - v3 link the in both directions. For WARP v3 as transmitter and WARP v2 as receiver, the constellations of the received signals are good. No degradation occurs. However, if we use WARP v2 as transmitter and WARP v3 as receiver, the degradation occurs. So the degradation might come from the RX path of the WARP v3 platform when we are using WARPLab.

The OFDM system we use in our experiment has the bandwidth of 5 MHz, 256 subcarriers, and QAM modulation. The DC subcarrier is always set to zero and the AGC is not used.

The only thing I can think that is related to degradations around DC would be the Rx high pass filter in the MAX2829. The filter bandwidth is controlled by the RXHP signal on the MAX2829. When RXHP=1 the corner frequency is 600kHz; when RXHP=0 it is 30kHz.  ....

It seems be the reason for our problem. because the bandwidth of the subcarrier in our OFDM system is about 19.5 KHz, and the degradation always occurs  at the +/- 15 subcarriers around the DC subcarrier. Would the WARPLab 6 FPGA for WARP v3 set RXHP=1 (the corner frequency is 600kHz) in manual gain control mode? And the WARPLab 6 FPGA for WARP v2 set RXHP=0 (the corner frequency is 30kHz), so the degradation does not occur.


P.S. The same degradation occurs in WARPLab 7 whether we use WARP v2 or WARP v3 platforms.

Last edited by oyyuan (2014-May-23 04:30:49)

Offline

 

#6 2014-May-23 09:55:32

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Problems for WARPLab with WARP v3 and v2 platforms

bandwidth of 5 MHz, 256 subcarriers,

Ah- that could be an issue. I would suggest leaving more than 1 19kHz subcarrier empty around DC. The MAX2829 is designed for 802.11-like systems, and works best when 1 315kHz subcarrier (20MHz / 64 subcarriers) is zero at DC.

It seems be the reason for our problem. because the bandwidth of the subcarrier in our OFDM system is about 19.5 KHz, and the degradation always occurs  at the +/- 15 subcarriers around the DC subcarrier. Would the WARPLab 6 FPGA for WARP v3 set RXHP=1 (the corner frequency is 600kHz) in manual gain control mode? And the WARPLab 6 FPGA for WARP v2 set RXHP=0 (the corner frequency is 30kHz), so the degradation does not occur.

It looks like WARPLab 7 does not explicitly set RXHP in manual gain control mode, and that we did not implement an m-code method for setting it.

It's a simple C code change to control the state of RXHP. In wl_interface.c, find the "case IFC_RX_GAIN_CTRL_SRC" clause and add "radio_controller_setRxHP(RC_BASEADDR, (rfsel), RC_RXHP_OFF);" to the manual gain control mode:

Code:

case IFC_RX_GAIN_CTRL_SRC:
	rfsel =  Xil_Ntohl(cmdArgs32[0]);
	agc_en = Xil_Ntohl(cmdArgs32[1]) & 0x1;

	if(agc_en==0){
		//Manual gain control
		radio_controller_setCtrlSource(RC_BASEADDR, (rfsel), RC_REG0_RXHP_CTRLSRC, RC_CTRLSRC_REG);
		radio_controller_setRxGainSource(RC_BASEADDR, (rfsel), RC_GAINSRC_SPI);

		//Force RXHP to zero
		radio_controller_setRxHP(RC_BASEADDR, (rfsel), RC_RXHP_OFF);
		
		...

Offline

 

#7 2014-May-28 08:03:27

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Re: Problems for WARPLab with WARP v3 and v2 platforms

It's a simple C code change to control the state of RXHP. In wl_interface.c, find the "case IFC_RX_GAIN_CTRL_SRC" clause and add "radio_controller_setRxHP(RC_BASEADDR, (rfsel), RC_RXHP_OFF);" to the manual gain control mode:

We have tried this for a few days. But we really don't know how to use interface.c file. Shall we need to use mex to compile it? How do we use the "C_Code_Reference" for WARPLab?

Another question for us is if we want to set RXHP for WARPLab 6, how shall we do?

sorry for these basic questions for warplab.

Offline

 

#8 2014-May-28 08:41:48

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Problems for WARPLab with WARP v3 and v2 platforms

WARPLab consists of two basic software components:  1) The embedded C code that runs on the WARP hardware that is part of the bitstream;  2) The host M code (including MEX) that communicates with the WARP hardware and allows you to run experiments.

The C_Code_Reference contains the embedded C code that runs on the WARP hardware.  You can find the C code as part of the EDK project that is in the WARPLab release (WARPLab_Reference_Design_7.4.0\EDK_Projects\w3\w3_WARPLab_EDK_2RF_v7.4.0\SDK_Workspace\w3_WARPLab_v7_2rf\src).   As part of the release, the C_Code_Reference is replicated in each EDK project and uses a different set of defines to configure the behavior of the software to match the WARP hardware configuration.  To modify the embedded C code, you need to use the Xilinx SDK to generate a new bitstream (a tutorial can be found here).

The API did change between WARPLab 6 and WARPLab 7.  However, there are similar commands in WARPLab 6 for manipulating RxHP.

Offline

 

#9 2014-Jun-05 04:20:32

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Re: Problems for WARPLab with WARP v3 and v2 platforms

Hi,

We have modified the C code in "wl_interface.c", according to the murphpo's suggestion for WARPLab 7 in WARP v2 Platform.

murphpo wrote:

In wl_interface.c, find the "case IFC_RX_GAIN_CTRL_SRC" clause and add "radio_controller_setRxHP(RC_BASEADDR, (rfsel), RC_RXHP_OFF);" to the manual gain control mode:

Code:

case IFC_RX_GAIN_CTRL_SRC:
	rfsel =  Xil_Ntohl(cmdArgs32[0]);
	agc_en = Xil_Ntohl(cmdArgs32[1]) & 0x1;

	if(agc_en==0){
		//Manual gain control
		radio_controller_setCtrlSource(RC_BASEADDR, (rfsel), RC_REG0_RXHP_CTRLSRC, RC_CTRLSRC_REG);
		radio_controller_setRxGainSource(RC_BASEADDR, (rfsel), RC_GAINSRC_SPI);

		//Force RXHP to zero
		radio_controller_setRxHP(RC_BASEADDR, (rfsel), RC_RXHP_OFF);
		
		...

The problem of this topic is still there.  The degradation also occurs  at the +/- 15 subcarriers around the DC. It seems that  RC_RXHP_OFF is set by default in WARPLab 7.
Is there another reason that would produces this problem and we can fix it?

Offline

 

#10 2014-Jun-05 20:19:15

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Problems for WARPLab with WARP v3 and v2 platforms

The only other setting I can think of that affects the Rx frequency response around DC is the Rx HPF corner frequency when RXHP=0. This is set in MAX2829 register 8 bit 2, which selects between 30kHz (1) and 100Hz (0) corner frequencies (MAX2829 datasheet pg. 36). You can control this from C code with:
radio_controller_setRadioParam(RC_BASEADDR, (rfsel), RC_PARAMID_RXHPF_HIGH_CUTOFF_EN, X)
where X=0 or 1

Offline

 

#11 2014-Jun-05 21:03:23

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Re: Problems for WARPLab with WARP v3 and v2 platforms

We also tested our OFDM system for WARPLab 6 - v6p3 in WARP v2 and v3 platforms. The system works well for WARP v2 platform; There is no degradation around DC. But the system  works not good for WARP v3 platform.  (And the same degradation occurs in WARPLab 7 for WARP v2 and WARP v3 platforms).

I think maybe we could compare the settings of WARPLab 6 - v6p3 between WARP v2 platform version and WARP v3 platform version. Maybe the differences or changes between these two versions are the reasons of this degradation. We did do this for the two versions' C codes. But we are not familiar with the hardware register settings and the WARP API functions, so we could not find the differences between these two versions.

Offline

 

#12 2014-Jun-09 08:00:55

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Re: Problems for WARPLab with WARP v3 and v2 platforms

We have checked and compared the C code files, warplab.c, for WARPLab 6 - v6p3 version in WARP v2 and v3 platforms. We find our problem might come from the following different codes of the two versions.

For WARPLab 6 - v6p3 version in WARP v2 platform:

Code:

if(0 == MGC_AGC_Sel_Variable)
					{
						warplab_AGC_WriteReg_AGC_EN(0);
						//Set Radios for Manual Gain Control (MGC)
						WarpRadio_v1_SoftwareRxGainControl(1, radios);
						WarpRadio_v1_RxHpSoftControlEnable(radios);
					}

For WARPLab 6 - v6p3 version in WARP v3 platform:

Code:

if(0 == MGC_AGC_Sel_Variable)
					{
						warplab_AGC_WriteReg_AGC_EN(0);
						radio_controller_setCtrlSource(RC_BASEADDR, (RC_RFA | RC_RFB), RC_REG0_RXHP_CTRLSRC, RC_CTRLSRC_REG);
						radio_controller_setRxGainSource(RC_BASEADDR, (RC_RFA | RC_RFB), RC_GAINSRC_SPI);
					}

Do the last two functions perform exactly the same things in these two versions? It seems that the codes for WARP v3 platform would produce the degradation around DC.
If this is true, how would we modify? Because WARPLab 7 uses the same functions as in WARPLab 6 - v6p3 version for WARP v3 platform.

Thanks in advance for your kindly checks.

Offline

 

#13 2014-Jun-09 22:28:08

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Problems for WARPLab with WARP v3 and v2 platforms

Those code blocks perform the same function. The WARP v3 version uses the newer radio_controller core with a different (much cleaner) driver API. In both cases the code:
-Configures the radio_controller to drive the MAX2829 RXHP pin using a software-controlled register bit ("software" control). This disables the hardware control of RXHP, used by the AGC core.
-Configures the MAX2829 to use internal SPI-controlled registers to set the Rx LNA and VGA gains ("software" control). This disables the hardware gain control pins (the MAX2829 "B" port) when in Rx mode.

Did you try the RC_PARAMID_RXHPF_HIGH_CUTOFF_EN changed I mentioned above?

Offline

 

#14 2014-Jun-10 00:34:24

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Re: Problems for WARPLab with WARP v3 and v2 platforms

murphpo wrote:

Did you try the RC_PARAMID_RXHPF_HIGH_CUTOFF_EN changed I mentioned above?

Yes, we have tried the settings of  the RC_PARAMID_RXHPF_HIGH_CUTOFF_EN with X=0 (100Hz). The degradation still occurs. It's really difficult to find out the reasons of this degradation. Do you have any idea about this degradation?

For now, from the many checks of our experiment, we might be sure about the following things:
1. The degradation occurs at some subcarriers around DC.
2. The degradation happens at the RX path.
3. The degradation happens in the WARPLab 7 versions for WARP v2 and v3 platforms and in the WARPLab 6 versions for WARP v3 platform. It seems that it happens if we use the newer radio_controller APIs. Could these APIs have some little bugs in them? or they don't perform so exactly the same as their previous APIs.

Offline

 

#15 2014-Jun-11 15:49:29

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Problems for WARPLab with WARP v3 and v2 platforms

It seems that it happens if we use the newer radio_controller APIs. Could these APIs have some little bugs in them? or they don't perform so exactly the same as their previous APIs.

A radio_controller bug is certainly possible. I'll need to dig into the C and Verilog to see if I missed any connections that control RXHP or the Rx HPF settings.

Offline

 

#16 2014-Jun-15 21:30:12

oyyuan
Member
Registered: 2013-May-23
Posts: 10

Re: Problems for WARPLab with WARP v3 and v2 platforms

Thanks. If you find any thing, please let me know.

Offline

 

#17 2015-May-03 14:28:45

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Problems for WARPLab with WARP v3 and v2 platforms

I apologize for the long delay on this. I didn't find anything at the time, but was recently reminded to revisit the issue and believe I found the underlying problem.

The latest radio_controller driver has a bug which addresses the wrong bit in one register. As a result the application is unable to control the Rx high pass filter cutoff frequency when RXHP = 0. Specifically, it is register 0x8, bit 2, controlled via the radio_controller_setRadioParam(..., RC_PARAMID_RXHPF_HIGH_CUTOFF_EN, x); call. The radio_controller driver was toggling bit 1 (0x2) instead of bit 2 (0x4). This affects radio_controller versions v2_* and v3_*.

The MAX2829 defaults to a setting of 1, giving an Rx HPF cutoff of 30kHz when RXHP=0. This is the better setting for 802.11-style waveforms which don't use the 312kHz around DC. The 802.11 ref design has always assumed the MAX2829 default. The WARPLab ref design does provide an API for changing this parameter from MATLAB. It was seemingly possible to change it by modifying the C code (per post 13 above), but this exercised the radio_controller bug and did not alter the cutoff frequency.

I just committed fixed drivers (svn changeset 4519). These will be used in the next releases of the WARPLab and 802.11 Reference Designs.

To control the Rx HPF cutoff in existing designs, you can use the code below in your C application. This will write the correct register bits in the MAX2829. You should only use mode 0 (cutoff 100 Hz) if your application uses the frequencies near DC. 802.11-style waveforms with no energy in ±156 kHz should keep the default setting of 1.

Code:

//Set Rx HPF cutoff to 100 Hz when RXHP=0
radio_controller_SPI_setRegBits(RC_BASEADDR, RX_ANY_RF, 0x8, 0x0004, 0x0);

//Set Rx HPF cutoff to 30 kHz when RXHP=0 - this is the MAX2829 default
radio_controller_SPI_setRegBits(RC_BASEADDR, RX_ANY_RF, 0x8, 0x0004, 0x0004);

Offline

 

Board footer