LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Optimizing an objective function (Holt's exponential smoothing)

Hi there,

I should create a programm carrying out Holt's exponential smoothing for a raw data (https://en.wikipedia.org/wiki/Exponential_smoothing#Optimization). I've managed to create a block diagram for the case when parameters alpha 1 and 2 is entered by a user, yet the next step is to make up a program calculating alphas itself by optimizing an objective function (SSE, the sum of (y-y')^2, y - raw data, y' - data by smoothing). 

I tried to use Optimization VIs, but there's no result, since in all cases there must be the model described, and I haven't a clue how to make a description.
There is a snippet attached, but it's a little cluttered, sorry for it.

0 Kudos
Message 1 of 3
(2,825 Views)

The top loop can be optimized/removed be replacing it with Array subset and a Subtract, no loop needed. For the bottom loop i have no suggestions right now. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(2,717 Views)

For the bottom loop i have no suggestions right now.

- Do you need to calc 1-alpha several times?

- Move constant operations outside the loop!

- I prefer shift registers for clarity of the code.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 3
(2,715 Views)