cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Anonymous
Not applicable
6,500 Views

What is wrong with this Hilbert coe file?

Can anyone tell me what is wrong with this .coe file I generated for a Hilbert filter? FIR Compiler 6.3 tells me the coefficients do not match the expected Hilbert structure. It reads the coefficients fine, but just doesn't like the structure. I generated these coefficients using Matlab's FDA tool.

 

radix=10;
coefdata=
0,
-0.003073,
0,
-0.003360,
0,
-0.005130,
0,
-0.007456,
0,
-0.010464,
0,
-0.014310,
0,
-0.019198,
0,
-0.025443,
0,
-0.033516,
0,
-0.044247,
0,
-0.059193,
0,
-0.081715,
0,
-0.120592,
0,
-0.208110,
0,
-0.635245,
0,
0.635245,
0,
0.208110,
0,
0.120592,
0,
0.081715,
0,
0.059193,
0,
0.044247,
0,
0.033516,
0,
0.025443,
0,
0.019198,
0,
0.014310,
0,
0.010464,
0,
0.007456,
0,
0.005130,
0,
0.003360,
0,
0.003073,
0
0 Kudos
5 Replies
Highlighted
Xilinx Employee
Xilinx Employee
6,463 Views
Registered: ‎08-02-2011

Can you post your FIR Compiler configuration? Specifically, what's the value for coefficient structure? Try symmetric?
www.xilinx.com
0 Kudos
Highlighted
Anonymous
Not applicable
6,436 Views

Hi bwiec

 

In the FIR compiler, under Filter Specification, I chose Hilbert from the drop down menu, and then the Inferred Coefficient Structure sets itself to Negative Symmetric or Non Symmetric, and I cannot change this value. In Coefficient Structure, the Inferred option is selected and I cannot change this. I do not see anywhere that I can explicitly set the coefficient structure.

 

Something else I just noticed, on the Summary page, it says the filter type is Interpolated, even though I have Hilbert selected, and the Coefficient Structure is Non Symmetric. Any idea why the Summary page is not lining up with what I am actually selecting on the previous pages?

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
6,432 Views
Registered: ‎08-01-2008

The Hilbert Transform has zeros for every other coefficient, but the FDATool does not actually write out '0', except for the middle coefficient. The others are close to zero, but not precisely zero. For the attached example, if one tries to pass the coefficients from the FDATool to the FIR Compiler block using the traditional argument above, the error message below is displayed.

One workaround is to export the coefficients to a variable (Num), then run this script:

Num(2:2:end) = 0;

This will make the coefficients '0' versus "close to zero". Then, if you use 'Num' in the Fir Compiler coefficient field, things will work.

Note that if you change the filter order from 10 (11 taps) to 12 (13 taps), then the outer coefficients would be zero. In that case, you would have to use this:

Num(1:2:end) = 0;

A CR has been filed against the FIR Compiler block to be able to support this.

Another workaround:

In place of Matab Fdatool . you can use scilab
Software freely available for download from following link

http://www.scilab.org/products/scilab/download


Use this software for generating Hilbert coefficient

for example

>>hilb(31)

It will generate the coefficient



- 0.0424413, 0., - 0.0489708, 0.,- 0.0578745,0.,- 0.0707355,
0., - 0.0909457, 0., - 0.1273240,0.,- 0.2122066,0., -
0.6366198,0.,0.6366198,0.,0.2122066,0., 0.1273240,0.,0.0909457,0.,
0.0707355,0.,0.0578745,0.,0.0489708,0.,0.0424413

You can use these coefficients as shown in snap shot. These coefficients infer Hilbert transform.

Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
Anonymous
Not applicable
6,422 Views

balkris,

If you look at the coefficients I posted they are exactly zero. I have done the process you described already in Matlab.

0 Kudos
Highlighted
Anonymous
Not applicable
6,356 Views

Well I figured it out.

 

Apparently the FIR compiler 6.3 doesn't like the leading and trailing zero valued coefficients. This is weird because it calculates the frequency response correctly. So, the lesson is, get rid of the leading and trailing zero that Matlab generates and these coefficients will be recognized correctly.

0 Kudos