cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rjduck2
Visitor
Visitor
6,676 Views
Registered: ‎02-09-2011

Hilbert Transform using FIR Compiler and FDA Tool

Jump to solution

Hi,

 

I am trying to design an Hilbert Transform to convert 16-bit data that we used to drive a regular DAC, to 16-bit I and Q data to  drive a DAC with I and Q inputs to improve our signal performance and baseband filtering.

(I am using a Virtex 4 at the moment but will be moving to a Virtex 6 for the new design)

 

I used core generator with FIR Compiler V5.0 and, using the excellent datasheet with coregen, I copied the Hilbert Transform notes providing the coef data (-819,0,-1365,0,-4096,0,4096,0,1365,0,819), into the coefficient vector of FIR Compiler. This seemed to work OK.

 

But I am now using FDA Tool in Matlab to try to generate a larger order Hilbert Filter.

My problem is I don't know how to convert the coefficents generated by the FDA Tool (for example:

-0.222066272080177    -2.08652071664799e-16    -0.207067108122115    1.30206236849937e-16    -0.634683409629885    0    0.634683409629885    -1.30206236849937e-16)

into suitable coefficents for Core Gen FIR Compiler.

I know I need to force the very small values to Zero, but what should I scale the rest of the numbers by to generate 16-bit coeff data?

 

And, is FDA Tool the right thing to use (it allows export of the coeff data) or should I be using another filter design tool in Matlab?

 

And, on a more general topic - any suggestions about how many terms I should be using?

 

Many thanks, Jim

 

0 Kudos
1 Solution

Accepted Solutions
eschei
Xilinx Employee
Xilinx Employee
7,769 Views
Registered: ‎02-09-2009

Hi

 

I don't recall if there a way to use the FDATool to create Hilbert Transform Coefficients, but you can use Matlab's fdesign function. Here is an is an example of how to use the fdesign create Hilbert Transform Coefficients for a 50 tap filter:

 

d = fdesign.hilbert(50,0.1);
hd = design(d,'firls');
coef = hd.Numerator;
figure
plot(coef)
title ('50 tap Hilbert Filter Impluse Response')
fvtool(hd,'magnitudedisplay','zero-phase','frequencyrange','[-pi, pi)')

 

regards,

-es

View solution in original post

3 Replies
eschei
Xilinx Employee
Xilinx Employee
7,770 Views
Registered: ‎02-09-2009

Hi

 

I don't recall if there a way to use the FDATool to create Hilbert Transform Coefficients, but you can use Matlab's fdesign function. Here is an is an example of how to use the fdesign create Hilbert Transform Coefficients for a 50 tap filter:

 

d = fdesign.hilbert(50,0.1);
hd = design(d,'firls');
coef = hd.Numerator;
figure
plot(coef)
title ('50 tap Hilbert Filter Impluse Response')
fvtool(hd,'magnitudedisplay','zero-phase','frequencyrange','[-pi, pi)')

 

regards,

-es

View solution in original post

rjduck2
Visitor
Visitor
6,664 Views
Registered: ‎02-09-2011

Hello es,

 

many thanks for the prompt reply,

 

I can see the coeffs Ok:

-0.00226818593342183    -1.33773708791948e-17    -0.00417491568177813    1.30261555193310e-17    -0.00683468973978054    -4.19582596789382e-17 etc.

 

But how do I convert these to what Xilinx FIR Compiler requires?

I know I have to force the small values to zero but how do I scale the rest of the values (I assume the coefdata needs to be in integers)?

 

Thanks, Jim

0 Kudos
kwame.kyere
Observer
Observer
2,177 Views
Registered: ‎02-24-2016

Hi,

 

I know this comes a bit late but i hope you have found a solution.

FDA tool in Matlab does the Quantisation (Scaling with integers) for you. It also writes a .coe file containing all coefficients in hex.

This format is required by "fir-compilerv5" IP core

 

Bes regards,

 

Afrifa

0 Kudos