How to implement RLS algorithm in simulink without actually using the RLS block ?

I have an algorithm for UDRLS which is based on matrix manipulation in iterations
Step 1: The algorithm starts with initialization. Read V(k) and I(k), k=1,2. Set initials for ฮธ as the estimate of last operation from nonvolatile memory (NVM).
Set appropriate ? and ? for the initial covariance matrix. Set a forgetting factor 0 < ฮป โ‰ค 1.
Step 2: Read a new pair of data V(k) and I(k).
Step 3: Update ?(?) using the present data V(k) and I(k), and the previous V(k-1), V(k-2), I(k-1) and I(k-2).
Step 4: Let ?0 = ?. Define two vectors ? and ? as
f=[?1, โ€ฆ , ??]' = ??(? โˆ’ 1)?(?)
g=[ ?1, โ€ฆ , ??]' = ?(? โˆ’ 1)?.
Step 5: For ? = 1,2, โ€ฆ ,6, go through Step 5.1-5.2.
Step 5.1: Compute the following:
?? = ?? โˆ’1 + ?? ??
?(?)?? = (?? โˆ’1)*(? (? โˆ’ 1) ?? )/(?? ?)
?? = ??
?? = โˆ’?? /?? โˆ’1.
Step 5.2: For ? = 1,2, โ€ฆ , ? โˆ’ 1, go to Step 5.2.1 (if ? = 1, skip Step 5.2.1).
Step 5.2.1: Compute the following:
?(?)?? = ?(? โˆ’ 1)?? + ?? ??
?? = ?? + ?(? โˆ’ 1)?? ?? .
Step 6: Compute ?(?) = [?1, โ€ฆ , ?? ]'/?? .
Step 7: Compute the estimation error as
?(?) = ฮ”? ? โˆ’ ?? ? โˆ’ 1 ?((?).
Step 8: Update ฮธ to minimize the estimation error ? by
?(?) = ?(? โˆ’ 1) + ? ? ?(?).
PFA if algorithm is not understandable.

Answers (0)

Categories

Find more on Optimization in Help Center and File Exchange

Asked:

on 15 Nov 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!