Parametric Time-domain models based on frequency-domain data (Module 7) Dr Tristan Perez Centre for Complex Dynamic Systems and Control (CDSC) Prof. Thor I Fossen Department of Engineering Cybernetics 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 1
Time-domain modelling approaches Two approaches can be distinguished for timedomain modelling: Full time-domain hydrodynamic codes, Time-domain models based on frequencydomain data. Here, we will focus on the second approach. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia
Frequency-domain Eq. of Motion In the hydrodynamic literature it is common to find the following model: [ M + A( ω)] & ξ ( t) + B( ω) ξ& ( t) + Gξ( t) = τ ( t) RB This is not a true time-domain model (Cummins, 196) exc This is valid to describe the steady-state response to sinusoidal excitations i.e., Frequency Response: ~ 1 ( ) ω [ MRB + A( ω)] + jω B( ) + G τexc ξ = ω ~ 1444444 444444 3 ~ denotes complex variable Force to Motion RAO 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 3
Cummins s equation Cummins (196), took a different modelling approach and consider the radiation problem ab initio in the time domain : The added mass matrix is constant frequency and speed independent. The convolution term accounts for fluid-memory effects. The kernel of the convolution is a matrix of retardation functions or impulse responses. This is a true linear time-domain model. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 4
Cummins s equation with forward speed The convolution terms depend on the forward speed. With forward speed appears a constant damping term. The restoring forces are affected by hydrodynamic pressure Lift, changes in trim. (Usually ignored for Fn<.3) 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 5
Ogilvie s relations If Cummins s Equation is valid for any input, it must then be valid for sinusoids in particular (Ogilvie, 1964). Ogilvie (1964) transformed the Cummins Equation to the frequency domain, and found that A( ω) = A 1 ω From the Riemann-Lesbesgue Lemma: B( ω) = B( U ) + ω B( U ) = K( t)sin( ωt) dt K( t)cos( ωt) dt A = lim A( ω) : = A( ) lim B( ω) : = ω B( ) 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 6
Non-parametric Representations Time-domain K( t) = [ B( ω) B( )]cos( ωt) dω π Frequency-domain K( jω) = [ B( ω) B( )] + jω [ A( ω) A( )] 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 7
19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 8 Parametric Representations Because the convolution is a dynamic linear operation, it can be represented by a linear ordinary differential equation state-space model: = ) ( ) ( τ τ τ d t r ξ K μ & C x μ B ξ A x x c r c c = + = & & = x n x x M 1 x
19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 9 Parametric Representations From the state-space representation, it follow = = ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( 66 66 61 61 16 16 11 11 s Q s P s Q s P s Q s P s Q s P s s c c c L M O M L B A I C K c c c t t B A C K ) exp( ) ( = Impulse Response Frequency-domain model (Transfer Function matrix) 1 1 1 1 ) ( ) ( q s q s b s b s b s Q s P n n n m m m m ij ij + + + + + + = L L Rational TF
Convolution replacement The convolution (non-parametric model) in the Cummins equation can be time and memory consuming for simulation. For analysis and design of a control system, the convolutions are not very well suited. The parametric state-space representation of appropriate order (n-order) eliminates the above problems. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 1
Convolution replacement τ w + μ r [ M + A( )] 1 K ( t τ ) ξ& ( τ ) dτ ξ & ξ G μ = K( t τ ) ξ& ( τ ) dτ r x& = A x + B ξ& μ r = c C x c c 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 11
Properties of the convolution terms Property limk( jω) = B( ) ω Implication on parametric models K(s) is zero at s= for U=. lim K ( jω) = ω + K( t = ) = [ B( ω) B( )] dω TFs strictly proper TFs relative degree 1 limk ( t) = t Re{ K ii ( jω)} Note: Bold symbols denote matrices. TF BIBO stable K(s) is passive => diagonal terms are positive real; off diagonal terms stable. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 1
Low-frequency limit (U=) K( jω) = [ B( ω) B( )] + jω [ A( ω) A( )] In the limit at low freq, B(ω) is zero, since there cannot be waves (Faltinsen, 199); thus the real part is zero for U= and -B( ) for U>. The imaginary part tends to zero as the following difference is finite: Note that regularity conditions for the exchange of limit and integration are satisfied. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 13
High-frequency limit (U=) K( jω) = [ B( ω) B( )] + jω [ A( ω) A( )] In the limit at high frequency, the real part is zero. The imaginary part also tends to zero by Ogilvie s relation and Riemann-Lebesgue Lemma: 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 14
Initial and final time (U=) Initial time: lim K( t) = lim [ B( ω) B( )] cos( ω t) dω = [ B( ω) B( )] dω + + t t π π Regularity conditions for the exchange of limit and integration are satisfied. The last relation follows from energy considerations (Faltinsen, 199): Final time: limk ( t) = lim [ B( ω) B( )] cos( ω t) dω = t t π Which follows by Ogilvie s relation and Riemann-Lebesgue Lemma. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 15
Passivity For U= and no current, the damping matrix is symmetric and positive semi-definite: From this follows the positive realness of the convolution terms and thus the passivity; that is these terms cannot generate energy. From energy considerations, it also follows that the diagonal terms of K(s) are passive. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 16
Parametric model identification The convolution replacement can be posed in different ways, which in theory should provide the same answer: B (ω) K(t) Time-domain identification Aˆ C ˆ c c Bˆ Dˆ c c A( ω), B( ω) Frequency-domain identification K ( jω) K ˆ ( s ) Model conversion Aˆ C ˆ c c Bˆ Dˆ c c In practice one method can be more favourable than the other. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 17
Parametric model identification Different proposals have appeared in the literature: Time-domain identification: LS-fitting of the impulse response (Yu & Falnes, 1998) Realization theory (Kristiansen & Egeland, 3) Frequency-domain identification: LS-fitting of the frequency response K(jω) (Jeffreys, 1984),(Damaren ). LS-fitting of added mass and damping (Soding 198), (Xia et. al 1998), (Sutulo & Guedes-Soares 6). 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 18
Time-domain identification From K(t) to state-space models. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 19
19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia Numerical computations of K(t) A key issue for time-domain identification is to start with a good impulse response computed from the damping. Numerical codes can only provide accurate computations of added mass and damping up to a certain frequency, say Ω. This introduces an error in the computation of the retardation functions: ω ω ω π ω ω ω π d t U d t U U t ) )]cos( ( ) ( [ ) )]cos( ( ) ( [ ), ( Ω Ω + = B B B B K ω ω ω π d t U U t ) )]cos( ( ) ( [ ), ( Ω B B K ω ω ω π d t U U t ) )]cos( ( ) ( [ ), ( Ω = B B Error
High-frequency values of A(ω) and B(ω) In the limit at high frequency the following tendencies are observed for the 3D damping and added mass: B αik βik ( ω) as ω Aik ( ω) Aik ( ) as ω ω ω ik As commented by Damaren (), this seems at odds with what is generally stated in the hydrodynamic literature! Note that there are no expansions involved to obtain these results, the only assumption is the linearity which results in a rational representation and the relative degree 1, which results from the integration of damping over the frequencies. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 1
Example Containership (Taghipour et al., 7a) The panel sizing was done to be able to compute frequencies up to.5 rad/s. Rule of thumb: characteristic panel length < 1/8 min wave length (Faltinsen, 1993). 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia
Numerical computations Extending the damping with tail prop to 1/ω B33 [Kg/s] B53 [Kgm/s rad] 6 x 17 4 B33 B33 ext w - 5 1 15 Freq. [rad/s] 6 x 18 4 B53 B53 ext w - B53 ext w - +w -4 5 1 15 Freq. [rad/s] B35 [Kgm/s rad] B55 [Kg m /s] 6 x 18 4 B35 B35 ext w - B35 ext w - +w -4 5 1 15 Freq. [rad/s] 3 x 111 1 B55 B55 ext w - 5 1 15 Freq. [rad/s] In this example, the tail α/ω is not a very good for B35 and B53 (.5rad/s is too low), whereas it is ok for B33 and B55. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 3
Numerical computations Sometimes it is necessary to extend the damping with asymptotic values: x 1 11 B55 B55 ext w -.5 3 x 111 Ω K( t) Bext ( ω)cos( ωt) dω π K55 K55ext B55 [Kg m /s] 1.5 1 K55 1.5 1.5.5 1 3 4 5 6 7 8 9 Freq. [rad/s] -.5 5 1 15 5 time [s] When doing time-domain identification, it is important to start from a good approx of the retardation function! Note the differences at t= +, and the errors at different time instants. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 4
Impulse response curve fitting Given the SISO SS realization of order n: The parameters can be obtained from The application of this method to marine structures was proposed by Yu and Falnes (1998). 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 5
Impulse response curve fitting It is hard to guess the order of the system by looking at the impulse response alone one should start with lower order and increase it to improve the fit. The LS-problem is non-linear in the parameters. This problem can be solved with Gaussian-Newton methods. The Gaussian-Newton methods are known to work well if the parameters initial guess are close to the optimal parameters. Since the initial value of the parameters is difficult to obtain from the impulse response, and these depends on the particular realization being chosen, the method is not very practical. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 6
Realization theory A key result of realization theory is the following factorization (Ho and Kalman, 1966): Hankel matrix of the impulse response values (constant along the anti-diagonals) Extended controllability matrix Extended observability matrix 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 7
Realization theory Kung s Algorithm (Kung, 1978): Singular value decomposition The number of significant singular values give the order of the system: 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 8
Realization theory Kung s Algorithm (Kung, 1978): The application of this method to marine structures was proposed by Kristiansen and Egeland (3). 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 9
Realization theory The problem is solved in discrete time Kung s algorithm obtains the model based on a SVD-factorization of the Hankel matrix of samples of the impulse response. If the impulse response is not accurate, it may in very large order systems The conversion from discrete to continuous often gives a matrix Dc in the state-space realization, which is inconsistent with the dynamics of the problem for the retardation function (relative degree 1). The MATLAB command impss implements Kung s algorithm, and chooses the order by neglecting singular values less than 1% of the largest one. impss requires using model order reduction afterwards (Kristiansen et al 5). The resulting models may not be passive. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 3
Example Container ship Singular values of the Hankel matrix of the samples of the impulse response. Normalised Singular Values 1.8.6.4. K33 K33ext Normalised Singular Values 1.8.6.4. K35 K35ext These suggest (based on the blue plots) 5 1 15 5 1 15 Normalised Singular Values 1.8.6.4. K53 K53ext Normalised Singular Values 1.8.6.4. K55 K55ext Order K33(s) = 3 or 4 Oder K35(s) = 5 or 6 Order K55(s) = 3 or 4 5 1 15 5 1 15 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 31
Example Container ship Impulse response fitting for K33(t) with a system of order 4. Identification method: impss + balmr (model order reduction). K33(t) K33(jw) Retardation function 3.5 x 17 3.5 1.5 1.5 -.5 Data Approximation order 4-1 5 1 15 5 Time [s] K33(jw) db Phase K33(jw) [deg] 155 15 145 14 135 13 15 Convolution Frequency Response 1 1-3 1-1 -1 1 1 1 15 1 5-5 Freq. [rad/s] K33(jw) K33(jw) order 4-1 1-3 1-1 -1 1 1 1 Freq. [rad/s] The identified model is not passive and does not have a zero at s=. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 3
Example Container ship Impulse response fitting for K33(t) with a system of order 3. Identification method: impss + balmr (model order reduction). Retardation function 3.5 x 17 3.5 1.5 1.5 -.5 K33(t) Data Approximation order 3-1 5 1 15 5 Time [s] K33(jw) db Phase K33(jw) [deg] 155 15 145 14 135 13 15 Convolution Frequency Response 1 1-3 1-1 -1 1 1 1 1 5-5 K33(jw) Freq. [rad/s] K33(jw) K33(jw) order 3-1 1-3 1-1 -1 1 1 1 Freq. [rad/s] The identified model is passive, but still does not have a zero at s=. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 33
Example Container ship Impulse response fitting for K35(t) with a system of order 5. 1 x 18 K35(t) Data Approximation order 5 18 17 K35(jw) Convolution Frequency Response 8 K35(jw) db 16 15 K35(jw) K35(jw) order 5 Retardation function 6 4 14 13 1-3 1-1 -1 1 1 1 1 Freq. [rad/s] Phase K35(jw) [deg] 5-5 - 5 1 15 5 Time [s] -1 1-3 1-1 -1 1 1 1 Freq. [rad/s] The identified model is passive, but still does not have a zero at s=. Note that the off-diagonal terms do not necessarily have to passive for K(s) to be passive (Unneland & Perez, 7). 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 34
Comments about Realization Theory Depending on the hydrodynamic data, it may be necessary to extend the damping at high freq. to have a good estimate the of the impulse response function before doing the idetification. Looking at the impulse response fitting alone is not a good criteria most properties are evident from the freq. response. Impss may require using model order reduction afterwards. The models almost never satisfy the low frequency asymptotic values (zero at s=). High-order models may not be passive; this can solved trying different orders or using a model order reduction method that enforces passivity. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 35
Frequency-domain Identification From K(jω) to K(s) 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 36
Frequency-domain identification We can fit a SISO TF to each entry of K(jω): Kˆ ( s) ij = P Q ij ij ( s) ( s) Where, P ij (s) deg Q ( s) = deg P ( s) + 1 has a zero at s= for U= or constant for U> Relative degree = 1; i.e., Stable ij ij 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 37
Relative degree condition From the finite initial time of the impulse response: lim K ( ) = lim [ ( ) ( )] cos( ) = [ ( ) ( )] + ij t + Bij ω Bij ω t dω Bij ω Bij dω t t π π From the Initial-value Theorem of the Laplace Transform: lim t + K ij ( t) = lim sk s ij ( s) = lim s sp ( s) Q ij ij ( s) = b m s s m+ 1 n. Hence for this to be finite n=m+1; relative degree = 1. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 38
Minimum order transfer function Because of the restriction of relative degree 1, the minimum order TF that can represent a convolution term is min K ij ( s) = s s b1s + a s + a 1 b1s + b + a s + a 1 U U = >,, Therefore, we can start with a system of order n=, and then increase the order until we improve the fitting at an appropriate level. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 39
Regression in the frequency domain In this method, a rational transfer function is fitted to the frequency response data: The application of this method to marine structures was proposed by Jeffreys (1984) and Damaren (). 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 4
Quasi-linear regression Levi (1959) proposed the following linearization: This can be obtained If we chose the weights in the nonlinear problem as which is affine in the parameters and reduces to a linear LS problem. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 41
Iterative Quasi-linear regression The quasi-linear regressor tend to have a poor fit a low freq. This can be avoided by solving the linear LS problem iteratively, starting with the quasi-linear regressor and using the parameters obtained to compute a weighing: k =,3,K After a few iterations, nonlinear problem is recovered. and the 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 4
Containership example Frequency-domain identification of K33(jw) order 3 Identification method: iterative quasi-linear regression (invfreqs.m) 16 Convolution Frequency Response 15 K33(jw) 14 13 1 11 1 1-3 1-1 -1 1 1 1 Freq. [rad/s] K33(jw) K33(jw) order 3 The model is passive and satisfy the asymptotic values. 1 Phase K33(jw) [deg] 5-5 -1 1-3 1-1 -1 1 1 1 Freq. [rad/s] 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 43
Containership example Frequency-domain identification of K35(jw) order 5 and K55(jw) order 3 Identification method: iterative quasi-linear regression (invfreqs.m) 18 Convolution Frequency Response 3 Convolution Frequenc y Response 17 K35(jw) 16 15 14 K35(jw) K35(jw) order 5 K55(jw) 1 19 K55(jw) K55(jw) order 3 13 18 1 1-3 1-1 -1 1 1 1 Freq. [rad/s] 17 1-3 1-1 -1 1 1 1 Freq. [rad/s] 1 1 Phase K35(jw) [deg] 5-5 Phase K55(jw) [deg] 5-5 -1 1-3 1-1 -1 1 1 1 Freq. [rad/s] -1 1-3 1-1 -1 1 1 1 Freq. [rad/s] 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 44
Reconstructing B(ω) B33 [Kg/s] 6 x 17 4 B33 B33 FD ident, order 3 B35 [Kg/s] 6 x 18 4 B35 B35 FD ident, order 5 4 6 Freq. [rad/s] 4 6 Freq. [rad/s] B53 [Kg/s] 6 x 18 4 B53 B53 FD ident, order 5 B55 [Kg/s] 3 x 111 1 B55 B55 FD ident, order 3 4 6 Freq. [rad/s] -1 4 6 Freq. [rad/s] 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 45
Reconstructing A(ω).6 x 18.4. A33 A33 FD ident, order 3 A33inf 3 x 19.8.6.4 A35 A35 FD ident, order 5 A35inf A33 [Kg] 1.8 1.6 1.4 A35 [Kgm]. 1.8 1. 1.6 1 1.4.8 1..6.5 1 1.5.5 3 3.5 4 4.5 5 Freq. [rad/s] 1.5 1 1.5.5 3 3.5 4 4.5 5 Freq. [rad/s] 3 x 19 9 x 111 A53 [Kgm].8.6.4. 1.8 1.6 A53 A53 TD ident, order 5 A53inf A55 [Kg m ] 8 7 6 5 A55 A55 TD ident, order 3 A55inf 1.4 1. 4 1.5 1 1.5.5 3 3.5 4 4.5 5 Freq. [rad/s] 3.5 1 1.5.5 3 3.5 4 4.5 5 Freq. [rad/s] 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 46
Comments about Freq.-dom. regression FD-identification avoids having to compute the impulse response from the damping The identification method is simplest: a series of linear LS problems easy to programme. The zero at s= and the relative degree can be enforced in the structure of the model, so the asymptotic values are always ensured. The resulting models may be unstable: this is fixed by reflecting the unstable poles about the imaginary axis. The resulting models may not be passive: this can be solved using weights in the LS problem. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 47
Simulink Model implementation After obtaining a state-space representation or the transfers functions, we can assemble a complete model: 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 48
References Perez, T. and T. I. Fossen (6) Time-domain Models of Marine Surface Vessels Based on Seakeeping Computations. 7th IFAC Conference on Manoeuvring and Control of Marine Vessels MCMC, Portugal, September. Perez, T. (7) Identification and Validation of a Time-domain Hydrodynamic Model of a Prototype Hull for a Wave Energy Converter (WEC). Technical Report. Centre for Complex Dynamic Systems and Control. Australia. Cummins, W., 196. The impulse response function and ship motions. Schiffstechnik 9 (1661), 11 19. Ogilvie, T., 1964. Recent progress towards the understanding and prediction of ship motions. In: 6th Symposium on Naval Hydrodynamics. Kristiansen, E., Egeland, O., 3. Frequency-dependent added mass in models for controller design for wave motion damping. In: Proceedings of 6th Conference on Maneoeuvering and Control ofmarine Craft, Girona, Spain. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 49
References Damaren, C.J. (). Time-domain floating body dynamics by rational approximations of the radiation impedance and diffraction mapping. Ocean Engineering 7, 687 75. Yu, Z., Falnes, J., 1998. State-space modelling of dynamic systems in ocean engineering. Journal of Hydrodynamics B(1), 1 17. Sutulo, S., Guedes-Soares, C., 5. An implementation of the method of auxiliary state variables for solving seakeeping problems. International shipbuilding progress (Int. shipbuild. prog.) 5, 357 384. Taghipour, R., Perez, T., Moan, T., 7a. Hybrid Frequency-Time Domain Models for Dynamic Response Analysis of Marine Structures. (To appear in Ocean Engieering) Taghipour, R., Perez, T., Moan, T., 7b. Time domain hydroelastic analysis of a flexible marine structure using state-space models. In: 6th International Conference on Offshore Mechanics and Arctic Engineering-OMAE 7, San Diego, CA, USA. 19/9/7 One-day Tutorial, CAMS'7, Bol, Croatia 5