An Iterative Algorithm for the Subspace Identification of SISO Hammerstein Systems Kian Jalaleddini R. E. Kearney Department of Biomedical Engineering, McGill University, 3775 University, Montréal, Québec H3A 2B4, Canada, (e-mail: seyed.jalaleddini@mail.mcgill.ca) Department of Biomedical Engineering, McGill University, 3775 University, Montréal, Québec H3A 2B4, Canada, (e-mail: kearney@mcgill.ca) Abstract: This paper describes an algorithm to identify state-space models for single input single output (SISO) Hammerstein structures based on input-output measurements. The algorithm consists of two main steps. First, a subspace algorithm is used to determine the system order and estimate the A and C system matrices. Estimation of the other state space matrices as well as the nonlinearity is then formulated as nonlinear optimization problem in which the state space model of the linear component and the coefficients of the basis function expansion of the nonlinear component are distinct. This formulation minimizes the number of parameters to estimate; moreover any one parameter is related to either the linear dynamics or thestaticnonlinearity.theunknownparametersarethenestimatedusinganiterativeprocedure that solves a least square problem at each step. Simulation studies using a well known model of ankle joint reflex stiffness demonstrate that the algorithm is accurate and performs well in the non-ideal conditions that prevail during practical experiments. 1. INTRODUCTION The Hammerstein structure consists of a zero memory static nonlinearity followed by a linear system as illustrated in Fig. 1, Hunter and Korenberg [1986]. Many physical and biological systems can be modeled with the Hammerstein structure. Three biological examples of Hammerstein systems are: reflex stiffness in human ankle joint, neural integrator model in human VOR and lung tissue mechanics. See Kearney et al. [1997], Chan and Galiana [21], Maksym et al. [1998]. Consequently, the identification of Hammerstein systems is an important problem. Many methods have been developed to identify Hammerstein structure. Stochastic methods estimate the linear component and the nonlinear part of the Hammerstein system with no a priori knowledge of the system. However, they require the input to be white, Billings and Fakhouri [1978], Greblicki [2]- a severe limitation since in practice it is rarely feasible to generate white inputs experimentally. Iterative algorithms have been developed to identify the Hammerstein structure without requiring the input to be either white or Gaussian. An iterative cross-correlation based algorithm described in Hunter and Korenberg [1986] was developed to identify Hammerstein models of the stretch reflex and lung tissue dynamics. This algorithm This work has been supported by Natural Sciences and Engineering Research Council of Canada and the Canadian Institutes of Health Research. updates an estimate of the nonlinearity s output at each step by using the inverse dynamic of the linear component. It does not require the input to be white but there are some limitations on the input distribution. Another class of iterative algorithms separates the parameters into two sets; one corresponding to the nonlinear component and the second from the linear element as first described in Narendra and Gallman [1966]. In the first step, one set of parameters is held fixed and the other set is found using a least square framework. The parameter sets are then interchanged and the same procedure used to estimate the optimal value for the second set. The algorithm repeats until it converges to the optimal parameter values. A separable least square method, developed in Westwick and Kearney [21] to identify the Hammerstein structure in ankle joint stretch reflex dynamics which uses a similar approach. Normally, these algorithm converge rapidly but there are some limitations on the convergence. Thus, in Stoica [1981] a well constructed Hammerstein system is described for which the algorithm failed to converge to optimal values. This problem was corrected by adding two steps to normalize the parameter estimates at each iteration in Bai and Li [24]. Moreover, the convergence criteria were addressed where was shown that if the initial point for the optimization search was selected correctly the algorithm would converge to the true values provided enough samples were available, i.e., it provides unbiased identification of the unknown parameters, Bai and Li [24]. Subspace methods estimate state space models for linear system with no a priori knowledge about the system, Copyright by the International Federation of Automatic Control (IFAC) 11779
Verhaegen and Dewilde [1992a], Verhaegen and Dewilde [1992b]. They are efficient computationally and can be extended to identify systems with different types of noise as shown in Haverkamp [21]. The Multivariable output error state space (MOESP) subspace algorithm has been extended to identify MIMO Hammerstein in Verhaegen and Westwick [1996]. The algorithm works by transforming the SISO nonlinear, Hammerstein system into a MISO linear system which is then identified using MOESP. Models estimated with this approach have excellent predictive capabilities but, as a result of the transformation to MISO, have many more parameters than the SISO system. Moreover, each MISO parameter depends on both the nonlinearity and the linear dynamics. Consequently, it is difficult to relate the parameters of the state space model to the properties of the original linear dynamics or static nonlinearity. Thus, when the method described in Verhaegen and Westwick [1996] was used to estimate a state space model for joint stiffness additional steps were required to determine the underlying nonlinearity and linear dynamics. See Zhao et al. [27] and Zhao et al. [28] for more detailed discussion. Specifically, the estimated state space model was simulated using the experimental input to predict the noise-free outputs, timedomain approaches were then used to estimate the linear dynamics and the shape of the nonlinearity. We recently addressed this problem by developing a twostep algorithm that estimated the coefficients of the basis function expansion of the nonlinearity and the state space model of the linear component separately in Jalaleddini and Kearney [211]. We used an MOESP algorithm, similartotheonepresentedinverhaegenandwestwick[1996], because of its potential of extension to closed-loop and/or time-varyingsystemsverhaegenanddewilde[1992b],verhaegen and Yu [1995]. The Hammerstein cascade was modeled in the context of nonlinear optimization problem in which a least square problem is first solved to minimize the prediction error. The solution of the least square problem yields estimates that are nonlinear functions of the unknown parameters. Therefore the second step involves a nonlinear optimization implemented as a singular value decomposition to estimate the unknown parameters. This algorithm was straightforward to implement, and worked well in a noise free environment. However it was not very robust in the presence of noise and moreover was difficult to implement for parallel-cascade structures. This paper presents an alternative approach to the same problem that is more robust in the presence of noise and can readily be integrated into a parallel cascade identification procedure. The new algorithm uses the same general formulation but solves the problem somewhat differently. The unknown parameters are grouped into two sets; the first set comprises the coefficients of the nonlinearity while the second set contains the parameters of the state space model of the linear component. By considering one set as fixed, the output can be linearly expressed as a function of the other parameter set. The algorithm then uses a least square approach to solve for unknown parameters of each group at each iteration. The paper is organized as follows. Section II, formulates the Hammerstein system model. Section III presents the new identification algorithm. Section IV describes the Fig. 1. Hammerstein system model. simulation and experimental results. Section V provides a summary and some concluding remarks. 2. PROBLEM FORMULATION This section presents the formulation for the Hammerstein structure that will be used for the identification algorithm. In this formulation, the nonlinearity is described using a basis function expansion and the linear subsystem as a state space model. Consider a SISO Hammerstein discrete system consisting, as Fig. 1 shows, of a static nonlinear block followed by a linear dynamic system. It will be assumed that the static nonlinearity can be approximated by: w(k) = f (u(k)) = n α i g i (u(k)) (1) i=1 where, g i ( ) is the i th basis function expansion of the nonlinearity (power polynomial, Tchebyshev, Hermite,...) and α i is its corresponding coefficient. It will be be assumedthatn samplesarerecorded,i.e.,k {,,N 1} where the signal u(k) is the input of the Hammerstein structure and y(k) is the output. The signal w(k) is the output of the nonlinear component - an intermediate signal that cannot be observed.the linear component is represented by the state space model: { x(k +1) = Ax(k)+Bw(k) y(k) = Cx(k)+Dw(k) where, x(k) is the state vector and assumed to be a m 1 vector.moreover,a m m,b m 1,C 1 m andd 1 1 arestate space model matrices. Assume the elements of B and D are represented by: B =[b 1,,b m ] T D =[d] (3) The measured output ỹ(k) is contaminated with additive noise, n(k): (2) ỹ(k) = y(k)+n(k) (4) Define the following vectors: α =[α 1,,α n ] T (5) U(k) =[g 1 (u(k)),,g n (u(k))] T (6) Substituting (5) and (6) in (2) yields: { x(k +1) = Ax(k)+Bα U(k) y(k) = Cx(k)+D α U(k) where B α and D α are given by: (7) 1178
b 1 α 1 b 1 α n B α =. (8) b m α 1 b m α n D α =[dα 1 dα n ] (9) It should be noted that the parametrization of the system is not unique. Thus, for any arbitrary scalar β, the vectors βb, βd and β 1 α represent the same matrix B α and D α. To avoid this problem, the following condition will be enforced to obtain a unique parameterization. Assumption 1. Let [α 1,,α n ] T = 1, where is the two norm and let the sign of the first non-zero element of [α 1,,α n ] be positive. Note that in (7), the total Hammerstein system is modeled as a multi-input single-output (MISO) system, i.e., the new input to the new system is U(k) which is a n 1 vector. Assume the matrices that are estimated by identification algorithm have the following structure: { ˆx T (k +1) = ÂTx(k)+ ˆB T u(k) ŷ(k) = ĈTˆx T (k)+ ˆD T u(k) (1) where, the subscript T indicates that the identification is achieved up to a similarity transform with the transformation matrix T. The hat symbol is due to errors in identification. Based on the similarity transform, the following can be deduced: b 1α 1 b 1α n ˆB T T 1 B α =.. (11) b mα 1 b mα n ˆD T D α = [dα 1 dα n ] (12) [ T The vector B = b 1,,b m] represents the effect of similarity transform i.e, B = T 1 B. 3. IDENTIFICATION ALGORITHM First, the MOESP algorithm is used to estimate the order of the linear component and the system matrices ÂT and Ĉ T fromtheconstructedinput(6),andthemeasurednoisy output ŷ(k). This estimation is described in Verhaegen and Dewilde [1992a], Verhaegen and Dewilde [1992b], Haverkamp[21]andVerhaegenandWestwick[1996]and is not repeated here. The objective now is to estimate the matrices ˆB T, ˆD T and the coefficients of basis expansion of the nonlinear block i.e., the vector α. The output of a system like (1) can be expressed using the state space representation matrices at each time Haverkamp [21]: k 1 ŷ(k) = Ĉ T Â k 1 τ T τ= ˆB T U(τ)+ ˆD T U(k)+n(k) (13) Definition 1. The Kronecker product of two matrices F R p q and G R r s is denoted by F G R pr qs and is given by (see Brewer [1978]): F 11 G F 1q G F G =.. (14) F p1 G F pq G A property of Kronecker product is: vec(fgh) = ( H T F ) vec(g) (15) where F, G and H are matrices with arbitrary dimension and the function vec( ) results in the stacking of the columnsofamatrix( )ontopofeachotherinatallvector. Now using the Kronecker product expressed in (15), the output of the system given in (13) can be expressed by: ŷ(k) = [ k 1 τ= U T (τ) ĈTÂk 1 τ T + [ U T (k) ] ) vec (ˆDT Define the following matrices: Y,N,1 = [ỹ(),,ỹ(n 1)] T ] ) vec (ˆBT,N,1 = [n(),,n(n 1)] T [ ] N 2 T Γ N =,, U T (τ) CA N 2 τ τ= Φ N = [ U T (),,U T (N 1) ] B = vec(ˆb T ) (16) D = vec(ˆd T ) (17) Now, (16) can be rewritten as the matrix equation: Y,N,1 = Ψθ +,N,1 (18) In this equation, the matrix Ψ is a N n(m + 1) data matrix: Ψ = [Γ N,Φ N ] (19) The vector θ contains the unknown parameters stacked in a single vector: [ B D] θ = = [ ] vec(b) vec(d) (2) Algorithm 1. The following algorithm estimates the unknown parameters b 1,,b m,d,α 1,,α n. Let j = 1 and assume: (1) Construct the matrix: ˆα() = [1,,1] T n 1 (21) 11781
11782
.8.7 (a) (b).5.6 1 Output.5.4.3.2.1.1.2 Estimated nonlinearity Simulated nonlinearity.5.5 Input IRF amplitude 5 1 Estimated IRF Simulated system 15.1.2 Lag (s).3.4 Output amplitude 1.5 2 2.5 3 3.5 4 4.5 Identified output Noisy output 1 1.5 11 11.5 12 12.5 13 13.5 14 14.5 15 Time (s) Fig. 4. Measured output along with the estimated output. Fig. 3. Simulated and identified Hammerstein system: (a) Estimated nonlinearity; (b) Impulse response of the linear component. break frequencies ranging from.1 to 2 Hz to mimic the experimental constraints since in practice rarely white inputs can be used to stimulate the system. Different realizations of Gaussian, white noise were added to the output to simulate measurement noise; the amplitude of the noise was adjusted to generate the required signal to noise ratio (SNR) defined as: ( ) RMSsignal SNR (db) = 2log 1 = 2db (3) RMS noise The model was simulated in MATLAB Simulink at 1 KHz for thirty seconds. The simulated input and output signals were decimated to 1 Hz for analysis purposes. The SISO nonlinear Hammerstein system was first transformed to a linear MISO system by constructing the new input (6) based on the first six terms of Tchebychev polynomial. Thepastoutput(PO-MOESP)algorithmwasthenusedto estimate the state space matrices ÂT and ĈT. Algorithm 1 was then used to estimate the remaining coefficients i.e., ˆB T, ˆDT and α. Fig. 3 shows the superimposed simulated and estimated models obtained with a SNR of 2 db and 2Hz cut-off for the input signal demonstrating that the estimation was very accurate. Thus, it is evident that the nonlinearity closely resembles the theoretical half wave rectifier. Similarly, the impulse response function (IRF) of the estimated linear component of the model Fig. 3(b) is very similar to that of the simulation (29). The estimated model was then used to predict the torque which, as Fig. 4 shows, was very similar to the simulated noisy output. This similarity was quantified in terms of the variance accounted for (VAF) between the predicted and noise-free simulated torques. ( ) var(ŷ y) VAF = 1 var(y) This was found to be 99.9% for this identification. (31) To assess the robustness of the algorithm, Monte-Carlo simulations were performed using different levels of output additive noise corresponding to SNRs from -5 db to 2 db. The accuracy of the new iterative algorithm was compared to that of the two-stage algorithm presented in %VAF 11 1 9 8 7 6 VAF using non iterative algorithm VAF using iterative algorithm 5 1 5 5 1 15 2 25 SNR (db) Fig. 5. Mean value of VAF bracketed by its standard deviation of 1 Monte-Carlo trials as a function of SNR. %VAF 12 1 8 6 4 2 VAF using non iterative algorithm VAF using iterative algorithm 2 1 1 1 1 1 Frequency (Hz) Fig. 6. Mean value of VAF bracketed by its standard deviation of 1 Monte-Carlo trials as a function of filter s break frequency. Jalaleddini and Kearney [211]. Fig. 5 shows the results of 1 Monte-Carlo simulations using both algorithms. Each point represents the mean %VAF, bracketed by the standard deviation. BothalgorithmsperformedwellwhentheSNRwasgreater than 1 db (i.e. VAF> 99%). Performance dropped somewhat for both at a SNR of 5 db. However, the iterative algorithms performed well for even low SNRs whereas the performance of the two-stage algorithm became very poor. Clearly, the iterative algorithm is more robust. Next we evaluated the performance of the two algorithms as the input spectrum became progressively more colored. Fig. 6 shows that both algorithm provide excellent estimates for frequencies greater than of 5 Hz. The two-stage algorithm s performance degraded dramatically for lower 11783
cut-offs while the iterative algorithm continued to give excellent results for filter cut-offs as low as.1 Hz. 5. CONCLUSION In this paper, the problem of identification of a single input single output Hammerstein system is investigated using a class of subspace identification algorithms, namely MOESP. The problem is first modeled in the context of nonlinear optimization problem which is then solved using an iterative algorithm. The algorithm is then implemented to identify the Hammerstein structure of the ankle joint reflex. Monte-Carlo simulations show the efficiency of the algorithm in the presence of non-white test input as well ashighadditivenoise.theperformanceofthealgorithmis also compared to the recently developed subspace method. It might be argued that the nonlinearity that we assumed for the model of reflex stiffness, i.e., half wave rectifier, is a piecewise linearity. However, the identification of this model made no a priori assumptions about the nonlinearity and treated it as a general nonlinear block. Despitethis,thealgorithmsuccessfullyestimatedboththe shape of the nonlinearity and the linear dynamics. The algorithm presented in this paper is an MOESP based algorithm and hence, it estimates the order of the system. The first advantage of this algorithm over the previous ones is that it gives explicit information on the coefficients of the nonlinearity and the linear dynamics. Another advantage of this algorithm in comparison to stochastic or correlation-based algorithms, it can provide unbiased results from data acquired in closed-loop. This is important since most human movements occur while interacting with compliant loads where joint position and torque are connected by feedback. REFERENCES E. Bai and D. Li. Convergence of the iterative Hammerstein system identification algorithm. IEEE Transactions on Automatic Control, 49(11):1929 194, 24. S. A. Billings and S. Y. Fakhouri. Identification of a class of nonlinear systems using correlation analysis. In Proceedings of IEEE, pages 691 697, 1978. J. Brewer. Kronecker products and matrix calculus in system theory. IEEE Transactions on Circuits and Systems, 25(9):772 781, 1978. W. Chan and H. L. Galiana. A nonlinear model of the neural integrator improves detection of deficits in the human VOR. IEEE Transactions on Biomedical Engineering, 57:112 123, 21. W. Greblicki. Continuous time Hammerstein system identification. IEEE Transactions on Automatic Control,45: 1232 1236, 2. L.R.J.Haverkamp. State Space Identification: Theory and Practice. PhD thesis, Delft University of Technology, 21. I. W. Hunter and M. J. Korenberg. The identification of nonlinear biological systems: Wiener and Hammerstein cascade models. Biological Cybernetics, 55(2-3):135 144, 1986. K. Jalaleddini and R. E. Kearney. An identification algorithm for hammerstein systems using subspace method. In Proceedings of IEEE American Control Conference, 211. R. E. Kearney, R. B. Stein, and L. Parameswaran. Identification of intrinsic and reflex contributions to human ankle stiffness dynamics. IEEE Transactions on Biomedical Engineering, 44(6):493 54, 1997. G. N. Maksym, R. E. Kearney, and J. H. T. Bates. Nonparametric block-structured modeling of lung tissue strip mechanics. Annals of Biomedical Engineering, 26: 242 252, 1998. M. M. Mirbagheri, H. Barbeau, and R. E. Kearney. Intrinsic and reflex contributions to human ankle stiffness: variation with activation level and position. Experimental Brain Research, 135(4):423 436, 2. K.S.NarendraandP.G.Gallman. Aniterativemethodfor the identification of nonlinear systems using a Hammerstein model. IEEE Transactions on Automatic Control, 11:546 55, 1966. P. Stoica. On the convergence of an iterative algorithm used for Hammerstein system identification. IEEE Transactions on Automatic Control, 26:967 969, 1981. M. Verhaegen and P. Dewilde. Subspace model identification part 1. the output error state space model identification class of algorithm. International Journal of control, 56(5):1187 121, 1992a. M. Verhaegen and P. Dewilde. Subspace model identification part 2. analysis of the elementary output-error statespacemodelidentificationalgorithm. International Journal of control, 56(5):1211 1241, 1992b. M. Verhaegen and D. Westwick. Identifying MIMO Hammerstein systems in the context of subspace model identification methods. International Journal of Control, 63 (2):331 349, 1996. M. Verhaegen and X. Yu. A class of subspace model identification algorithms to identify periodically and arbitrarily time-varying systems. Automatica, 31:21 216, 1995. D. Westwick and R. Kearney. Separable least squares identification of nonlinear Hammerstein models: Application to stretch reflex dynamics. Annals of Biomedical Engineering, 29:77 718, 21. Y. Zhao, D. Westwick, and R. Kearney. Decomposition of a parallel cascade model for ankle dynamics using subspace methods. In Proceedings of IEEE American Control Conference, pages 2944 2948, 27. Y. Zhao, D. Ludvig, and R. Kearney. Closed-loop system identification of ankle dynamics using a subspace method with reference input as instrumental variable. In Proceedings of IEEE American Control Conference, pages 619 624, 28. 11784