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
(2,711 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
(2,698 Views)
0 Kudos
Message 3 of 6
(2,688 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
(2,686 Views)

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

Download All
0 Kudos
Message 5 of 6
(2,674 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
(2,660 Views)