state-space recursive least squares with adaptive memory college of electrical & mechanical...

59

Upload: darren-jennings

Post on 20-Jan-2018

217 views

Category:

Documents


0 download

DESCRIPTION

3 Introduction A recursive algorithm Built around state-space model of an unforced system Based on least squares approach Does not require process or observation noise statistics Works for time-invariant & time-variant environment alike Can handle scalar and vector observations Adapts forgetting factor that may be required due to  Model uncertainty  Presence of unknown external disturbances  Time-varying nature of observed signal  Non-stationary behaviour of observation noise SSRLS SSRLSWAM

TRANSCRIPT

Page 1: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…
Page 2: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

State-Space Recursive Least Squares with Adaptive Memory

College of Electrical & Mechanical EngineeringNational University of Sciences & Technology (NUST)

EE-869 Adaptive Filters

Page 3: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

3

Introduction A recursive algorithm Built around state-space model of an unforced system Based on least squares approach Does not require process or observation noise

statistics Works for time-invariant & time-variant environment

alike Can handle scalar and vector observations Adapts forgetting factor that may be required due

to Model uncertainty Presence of unknown external disturbances Time-varying nature of observed signal Non-stationary behaviour of observation noise

SSRLS

SSRLS

SSRLSWAM

Page 4: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

Preview of SSRLS

Page 5: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

5

State-Space Model

process statesoutput signalobservation noisesystem matrix (full rank) observation matrix (full rank)L-step observable

[ ][ ][ ][ ][ ][ ], [ ]

n

m

m

n n

m n

kkk

A kC kA k C k

xyv

[ 1]k x [ ]kx[ ]C k

[ ]kv

[ ]ky

Unforced System

1z I

[ ]A k

SSRLS

Page 6: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

6

Batch Processed Least Squares Approach

Page 7: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

7

Batch of Observations

Batch Processed Least Squares Approach

1

2

2

1

[ ][ 1] [ 1][ 2] [ 2] [ ]

[ ] [ ] [ ][ 2] [ 2] [ ][ 1] [ 1] [ ]

[ ] [ ] [ ]

p

p

p p p

CA x ky k p Cx k py k p Cx k p CA x k

k k ky k Cx k CA x ky k Cx k CA x k

y k Cx k Cx k

y v v

[ ] [ 1] [ 2] [ 1] [ ] Tp k v k p v k p v k v k v

[ ] [ ] [ ]p p pk H x k k y v

Noise Vector

Page 8: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

8

Least Squares Solution

Batch Processed Least Squares Approach

1

2

2

1

p

p

p

CA

CA

HCA

CAC

Full rank for p l

1ˆ[ ] ( ) [ ]T Tp p p px k H H H k yx Batch Processed Least

Squares Solution

1ˆ[ ] ( ) [ ]T Tp p p px k H WH H W k y Batch Processed Weighted

Least Squares Solution

1

2

0 0 0

0 0 0

0 0 00 0 0

pm

pm

m

m

I

IW

II

Weighting Matrix

Page 9: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

9

Recursive Algorithm

Page 10: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

10

Predict and Correct

Recursive Algorithm

Predicted Statesˆ[ ] [ 1]x k Ax k

ˆ[ ] [ ] [ 1]y k Cx k CAx k Predicted Signal

[ ] [ ] [ ]k y k y k Prediction Error

ˆ[ ] [ ] [ ] [ ]x k x k K k k Predictor Corrector Form

Estimator Gain

Page 11: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

11

Recursive Solution

Recursive Algorithm

Based on k+1 observations

Weighting Matrix

1 1[ ]Tk kH k CA CA CA C

[ ] [0] [1] [ 1] [ ] Tk y y y k y k y k+1 observations

1

0 0 0

0 0 0[ ]

0 0 00 0 0

km

km

m

m

I

IW k

II

Page 12: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

12

Recursive Solution (‘contd)

Recursive Algorithm

Defined variables

Direct Form of SSRLS

[ ] [ ] [ ] [ ]

[ ] [ ] [ ] [ ]

T

T

k H k W k H k

k H k W k k

y

1

ˆ[ ] [ ] [ ]

ˆ[ ] [ ] [ ]

k x k k

x k k k

Page 13: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

13

Recursive Update of

Recursive Algorithm

[ ] [ ] [ ] [ ]Tk H k W k H k

[ ]k

11 1 1[ ]k kk T T k k T T k T T Tk A C CA A C CA A C CA C C

11 1 1[ 1]kk T T k T T Tk A C CA A C CA C C

1[ ] [ 1]T Tk A k A C C Difference Lyapunov Equation

Page 14: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

14

Matrix Inversion Lemma

Recursive Algorithm

Matrix Inversion Lemma

1 1Tn n n n n m m m m nE F G D G

1 1( )T TE F FG D GFG GF

Page 15: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

15

Recursive Update of

Recursive Algorithm

1[ ]k

Riccati Equation for SSRLS

1 1 1 2 1

11 1 1

[ ] [ 1] [ 1]

[ 1] [ 1]

T T T

T T T

k A k A A k A C

I CA k A C CA k A

1 1 1 2 1

11 1 1

[ ] [ 1] [ 1]

[ 1] [ 1]

T T T

T T

A k A k k A C

I CA k A C CA k

[ ][ 1]

TE A k AF kG CAD I

Define 1[ ] [ ]P k k

Page 16: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

16

Recursive Update of

Recursive Algorithm

[ ]k

Recursive solution

11[ ] [0] [1] [ 1] [ ]k kk T T k T T T T Tk A C y A C y A C y k C y k

11[ 1] [0] [ 2] [ 1]kk T T T T Tk A C y A C y k C y k

[ ] [ 1] [ ]T Tk A k C y k

[ ] [ ] [ ] [ ]Tk H k W k k y

Page 17: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

17

Observer Gain

Recursive Algorithm

[ ]K k

1[ ] [ ] TK k k C Defined

Page 18: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

18

State-Space Representation of SSRLS

Recursive Solution

[ ] [ 1]w k k Defined

[ ] [ 1] [ ]T Tk A k C y k

[ 1] [ ] [ ]T Tw k A w k C y k

1

1

ˆ[ ] [ ] [ ]

[ ] [ ] [ ] [ ]T

x k k k

k A w k K k y k

Therefore

Similarly

1, , [ ] , [ ]T T TA C k A K k State-Space Matrices

Page 19: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

19

Initializating SSRLS

Recursive Algorithm

[0], [1], [ 2]l Rank Deficient

[0] I [0] TC C Ior 1) Initializing using Regularization Term

0 [0]x 0

2) Initialization using batch processing approach leads to delayed recursion - offers better initialization

Page 20: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

20

Steady-State SSRLS

Page 21: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

21

Steady-State Solution of SSRLS

Steady-State SSRLS

if

1T TA A C C

1

0lim [ ]

i ii T T

k ik A C C A

Can be written like this

min ( )Eigenvalues A

1 For neutrally stable systems

Page 22: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

22

Direct Form of Steady-State SSRLS

Steady-State SSRLS

1ˆ[ ] [ ] [ ]x k k k

1ˆ[ ] [ ]x k k

Page 23: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

23

Observer Gain for Steady-State SSRLS

Steady-State SSRLS

1 [ ]K k

Page 24: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

24

Transfer Function Representation

Steady-State SSRLS

11

11

( ) T T T

T T T

H z A zI A C K

A zI A I C

Page 25: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

25

Initialization of Steady-State SSRLS

Steady-State SSRLS

Initialize only [0]x

[0] 0x Preferable choice if no other estimate is available

Page 26: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

26

Memory Length

Steady-State SSRLS

Filter Memory1

1

2 111

Asymptotic result

Page 27: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

Model Uncertainty and Unknown External Disturbances

Page 28: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

28

Underlying Model

process statesoutputexternal disturbance (bounded, deterministic)observation noisesystem matrixinput matrixobservation matrix

[ ]w k

[ ][ ][ ][ ]

n

m

s

m

n no

n so

m no

x ky kw kv kABC

[ 1]x k [ ]x koC

[ ]v k

[ ]y k1z I

oA

oB

Model Uncertainty and Unknown External Disturbances

Controllable pair

Page 29: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

29

Assumptions about Observation Noise

[ ]E k 0v

2

[ ] [ ]T v if k jE k jotherwise

I0

v v

Zero Mean

White

Model Uncertainty and Unknown External Disturbances

Page 30: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

30

Perturbation Matrices

Model Uncertainty and Unknown External Disturbances

o

o

A A AC C C

o

o

A A AC C C

Page 31: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

31

Estimation Error

where

Model Uncertainty and Unknown External Disturbances

[ ] [ ] [ ]

( )o

F A KCAk F x k B w k

F A K A C A C AC

ˆ[ ] [ ] [ ]

ˆ[ 1] [ 1] [ 1] ( [ ] [ ]

( ) [ 1] [ ] [ 1][ 1] [ ] [ 1]

o o

e k x k x kA x k B w k Ax k K y k y k

A KCA e k Kv k kFe k Kv k k

White Input Deterministic Input

Page 32: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

32

Steady-State Mean Estimation Error

Model Uncertainty and Unknown External Disturbances

[ ] [ 1] [ ] [ 1]e k Fe k Kv k k

[ ] [ 1] [ 1]E e k F E e k k

Deterministic Input

Page 33: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

33

Bounds on Steady-State Mean Estimation Error

Model Uncertainty and Unknown External Disturbances

Page 34: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

34

Steady-State Mean Square Error

Model Uncertainty and Unknown External Disturbances

[ ] [ ] [ ]TR k E e k e k Estimation Error Correlation Matrix

2[ ] [ 1] [ 1]T TvR k FR k F KK k

[ ] [ ] [ ] [ ] [ ] [ ] [ ]T T T Tk k k FE e k k k E e k F where

[ ] [ ] [ ]

( )o

F A KCAk F x k B w k

F A K A C A C AC

Page 35: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

35

Bounds on Steady-State Mean Square Estimation Error

Model Uncertainty and Unknown External Disturbances

Page 36: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

SSRLS with Adaptive Memory (SSRLSWAM)

Page 37: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

37

The Cost Function cost function

gradient of costfunction

row vector

where

1[ ] [ ] [ ]2

TJ k E k k

[ ][ ]

[ ] [ ]T

J kk

kE k

[ ] ˆ[ ] [ 1]

[ 1]

k y k CAx k

CA k

ˆ[ ][ ] x kk

SSRLS with Adaptive Memory (SSRLSWAM)

Page 38: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

38

Gradient of Cost Function[ ] [ 1] [ ]T T Tk E k A C k

SSRLS with Adaptive Memory (SSRLSWAM)

Deterministic Gradient

1[ ] [ ]P k kˆ[ ] [ ] [ ] [ ]Tx k x k P k C k

[ ][ ] P kS k

Define

ˆ[ ][ ]

ˆ[ 1] [ ][ ] [ ] [ ]

( [ ] ) [ 1] [ ] [ ]

T T

T

x kk

x k kA S k C k P k C

A K k CA k S k C k

Page 39: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

39

Gradient of Cost Function (‘contd)

1 1 1 2 1

11 1 1

[ ] [ 1] [ 1]

[ 1] [ 1]

T T T

T T T

k A k A A k A C

I CA k A C CA k A

SSRLS with Adaptive Memory (SSRLSWAM)

11 1( ) ( )( ) ( )X XX X

1

1 1

[ ] [ ] [ 1] [ ]

[ ] [ ] [ ]

T T T

T

S k I K k C AS k A I C K k

P k K k K k

1[ ] [ ]P k k[ ][ ] P kS k

Page 40: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

40

Tuning Forgetting Factor

[ ] [ 1] [ ]k k k

ˆ [ ] [ 1] [ ]T T Tk k A C k

SSRLS with Adaptive Memory (SSRLSWAM)

Stochastic Gradient

Update using Stochastic Gradient Method

ˆ[ ] [ 1] [ ]

[ 1] [ 1] [ ]T T T

k k k

k k A C k

Page 41: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

41

SSRLSWAM – Complete Algorithm

SSRLS with Adaptive Memory (SSRLSWAM)

1

11

1

1

1

[ ] [ 1] [ 1]

[ 1] [ 1]

ˆ[ ] [ ] [ 1]ˆ ˆ[ ] [ 1] [ ] [ ]

[ ] [ 1] [ 1]

[ 1] [ ] [ 1]

[ ] [ 1] [ 1] [ ]

[ ] [ ] [ ] [ 1

T T

T T

T

T

T T T

K k k AP k A C

I k CAP k A C

k y k CAx kx k Ax k K k k

P k k AP k A

k K k CAP k A

k k k A C k

S k k I K k C AS k

1 1

] [ ]

[ ] [ ] [ ] [ ] [ ]

[ ] ( [ ] ) [ 1] [ ] [ ]

T T T

T

T

A I C K k

k P k k K k K k

k A K k CA k S k C k

Page 42: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

42

Initializing SSRLSWAM

[0]

2) Initialization using batch processing approach leads to delayed recursion - offers better initialization

SSRLS with Adaptive Memory (SSRLSWAM)

[0] 0

Some suitable value < 1

[0]P

ˆ[0]x

Page 43: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

Approximate Solution

Page 44: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

44

Approximate Solution using Symbolic Computations

Approximate Solution

Discrete Lyapunov Equation for S4RLS

Can be computed Symbolically, Off-line

1[ ] T Tk A A C C

( [ ]) ( )k 1( ) ( )P

( )[ ] ( ) PS k S

Page 45: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

45

Approximate Solution using Symbolic Computations (‘contd)

Approximate Solution

1

11

1

ˆ[ ] [ ] [ 1]

[ ] [ 1] [ 1] [ ]

[ ] [ ]

[ ] [ ]

[ ] [ 1]

[ 1] [ 1]

[ 1] [ 1]

[ ] ( [ ])ˆ ˆ[ ] [ 1] [ ] [ ]

[ ] ( [ ] ) [ 1]

T T T

T T

T T

T T

k y k CAx k

k k k A C k

P k P k

S k S k

K k K k

k AP k A C

I k CAP k A C

P k C k Cx k Ax k K k k

k A K k CA k

[ ] [ ]TS k C k

Page 46: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

46

Approximate Solution using Symbolic Computations (‘contd)

Approximate Solution

( ) ( )

( ) ( ) T

F A K CA

G S C

ˆ[ ] [ ] [ 1]

[ ] [ 1] [ 1] [ ]

ˆ ˆ[ ] [ 1] ( [ ]) [ ][ ] ( [ ]) [ 1] ( [ ]) [ ]

T T T

k y k CAx k

k k k A C k

x k Ax k K k kk F k k G k k

Define

Simplified Algorithm

Page 47: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

47

A Special Case (Constant Acceleration)

Page 48: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

48

A Special Case (Constant Acceleration)

Approximate Solution

System Matrices

21 20 10 0 1

1 0 0

T TA T

C

3

2

3

2

1

3(1 ) (1 )( )2

(1 )

KT

T

Symbolic Computation

Page 49: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

49

A Special Case (Constant Acceleration) – ‘Continued

Approximate Solution

2 33 3

2 2 2

3 3 3

2

23(1 ) (1 ) 3(1 ) (1 ) 3 (1 ) (1 )( ) 1

2 2 4(1 ) (1 ) (1 )1

2

TT

TF T

T

TT

Symbolic Computation

2

2

2

(1 )(1 3 )( ) 32

(1 )

GT

T

Page 50: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

Computational Complexity

Page 51: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

51

Computational Complexities: Standard Algorithms

Page 52: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

52

Computational Complexities: SSRLSWAM and Variants

Page 53: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

Example of Tracking a Noisy Chirp

Page 54: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

54

Chirp Signal

Example of Tracking a Noisy Chirp

Sinusoid whose frequency drifts with time

Model Used by Tracker

2( ) sin 0.0001 3y t t

21 20 10 0 1

1 0 0

T TA T

C

Model Mismatch

Actual Model is Chirped Sinusoid Model

Page 55: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

55

Performance of SSRLSWAM

2

0.00050.1

0.1[0] 0.98[0]

v

T

0

Simulation Parameters

Example of Tracking a Noisy Chirp

Page 56: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

56

Tuning of Forgetting Factor

Simulation Parameters

2

0.00050.1

0.1[0] 0.98[0]

v

T

0

Example of Tracking a Noisy Chirp

Page 57: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

57

Performance of SSRLS

2

0.00050.1

0.1[0] 0.98[0]

v

T

0

Simulation Parameters

Example of Tracking a Noisy Chirp

Page 58: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

58

Conclusion

SSRLSWAM is a combination of SSRLS and stochastic gradient method

S4RLSWAM alleviates computational burden of SSRLSWAM

Suitable for time-varying scenario Compensates for model uncertainty to some extent

Conclusion

Page 59: State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering…

59

References Mohammad Bilal Malik, “State-space recursive least

squares with adaptive memory”, Signal Processing Journal, Vol. 86, pp 1365-1374, 2006

References