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: 
Explorer
Explorer
4,516 Views
Registered: ‎06-28-2008

hls linear algebra function-- qr_inverse---precision unacceptable

Hello ,everybody.

vivado 2015.4.1.

---------------------------------

The testbench copied form example of vivado HLS--

    // Generate error ratio and compare against threshold value
    // - LAPACK error measurement method
    // - Threshold taken from LAPACK test functions
    int fail = 0;
    if ( difference_ratio<ROWS_COLS_A, ROWS_COLS_A>(Ir,I_ref) > 30.0 ) {
      fail = 1;
    }
    return (singular||fail);

 

----------------------------------

 

I used the hls linear algebra function-- qr_inverse in my design.

The data type is hls::x_complex<float>.

For some inputs such as random number, the function works well

with a almost perfect regenerated indentity matrix.

However ,for my practical inputs,

the function leads to a bad result.

Although the error radio is less than 30 and the simulation does not fail.

The regenerated Identity matrix looks bad with data such as 0.29..

which shoule be zero in ideal situation.

Then my subsequent algorithm fails to get the correct results.

 

What can I do to deal with the problem ??

I really need your help.

Thanks.

0 Kudos
1 Reply
Teacher muzaffer
Teacher
4,429 Views
Registered: ‎03-31-2012

Re: hls linear algebra function-- qr_inverse---precision unacceptable

it seems your matrix is ill-conditioned so it's ill-advised ;-) to invert it.
Depending on how badly conditioned your matrix is, you can remediate this problem but using larger precision or conditioning algorithms. Search for "matrix conditioning" or "Marquardt-Levenberg" algorithm or damped least squares.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos