UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor nzhanche
Visitor
341 Views
Registered: ‎11-08-2019

Hilbert Transform using FIR Compiler 5.0

Hi,

I'm new to FPGA programming. Currently I'm using the xilinx ISE 12.4 as it is the recommended version stated in the hardware manual.

My application requires me to use the Hilbert Transform. I have managed to get the code working with the coefficients and input data generated using MATLAB.

However, the results is different when I compared them. (MATLAB results vs FPGA results)

I have checked and verify that the result for the I data is the same. (Since I data is just a delay of the input data)

For Q data, I'm not sure whether I'm using the wrong sample points to plot the result. Hence, getting different results.

After reading the results generated by FPGA, I'm using the same sample points for I and Q. (I_DATA(1:numSample) & Q_DATA(1:numSample)

Is there suppose to be a fix number of sample delay for Q data? In MATLAB when using designfilt Hilbert Transform function, there is a need to take Q data sample with a delay of filterTaps/2.

I also notice that when the output pin RDY of the Filter goes to high (output data ready), a number of starting samples of the I data are '0'. Is the response suppose to be like that? In the datasheet, it state that once RDY goes high, the output of the Filter is valid. 

Thanks for helping!

 

 

 

4 Replies
321 Views
Registered: ‎06-21-2017

Re: Hilbert Transform using FIR Compiler 5.0

You are seeing the filter startup.  All FIR filters do this.  Assuming you have a reset, all of the delay taps in the filter are zero when you start.  Your first non-zero sample is only multiplied by coefficient_0 to produce the first non-zero filter output.  When the second sample comes in you get (Sample1*coefficient0) + (Sample0*coefficient1).  Until all of the filter taps get loaded with non-zero data, you will see this startup response.

Visitor nzhanche
Visitor
260 Views
Registered: ‎11-08-2019

Re: Hilbert Transform using FIR Compiler 5.0

Thanks for the reply bruce_karaffa.

I'm using a 59 tab hilbert transform filter. 

If I'm correct, the output of I data correspond to the input data at the 32nd sample onwards. (I do not have access to the testbench now.)

Which sample of the Q data should I start using in order to get the exact same output response as MATLAB?

Thanks for helping!

0 Kudos
Visitor nzhanche
Visitor
170 Views
Registered: ‎11-08-2019

Re: Hilbert Transform using FIR Compiler 5.0

Hi,

I made a mistake in my previous post. Instead of the 32nd sample, the I data correspond to the input data at 31st samples onwards. Which is similar to what is stated in the datasheet.

For the Q data, currently I'm using an output round mode: truncate LSBs to 16bits. And then I used the 62st sample onwards for the Q data.

After which I saved and plotted the IQ data in the frequency domain but the results does not match.

Anyone can help? Thanks!

0 Kudos
Visitor nzhanche
Visitor
133 Views
Registered: ‎11-08-2019

Re: Hilbert Transform using FIR Compiler 5.0

I found what the issue is. It is due to the scaling of the Q data which cause the discrepancy of the data between the MATLAB and VHDL output. Thanks everyone. :)