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.

Respuestas (0)

Categorías

Más información sobre Optimization en Centro de ayuda y File Exchange.

Preguntada:

el 15 de Nov. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by