• No results found

A System Identication Software Tool for General MISO ARX-type of Model Structures

N/A
N/A
Protected

Academic year: 2021

Share "A System Identication Software Tool for General MISO ARX-type of Model Structures"

Copied!
29
0
0

Loading.... (view fulltext now)

Full text

(1)

A System Identication Software Tool for General MISO ARX-type of Model Structures

P. Lindskog

Department of Electrical Engineering Linkoping University

S{581 83 Linkoping SWEDEN

E-mail:

lindskog@isy.liu.se

December 9, 1996

Abstract: The typical system identication procedure requires powerful and versatile software means. In this paper we describe and exemplify the use of a prototype identication software tool, applicable for the rather broad class of multi input single output model structures with regressors that are formed by delayed in- and outputs. Interesting special instances of this model structure category include, e.g., linear ARX and many semi-physical structures, feed-forward neural networks, radial basis function networks, hinging hyperplanes, certain fuzzy structures, etc., as well as any hybrid obtained by combining an arbitrary number of such approaches.

Keywords: System identication software tools, matlab , MISO systems, linear and nonlinear ARX structures, parameter estimation, simulation.

1 Introduction

System identication concerns the problem of designing mathematical models of dynamical systems based on observed data 20,31]. After experiment design and data pre-processing (detrending, removing outliers, etc.), the problem can be split into two parts: model structure selection followed by parameter estimation.

To facilitate these steps in practice, general and powerful software tools of various kinds are needed. In this paper we present and illustrate the use of a prototype matlab 35] software pack- age, customized for unconstrained or constrained parameter estimation within the general multi input single output ARX model structure class. This class involves all (linear as well as nonlin- ear) structures that generate an output (a prediction) based on input-output measurements that are known at time t . The only technical restriction imposed on the model structure is that it must be possible to compute the derivatives of the predictor with respect to all its parameters, at least numerically. This is usually the case for linear ARX structures 20,31], most semi-physical structures 18,19], standard feed-forward neural networks 15,16,22], feed-forward radial basis function networks 7,24], hinging hyperplanes 4,25,26], Takagi-Sugeno type of fuzzy model struc- tures 18,28,34], etc., as well as for any conceivable combination of these approaches.

It is true that some of these structures are handled by commercial matlab toolboxes, like the

system identication toolbox 21], the neural network toolbox 8], or the fuzzy logic toolbox 27],

although none of these packages cover the general ARX case. The system identication toolbox

is, e.g., designed for linear model structures, whereas the fuzzy toolbox is tailored for certain

fuzzy descriptions. Another important restriction is that these tools do not support constrained

(2)

estimation, which means that a priori known parameter restrictions cannot be guaranteed in the estimated models. However, such knowledge can be incorporated and dealt with using the opti- mization toolbox 14], but there the principal problem is that neither simulation nor any other validation procedures are included. Altogether, these limitations have triggered the development of the software tool discussed below.

The paper is organized as follows. In Section 2 we briey discuss the system identication problem, focusing mainly on structural issues as well as algorithms that are implemented. Based on this material, Section 3 addresses the use of the developed software tool. Then, Section 4 goes through a rather simple application example showing the possibilities of this package. Some conclusions and possible extensions are nally provided in Section 5.

2 System identication basics

This section reviews some basic identication issues, starting next with main ingredients and notation. In Section 2.2 we concentrate on the choice of model structure, and in Section 2.3 some suitable parameter estimation algorithms are presented.

2.1 Main components and notation

The identication procedure is in practice highly iterative and made up of three main ingredients:

the data, the model structure and the selection criterion, all of which to some degree involve decisions of subjective nature.

The data

Z

N . The natural starting point of any identication session is the data, which will depend both on the true system and on the experimental conditions. By the row vector

z(

t

)=

y

(

t

)

u 1

(

t

)

::: u m

(

t

)2R

1

+

m (1) we denote one specic data sample at time t collected from a system having one output and m input signals, i.e., we consider a multi input single output (MISO) system. This restriction is mainly for ease of notation and the extension to multi output (MIMO) systems is fairly straightforward, see, e.g., 20]. Stacking N consecutive samples on top of each other gives the data matrix

Z

N

= z(

1

)

T

z(

2

)

T :::

z(

N

)

T



T

2R

N

(

1

+

m

)

 (2) where

z(

j

)

T is the transpose of the vector

z(

j

)

.

It is of course crucial that the data reect the important features of the underlying system.

In reality, and especially for complex systems, this requires carefully designed experiments. Here we will not consider such design issues, but assume that the data have been collected in the best possible way. The usual next step of pre-treating data in dierent manners, like detrending, removing outliers, special ltering, and so forth, is not covered either for such procedures we refer to the system identication toolbox 21].

The model structure g

('(

t

)



)

. A general MISO model structure can be written

y ^

(

t

j)=

g

(' (

t

)



)2R

 (3) where ^ y

(

t

j)

accentuates that the function g

(



)

is a predictor, i.e., it is based on signals that are known at time t . The predictor structure is ensured by the regressor

'(

t

)

, which maps output signals up to index t

-

1 and input signals up to index t to an r dimensional regression vector.

This vector is often of the form

'(

t

)=

y

(

t

-

1

)

::: y

(

t

-

k

)

u 1

(

t

)

::: u 1

(

t

-

k 1

)

:::

u m

(

t

)

::: u m

(

t

-

k m

)

T  (4)

although in general its entries can be any at time t computable combinations of input-output

(3)

Experiment design

Pre-treat data

U

N

Z

N

g('(t)) V

N (Z

N

)

Model

OK

)

accept model!

Choose model structure

Choose performance criterion

Prior system kno wledge: ph ysics, linguistics, etc.

D

Parameter estimation

Validate

model Not OK

)

revise!

Not OK

)

revise prior?

Figure 1.

The system identication loop. Grey boxes mark issues handled by the developed software, at least partly. Grey arrows mark the use of prior knowledge.

signals, measured as well as predicted or simulated ones. The mapping g

(



)

(from

R

r to

R

) is parameterized by

2DR

d , with the set

D

denoting the set of values over which



is allowed to range due to parameter restrictions. With this formulation, the work on nding a suitable model structure splits naturally into two subtasks, both possibly being nonlinear in nature:

1. the choice of dynamics, i.e., the choice of regression vector

'(

t

)

, followed by 2. the choice of static mapping g

(



)

.

The performance criterion V N

(Z

N 

)

. Measured and model outputs never match perfectly in practice, but dier as

"

(

t

j)=

y

(

t

)-

y ^

(

t

j)

 (5) where "

(

t

j)

is an error term reecting unmodeled dynamics on one hand and noise on the other hand. An obvious modeling goal must be that this discrepancy is \small" in some sense. This is achieved by the selection criterion, which ranks dierent models according to some pre-determined cost function. The selection criterion can come in several shapes, but pre-dominant in this business is to use a quadratic measure of the t between measured and predicted values:

V N

(Z

N 

)=

1 N N

X

t

=

1

1 2

(

y

(

t

)-

y ^

(

t

j))

2

=

1 N N

X

t

=

1

1 2"

(

t

j)

2 : (6) Once these three issues are settled we have implicitly dened the searched for model. It then

\only" remains to estimate the parameters



and to decide whether the model is good enough or not. If the model cannot be accepted some or even all of the entities above have to be reconsidered

in the worst possible case one must start from the very beginning and collect new data. This working procedure { the system identication loop 20] { is reproduced in Figure 1.

2.2 General ARX model structures

The class of general (linear as well as nonlinear) ARX model structures is specied by the type

(4)

of regressors

'(

t

)

being used in the predictor (3), see 30]. The requirement is that all regressors should be formed by measured signals only, i.e., in the MISO system case the regressors should be solely composed of signals of the kind involved in (4). Notice that the general FIR model structure, which uses old inputs

u(

t

-

k

)

as regressors, is just a specialization of this category.

However, structures with regressors based on previous outputs from the model itself, predicted or simulated ones, do not t into this framework. More to the point, the current version of the software is not able to handle general output error (OE) structures, which use simulated instead of measured outputs, general ARMAX structures, which besides measured in- and outputs use predicted outputs, nor can it deal with general Box-Jenkins (BJ) structures, which use measured inputs as well as measured, predicted and simulated outputs.

Despite these restrictions, there is still a large ora of model structure possibilities. Some of these are presented next.

Linear ARX structures. The linear MISO ARX model structure is simply y ^

(

t

j)=

g

(' (

t

)



)=X

n

j

=

1  j ' j

(

t

)=

T

'(

t

)

 (7) where

'(

t

)

is given by (4).

Linear structures with orthonormal basis functions. In a linear ARX structure we always run the risk of arriving at an unstable model. This can be avoided by using ltered inputs as regressors

y ^

(

t

j)=

g

(' (

t

)



)=X

n

j

=

1  j

B

j

(

u

(

t

))

 (8)

where all the

B

j

()

s are linear stable lters. For a number of reasons, see, e.g., 18], these pre-lters are often chosen to form an orthonormal set of basis functions in

H

2

(-



)

18]. This is the case for the choice

B

j

(

u

(

t

))=

u

(

t

-

j

)

, which results in the linear FIR model structure. To reduce the number of basis functions needed to arrive at useful models it is here appealing to try other choices of

B

j

()

. This is the main idea behind orthonormal Laguerre and Kautz lters 18,36,37], which, to reduce the number of parameters to estimate, utilize prior knowledge about the dominating time constants of the underlying system.

Semi-physical structures. Another approach benetting from partial prior system knowledge is so called semi-physical modeling. There the basic idea is to use physical insight about the system so as to come up with certain nonlinear (and physically motivated) combinations of the raw measurements

Z

N . These combinations { the new inputs and outputs { are then subjected to standard model structures.

More precisely, from an estimation viewpoint (see the next section) it is often desired to have a predictor of the form (7), with all nonlinearities appearing in the regressor

'(

t

)

(here composed of measured signals only). The regressors to include in the structure are of course determined on a case by case basis. For example, to model the power delivered by a heater element (a resistor), an obvious physically motivated regressor to employ would be the squared voltage applied to the resistor. In other and more complicated modeling situations the prior is given as a set of unstructured dierential-algebraic equations. To then arrive at a model of the form (7) requires both symbolic and numeric software tools as is demonstrated in 18,19].

Feed-forward neural networks. When the system shows a nonlinear behavior, a rather com- mon modeling approach is to try nonlinear predictor structures resembling a function expansion

^ y

(

t

j)=

g

(' (

t

)



)=X

n

j

=

1 j g j

('(

t

)





j 



j

)

 (9)



T

= 

T



T



T



 (10)

(5)

where g j

(







)

is called a basis function, and j ,



j and



j are weight (or coordinate), scale (or direction), and position (or translation) parameters 30]. With basis functions of the form

g j

('(

t

)





j  j

)=

(

Tj

'(

t

)-

j

)

 (11) where

()

is an activation function in one variable having parameters



j

2R

r and j

2R

, we get a ridge construction 30]. Notice that the ridge nature has nothing to do with the choice of

()

. It is attributed to the fact that

()

is constant for all regression vectors in the subspace where



Tj

'(

t

)

is constant, thus forming a ridge along that direction. A standard choice of activation function is the sigmoid function

(

x

)=

(

x

)=

1

1

+

e

-

x  (12)

which, with regressors (4), yields a sigmoid one hidden layer feed-forward neural network 15,22].

Many dierent generalizations of this basic structure are possible. For example, step, piecewise lin- ear and hyperbolic tangent functions 15] are other activation functions sometimes being advocated in the literature. A network with several hidden layers is also readily obtained if the

()

blocks are again weighted, thresholded and fed through a new layer of

()

blocks. However, recurrent (as opposed to feed-forward) neural networks do not belong to the considered model class, owing to that network internal signals are there fed back to the regression vector.

Hinging hyperplanes. Breiman 4] has recently suggested a hinging hyperplane model struc- ture, having V -shaped basis functions rather than, e.g., sigmoidal ones. In 26] it is shown that the original hinging hyperplane description is equivalent to

^ y

(

t

j)=

g

('(

t

)



)=X

n

j

=

1



Tj

'(

t

)

I S

j('(

t

))+

T0

'(

t

)

 (13) where the indicator function I S

j('(

t

))

is 1 if

'(

t

) 2

S j , and zero otherwise, thus splitting the regression space into smaller regions. The overall parameter vector is here composed of n

+

1 sub-vector elements, each containing r parameters. It is not hard to verify that this is also a series expansion of ridge type, see 26].

Feed-forward radial basis function networks. Another frequently used class of basis func- tions is of radial type 7,15,24], which do not show the ridge directional property but have true local support. The series expansion (9) with regressors (4) is then composed of elements

g j

('(

t

)





j 



j

)=

(jj'(

t

)-

j

jj

2

j)

 (14) where the weighted norm



j specify the scaling of

()

. Even if a few dierent radial functions have been suggested in the literature, see, e.g., 7], it is often chosen to be a Gaussian

(jjx

j

jj

2

j

)=

e

-12xTj-1j xj

 (15) where

x

j

='(

t

)-

j ,



j

2R

r , and

-

j 1

=

2



Tj



j ,



j

2R

r , with



j and



j representing the mean and the covariance of the Gaussian, respectively.

Fuzzy model structures. A composition (tensor product in 30]) is obtained whenever ridge and radial constructions are combined when forming the basis functions of (9). The most extreme, yet often used, composition

g j

('(

t

)





j 



j

)= Y

r

k

=

1 g jk

(

' k

(

t

)





jk 



jk

)

(16)

is the construction often employed in fuzzy identication 17,18,28,34], where a set of linguistic

rules, like \

If

temperature

(

t

-

1

)

is high

and

ow

(

t

-

1

)

is low

then

temperature

(

t

)

is high", is

(6)

translated into a mathematical representation { a model structure. A very common translation results in the Mamdani fuzzy model structure (consult, e.g., 18,28] for the derivation)

y ^

(

t

j)=

n

1

X

j

1=

1 :::

X

n

r

j

r=

1 j

1

:::j

rY

r

k

=

1  A

jkk(

' k

(

t

)





j

k

k 



j

k

k

)

n

1

X

j

1=

1 :::

X

n

r

j

r=

1 r

Y

k

=

1  A

jkk(

' k

(

t

)





j

k

k  j

k

k

)

 (17) which diers from the other series expansions in that the parameters here can be linguistically interpreted. Another dierence is the denominator part, which merely performs a normalization.

Notice also that the labeling in (17) is just a convenient grid-oriented relabeling of the basis func- tions g jk

(







)

, or, as they are called in a fuzzy context, membership functions  A

jkk(







)

. These can in principle be any functions returning values in the interval



01

]

, e.g., sigmoids, Gaussians, piecewise linear functions, etc.

A natural extension of structure (17) is to allow slightly more complex local models than just constants j

1

:::j

r

. One straightforward idea is to replace the constants by local ARX predictors:



Tj

1

:::j

r'(

t

)+

0j

1

:::j

r

. This gives the Takagi-Sugeno fuzzy model family 34]

y ^

(

t

j)=

n

1

X

j

1=

1 :::

X

n

r

j

r=

1

;



Tj

1

:::j

r'(

t

)+

0j

1

:::j

r Y

r

k

=

1  A

jkk(

' k

(

t

)





j

k

k 



j

k

k

)

n

1

X

j

1=

1 :::

X

n

r

j

r=

1 r

Y

k

=

1  A

jkk(

' k

(

t

)





j

k

k  j

k

k

)

 (18) which indeed has much in common with gain scheduling techniques.

Other structures. The story of nonlinear series expansions of the form (9) does not end here.

Model regression trees 5,18,33] (a composition), wavelet networks 39] (radial type), kernel esti- mators 38] (radial type), as well as some other structures 30] also belong to this versatile category.

Observe that these methods are local in the sense that they involve basis functions having local support, i.e., each g j

(







)

is in principle only active in certain parts of the total regression space.

Global nonlinear basis functions, like Hammerstein structures 20], but also Wiener 1] and Volterra 1] functional series realizations, fall within the general ARX framework. In fact, so does any hybrid structure obtained by combining any of the above structures, see Section 4.3.

2.3 General parameter estimation techniques

After having determined the model structure to apply, the next step is to use input-output data to estimate what is still unknown. It is here useful to divide the estimation needs into three categories.

Structure estimation. This is the case when the type of model structure approach to use has been decided, but where the size, i.e., the number of basis functions n to employ, is estimated.

This typically leads to a combinatorial optimization problem, which in complexity grows rapidly with the problem size. The present software version does not consider structure estimation it is assumed that n is determined by the user in one way or another.

Nonlinear-in-the-parameters estimation. Having decided the size of the model structure it remains to nd reasonable parameter values



. With the scalar loss function (6) as the performance criterion the parameter estimate ^



N is given by

^



N

=

arg min

2D

V N

(Z

N 

)

 (19)

where \argmin" is the operator that returns the argument that minimizes the loss function. This

is a very important and well-known problem formulation leading to prediction error minimization

(7)

(PEM) methods. The type of PEM algorithm to apply depends on whether the parameters



enter the model structure in a linear or a nonlinear way. The latter situation leads to a nonlinear least-squares problem, and appears, e.g., in series expansions (9) that are equipped with unknown direction



or translation



parameters.

Linear-in-the-parameters estimation. When all parameters enter the structure in a linear fashion one usually talks about a linear least-squares problem. This is the case for structures (7) and (8), but also for series expansions (9) if only coordinate parameters



are to be estimated.

It should be emphasized that the complexity of the estimation problem decreases in the listed order, yet at the price of that the amount of prior needed to arrive at a useful model typically increases. With these preliminary observations, we next present some dierent minimization algo- rithms, unconstrained as well as constrained ones.

2.3.1 Unconstrained linear least-squares estimation

The parameters of an unconstrained linear least-squares structure (a linear regression) can be estimated eciently and analytically by solving the normal equations

'(

t

)'(

t

)

T



^ N

='(

t

)

y

(

t

)

(20) for t

=

1::: N . The optimal parameter estimate is simply

^



N

=

"

N

X

t

=

1

'(

t

)'(

t

)

T

#

-

1 N

X

t

=

1

'(

t

)

y

(

t

)=R-

N 1

f

N  (21) provided that the inverse of the d



d regression matrix

R

N exists. For numerical reasons this inverse is rarely formed, but instead the estimate is computed via so called QR- or singular value decomposition (SVD) 2,13], which both are able to handle rank decient regression matrices. The former approach is, e.g., applied in the matlab `

n

'-operator 35], utilized in our implementation.

2.3.2 Unconstrained nonlinear least-squares estimation

When the parameters appear in a nonlinear fashion the typical situation is that the minimum of the loss function cannot be computed analytically. Instead we have to resort to certain iterative search routines, most of which can be seen as special cases of Newton's algorithm (see among many others 9,11,29])

^

 (

i

+

1

)

N

=

^

(

N i

)-h

V N

00(Z

N 



^

(

N i

))i-

1 V N

0 (Z

N 



^

(

N i

))=

^

(

N i

)-

^

(

N i

)(Z

N 



^

(

N i

))

 (22) where ^

(

N i

) 2R

d is the parameter estimate at the i -th iteration, V N

0 (



)2 R

d is the gradient of the loss function and V N

00(



)2R

d d the Hessian of it, both computed with respect to the current parameter vector. More specically, the gradient is given by

V N

0 (Z

N 



^

(

N i

))=-

1 N

N

X

t

=

1

J(

t

j

^

(

N i

))

"

(

t

j

^

(

N i

))

 (23) with

J(

t

j

^

(

N i

))2R

d being the Jacobian vector

J(

t

j

^

(

N i

))=

"

@ y ^

(

t

j

^

(

N i

))

@ ^ 

(

1 i

)

::: @ y ^

(

t

j

^

(

N i

))

@ ^ 

(

d i

)

#

T

 (24)

and dierentiating the gradient with respect to the parameters yields the Hessian

(8)

V N

00(Z

N 



^

(

N i

))=

1 N

N

X

t

=

1

0

@

J(

t

j

^

(

N i

))J(

t

j

^

(

N i

))

T

-

@J

(

t

j

^

(

N i

))

@



^

(

N i

)

"

(

t

j

^

(

N i

))

1

A

: (25)

Simply put, Newton's algorithm searches for the new parameter vector along a Hessian modied gradient of the current loss function.

The availability of derivatives of the loss function with respect to the parameters is of course of paramount importance in all Newton-based estimation schemes. In case arbitrary (though dier- entiable) predictor structures are considered these may very well be too hard to obtain analytically or too expensive to compute. One way around this diculty is to numerically approximate the derivatives by nite dierences. The simplest such a method is just to replace each of the d elements of the Jacobian by the forward dierence

J j

(

t

j

^

(

N i

))=

@ ^ y

(

t

j

^

(

N i

))

@  ^

(

j i

) 

y ^

(

t

j

^

(

N i

)+

h j

e

j

)-

^ y

(

t

j

^

(

N i

))

h j  (26)

with

e

j being a column vector with a one in the j -th position and zeros elsewhere, and with h j being a small positive scalar perturbation. Because the parameters may dier substantially in magnitude it is here expedient to individually choose these perturbations. A typical choice is h j

=p

 max

(

h min 



^

(

j i

))

, where  is the relative machine precision and h min > 0 is the smallest perturbation allowed consult 9,29] for further details on this. If a more accurate approximation is deemed necessary one can employ the central dierence

J j

(

t



^

(

N i

))=

@ ^ y

(

t

j

^

(

N i

))

@  ^

(

j i

) 

^ y

(

t

j

^

(

N i

)+

h j

e

j

)-

^ y

(

t

j

^

(

N i

)-

h j

e

j

)

2h j  (27)

at the cost of d additional function evaluations.

It now turns out that the Newton update (22) has some severe drawbacks, most of which are associated with the computation of the Hessian (25). First of all, it is in general expensive to compute the derivative of the Jacobian. It may also happen that the inverse of the Hessian does not exist, so if further progress towards a minimum is to be made the update vector must be constructed in a dierent way. Also, even if the inverse exists it is not guaranteed to be positive denite. It may therefore happen that the parameter update vector is such that the loss function actually becomes larger. Finally, although the parameter update vector is a descent one it can be much too large, locating the new parameters at a point with higher loss than what is currently the case. The following (implemented) three variants of (22) are all safeguarded against these pitfalls.

Damped gradient method. Simply replace the Hessian by an identity matrix of appropriate size. However, this does not prevent the update from being so large that also V N

(



)

becomes larger. To avoid such a behavior the updating is often complemented with a line search technique

^

 (

i

)

N

(Z

N 



^

(

N i

))=



(

i

)

V N

0 (Z

N 



^

(

N i

))

 (28) where 0 < 

(

i

)

1 , thereby giving a damped gradient algorithm. The choice of step length 

(

i

)

is not critical, and the procedure often used is to start with 

(

i

) =

1 and then repeatedly halve it until a lower value of the loss function is obtained.

Damped Gauss-Newton method. By skipping the second derivative term of the Hessian (25) and including line search as above we get a damped Gauss-Newton algorithm with update vector

^

 (

i

)

N

(Z

N 



^

(

N i

))=



(

i

)

"X

N

t

=

1

J(

t

j

^

(

N i

))J(

t

j

^

(

N i

))

T

#

-

1 N

X

t

=

1

J(

t

j

^

(

N i

))" (

t

j

^

(

N i

))

 (29)

which is of the same form as the linear least-squares formula (21). The only trouble that can arise

here is that the rst sum produces a matrix that is singular or so close to singular that the inverse

cannot be computed accurately.

(9)

Such a situation can be handled eciently via numerically reliable SVD computations 13] as follows. An equivalent matrix formulation of (29) is

^

 (

i

)

N

(Z

N 



^

(

N i

))=



(

i

)hJ

TN

J

N

i-

1

J

TN

"

N  (30) where the matrix

J

N

2R

N d and the column vector

"

N

2R

N are constructed in the obvious way.

If we make the reasonable assumption that N > d , i.e., the number of measurements is larger than the number of parameters, then the Jacobian can be factored as 13]

J

N

=U V

T  (31)

where

U 2 R

N d and

V 2 R

d d are orthogonal matrices, and where

 2 R

d d is a diagonal matrix diag

(

1  2 :::  d

)

(all elements lying outside the main diagonal are zero) such that 1



2



:::



d



0 . The k 's are called singular values and the construction as such is known as singular value decomposition. As

U

T

U

is an identity matrix it immediately follows that

J

TN

J

N

=

U V

T

T

UV

T

=VU

T

U V

T

=V

2

V

T : (32) If this matrix is singular, then it holds that one or more of the last 2k 's are zero, and if it is close to singular some of the 2k 's will be small. Since the computation of the inverse becomes harder the larger the quote 21 = 2d becomes it is reasonable to consider the s singular values for which 21 = 2s is larger than, e.g., the machine precision  , while zeroing the rest d

-

s entries. This gives the approximation

J

TN

J

N

V

diag

;

21  22 :::  2s 0::: 0

V

T (33) from which the pseudo-inverse (or Moore-Penrose inverse) is computed as

h

J

TN

J

N

i

y

=V

diag

1

21  1 22 :::  1 2s 0::: 0

V

T : (34) Now, replacing the inverse in the update (29) by the pseudo-inverse has the eect that the s parameters inuencing the criterion t most are updated, whereas the rest d

-

s parameters are unchanged. This means that so called regularization is built into the method (see Section 2.3.4).

The damped Gauss-Newton algorithm is usually much more ecient than the gradient method, especially near the minimum where it typically shows similar convergence properties as the full Newton algorithm 9].

The Levenberg-Marquardt method. The Levenberg-Marquardt algorithm handles simulta- neously the update step size and the singularity problems through the update

^

 (

i

)

N

(Z

N 



^

(

N i

))=

"

N

X

t

=

1

J(

t

j

^

(

N i

))J(

t

j

^

(

N i

))

T

!

+



(

i

)I

#

-

1 N

X

t

=

1

J(

t

j

^

(

N i

))" (

t

j

^

(

N i

))

 (35) where the Hessian is guaranteed to be positive denite since 

(

i

)

> 0 . As is the case for the above procedures, it can be shown that this update is in a descent direction. However, 

(

i

)

must be carefully chosen so that the loss function also decreases. Avoiding to repeatedly solve (35) in the search for such a 

(

i

)

, we can again use the SVD (32), which expanded with the 

(

i

)I

term becomes

J

TN

J

N

+



(

i

)I=V

diag

21

+



(

i

)

 22

+



(

i

)

:::  2d

+



(

i

) V

T : (36) At this stage, the inverse is readily formed as before:

h

J

TN

J

N

+



(

i

)Ii-

1

=V

diag

1

21

+



(

i

)

 1

22

+



(

i

)

:::  1 2d

+



(

i

)



V

T  (37)

hence meaning that each line search iteration involves matrix multiplications only. Equation (37)

also provides useful insights in how the algorithm operates. A zero 

(

i

)

gives a Gauss-Newton step,

(10)

which close to the minimum is desired because of its tractable rate of convergence. By increasing



(

i

)

the inner diagonal matrix becomes more and more like a scaled identity matrix, and since

VV

T

=I

the update is essentially turned into a small gradient step.

Various strategies for choosing 

(

i

)

have been suggested in the literature, two of which are available in the developed software tool:

1. The Marquardt method 29] starts o with a 

(

i

)

> 0 and attempts to reduce it (typically a factor 10) at the beginning of each iteration, but if this results in an increased loss, then the step 

(

i

)

is repeatedly increased (typically a factor 10) until V N

(Z

N 



^

(

N i

+

1

))

< V N

(Z

N 



^

(

N i

))

. 2. Fletcher, see 29] for the algorithmic details, has devised another rather exible and more ecient step length strategy that is based upon a comparison of the actual performance with what should be expected with a truly quadratic criterion. Even if this approach is more complex than the former one it often gives faster convergence, see 29].

For ill-conditioned problems, 9] recommends the Levenberg-Marquardt modication. However, this choice is far less obvious when the pseudo-inverse is used in the Gauss-Newton update.

Stopping criteria. A last algorithmic issue to consider here is when to terminate the search. In theory, V N

0 (



)

is zero at a minimum, so an obvious practical test is to terminate once

j

V N

0(



)j

is suciently small. Another useful test is to investigate the relative change in parameters from one iteration to another and terminate if this quantity falls below some tolerance level. The algorithms will also terminate when a certain number of maximum iterations has been carried out, or if the line search algorithm fails to decrease the loss function in a predetermined number of iterations.

It is worth stressing that the three schemes above all return estimates that are at least as good as the starting point. Nonetheless, should the algorithm converge to a minimum, then it is important to remember that convergence needs not be to a global minimum but can very well be to a local one.

2.3.3 Constrained minimization

In quite a few modeling situations some or even all of the parameters have physical or linguistic signicance, and hence

D  R

d . To really maintain such a property it is necessary to take the corresponding parameter restrictions into account in the estimation procedure, i.e., constrained optimization methods are needed.

Therefore assume that there are l parameter constraints collected in a vector

c()=

c 1

()

c 2

( )

::: c l

()

T

2R

l  (38)

where each c j

()

is a well-dened function such that c j

()

> 0 for j

=

1::: l , thereby specifying a feasible parameter region

D

. There exist quite a few schemes that handles such constraints, see, e.g., 29]. An old but simple and versatile idea is to rephrase the original problem into a sequence of unconstrained minimization problems for which a Newton type of method (here the gradient one) can be applied without too much extra coding eort.

This is the basic idea behind the barrier function estimation procedure. Algorithmically speak- ing, the method starts with a feasible parameter vector ^

(

N 0

)

, whereupon the parameter estimate is iteratively obtained by solving (each iteration is started with the estimate of the previous iteration)

^

 (

k

+

1

)

N

=

arg min

2D

W N

(Z

N 

)=

arg min

2D 0

@

V N

(Z

N 

)+



(

k

)X

l

j

=

1 #

(

c j

())

1

A

 (39)

where, typically, 

(

k

) =

10

-

k with k starting from 0 and then increasing by 1 for each iteration

until convergence is obtained. In order to maintain a feasible estimate the barrier function #

()

(11)

is chosen so that an increasingly larger value is added to the objective function W N

(



)

as the boundary of the feasibility region

D

is approached from the interior at the boundary itself this quantity should be innite. The barrier function is sometimes chosen to be the inverse barrier function

#

(

c k

())=

c

-

k 1

()

 (40)

although more often the log barrier function

#

(

c k

())=-

log

(

c k

())

(41)

is used, as it usually do a better job 29].

At this stage one may wonder why it is not sucient to set 

(

k

)

to a much smaller value in the beginning. One reason is that if the true minimum is near the boundary, then it could be dicult to minimize the overall cost function because of its rapidly changing curvature near this minimum, thus giving rise to an ill-conditioned problem. One could also argue that the method is too complex as an outer iteration is added. This is only partially true as the inner estimate (especially at the

rst few outer iterations) needs not be that accurate. A rule of thumb is to only perform some

ve iterations in the inner loop. Finally, the outer loop is terminated once the parameter update is suciently small or when a number of maximum outer iterations has been carried out.

2.3.4 The bias-variance trade-o

In a black box identication setting the basic idea is to employ a parameterization that covers an as broad system class as possible. In practice, and especially for nonlinear series expansions (9), the typical situation is that merely a fraction of the available exibility is really needed, i.e., the applied model structures are often over-parameterized. This fact, possibly in combination with an insuciently informative data set

Z

N , leads to ill-conditioning of the Jacobian and the Hessian.

This observation also suggests that the parameters should be divided into two sets: the set of spurious parameters, which do not inuence the criterion t that much, and the set of ecient parameters, which do aect the t. Having such a decomposition it is intuitively reasonable to treat the spurious or redundant parameters as constants that are not estimated. The problem with this is that it is in general hard to make such a decomposition beforehand.

However, using data one can overcome the ill-conditioning problem and automatically un- veil an ecient parameterization by incorporating regularization techniques (or trust region tech- niques) 9]. When such an eect is built into the estimation procedure, as in the Levenberg- Marquardt algorithm, we get so called implicit regularization, as opposed to explicit regularization, which is obtained by adding another penalty term to the criterion function, e.g., as

W N

(Z

N 

)=

V N

(Z

N 

)+



(

k

)X

l

j

=

1 #

(

c j

())+

 2

- ]

2  (42)

where  > 0 is a small user-tunable parameter ensuring a positive denite Hessian and

] 2R

d is some a priori determined parameter vector representing prior parameter knowledge. Here the important point is that a parameter not aecting the rst term that much will be kept close to

]

by the last term. This means that the regularization parameter  can be viewed as a threshold that labels the parameters to be either ecient or spurious 30]. A large  simply means that the number of ecient parameters d

]

becomes small.

From a system identication viewpoint regularization is a very important means for addressing

the ever present bias-variance trade-o, as is emphasized in 20,22]. There it is shown, under fairly

general assumptions, that the asymptotic criterion mist essentially depends on two factors that

can be aected by the choice of model structure. First we have the bias error, which reects the

mist between the true system and the best possible approximation of it, given a certain model

References

Related documents

The semi-physical model (5) intimates that a linear model is bound to fail and in Figure 9 we see the result when a linear ARX model with the regressor (6) is simulated on

It is well known that for prediction error identica- tion of unstable systems the output error and Box- Jenkins model structures cannot be used.. The reason for this is that

The role of dynamic dimensionality and species variability in resource use. Linköping Studies in Science and Technology

Maximum Likelihood Identication of Wiener Models with a Linear Regression Initialization.. Anna Hagenblad and Lennart Ljung Department of Electrical Engineering Linkoping

Dygd och rättrådighet är sprunget ur samma väsen men skiljer sig åt på så sätt att om företeelsen står i relation till en annan person är den rättrådig 163 En

In Part III, we will see that “higher mental functions” tend to be modeled more in connectionist terms constrained (if at all) by psychological or psycholinguistic data (cf. the Part

1 uses both source context and translation context around the missing pronoun, by encoding a number of word embeddings n words to the left and m words to the right (hereby referred

On balance, the overall results procured from the ANN confirmed that the performance of ANN models is good enough in predicting of the target values of all three models in this