ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recurrence relations in LabView

Hi,

I have a problem with a VI that's supposed to estimate coefficients of the linear model by recursive least square method. I tried using For loop with Shift register but the results don't correspond with the ones calculated by Excel.

The formula is the following: a(k)=a(k-1)+mu*e(k-1)*x(k-1)
where mu is a constant, e(k-1) - error.

Can you go over the block diagram and point out mistakes?

Thank you

0 Kudos
Message 1 of 6
(4,066 Views)

can you post the first 20 ints from excel and LV? would be easier to see where problem comes up

________/~~~~~~~~*********~~~~~~~~\________
Certified delinquent LabVIEW developer. Recertifying at next NI Days
0 Kudos
Message 2 of 6
(4,053 Views)
0 Kudos
Message 3 of 6
(4,043 Views)

@Alzy wrote:

Here we go


Would have been more polite if you attach a txt or excel file with the numbers, so no need to type in the numbers manually 😄

0 Kudos
Message 4 of 6
(4,041 Views)

Deeply sorry for being foolish Smiley Very Happy . Here is an excel, vi and data.

Download All
0 Kudos
Message 5 of 6
(4,029 Views)

looking at your code now, can you run some thing down while I poke around?

  • Does the error get worse over the course of the data set (or just stay a little off)
    • Asking because this seems so close that I wonder if this is just the difference of excel and LV floating point rounding design.
________/~~~~~~~~*********~~~~~~~~\________
Certified delinquent LabVIEW developer. Recertifying at next NI Days
0 Kudos
Message 6 of 6
(4,015 Views)