Invited Paper

Some recent developments in positive and compartmental systems Tadeusz Kaczorek Warsaw University of Technology Institute of Control and Industrial Electronics 00-662 Warszawa, Koszykowa 75,Poland e-mail: [email protected]

ABSTRACT Notions of the externally and internally positive standard and singular discrete-time and continuous-time linear systems are introduced. Necessary and sufficient conditions for the external and internal positivity of linear systems are given. It is shown that the reachability and controllability of the internally positive linear systems are not invariant under the state- feedbacks. By suitable choice of the state-feedbacks an unreachable internally positive linear systems can be made reachable and a controllable internally positive system can be made uncontrollable. The basic properties of continuous- time and discrete-time linear compartmental systems are derived and the relationships between the compartmental and positive systems are established. The realization problem for compartmental systems is formulated and partly solved.

Keywords: discrete-time and continuous-time linear systems, ,reachabilityand controllability

1. INTRODUCTION

In the last decade a dynamic development in positive and compartmental systems has been observed [2-21, 23-26]. Roughly speaking, positive systems are systems whose inputs, state variables and outputs take only nonnegative values. Examples of positive systems are industrial processes involving chemical reactors, heat exchangers and distillation columns, storage systems, compartmental systems, water and atmospheric pollution models. A variety of models having positive linear system behaviour can be found in engineering, management science, economics, social sciences, biology and medicine, etc. The basic mathematical tools for analysis and synthesis of linear systems are linear spaces and the theory of linear operators. Positive linear systems are defined on cones and not on linear spaces. This is why the theory of positive systems is more complicated and less advanced. The theory of positive and compartmental systems has some elements in common with theories of linear and non-linear systems. Schematically the relationship between the theories of linear, non-linear, positive and compartmental systems is shown in the Fig.

Fig. Positive linear systems, for example, satisfy the superposition principle. Limiting the consideration of positive linear systems only to R (the first quarter of R ')showsthat the theory of positive linear systems has some elements in common with the theory of non-linear systems. An overview of the state of art in positive systems theory is given in the monographs [8, 20]. Compartmental systems is a special subclass of the positive systems.

Photonics Applications in Astronomy, Communications, Industry, and High-Energy 1 Physics Experiments II, edited by Ryszard S. Romaniuk, Proceedings of SPIE Vol. 5484 (SPIE, Bellingham, WA, 2004) · 0277-786X/04/$15 · doi: 10.1117/12.568841

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx In this paper an overview of recent developments in positive and compartmental systems will be presented. Special attention will be devoted to the relationships between positive and compartmental systems and to the realization problem for compartmental systems. Besides known results some new results will be also presented.

2. EXTERNALLY AND INTERNALLY POSITIVE SYSTEMS

2.1. Discrete-time systems

Let R be the set of n X m matrices with entries from the field of real numbers R and R := R .Theset of n x m matrices with real non-negative entries will be denoted by R' and R := R" .Theset of non-negative integers will be denoted by Z. Consider the discrete-time linear system

(1 a) Ex1 =Ax2+ Bu1 , iEZ (ib) y=Cx+Du where X1E R , U1R' and y1 ERare the state, input and output vectors and E, A ER''BE CE R2,DE The system (1) is called singular if detE =0.IfdetE 0 then premultiplying (la) by E1 we obtain the standard system (2a) xi+1=A'x1 + B'u1 , iE Z (2b) yi=c,vi+D'u For the singular system (1) it is assumed that (3) det[Ez —A]0 for some zEC (the field of complex numbers)

Definition 1. The standard system (2) is called externally positive if for x0 = 0 and every U1E R,iE Z we have yiE Rfor i Z. Theorem 1. [18] The standard system (2) is externally positive if and only if its impulse response [CAB for i>O (4) giH [Dfori=O is non-negative g E R>

Theorem 2. [20] The standard system (2) is internally positive if and only if (5) A E R.Xfl ,BE R>

The standard internally positive system (2) is always externally positive.

2.2. Continuous-time systems.

Consider the continuous-time linear system (6a) EAx+Bu

2 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx (6b) y=Cx+Du x= x(t) R ,u= u(t) R' ,y =y(t) R are the state, input and output vectors, and dt E ,AE R flXflBR nxrn cER ,DE R The system (6) is called singular if det E = 0 .Ifdet E 0 then premultiplying (6a) by E1 we obtain the standard system (7a) xAx+Bu (7b) y=C+D'u For the singular system (6) it is assumed that (8) forsome SEC

Definition 3. The standard system (7) is called externally positive if for x0 x(O) = 0 and every u(t) E R ,t 0 wehave y(t)ER, for t0.

Theorem 3. [20] The standard system (7) is externally positive if and only if its impulse response matrix ICeAtBfor t>0 (9) g(t)= [D(t) for t=0 is non-negative g (t) E Rm for t 0 ,where6 (t) is the Dirac impulse.

Definition 4. The standard system (7) is called internally positive if for every x0 E R and all inputs u(t) E R, t 0 we have x(t) E R and y(t) E R for t 0.

Theorem 4. [20] The standard system (7) is internally positive if and only if A is a Metzler matrix (all off-diagonal . . Xm,-' entries are non-negative) and iE E pXn E pxin The standard internally positive system (7) is always externally positive. The standard internally positive system (2) and (7) will be shortly called positive.

2.3. Reachability and controllability of positive 1D systems without and with feedbacks.

Definition 5. The positive system (2) is called h-step reachable if for every XfcR (and x0 = 0 ) there exists a input = — sequence u. CR,i 0,1,... , h 1such that XhXf. Definition6. The positive system (2) is called reachable if for every x1 e R (and x0 = 0)there exists hEZ and

E R, i =0,1,...,h —1 such that Xh= Xf.

Definition7. Thepositive system (2) iscalled controllable if for every nonzero Xf, x0ERthere exists hE Z÷ and

ER, i =0,1 h—i suchthat Xh= Xf. Definition8. The positive system (2) is called controllable to zero if for every x0 ERthere exists hE Z and

u E R, i =0,1,...,h —1 such that Xh =0.

Theorem 5. [7,20] The positive system (2) is n-step reachable if and only if: i. rank R =ii

Proc. of SPIE Vol. 5484 3

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx 'H JqI S1STX IflUT5U0U XTJNUJ UI1STSUO3 JO U SUUJflJO3 JO 3flS T- JO 1 i/ "PuTT 1upudpuT suuinjo ipi uruniuo cjuo uo AT1TSOd i'ijU

(oT) =: 'uv'u] [u1_v" ><i qi ATTSOd ffl1S1cS (j) T uq TT T ds-u '[9'c] o

LU.IOflJ 9 L] [oz 'a AT1TSOd mSs (z) T Jq13JJoi1uoo JT pu ícjuo :JT 'T qi XUIIEftU uJ SlEfti i/ jJiuij iupudpui suwnjo qi uiuniuoo juo uo AT1TSOd '1cJ1U SnTPIII JO V ST > IT T1 JJSU1ll1 WOJJ T PM0TI UI Ut? 1TUTJUT ro 'U pu13dS ()d (V)d t 0X O X qmnu — sdis pui ()d 0 JT qi juiii moq °x o T P1Tflb1 ui 1JU iqmnu JO sdis 0 ic-j Sn fflfl55 liftil JOJ UI = t qi S3TJ1W Ut El JO (z) A4 qi TETU0U3 U_uOJ 0 T •••0 0 0 0 0 I •• 0 (ii) uI+ 00 ••O t 0 . . • O7_ n— '0v— T II ST 'S1 01 S 1T41 JOJ i) (1

(zi) =[UT_uV''GV'EJ])IU1L1 U — inq qi UOT1TpUO (o JO miotj c T IOU PTJST1S JT 11E 1S1T UO 1) 0 JOJ = • U' t • UJ SR S13 AT1TSOd m1S1cS (z) qITM i) (1 T iou dais-u •jqii.pi.i 1PT5UO i-T1 TU155 (z) TIITM )puqpJ-1131S (ci) 1X)I+4::fl

ST i.ji JqM )J UI !(t u InduT uoT1n1T1sqnJo (;j) oui (z) spj1c = (j) 'x X3V + W ! +z (ci) xu+v3v ioj (JJ) U13

(91) T_Uv...TvcOvIXF ji XTJIiTU (çj) siq mJoj 0 1 0 0 0 0...OtO 0 0 t " 0 o...too V(Lt) + V ... :4 0 0 0 ••• I T-1T0O 1...000 13— V— 13— 1J—••• 0 I Z T— t o...000 uisç (LI) uT11qo to...oo El d•3 : :.-i" a vu] 3 [WT-Uv3 oo...1o oo...o1 ujj qi suoT1Tpuo jo miop c pqsnts pur qi doo-psop misis si dais-u •JqBqo11 iopi tp uiojjoj mro siq uq pAoJd '6T] [oz m.ioqjL icr. qi AflTsod miss () qITM j) (j q iou dis-u Jqiq3iJ ujj qi dooj-psop mss (i'T) LflJM (Li) ST dis-u jqiqoii JT T1 qpj-is UT13 XTJW )j sij qi TUJoj (çj) D

4 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx Corollary 1. The n-step reachability of positive system (2) with (1 1) is not invariant under the state-feedback (13).

Remark 1. It is well-known [18] that if the pair (A, B) satisfies the condition (12) then it can be transformed by linear

state transformation =Px.,detP 0 to the canonical form (11) APAP', B=PB and [B,AB A'B]P[B,AB A'B] Note that the conditions of theorem 5 are satisfied if and only if P is a monomial matrix (in each row and colunm has only one positive entry and the remaining entries are zero). Consider the single-input system (2) with matrices A,B in the canonical form (1 1). In a similar way as in the reachability case it can be shown that the condition i) of theorem 6 is not satisfied if at least one of the coefficients a. 0 for I =1 ii— 1.Inthis case the positive system (2) with (1 1) is not controllable. The closed-loop system matrix (15) with (1 1) and state-feedback gain matrix (16) has the form (17). Note that the matrix (17) has all zero eigenvalues and its spectral radius pA )= 0. Therefore, the following theorem has been proved.

Theorem 8. Let the positive system (2)with(1 1) be not controllable. Then the closed-loop system (14) with (17) is controllable in a finite number of steps if the state-feedback gain matrix K has the form (16). o The considerations can be extended with some modifications for continuous-time positive linear systems. [20]

2.3. Singular linear systems.

Consider the singular discrete-time system (1) with m =p=1 and

(1 8) E = 01 R'>°,A= R LO 0] a 0

a1a11—10...01,B= ER1,C=[b0 b1 b1IER', D=0

1 If(3) holds then [Ez —Af'= z°'

where 1U is the nilpotence index and are the fundamental matrices satisfying the relation A=Ii (the ) for i =0 0(thezero matrix) for i 0

Theorem9. If the matrices E,A,B, C have the canonical form (18) and

(19) a0, (n>r) then (20) 'k B E R for k =—ji,1—

(21) E RXfl fori E Z.

Proc. of SPIE Vol. 5484 5

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx (22) 1 E Rfor j=1— ji,2— ji,... Theproofisgiven in [11]

Theorem 10. The singular system (1) with (18) is externally and internally positive if (19) hold. The proof follows from the relations (20)-(22). The considerations with some modifications can be extended for continuous-time singular systems (6) [16].

3. COMPARTMENTAL SYSTEMS

3.1. Continuous-time systems

The compartmental systems consist of a finite number of subsystems called compartments [20] .Considera compartmental system consisting of n continuous-time compartments. Denote by x1=x(t) (i= 1 ,2n) the amount of a material of the ith compartment. Let F1O be the output flow of the material from the jth to the ith compartment and F0 be the output flow of the material from the ith compartment to the environment. Let u=u(t) be the input flow of the material to the ith compartment from the environment. It is assumed that the input material is mixed immediately with material being in the compartment. From the balance of material of the ith compartment we have the following differential equation (23) (F;. _i.1)+u _ifor i=1,2 n

It is assumed that the flow F11 depends linearly on x, i.e.

(24) F=fx fori=O,1 n;j=1,2 n

wheref' is a coefficient depending, in the general case, on x1 and the time instant t. Thesystem is linear iff1 is independent of x1 and it is additionally time-invariant if fi. is independent of t. Using(23) for i= 1 ,2,. ..,nand (24) we obtain the state equation of the compartmental system (25) x=Fx+Bu where .. . xl u1 fllfl2 (26) x= 2, , F='' 2 ,:=—f0—f,BI

xn Un f1 f2 .. . Notethat in every time instant the output flow of a compartment cannot be greater than the whole mass of material being inside the compartment, i.e. (27) fi 0 and ftO for (i,j=1,2,...,n) Definition 9. The matrix F satisfying the conditions (27) is called the compartmental matrix of the continuous-time system. The first condition (27) says that the sum of entries of every column of the matrix F is not positive. The compartmental matrix is a particular case of the Metzler matrix, since fO for The output equation has the form (28) y=Cx where CER2'. Therefore, the continuous-time compartmental systems are a particular case of the internally positive systems.

3.2. Discrete-time systems

Consider a compartmental system consisting of n discrete-time compartments.

6 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx In discrete-time compartmental systems the flows of materials are considered only in discrete time instants t1,t2• Itis assumed that the neighbouring time instants are shifted from each other by the unit of time, i. e. tk+]=tk+ 1 Let x1(k), i= 1,2 ,•..,nbe the amount of a material in the ith compartment at the time instant k. Denote by G1(k) the output flow of the material from the jth to the ith compartment between the kth and (k+1)th time instant and by G0(k) the output flow of material from the ith (i=1,2,,n) compartment to the ellvironment. It is assumed that G1(k) depends linearly on x(k), i.e. (29) G1(k)=gx1(k) for i=O,1 n; j=1,2,...,i

where gjj is a coefficient depending, in the general case, on x1 and the discrete-time instant k. The system is linear if gij is independent of x1(k) and it is additionally time-invariant if g is independent of k. Let u1(k) be the input flow of the material to the ith compartment from the environment at the time instant k. From the balance of material of the ith compartment at the time instant k+ 1 we have the following difference equation (30) x1(k + 1) = gx (k) + gx(k) + u(k)

where g1x(k) is the amount of material in the i-th compartment at the time instant k, i.e. (31) gx(k)=x(k)—g0x(k)—gJx(k)= 1—gQ—g x(k) From(31) wehave (32) g =1_g0_g1i12 fl Note that if u(k)=O then the output flow of material at the time instant k+ 1 of the jth compartment cannot be greater than the whole mass of material being inside the compartment at the time instant k, i. e.

(33) forj=1,2,...,nand

Definition 10. The matrix GE RXlsatisfyingthe conditions (33) is called the compartmental matrix of the discrete-time system. The first condition (33) says that the sum of entries of every column of the matrix G is not greater 1. Using (30) for i=1,2,...,n we obtain the state equation of the compartmental system (34a) x(k+ 1)=Gx(k)+Bu(k) where x1(k) ii1(k) g1, g12 .. . g1,

2 2 21 g ...g =x(k) =u(k) =g 2 = x(k) , u(k) G •22 , BI

x(k) u(k) g,1 g2 ...g,, The output equation of the compartmental system has the form (34b) y(k)=Cx(k) whereCERpXn The discrete-time compartmental systems are particular cases of the internally positive systems.

4. RELATIONSHIP BETWEEN POSITIVE AND COMPARTMENTAL SYSTEMS

Let M be the set of Metzler matrices A =[ad]ERX satisfyingthe condition = 1,. (35) a2 0 for ij;i,j ..,n

Proc. of SPIE Vol. 5484 7

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx and Cbethe set of compartmental matrices A =[a jE R' satisfying the conditions (35) and (36) aO forj=1,...,n Adiagonalmatrix D=diagd1,d2,...,d iscalledpositiveif d. >0fori=1,...,n. The matrix A E RflX of the system (7) is asymptotically stable if and only if all its eigenvalues have negative real parts [18].

Theorem11. Let A =[a]ER' be asymptotically stable. Then A E M if and only if there exists a positive D such that DAD' E C. Proof.By assumption the matrix A is asymptotically stable and therefore it is non-singular. To prove that if A EM then there exists a positive diagonal matrix D such that DAD1 Cletus define = (37) Ddiag{—[1,1,.. . ,1]A'}=diag[d1,d2,.. . ,dI It is well-known [20] that —A1ERX andall columns of —A1are nonzero.

Therefore from (37) we have d. > 0fori =1,. . . ,nand the matrix D defined by (37) is positive diagonal. Using (37) we obtain

a11 a12* ... a1- DAD1 = •• • (38) a21- a22 a2- a1-a2* •.. a The matrix (38) satisfies the condition (36) and it belongs to the set C since

[1,1,...,1IDAD1 =[d1,d2,...,dIAD'=—[1,1 11A1AD' _—[1,1,...,1]D'_

Fromdefinitions of the sets M and C it follows that if DAD1 E CthenA E M From Theorem 1 1 we have the following important corollary [4].

Corollary 2. A positive asymptotically stable system (7) is diagonally equivalent to a suitable compartmental system. The above considerations can be extended for discrete-time systems as follows. Let Cdbethe set of matrices A =ajE R satisfying the conditions (39) 1forj=1,...,n The discrete-time system (2) is asymptotically stable if and only if all eigenvalues of its matrix A have moduli less 1 [20].

Theorem 12. Let A =[aI E R!Xbeasymptotically. Then A E R if and only if there exists a positive diagonal matrix Dd such that DdAD;' E Cd.

Proof.By assumption the matrix A is asymptotically stable and therefore the matrix— 111A]is non-singular. Let use define (40) Dd =diag{[1,1,...,1][I—A]1}=diag[d1,d2 ,...,d] It is well-known [20] that [I —A]1E RXandall columns of [I —A]are nonzero. Hence the matrix (40) is positive diagonal.

8 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx The matrix A satisfies the conditions (39) if and only if [1,1,. .. ,1jI —A] [0,0,. .. ,O]and the condition Dd AD;1 E Cd equivalent to the condition [1,1,. .. ,1]Dd[I _A]D' [0,0,. .. ,O] Using(40) we may write [1,1,...,1]Dd[I —A]D1=[dd2,...,dj[I — A]D'=

— — = [1,1,...,1][IA]'ID]D;1=1,1,...,1]D;1= >O,O,...,O]

Therefore, the matrix Dd AD1 belongs to the set Cd. FromTheorem 12 we have the following corollary.

Corollary 3. A positive asymptotically stable system (2) is diagonally equivalent to a suitable compartmental system.

5. REALIZATION PROBLEM OF POSITIVE AND COMPARTMENTAL SYSTEMS

5.1. Positive systems

The transfer matrix of the discrete-time system (2)isgiven by (41) T(z)C[Iz—A]'B+D R'm(Z) where Rm (z)isthe set of proper rational matrices with real coefficients. For the given matrices A, B, C, D there exists exactly one transfer matrix (41). On the contrary, for a given matrix T(z) E RPXrn (z)thereexist many different matrices A, B, C and D even of different dimensions that satisfy the equality (41).

Definition 11. Matrices A, B, C and D satisfying the equality (41) are called a realisation of a given transfer function matrix T(z). LI

Definition 12. A realisation (A, B, C, D) is called minimal if the matrix A has minimal dimension among all realisationsof T(z). LI The positive realisation problem of discrete-time systems can be formulated as follows. Given a proper rational transfer matrix T(z) R"> 0) ,thereexists a realisation.. of the form example, z+a,(a A =[—a],B =b1,C =[11,D = but it is not positive if a > 0 .Theproblem arises under which conditions a given matrix T(z) has a positive realisation. In a similar way the realization problem can be stated for continuous-time linear systems (7). In this case the condition A E RX should be replaced by the condition A E M (the set of Metzler matrices). The following theorems formulate the necessary and sufficient conditions for the existence of positive realizations of a given transfer function T(p), where p =zfor the discrete-time system and p =sfor the continuous-time system [4, 20].

Proc. of SPIE Vol. 5484 9

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx Theorem 13. Let {F, g ,h}be any minimal realization of dimension n of the transfer function T(z) .Thenthere exists a positive realization of dimension N n of T(z) if and only if there exist matrices A ER><',bR ,cE R and P E RN such that (42) FP =PA,g =Pb,c =hP The positive realization of T(z) is given by {A, b, c}.

Theorem 14. Let {F, g, h} be any minimal realization of dimension n of the transfer function T(s) .Thenthere exists a positive realization of dimension N of T(s) if and only if there exists a E R and matrices A E , bER,cERNand P E RXN such that (43) (F+aI)P=PA, g =Pb,c=hP The positive realization of T(s) is given by {A —cxl,b, c}.

5.2.Compartmentalsystems

Consider the continuous-time linear compartmental system [6, 7] (44a) x=Ax+Bu (44b) y=Cx+Du where X E R ,uE R ,yE R are the state, input and output vectors, respectively and A=[a]E R isaMetzlermatrix(a j),BE R",CE R,DE RX Thematrix A [a I RX is called the compartmental matrix of (44) if and only if (45) 1AOT

where 1,,= 111,1 . . . 11E R' 0 =110 0...OIT R' and T denotes the transpose. Let Cbethe set of n X n compartmental matrices of the continuous-time system (44). The system (44) is the compartmental continuous-time linear system if and only if [6, 7] (46) AC , BE R ,CE RX D E Rm The transfer matrix of (1) is given by (47) T(s) =C[Is_A]1B+DE RP><(s) where R pX,,(s)is the set of p X m proper rational matrices of s. Matrices (46) are called a compartmental realization of T(s) if they satisfy the equality (47). The realization will be denoted by (A, B, C, D) .Arealization (A, B, C, D) is called minimal if the dimension n of A E RX is minimal among all realizations of T(s) . Therealization problem for compartmental continuous-time linear systems can be stated as follows.

Problem 1. Given an proper rational matrix T(s) E R "(s).Compute the matrices (46) satisfying the equality (47). Now let us consider the discrete-time linear compartmental system [6, 7] (48) x. =Ax.+ Bu. i E Z ={O,1,...} = Cx +Du1 where x. E R ,uE R ,yE R are the state, input and outputvectors, respectively and A E B e R, C E R, D E Rpm. The matrix A E RX is called the compartmental matrix of (48) if and only if

10 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx (49) 1A1 Let Cd be the set of fl X fl compartmental matrices of the discrete-time system (48). The system (48) is the compartmental discrete-time linear system if and only if [5,6] (50) AC,BE ,CE R> D E Rm The transfer matrix of (48) is given by (51) T(Z)=C[IZA11B+DER(Z) Matrices (50) are called a compartmental realization of T(z) if they satisfy the equality (51). The realization will be denoted by (A, B, C, D) .Therealization problem for compartmental discrete-time linear systems can be stated as follows.

Problem 2. Given an proper rational matrix T(z) E Rm (z). Computethe matrices (50) satisfying the equality (51). The solution of Problem 1 is based on the following theorem

Theorem 15. Let A RXbean asymptotically stable Metzler matrix. Then there exists a generalized permutation P such that (52) A=PAP1 is a compartmental matrix of (44). Proof. If A is an asymptotically stable Metzler matrix then —A'R and all its columns are nonzero [6, 7]. Thus the row vector (53) pT =—lÀ-'=[p,p2 .. . pj has positive components, p. > 0, i 1,. .. , n.

Let P be a generalized with its column containing only one positive entry equal to p ,i=1,... , n. Hence (54) 1P=pT The matrix (52) is a compartmental matrix of (44) if the condition (45) is satisfied, i.e. (55) 1 AT 1 PAP' 0: From (55) and (54) we have pTAP' 0 and after postmultiplication by P we obtain pTA 0 or (56) ATp0 Substitution of (53) into (56) yields ATp =AT(—1A')T =—1'"< Q. Theorem1 5 allow us to reduce the solution of Problem 1 to the following two steps procedure.

Step 1. Compute an asymptotically stable realization (A, B, C, D) with A being a Metzler matrix and B ER,CE D E R of the given T(s) R (s).

Step 2. Using (52) and (53) compute a generalized permutation matrix P and the desired compartmental realization (A,B,C,D) where (57) A=PAP',B=PB,C=CP',D=D Remark 2. If the matrix A satisfies the condition (45) then P =Iand from (57) we have A =A,B =B,C =C. Remark 3. For different matrices P we obtain in general case different compartmental realization (57) of T(s). It is easy to check that C[Is —A1'B+D =C[Is—A1'B+ D. Remark 4. For computation of (57) P =diaglip, 2pjis recommended.

Proc. of SPIE Vol. 5484 11

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx To simplify the considerations we shall assume m =p=1 (SISOsystem). Let the irreducible transfer function of (44) have the form

bs+•••+bs+b1 0 T(s)= - s+a1s'+•••+a1s+a0 Then (58) D=limT(s)=b Let us assume that the strictly proper transfer function can be written in the form

1. 0'\ (, ,0 (59) T (s) = =c ' S2) 5 5 p T(s)—D (s-S1)(s-S2)•'•(s-s)

where •• • , • Sare S1°,S2°, s°1and s ,S2,, the real zeros and real poles (not necessarily distinct). It can be easily shown that the matrices • • • Si 0 0 0 0 1 s—so s ••• 0 0 0 1 (60) A= • • • ,B= ,C=[O•••Oc] Si— S1 S2 — S2 S2 — S2 S1 0 C — C0 C — . . . C — C0 C — ( 1 1 2 2 —2 —2 —1 —1 satisfythe equality (61) C[Is —A]'B=T(s) The matrix A in (60) is an asymptotically stable Metzler matrix if

(62) Sk< 0 fork 1,. . . ,nand SSkfork 1,. . . ,n—1 Therefore,we have the following theorem.

Theorem 16. Let S1°, , S°1andS1, , S bezeros and poles of the strictly proper part (59) of the proper rational function T(s) .Thenthere exists a minimal compartmental realization (A ,B,C,D)ofT(s) if the conditions (62) are satisfied and b > 0,C > 0.

Proof.If the conditions (62) are satisfied then the matrix A defined by (60) is an asymptotically stable Metzler matrix and by Theorem 1 there exists a generalized permutation matrix P such that A =PAP'is a compartmental matrix,BPBER and C CP1ER for C>O.From(58)itfollowsthatD Db >Oifb >0. Toshow that the realization (A, B, C, D) is minimal it is enough to prove that the pair (A, B) is controllable, i.e. (63) rank[Is —A,B] =nfor all s EC (thefield of complex numbers) and the pair (A, B) is observable, i.e.

[I —s- = nfor all s E C (64) ranklLC Itis easy to verify that the conditions (63) and (64) are satisfied for (60).

Example 1. Consider the proper transfer function 2s2+7s+7 s+3 (65) T(s)= =2+ s2+3s+2 s2+3s+2 In this case

12 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx D=limT(s)=b =2 and s+3 (66) T (s)= sp (s+1)(s+2)

withC= 1, SD 3 andS1= —1, S2 —2. Itis easy to see that the conditions of Theorem 16 are satisfied and there exists a minimal compartmental realization of (65). Using (60) we obtain 1 (67) A = =r- i 1,B=[1 c= [0 1] Ls1 — 5i° ] [ 2 — 2] [1] Thematrix A in (67) is a Metzler matrix but it is not a compartmental matrix since the condition (45) is not satisfied for its first column. Using (53) we obtain r-i 01' pT =—1,A'=—[1 = [2 0.5] 11L 2 —2] r 01r20 1 For P =I I = I I wehave LO p2j L0 0.5] =PAP1=r10lHpB[2lcp1[02] LOS—2] LOS] rop21 ro 0.51 and for P =I I I I we obtain L0] L2 0] — r-2 o.sl_ ro.sl A=PAP'=I I,B=PB=I I,C=CP'=[2 0] L0 -1] L2] Notethat s+3 _2 1 (s+1)(s+2) s+1 s+2 Thereforethe realization [2] r—i ol[ii —1] A=L ]B=[]C=[2 isnot a positive realization of (64). The solution of Problem 2 is based on the following theorem

Theorem 17. Let A E RXbean asymptotically stable matrix. Then there exists a generalized permutation matrix P such that (68) A=PAP' is a compartmental matrix of (48).

Proof. If A E R< is asymptotically stable then [I —A]'E RXandall its columns are nonzero [5,6]. Thus the row vector — (69) pT =1[I A]1=[p1p2 .p]

Proc. of SPIE Vol. 5484 13

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx has positive components, p1 > 0, i 1,. .. , n. Let P be a generalized permutation matrix with its ith column containing oniy one positive entry equal to p.,i=1,...,n.Hence (70) 1P=pT The matrix (68) is a compartmental matrix if the condition (6) is satisfied, i.e. (71) 1A1PAP1 1 From(71) and (70) we have —pT[I—A]P' O and after postmultiplication by P we obtain —pT[I—A] O or (72) —[I—A]Tp 0 Substitution of (69) into (72) yields —[In _A]Tp=-[Ifl-A]T(1[I—A]1)T=—1 <0 Theorem 17 allow us to reduce the solution of Problem 2 to the following two steps procedure.

Step 1. Compute an asymptotically stable positive realization (73) A R ,BRX C RXDE R of the given T(z) E R"(z).

Step 2. Using (69) compute a generalized permutation matrix P and the desired compartmental realization (A,B,C,D), where (74) A=PAP1,B=PB,C=CP1,D=D It is easy to check that C[I z— A]1B C[I z— A]1B.

Remark 5. For computation of (74) P diag[p1 p2 •• • pjis recommended. Remark 6. If the matrix A satisfies the condition (49) then P I and from (74) we have A A, B B, C C. Let for m =p=1the irreducible transfer function of (48) have the form

bz++bz+b1 0 (75) T(z)= -1 zn +a + a1z+a0 Then (76) D=limT(z)=b Let us assume that the strictly proper part of (32) can be written as (zz1)(z z2) (z z1) (77) T (z)=T(z)—D=c p (zz1)(zz2)•(Zzn) whereZ°,, Z° and Z1 ,",z arethe real zeros and poles (not necessarily distinct). It can be easily shown that the matrices •.. Z1 0 0 0 0 1 Z—Z0 Z 0 0 0 1 (78) A ,B= ,C=[00 c] — z2 z1 —z1 z2 z2 — z2 z1 0 Z1 —Z Z2 —Z Z2 —Z2 Z1 — Z Zn 1 are a positive asymptotically stable realization of (77) if

14 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx (79) Zk for k=1,...,n—1 and b >0

Therefore,we have the following theorem.

and be Theorem 18. Let z°, , z1 z1,, z, zeros and poles of the strictly proper part (77) of the proper rational function T(z) .Thenthere exists a minimal compartmental realization (74) of T(z) if the conditions (79) are satisfied. The proof is similar to the one of Theorem 17.

Example 2. Consider the proper transfer function 2z22.4z +0.74 (80) T(z)= z2 l7z+072 In this case using (76) we obtain (81) D=limT(z)=b=2 and z—0.7 z—0.7 (82) TP(z)=T(z)—D= z2— 1.7z+0.72 (z— 0.9)(z—0.8) withC =1,zO.7,z1 0.9 and Z2 0.8. It is easy to see that the conditions (79) are satisfied and there exists a minimal compartmental realization of (80). Using (78) we obtain [ z 01 ro.9 ol [ii (83) A=I 1=1 I,B=II,C=0 11 Lz1-z1° z2j [0.20.8J [1] The matrix A in (83) is nonnegative but it is not a compartmental matrix since the condition (49) is not satisfied for its first column. Using (69) we obtain = — = PT1[IA]1[205] rp'01 r200l For P =I I I Iwehave [0p2j L0 5] _ [0.9 01- r2ol _ A=PAP1=i ,B=PB=I J,C=CP1=[0 0.2] [0.05 0.8] Li Notethat z—0.7 —_ 2 1 (z- 0.9)(z-0.8) z -0.9z-0.8 Therefore,the realization [2] [0.90 1 ru A=I I,B=II,C=[2 —1] [ 0 0.8] [1] isnot a positive realization of (82). Consider the discrete-time system (48) with the irreducible transfer function •. b1z1++b1z+b0 (84) T(z) = = —• — a1z— tkZ z— a1z a0 with in general case multiple and complex poles and zeros. From (84) we have (85) b1z'++bz+b0=(z—a1z'1 azatz) Comparisonof the coefficients at like powers of z of (42) yields

Proc. of SPIE Vol. 5484 15

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx •lb —k +a—1t k—i +•••+a—k—1 1t for 1kn ( 86) tk = [altkl aOtk for k> n

Theorem19. There exists a minimal compartmental realization (A, B, C) or (A, B1 ,C1)where b 1 OO•••OOa0 b 0 (87) A= 1 ...9....:. :' ,C[00 1I,B ,C1 =[t1,t2,...,tj : . .. ,B . : 00•••Ola-1 b1 0 of (84) if

(88) ak0,bk for k=0,1,...,n—1 and ak 1

Proof. Itis easy to verify that the matrices (87)satisfy equalitiesCIIIz —A]'B =T(z)and

C,[Iz —A]'B =T(z).Ifthe conditions (88) are satisfied then A E R' ,1 A 1, BE R and C E From (86) it follows that (88) implies tk0, k =1,.. . , nand C, E RX Therefore,the realizations (A, B, C) and (A, B1 ,C1)areminimal compartmental realizations of (84).

Example 3. Compute the minimal compartmental realization (A, B, C) and (A, B, ,C,)of the transfer function z2+3z+2 (89) T(z) = z3 — 0.4z2—0.28z—0.04

The transfer function (89) satisfies the conditions (88) and its zeros and poles are Z =—1,z= —2and — z,= —0.2+ iO. 1, z2 =—0.2iO.1,i =, z, = 0.8,respectively. Using (87) and (86) we obtain the desired compartmental realizations (A, B, C) and (A, B, ,C,)with 0 0 0.04 2 1 A= 1 0 0.28 ,B= 3 ,C=[0 0 1],B,= 0 ,C,=II1, 3.4, 3.64] 010.4 1 0 The considerations can be extended for continuous-time systems as follows. Consider the continuous-time system (44) with the irreducible transfer function b s''+•••+bs+b' ° = (90) T(s) = ' tkS —a_1s —•••—a1s—a0 k=1 within general case multiple and complex zeros and poles. The coefficients bk,ak , k=0,1,...,n —1and tkarerelated by (86). It is easy to show that [6] if matrices A, B, C are a realizations of T(s —a) thenthe matrices A —Ia,B, C are a realization of (90).

Theorem 20.Thereexist minimal compartmental realizations (A —Ia,B, C) and (A —Ia,B,, C,) of (47) if there is — a scalar a such that the coefficients bk ,k=0,1,..., n 1of the transfer function

16 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx + + bs+ b - (91) T(s-a)= S —a?_ls ——a1s—a0 k=1 satisfy the conditions

(92) 0, bk 0 ,k=O,1,...,n—1and 1 where oo...ooao - 1 (93) A= ,C=[O••O1],B1= 9...:.•: 9 ,B='. oo•••oii:-1 :- 0 The proof is similar to the one of Theorem 19.

Example 4. Consider the transfer function 2s+3 (94) T(s) = s2+2.5s+1 Replacing s by S— afor a =1.5 in (94) we obtain the transfer function 2s (95) T(s —1.5)= = 2s1 + 2 s2+0.5s—0.5 which satisfies the conditions (92). The realization of (95) has the form ro 0.51 rol A=I IB=I IC=[01I Li 0.5] L2] Hence the compartmental realizations of (94) are (A, B, C) and (A, B ,C)with — r-i.50.51- rol— - ru — A=A—Ic= B = C=[01], = c1 = — [2 1] L i]'U, [o]'

6. CONCLUDING REMARKS

The notions of the externally and internally positive standard and singular discrete-time and continuous-time linear systems have been introduced. Necessary and sufficient conditions for the external and internal positivity of linear systems have been established. It has been shown that: 1 . thereachability and controllability of positive linear systems are not invariant under the state —feedbacks. 2. for an unreachable (uncontrollable) positive linear system it is possible to choose a suitable state —feedbackso that the closed —loopsystem is reachable (controllable). The relationships between the positive and compartmental systems has been established. The realization problem for positive and compartmental systems has been formulated and partly solved. A new method for computation of minimal compartmental realizations of a proper transfer function has been proposed. The method is based on a suitable transformation of an asymptotically stable positive realization to the desired compartmental realization. The transformation is characterized by a generalized permutation matrix. Sufficient conditions for the existence of minimal compartmental realizations of a proper transfer function has been established. Two steps procedures for computation of minimal compartmental realizations for both continuous-time and discrete-time linear systems have been derived. The procedures have been illustrated by numerical examples. The considerations can be extended for multi-input multi- output continuous-time and discrete-time linear systems.

Proc. of SPIE Vol. 5484 17

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx The presented considerations can be easily extended for multi —inputcontinuous-time and discrete-time and also for two dimensional (2D) linear systems [12, 16,18,22]. An open problem is an extension of the considerations for singular 2D linear systems.

REFERENCES

[1] A. Astolfi and P.Colaneri, A note on existence ofpositive realizations, Proc. of the American Control Conf. 2002. [2] B.D.O. Anderson, M. Deistler, L. Farina and L. Benvenuti, Nonnetive realization of a linear system with nonnegative impulse response, IEEE Trans. Circuits and Syst. I, vol. 43, 1996, pp. 134-142. [31 L. Benvenuti, L. Farina, B.D.O. Anderson and F. De Bruyne, Minimal discrete- time positive realizations of transferfunctions withpositive realpoles, IEEE Trans. Circuits and Syst. I, vol. 47, No 2, 2002, pp. 370-373. [4] L. Benvenuti and L. Farina, Positive and compartmental systems IEEE Transations and Autom. .Contr.,AC-47,No 2,2000, pp. 1370-1377. [5]PG. Coxson, Positive input reachability and Controllability of positive systems, and its Applications 94, 1987, pp. 35-53. [6] M.P. Fanti, B. Maione and B. Turchiano, Controllability oflinear single-inputpositive discrete-time syste!ns, mt. J.Control, 1989, vol. 50, No 6, pp. 2523-2542. [7 1 M.P. Fanti, B. Maione and B. Turchiano, Controllability of multi-input positive discrete-time systems,Int. J. Control,1990, vol. 51, No 6, pp.1295-1308. [8] L. Farina and S. Rinaldi, Positive Linear Systems: Theory andApplications, Pure and Applied Mathematics, Series of Text, Monographs and Tracts,. New York: Wiley, 2000 [9] L. Farina, On the existence ofapositive realizations, Systems and Control Letters, vol. 28, pp. 219-226, 1996. [10] E. Fornasini, ME. Valcher, Recent developments in 2D positive system theory, Applied Math.and Computer Science, vol. 7, No 4, 1997. [1 1] J.M. van den Hof, Positive linear observersfor linear compartmental systems, SIAM J. Control. Optim., vol. 36, No 2, 1998, pp. 590-608. [12] T. Kaczorek, Externallypositive 2Dlinearsysteins, Bull. Pol. Acad. Techn. Sci., vol. 47, No 3, 1999, pp. 227-234. [13] T. Kaczorek, Externally and internally positive singular discrete-time linearsystems, Journal of Applied Mathematics and Computer Science, vol. 12, No 2, 2002, pp. 197-202 [14] T. Kaczorek, Externally and internally positive singular continuous-time linear systems, Grecja 2000 [15] T. Kaczorek, Linear Control Systems, vol. 1 and 2, Research Studies Press and J.Wiley, New York 1993. [16] T. Kaczorek, Positive 2D linear systems, Computational Intelligence and Applications, Physica-Verlag 1998, pp. 59-84. [17] T. Kaczorek, Positive singular discrete linear systems, Bull. Pol. Acad. Techn. Sci., vol. 46, No. 4, 1997, pp. 6 19-63 1. [18] T.Kaczorek, Reachability and controllability of nonnegative 2-D Roesser type models, Bull. Pol. Acad. Techn.

Sci.,vol.44, No 4, 1996, pp.405-410. [19] T. Kaczorek, Reachability and controlability of positive linear systems with state feedbacks, Bull. Pol. Acad. Techn. Sci., vol. 47, No 1, 1999, pp. 67-73. [20] T. Kaczorek, Positive JD and 2D Systems, Springer-Velrag, London 2002 [21] T. Kaczorek, Weakly positive continuous-time linear systems, Bull. Pol. Acad. Techn. Sci., vol. 46, No. 2, 1998, pp. 233-245. [22] J. Klamka, Controllability ofDynamical Systems, Kiuwer Academic Pubi. ,Dordrecht,1991. [23] D.N.P. Murthy, Controllability ofa linearpositive dynamic system, mt. J. Systems Sci., 1986, vol. 17, No 1, pp. 49-54. [24] Y. Ohta, H. Madea and S. Kodama, Reachability, observability and realizability of continuous-time positive systems, SIAM J. Control and Optimization, vol. 22, No 2, 1984, pp. 17 1-180. [25] ME. Valcher, Controllability and reachability criteria for discrete time positive systems, Tnt. J. Control, vol. 65, 1996, pp. 511-536. [26] M.E. Vaicher and E. Fornasini, State Models and Asymptotic Behaviour of 2D Positive Systems, IMA Journalof MathematicalControl & Information, No 12, 1995, pp. 17-36.

18 Proc. of SPIE Vol. 5484

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 12/04/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx