diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 592b760..7cd6c3d 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-23T09:08:38","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-01-23T09:46:01","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/advanced_operations.html b/dev/advanced_operations.html index 24e38a0..0d14462 100644 --- a/dev/advanced_operations.html +++ b/dev/advanced_operations.html @@ -1,24 +1,24 @@ Advanced operations on transfer function matrices · DescriptorSystems.jl

Advanced operations on transfer function matrices

  • gsdec Additive spectral decompositions.
  • grnull Right nullspace basis of a transfer function matrix.
  • glnull Left nullspace basis of a transfer function matrix.
  • grange Range space basis of a transfer function matrix.
  • gcrange Coimage space basis of a transfer function matrix.
  • grsol Solution of the linear rational matrix equation G(λ)*X(λ) = F(λ).
  • glsol Solution of the linear rational matrix equation X(λ)*G(λ) = F(λ).
  • grmcover1 Right minimum dynamic cover of Type 1 based order reduction.
  • glmcover1 Left minimum dynamic cover of Type 1 based order reduction.
  • grmcover2 Right minimum dynamic cover of Type 2 based order reduction.
  • glmcover2 Left minimum dynamic cover of Type 2 based order reduction.
  • ginv Generalized inverses.
DescriptorSystems.gsdecFunction
gsdec(sys; job = "finite", prescale, smarg, fast = true,  
-      atol = 0,  atol1 = atol, atol2 = atol, rtol = nϵ) -> (sys1, sys2)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the additive spectral decomposition G(λ) = G1(λ) + G2(λ) such that G1(λ), the transfer function matrix of the descriptor system sys1 = (A1-λE1,B1,C1,D1), has only poles in a certain domain of interest Cg of the complex plane and G2(λ), the transfer function matrix of the descriptor system sys2 = (A2-λE2,B2,C2,0), has only poles outside of Cg.

If prescale = true, a preliminary balancing of the descriptor system pair (A,E) is performed. The default setting is prescale = MatrixPencils.balqual(sys.A,sys.E) > 10000, where the function pbalqual from the MatrixPencils package evaluates the scaling quality of the linear pencil A-λE.

The keyword argument smarg, if provided, specifies the stability margin for the stable eigenvalues of A-λE, such that, in the continuous-time case, the stable eigenvalues have real parts less than or equal to smarg, and in the discrete-time case, the stable eigenvalues have moduli less than or equal to smarg. If smarg = missing, the used default values are: smarg = -sqrt(ϵ), for a continuous-time system, and smarg = 1-sqrt(ϵ), for a discrete-time system), where ϵ is the machine precision of the working accuracy.

The keyword argument job, in conjunction with smarg, defines the domain of interest Cg, as follows:

for job = "finite", Cg is the whole complex plane without the point at infinity, and sys1 has only finite poles and sys2 has only infinite poles (default); the resulting A2 is nonsingular and upper triangular, while the resulting E2 is nilpotent and upper triangular;

for job = "infinite", Cg is the point at infinity, and sys1 has only infinite poles and sys2 has only finite poles and is the strictly proper part of sys; the resulting A1 is nonsingular and upper triangular, while the resulting E1 is nilpotent and upper triangular;

for job = "stable", Cg is the stability domain of eigenvalues defined by smarg, and sys1 has only stable poles and sys2 has only unstable and infinite poles; the resulting pairs (A1,E1) and (A2,E2) are in generalized Schur form with E1 upper triangular and nonsingular and E2 upper triangular;

for job = "unstable", Cg is the complement of the stability domain of the eigenvalues defined by smarg, and sys1 has only unstable and infinite poles and sys2 has only stable poles; the resulting pairs (A1,E1) and (A2,E2) are in generalized Schur form with E1 upper triangular and E2 upper triangular and nonsingular.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The separation of the finite and infinite eigenvalues is performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

source
DescriptorSystems.grnullFunction
grnull(sys; polynomial = false, simple = false, inner = false, fast = true, poles = missing, sdeg = missing,  
+      atol = 0,  atol1 = atol, atol2 = atol, rtol = nϵ) -> (sys1, sys2)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the additive spectral decomposition G(λ) = G1(λ) + G2(λ) such that G1(λ), the transfer function matrix of the descriptor system sys1 = (A1-λE1,B1,C1,D1), has only poles in a certain domain of interest Cg of the complex plane and G2(λ), the transfer function matrix of the descriptor system sys2 = (A2-λE2,B2,C2,0), has only poles outside of Cg.

If prescale = true, a preliminary balancing of the descriptor system pair (A,E) is performed. The default setting is prescale = MatrixPencils.balqual(sys.A,sys.E) > 10000, where the function pbalqual from the MatrixPencils package evaluates the scaling quality of the linear pencil A-λE.

The keyword argument smarg, if provided, specifies the stability margin for the stable eigenvalues of A-λE, such that, in the continuous-time case, the stable eigenvalues have real parts less than or equal to smarg, and in the discrete-time case, the stable eigenvalues have moduli less than or equal to smarg. If smarg = missing, the used default values are: smarg = -sqrt(ϵ), for a continuous-time system, and smarg = 1-sqrt(ϵ), for a discrete-time system), where ϵ is the machine precision of the working accuracy.

The keyword argument job, in conjunction with smarg, defines the domain of interest Cg, as follows:

for job = "finite", Cg is the whole complex plane without the point at infinity, and sys1 has only finite poles and sys2 has only infinite poles (default); the resulting A2 is nonsingular and upper triangular, while the resulting E2 is nilpotent and upper triangular;

for job = "infinite", Cg is the point at infinity, and sys1 has only infinite poles and sys2 has only finite poles and is the strictly proper part of sys; the resulting A1 is nonsingular and upper triangular, while the resulting E1 is nilpotent and upper triangular;

for job = "stable", Cg is the stability domain of eigenvalues defined by smarg, and sys1 has only stable poles and sys2 has only unstable and infinite poles; the resulting pairs (A1,E1) and (A2,E2) are in generalized Schur form with E1 upper triangular and nonsingular and E2 upper triangular;

for job = "unstable", Cg is the complement of the stability domain of the eigenvalues defined by smarg, and sys1 has only unstable and infinite poles and sys2 has only stable poles; the resulting pairs (A1,E1) and (A2,E2) are in generalized Schur form with E1 upper triangular and E2 upper triangular and nonsingular.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The separation of the finite and infinite eigenvalues is performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

source
DescriptorSystems.grnullFunction
grnull(sys; polynomial = false, simple = false, inner = false, fast = true, poles = missing, sdeg = missing,  
        atol = 0, atol1 = atol, atol2 = atol, rtol, offset = sqrt(ϵ) ) -> (sysrnull, info)

Determine for the descriptor systems sys = (A-λE,B,C,D) with the p x m transfer function matrix G(λ), the descriptor system sysrnull = (Ar-λEr,Br,Cr,Dr) with the transfer function matrix Nr(λ) such that Nr(λ) is a minimal rational right nullspace basis of G(λ) and satisfies G(λ)*Nr(λ) = 0.

For the call with

grnull(sys, p2; polynomial = false, simple = false, inner = false, fast = true, poles = missing, sdeg = missing,  
-       atol = 0, atol1 = atol, atol2 = atol, rtol, offset = sqrt(ϵ) ) -> (sysrnull, info)

sys contains the compound system sys = [sys1; sys2], with G(λ), the transfer function matrix of sys1, and G2(λ), the transfer function matrix of sys2, and has the descriptor realization sys = (A-λE,B,[C;C2],[D;D2]), where sys2 has p2 outputs. The resulting sysrnull contains the compound system [sysrnull1; sys2*sysrnull1] = (Ar-λEr,Br,[Cr;Cr2],[Dr;Dr2]), where sysrnull1 = (Ar-λEr,Br,Cr,Dr) has the transfer function matrix Nr(λ), which is a rational right nullspace basis of G(λ) satisfying G(λ)*Nr(λ) = 0 and sys2*sysrnull1 = (Ar-λEr,Br,Cr2,Dr2) has the transfer function matrix G2(λ)*Nr(λ).

The returned named tuple info has the components info.nrank, info.stdim, info.degs, info.fnorm and info.tcond.

If polynomial = false, the resulting sysrnull has a proper transfer function matrix, while for polynomial = true the resulting sysrnull has a polynomial transfer function matrix. The resulting basis Nr(λ) contains m-r basis vectors, where r = rank G(λ). The rank r is returned in info.nrank. If simple = true, the resulting basis is simple and satisfies the condition that the sum of the number of poles of the m-r basis vectors is equal to the number of poles of Nr(λ) (i.e., its McMillan degree) .

For a non-simple proper basis, the realization (Ar-λEr,Br,Cr,Dr) is controllable and the pencil [Br Ar-λEr] is in a controllable staircase form. The column dimensions of the full row rank diagonal blocks are returned in info.stdim and the corresponding right Kronecker indices are returned in info.degs. For a simple basis, the regular pencil Ar-λEr is block diagonal, with the i-th block of size info.deg[i] (the i-th right Kronecker index) for a proper basis and info.deg[i]+1 for a polynomial basis. The dimensions of the diagonal blocks are returned in this case in info.stdim, while the increasing numbers of poles of the basis vectors are returned in info.degs. For the i-th basis vector vi(λ) (i.e., the i-th column of Nr(λ)) a minimal realization can be explicitly constructed as (Ari-λEri,Bri,Cr,Dr[:,i]), where Ari, Eri and Bri are the i-th diagonal blocks of Ar, Er, and Br, respectively, and Dr[:,i] is the i-th column of Dr. The corresponding realization of G2(λ)*vi(λ) can be constructed as (Ari-λEri,Bri,Cr2,Dr2[:,i]), where Dr2[:,i] is the i-th column of Dr2.

For a proper basis, the poles of Nr(λ) can be freely assigned, by assigning the eigenvalues of the pencil Ar-λEr. The vector poles, specified as a keyword argument, can be used to specify the desired eigenvalues, alternatively to or jointly with enforcing a desired stability degree sdeg of the real parts of the eigenvalues, for a continuous-time system, or the moduli of eigenvalues, for a discrete-time system. If inner = true, the resulting basis Nr(λ) is inner, i.e., Nr(λ)'*Nr(λ) = I, where Nr(s)' = transpose(Nr(-s)) for a continuous-time system with λ = s and Nr(z)' = transpose(Nr(1/z)) for a discrete-time system with λ = z. If the proper basis is simple, each of the resulting individual basis vector is inner. If sys2 has poles on the boundary of the appropriate stability domain Cs, which are not poles of sys1 too, then there exists no inner Nr(λ) such that G2(λ)*Nr(λ) is stable. An offset can be specified via the keyword parameter offset = β to be used to assess the existence of zeros on the stability domain boundary. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false. The computation of simple bases involves the solution of several Type 1 minimum dynamic cover problems. This computation involves using non-orthogonal transformations whose worst condition number is returned in info.tcond, in conjunction with using feedback gains, whose norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

Note: The resulting realization of sysrnull is minimal provided the realization of sys is minimal. However, sysrnull1 is a minimal basis only if the realization (A-lambda E,B,C,D) of sys1 is minimal. In this case, info.degs are the degrees of the vectors of a minimal polynomial basis or, if simple = true, of the resulting minimal simple proper basis.

Method: The computation of a minimal proper right nullspace basis is based on [1]; see also [2]. For the computation of a minimal simple proper right nullspace basis the method of [3] is emloyed to compute a simple basis from a minimal proper basis. For the computation of an inner proper right nullspace basis, the inner factor of an inner-outer factorization of Nr(λ) is explicitly constructed using formulas given in [4].

References:

[1] T.G.J. Beelen. New algorithms for computing the Kronecker structure of a pencil with applications to systems and control theory. Ph. D. Thesis, Technical University Eindhoven, 1987.

[2] A. Varga. On computing least order fault detectors using rational nullspace bases. IFAC SAFEPROCESS'03 Symposium, Washington DC, USA, 2003.

[3] A. Varga. On computing nullspace bases – a fault detection perspective. Proc. IFAC 2008 World Congress, Seoul, Korea, pages 6295–6300, 2008.

[4] K. Zhou, J. C. Doyle, and K. Glover. Robust and Optimal Control. Prentice Hall, 1996.

source
DescriptorSystems.glnullFunction
glnull(sys; polynomial = false, simple = false, coinner = false, fast = true, poles = missing, sdeg = missing,  
+       atol = 0, atol1 = atol, atol2 = atol, rtol, offset = sqrt(ϵ) ) -> (sysrnull, info)

sys contains the compound system sys = [sys1; sys2], with G(λ), the transfer function matrix of sys1, and G2(λ), the transfer function matrix of sys2, and has the descriptor realization sys = (A-λE,B,[C;C2],[D;D2]), where sys2 has p2 outputs. The resulting sysrnull contains the compound system [sysrnull1; sys2*sysrnull1] = (Ar-λEr,Br,[Cr;Cr2],[Dr;Dr2]), where sysrnull1 = (Ar-λEr,Br,Cr,Dr) has the transfer function matrix Nr(λ), which is a rational right nullspace basis of G(λ) satisfying G(λ)*Nr(λ) = 0 and sys2*sysrnull1 = (Ar-λEr,Br,Cr2,Dr2) has the transfer function matrix G2(λ)*Nr(λ).

The returned named tuple info has the components info.nrank, info.stdim, info.degs, info.fnorm and info.tcond.

If polynomial = false, the resulting sysrnull has a proper transfer function matrix, while for polynomial = true the resulting sysrnull has a polynomial transfer function matrix. The resulting basis Nr(λ) contains m-r basis vectors, where r = rank G(λ). The rank r is returned in info.nrank. If simple = true, the resulting basis is simple and satisfies the condition that the sum of the number of poles of the m-r basis vectors is equal to the number of poles of Nr(λ) (i.e., its McMillan degree) .

For a non-simple proper basis, the realization (Ar-λEr,Br,Cr,Dr) is controllable and the pencil [Br Ar-λEr] is in a controllable staircase form. The column dimensions of the full row rank diagonal blocks are returned in info.stdim and the corresponding right Kronecker indices are returned in info.degs. For a simple basis, the regular pencil Ar-λEr is block diagonal, with the i-th block of size info.deg[i] (the i-th right Kronecker index) for a proper basis and info.deg[i]+1 for a polynomial basis. The dimensions of the diagonal blocks are returned in this case in info.stdim, while the increasing numbers of poles of the basis vectors are returned in info.degs. For the i-th basis vector vi(λ) (i.e., the i-th column of Nr(λ)) a minimal realization can be explicitly constructed as (Ari-λEri,Bri,Cr,Dr[:,i]), where Ari, Eri and Bri are the i-th diagonal blocks of Ar, Er, and Br, respectively, and Dr[:,i] is the i-th column of Dr. The corresponding realization of G2(λ)*vi(λ) can be constructed as (Ari-λEri,Bri,Cr2,Dr2[:,i]), where Dr2[:,i] is the i-th column of Dr2.

For a proper basis, the poles of Nr(λ) can be freely assigned, by assigning the eigenvalues of the pencil Ar-λEr. The vector poles, specified as a keyword argument, can be used to specify the desired eigenvalues, alternatively to or jointly with enforcing a desired stability degree sdeg of the real parts of the eigenvalues, for a continuous-time system, or the moduli of eigenvalues, for a discrete-time system. If inner = true, the resulting basis Nr(λ) is inner, i.e., Nr(λ)'*Nr(λ) = I, where Nr(s)' = transpose(Nr(-s)) for a continuous-time system with λ = s and Nr(z)' = transpose(Nr(1/z)) for a discrete-time system with λ = z. If the proper basis is simple, each of the resulting individual basis vector is inner. If sys2 has poles on the boundary of the appropriate stability domain Cs, which are not poles of sys1 too, then there exists no inner Nr(λ) such that G2(λ)*Nr(λ) is stable. An offset can be specified via the keyword parameter offset = β to be used to assess the existence of zeros on the stability domain boundary. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false. The computation of simple bases involves the solution of several Type 1 minimum dynamic cover problems. This computation involves using non-orthogonal transformations whose worst condition number is returned in info.tcond, in conjunction with using feedback gains, whose norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

Note: The resulting realization of sysrnull is minimal provided the realization of sys is minimal. However, sysrnull1 is a minimal basis only if the realization (A-lambda E,B,C,D) of sys1 is minimal. In this case, info.degs are the degrees of the vectors of a minimal polynomial basis or, if simple = true, of the resulting minimal simple proper basis.

Method: The computation of a minimal proper right nullspace basis is based on [1]; see also [2]. For the computation of a minimal simple proper right nullspace basis the method of [3] is emloyed to compute a simple basis from a minimal proper basis. For the computation of an inner proper right nullspace basis, the inner factor of an inner-outer factorization of Nr(λ) is explicitly constructed using formulas given in [4].

References:

[1] T.G.J. Beelen. New algorithms for computing the Kronecker structure of a pencil with applications to systems and control theory. Ph. D. Thesis, Technical University Eindhoven, 1987.

[2] A. Varga. On computing least order fault detectors using rational nullspace bases. IFAC SAFEPROCESS'03 Symposium, Washington DC, USA, 2003.

[3] A. Varga. On computing nullspace bases – a fault detection perspective. Proc. IFAC 2008 World Congress, Seoul, Korea, pages 6295–6300, 2008.

[4] K. Zhou, J. C. Doyle, and K. Glover. Robust and Optimal Control. Prentice Hall, 1996.

source
DescriptorSystems.glnullFunction
glnull(sys; polynomial = false, simple = false, coinner = false, fast = true, poles = missing, sdeg = missing,  
        atol = 0, atol1 = atol, atol2 = atol, rtol, offset = sqrt(ϵ) ) -> (syslnull, info)

Determine for the descriptor systems sys = (A-λE,B,C,D) with the p x m transfer function matrix G(λ), the descriptor system syslnull = (Al-λEl,Bl,Cl,Dl) with the transfer function matrix Nl(λ) such that Nl(λ) is a minimal rational left nullspace basis of G(λ) and satisfies Nl(λ)*G(λ) = 0.

For the call with

glnull(sys, m2; polynomial = false, simple = false, coinner = false, fast = true, poles = missing, sdeg = missing,  
-       atol = 0, atol1 = atol, atol2 = atol, rtol, offset = sqrt(ϵ) ) -> (syslnull, info)

sys contains the compound system sys = [sys1 sys2], with G(λ), the transfer function matrix of sys1, and G2(λ), the transfer function matrix of sys2, and has the descriptor realization sys = (A-λE,[B B2],C,[D D2]), where sys2 has m2 inputs. The resulting syslnull contains the compound system [syslnull1 syslnull1*sys2] = (Al-λEl,[Bl Bl2],Cr,[Dl Dl2]), where syslnull1 = (Al-λEl,Bl,Cl,Dl) has the transfer function matrix Nl(λ), which is a rational left nullspace basis of G(λ) satisfying Nl(λ)*G(λ) = 0 and syslnull1*sys2 = (Al-λEl,Bl2,Cl,Dl2) has the transfer function matrix Nl(λ)*G2(λ).

The returned named tuple info has the components info.nrank, info.stdim, info.degs, info.fnorm and info.tcond.

If polynomial = false, the resulting syslnull has a proper transfer function matrix, while for polynomial = true the resulting syslnull has a polynomial transfer function matrix. The resulting basis Nl(λ) contains p-r basis vectors, where r = rank G(λ). The rank r is returned in info.nrank. If simple = true, the resulting basis is simple and satisfies the condition that the sum of the number of poles of the p-r basis vectors is equal to the number of poles of Nl(λ) (i.e., its McMillan degree) .

For a non-simple proper basis, the realization (Al-λEl,Bl,Cl,Dl) is observable and the pencil [Al-λEl; Cl] is in an observable staircase form. The row dimensions of the full column rank diagonal blocks are returned in info.stdim and the corresponding left Kronecker indices are returned in info.degs. For a simple basis, the regular pencil Al-λEl is block diagonal, with the i-th block of size info.stdim[i]. The increasing numbers of poles of the basis vectors are returned in info.degs. For the i-th basis vector vi(λ) (i.e., the i-th row of Nl(λ)) a minimal realization can be explicitly constructed as (Ali-λEli,Bl,Cli,Dl[i,:]), where Ali, Eli and Cli are the i-th diagonal blocks of Al, El, and Cl, respectively, and Dl[i,:] is the i-th row of Dl. The corresponding realization of vi(λ)*G2(λ) can be constructed as (Ali-λEli,Bl2,Cl2,Dl2[i,:]), where Dl2[i,:] is the i-th row of Dl2.

For a proper basis, the poles of Nl(λ) can be freely assigned, by assigning the eigenvalues of the pencil Al-λEl. The vector poles, specified as a keyword argument, can be used to specify the desired eigenvalues, alternatively to or jointly with enforcing a desired stability degree sdeg of the real parts of the eigenvalues, for a continuous-time system, or the moduli of eigenvalues, for a discrete-time system. If coinner = true, the resulting basis Nl(λ) is coinner, i.e., Nl(λ)*Nl(λ)' = I, where Nl(s)' = transpose(Nl(-s)) for a continuous-time system with λ = s and Nl(z)' = transpose(Nl(1/z)) for a discrete-time system with λ = z. If the proper basis is simple, each of the resulting individual basis vector is inner. If sys2 has poles on the boundary of the appropriate stability domain Cs, which are not poles of sys1 too, then there exists no inner Nl(λ) such that Nl(λ)*G2(λ) is stable. An offset can be specified via the keyword parameter offset = β to be used to assess the existence of zeros on the stability domain boundary. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false. The computation of simple bases involves the solution of several Type 1 minimum dynamic cover problems. This computation involves using non-orthogonal transformations whose worst condition number is returned in info.tcond, in conjunction with using feedback gains, whose norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

Note: The resulting realization of syslnull is minimal provided the realization of sys is minimal. However, syslnull1 is a minimal basis only if the realization (A-lambda E,B,C,D) of sys1 is minimal. In this case, info.degs are the degrees of the vectors of a minimal polynomial basis or, if simple = true, of the resulting minimal simple proper basis.

Method: The computation method for the computation of a right nullspace basis is applied to the dual of descriptor system sys. The computation of a minimal proper right nullspace basis is based on [1]; see also [2]. For the computation of a minimal simple proper right nullspace basis the method of [3] is emloyed to compute a simple basis from a minimal proper basis. For the computation of an inner proper right nullspace basis, the inner factor of an inner-outer factorization of Nl(λ) is explicitly constructed using formulas given in [4].

References:

[1] T.G.J. Beelen. New algorithms for computing the Kronecker structure of a pencil with applications to systems and control theory. Ph. D. Thesis, Technical University Eindhoven, 1987.

[2] A. Varga. On computing least order fault detectors using rational nullspace bases. IFAC SAFEPROCESS'03 Symposium, Washington DC, USA, 2003.

[3] A. Varga. On computing nullspace bases – a fault detection perspective. Proc. IFAC 2008 World Congress, Seoul, Korea, pages 6295–6300, 2008.

[4] K. Zhou, J. C. Doyle, and K. Glover. Robust and Optimal Control. Prentice Hall, 1996.

source
DescriptorSystems.grangeFunction
grange(sys; zeros = "none", atol = 0, atol1 = atol, atol2 = atol, rtol, 
+       atol = 0, atol1 = atol, atol2 = atol, rtol, offset = sqrt(ϵ) ) -> (syslnull, info)

sys contains the compound system sys = [sys1 sys2], with G(λ), the transfer function matrix of sys1, and G2(λ), the transfer function matrix of sys2, and has the descriptor realization sys = (A-λE,[B B2],C,[D D2]), where sys2 has m2 inputs. The resulting syslnull contains the compound system [syslnull1 syslnull1*sys2] = (Al-λEl,[Bl Bl2],Cr,[Dl Dl2]), where syslnull1 = (Al-λEl,Bl,Cl,Dl) has the transfer function matrix Nl(λ), which is a rational left nullspace basis of G(λ) satisfying Nl(λ)*G(λ) = 0 and syslnull1*sys2 = (Al-λEl,Bl2,Cl,Dl2) has the transfer function matrix Nl(λ)*G2(λ).

The returned named tuple info has the components info.nrank, info.stdim, info.degs, info.fnorm and info.tcond.

If polynomial = false, the resulting syslnull has a proper transfer function matrix, while for polynomial = true the resulting syslnull has a polynomial transfer function matrix. The resulting basis Nl(λ) contains p-r basis vectors, where r = rank G(λ). The rank r is returned in info.nrank. If simple = true, the resulting basis is simple and satisfies the condition that the sum of the number of poles of the p-r basis vectors is equal to the number of poles of Nl(λ) (i.e., its McMillan degree) .

For a non-simple proper basis, the realization (Al-λEl,Bl,Cl,Dl) is observable and the pencil [Al-λEl; Cl] is in an observable staircase form. The row dimensions of the full column rank diagonal blocks are returned in info.stdim and the corresponding left Kronecker indices are returned in info.degs. For a simple basis, the regular pencil Al-λEl is block diagonal, with the i-th block of size info.stdim[i]. The increasing numbers of poles of the basis vectors are returned in info.degs. For the i-th basis vector vi(λ) (i.e., the i-th row of Nl(λ)) a minimal realization can be explicitly constructed as (Ali-λEli,Bl,Cli,Dl[i,:]), where Ali, Eli and Cli are the i-th diagonal blocks of Al, El, and Cl, respectively, and Dl[i,:] is the i-th row of Dl. The corresponding realization of vi(λ)*G2(λ) can be constructed as (Ali-λEli,Bl2,Cl2,Dl2[i,:]), where Dl2[i,:] is the i-th row of Dl2.

For a proper basis, the poles of Nl(λ) can be freely assigned, by assigning the eigenvalues of the pencil Al-λEl. The vector poles, specified as a keyword argument, can be used to specify the desired eigenvalues, alternatively to or jointly with enforcing a desired stability degree sdeg of the real parts of the eigenvalues, for a continuous-time system, or the moduli of eigenvalues, for a discrete-time system. If coinner = true, the resulting basis Nl(λ) is coinner, i.e., Nl(λ)*Nl(λ)' = I, where Nl(s)' = transpose(Nl(-s)) for a continuous-time system with λ = s and Nl(z)' = transpose(Nl(1/z)) for a discrete-time system with λ = z. If the proper basis is simple, each of the resulting individual basis vector is inner. If sys2 has poles on the boundary of the appropriate stability domain Cs, which are not poles of sys1 too, then there exists no inner Nl(λ) such that Nl(λ)*G2(λ) is stable. An offset can be specified via the keyword parameter offset = β to be used to assess the existence of zeros on the stability domain boundary. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false. The computation of simple bases involves the solution of several Type 1 minimum dynamic cover problems. This computation involves using non-orthogonal transformations whose worst condition number is returned in info.tcond, in conjunction with using feedback gains, whose norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

Note: The resulting realization of syslnull is minimal provided the realization of sys is minimal. However, syslnull1 is a minimal basis only if the realization (A-lambda E,B,C,D) of sys1 is minimal. In this case, info.degs are the degrees of the vectors of a minimal polynomial basis or, if simple = true, of the resulting minimal simple proper basis.

Method: The computation method for the computation of a right nullspace basis is applied to the dual of descriptor system sys. The computation of a minimal proper right nullspace basis is based on [1]; see also [2]. For the computation of a minimal simple proper right nullspace basis the method of [3] is emloyed to compute a simple basis from a minimal proper basis. For the computation of an inner proper right nullspace basis, the inner factor of an inner-outer factorization of Nl(λ) is explicitly constructed using formulas given in [4].

References:

[1] T.G.J. Beelen. New algorithms for computing the Kronecker structure of a pencil with applications to systems and control theory. Ph. D. Thesis, Technical University Eindhoven, 1987.

[2] A. Varga. On computing least order fault detectors using rational nullspace bases. IFAC SAFEPROCESS'03 Symposium, Washington DC, USA, 2003.

[3] A. Varga. On computing nullspace bases – a fault detection perspective. Proc. IFAC 2008 World Congress, Seoul, Korea, pages 6295–6300, 2008.

[4] K. Zhou, J. C. Doyle, and K. Glover. Robust and Optimal Control. Prentice Hall, 1996.

source
DescriptorSystems.grangeFunction
grange(sys; zeros = "none", atol = 0, atol1 = atol, atol2 = atol, rtol, 
        fast = true, offset = sqrt(ϵ)) -> (sysr, sysx, info)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the proper descriptor system sysr = (Ar-λEr,Br,Cr,Dr) with a full column rank transfer function matrix R(λ) such that Range(G(λ)) = Range(R(λ)) and the descriptor system sysx = (A-λE,B,Cx,Dx) with the full row rank transfer function matrix X(λ), which satisfies

 G(λ) = R(λ)*X(λ) ,

representing a full rank factorization of G(λ). The number of columns of R(λ) is the normal rank r of G(λ). The columns of R(λ) form a rational basis of the range (or image) space of the rational matrix G(λ). A selected set of zeros of G(λ) are included as zeros of R(λ).

The resulting named triple info contains (nrank, nfuz, niuz), where info.nrank = r, the normal rank of G(λ), info.nfuz is the number of finite zeros of sys on the boundary of the stability domain Cs, and info.niuz is the number of infinite zeros of sys in the continuous-time case and is set to 0 in the discrete-time case.

Depending on the value of the keyword parameter zeros, the following options can be selected for the zeros of G(λ) to be included in R(λ):

 "none"       - include no zeros (default) 
  "all"        - include all zeros of `sys`
  "unstable"   - include all unstable zeros of `sys`
  "s-unstable" - include all strictly unstable zeros of `sys`, both finite and infinite
  "stable"     - include all stable zeros of `sys`
  "finite"     - include all finite zeros of `sys`
- "infinite"   - include all infinite zeros of `sys`

If inner = true, the resulting basis R(λ) is inner, i.e., R(λ)'*R(λ) = I, where R(s)' = transpose(R(-s)) for a continuous-time system with λ = s and R(z)' = transpose(R(1/z)) for a discrete-time system with λ = z. This option can be used only in conjunction with zeros = "none" or zeros = "unstable".

For a continuous-time system sys, the stability domain Cs is defined as the set of complex numbers with real parts at most , while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most 1-β (i.e., the interior of a disc of radius 1-β centered in the origin). The boundary offset β to be used to assess the stability of zeros and their number on the boundary of Cs can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

For the assessment of zeros, the system pencil [A-λE B; C D] is reduced to a special Kronecker-like form (see [2]). In this reduction, the performed rank decisions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The range computation method is described in [1] and is based on the reduction algorithm of [2], which has been adapted to deal with several zero selection options. The computation of the involved Kronecker-like form is based on the algorithm of [3].

References:

[1] Varga, A. A note on computing the range of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.0048, 2017.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

[3] C. Oara and P. Van Dooren. An improved algorithm for the computation of structural invariants of a system pencil and related geometric aspects. Syst. Control Lett., 30:39–48, 1997.

source
DescriptorSystems.gcrangeFunction
gcrange(sys; zeros = "none", coinner = false, atol = 0, atol1 = atol, atol2 = atol, rtol, 
+ "infinite"   - include all infinite zeros of `sys`

If inner = true, the resulting basis R(λ) is inner, i.e., R(λ)'*R(λ) = I, where R(s)' = transpose(R(-s)) for a continuous-time system with λ = s and R(z)' = transpose(R(1/z)) for a discrete-time system with λ = z. This option can be used only in conjunction with zeros = "none" or zeros = "unstable".

For a continuous-time system sys, the stability domain Cs is defined as the set of complex numbers with real parts at most , while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most 1-β (i.e., the interior of a disc of radius 1-β centered in the origin). The boundary offset β to be used to assess the stability of zeros and their number on the boundary of Cs can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

For the assessment of zeros, the system pencil [A-λE B; C D] is reduced to a special Kronecker-like form (see [2]). In this reduction, the performed rank decisions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The range computation method is described in [1] and is based on the reduction algorithm of [2], which has been adapted to deal with several zero selection options. The computation of the involved Kronecker-like form is based on the algorithm of [3].

References:

[1] Varga, A. A note on computing the range of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.0048, 2017.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

[3] C. Oara and P. Van Dooren. An improved algorithm for the computation of structural invariants of a system pencil and related geometric aspects. Syst. Control Lett., 30:39–48, 1997.

source
DescriptorSystems.gcrangeFunction
gcrange(sys; zeros = "none", coinner = false, atol = 0, atol1 = atol, atol2 = atol, rtol, 
         fast = true, offset = sqrt(ϵ)) -> (sysr, sysx, info)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the proper descriptor system sysr = (Ar-λEr,Br,Cr,Dr) with a full row rank transfer function matrix R(λ) such that Coimage(G(λ)) = Coimage(R(λ)) and the descriptor system sysx = (A-λE,B,Cx,Dx) with the full column rank transfer function matrix X(λ), which satisfies

 G(λ) = X(λ)*R(λ) ,

representing a full rank factorization of G(λ). The number of rows of R(λ) is the normal rank r of G(λ). The rows of R(λ) form a rational basis of the coimage space of the rational matrix G(λ). A selected set of zeros of G(λ) are included as zeros of R(λ).

The resulting named triple info contains (nrank, nfuz, niuz), where info.nrank = r, the normal rank of G(λ), info.nfuz is the number of finite zeros of sys on the boundary of the stability domain Cs, and info.niuz is the number of infinite zeros of sys in the continuous-time case and is set to 0 in the discrete-time case.

The following options can be selected via the keyword parameter zeros for which zeros of G(λ) to be included in R(λ):

 "none"       - include no zeros (default) 
  "all"        - include all zeros of `sys`
  "unstable"   - include all unstable zeros of `sys`
  "s-unstable" - include all strictly unstable zeros of `sys`, both finite and infinite
  "stable"     - include all stable zeros of `sys`
  "finite"     - include all finite zeros of `sys`
- "infinite"   - include all infinite zeros of `sys`

If coinner = true, the resulting basis R(λ) is coinner, i.e., R(λ)*R(λ)' = I, where R(s)' = transpose(R(-s)) for a continuous-time system with λ = s and R(z)' = transpose(R(1/z)) for a discrete-time system with λ = z. This option can be used only in conjunction with zeros = "none" or zeros = "unstable".

For a continuous-time system sys, the stability domain Cs is defined as the set of complex numbers with real parts at most , while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most 1-β (i.e., the interior of a disc of radius 1-β centered in the origin). The boundary offset β to be used to assess the stability of zeros and their number on the boundary of Cs can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

For the assessment of zeros, the dual system pencil transpose([A-λE B; C D]) is reduced to a special Kronecker-like form (see [2]). In this reduction, the performed rank decisions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The range computation method described in [1], is applied to the dual descriptor system realization corresponding to the transpose of the rational matrix G(λ). The underlying pencil reduction algorithm of [2], has been adapted to deal with several zero selection options. The computation of the involved Kronecker-like form is based on the algorithm of [3].

References:

[1] Varga, A. A note on computing the range of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.0048, 2017.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

[3] C. Oara and P. Van Dooren. An improved algorithm for the computation of structural invariants of a system pencil and related geometric aspects. Syst. Control Lett., 30:39–48, 1997.

source
DescriptorSystems.grsolFunction
grsol(sysg, sysf; poles = missing, sdeg = missing, mindeg = false, solgen = false, minreal = true, fast = true, 
+ "infinite"   - include all infinite zeros of `sys`

If coinner = true, the resulting basis R(λ) is coinner, i.e., R(λ)*R(λ)' = I, where R(s)' = transpose(R(-s)) for a continuous-time system with λ = s and R(z)' = transpose(R(1/z)) for a discrete-time system with λ = z. This option can be used only in conjunction with zeros = "none" or zeros = "unstable".

For a continuous-time system sys, the stability domain Cs is defined as the set of complex numbers with real parts at most , while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most 1-β (i.e., the interior of a disc of radius 1-β centered in the origin). The boundary offset β to be used to assess the stability of zeros and their number on the boundary of Cs can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

For the assessment of zeros, the dual system pencil transpose([A-λE B; C D]) is reduced to a special Kronecker-like form (see [2]). In this reduction, the performed rank decisions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The range computation method described in [1], is applied to the dual descriptor system realization corresponding to the transpose of the rational matrix G(λ). The underlying pencil reduction algorithm of [2], has been adapted to deal with several zero selection options. The computation of the involved Kronecker-like form is based on the algorithm of [3].

References:

[1] Varga, A. A note on computing the range of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.0048, 2017.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

[3] C. Oara and P. Van Dooren. An improved algorithm for the computation of structural invariants of a system pencil and related geometric aspects. Syst. Control Lett., 30:39–48, 1997.

source
DescriptorSystems.grsolFunction
grsol(sysg, sysf; poles = missing, sdeg = missing, mindeg = false, solgen = false, minreal = true, fast = true, 
       atol = 0, atol1 = atol, atol2 = atol, rtol, ) -> (sysx, info, sysgen)

Determine for the descriptor systems sysg = (Ag-λEg,Bg,Cg,Dg) and sysf = (Af-λEf,Bf,Cf,Df) with the transfer function matrices G(λ) and F(λ), respectively, the descriptor system sysx with the transfer function matrix X(λ) such that X(λ) is the solution of the linear rational equation

G(λ)X(λ) = F(λ) .      (1)

If solgen = true, the descriptor system sysgen is determined representing a generator of all solutions of (1). Its transfer function matrix has the form GEN(λ) = [ X0(λ) XN(λ) ], such that any X(λ) can be generated as

X(λ) = X0(λ) + XN(λ)*Z(λ) ,

where X0(λ) is a particular solution satisfying G(λ)X0(λ) = F(λ), XN(λ) is a proper rational right nullspace basis of G(λ) satisfying G(λ)XN(λ) = 0, and Z(λ) is an arbitrary rational matrix with suitable dimensions. If solgen = false, sysgen is set to nothing.

The call with

grsol(sysgf, mf; poles = missing, sdeg = missing, mindeg = false, solgen = false, minreal = true, fast = true, 
       atol = 0, atol1 = atol, atol2 = atol, rtol, ) -> (sysx, info, sysgen)

uses the compound descriptor system sysgf = (A-λE,[Bg Bf],C,[Dg Df]), where Bf has mf columns, to define the descriptor systems sysg = (A-λE,Bg,C,Dg) and sysf = (A-λE,Bf,C,Df) (i.e., Ag-λEg = Af-λEf = A-λE and Cg = Cf = C).

The generator sysgen has a descriptor system realization sysgen = (A0-λE0,[B0 BN],C0,[D0 DN]), which is usually not minimal (uncontrollable and/or non-dynamic modes present), with

               ( Ar-λEr    *       *    )  
    A0-λE0    = (   0     Af-λEf    *    ) , 
@@ -26,7 +26,7 @@
 
                ( B1 | Br )
    [B0 | BN] = ( B2 | 0  ),  Cg  =   ( Cr   *    *  ) ,
-               ( B3 | 0  )

with Er, Ef and Ai invertible and upper triangular, Ei nillpotent and upper triangular, and DN full row rank. The dimensions of the diagonal blocks of A0-λE0 are returned in the named tuple info as the components info.nr, info.nf, and info.ninf, respectively.

A minimal order descriptor system realization of the proper basis XN(λ) is (Ar-λEr,Br,Cr,DN), where Br and DN have mr columns (returned in info.mr), representing the dimension of the right nullspace basis. The normal rank nrank of G(λ) is returned in info.nrank.

If mindeg = false, the solution sysx is determined in the form sysx = (A0+BN*F-λE0,B0,C0+DN*F,D0), where the matrix F = 0, unless a nonzero stabilizing gain is used such that Ar+Br*F-λEr has stable eigenvalues. The vector poles specified as a keyword argument, can be used to specify the desired eigenvalues alternatively to or jointly with enforcing a desired stability degree sdeg of eigenvalues. The dimension nr of Ar is the number of freely assignable poles of the solution X(λ) and is returned in info.nr. The eigenvalues of Af-λEf contain the finite zeros of G(λ), while the zeros of Ai-λEi contain the infinite zeros of G(λ). The norm of the employed gain F is returned in info.fnorm. If G(λ) has infinite zeros, then the solution X(λ) may have infinite poles. The integer vector info.rdeg contains the relative column degrees of X(λ) (i.e., the numbers of integrators/delays needed to make each column of X(λ) proper).

If mindeg = true, a minimum degree solution is determined as X(λ) = X0(λ) + XN(λ)*Z(λ), where Z(λ) is determined using order reduction based on a Type 2 minimum dynamic cover. This computation involves using non-orthogonal transformations whose worst condition number is returned in info.tcond, in conjunction with using feedback and feedforward gains, whose norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

If minreal = true, the computed realization sysx is minimal.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of Ag, Bg, Cg, Dg, Af, Bf, Cf, Df, the absolute tolerance for the nonzero elements of Eg and Ef, and the relative tolerance for the nonzero elements of Ag, Bg, Cg, Dg, Af, Bf, Cf, Df, Eg and Ef. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sysg and sysf. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The method of [1] to solve rational systems is used.

References:

[1] A. Varga, "Computation of least order solutions of linear rational equations", Proc. MTNS'04, Leuven, Belgium, 2004.

source
DescriptorSystems.glsolFunction
glsol(sysg, sysf; poles = missing, sdeg = missing, mindeg = false, solgen = false, minreal = true, fast = true, 
+               ( B3 | 0  )

with Er, Ef and Ai invertible and upper triangular, Ei nillpotent and upper triangular, and DN full row rank. The dimensions of the diagonal blocks of A0-λE0 are returned in the named tuple info as the components info.nr, info.nf, and info.ninf, respectively.

A minimal order descriptor system realization of the proper basis XN(λ) is (Ar-λEr,Br,Cr,DN), where Br and DN have mr columns (returned in info.mr), representing the dimension of the right nullspace basis. The normal rank nrank of G(λ) is returned in info.nrank.

If mindeg = false, the solution sysx is determined in the form sysx = (A0+BN*F-λE0,B0,C0+DN*F,D0), where the matrix F = 0, unless a nonzero stabilizing gain is used such that Ar+Br*F-λEr has stable eigenvalues. The vector poles specified as a keyword argument, can be used to specify the desired eigenvalues alternatively to or jointly with enforcing a desired stability degree sdeg of eigenvalues. The dimension nr of Ar is the number of freely assignable poles of the solution X(λ) and is returned in info.nr. The eigenvalues of Af-λEf contain the finite zeros of G(λ), while the zeros of Ai-λEi contain the infinite zeros of G(λ). The norm of the employed gain F is returned in info.fnorm. If G(λ) has infinite zeros, then the solution X(λ) may have infinite poles. The integer vector info.rdeg contains the relative column degrees of X(λ) (i.e., the numbers of integrators/delays needed to make each column of X(λ) proper).

If mindeg = true, a minimum degree solution is determined as X(λ) = X0(λ) + XN(λ)*Z(λ), where Z(λ) is determined using order reduction based on a Type 2 minimum dynamic cover. This computation involves using non-orthogonal transformations whose worst condition number is returned in info.tcond, in conjunction with using feedback and feedforward gains, whose norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

If minreal = true, the computed realization sysx is minimal.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of Ag, Bg, Cg, Dg, Af, Bf, Cf, Df, the absolute tolerance for the nonzero elements of Eg and Ef, and the relative tolerance for the nonzero elements of Ag, Bg, Cg, Dg, Af, Bf, Cf, Df, Eg and Ef. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sysg and sysf. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The method of [1] to solve rational systems is used.

References:

[1] A. Varga, "Computation of least order solutions of linear rational equations", Proc. MTNS'04, Leuven, Belgium, 2004.

source
DescriptorSystems.glsolFunction
glsol(sysg, sysf; poles = missing, sdeg = missing, mindeg = false, solgen = false, minreal = true, fast = true, 
       atol = 0, atol1 = atol, atol2 = atol, rtol, ) -> (sysx, info, sysgen)

Determine for the descriptor systems sysg = (Ag-λEg,Bg,Cg,Dg) and sysf = (Af-λEf,Bf,Cf,Df) with the transfer function matrices G(λ) and F(λ), respectively, the descriptor system sysx with the transfer function matrix X(λ) such that X(λ) is the solution of the linear rational equation

X(λ)G(λ) = F(λ) .      (1)

If solgen = true, the descriptor system sysgen is determined representing a generator of all solutions of (1). Its transfer function matrix has the form GEN(λ) = [ X0(λ); XN(λ) ], such that any X(λ) can be generated as

X(λ) = X0(λ) + Z(λ)*XN(λ) ,

where X0(λ) is a particular solution satisfying X0(λ)G(λ) = F(λ), XN(λ) is a proper rational left nullspace basis of G(λ) satisfying XN(λ)G(λ) = 0, and Z(λ) is an arbitrary rational matrix with suitable dimensions. If solgen = false, sysgen is set to nothing.

The call with

glsol(sysgf, pf; poles = missing, sdeg = missing, mindeg = false, solgen = false, minreal = true, fast = true, 
       atol = 0, atol1 = atol, atol2 = atol, rtol, ) -> (sysx, info, sysgen)

uses the compound descriptor system sysgf = (A-λE,B,[Cg; Cf],[Dg; Df]), where Cf has pf rows, to define the descriptor systems sysg = (A-λE,B,Cg,Dg) and sysf = (A-λE,B,Cf,Df) (i.e., Ag-λEg = Af-λEf = A-λE and Bg = Bf = B).

The generator sysgen has a descriptor system realization sysgen = (A0-λE0,B0, [C0; CN],[D0; DN]), which is usually not minimal (unobservable and/or non-dynamic modes present), with

             ( Ai-λEi    *       *    )  
    A0-λE0  = (   0     Af-λEf    *    ) , 
@@ -34,11 +34,11 @@
 
              ( *  )
        B0  = ( *  ),   ( C0 )  = ( C1 C2 C3 ) 
-             ( Bl )    ( CN )    ( 0  0  Cl )

with El, Ef and Ai invertible and upper triangular, Ei nillpotent and upper triangular, and DN full column rank. The dimensions of the diagonal blocks of A0-λE0 are returned in the named tuple info as the components info.nf, info.ninf and info.nl, respectively.

A minimal order descriptor system realization of the proper basis XN(λ) is (Al-λEl,Bl,Cl,DN), where Cl and DN have pr columns (returned in info.pr), representing the dimension of the left nullspace basis. The normal rank nrank of G(λ) is returned in info.nrank.

If mindeg = false, the solution sysx is determined in the form sysx = (A0+F*CN-λE0,B0+F*DN,C0,D0), where the matrix F = 0, unless a nonzero stabilizing gain is used such that Al+F*Bl-λEl has stable eigenvalues. The vector poles specified as a keyword argument, can be used to specify the desired eigenvalues alternatively to or jointly with enforcing a desired stability degree sdeg of eigenvalues. The dimension nl of Al is the number of freely assignable poles of the solution X(λ) and is returned in info.nl. The eigenvalues of Af-λEf contain the finite zeros of G(λ), while the zeros of Ai-λEi contain the infinite zeros of G(λ). The norm of the employed gain F is returned in info.fnorm. If G(λ) has infinite zeros, then the solution X(λ) may have infinite poles. The integer vector info.rdeg contains the relative row degrees of X(λ) (i.e., the numbers of integrators/delays needed to make each row of X(λ) proper).

If mindeg = true, a minimum degree solution is determined as X(λ) = X0(λ) + Z(λ)XN(λ), where Z(λ) is determined using order reduction based on a Type 2 minimum dynamic cover. This computation involves using non-orthogonal transformations whose worst condition number is returned in info.tcond, in conjunction with using feedback and feedforward gains, whose norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

If minreal = true, the computed realization sysx is minimal.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of Ag, Bg, Cg, Dg, Af, Bf, Cf, Df, the absolute tolerance for the nonzero elements of Eg and Ef, and the relative tolerance for the nonzero elements of Ag, Bg, Cg, Dg, Af, Bf, Cf, Df, Eg and Ef. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sysg and sysf. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The dual of method of [1] to solve rational systems is used.

References:

[1] A. Varga, "Computation of least order solutions of linear rational equations", Proc. MTNS'04, Leuven, Belgium, 2004.

source
DescriptorSystems.grmcover1Function
grmcover1(sys1, sys2; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

Determine for the proper descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices X1(λ) and X2(λ), respectively, using a right minimum dynamic cover of Type 1 based order reduction, the descriptor systems sysx and sysy with the transfer function matrices X(λ) and Y(λ), respectively, such that

X(λ) = X1(λ) + X2(λ)*Y(λ) ,

and sysx has order less than the order of sys1.

The call with

grmcover1(sys, m1; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

uses the compound descriptor system sys = (A-λE,[B1 B2],C,[D1 D2]), where B1 and D1 have m1 columns, to define the proper descriptor systems sys1 = (A-λE,B1,C,D1) and sys2 = (A-λE,B2,C,D2) (i.e., A1-λE1 = A2-λE2 = A-λE and C1 = C2 = C).

The resulting descriptor systems sysx and sysy have controllable realizations of the form sysx = (Ar-λEr,Br,Cr1,D1) and sysy = (Ar-λEr,Br,Cr2,0), where the pencil [Br Ar-λEr] is in a (controllability) staircase form, with νr[i] x νr[i-1] full row rank diagonal blocks, for i = 1, ..., nr, with νr[0] := m1.

The resulting named triple info contains (stdim, tcond, fnorm), where info.stdim = νr is a vector which contains the row dimensions of the blocks of the staircase form [Br Ar-λEr], info.tcond is the maximum of the Frobenius-norm condition numbers of the employed non-orthogonal transformation matrices, and info.fnorm is the Frobenius-norm of the (internally) employed state-feedback to reduce the order. Large values of info.tcond or info.fnorm indicate possible loss of numerical stability of computations.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Note: grmcover1 also works for arbitrary descriptor system sys1, if sys2 is proper. For an improper system sys1, the order reduction is performed only for the proper part of sys1, while the polynomial part of sys1 is included without modification in the resulting realization of sysx. In this case, info.stdim = νr contains the information corresponding to the proper part of sysx.

Method: The method of [1] is used to compute Type 1 minimum dynamic covers for standard systems and the method of [2] for proper descriptor systems. The resulting order (McMillan degree) of sysx is the least achievable one provided the realization of sys2 is maximally observable (i.e., the pair (A2+B2*F-λE2,C2+D2*F) is observable for any F).

References:

[1] A. Varga, Reliable algorithms for computing minimal dynamic covers, Proc. CDC'03, Maui, Hawaii, 2003.

[2] A. Varga. Reliable algorithms for computing minimal dynamic covers for descriptor systems. Proc. MTNS Symposium, Leuven, Belgium, 2004.

source
DescriptorSystems.glmcover1Function
glmcover1(sys1, sys2; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

Determine for the proper descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices X1(λ) and X2(λ), respectively, using a left minimum dynamic cover of Type 1 based order reduction, the descriptor systems sysx and sysy with the transfer function matrices X(λ) and Y(λ), respectively, such that

X(λ) = X1(λ) + Y(λ)*X2(λ) ,

and sysx has order less than the order of sys1.

The call with

glmcover1(sys, p1; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

uses the compound descriptor system sys = (A-λE,B,[C1; C2],[D1; D2]), where C1 and D1 have p1 rows, to define the proper descriptor systems sys1 = (A-λE,B,C1,D1) and sys2 = (A-λE,B,C2,D2) (i.e., A1-λE1 = A2-λE2 = A-λE and B1 = B2 = B).

The resulting descriptor systems sysx and sysy have observable realizations of the form sysx = (Ao-λEo,Bo1,Co,D1) and sysy = (Ao-λEo,Bo2,Co,0), where the pencil [Ao-λEo; Co] is in a (observability) staircase form, with νl[i] x νl[i+1] full row rank diagonal blocks, for i = 1, ..., nl, with νl[nl+1] := p1.

The resulting named triple info contains (stdim, tcond, fnorm), where info.stdim = νl is a vector which contains the column dimensions of the blocks of the staircase form [Ao-λEo; Co], info.tcond is the maximum of the Frobenius-norm condition numbers of the employed non-orthogonal transformation matrices, and info.fnorm is the Frobenius-norm of the (internally) employed output-injection gain to reduce the order. Large values of info.tcond or info.fnorm indicate possible loss of numerical stability of computations.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Note: glmcover1 also works for arbitrary descriptor system sys1, if sys2 is proper. For an improper system sys1, the order reduction is performed only for the proper part of sys1, while the polynomial part of sys1 is included without modification in the resulting realization of sysx. In this case, info.stdim = νl contains the information corresponding to the proper part of sysx.

Method: The dual of method of [1] is used to compute Type 1 minimum dynamic covers for standard systems and the dual of method of [2] for proper descriptor systems. The resulting McMillan degree of sysx is the least achievable one provided the realization of sys2 is maximally controllable (i.e., the pair (A2+F*C2-λE2,B2+F*D2) is controllable for any F).

References:

[1] A. Varga, Reliable algorithms for computing minimal dynamic covers, Proc. CDC'03, Maui, Hawaii, 2003.

[2] A. Varga. Reliable algorithms for computing minimal dynamic covers for descriptor systems. Proc. MTNS Symposium, Leuven, Belgium, 2004.

source
DescriptorSystems.grmcover2Function
grmcover2(sys1, sys2; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

Determine for the proper descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices X1(λ) and X2(λ), respectively, using a right minimum dynamic cover of Type 2 based order reduction, the descriptor systems sysx and sysy with the transfer function matrices X(λ) and Y(λ), respectively, such that

X(λ) = X1(λ) + X2(λ)*Y(λ) ,

and sysx has order less than the order of sys1.

The call with

grmcover2(sys, m1; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

uses the compound descriptor system sys = (A-λE,[B1 B2],C,[D1 D2]), where B1 and D1 haves m1 columns, to define the proper descriptor systems sys1 = (A-λE,B1,C,D1) and sys2 = (A-λE,B2,C,D2) (i.e., A1-λE1 = A2-λE2 =: A-λE and C1 = C2 =: C).

The resulting descriptor systems sysx and sysy have controllable realizations of the form sysx = (Ar-λEr,Br,Cr1,Dr1) and sysy = (Ar-λEr,Br,Cr2,Dr2), where the pencil [Br Ar-λEr] is in a (controllability) staircase form, with νr[i] x νr[i-1] full row rank diagonal blocks, for i = 1, ..., nr, with νr[0] := m1.

The resulting named triple info contains (stdim, tcond, fnorm, gnorm), where info.stdim = νr is a vector which contains the row dimensions of the blocks of the staircase form [Br Ar-λEr], info.tcond is the maximum of the Frobenius-norm condition numbers of the employed non-orthogonal transformation matrices, info.fnorm is the Frobenius-norm of the (internally) employed state-feedback gain to reduce the order, info.gnorm is the Frobenius-norm of the (internally) employed feedforward gain to reduce the order. Large values of info.tcond, info.fnorm or info.gnorm indicate possible loss of numerical stability of computations.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Note: grmcover2 also works for arbitrary descriptor system sys1, if sys2 is proper. For an improper system sys1, the order reduction is performed only for the proper part of sys1, while the polynomial part of sys1 is included without modification in the resulting realization of sysx. In this case, info.stdim = νr contains the information corresponding to the proper part of sysx.

Method: The method of [1] is used to compute Type 2 minimum dynamic covers for standard systems and the method of [2] for proper descriptor systems. The resulting McMillan degree of sysx is the least achievable one provided the realization of sys2 is maximally observable (i.e., the pair (A2+B2*F-λE2,C2+D2*F) is observable for any F).

References:

[1] A. Varga, Reliable algorithms for computing minimal dynamic covers, Proc. CDC'03, Maui, Hawaii, 2003.

[2] A. Varga. Reliable algorithms for computing minimal dynamic covers for descriptor systems. Proc. MTNS Symposium, Leuven, Belgium, 2004.

source
DescriptorSystems.glmcover2Function
glmcover2(sys1, sys2; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

Determine for the proper descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices X1(λ) and X2(λ), respectively, using a left minimum dynamic cover of Type 2 based order reduction, the descriptor systems sysx and sysy with the transfer function matrices X(λ) and Y(λ), respectively, such that

X(λ) = X1(λ) + Y(λ)*X2(λ) ,

and sysx has order less than the order of sys1.

The call with

glmcover2(sys, p1; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

uses the compound descriptor system sys = (A-λE,B, [C1; C2],[D1; D2]), where C1 and D1 have p1 rows and E is invertible, to define the proper descriptor systems sys1 = (A-λE,B,C1,D1) and sys2 = (A-λE,B,C2,D2) (i.e., A1-λE1 = A2-λE2 = A-λE and B1 = B2 = B).

The resulting descriptor systems sysx and sysy have observable realizations of the form sysx = (Ao-λEo,Bo1,Co,Do1) and sysy = (Ao-λEo,Bo2,Co,Do2), where the pencil [Ao-λEo; Co] is in a (observability) staircase form, with νl[i] x νl[i+1] full row rank diagonal blocks, for i = 1, ..., nl, with νl[nl+1] := p1.

The resulting named triple info contains (stdim, tcond, fnorm, gnorm), where info.stdim = νl is a vector which contains the column dimensions of the blocks of the staircase form [Ao-λEo; Co], info.tcond is the maximum of the Frobenius-norm condition numbers of the employed non-orthogonal transformation matrices, info.fnorm is the Frobenius-norm of the (internally) employed output-injection gain to reduce the order, and info.gnorm is the Frobenius-norm of the (internally) employed output-feedforward gain. Large values of info.tcond,info.fnorm or info.gnorm indicate possible loss of numerical stability of computations.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Note: glmcover2 also works for arbitrary descriptor system sys1, if sys2 is proper. For an improper system sys1, the order reduction is performed only for the proper part of sys1, while the polynomial part of sys1 is included without modification in the resulting realization of sysx. In this case, info.stdim = νl contains the information corresponding to the proper part of sysx.

Method: The dual of method of [1] is used to compute Type 2 minimum dynamic covers for standard systems and the dual of method of [2] for proper descriptor systems. The resulting McMillan degree of sysx is the least achievable one provided the realization of sys2 is maximally controllable (i.e., the pair (A2+F*C2-λE2,B2+F*D2) is controllable for any F).

References:

[1] A. Varga, Reliable algorithms for computing minimal dynamic covers, Proc. CDC'03, Maui, Hawaii, 2003.

[2] A. Varga. Reliable algorithms for computing minimal dynamic covers for descriptor systems. Proc. MTNS Symposium, Leuven, Belgium, 2004.

source
DescriptorSystems.ginvFunction
ginv(sys; type = "1-2", mindeg = false, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol, 
+             ( Bl )    ( CN )    ( 0  0  Cl )

with El, Ef and Ai invertible and upper triangular, Ei nillpotent and upper triangular, and DN full column rank. The dimensions of the diagonal blocks of A0-λE0 are returned in the named tuple info as the components info.nf, info.ninf and info.nl, respectively.

A minimal order descriptor system realization of the proper basis XN(λ) is (Al-λEl,Bl,Cl,DN), where Cl and DN have pr columns (returned in info.pr), representing the dimension of the left nullspace basis. The normal rank nrank of G(λ) is returned in info.nrank.

If mindeg = false, the solution sysx is determined in the form sysx = (A0+F*CN-λE0,B0+F*DN,C0,D0), where the matrix F = 0, unless a nonzero stabilizing gain is used such that Al+F*Bl-λEl has stable eigenvalues. The vector poles specified as a keyword argument, can be used to specify the desired eigenvalues alternatively to or jointly with enforcing a desired stability degree sdeg of eigenvalues. The dimension nl of Al is the number of freely assignable poles of the solution X(λ) and is returned in info.nl. The eigenvalues of Af-λEf contain the finite zeros of G(λ), while the zeros of Ai-λEi contain the infinite zeros of G(λ). The norm of the employed gain F is returned in info.fnorm. If G(λ) has infinite zeros, then the solution X(λ) may have infinite poles. The integer vector info.rdeg contains the relative row degrees of X(λ) (i.e., the numbers of integrators/delays needed to make each row of X(λ) proper).

If mindeg = true, a minimum degree solution is determined as X(λ) = X0(λ) + Z(λ)XN(λ), where Z(λ) is determined using order reduction based on a Type 2 minimum dynamic cover. This computation involves using non-orthogonal transformations whose worst condition number is returned in info.tcond, in conjunction with using feedback and feedforward gains, whose norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

If minreal = true, the computed realization sysx is minimal.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of Ag, Bg, Cg, Dg, Af, Bf, Cf, Df, the absolute tolerance for the nonzero elements of Eg and Ef, and the relative tolerance for the nonzero elements of Ag, Bg, Cg, Dg, Af, Bf, Cf, Df, Eg and Ef. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sysg and sysf. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The dual of method of [1] to solve rational systems is used.

References:

[1] A. Varga, "Computation of least order solutions of linear rational equations", Proc. MTNS'04, Leuven, Belgium, 2004.

source
DescriptorSystems.grmcover1Function
grmcover1(sys1, sys2; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

Determine for the proper descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices X1(λ) and X2(λ), respectively, using a right minimum dynamic cover of Type 1 based order reduction, the descriptor systems sysx and sysy with the transfer function matrices X(λ) and Y(λ), respectively, such that

X(λ) = X1(λ) + X2(λ)*Y(λ) ,

and sysx has order less than the order of sys1.

The call with

grmcover1(sys, m1; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

uses the compound descriptor system sys = (A-λE,[B1 B2],C,[D1 D2]), where B1 and D1 have m1 columns, to define the proper descriptor systems sys1 = (A-λE,B1,C,D1) and sys2 = (A-λE,B2,C,D2) (i.e., A1-λE1 = A2-λE2 = A-λE and C1 = C2 = C).

The resulting descriptor systems sysx and sysy have controllable realizations of the form sysx = (Ar-λEr,Br,Cr1,D1) and sysy = (Ar-λEr,Br,Cr2,0), where the pencil [Br Ar-λEr] is in a (controllability) staircase form, with νr[i] x νr[i-1] full row rank diagonal blocks, for i = 1, ..., nr, with νr[0] := m1.

The resulting named triple info contains (stdim, tcond, fnorm), where info.stdim = νr is a vector which contains the row dimensions of the blocks of the staircase form [Br Ar-λEr], info.tcond is the maximum of the Frobenius-norm condition numbers of the employed non-orthogonal transformation matrices, and info.fnorm is the Frobenius-norm of the (internally) employed state-feedback to reduce the order. Large values of info.tcond or info.fnorm indicate possible loss of numerical stability of computations.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Note: grmcover1 also works for arbitrary descriptor system sys1, if sys2 is proper. For an improper system sys1, the order reduction is performed only for the proper part of sys1, while the polynomial part of sys1 is included without modification in the resulting realization of sysx. In this case, info.stdim = νr contains the information corresponding to the proper part of sysx.

Method: The method of [1] is used to compute Type 1 minimum dynamic covers for standard systems and the method of [2] for proper descriptor systems. The resulting order (McMillan degree) of sysx is the least achievable one provided the realization of sys2 is maximally observable (i.e., the pair (A2+B2*F-λE2,C2+D2*F) is observable for any F).

References:

[1] A. Varga, Reliable algorithms for computing minimal dynamic covers, Proc. CDC'03, Maui, Hawaii, 2003.

[2] A. Varga. Reliable algorithms for computing minimal dynamic covers for descriptor systems. Proc. MTNS Symposium, Leuven, Belgium, 2004.

source
DescriptorSystems.glmcover1Function
glmcover1(sys1, sys2; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

Determine for the proper descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices X1(λ) and X2(λ), respectively, using a left minimum dynamic cover of Type 1 based order reduction, the descriptor systems sysx and sysy with the transfer function matrices X(λ) and Y(λ), respectively, such that

X(λ) = X1(λ) + Y(λ)*X2(λ) ,

and sysx has order less than the order of sys1.

The call with

glmcover1(sys, p1; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

uses the compound descriptor system sys = (A-λE,B,[C1; C2],[D1; D2]), where C1 and D1 have p1 rows, to define the proper descriptor systems sys1 = (A-λE,B,C1,D1) and sys2 = (A-λE,B,C2,D2) (i.e., A1-λE1 = A2-λE2 = A-λE and B1 = B2 = B).

The resulting descriptor systems sysx and sysy have observable realizations of the form sysx = (Ao-λEo,Bo1,Co,D1) and sysy = (Ao-λEo,Bo2,Co,0), where the pencil [Ao-λEo; Co] is in a (observability) staircase form, with νl[i] x νl[i+1] full row rank diagonal blocks, for i = 1, ..., nl, with νl[nl+1] := p1.

The resulting named triple info contains (stdim, tcond, fnorm), where info.stdim = νl is a vector which contains the column dimensions of the blocks of the staircase form [Ao-λEo; Co], info.tcond is the maximum of the Frobenius-norm condition numbers of the employed non-orthogonal transformation matrices, and info.fnorm is the Frobenius-norm of the (internally) employed output-injection gain to reduce the order. Large values of info.tcond or info.fnorm indicate possible loss of numerical stability of computations.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Note: glmcover1 also works for arbitrary descriptor system sys1, if sys2 is proper. For an improper system sys1, the order reduction is performed only for the proper part of sys1, while the polynomial part of sys1 is included without modification in the resulting realization of sysx. In this case, info.stdim = νl contains the information corresponding to the proper part of sysx.

Method: The dual of method of [1] is used to compute Type 1 minimum dynamic covers for standard systems and the dual of method of [2] for proper descriptor systems. The resulting McMillan degree of sysx is the least achievable one provided the realization of sys2 is maximally controllable (i.e., the pair (A2+F*C2-λE2,B2+F*D2) is controllable for any F).

References:

[1] A. Varga, Reliable algorithms for computing minimal dynamic covers, Proc. CDC'03, Maui, Hawaii, 2003.

[2] A. Varga. Reliable algorithms for computing minimal dynamic covers for descriptor systems. Proc. MTNS Symposium, Leuven, Belgium, 2004.

source
DescriptorSystems.grmcover2Function
grmcover2(sys1, sys2; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

Determine for the proper descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices X1(λ) and X2(λ), respectively, using a right minimum dynamic cover of Type 2 based order reduction, the descriptor systems sysx and sysy with the transfer function matrices X(λ) and Y(λ), respectively, such that

X(λ) = X1(λ) + X2(λ)*Y(λ) ,

and sysx has order less than the order of sys1.

The call with

grmcover2(sys, m1; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

uses the compound descriptor system sys = (A-λE,[B1 B2],C,[D1 D2]), where B1 and D1 haves m1 columns, to define the proper descriptor systems sys1 = (A-λE,B1,C,D1) and sys2 = (A-λE,B2,C,D2) (i.e., A1-λE1 = A2-λE2 =: A-λE and C1 = C2 =: C).

The resulting descriptor systems sysx and sysy have controllable realizations of the form sysx = (Ar-λEr,Br,Cr1,Dr1) and sysy = (Ar-λEr,Br,Cr2,Dr2), where the pencil [Br Ar-λEr] is in a (controllability) staircase form, with νr[i] x νr[i-1] full row rank diagonal blocks, for i = 1, ..., nr, with νr[0] := m1.

The resulting named triple info contains (stdim, tcond, fnorm, gnorm), where info.stdim = νr is a vector which contains the row dimensions of the blocks of the staircase form [Br Ar-λEr], info.tcond is the maximum of the Frobenius-norm condition numbers of the employed non-orthogonal transformation matrices, info.fnorm is the Frobenius-norm of the (internally) employed state-feedback gain to reduce the order, info.gnorm is the Frobenius-norm of the (internally) employed feedforward gain to reduce the order. Large values of info.tcond, info.fnorm or info.gnorm indicate possible loss of numerical stability of computations.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Note: grmcover2 also works for arbitrary descriptor system sys1, if sys2 is proper. For an improper system sys1, the order reduction is performed only for the proper part of sys1, while the polynomial part of sys1 is included without modification in the resulting realization of sysx. In this case, info.stdim = νr contains the information corresponding to the proper part of sysx.

Method: The method of [1] is used to compute Type 2 minimum dynamic covers for standard systems and the method of [2] for proper descriptor systems. The resulting McMillan degree of sysx is the least achievable one provided the realization of sys2 is maximally observable (i.e., the pair (A2+B2*F-λE2,C2+D2*F) is observable for any F).

References:

[1] A. Varga, Reliable algorithms for computing minimal dynamic covers, Proc. CDC'03, Maui, Hawaii, 2003.

[2] A. Varga. Reliable algorithms for computing minimal dynamic covers for descriptor systems. Proc. MTNS Symposium, Leuven, Belgium, 2004.

source
DescriptorSystems.glmcover2Function
glmcover2(sys1, sys2; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

Determine for the proper descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices X1(λ) and X2(λ), respectively, using a left minimum dynamic cover of Type 2 based order reduction, the descriptor systems sysx and sysy with the transfer function matrices X(λ) and Y(λ), respectively, such that

X(λ) = X1(λ) + Y(λ)*X2(λ) ,

and sysx has order less than the order of sys1.

The call with

glmcover2(sys, p1; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol) -> (sysx, sysy, info)

uses the compound descriptor system sys = (A-λE,B, [C1; C2],[D1; D2]), where C1 and D1 have p1 rows and E is invertible, to define the proper descriptor systems sys1 = (A-λE,B,C1,D1) and sys2 = (A-λE,B,C2,D2) (i.e., A1-λE1 = A2-λE2 = A-λE and B1 = B2 = B).

The resulting descriptor systems sysx and sysy have observable realizations of the form sysx = (Ao-λEo,Bo1,Co,Do1) and sysy = (Ao-λEo,Bo2,Co,Do2), where the pencil [Ao-λEo; Co] is in a (observability) staircase form, with νl[i] x νl[i+1] full row rank diagonal blocks, for i = 1, ..., nl, with νl[nl+1] := p1.

The resulting named triple info contains (stdim, tcond, fnorm, gnorm), where info.stdim = νl is a vector which contains the column dimensions of the blocks of the staircase form [Ao-λEo; Co], info.tcond is the maximum of the Frobenius-norm condition numbers of the employed non-orthogonal transformation matrices, info.fnorm is the Frobenius-norm of the (internally) employed output-injection gain to reduce the order, and info.gnorm is the Frobenius-norm of the (internally) employed output-feedforward gain. Large values of info.tcond,info.fnorm or info.gnorm indicate possible loss of numerical stability of computations.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximal order of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Note: glmcover2 also works for arbitrary descriptor system sys1, if sys2 is proper. For an improper system sys1, the order reduction is performed only for the proper part of sys1, while the polynomial part of sys1 is included without modification in the resulting realization of sysx. In this case, info.stdim = νl contains the information corresponding to the proper part of sysx.

Method: The dual of method of [1] is used to compute Type 2 minimum dynamic covers for standard systems and the dual of method of [2] for proper descriptor systems. The resulting McMillan degree of sysx is the least achievable one provided the realization of sys2 is maximally controllable (i.e., the pair (A2+F*C2-λE2,B2+F*D2) is controllable for any F).

References:

[1] A. Varga, Reliable algorithms for computing minimal dynamic covers, Proc. CDC'03, Maui, Hawaii, 2003.

[2] A. Varga. Reliable algorithms for computing minimal dynamic covers for descriptor systems. Proc. MTNS Symposium, Leuven, Belgium, 2004.

source
DescriptorSystems.ginvFunction
ginv(sys; type = "1-2", mindeg = false, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol, 
           offset = sqrt(ϵ)) -> (sysinv, info)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) a generalized inverse system sysinv = (Ai-λEi,Bi,Ci,Di) with the transfer function matrix Gi(λ) such that two or more of the following Moore-Penrose conditions are satisfied:

     (1) G(λ)*Gi(λ)*G(λ) = G(λ);        
      (2) Gi(λ)*G(λ)*Gi(λ) = Gi(λ);
      (3) G(λ)*Gi(λ) = (G(λ)*Gi(λ))';
      (4) Gi(λ)*G(λ) = (Gi(λ)*G(λ))'.

The desired type of the computed generalized inverse can be specified using the keyword parameter type as follows:

  "1-2"     - for a generalized inverse which satisfies conditions (1) and (2) (default);
   "1-2-3"   - for a generalized inverse which satisfies conditions (1), (2) and (3);
   "1-2-4"   - for a generalized inverse which satisfies conditions (1), (2) and (4);
-  "1-2-3-4" - for the Moore-Penrose pseudoinverse, which satisfies all conditions (1)-(4).

The vector poles specified as a keyword argument, can be used to specify the desired eigenvalues alternatively to or jointly with enforcing a desired stability degree sdeg of the poles of the computed generalized inverse.

The keyword argument mindeg can be used to specify the option to determine a minimum order generalized inverse, if mindeg = true, or a particular generalized inverse which has possibly non-minimal order, if mindeg = false (default).

To assess the presence of zeros on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time setting, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time setting, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The returned named tuple info has the components info.nrank, info.nfp, info.fnorm and info.tcond, where: info.nrank is the normal rank of G(λ), info.nfp is the number of freely assignable poles of the inverse Gi(λ), info.fnorm is the maximum of norms of employed feedback gains (also for pole assignment) and info.tcond is the maximum of condition numbers of employed non-orthogonal transformations (see below).

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting, if fast = true, or the more reliable SVD-decompositions, if fast = false. The computation of a minimum order inverse is performed by solving suitable minimum dynamic cover problems. These computations involve using non-orthogonal transformations whose maximal condition number is returned in info.tcond, in conjunction with using feedback gains (also for pole assignment), whose maximal norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximum dimension of state, input and output vectors of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

Method: The methods proposed in [1] are employed in conjunction with full rank factorizations computed using the approach of [2].

References:

[1] A. Varga. Computing generalized inverse systems using matrix pencil methods. Int. J. of Applied Mathematics and Computer Science, vol. 11, pp. 1055-1068, 2001.

[2] Varga, A. A note on computing range space bases of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.00489, 2017.

source
+ "1-2-3-4" - for the Moore-Penrose pseudoinverse, which satisfies all conditions (1)-(4).

The vector poles specified as a keyword argument, can be used to specify the desired eigenvalues alternatively to or jointly with enforcing a desired stability degree sdeg of the poles of the computed generalized inverse.

The keyword argument mindeg can be used to specify the option to determine a minimum order generalized inverse, if mindeg = true, or a particular generalized inverse which has possibly non-minimal order, if mindeg = false (default).

To assess the presence of zeros on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time setting, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time setting, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The returned named tuple info has the components info.nrank, info.nfp, info.fnorm and info.tcond, where: info.nrank is the normal rank of G(λ), info.nfp is the number of freely assignable poles of the inverse Gi(λ), info.fnorm is the maximum of norms of employed feedback gains (also for pole assignment) and info.tcond is the maximum of condition numbers of employed non-orthogonal transformations (see below).

The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting, if fast = true, or the more reliable SVD-decompositions, if fast = false. The computation of a minimum order inverse is performed by solving suitable minimum dynamic cover problems. These computations involve using non-orthogonal transformations whose maximal condition number is returned in info.tcond, in conjunction with using feedback gains (also for pole assignment), whose maximal norms are returned in info.fnorm. High values of these quantities indicate a potential loss of numerical stability of computations.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximum dimension of state, input and output vectors of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

Method: The methods proposed in [1] are employed in conjunction with full rank factorizations computed using the approach of [2].

References:

[1] A. Varga. Computing generalized inverse systems using matrix pencil methods. Int. J. of Applied Mathematics and Computer Science, vol. 11, pp. 1055-1068, 2001.

[2] Varga, A. A note on computing range space bases of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.00489, 2017.

source diff --git a/dev/analysis.html b/dev/analysis.html index 30327e6..e6eed44 100644 --- a/dev/analysis.html +++ b/dev/analysis.html @@ -1,14 +1,14 @@ -Descriptor system analysis · DescriptorSystems.jl

Descriptor system analysis

  • isregular Test whether a descriptor system has a regular pole pencil.
  • gpole Poles of a descriptor system.
  • gpoleinfo Poles and pole structure information of a descriptor system.
  • isproper Test whether a descriptor system is proper.
  • isstable Test whether a descriptor system is stable.
  • gzero Zeros of a descriptor system.
  • gzeroinfo Zeros and zero structure information of a descriptor system.
  • gnrank Normal rank of the transfer function matrix of a descriptor system.
  • ghanorm Hankel norm of a proper and stable descriptor system.
  • gl2norm L2 norm of a descriptor system.
  • gh2norm H2 norm of a descriptor system.
  • glinfnorm L∞ norm of a descriptor system.
  • ghinfnorm H∞ norm of a descriptor system.
  • gnugap ν-gap distance between two descriptor systems.
  • freqresp Frequency response of a descriptor system.
  • timeresp Time response of a descriptor system.
  • stepresp Step response of a descriptor system.
  • gbalqual Evaluation of the scaling quality of the matrices of a descriptor system.
MatrixPencils.isregularFunction
isregular(sys; atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Return true if the descriptor system sys = (A-λE,B,C,D) has a regular pole pencil A-λE and false otherwise.

To test whether the pencil A-λE is regular (i.e., det(A-λE) ̸≡ 0), the underlying computational procedure reduces the pencil A-λE to an appropriate Kronecker-like form, which provides information on the rank of A-λE.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E, respectively. The default relative tolerance is n*ϵ, where n is the size of A, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gpoleFunction
val = gpole(sys; fast = false, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Return for the descriptor system sys = (A-λE,B,C,D) the complex vector val containing the finite and infinite zeros of the system pole pencil P(λ) := A-λE. The values in val are the poles of the transfer function matrix of sys, if A-λE is regular and the descriptor system realization sys = (A-λE,B,C,D) is irreducible. If the pencil A-λE is singular, val also contains NaN elements, whose number is the rank deficiency of the pencil A-λE.

For E nonsingular, val contains the generalized eigenvalues of the pair (A,E). For E singular, val contains the zeros of P(λ), which are computed by reducing the pencil P(λ) to an appropriate Kronecker-like form using orthonal similarity transformations and involves rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The regularity of A-λE is implicitly checked. If check_reg = true, an error message is issued if the pencil A-λE is singular. If check_reg = false and the pencil A-λE is singular, then n-r poles are set to NaN, where n is the system order and r is the normal rank of A-λE.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E, respectively. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gpoleinfoFunction
gpoleinfo(sys; smarg, fast = false, atol = 0, atol1 = atol, atol2 = atol, 
-          rtol = n*ϵ, offset = sqrt(ϵ)) -> (val, info)

Return for the descriptor system sys = (A-λE,B,C,D) the complex vector val containing the finite and infinite zeros of the system pole pencil P(λ) := A-λE and the named tuple info containing information on the eigenvalue structure of the pole pencil P(λ). The values in val are the poles of the transfer function matrix of sys, if A-λE is regular and the descriptor system realization sys = (A-λE,B,C,D) is irreducible. If the pencil A-λE is singular, val also contains NaN elements, whose number is the rank deficiency of the pencil A-λE.

For stability analysis purposes, a stability margin smarg can be specified for the finite eigenvalues, in conjunction with a stability domain boundary offset β to numerically assess the finite eigenvalues which belong to the boundary of the stability domain as follows: in the continuous-time case, these are the finite eigenvalues having real parts in the interval [smarg-β, smarg+β], while in the discrete-time case, these are the finite eigenvalues having moduli in the interval [smarg-β, smarg+β]. The default value of the stability margin smarg is 0 for a continuous-time system and 1 for a discrete-time system. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The named tuple info contains the following information:

info.nfev is the number of finite eigenvalues of the pencil A-λE (also the number of finite poles of sys);

info.niev is the number of infinite eigenvalues of the pencil A-λE;

info.nisev is the number of simple infinite eigenvalues of the pencil A-λE (also known as non-dynamic modes);

info.nip is the number of infinite poles of the system sys;

info.nfsev is the number of finite stable eigenvalues, i.e., the finite eigenvalues having real parts or moduli less than smarg-β for a continuous- or discrete-time system, respectively;

info.nfsbev is the number of finite eigenvalues on the boundary of the stability domain, i.e., the finite eigenvalues having real parts or moduli in the interval [smarg-β, smarg+β] for a continuous- or discrete-time system, respectively;

info.nfuev is the number of finite unstable eigenvalues, i.e., the finite eigenvalues having real parts or moduli greater than smarg+β for a continuous- or discrete-time system, respectively;

info.nhev is the number of hidden eigenvalues set to NaN (can be nonzero only if the pencil A-λE is singular);

info.nrank is the normal rank of the pencil A-λE;

info.miev is an integer vector, which contains the multiplicities of the infinite eigenvalues of the pencil A-λE as follows: the i-th element info.miev[i] is the order of an infinite elementary divisor (i.e., the multiplicity of an infinite eigenvalue) and the number of infinite poles is the sum of the components of info.miev;

info.mip is an integer vector, which contains the information on the multiplicities of the infinite zeros of A-λE as follows: the i-th element info.mip[i] is equal to k-1, where k is the order of an infinite elementary divisor with k > 0 and the number of infinite poles is the sum of the components of info.mip;

info.rki is an integer vector, which contains the right Kronecker indices of the pencil A-λE (empty for a regular pencil);

info.lki is an integer vector, which contains the left Kronecker indices of the pencil A-λE (empty for a regular pencil);

info.regular is set to true, if the pencil A-λE is regular and set to false, if the pencil A-λE is singular;

info.proper is set to true, if the pencil A-λE is regular and all its infinite eigenvalues are simple (has only non-dynamic modes), or is set to false, if the pencil A-λE is singular or has higher order infinite eigenvalues;

info.stable is set to true, if the pencil A-λE is regular, has only stable finite eigenvalues and all its infinite eigenvalues are simple (has only non-dynamic modes), and is set to false otherwise.

Note: The finite poles and the finite eigenvalues of the pencil P(λ) are the same, but the multiplicities of infinite eigenvalues of P(λ) are in excess with one to the multiplicities of infinite poles.

For the reduction of the pencil P(λ) to an appropriate Kronecker-like form orthonal similarity transformations are performed, which involve rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E, respectively. The default relative tolerance is n*ϵ, where n is the size of P(λ), and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.isproperFunction
isproper(sys; atol = 0, atol1 = atol, atol2 = atol, rtol = = n*ϵ, fast = true)

Return true if the transfer function matrix G(λ) of the descriptor system sys = (A-λE,B,C,D) is proper and false otherwise.

For a descriptor system realization sys = (A-λE,B,C,D) without uncontrollable and unobservable infinite eigenvalues, it is checked that the pencil A-λE has no infinite eigenvalues or, if infinite eigenvalues exist, all infinite eigenvalues are simple. If the original descriptor realization has uncontrollable or unobservable infinite eigenvalues, these are elliminated using orthogonal pencil reduction algorithms.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of A and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.isstableFunction
isstable(sys[, smarg]; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ, offset = sqrt(ϵ))

Return true if the descriptor system sys = (A-λE,B,C,D) has only stable poles and false otherwise.

It is checked that the pole pencil P(λ) := A-λE has no infinite eigenvalues or, if infinite eigenvalues exist, all infinite eigenvalues are simple, and additionally the real parts of all finite eigenvalues are less than smarg-β for a continuous-time system or have moduli less than smarg-β for a discrete-time system, where smarg is the stability margin and β is the stability domain boundary offset. The default value of the stability margin smarg is 0 for a continuous-time system and 1 for a discrete-time system. The offset β to be used to numerically assess the stability of eigenvalues can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

For E singular, the computation of the poles is performed by reducing the pencil P(λ) to an appropriate Kronecker-like form using orthonal similarity transformations and involves rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of A and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gzeroFunction
val = gzero(sys; fast = false, prescale, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Return for the descriptor system sys = (A-λE,B,C,D) the complex vector val containing the finite and infinite Smith zeros of the system matrix pencil

           | A-λE | B | 
+Descriptor system analysis · DescriptorSystems.jl

Descriptor system analysis

  • isregular Test whether a descriptor system has a regular pole pencil.
  • gpole Poles of a descriptor system.
  • gpoleinfo Poles and pole structure information of a descriptor system.
  • isproper Test whether a descriptor system is proper.
  • isstable Test whether a descriptor system is stable.
  • gzero Zeros of a descriptor system.
  • gzeroinfo Zeros and zero structure information of a descriptor system.
  • gnrank Normal rank of the transfer function matrix of a descriptor system.
  • ghanorm Hankel norm of a proper and stable descriptor system.
  • gl2norm L2 norm of a descriptor system.
  • gh2norm H2 norm of a descriptor system.
  • glinfnorm L∞ norm of a descriptor system.
  • ghinfnorm H∞ norm of a descriptor system.
  • gnugap ν-gap distance between two descriptor systems.
  • freqresp Frequency response of a descriptor system.
  • timeresp Time response of a descriptor system.
  • stepresp Step response of a descriptor system.
  • gbalqual Evaluation of the scaling quality of the matrices of a descriptor system.
MatrixPencils.isregularFunction
isregular(sys; atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Return true if the descriptor system sys = (A-λE,B,C,D) has a regular pole pencil A-λE and false otherwise.

To test whether the pencil A-λE is regular (i.e., det(A-λE) ̸≡ 0), the underlying computational procedure reduces the pencil A-λE to an appropriate Kronecker-like form, which provides information on the rank of A-λE.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E, respectively. The default relative tolerance is n*ϵ, where n is the size of A, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gpoleFunction
val = gpole(sys; fast = false, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Return for the descriptor system sys = (A-λE,B,C,D) the complex vector val containing the finite and infinite zeros of the system pole pencil P(λ) := A-λE. The values in val are the poles of the transfer function matrix of sys, if A-λE is regular and the descriptor system realization sys = (A-λE,B,C,D) is irreducible. If the pencil A-λE is singular, val also contains NaN elements, whose number is the rank deficiency of the pencil A-λE.

For E nonsingular, val contains the generalized eigenvalues of the pair (A,E). For E singular, val contains the zeros of P(λ), which are computed by reducing the pencil P(λ) to an appropriate Kronecker-like form using orthonal similarity transformations and involves rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The regularity of A-λE is implicitly checked. If check_reg = true, an error message is issued if the pencil A-λE is singular. If check_reg = false and the pencil A-λE is singular, then n-r poles are set to NaN, where n is the system order and r is the normal rank of A-λE.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E, respectively. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gpoleinfoFunction
gpoleinfo(sys; smarg, fast = false, atol = 0, atol1 = atol, atol2 = atol, 
+          rtol = n*ϵ, offset = sqrt(ϵ)) -> (val, info)

Return for the descriptor system sys = (A-λE,B,C,D) the complex vector val containing the finite and infinite zeros of the system pole pencil P(λ) := A-λE and the named tuple info containing information on the eigenvalue structure of the pole pencil P(λ). The values in val are the poles of the transfer function matrix of sys, if A-λE is regular and the descriptor system realization sys = (A-λE,B,C,D) is irreducible. If the pencil A-λE is singular, val also contains NaN elements, whose number is the rank deficiency of the pencil A-λE.

For stability analysis purposes, a stability margin smarg can be specified for the finite eigenvalues, in conjunction with a stability domain boundary offset β to numerically assess the finite eigenvalues which belong to the boundary of the stability domain as follows: in the continuous-time case, these are the finite eigenvalues having real parts in the interval [smarg-β, smarg+β], while in the discrete-time case, these are the finite eigenvalues having moduli in the interval [smarg-β, smarg+β]. The default value of the stability margin smarg is 0 for a continuous-time system and 1 for a discrete-time system. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The named tuple info contains the following information:

info.nfev is the number of finite eigenvalues of the pencil A-λE (also the number of finite poles of sys);

info.niev is the number of infinite eigenvalues of the pencil A-λE;

info.nisev is the number of simple infinite eigenvalues of the pencil A-λE (also known as non-dynamic modes);

info.nip is the number of infinite poles of the system sys;

info.nfsev is the number of finite stable eigenvalues, i.e., the finite eigenvalues having real parts or moduli less than smarg-β for a continuous- or discrete-time system, respectively;

info.nfsbev is the number of finite eigenvalues on the boundary of the stability domain, i.e., the finite eigenvalues having real parts or moduli in the interval [smarg-β, smarg+β] for a continuous- or discrete-time system, respectively;

info.nfuev is the number of finite unstable eigenvalues, i.e., the finite eigenvalues having real parts or moduli greater than smarg+β for a continuous- or discrete-time system, respectively;

info.nhev is the number of hidden eigenvalues set to NaN (can be nonzero only if the pencil A-λE is singular);

info.nrank is the normal rank of the pencil A-λE;

info.miev is an integer vector, which contains the multiplicities of the infinite eigenvalues of the pencil A-λE as follows: the i-th element info.miev[i] is the order of an infinite elementary divisor (i.e., the multiplicity of an infinite eigenvalue) and the number of infinite poles is the sum of the components of info.miev;

info.mip is an integer vector, which contains the information on the multiplicities of the infinite zeros of A-λE as follows: the i-th element info.mip[i] is equal to k-1, where k is the order of an infinite elementary divisor with k > 0 and the number of infinite poles is the sum of the components of info.mip;

info.rki is an integer vector, which contains the right Kronecker indices of the pencil A-λE (empty for a regular pencil);

info.lki is an integer vector, which contains the left Kronecker indices of the pencil A-λE (empty for a regular pencil);

info.regular is set to true, if the pencil A-λE is regular and set to false, if the pencil A-λE is singular;

info.proper is set to true, if the pencil A-λE is regular and all its infinite eigenvalues are simple (has only non-dynamic modes), or is set to false, if the pencil A-λE is singular or has higher order infinite eigenvalues;

info.stable is set to true, if the pencil A-λE is regular, has only stable finite eigenvalues and all its infinite eigenvalues are simple (has only non-dynamic modes), and is set to false otherwise.

Note: The finite poles and the finite eigenvalues of the pencil P(λ) are the same, but the multiplicities of infinite eigenvalues of P(λ) are in excess with one to the multiplicities of infinite poles.

For the reduction of the pencil P(λ) to an appropriate Kronecker-like form orthonal similarity transformations are performed, which involve rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E, respectively. The default relative tolerance is n*ϵ, where n is the size of P(λ), and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.isproperFunction
isproper(sys; atol = 0, atol1 = atol, atol2 = atol, rtol = = n*ϵ, fast = true)

Return true if the transfer function matrix G(λ) of the descriptor system sys = (A-λE,B,C,D) is proper and false otherwise.

For a descriptor system realization sys = (A-λE,B,C,D) without uncontrollable and unobservable infinite eigenvalues, it is checked that the pencil A-λE has no infinite eigenvalues or, if infinite eigenvalues exist, all infinite eigenvalues are simple. If the original descriptor realization has uncontrollable or unobservable infinite eigenvalues, these are elliminated using orthogonal pencil reduction algorithms.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of A and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.isstableFunction
isstable(sys[, smarg]; fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ, offset = sqrt(ϵ))

Return true if the descriptor system sys = (A-λE,B,C,D) has only stable poles and false otherwise.

It is checked that the pole pencil P(λ) := A-λE has no infinite eigenvalues or, if infinite eigenvalues exist, all infinite eigenvalues are simple, and additionally the real parts of all finite eigenvalues are less than smarg-β for a continuous-time system or have moduli less than smarg-β for a discrete-time system, where smarg is the stability margin and β is the stability domain boundary offset. The default value of the stability margin smarg is 0 for a continuous-time system and 1 for a discrete-time system. The offset β to be used to numerically assess the stability of eigenvalues can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

For E singular, the computation of the poles is performed by reducing the pencil P(λ) to an appropriate Kronecker-like form using orthonal similarity transformations and involves rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of A and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gzeroFunction
val = gzero(sys; fast = false, prescale, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Return for the descriptor system sys = (A-λE,B,C,D) the complex vector val containing the finite and infinite Smith zeros of the system matrix pencil

           | A-λE | B | 
    S(λ) := |------|---| .
-           |  C   | D |

The values in val are called the invariant zeros of the pencil S(λ) and are the transmission zeros of the transfer function matrix of sys if A-λE is regular and the descriptor system realization sys = (A-λE,B,C,D) is irreducible.

If prescale = true, a preliminary balancing of the descriptor system matrices is performed. The default setting is prescale = gbalqual(sys) > 10000, where gbalqual(sys) is the scaling quality of the descriptor system model sys (see gbalqual).

The computation of the zeros is performed by reducing the pencil S(λ) to an appropriate Kronecker-like form using orthonal similarity transformations and involves rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D, respectively. The default relative tolerance is n*ϵ, where n is the size of A, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gzeroinfoFunction
gzeroinfo(sys; smarg, fast = false, prescale, atol = 0, atol1 = atol, atol2 = atol, 
+           |  C   | D |

The values in val are called the invariant zeros of the pencil S(λ) and are the transmission zeros of the transfer function matrix of sys if A-λE is regular and the descriptor system realization sys = (A-λE,B,C,D) is irreducible.

If prescale = true, a preliminary balancing of the descriptor system matrices is performed. The default setting is prescale = gbalqual(sys) > 10000, where gbalqual(sys) is the scaling quality of the descriptor system model sys (see gbalqual).

The computation of the zeros is performed by reducing the pencil S(λ) to an appropriate Kronecker-like form using orthonal similarity transformations and involves rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D, respectively. The default relative tolerance is n*ϵ, where n is the size of A, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gzeroinfoFunction
gzeroinfo(sys; smarg, fast = false, prescale, atol = 0, atol1 = atol, atol2 = atol, 
           rtol = n*ϵ, offset = sqrt(ϵ)) -> (val, info)

Return for the descriptor system sys = (A-λE,B,C,D) the complex vector val containing the finite and infinite Smith zeros of the system matrix pencil S(λ)

          | A-λE | B | 
    S(λ) = |------|---| 
-          |  C   | D |

and the named tuple info containing information on the Kronecker structure of the pencil S(λ). The values in val are called the invariant zeros of the pencil S(λ) and are the transmission zeros of the transfer function matrix of sys if A-λE is regular and the descriptor system realization sys = (A-λE,B,C,D) is irreducible.

If prescale = true, a preliminary balancing of the descriptor system matrices is performed. The default setting is prescale = gbalqual(sys) > 10000, where gbalqual(sys) is the scaling quality of the descriptor system model sys (see gbalqual).

For stability analysis purposes, a stability margin smarg can be specified for the finite zeros, in conjunction with a stability domain boundary offset β to numerically assess the finite zeros which belong to the boundary of the stability domain as follows: in the continuous-time case, these are the finite zeros having real parts in the interval [smarg-β, smarg+β], while in the discrete-time case, these are the finite zeros having moduli in the interva [smarg-β, smarg+β]. The default value of the stability margin smarg is 0 for a continuous-time system and 1 for a discrete-time system. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The named tuple info contains the following information:

info.nfz is the number of finite eigenvalues of the pencil S(λ) (also the number of finite zeros of sys);

info.niev is the number of infinite eigenvalues of the pencil S(λ);

info.nisev is the number of simple infinite eigenvalues of the pencil S(λ);

info.niz is the number of infinite zeros of the system sys;

info.nfsz is the number of finite stable zeros, i.e., the finite zeros having real parts or moduli less than smarg-β for a continuous- or discrete-time system, respectively;

info.nfsbz is the number of finite zeros on the boundary of the stability domain, i.e., the finite zeros having real parts or moduli in the interval [smarg-β, smarg+β] for a continuous- or discrete-time system, respectively;

info.nfuz is the number of finite unstable zeros, i.e., the finite zeros having real parts or moduli greater than smarg+β for a continuous- or discrete-time system, respectively;

info.nrank is the normal rank of the pencil S(λ);

info.miev is an integer vector, which contains the multiplicities of the infinite eigenvalues of the pencil S(λ) (also the dimensions of the elementary infinite blocks in the Kronecker form of S(λ));

info.miz is an integer vector, which contains the information on the multiplicities of the infinite zeros of S(λ) as follows: S(λ) has info.mip[i] infinite zeros of multiplicity i, and is empty if S(λ) has no infinite zeros;

info.rki is an integer vector, which contains the right Kronecker indices of the pencil S(λ) (empty for a regular pencil);

info.lki is an integer vector, which contains the left Kronecker indices of the pencil S(λ) (empty for a regular pencil);

info.regular is set to true, if the pencil S(λ) is regular and set to false, if the pencil S(λ) is singular;

info.stable is set to true, if the pencil S(λ) has only stable finite zeros and all its infinite zeros are simple and is set to false otherwise.

Note: The finite zeros and the finite eigenvalues of the pencil S(λ) are the same, but the multiplicities of infinite eigenvalues are in excess with one to the multiplicities of infinite zeros.

The computation of the zeros is performed by reducing the pencil S(λ) to an appropriate Kronecker-like form using orthonal similarity transformations and involves rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D, respectively. The default relative tolerance is n*ϵ, where n is the size of A and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gnrankFunction
r = gnrank(sys, fastrank = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ )

Compute the normal rank r of the transfer function matrix G(λ) of the descriptor system sys = (A-λE,B,C,D).

The normal rank of G(λ) is evaluated as r = k - n, where k is the normal rank of the system matrix pencil

          | A-λE | B | 
+          |  C   | D |

and the named tuple info containing information on the Kronecker structure of the pencil S(λ). The values in val are called the invariant zeros of the pencil S(λ) and are the transmission zeros of the transfer function matrix of sys if A-λE is regular and the descriptor system realization sys = (A-λE,B,C,D) is irreducible.

If prescale = true, a preliminary balancing of the descriptor system matrices is performed. The default setting is prescale = gbalqual(sys) > 10000, where gbalqual(sys) is the scaling quality of the descriptor system model sys (see gbalqual).

For stability analysis purposes, a stability margin smarg can be specified for the finite zeros, in conjunction with a stability domain boundary offset β to numerically assess the finite zeros which belong to the boundary of the stability domain as follows: in the continuous-time case, these are the finite zeros having real parts in the interval [smarg-β, smarg+β], while in the discrete-time case, these are the finite zeros having moduli in the interva [smarg-β, smarg+β]. The default value of the stability margin smarg is 0 for a continuous-time system and 1 for a discrete-time system. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The named tuple info contains the following information:

info.nfz is the number of finite eigenvalues of the pencil S(λ) (also the number of finite zeros of sys);

info.niev is the number of infinite eigenvalues of the pencil S(λ);

info.nisev is the number of simple infinite eigenvalues of the pencil S(λ);

info.niz is the number of infinite zeros of the system sys;

info.nfsz is the number of finite stable zeros, i.e., the finite zeros having real parts or moduli less than smarg-β for a continuous- or discrete-time system, respectively;

info.nfsbz is the number of finite zeros on the boundary of the stability domain, i.e., the finite zeros having real parts or moduli in the interval [smarg-β, smarg+β] for a continuous- or discrete-time system, respectively;

info.nfuz is the number of finite unstable zeros, i.e., the finite zeros having real parts or moduli greater than smarg+β for a continuous- or discrete-time system, respectively;

info.nrank is the normal rank of the pencil S(λ);

info.miev is an integer vector, which contains the multiplicities of the infinite eigenvalues of the pencil S(λ) (also the dimensions of the elementary infinite blocks in the Kronecker form of S(λ));

info.miz is an integer vector, which contains the information on the multiplicities of the infinite zeros of S(λ) as follows: S(λ) has info.mip[i] infinite zeros of multiplicity i, and is empty if S(λ) has no infinite zeros;

info.rki is an integer vector, which contains the right Kronecker indices of the pencil S(λ) (empty for a regular pencil);

info.lki is an integer vector, which contains the left Kronecker indices of the pencil S(λ) (empty for a regular pencil);

info.regular is set to true, if the pencil S(λ) is regular and set to false, if the pencil S(λ) is singular;

info.stable is set to true, if the pencil S(λ) has only stable finite zeros and all its infinite zeros are simple and is set to false otherwise.

Note: The finite zeros and the finite eigenvalues of the pencil S(λ) are the same, but the multiplicities of infinite eigenvalues are in excess with one to the multiplicities of infinite zeros.

The computation of the zeros is performed by reducing the pencil S(λ) to an appropriate Kronecker-like form using orthonal similarity transformations and involves rank decisions based on rank revealing QR-decompositions with column pivoting, if fast = true, or, the more reliable, SVD-decompositions, if fast = false.

The keyword arguements atol1, atol2 and rtol specify the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D, respectively. The default relative tolerance is n*ϵ, where n is the size of A and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gnrankFunction
r = gnrank(sys, fastrank = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ )

Compute the normal rank r of the transfer function matrix G(λ) of the descriptor system sys = (A-λE,B,C,D).

The normal rank of G(λ) is evaluated as r = k - n, where k is the normal rank of the system matrix pencil

          | A-λE | B | 
   S(λ) := |------|---|
-          |  C   | D |

and n is the order of the system sys (i.e., the size of A).

If fastrank = true, the normal rank of S(λ) is evaluated by counting the singular values of S(γ) greater than max(max(atol1,atol2), rtol*σ₁), where σ₁ is the largest singular value of S(γ) and γ is a randomly generated value. If fastrank = false, the rank is evaluated as nr + ni + nf + nl, where nr and nl are the sums of right and left Kronecker indices, respectively, while ni and nf are the number of infinite and finite eigenvalues, respectively. The sums nr+ni and nf+nl are determined from an appropriate Kronecker-like form of the pencil S(λ), exhibiting the spliting of the right and left structures.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.ghanormFunction
ghanorm(sys, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (hanorm, hs)

Compute for a proper and stable descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the Hankel norm hanorm = $\small ||G(\lambda)||_H$ and the vector of Hankel singular values hs of the system.

For a proper system with E singular, the uncontrollable infinite eigenvalues of the pair (A,E) and the non-dynamic modes are elliminated using minimal realization techniques. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gl2normFunction
gl2norm(sys, h2norm = false, fast = true, offset = sqrt(ϵ), atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, atolinf = atol, rtol = n*ϵ)

Compute for a descriptor system sys = (A-λE,B,C,D) the L2 norm of its transfer function matrix G(λ). The L2 norm is infinite if the pole pencil A-λE has zeros (i.e., poles) on the stability domain boundary, i.e., on the extended imaginary axis, in the continuous-time case, or on the unit circle, in the discrete-time case. The L2 norm is also infinite for a continuous-time system having a gain at infinity greater than atolinf.

To check the lack of poles on the stability domain boundary, the eigenvalues of the pencil A-λE must not have real parts in the interval [-β,β] for a continuous-time system or must not have moduli in the interval [1-β,1+β] for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If h2norm = true, the H2 norm is computed. The H2 norm is infinite if the pole pencil A-λE has unstable zeros (i.e., unstable poles), or for a continuous-time system having a gain at infinity greater than atolinf. To check the stability, the eigenvalues of the pencil A-λE must have real parts less than for a continuous-time system or have moduli less than 1-β for a discrete-time system.

For a continuous-time system sys with E singular, a reduced order realization is determined first, without uncontrollable and unobservable nonzero finite and infinite eigenvalues of the corresponding pole pencil. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The keyword argument atol3 specifies the absolute tolerance for the nonzero elements of B and is only used if h2norm = false for controllability tests of unstable eigenvalues. The keyword argument atolinf is the absolute tolerance for the gain of G(λ) at λ = ∞. The used default value is atolinf = 0. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol and atol3 = atol.

source
DescriptorSystems.gh2normFunction
gh2norm(sys, fast = true, offset = sqrt(ϵ), atol = 0, atol1 = atol, atol2 = atol, atolinf = atol, rtol = n*ϵ)

Compute for a descriptor system sys = (A-λE,B,C,D) the H2 norm of its transfer function matrix G(λ). The H2 norm is infinite, if sys has unstable poles, or, for a continuous-time, the system has nonzero gain at infinity. To check the stability, the eigenvalues of the pole pencil A-λE must have real parts less than for a continuous-time system or have moduli less than 1-β for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

For a continuous-time system sys with E singular, a reduced order realization is determined first, without uncontrollable and unobservable nonzero finite and infinite eigenvalues of the corresponding pole pencil. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The keyword argument atolinf is the absolute tolerance for the gain of G(λ) at λ = ∞. The used default value is atolinf = 0. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.glinfnormFunction
glinfnorm(sys, hinfnorm = false, rtolinf = 0.001, fast = true, offset = sqrt(ϵ), atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (linfnorm, fpeak)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) the L∞ norm linfnorm (i.e., the peak gain of G(λ)) and the corresponding peak frequency fpeak, where the peak gain is achieved. The L∞ norm is infinite if the pole pencil A-λE has zeros (i.e., poles) on the stability domain boundary, i.e., on the extended imaginary axis, in the continuous-time case, or on the unit circle, in the discrete-time case. To check the lack of poles on the stability domain boundary, the eigenvalues of the pencil A-λE must not have real parts in the interval [-β,β] for a continuous-time system or must not have moduli within the interval [1-β,1+β] for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword argument rtolinf specifies the relative accuracy for the computed infinity norm. The default value used for rtolinf is 0.001.

If hinfnorm = true, the H∞ norm is computed. In this case, the stability of the zeros of A-λE is additionally checked and the H∞ norm is infinite for an unstable system. To check the stability, the eigenvalues of the pencil A-λE must have real parts less than for a continuous-time system or have moduli less than 1-β for a discrete-time system.

For a continuous-time system sys with E singular, a reduced order realization is determined first, without uncontrollable and unobservable nonzero finite and infinite eigenvalues of the corresponding pole pencil. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.ghinfnormFunction
ghinfnorm(sys, rtolinf = 0.001, fast = true, offset = sqrt(ϵ), atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (hinfnorm, fpeak)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) the H∞ norm hinfnorm (i.e., the peak gain of G(λ)) and the corresponding peak frequency fpeak, where the peak gain is achieved. The H∞ norm is infinite if the pole pencil A-λE has unstable zeros (i.e., sys has unstable poles). To check the stability, the eigenvalues of the pencil A-λE must have real parts less than for a continuous-time system or have moduli less than 1-β for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword argument rtolinf specifies the relative accuracy for the computed infinity norm. The default value used for rtolinf is 0.001.

For a continuous-time system sys with E singular, a reduced order realization is determined first, without uncontrollable and unobservable nonzero finite and infinite eigenvalues of the corresponding pole pencil. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gnugapFunction
gnugap(sys1, sys2; freq = ω, rtolinf = 0.00001, fast = true, offset = sqrt(ϵ), 
-       atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (nugapdist, fpeak)

Compute the ν-gap distance nugapdist between two descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) and the corresponding frequency fpeak (in rad/TimeUnit), where the ν-gap distance achieves its peak value.

If freq = missing, the resulting nugapdist satisfies 0 <= nugapdist <= 1. The value nugapdist = 1 results, if the winding number is different of zero in which case fpeak = [].

If freq = ω, where ω is a given vector of real frequency values, the resulting nugapdist is a vector of pointwise ν-gap distances of the dimension of ω, whose components satisfies 0 <= maximum(nugapdist) <= 1. In this case, fpeak is the frequency for which the pointwise distance achieves its peak value. All components of nugapdist are set to 1 if the winding number is different of zero in which case fpeak = [].

The stability boundary offset, β, to be used to assess the finite zeros which belong to the boundary of the stability domain can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, these are the finite zeros having real parts within the interval [-β,β], while for a discrete-time system, these are the finite zeros having moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

Pencil reduction algorithms are employed to compute range and coimage spaces which perform rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, A2, B1, B2, C1, C2, D1 and D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of all above matrices. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximum of the orders of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The keyword argument rtolinf specifies the relative accuracy to be used to compute the ν-gap as the infinity norm of the relevant system according to [1]. The default value used for rtolinf is 0.00001.

Method: The evaluation of ν-gap uses the definition proposed in [1], extended to generalized LTI (descriptor) systems. The computation of winding number is based on enhancements covering zeros on the boundary of the stability domain and infinite zeros.

References:

[1] G. Vinnicombe. Uncertainty and feedback: H∞ loop-shaping and the ν-gap metric. Imperial College Press, London, 2001.

source
DescriptorSystems.freqrespFunction
 H = freqresp(sys, ω)

Compute the frequency response H of the descriptor system sys = (A-λE,B,C,D) at the real frequencies ω.

For a system with p outputs and m inputs, and for N frequency values in ω, H is a p × m × N array, where H[:,:,i] contains the i-th value of the frequency response computed as C*((w[i]*E - A)^-1)*B + D, where w[i] = im*ω[i] for a continuous-time system and w[i] = exp(im*ω[i]*|Ts|) for a discrete-time system with sampling time Ts.

Method: For an efficient evaluation of C*((w[i]*E - A)^-1)*B + D for many values of w[i], a preliminary orthogonal coordinate transformation is performed such that for the input-output equivalent transformed system sys = (At-λEt,Bt,Ct,Dt), the matrix w[i]*Et - At is upper Hessenberg. This allows an efficient computation of the frequency response using the Hessenberg-form based approach proposed in [1].

Reference:

[1] Laub, A.J., "Efficient Multivariable Frequency Response Computations", IEEE Transactions on Automatic Control, AC-26 (1981), pp. 407-408.

source
DescriptorSystems.timerespFunction
timeresp(sys, u, t, x0 = 0; interpolation = "zoh", state_history = false, 
-         fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (y, tout, x)

Compute the time response of a proper descriptor system sys = (A-λE,B,C,D) to the input signals described by u and t. The time vector t consists of regularly spaced time samples. The matrix u has as many columns as the inputs of sys and its i-th row specifies the input values at time t[i]. For discrete-time models, u should be sampled at the same rate as sys if sys.Ts > 0 and t must have all time steps equal to sys.Ts or can be set to an empty vector. The vector x0 specifies the initial state vector at time t[1] and is set to zero when omitted.

The matrix y contains the resulting time history of the outputs of sys and the vector tout contains the corresponding values of the time samples. The i-th row of y contains the output values at time tout[i]. If the keyword parameter value state_history = false is used, then the matrix x contains the resulting time history of the state vector and its i-th row contains the state values at time tout[i]. By default, the state history is not computed and x = nothing.

For continuous-time models, the input values are interpolated between samples. By default, zero-order hold based interpolation is used. The linear interpolation method can be selected using the keyword parameter interpolation = "foh".

By default, the uncontrollable infinite eigenvalues and simple infinite eigenvalues of the pair (A,E) are eliminated. The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true (default), or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.steprespFunction
stepresp(sys[, tfinal]; x0 = zeros(sys.nx), ustep = ones(sys.nu), timesteps = 100, 
-         state_history = false, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (y, tout, x)

Compute the step response of a proper descriptor system sys = (A-λE,B,C,D) to step input signals. The final time tfinal, if not specified, is set to 10 for a continuous-time system or to abs(sys.Ts)*timesteps for a discrete-time system, where the keyword argument timesteps specifies the number of desired simulation time steps (default: timesteps = 100). The keyword argument ustep is a vector with as many components as the inputs of sys and specifies the desired amplitudes of step inputs (default: all components are set to 1). The keyword argument x0 is a vector which specifies the initial state vector at time 0 and is set to zero when omitted.

If ns is the total number of simulation values, n the number of state components, p the number of system outputs and m the number of system inputs, then the resulting ns×p×m array y contains the resulting time histories of the outputs of sys, such that y[:,:,j] is the time response for the j-th input set to ustep[j] and the rest of inputs set to zero. The vector tout contains the corresponding values of the time samples. The i-th row y[i,:,j] contains the output values at time tout[i] of the j-th step response. If the keyword parameter value state_history = true is used, then the resulting ns×n×m arrayx contains the resulting time histories of the state vector and the i-th row x[i,:,j] contains the state values at time tout[i] of the j-th step response. By default, the state history is not computed and x = nothing.

By default, the uncontrollable infinite eigenvalues and simple infinite eigenvalues of the pair (A,E) are eliminated. The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true (default), or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gbalqualFunction
qs = gbalqual(sys; SysMat = false)

Compute the 1-norm based scaling quality of the matrices of the descriptor system sys = (A-λE,B,C).

If SysMat = false, the resulting qs is computed as

    qs = max(qS(A),qS(E),qS(B),qS(C)) ,

where qS(⋅) is the scaling quality measure defined in Definition 5.5 of [1] for nonnegative matrices, extended to also cover matrices with zero rows or columns.

If SysMat = true, the resulting qs is computed as

    qs = qS(S) ,

where S is the system matrix defined as

         S =  ( abs(A)+abs(E)  abs(B) )
-              (    abs(C)        0    )

A large value of qs indicates a possibly poorly scaled state-space model. For a standard system with E = I, the above formulas are used assuming E = 0.

[1] F.M.Dopico, M.C.Quintana and P. van Dooren, "Diagonal scalings for the eigenstructure of arbitrary pencils", SIMAX, 43:1213-1237, 2022.

source
+ | C | D |

and n is the order of the system sys (i.e., the size of A).

If fastrank = true, the normal rank of S(λ) is evaluated by counting the singular values of S(γ) greater than max(max(atol1,atol2), rtol*σ₁), where σ₁ is the largest singular value of S(γ) and γ is a randomly generated value. If fastrank = false, the rank is evaluated as nr + ni + nf + nl, where nr and nl are the sums of right and left Kronecker indices, respectively, while ni and nf are the number of infinite and finite eigenvalues, respectively. The sums nr+ni and nf+nl are determined from an appropriate Kronecker-like form of the pencil S(λ), exhibiting the spliting of the right and left structures.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.ghanormFunction
ghanorm(sys, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (hanorm, hs)

Compute for a proper and stable descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the Hankel norm hanorm = $\small ||G(\lambda)||_H$ and the vector of Hankel singular values hs of the system.

For a proper system with E singular, the uncontrollable infinite eigenvalues of the pair (A,E) and the non-dynamic modes are elliminated using minimal realization techniques. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gl2normFunction
gl2norm(sys, h2norm = false, fast = true, offset = sqrt(ϵ), atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, atolinf = atol, rtol = n*ϵ)

Compute for a descriptor system sys = (A-λE,B,C,D) the L2 norm of its transfer function matrix G(λ). The L2 norm is infinite if the pole pencil A-λE has zeros (i.e., poles) on the stability domain boundary, i.e., on the extended imaginary axis, in the continuous-time case, or on the unit circle, in the discrete-time case. The L2 norm is also infinite for a continuous-time system having a gain at infinity greater than atolinf.

To check the lack of poles on the stability domain boundary, the eigenvalues of the pencil A-λE must not have real parts in the interval [-β,β] for a continuous-time system or must not have moduli in the interval [1-β,1+β] for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If h2norm = true, the H2 norm is computed. The H2 norm is infinite if the pole pencil A-λE has unstable zeros (i.e., unstable poles), or for a continuous-time system having a gain at infinity greater than atolinf. To check the stability, the eigenvalues of the pencil A-λE must have real parts less than for a continuous-time system or have moduli less than 1-β for a discrete-time system.

For a continuous-time system sys with E singular, a reduced order realization is determined first, without uncontrollable and unobservable nonzero finite and infinite eigenvalues of the corresponding pole pencil. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The keyword argument atol3 specifies the absolute tolerance for the nonzero elements of B and is only used if h2norm = false for controllability tests of unstable eigenvalues. The keyword argument atolinf is the absolute tolerance for the gain of G(λ) at λ = ∞. The used default value is atolinf = 0. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol and atol3 = atol.

source
DescriptorSystems.gh2normFunction
gh2norm(sys, fast = true, offset = sqrt(ϵ), atol = 0, atol1 = atol, atol2 = atol, atolinf = atol, rtol = n*ϵ)

Compute for a descriptor system sys = (A-λE,B,C,D) the H2 norm of its transfer function matrix G(λ). The H2 norm is infinite, if sys has unstable poles, or, for a continuous-time, the system has nonzero gain at infinity. To check the stability, the eigenvalues of the pole pencil A-λE must have real parts less than for a continuous-time system or have moduli less than 1-β for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

For a continuous-time system sys with E singular, a reduced order realization is determined first, without uncontrollable and unobservable nonzero finite and infinite eigenvalues of the corresponding pole pencil. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The keyword argument atolinf is the absolute tolerance for the gain of G(λ) at λ = ∞. The used default value is atolinf = 0. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.glinfnormFunction
glinfnorm(sys, hinfnorm = false, rtolinf = 0.001, fast = true, offset = sqrt(ϵ), atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (linfnorm, fpeak)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) the L∞ norm linfnorm (i.e., the peak gain of G(λ)) and the corresponding peak frequency fpeak, where the peak gain is achieved. The L∞ norm is infinite if the pole pencil A-λE has zeros (i.e., poles) on the stability domain boundary, i.e., on the extended imaginary axis, in the continuous-time case, or on the unit circle, in the discrete-time case. To check the lack of poles on the stability domain boundary, the eigenvalues of the pencil A-λE must not have real parts in the interval [-β,β] for a continuous-time system or must not have moduli within the interval [1-β,1+β] for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword argument rtolinf specifies the relative accuracy for the computed infinity norm. The default value used for rtolinf is 0.001.

If hinfnorm = true, the H∞ norm is computed. In this case, the stability of the zeros of A-λE is additionally checked and the H∞ norm is infinite for an unstable system. To check the stability, the eigenvalues of the pencil A-λE must have real parts less than for a continuous-time system or have moduli less than 1-β for a discrete-time system.

For a continuous-time system sys with E singular, a reduced order realization is determined first, without uncontrollable and unobservable nonzero finite and infinite eigenvalues of the corresponding pole pencil. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.ghinfnormFunction
ghinfnorm(sys, rtolinf = 0.001, fast = true, offset = sqrt(ϵ), atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (hinfnorm, fpeak)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) the H∞ norm hinfnorm (i.e., the peak gain of G(λ)) and the corresponding peak frequency fpeak, where the peak gain is achieved. The H∞ norm is infinite if the pole pencil A-λE has unstable zeros (i.e., sys has unstable poles). To check the stability, the eigenvalues of the pencil A-λE must have real parts less than for a continuous-time system or have moduli less than 1-β for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword argument rtolinf specifies the relative accuracy for the computed infinity norm. The default value used for rtolinf is 0.001.

For a continuous-time system sys with E singular, a reduced order realization is determined first, without uncontrollable and unobservable nonzero finite and infinite eigenvalues of the corresponding pole pencil. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gnugapFunction
gnugap(sys1, sys2; freq = ω, rtolinf = 0.00001, fast = true, offset = sqrt(ϵ), 
+       atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (nugapdist, fpeak)

Compute the ν-gap distance nugapdist between two descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) and the corresponding frequency fpeak (in rad/TimeUnit), where the ν-gap distance achieves its peak value.

If freq = missing, the resulting nugapdist satisfies 0 <= nugapdist <= 1. The value nugapdist = 1 results, if the winding number is different of zero in which case fpeak = [].

If freq = ω, where ω is a given vector of real frequency values, the resulting nugapdist is a vector of pointwise ν-gap distances of the dimension of ω, whose components satisfies 0 <= maximum(nugapdist) <= 1. In this case, fpeak is the frequency for which the pointwise distance achieves its peak value. All components of nugapdist are set to 1 if the winding number is different of zero in which case fpeak = [].

The stability boundary offset, β, to be used to assess the finite zeros which belong to the boundary of the stability domain can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, these are the finite zeros having real parts within the interval [-β,β], while for a discrete-time system, these are the finite zeros having moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

Pencil reduction algorithms are employed to compute range and coimage spaces which perform rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A1, A2, B1, B2, C1, C2, D1 and D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of all above matrices. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the maximum of the orders of the systems sys1 and sys2. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

The keyword argument rtolinf specifies the relative accuracy to be used to compute the ν-gap as the infinity norm of the relevant system according to [1]. The default value used for rtolinf is 0.00001.

Method: The evaluation of ν-gap uses the definition proposed in [1], extended to generalized LTI (descriptor) systems. The computation of winding number is based on enhancements covering zeros on the boundary of the stability domain and infinite zeros.

References:

[1] G. Vinnicombe. Uncertainty and feedback: H∞ loop-shaping and the ν-gap metric. Imperial College Press, London, 2001.

source
DescriptorSystems.freqrespFunction
 H = freqresp(sys, ω)

Compute the frequency response H of the descriptor system sys = (A-λE,B,C,D) at the real frequencies ω.

For a system with p outputs and m inputs, and for N frequency values in ω, H is a p × m × N array, where H[:,:,i] contains the i-th value of the frequency response computed as C*((w[i]*E - A)^-1)*B + D, where w[i] = im*ω[i] for a continuous-time system and w[i] = exp(im*ω[i]*|Ts|) for a discrete-time system with sampling time Ts.

Method: For an efficient evaluation of C*((w[i]*E - A)^-1)*B + D for many values of w[i], a preliminary orthogonal coordinate transformation is performed such that for the input-output equivalent transformed system sys = (At-λEt,Bt,Ct,Dt), the matrix w[i]*Et - At is upper Hessenberg. This allows an efficient computation of the frequency response using the Hessenberg-form based approach proposed in [1].

Reference:

[1] Laub, A.J., "Efficient Multivariable Frequency Response Computations", IEEE Transactions on Automatic Control, AC-26 (1981), pp. 407-408.

source
DescriptorSystems.timerespFunction
timeresp(sys, u, t, x0 = 0; interpolation = "zoh", state_history = false, 
+         fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (y, tout, x)

Compute the time response of a proper descriptor system sys = (A-λE,B,C,D) to the input signals described by u and t. The time vector t consists of regularly spaced time samples. The matrix u has as many columns as the inputs of sys and its i-th row specifies the input values at time t[i]. For discrete-time models, u should be sampled at the same rate as sys if sys.Ts > 0 and t must have all time steps equal to sys.Ts or can be set to an empty vector. The vector x0 specifies the initial state vector at time t[1] and is set to zero when omitted.

The matrix y contains the resulting time history of the outputs of sys and the vector tout contains the corresponding values of the time samples. The i-th row of y contains the output values at time tout[i]. If the keyword parameter value state_history = false is used, then the matrix x contains the resulting time history of the state vector and its i-th row contains the state values at time tout[i]. By default, the state history is not computed and x = nothing.

For continuous-time models, the input values are interpolated between samples. By default, zero-order hold based interpolation is used. The linear interpolation method can be selected using the keyword parameter interpolation = "foh".

By default, the uncontrollable infinite eigenvalues and simple infinite eigenvalues of the pair (A,E) are eliminated. The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true (default), or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.steprespFunction
stepresp(sys[, tfinal]; x0 = zeros(sys.nx), ustep = ones(sys.nu), timesteps = 100, 
+         state_history = false, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (y, tout, x)

Compute the step response of a proper descriptor system sys = (A-λE,B,C,D) to step input signals. The final time tfinal, if not specified, is set to 10 for a continuous-time system or to abs(sys.Ts)*timesteps for a discrete-time system, where the keyword argument timesteps specifies the number of desired simulation time steps (default: timesteps = 100). The keyword argument ustep is a vector with as many components as the inputs of sys and specifies the desired amplitudes of step inputs (default: all components are set to 1). The keyword argument x0 is a vector which specifies the initial state vector at time 0 and is set to zero when omitted.

If ns is the total number of simulation values, n the number of state components, p the number of system outputs and m the number of system inputs, then the resulting ns×p×m array y contains the resulting time histories of the outputs of sys, such that y[:,:,j] is the time response for the j-th input set to ustep[j] and the rest of inputs set to zero. The vector tout contains the corresponding values of the time samples. The i-th row y[i,:,j] contains the output values at time tout[i] of the j-th step response. If the keyword parameter value state_history = true is used, then the resulting ns×n×m arrayx contains the resulting time histories of the state vector and the i-th row x[i,:,j] contains the state values at time tout[i] of the j-th step response. By default, the state history is not computed and x = nothing.

By default, the uncontrollable infinite eigenvalues and simple infinite eigenvalues of the pair (A,E) are eliminated. The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true (default), or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gbalqualFunction
qs = gbalqual(sys; SysMat = false)

Compute the 1-norm based scaling quality of the matrices of the descriptor system sys = (A-λE,B,C).

If SysMat = false, the resulting qs is computed as

    qs = max(qS(A),qS(E),qS(B),qS(C)) ,

where qS(⋅) is the scaling quality measure defined in Definition 5.5 of [1] for nonnegative matrices, extended to also cover matrices with zero rows or columns.

If SysMat = true, the resulting qs is computed as

    qs = qS(S) ,

where S is the system matrix defined as

         S =  ( abs(A)+abs(E)  abs(B) )
+              (    abs(C)        0    )

A large value of qs indicates a possibly poorly scaled state-space model. For a standard system with E = I, the above formulas are used assuming E = 0.

[1] F.M.Dopico, M.C.Quintana and P. van Dooren, "Diagonal scalings for the eigenstructure of arbitrary pencils", SIMAX, 43:1213-1237, 2022.

source
diff --git a/dev/connections.html b/dev/connections.html index 5549d04..7fd2e5e 100644 --- a/dev/connections.html +++ b/dev/connections.html @@ -1,8 +1,8 @@ -Interconnecting descriptor system models · DescriptorSystems.jl

Interconnecting descriptor system models

  • append Building aggregate models by appending the inputs and outputs.
  • parallel Connecting models in parallel (also overloaded with +).
  • series Connecting models in series (also overloaded with *).
  • feedback Applying a static output feedback.
  • horzcat Horizontal concatenation of descriptor system models (also overloaded with [ * * ]).
  • vertcat Vertical concatenation of descriptor system models (also overloaded with [ *; * ]).
DescriptorSystems.appendFunction
sys = append(systems...)

Append the descriptor systems systems by concatenating the input and output vectors of individual systems. This corresponds to the block diagonal concatenation of their transfer function matrices. Appending systems with constant matrices, vectors or scalars or with UniformScalings is also supported.

source
DescriptorSystems.parallelFunction
sys = parallel(sys1, sys2) 
-sys = sys1 + sys2

Connect the descriptor systems sys1 and sys2 in parallel such that sys = sys1 + sys2. This coupling corresponds to the addition of their transfer function matrices. Parallel coupling of systems with constant matrices or vectors having the same row and column dimensions or with UniformScalings is also supported. Parallel coupling with a constant is equivalent to elementwise parallel coupling of the transfer function matrix with the constant.

source
DescriptorSystems.seriesFunction
 sys = series(sys1, sys2) 
- sys = sys2*sys1

Connect the descriptor systems sys1 and sys2 in series such that sys = sys2*sys1. This coupling corresponds to the multiplication of their transfer function matrices. Series coupling of systems with constant matrices and vectors having suitable dimensions or with UniformScalings is also supported. Series coupling with a constant is equivalent to elementwise multiplication of the transfer function matrix with the constant.

source
DescriptorSystems.feedbackFunction
 syscl = feedback(sys, K, inp1, out1; negative = true)

Build for a given descriptor system sys with input vector u and output vector y and a static output feedback gain K the closed-loop descriptor system syscl is constructed corresponding to the static output feedback u[inp] = -K*y[out] + v, where inp and out are are indices, vectors of indices, index ranges, : or any combinations of them. Only distinct indices can be specified. If negative = false, a positive feedback u[inp] = K*y[out] + v is used.

source
DescriptorSystems.horzcatFunction
sys = horzcat(sys1,sys2)
+Interconnecting descriptor system models · DescriptorSystems.jl

Interconnecting descriptor system models

  • append Building aggregate models by appending the inputs and outputs.
  • parallel Connecting models in parallel (also overloaded with +).
  • series Connecting models in series (also overloaded with *).
  • feedback Applying a static output feedback.
  • horzcat Horizontal concatenation of descriptor system models (also overloaded with [ * * ]).
  • vertcat Vertical concatenation of descriptor system models (also overloaded with [ *; * ]).
DescriptorSystems.appendFunction
sys = append(systems...)

Append the descriptor systems systems by concatenating the input and output vectors of individual systems. This corresponds to the block diagonal concatenation of their transfer function matrices. Appending systems with constant matrices, vectors or scalars or with UniformScalings is also supported.

source
DescriptorSystems.parallelFunction
sys = parallel(sys1, sys2) 
+sys = sys1 + sys2

Connect the descriptor systems sys1 and sys2 in parallel such that sys = sys1 + sys2. This coupling corresponds to the addition of their transfer function matrices. Parallel coupling of systems with constant matrices or vectors having the same row and column dimensions or with UniformScalings is also supported. Parallel coupling with a constant is equivalent to elementwise parallel coupling of the transfer function matrix with the constant.

source
DescriptorSystems.seriesFunction
 sys = series(sys1, sys2) 
+ sys = sys2*sys1

Connect the descriptor systems sys1 and sys2 in series such that sys = sys2*sys1. This coupling corresponds to the multiplication of their transfer function matrices. Series coupling of systems with constant matrices and vectors having suitable dimensions or with UniformScalings is also supported. Series coupling with a constant is equivalent to elementwise multiplication of the transfer function matrix with the constant.

source
DescriptorSystems.feedbackFunction
 syscl = feedback(sys, K, inp1, out1; negative = true)

Build for a given descriptor system sys with input vector u and output vector y and a static output feedback gain K the closed-loop descriptor system syscl is constructed corresponding to the static output feedback u[inp] = -K*y[out] + v, where inp and out are are indices, vectors of indices, index ranges, : or any combinations of them. Only distinct indices can be specified. If negative = false, a positive feedback u[inp] = K*y[out] + v is used.

source
DescriptorSystems.horzcatFunction
sys = horzcat(sys1,sys2)
 sys = [sys1 sys2]
-sys = horzcat(systems...)

Concatenate horizontally two systems sys1 and sys2 or several descriptor systems systems... by concatenating the input vectors of individual systems. This corresponds to the horizontal concatenation of their transfer function matrices. Concatenation of systems with constant matrices, vectors, or scalars having the same row dimensions or with UniformScalings is also supported.

source
DescriptorSystems.vertcatFunction
sys = vertcat(sys1,sys2)
+sys = horzcat(systems...)

Concatenate horizontally two systems sys1 and sys2 or several descriptor systems systems... by concatenating the input vectors of individual systems. This corresponds to the horizontal concatenation of their transfer function matrices. Concatenation of systems with constant matrices, vectors, or scalars having the same row dimensions or with UniformScalings is also supported.

source
DescriptorSystems.vertcatFunction
sys = vertcat(sys1,sys2)
 sys = [sys1; sys2]
-sys = vertcat(systems...)

Concatenate vertically two descriptor systems sys1 and sys2 or several descriptor systems systems... by concatenating the output vectors of individual systems. This corresponds to the vertical concatenation of their transfer function matrices. Concatenation of systems with constant matrices, vectors, or scalars having the same column dimensions or with UniformScalings is also supported.

source
+sys = vertcat(systems...)

Concatenate vertically two descriptor systems sys1 and sys2 or several descriptor systems systems... by concatenating the output vectors of individual systems. This corresponds to the vertical concatenation of their transfer function matrices. Concatenation of systems with constant matrices, vectors, or scalars having the same column dimensions or with UniformScalings is also supported.

source
diff --git a/dev/conversions.html b/dev/conversions.html index 02601a6..ffbe44f 100644 --- a/dev/conversions.html +++ b/dev/conversions.html @@ -3,7 +3,7 @@ ( abs(C) 0 )

by row and column balancing using diagonal matrices D1 and D2 to make the rows and columns of

              diag(D1,I)  * S * diag(D2,I)

as close in norm as possible.

The balancing can be performed optionally on the following particular matrices:

    S = abs(A)+abs(E),             if withB = false and withC = false ,
     S = ( abs(A)+abs(E)  abs(B) ), if withC = false,    
     S = ( abs(A)+abs(E) ),         if withB = false .
-        (   abs(C)     )

The diagonal elements of the resulting D1 and D2 are the nearest integer powers of 2 resulting from the optimal diagonal scaling determined from a modified version of the algorithm of [1]. For a standard system with E = I, D1 = inv(D2) and D2 is computed using an extension of the scaling approach implemented in the LAPACK family *GEBAL.f.

This function is merely an interface to the functions lsbalance! of the MatrixPencils package.

[1] F.M.Dopico, M.C.Quintana and P. van Dooren, "Diagonal scalings for the eigenstructure of arbitrary pencils", SIMAX, 43:1213-1237, 2022.

source
DescriptorSystems.c2dFunction
c2d(sysc, Ts, meth = "zoh"; x0, u0, standard = true, fast = true, prewarp_freq = freq, 
+        (   abs(C)     )

The diagonal elements of the resulting D1 and D2 are the nearest integer powers of 2 resulting from the optimal diagonal scaling determined from a modified version of the algorithm of [1]. For a standard system with E = I, D1 = inv(D2) and D2 is computed using an extension of the scaling approach implemented in the LAPACK family *GEBAL.f.

This function is merely an interface to the functions lsbalance! of the MatrixPencils package.

[1] F.M.Dopico, M.C.Quintana and P. van Dooren, "Diagonal scalings for the eigenstructure of arbitrary pencils", SIMAX, 43:1213-1237, 2022.

source
DescriptorSystems.c2dFunction
c2d(sysc, Ts, meth = "zoh"; x0, u0, standard = true, fast = true, prewarp_freq = freq, 
            state_mapping = false, simple_infeigs = true, 
            atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysd, xd0, Mx, Mu)

Compute for the continuous-time descriptor system sysc = (A-sE,B,C,D) with the proper transfer function matrix Gc(λ) and for a sampling time Ts, the corresponding discretized descriptor system sysd = (Ad-zEd,Bd,Cd,Dd) with the transfer function matrix Gd(z) according to the selected discretization method specified by meth. The keyword argument standard specifies the option to compute a standard state-space realization of sysd (i.e., with Ed = I), if standard = true (default), or a descriptor system realization if standard = false. The keyword argument simple_infeigs = true indicates that only simple infinite eigenvalues of the pair (A,E) are to be expected (default). The setting simple_infeigs = false indicates that possible uncontrollable or unobservable higher order infinite generalized eigenvalues of the pair (A,E) are present and have to be removed. xd0 is the mapped initial condition of the state of the discrete-time system sysd determined from the initial conditions of the state x0 and input u0 of the continuous-time system sysc. The keyword argument state_mapping = true specifies the option to compute the state mapping matrices Mx and Mu such that the values xc(t) and xd(t) of the system state vectors of the continuous-time system sysc and of the discrete-time system sysd, respectively, and of the input vector u(t) are related as xc(t) = Mx*xd(t)+Mu*u(t). If state_mapping = false (the default option), then Mx = nothing and Mu = nothing.

The following discretization methods can be performed by appropriately selecting meth:

"zoh"     - zero-order hold on the inputs (default); 
 
@@ -13,7 +13,7 @@
 
 "Tustin"  - Tustin transformation (also known as trapezoidal integration): a nonzero prewarping frequency
             `freq` can be specified using the keyword parameter `prewarp_freq = freq` to ensure 
-            `Gd(exp(im*freq*Ts)) = Gc(im*freq)`.

The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true (default), or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
rd = c2d(rc, Ts, meth = "zoh"; prewarp_freq = freq, atol = 0, rtol = n*ϵ)

Compute for the continuous-time rational transfer function rc and for a sampling time Ts, the corresponding discretized rational transfer function rd according to the selected discretization method specified by meth.

The following discretization methods can be performed by appropriately selecting meth:

"zoh"     - zero-order hold on the inputs (default); 
+            `Gd(exp(im*freq*Ts)) = Gc(im*freq)`.

The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true (default), or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
rd = c2d(rc, Ts, meth = "zoh"; prewarp_freq = freq, atol = 0, rtol = n*ϵ)

Compute for the continuous-time rational transfer function rc and for a sampling time Ts, the corresponding discretized rational transfer function rd according to the selected discretization method specified by meth.

The following discretization methods can be performed by appropriately selecting meth:

"zoh"     - zero-order hold on the inputs (default); 
 
 "foh"     - linear interpolation of inputs (also known as first-order hold);
 
@@ -23,7 +23,7 @@
 
 "Tustin"  - Tustin transformation (also known as trapezoidal integration): a nonzero prewarping frequency
             `freq` can be specified using the keyword parameter `prewarp_freq = freq` to ensure 
-            `rd(exp(im*freq*Ts)) = rc(im*freq)`.

The keyword arguments atol and rtol specify, respectively, the absolute and relative tolerances, respectively, for the nonzero coefficients of the numerator and denominator polynomials of rc. The default relative tolerance is n*ϵ, where n is the order of rc (i.e., the maximum degree of the numerator and denominator polynomials) and ϵ is the working machine epsilon.

References:

[1] G.F. Franklin, D.J. Powell and M.L. Workman, Digital Control of Dynamic Systems (3rd Edition), Prentice Hall, 1997.

source
Rd = c2d(Rc, Ts, meth = "zoh"; prewarp_freq = freq, atol = 0, rtol = n*ϵ)

Compute for the continuous-time rational transfer function matrix Rc and for a sampling time Ts, the corresponding discretized rational transfer function matrix Rd according to the selected discretization method specified by meth.

The following discretization methods can be performed by appropriately selecting meth:

  "zoh"     - zero-order hold on the inputs (default); 
+            `rd(exp(im*freq*Ts)) = rc(im*freq)`.

The keyword arguments atol and rtol specify, respectively, the absolute and relative tolerances, respectively, for the nonzero coefficients of the numerator and denominator polynomials of rc. The default relative tolerance is n*ϵ, where n is the order of rc (i.e., the maximum degree of the numerator and denominator polynomials) and ϵ is the working machine epsilon.

References:

[1] G.F. Franklin, D.J. Powell and M.L. Workman, Digital Control of Dynamic Systems (3rd Edition), Prentice Hall, 1997.

source
Rd = c2d(Rc, Ts, meth = "zoh"; prewarp_freq = freq, atol = 0, rtol = n*ϵ)

Compute for the continuous-time rational transfer function matrix Rc and for a sampling time Ts, the corresponding discretized rational transfer function matrix Rd according to the selected discretization method specified by meth.

The following discretization methods can be performed by appropriately selecting meth:

  "zoh"     - zero-order hold on the inputs (default); 
 
   "foh"     - linear interpolation of inputs (also known as first-order hold);
 
@@ -33,4 +33,4 @@
   
   "Tustin"  - Tustin transformation (also known as trapezoidal integration): a nonzero prewarping frequency
               `freq` can be specified using the keyword parameter `prewarp_freq = freq` to ensure 
-              `Rd(exp(im*freq*Ts)) = Rc(im*freq)`.

The keyword arguments atol and rtol specify, respectively, the absolute and relative tolerances, respectively, for the nonzero coefficients of the numerator and denominator polynomials of the elements of Rc. The default relative tolerance is 10*ϵ, where ϵ is the working machine epsilon.

References:

[1] G.F. Franklin, D.J. Powell and M.L. Workman, Digital Control of Dynamic Systems (3rd Edition), Prentice Hall, 1997.

source
DescriptorSystems.dss2rmFunction
R = dss2rm(sys; fast = true, atol = 0, atol1 = atol, atol2 = atol, gaintol = atol, rtol = min(atol1,atol2) > 0 ? 0 : n*ϵ, val)

Build for the descriptor system sys = (A-λE,B,C,D) the rational matrix R(λ) = C*inv(λE-A)*B+D representing the transfer function matrix of the system sys.

The keyword arguments atol1 and atol2 specify the absolute tolerances for the elements of A, B, C, D, and, respectively, of E, and rtol specifies the relative tolerances for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the maximal dimension of state, input and output vectors, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol and gaintol = atol.

The keyword argument gaintol specifies the threshold for the magnitude of the nonzero elements of the gain matrix C*inv(γE-A)*B+D, where γ = val if val is a number or γ is a randomly chosen complex value of unit magnitude, if val = missing. Generally, val should not be a zero of any of entries of R.

Method: Each rational entry of R(λ) is constructed from its numerator and denominator polynomials corresponding to its finite zeros, finite poles and gain using the method of [1].

References:

[1] A. Varga Computation of transfer function matrices of generalized state-space models. Int. J. Control, 50:2543–2561, 1989.

source
DescriptorSystems.dss2pmFunction
P = dss2pm(sys; fast = true, atol = 0, atol1 = atol, atol2 = atol, gaintol = 0, rtol = min(atol1,atol2) > 0 ? 0 : n*ϵ, val)

Build for the descriptor system sys = (A-λE,B,C,D) the polynomial matrix P(λ) = C*inv(λE-A)*B+D representing the transfer function matrix of the system sys.

The keyword arguments atol1 and atol2 specify the absolute tolerances for the elements of A, B, C, D, and, respectively, of E, and rtol specifies the relative tolerances for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the maximal dimension of state, input and output vectors, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol and gaintol = atol.

The keyword argument gaintol specifies the threshold for the magnitude of the nonzero elements of the gain matrix C*inv(γE-A)*B+D, where γ = val if val is a number or γ is a randomly chosen complex value of unit magnitude, if val = missing. Generally, val should not be a zero of any of entries of P.

Method: Each entry of P(λ) is constructed from the polynomial corresponding to its finite zeros and gain using the method of [1].

References:

[1] A. Varga Computation of transfer function matrices of generalized state-space models. Int. J. Control, 50:2543–2561, 1989.

source
DescriptorSystems.gbilinFunction
gbilin(sys, g; compact = true, minimal = false, standard = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (syst, ginv)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) and a first degree real rational transfer function g = g(δ), the descriptor system realization syst = (At-δEt,Bt,Ct,Dt) of G(g(δ)) corresponding to the bilinear transformation λ = g(δ) = (aδ+b)/(cδ+d). For a continuous-time transfer function g(δ), δ = s, the complex variable in the Laplace transform, while for a discrete-time transfer function, δ = z, the complex variable in the Z-transform. syst inherits the sampling-time of sys1. sysi1 is the transfer function ginv(λ) = (d*λ-b)/(-c*λ+a) representing the inverse of the bilinear transformation g(δ) (i.e., g(ginv(λ)) = 1).

The keyword argument compact can be used to specify the option to compute a compact descriptor realization without non-dynamic modes, if compact = true (the default option) or to disable the ellimination of non-dynamic modes if compact = false.

The keyword argument minimal specifies the option to compute minimal descriptor realization, if minimal = true, or a nonminimal realization if minimal = false (the default option).

The keyword argument standard specifies the option to compute a standard state-space (if possible) realizations of syst, if standard = true (default), or a descriptor system realization if standard = false.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
+ `Rd(exp(im*freq*Ts)) = Rc(im*freq)`.

The keyword arguments atol and rtol specify, respectively, the absolute and relative tolerances, respectively, for the nonzero coefficients of the numerator and denominator polynomials of the elements of Rc. The default relative tolerance is 10*ϵ, where ϵ is the working machine epsilon.

References:

[1] G.F. Franklin, D.J. Powell and M.L. Workman, Digital Control of Dynamic Systems (3rd Edition), Prentice Hall, 1997.

source
DescriptorSystems.dss2rmFunction
R = dss2rm(sys; fast = true, atol = 0, atol1 = atol, atol2 = atol, gaintol = atol, rtol = min(atol1,atol2) > 0 ? 0 : n*ϵ, val)

Build for the descriptor system sys = (A-λE,B,C,D) the rational matrix R(λ) = C*inv(λE-A)*B+D representing the transfer function matrix of the system sys.

The keyword arguments atol1 and atol2 specify the absolute tolerances for the elements of A, B, C, D, and, respectively, of E, and rtol specifies the relative tolerances for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the maximal dimension of state, input and output vectors, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol and gaintol = atol.

The keyword argument gaintol specifies the threshold for the magnitude of the nonzero elements of the gain matrix C*inv(γE-A)*B+D, where γ = val if val is a number or γ is a randomly chosen complex value of unit magnitude, if val = missing. Generally, val should not be a zero of any of entries of R.

Method: Each rational entry of R(λ) is constructed from its numerator and denominator polynomials corresponding to its finite zeros, finite poles and gain using the method of [1].

References:

[1] A. Varga Computation of transfer function matrices of generalized state-space models. Int. J. Control, 50:2543–2561, 1989.

source
DescriptorSystems.dss2pmFunction
P = dss2pm(sys; fast = true, atol = 0, atol1 = atol, atol2 = atol, gaintol = 0, rtol = min(atol1,atol2) > 0 ? 0 : n*ϵ, val)

Build for the descriptor system sys = (A-λE,B,C,D) the polynomial matrix P(λ) = C*inv(λE-A)*B+D representing the transfer function matrix of the system sys.

The keyword arguments atol1 and atol2 specify the absolute tolerances for the elements of A, B, C, D, and, respectively, of E, and rtol specifies the relative tolerances for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the maximal dimension of state, input and output vectors, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol and gaintol = atol.

The keyword argument gaintol specifies the threshold for the magnitude of the nonzero elements of the gain matrix C*inv(γE-A)*B+D, where γ = val if val is a number or γ is a randomly chosen complex value of unit magnitude, if val = missing. Generally, val should not be a zero of any of entries of P.

Method: Each entry of P(λ) is constructed from the polynomial corresponding to its finite zeros and gain using the method of [1].

References:

[1] A. Varga Computation of transfer function matrices of generalized state-space models. Int. J. Control, 50:2543–2561, 1989.

source
DescriptorSystems.gbilinFunction
gbilin(sys, g; compact = true, minimal = false, standard = true, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (syst, ginv)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) and a first degree real rational transfer function g = g(δ), the descriptor system realization syst = (At-δEt,Bt,Ct,Dt) of G(g(δ)) corresponding to the bilinear transformation λ = g(δ) = (aδ+b)/(cδ+d). For a continuous-time transfer function g(δ), δ = s, the complex variable in the Laplace transform, while for a discrete-time transfer function, δ = z, the complex variable in the Z-transform. syst inherits the sampling-time of sys1. sysi1 is the transfer function ginv(λ) = (d*λ-b)/(-c*λ+a) representing the inverse of the bilinear transformation g(δ) (i.e., g(ginv(λ)) = 1).

The keyword argument compact can be used to specify the option to compute a compact descriptor realization without non-dynamic modes, if compact = true (the default option) or to disable the ellimination of non-dynamic modes if compact = false.

The keyword argument minimal specifies the option to compute minimal descriptor realization, if minimal = true, or a nonminimal realization if minimal = false (the default option).

The keyword argument standard specifies the option to compute a standard state-space (if possible) realizations of syst, if standard = true (default), or a descriptor system realization if standard = false.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
diff --git a/dev/dss.html b/dev/dss.html index af681ff..b8c5cf7 100644 --- a/dev/dss.html +++ b/dev/dss.html @@ -1,10 +1,10 @@ Building descriptor system state-space models · DescriptorSystems.jl

Building descriptor system state-space models

  • DescriptorStateSpace Descriptor state-space object.
  • dss Construction of descriptor state-space models.
  • dssdata Extraction of matrix data from a descriptor state-space model.
DescriptorSystems.DescriptorStateSpaceType
DescriptorStateSpace{T}(A::Matrix{T}, E::Union{Matrix{T},UniformScaling}, 
                         B::Matrix{T}, C::Matrix{T}, D::Matrix{T},  
-                        Ts::Real) where T <: Number

Construct a descriptor state-space model from a quintuple of matrices (A,E,B,C,D) and a sampling time Ts.

If SYS::DescriptorStateSpace{T} is a descriptor system model object defined by the 4-tuple SYS = (A-λE,B,C,D), then:

SYS.A is the nx × nx state matrix A with elements of type T.

SYS.E is the nx × nx descriptor matrix E with elements of type T. For a standard state-space system SYS.E = I, the UniformScaling of type Bool.

SYS.B is the nx × nu system input matrix B with elements of type T.

SYS.C is the ny × nx system output matrix C with elements of type T.

SYS.D is the ny × nu system feedthrough matrix D with elements of type T.

SYS.Ts is the real sampling time Ts, where Ts = 0 for a continuous-time system, and Ts > 0 or Ts = -1 for a discrete-time system. Ts = -1 indicates a discrete-time system with an unspecified sampling time.

The dimensions nx, ny and nu can be obtained as SYS.nx, SYS.ny and SYS.nu, respectively.

source
DescriptorSystems.dssFunction
sys = dss(A, E, B, C, D; Ts = 0, check_reg = false, 
+                        Ts::Real) where T <: Number

Construct a descriptor state-space model from a quintuple of matrices (A,E,B,C,D) and a sampling time Ts.

If SYS::DescriptorStateSpace{T} is a descriptor system model object defined by the 4-tuple SYS = (A-λE,B,C,D), then:

SYS.A is the nx × nx state matrix A with elements of type T.

SYS.E is the nx × nx descriptor matrix E with elements of type T. For a standard state-space system SYS.E = I, the UniformScaling of type Bool.

SYS.B is the nx × nu system input matrix B with elements of type T.

SYS.C is the ny × nx system output matrix C with elements of type T.

SYS.D is the ny × nu system feedthrough matrix D with elements of type T.

SYS.Ts is the real sampling time Ts, where Ts = 0 for a continuous-time system, and Ts > 0 or Ts = -1 for a discrete-time system. Ts = -1 indicates a discrete-time system with an unspecified sampling time.

The dimensions nx, ny and nu can be obtained as SYS.nx, SYS.ny and SYS.nu, respectively.

source
DescriptorSystems.dssFunction
sys = dss(A, E, B, C, D; Ts = 0, check_reg = false, 
           atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ )

Create for Ts = 0 a descriptor system model sys = (A-λE,B,C,D) for a continuous-time state space system of the form

Edx(t)/dt = Ax(t) + Bu(t) ,
 y(t)      = Cx(t) + Du(t) ,

where x(t), u(t) and y(t) are the system state vector, system input vector and system output vector, respectively, for the continuous time variable t.

For a nonzero positive sampling time Ts = ΔT, the descriptor system model specifies a discrete-time state space system of the form

Ex(t+ΔT) = Ax(t) + Bu(t)
 y(t)     = Cx(t) + Du(t)

for the discrete values of the time variable t = 0, ΔT, 2ΔT, .... Use Ts = -1 if the sampling time is not specified. In this case, by convention ΔT = 1.

For a system with zero feedthrough matrix D, it is possible to set D = 0 (the scalar zero).

For a standard state space system, E is the identity matrix. In this case, it is possible to set E = I (the boolean uniform scaling). Alternatively, use

sys = dss(A, B, C, D; Ts = 0)

to create a standard system.

For a system corresponding to a static gain D, use

sys = dss(D; Ts = 0)

It is possible to specify a descriptor system via all or part of its matrices using the form

sys = dss(A = mat1, E = mat2, B = mat3, C = mat4, D = mat5; Ts = 0, check_reg = false, 
-          atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

where A, E, B, C, and D are keyword parameters set to appropriate matrix values mat1, mat2, mat3, mat4, and mat5, respectively. If some of the system matrices are omited, then zero matrices of appropriate sizes are employed instead.

It is assumed that the pencil A-λE is regular (i.e., det(A-λE) ̸≡ 0), and therefore, in the interest of efficiency, the regularity of A-λE is by default not tested. If check_reg = true, the regularity of A-λE is additionally checked. In this case, the keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
 sys = dss(A, E, B, F, C, G, D, H; compacted = false, 
+          atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

where A, E, B, C, and D are keyword parameters set to appropriate matrix values mat1, mat2, mat3, mat4, and mat5, respectively. If some of the system matrices are omited, then zero matrices of appropriate sizes are employed instead.

It is assumed that the pencil A-λE is regular (i.e., det(A-λE) ̸≡ 0), and therefore, in the interest of efficiency, the regularity of A-λE is by default not tested. If check_reg = true, the regularity of A-λE is additionally checked. In this case, the keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
 sys = dss(A, E, B, F, C, G, D, H; compacted = false, 
            atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = min(atol1,atol2,atol3)>0 ? 0 : n*ϵ)

Construct an input-output equivalent descriptor system representation sys = (Ad-λdE,Bd,Cd,Dd) to a pencil based linearization (A-λE,B-λF,C-λG,D-λH) satisfying

            -1                        -1
- Cd*(λEd-Ad)  *Bd + Dd = (C-λG)*(λE-A)  *(B-λF) + D-λH .

If compacted = true, a compacted descriptor system realization is determined by exploiting possible rank defficiencies of the matrices F, G, and H. Any of the matrices F, G, and H can be set to missing.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of F, the absolute tolerance for the nonzero elements of G, the absolute tolerance for the nonzero elements of H and the relative tolerance for the nonzero elements of F, G and H. The default relative tolerance is n*ϵ, where n is the size of of A, and ϵ is the machine epsilon of the element type of A. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol and atol3 = atol.

source
sys = dss(NUM, DEN; contr = false, obs = false, noseig = false, minimal = false, fast = true, atol = 0, rtol)

Convert the rational matrix R(λ) = NUM(λ) ./ DEN(λ) to a descriptor system representation sys = (A-λE,B,C,D) such that the transfer function matrix of sys is R(λ).

NUM(λ) is a polynomial matrix of the form NUM(λ) = N_1 + λ N_2 + ... + λ**k N_(k+1), for which the coefficient matrices N_i, i = 1, ..., k+1 are stored in the 3-dimensional matrix NUM, where NUM[:,:,i] contains the i-th coefficient matrix N_i (multiplying λ**(i-1)).

DEN(λ) is a polynomial matrix of the form DEN(λ) = D_1 + λ D_2 + ... + λ**l D_(l+1), for which the coefficient matrices D_i, i = 1, ..., l+1, are stored in the 3-dimensional matrix DEN, where DEN[:,:,i] contain the i-th coefficient matrix D_i (multiplying λ**(i-1)).

Alternatively, NUM(λ) and DEN(λ) can be specified as matrices of elements of the Polynomial type provided by the Polynomials package.

If n is the order of A-λE, then the computed linearization satisfies:

(1) A-λE is regular and R(λ) = C*inv(λE-A)*B+D;

(2) rank[B A-λE] = n (controllability) if minimal = true or contr = true;

(3) rank[A-λE; C] = n (observability) if minimal = true or obs = true;

(4) A-λE has no non-dynamic modes if minimal = true or noseig = true.

If conditions (1)-(4) are satisfied, the realization is called minimal and the resulting order n is the least achievable order. If conditions (1)-(3) are satisfied, the realization is called irreducible and the resulting order n is the least achievable order using orthogonal similarity transformations. An irreducible realization preserves the pole-zero and singular structures of R(λ).

The descriptor system based realization is built using the methods described in [1] in conjunction with pencil manipulation algorithms [2] and [3] to compute reduced order realization. These algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol and rtol, specify the absolute and relative tolerances, respectively, for the nonzero coefficients of NUM(λ) and DEN(λ).

[1] A. Varga, On computing the Kronecker structure of polynomial and rational matrices using Julia, 2020, arXiv:2006.06825.

[2] P. Van Dooreen, The generalized eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, vol. AC-26, pp. 111-129, 1981.

[3] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
sys = dss(R; Ts=missing, contr = false, obs = false, noseig = false, minimal = false, fast = true, atol = 0, rtol)

Convert the rational transfer function matrix R(λ) to a descriptor system representation sys = (A-λE,B,C,D) such that the transfer function matrix of sys is R(λ). The resulting sys is a continuous-time system if Ts = 0 or discrete-time system if Ts = -1 or Ts > 0. If Ts = missing, the sampling time of sys is inherited from the sampling time TRs of the elements of R, unless TRs = nothing, in which case Ts = 0 is used (by default).

R(λ) is a matrix with rational transfer function entries (see RationalTransferFunction ) corresponding to a multiple-input multiple-outputs system or a rational transfer function corresponding to a single-input single-output system. The numerators and denominators of the elements of R are of type Polynomial as provided by the Polynomials package.

If n is the order of A-λE, then the computed realization satisfies:

(1) A-λE is regular and R(λ) = C*inv(λE-A)*B+D;

(2) rank[B A-λE] = n (controllability) if minimal = true or contr = true;

(3) rank[A-λE; C] = n (observability) if minimal = true or contr = true;

(4) A-λE has no non-dynamic modes if minimal = true or noseig = true.

If conditions (1)-(4) are satisfied, the realization is called minimal and the resulting order n is the least achievable order. If conditions (1)-(3) are satisfied, the realization is called irreducible and the resulting order n is the least achievable order using orthogonal similarity transformations. An irreducible realization preserves the pole-zero and singular structures of R(λ).

The underlying pencil manipulation algorithms [1] and [2] to compute reduced order realizations employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol and rtol, specify the absolute and relative tolerances for the nonzero coefficients of R(λ).

[1] P. Van Dooreen, The generalized eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, vol. AC-26, pp. 111-129, 1981.

[2] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
sys = dss(P; Ts = 0, contr = false, obs = false, noseig = false, minimal = false, fast = true, atol = 0, rtol)

Convert the polynomial matrix P(λ) to a descriptor system representation sys = (A-λE,B,C,D) such that the transfer function matrix of sys is P(λ). The resulting sys is a continuous-time system if Ts = 0 or discrete-time system if Ts = -1 or Ts > 0.

P(λ) can be specified as a grade k polynomial matrix of the form P(λ) = P_1 + λ P_2 + ... + λ**k P_(k+1), for which the coefficient matrices P_i, i = 1, ..., k+1, are stored in the 3-dimensional matrix P, where P[:,:,i] contains the i-th coefficient matrix P_i (multiplying λ**(i-1)).

P(λ) can also be specified as a matrix, vector or scalar of elements of the Polynomial type provided by the Polynomials package.

If d is the degree of P(λ) and n is the order of A-λE, then the computed realization satisfies:

(1) A-λE is regular and P(λ) = C*inv(λE-A)*B+D;

(2) rank[B A-λE] = n (controllability) if minimal = true or contr = true;

(3) rank[A-λE; C] = n (observability) if minimal = true or contr = true;

(4) A-λE has no non-dynamic modes if minimal = true or noseig = true.

If conditions (1)-(4) are satisfied, the realization is called minimal and the resulting order n is the least achievable order. If conditions (1)-(3) are satisfied, the realization is called irreducible and the resulting order n is the least achievable order using orthogonal similarity transformations. An irreducible realization preserves the pole-zero and singular structures of P(λ).

The underlying pencil manipulation algorithms [1] and [2] to compute reduced order realizations employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol and rtol, specify the absolute and relative tolerances for the nonzero coefficients of P(λ), respectively.

[1] P. Van Dooreen, The generalized eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, vol. AC-26, pp. 111-129, 1981.

[2] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
sys = dss(T, U, V, W; fast = true, contr = false, obs = false, minimal = false, atol = 0, rtol)

Construct an input-output equivalent descriptor system representation sys = (A-λE,B,C,D) to a polynomial model specified by the polynomial matrices T(λ), U(λ), V(λ), and W(λ) such that

  V(λ)*inv(T(λ))*U(λ)+W(λ) = C*inv(λE-A)*B+D.

If minimal = true, the resulting realization (A-λE,B,C,D) has the least possible order n of A-λE.

T(λ), U(λ), V(λ), and W(λ) can be specified as polynomial matrices of the form X(λ) = X_1 + λ X_2 + ... + λ**k X_(k+1), for X = T, U, V, and W, for which the coefficient matrices X_i, i = 1, ..., k+1, are stored in the 3-dimensional matrices X, where X[:,:,i] contains the i-th coefficient matrix X_i (multiplying λ**(i-1)).

T(λ), U(λ), V(λ), and W(λ) can also be specified as matrices, vectors or scalars of elements of the Polynomial type provided by the Polynomials package. In this case, no check is performed that T(λ), U(λ), V(λ) and W(λ) have the same indeterminates.

The computed descriptor realization satisfies:

(1) A-λE is regular;

(2) rank[B A-λE] = n (controllability) if minimal = true or contr = true;

(3) rank[A-λE; C] = n (observability) if minimal = true or obs = true;

(4) A-λE has no simple infinite eigenvalues if minimal = true.

The keyword arguments atol and rtol, specify, respectively, the absolute and relative tolerance for the nonzero coefficients of the matrices T(λ), U(λ), V(λ) and W(λ). The default relative tolerance is nt*ϵ, where nt is the size of the square matrix T(λ) and ϵ is the machine epsilon of the element type of its coefficients.

The descriptor realization is built using the methods described in [1].

[1] A. Varga, On computing the Kronecker structure of polynomial and rational matrices using Julia, 2020, arXiv:2006.06825.

source
DescriptorSystems.dssdataFunction
A, E, B, C, D  = dssdata([T,] sys)

Extract the matrices A, E, B, C, D of a descriptor system model sys = (A-λE,B,C,D). If the type T is specified, the resulting matrices are converted to this type.

source
+ Cd*(λEd-Ad) *Bd + Dd = (C-λG)*(λE-A) *(B-λF) + D-λH .

If compacted = true, a compacted descriptor system realization is determined by exploiting possible rank defficiencies of the matrices F, G, and H. Any of the matrices F, G, and H can be set to missing.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of F, the absolute tolerance for the nonzero elements of G, the absolute tolerance for the nonzero elements of H and the relative tolerance for the nonzero elements of F, G and H. The default relative tolerance is n*ϵ, where n is the size of of A, and ϵ is the machine epsilon of the element type of A. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol and atol3 = atol.

source
sys = dss(NUM, DEN; contr = false, obs = false, noseig = false, minimal = false, fast = true, atol = 0, rtol)

Convert the rational matrix R(λ) = NUM(λ) ./ DEN(λ) to a descriptor system representation sys = (A-λE,B,C,D) such that the transfer function matrix of sys is R(λ).

NUM(λ) is a polynomial matrix of the form NUM(λ) = N_1 + λ N_2 + ... + λ**k N_(k+1), for which the coefficient matrices N_i, i = 1, ..., k+1 are stored in the 3-dimensional matrix NUM, where NUM[:,:,i] contains the i-th coefficient matrix N_i (multiplying λ**(i-1)).

DEN(λ) is a polynomial matrix of the form DEN(λ) = D_1 + λ D_2 + ... + λ**l D_(l+1), for which the coefficient matrices D_i, i = 1, ..., l+1, are stored in the 3-dimensional matrix DEN, where DEN[:,:,i] contain the i-th coefficient matrix D_i (multiplying λ**(i-1)).

Alternatively, NUM(λ) and DEN(λ) can be specified as matrices of elements of the Polynomial type provided by the Polynomials package.

If n is the order of A-λE, then the computed linearization satisfies:

(1) A-λE is regular and R(λ) = C*inv(λE-A)*B+D;

(2) rank[B A-λE] = n (controllability) if minimal = true or contr = true;

(3) rank[A-λE; C] = n (observability) if minimal = true or obs = true;

(4) A-λE has no non-dynamic modes if minimal = true or noseig = true.

If conditions (1)-(4) are satisfied, the realization is called minimal and the resulting order n is the least achievable order. If conditions (1)-(3) are satisfied, the realization is called irreducible and the resulting order n is the least achievable order using orthogonal similarity transformations. An irreducible realization preserves the pole-zero and singular structures of R(λ).

The descriptor system based realization is built using the methods described in [1] in conjunction with pencil manipulation algorithms [2] and [3] to compute reduced order realization. These algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol and rtol, specify the absolute and relative tolerances, respectively, for the nonzero coefficients of NUM(λ) and DEN(λ).

[1] A. Varga, On computing the Kronecker structure of polynomial and rational matrices using Julia, 2020, arXiv:2006.06825.

[2] P. Van Dooreen, The generalized eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, vol. AC-26, pp. 111-129, 1981.

[3] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
sys = dss(R; Ts=missing, contr = false, obs = false, noseig = false, minimal = false, fast = true, atol = 0, rtol)

Convert the rational transfer function matrix R(λ) to a descriptor system representation sys = (A-λE,B,C,D) such that the transfer function matrix of sys is R(λ). The resulting sys is a continuous-time system if Ts = 0 or discrete-time system if Ts = -1 or Ts > 0. If Ts = missing, the sampling time of sys is inherited from the sampling time TRs of the elements of R, unless TRs = nothing, in which case Ts = 0 is used (by default).

R(λ) is a matrix with rational transfer function entries (see RationalTransferFunction ) corresponding to a multiple-input multiple-outputs system or a rational transfer function corresponding to a single-input single-output system. The numerators and denominators of the elements of R are of type Polynomial as provided by the Polynomials package.

If n is the order of A-λE, then the computed realization satisfies:

(1) A-λE is regular and R(λ) = C*inv(λE-A)*B+D;

(2) rank[B A-λE] = n (controllability) if minimal = true or contr = true;

(3) rank[A-λE; C] = n (observability) if minimal = true or contr = true;

(4) A-λE has no non-dynamic modes if minimal = true or noseig = true.

If conditions (1)-(4) are satisfied, the realization is called minimal and the resulting order n is the least achievable order. If conditions (1)-(3) are satisfied, the realization is called irreducible and the resulting order n is the least achievable order using orthogonal similarity transformations. An irreducible realization preserves the pole-zero and singular structures of R(λ).

The underlying pencil manipulation algorithms [1] and [2] to compute reduced order realizations employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol and rtol, specify the absolute and relative tolerances for the nonzero coefficients of R(λ).

[1] P. Van Dooreen, The generalized eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, vol. AC-26, pp. 111-129, 1981.

[2] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
sys = dss(P; Ts = 0, contr = false, obs = false, noseig = false, minimal = false, fast = true, atol = 0, rtol)

Convert the polynomial matrix P(λ) to a descriptor system representation sys = (A-λE,B,C,D) such that the transfer function matrix of sys is P(λ). The resulting sys is a continuous-time system if Ts = 0 or discrete-time system if Ts = -1 or Ts > 0.

P(λ) can be specified as a grade k polynomial matrix of the form P(λ) = P_1 + λ P_2 + ... + λ**k P_(k+1), for which the coefficient matrices P_i, i = 1, ..., k+1, are stored in the 3-dimensional matrix P, where P[:,:,i] contains the i-th coefficient matrix P_i (multiplying λ**(i-1)).

P(λ) can also be specified as a matrix, vector or scalar of elements of the Polynomial type provided by the Polynomials package.

If d is the degree of P(λ) and n is the order of A-λE, then the computed realization satisfies:

(1) A-λE is regular and P(λ) = C*inv(λE-A)*B+D;

(2) rank[B A-λE] = n (controllability) if minimal = true or contr = true;

(3) rank[A-λE; C] = n (observability) if minimal = true or contr = true;

(4) A-λE has no non-dynamic modes if minimal = true or noseig = true.

If conditions (1)-(4) are satisfied, the realization is called minimal and the resulting order n is the least achievable order. If conditions (1)-(3) are satisfied, the realization is called irreducible and the resulting order n is the least achievable order using orthogonal similarity transformations. An irreducible realization preserves the pole-zero and singular structures of P(λ).

The underlying pencil manipulation algorithms [1] and [2] to compute reduced order realizations employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol and rtol, specify the absolute and relative tolerances for the nonzero coefficients of P(λ), respectively.

[1] P. Van Dooreen, The generalized eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, vol. AC-26, pp. 111-129, 1981.

[2] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
sys = dss(T, U, V, W; fast = true, contr = false, obs = false, minimal = false, atol = 0, rtol)

Construct an input-output equivalent descriptor system representation sys = (A-λE,B,C,D) to a polynomial model specified by the polynomial matrices T(λ), U(λ), V(λ), and W(λ) such that

  V(λ)*inv(T(λ))*U(λ)+W(λ) = C*inv(λE-A)*B+D.

If minimal = true, the resulting realization (A-λE,B,C,D) has the least possible order n of A-λE.

T(λ), U(λ), V(λ), and W(λ) can be specified as polynomial matrices of the form X(λ) = X_1 + λ X_2 + ... + λ**k X_(k+1), for X = T, U, V, and W, for which the coefficient matrices X_i, i = 1, ..., k+1, are stored in the 3-dimensional matrices X, where X[:,:,i] contains the i-th coefficient matrix X_i (multiplying λ**(i-1)).

T(λ), U(λ), V(λ), and W(λ) can also be specified as matrices, vectors or scalars of elements of the Polynomial type provided by the Polynomials package. In this case, no check is performed that T(λ), U(λ), V(λ) and W(λ) have the same indeterminates.

The computed descriptor realization satisfies:

(1) A-λE is regular;

(2) rank[B A-λE] = n (controllability) if minimal = true or contr = true;

(3) rank[A-λE; C] = n (observability) if minimal = true or obs = true;

(4) A-λE has no simple infinite eigenvalues if minimal = true.

The keyword arguments atol and rtol, specify, respectively, the absolute and relative tolerance for the nonzero coefficients of the matrices T(λ), U(λ), V(λ) and W(λ). The default relative tolerance is nt*ϵ, where nt is the size of the square matrix T(λ) and ϵ is the machine epsilon of the element type of its coefficients.

The descriptor realization is built using the methods described in [1].

[1] A. Varga, On computing the Kronecker structure of polynomial and rational matrices using Julia, 2020, arXiv:2006.06825.

source
DescriptorSystems.dssdataFunction
A, E, B, C, D  = dssdata([T,] sys)

Extract the matrices A, E, B, C, D of a descriptor system model sys = (A-λE,B,C,D). If the type T is specified, the resulting matrices are converted to this type.

source
diff --git a/dev/dstools.html b/dev/dstools.html index d60af6d..7272f61 100644 --- a/dev/dstools.html +++ b/dev/dstools.html @@ -1,12 +1,12 @@ -System utilities · DescriptorSystems.jl

System utilities

  • order Order of a system.
  • size Number of outputs and inputs of a descriptor system .
  • iszero Checking whether the transfer function matrix of a descriptor system is zero.
  • evalfr Gain of the transfer function matrix at a single frequency value.
  • dcgain DC gain of a system.
  • opnorm L2- and L∞-norms of a descriptor system.
  • rss Generation of randomized standard state-space systems.
  • rdss Generation of randomized descriptor state-space systems.
  • dsxvarsel Building a descriptor systems by selecting a set of state variables.
  • dssubset Assigning a subsystem to a given descriptor system.
  • dszeros Setting a subsystem to zero.
  • dssubsel Selecting a subsystem according to a given zero-nonzero pattern.
  • dsdiag Building a k-times diagonal concatenation of a descriptor system.
DescriptorSystems.orderFunction
n = order(r)

Determine the order n of a rational transfer function r as the maximum of degrees of its numerator and denominator polynomials (n is also known as the McMillan degree of r).

source
nx = order(sys)

Return the order nx of the descriptor system sys as the dimension of the state variable vector. For improper or non-minimal systems, nx is less than the McMillan degree of the system.

source
Base.sizeFunction
size(sys) -> (p,m)
+System utilities · DescriptorSystems.jl

System utilities

  • order Order of a system.
  • size Number of outputs and inputs of a descriptor system .
  • iszero Checking whether the transfer function matrix of a descriptor system is zero.
  • evalfr Gain of the transfer function matrix at a single frequency value.
  • dcgain DC gain of a system.
  • opnorm L2- and L∞-norms of a descriptor system.
  • rss Generation of randomized standard state-space systems.
  • rdss Generation of randomized descriptor state-space systems.
  • dsxvarsel Building a descriptor systems by selecting a set of state variables.
  • dssubset Assigning a subsystem to a given descriptor system.
  • dszeros Setting a subsystem to zero.
  • dssubsel Selecting a subsystem according to a given zero-nonzero pattern.
  • dsdiag Building a k-times diagonal concatenation of a descriptor system.
DescriptorSystems.orderFunction
n = order(r)

Determine the order n of a rational transfer function r as the maximum of degrees of its numerator and denominator polynomials (n is also known as the McMillan degree of r).

source
nx = order(sys)

Return the order nx of the descriptor system sys as the dimension of the state variable vector. For improper or non-minimal systems, nx is less than the McMillan degree of the system.

source
Base.sizeFunction
size(sys) -> (p,m)
 size(sys,1) -> p
-size(sys,2) -> m

Return the number of outputs p and the number of inputs m of a descriptor system sys.

source
Base.iszeroFunction
 iszero(sys; atol = 0, atol1 = atol, atol2 = atol, rtol, fastrank = true)

Return true if the transfer function matrix of the descriptor system sys is zero. For a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) it is checked that the normal rank of G(λ) is zero, or equivalently (see [1]), that the normal rank of the system matrix pencil

          | A-λE | B | 
+size(sys,2) -> m

Return the number of outputs p and the number of inputs m of a descriptor system sys.

source
Base.iszeroFunction
 iszero(sys; atol = 0, atol1 = atol, atol2 = atol, rtol, fastrank = true)

Return true if the transfer function matrix of the descriptor system sys is zero. For a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) it is checked that the normal rank of G(λ) is zero, or equivalently (see [1]), that the normal rank of the system matrix pencil

          | A-λE | B | 
   S(λ) := |------|---|
-          |  C   | D |

is equal to n, the order of the system sys.

If fastrank = true, the normal rank of S(λ) is evaluated by counting how many singular values of S(γ) have magnitudes greater than max(max(atol1,atol2), rtol*σ₁), where σ₁ is the largest singular value of S(γ) and γ is a randomly generated value. If fastrank = false, the rank is evaluated as nr + ni + nf + nl, where nr and nl are the sums of right and left Kronecker indices, respectively, while ni and nf are the number of infinite and finite eigenvalues, respectively. The sums nr+ni and nf+nl, are determined from an appropriate Kronecker-like form of the pencil S(λ), exhibiting the spliting of the right and left structures.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

[1] A. Varga, On checking null rank conditions of rational matrices, 2018. arXiv:2006.06825.

source
DescriptorSystems.evalfrFunction
Rval = evalfr(R,val)

Evaluate the rational transfer function matrix R(λ) for λ = val.

source
Rval = evalfr(R; fval = 0)

Evaluate the rational transfer function matrix R(λ) for λ = val, where val = im*fval for a continuous-time system or val = exp(im*fval*abs(Ts)) for a discrete-time system, with Ts the system sampling time.

source
rval = evalfr(r,val)

Evaluate the rational transfer function r(λ) for λ = val.

source
rval = evalfr(r; fval = 0)

Evaluate the rational transfer function r(λ) for λ = val, where val = im*fval for a continuous-time system or val = exp(im*fval*Ts) for a discrete-time system, with Ts the system sampling time.

source
Gval = evalfr(sys, val; atol1 = 0, atol2 = 0, rtol, fast = true)

Evaluate for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), Gval, the value of the rational matrix G(λ) = C*inv(λE-A)*B+D for λ = val. The computed Gval has infinite entries if val is a pole (finite or infinite) of G(λ). If val is finite and val*E-A is singular or if val = Inf and E is singular, then the entries of Gval are evaluated separately for minimal realizations of each input-output channel.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E.

The computation of minimal realizations of individual input-output channels relies on pencil manipulation algorithms, which employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

source
Gval = evalfr(sys; fval = 0, atol = 0, atol1 = atol, atol2 = atol, rtol, fast = true)

Evaluate for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), Gval, the value of the rational matrix G(λ) = C*inv(λE-A)*B+D for λ = val, where val = im*fval for a continuous-time system or val = exp(im*fval*sys.Ts) for a discrete-time system. The computed Gval has infinite entries if val is a pole (finite or infinite) of G(λ). If val is finite and val*E-A is singular or if val = Inf and E is singular, then the entries of Gval are evaluated separately for minimal realizations of each input-output channel.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The computation of minimal realizations of individual input-output channels relies on pencil manipulation algorithms, which employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

source
DescriptorSystems.dcgainFunction
Gval = dcgain(sys; atol1, atol2, rtol, fast = true)

Evaluate for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), Gval, the DC (or steady-state) gain. Gval is the value of the rational matrix G(λ) for λ = val, where for a continuous-time system val = 0 and for a discrete-time system val = 1. The computed Gval has infinite entries if val is a pole of G(λ). In this case (i.e., val*E-A is singular), the entries of Gval are evaluated separately for minimal realizations of each input-output channel.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E.

The computation of minimal realizations of individual input-output channels relies on pencil manipulation algorithms, which employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

source
LinearAlgebra.opnormFunction
 opnorm(sys[, p = Inf]; kwargs...) 
+          |  C   | D |

is equal to n, the order of the system sys.

If fastrank = true, the normal rank of S(λ) is evaluated by counting how many singular values of S(γ) have magnitudes greater than max(max(atol1,atol2), rtol*σ₁), where σ₁ is the largest singular value of S(γ) and γ is a randomly generated value. If fastrank = false, the rank is evaluated as nr + ni + nf + nl, where nr and nl are the sums of right and left Kronecker indices, respectively, while ni and nf are the number of infinite and finite eigenvalues, respectively. The sums nr+ni and nf+nl, are determined from an appropriate Kronecker-like form of the pencil S(λ), exhibiting the spliting of the right and left structures.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

[1] A. Varga, On checking null rank conditions of rational matrices, 2018. arXiv:2006.06825.

source
DescriptorSystems.evalfrFunction
Rval = evalfr(R,val)

Evaluate the rational transfer function matrix R(λ) for λ = val.

source
Rval = evalfr(R; fval = 0)

Evaluate the rational transfer function matrix R(λ) for λ = val, where val = im*fval for a continuous-time system or val = exp(im*fval*abs(Ts)) for a discrete-time system, with Ts the system sampling time.

source
rval = evalfr(r,val)

Evaluate the rational transfer function r(λ) for λ = val.

source
rval = evalfr(r; fval = 0)

Evaluate the rational transfer function r(λ) for λ = val, where val = im*fval for a continuous-time system or val = exp(im*fval*Ts) for a discrete-time system, with Ts the system sampling time.

source
Gval = evalfr(sys, val; atol1 = 0, atol2 = 0, rtol, fast = true)

Evaluate for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), Gval, the value of the rational matrix G(λ) = C*inv(λE-A)*B+D for λ = val. The computed Gval has infinite entries if val is a pole (finite or infinite) of G(λ). If val is finite and val*E-A is singular or if val = Inf and E is singular, then the entries of Gval are evaluated separately for minimal realizations of each input-output channel.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E.

The computation of minimal realizations of individual input-output channels relies on pencil manipulation algorithms, which employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

source
Gval = evalfr(sys; fval = 0, atol = 0, atol1 = atol, atol2 = atol, rtol, fast = true)

Evaluate for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), Gval, the value of the rational matrix G(λ) = C*inv(λE-A)*B+D for λ = val, where val = im*fval for a continuous-time system or val = exp(im*fval*sys.Ts) for a discrete-time system. The computed Gval has infinite entries if val is a pole (finite or infinite) of G(λ). If val is finite and val*E-A is singular or if val = Inf and E is singular, then the entries of Gval are evaluated separately for minimal realizations of each input-output channel.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The computation of minimal realizations of individual input-output channels relies on pencil manipulation algorithms, which employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

source
DescriptorSystems.dcgainFunction
Gval = dcgain(sys; atol1, atol2, rtol, fast = true)

Evaluate for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), Gval, the DC (or steady-state) gain. Gval is the value of the rational matrix G(λ) for λ = val, where for a continuous-time system val = 0 and for a discrete-time system val = 1. The computed Gval has infinite entries if val is a pole of G(λ). In this case (i.e., val*E-A is singular), the entries of Gval are evaluated separately for minimal realizations of each input-output channel.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E.

The computation of minimal realizations of individual input-output channels relies on pencil manipulation algorithms, which employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

source
LinearAlgebra.opnormFunction
 opnorm(sys[, p = Inf]; kwargs...) 
  opnorm(sys, 2; kwargs...) -> sysnorm
  opnorm(sys, Inf; kwargs...) -> (sysnorm, fpeak)
- opnorm(sys; kwargs...) -> (sysnorm, fpeak)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the L2 or L∞ system norm sysnorm induced by the vector p-norm, where valid values of p are 2 or Inf. For the L∞ norm, the frequency fpeak is also returned, where G(λ) achieves its peak gain. See gh2norm and ghinfnorm for a description of the allowed keyword arguments.

source
DescriptorSystems.rssFunction
sys = rss(n, p, m; disc = false, Ts, T = Float64, stable = false, nuc = 0, nuo = 0, randt = true)

Generate a randomized n+nuc+nuo-th order standard state-space system sys = (A,B,C,D) with p outputs and m inputs, with all matrices randomly generated of type T. The resulting sys is a continuous-time system if disc = false and a discrete-time system if disc = true. For a discrete-time system a sample time Δ can be specified using the keyword argument Ts = Δ (default: Δ = -1, i.e., not specified).

If stable = true, the resulting system is stable, with A having all eigenvalues with negative real parts for a continuous-time system, or with moduli less than one for a discrete-time system. If nuc+nuo > 0, the system sys is non-minimal, with A having nuc uncontrollable and nuo unobservable eigenvalues. If randt = true, a randomly generated orthogonal or unitary similarity transformation is additionally applied. If randt = false, the system matrices A, B, and C result in block stuctured forms exhibitting the uncontrollable and unobservable eigenvalues of A:

A = diag(A1, A2, A3),  B = [B1; 0; B3], C = [C1 C2 0]

with the diagonal blocks A1, A2, A3 of orders n, nuc, and nuo, respectively.

source
DescriptorSystems.rdssFunction
sys = rdss(n, p, m; id = [ ], disc = false, Ts, T = Float64, stable = false, nfuc = 0, iduc = [ ], 
+ opnorm(sys; kwargs...) -> (sysnorm, fpeak)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the L2 or L∞ system norm sysnorm induced by the vector p-norm, where valid values of p are 2 or Inf. For the L∞ norm, the frequency fpeak is also returned, where G(λ) achieves its peak gain. See gh2norm and ghinfnorm for a description of the allowed keyword arguments.

source
DescriptorSystems.rssFunction
sys = rss(n, p, m; disc = false, Ts, T = Float64, stable = false, nuc = 0, nuo = 0, randt = true)

Generate a randomized n+nuc+nuo-th order standard state-space system sys = (A,B,C,D) with p outputs and m inputs, with all matrices randomly generated of type T. The resulting sys is a continuous-time system if disc = false and a discrete-time system if disc = true. For a discrete-time system a sample time Δ can be specified using the keyword argument Ts = Δ (default: Δ = -1, i.e., not specified).

If stable = true, the resulting system is stable, with A having all eigenvalues with negative real parts for a continuous-time system, or with moduli less than one for a discrete-time system. If nuc+nuo > 0, the system sys is non-minimal, with A having nuc uncontrollable and nuo unobservable eigenvalues. If randt = true, a randomly generated orthogonal or unitary similarity transformation is additionally applied. If randt = false, the system matrices A, B, and C result in block stuctured forms exhibitting the uncontrollable and unobservable eigenvalues of A:

A = diag(A1, A2, A3),  B = [B1; 0; B3], C = [C1 C2 0]

with the diagonal blocks A1, A2, A3 of orders n, nuc, and nuo, respectively.

source
DescriptorSystems.rdssFunction
sys = rdss(n, p, m; id = [ ], disc = false, Ts, T = Float64, stable = false, nfuc = 0, iduc = [ ], 
            nfuo = 0, iduo = [ ], randlt = true, randrt = true)

Generate a randomized descriptor state-space system sys = (A-λE,B,C,D) with p outputs and m inputs, with all matrices randomly generated of type T. The resulting sys is a continuous-time system if disc = false and a discrete-time system if disc = true. For a discrete-time system a sample time Δ can be specified using the keyword argument Ts = Δ (default: Δ = -1, i.e., not specified).

If the vector id is nonempty, then id[i] specifies the order of the i-th infinite elementary divisor of the resulting pencil A-λE, which thus has n finite eigenvalues and ni = sum(id) infinite eigenvalues which are controllable and observable. If nfuc+nfuo > 0, the system sys is non-minimal, with A having nfuc uncontrollable and nfuo unobservable finite eigenvalues. If the vector iduc is a nonempty, then iduc[i] specifies the order of the i-th infinite elementary divisor with uncontrollable infinite eigenvalues of the resulting pencil A-λE, which thus has niuc = sum(iduc) uncontrollable infinite eigenvalues. If the vector iduo is a nonempty, then iduo[i] specifies the order of the i-th infinite elementary divisor with unobservable infinite eigenvalues of the resulting pencil A-λE, which thus has niuo = sum(iduo) unobservable infinite eigenvalues. If niuc+niuo > 0, the system sys is non-minimal, with A having niuc uncontrollable and niuo unobservable infinite eigenvalues.

It follows, that the resulting pencil A-λE has n+nfuc+nfuo finite eigenvalues and ni+niuc+niuo infinite eigenvalues. If stable = true, the proper part of the system sys is stable, with A having all finite eigenvalues with negative real parts for a continuous-time system, or with moduli less than one for a discrete-time system.

If randlt = true, a randomly generated orthogonal or unitary transformation is additionally applied to A, E, and B from the left. If randrt = true, a randomly generated orthogonal or unitary transformation is additionally applied to A, E, and C from the right. If randlt = false and randrt = false, the system matrices A, E, B, and C result in block stuctured forms exhibitting the uncontrollable and unobservable finite and infinite eigenvalues of A-λE:

A-λE = diag(A1-λE1, A2-λE2, A3-λE3, A4-λE4, A5-λE5, A6-λE6),  
 B = [B1; B2; 0; 0; B5; B6 ], 
-C = [C1 C2 C3 C4 0 0]

with the diagonal blocks A1, A2, A3, A4, A5, A6 of orders n, ni, nfuc, niuc, nfuo and niuo, respectively.

source
DescriptorSystems.dsxvarselFunction
sysr = dsxvarsel(sys,ind)

Construct for the descriptor system sys = (A-λE,B,C,D) of order n the descriptor system sysr = (A[ind,ind]-λE[ind,ind],B[ind,:],C[:,ind],D) of order nr = length(ind), by selecting the state variables of sys with indices specified by ind. If ind is a permutation vector of length n, then sysr has the same transfer function matrix as sys and permuted state variables.

source
DescriptorSystems.dssubsetFunction
 res = dssubset(sys, subsys, rows, cols; minimal = true, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ)

Assign for a given descriptor system sys = (A-λE,B,C,D) its subsystem sys[row,cols] to subsys and return the modified system in res. rows and cols are indices, vectors of indices, index ranges, : or any combinations of them.

If minimal = true (default), an irreducible realization of the resulting system res is computed, otherwise a possibly non-minimal realization is returned if minimal = false.

The underlying pencil manipulation based minimal realization algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.dszerosFunction
 res = dszeros(sys, rows, cols; minimal = true, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ)

Set for a given descriptor system sys = (A-λE,B,C,D) its subsystem sys[row,cols] to zero and return the modified system in res. rows and cols are indices, vectors of indices, index ranges, : or any combinations of them.

If minimal = true (default), an irreducible realization of the resulting system res is computed, otherwise a possibly non-minimal realization is returned if minimal = false.

The underlying pencil manipulation based minimal realization algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.dssubselFunction
 res = dssubsel(sys, S; minimal = true, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ)

Select for a given descriptor system sys = (A-λE,B,C,D) its subsystem res corresponding to the zero-one pattern specified by the binary structure matrix S. If G(λ) is the transfer function matrix of sys, then the transfer function matrix of res is the element-wise product S .* G(λ).

If minimal = true (default), an irreducible realization of the resulting system res is computed, otherwise a possibly non-minimal realization is returned if minimal = false.

The underlying pencil manipulation based minimal realization algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.dsdiagFunction
 sysdiag = dsdiag(sys, k)

Build for a given descriptor system sys and non-negative integer k a descriptor system sysdiag obtained as sysdiag = diag( sys, ..., sys ) (i.e., k-times repeated application of append).

source
+C = [C1 C2 C3 C4 0 0]

with the diagonal blocks A1, A2, A3, A4, A5, A6 of orders n, ni, nfuc, niuc, nfuo and niuo, respectively.

source
DescriptorSystems.dsxvarselFunction
sysr = dsxvarsel(sys,ind)

Construct for the descriptor system sys = (A-λE,B,C,D) of order n the descriptor system sysr = (A[ind,ind]-λE[ind,ind],B[ind,:],C[:,ind],D) of order nr = length(ind), by selecting the state variables of sys with indices specified by ind. If ind is a permutation vector of length n, then sysr has the same transfer function matrix as sys and permuted state variables.

source
DescriptorSystems.dssubsetFunction
 res = dssubset(sys, subsys, rows, cols; minimal = true, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ)

Assign for a given descriptor system sys = (A-λE,B,C,D) its subsystem sys[row,cols] to subsys and return the modified system in res. rows and cols are indices, vectors of indices, index ranges, : or any combinations of them.

If minimal = true (default), an irreducible realization of the resulting system res is computed, otherwise a possibly non-minimal realization is returned if minimal = false.

The underlying pencil manipulation based minimal realization algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.dszerosFunction
 res = dszeros(sys, rows, cols; minimal = true, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ)

Set for a given descriptor system sys = (A-λE,B,C,D) its subsystem sys[row,cols] to zero and return the modified system in res. rows and cols are indices, vectors of indices, index ranges, : or any combinations of them.

If minimal = true (default), an irreducible realization of the resulting system res is computed, otherwise a possibly non-minimal realization is returned if minimal = false.

The underlying pencil manipulation based minimal realization algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.dssubselFunction
 res = dssubsel(sys, S; minimal = true, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ)

Select for a given descriptor system sys = (A-λE,B,C,D) its subsystem res corresponding to the zero-one pattern specified by the binary structure matrix S. If G(λ) is the transfer function matrix of sys, then the transfer function matrix of res is the element-wise product S .* G(λ).

If minimal = true (default), an irreducible realization of the resulting system res is computed, otherwise a possibly non-minimal realization is returned if minimal = false.

The underlying pencil manipulation based minimal realization algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.dsdiagFunction
 sysdiag = dsdiag(sys, k)

Build for a given descriptor system sys and non-negative integer k a descriptor system sysdiag obtained as sysdiag = diag( sys, ..., sys ) (i.e., k-times repeated application of append).

source
diff --git a/dev/factorizations.html b/dev/factorizations.html index 79c69fc..2b12809 100644 --- a/dev/factorizations.html +++ b/dev/factorizations.html @@ -1,12 +1,12 @@ Factorization of descriptor system transfer function matrices · DescriptorSystems.jl

Factorization of descriptor system transfer function matrices

  • grcf Right coprime factorization with proper and stable factors.
  • glcf Left coprime factorization with proper and stable factors.
  • grcfid Right coprime factorization with inner denominator.
  • glcfid Left coprime factorization with inner denominator.
  • gnrcf Normalized right coprime factorization.
  • gnlcf Normalized left coprime factorization.
  • giofac Inner-outer/QR-like factorization.
  • goifac Co-outer-co-inner/RQ-like factorization.
  • grsfg Right spectral factorization of γ^2*I-G'*G.
  • glsfg Left spectral factorization of γ^2*I-G*G'.
DescriptorSystems.grcfFunction
grcf(sys; smarg, sdeg, evals, mindeg = false, mininf = false, fast = true, 
-     atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = n*ϵ) -> (sysn, sysm)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysn = (An-λEn,Bn,Cn,Dn) and sysm = (Am-λEm,Bm,Cm,Dm) of its stable and proper right coprime factorization. If sys, sysn and sysm have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = N(λ)*inv(M(λ)), with N(λ) and M(λ) proper and stable transfer function matrices. The resulting matrix pairs (An,En) and (Am,Em) are in (generalized) Schur form. The stability domain Cs of poles is defined by the keyword argument smarg for the stability margin, as follows: for a continuous-time system sys, Cs is the set of complex numbers with real parts at most smarg < 0, while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most smarg < 1 (i.e., the interior of a disc of radius smarg centered in the origin). If smarg is missing, then the employed default values are smarg = -sqrt(eps) for a continuous-time system and smarg = 1-sqrt(eps) for a discrete-time system.

The keyword argument sdeg specifies the prescribed stability degree for the assigned eigenvalues of the factors. If both sdeg and smarg are missing, then the employed default values are sdeg = -0.05 for a continuous-time system and sdeg = 0.95 for a discrete-time system, while if smarg is specified, then sdeg = smarg is used.

The keyword argument evals is a real or complex vector, which contains a set of finite desired eigenvalues for the factors. For a system with real data, evals must be a self-conjugated complex set to ensure that the resulting factors are also real.

If mindeg = false, both factors sysn and sysm have descriptor realizations with the same order and with An = Am, En = Em and Bn = Bm. If mindeg = true, the realization of sysm is minimal. The number of (finite) poles of sysm is equal to the number of unstable finite poles of sys.

If mininf = false, then An-λEn and Am-λEm may have simple infinite eigenvalues. If mininf = true, then An-λEn and Am-λEm have no simple infinite eigenvalues. Note that the removing of simple infinite eigenvalues involves matrix inversions.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of B, and the relative tolerance for the nonzero elements of A, E and B. The default relative tolerance is n*ϵ, where ϵ is the machine epsilon of the element type of A and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

The preliminary separation of finite and infinite eigenvalues of A-λE is performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The Procedure GRCF from [2] is implemented, which represents an extension of the recursive factorization approach of [1] to cope with infinite eigenvalues. All infinite poles are assigned to finite real values. If evals is missing or does not contain a sufficient number of real values, then a part or all of infinite eigenvalues of A-λE are assigned to the value specified by sdeg. The pairs (An,En) and (Am,Em) result in generalized Schur form with both An and Am quasi-upper triangular and En and Em either both upper triangular or both UniformScalings.

References:

[1] A. Varga. Computation of coprime factorizations of rational matrices. Linear Algebra and Its Applications, vol. 271, pp.88-115, 1998.

[2] A. Varga. On recursive computation of coprime factorizations of rational matrices. arXiv:1703.07307, https://arxiv.org/abs/1703.07307, 2020. (to appear in Linear Algebra and Its Applications)

source
DescriptorSystems.glcfFunction
glcf(sys; smarg, sdeg, evals, mindeg = false, mininf = false, fast = true, 
-     atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = n*ϵ) -> (sysn, sysm)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysn = (An-λEn,Bn,Cn,Dn) and sysm = (Am-λEm,Bm,Cm,Dm) of its stable and proper left coprime factorization. If sys, sysn and sysm have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = inv(M(λ))*N(λ), with N(λ) and M(λ) proper and stable transfer function matrices. The resulting matrix pairs (An,En) and (Am,Em) are in (generalized) Schur form. The stability domain Cs of poles is defined by the keyword argument smarg for the stability margin, as follows: for a continuous-time system sys, Cs is the set of complex numbers with real parts at most smarg, while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most smarg < 1 (i.e., the interior of a disc of radius smarg centered in the origin). If smarg is missing, then the employed default values are smarg = -sqrt(eps) for a continuous-time system and smarg = 1-sqrt(eps) for a discrete-time system.

The keyword argument sdeg specifies the prescribed stability degree for the assigned eigenvalues of the factors. If both sdeg and smarg are missing, then the employed default values are sdeg = -0.05 for a continuous-time system and sdeg = 0.95 for a discrete-time system, while if smarg is specified, then sdeg = smarg is used.

The keyword argument evals is a real or complex vector, which contains a set of finite desired eigenvalues for the factors. For a system with real data, evals must be a self-conjugated complex set to ensure that the resulting factors are also real.

If mindeg = false, both factors sysn and sysm have descriptor realizations with the same order and with An = Am, En = Em and Cn = Cm. If mindeg = true, the realization of sysm is minimal. The number of (finite) poles of sysm is equal to the number of unstable finite poles of sys.

If mininf = false, then An-λEn and Am-λEm may have simple infinite eigenvalues. If mininf = true, then An-λEn and Am-λEm have no simple infinite eigenvalues. Note that the removing of simple infinite eigenvalues involves matrix inversions.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C, and the relative tolerance for the nonzero elements of A, E and C. The default relative tolerance is n*ϵ, where ϵ is the machine epsilon of the element type of A and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

The preliminary separation of finite and infinite eigenvalues of A-λE is performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The dual of Procedure GRCF from [2] is used, which represents an extension of the recursive factorization approach of [1] to cope with infinite poles. All infinite eigenvalues are assigned to finite real values. If evals is missing or does not contain a sufficient number of real values, then a part or all of infinite eigenvalues of A-λE are assigned to the value specified by sdeg. The pairs (An,En) and (Am,Em) result in generalized Schur form with both An and Am quasi-upper triangular and En and Em either both upper triangular or both UniformScalings.

References:

[1] A. Varga. Computation of coprime factorizations of rational matrices. Linear Algebra and Its Applications, vol. 271, pp.88-115, 1998.

[2] A. Varga. On recursive computation of coprime factorizations of rational matrices. arXiv:1703.07307, https://arxiv.org/abs/1703.07307, 2020. (to appear in Linear Algebra and Its Applications)

source
DescriptorSystems.grcfidFunction
grcfid(sys; mindeg = false, mininf = false, fast = true, offset = sqrt(ϵ), 
-       atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = n*ϵ) -> (sysni, sysmi)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysni = (Ani-λEni,Bni,Cni,Dni) and sysmi = (Ami-λEmi,Bmi,Cmi,Dmi) of its right coprime factorization with inner denominator. If sys, sysni and sysmi have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = N(λ)*inv(M(λ)), with N(λ) and M(λ) proper and stable transfer function matrices and the denominator factor M(λ) inner. The resulting matrix pairs (Ani,Eni) and (Ami,Emi) are in (generalized) Schur form. The system sys must not have poles on the boundary of the stability domain Cs. In terms of eigenvalues, this requires for a continuous-time system, that A-λE must not have controllable eigenvalues on the imaginary axis (excepting simple infinite eigenvalues), while for a discrete-time system, A-λE must not have controllable eigenvalues on the unit circle centered in the origin.

To assess the presence of poles on the boundary of Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, then the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If mindeg = false, both factors sysni and sysmi have descriptor realizations with the same order and with Ani = Ami, Eni = Emi and Bni = Bmi. If mindeg = true, the realization of sysmi is minimal. The number of (finite) poles of sysmi is equal to the number of unstable finite poles of sys.

If mininf = false, then Ani-λEni and Ami-λEmi may have simple infinite eigenvalues. If mininf = true, then Ani-λEni and Ami-λEmi have no simple infinite eigenvalues. Note that the removing of simple infinite eigenvalues involves matrix inversions.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of B, and the relative tolerance for the nonzero elements of A, E and B. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

The preliminary separation of finite and infinite eigenvalues of A-λEis performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: An extension of the recursive factorization approach of [1] is used (see [2] for details). The pairs (Ani,Eni) and (Ami,Emi) result in generalized Schur form with both Ani and Ami quasi-upper triangular and Eni and Emi either both upper triangular or both UniformScalings.

References:

[1] A. Varga. Computation of coprime factorizations of rational matrices. Linear Algebra and Its Applications, vol. 271, pp.88-115, 1998.

[2] A. Varga. On recursive computation of coprime factorizations of rational matrices. arXiv:1703.07307, https://arxiv.org/abs/1703.07307, 2020. (to appear in Linear Algebra and Its Applications)

source
DescriptorSystems.glcfidFunction
glcfid(sys; mindeg = false, mininf = false, fast = true, offset = sqrt(ϵ), 
-       atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = n*ϵ) -> (sysni, sysmi)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysni = (Ani-λEni,Bni,Cni,Dni) and sysmi = (Ami-λEmi,Bmi,Cmi,Dmi) of its left coprime factorization with inner denominator. If sys, sysni and sysmi have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = inv(M(λ))*N(λ), with N(λ) and M(λ) proper and stable transfer function matrices and the denominator factor M(λ) inner. The resulting matrix pairs (Ani,Eni) and (Ami,Emi) are in Schur forms. The system sys must not have poles on the boundary of the stability domain Cs. In terms of eigenvalues, this requires for a continuous-time system, that A-λE must not have controllable eigenvalues on the imaginary axis (excepting simple infinite eigenvalues), while for a discrete-time system, A-λE must not have controllable eigenvalues on the unit circle centered in the origin.

To assess the presence of poles on the boundary of Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, then the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If mindeg = false, both factors sysni and sysmi have descriptor realizations with the same order and with Ani = Ami, Eni = Emi and Cni = Cmi. If mindeg = true, the realization of sysmi is minimal. The number of (finite) poles of sysmi is equal to the number of unstable finite poles of sys.

If mininf = false, then Ani-λEni and Ami-λEmi may have simple infinite eigenvalues. If mininf = true, then Ani-λEni and Ami-λEmi have no simple infinite eigenvalues. Note that the removing of simple infinite eigenvalues involves matrix inversions.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C, and the relative tolerance for the nonzero elements of A, E and C. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

The preliminary separation of finite and infinite eigenvalues of A-λEis performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: An extension of the recursive factorization approach of [1] is used to the dual system (see [2] for details). The pairs (Ani,Eni) and (Ami,Emi) result in generalized Schur form with both Ani and Ami quasi-upper triangular and Eni and Emi either both upper triangular or both UniformScalings.

References:

[1] A. Varga. Computation of coprime factorizations of rational matrices. Linear Algebra and Its Applications, vol. 271, pp.88-115, 1998.

[2] A. Varga. On recursive computation of coprime factorizations of rational matrices. arXiv:1703.07307, https://arxiv.org/abs/1703.07307, 2020. (to appear in Linear Algebra and Its Applications)

source
DescriptorSystems.gnrcfFunction
gnrcf(sys; fast = true, ss = false, 
-     atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysn, sysm)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysn = (An-λEn,Bn,Cn,Dn) and sysm = (An-λEn,Bn,Cm,Dm) of its normalized right coprime factorization. If sys, sysn and sysm have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = N(λ)*inv(M(λ)), with N(λ) and M(λ) proper and stable transfer function matrices and [N(λ);M(λ)] inner. The resulting En = I if ss = true.

Pencil reduction algorithms are employed which perform rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the machine epsilon of the element type of A and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

Method: Pencil reduction algorithms are employed to determine the inner range space R(λ) of the transfer function matrix [G(λ); I] using the method described in [1], which is based on the reduction algorithm of [2]. Then the factors N(λ) and M(λ) result from the partitioning of R(λ) as R(λ) = [N(λ);M(λ)].

References:

[1] Varga, A. A note on computing the range of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.0048, 2017.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

source
DescriptorSystems.gnlcfFunction
gnlcf(sys; fast = true, ss = false, 
-     atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysn, sysm)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysn = (An-λEn,Bn,Cn,Dn) and sysm = (An-λEn,Bm,Cn,Dm) of its normalized right coprime factorization. If sys, sysn and sysm have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = inv(M(λ))*N(λ), with N(λ) and M(λ) proper and stable transfer function matrices and [N(λ) M(λ)] coinner. The resulting En = I if ss = true.

Pencil reduction algorithms are employed which perform rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the machine epsilon of the element type of A and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

Method: Pencil reduction algorithms are employed to determine the coinner coimage space R(λ) of the transfer function matrix [G(λ) I] using the dual of method described in [1], which is based on the reduction algorithm of [2]. Then the factors N(λ) and M(λ) result from the partitioning of R(λ) as R(λ) = [N(λ) M(λ)].

References:

[1] Varga, A. A note on computing the range of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.0048, 2017.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

source
DescriptorSystems.giofacFunction
giofac(sys; atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol, 
-       fast = true, minphase = true, offset = sqrt(ϵ)) -> (sysi, syso, info)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the square inner factor sysi = (Ai-λEi,Bi,Ci,Di) with the transfer function matrix Gi(λ) and the minimum-phase quasi-outer factor or the full row rank factor syso = (Ao-λEo,Bo,Co,Do) with the transfer function matrix Go(λ) such that

 G(λ) = Gi[:,1:r](λ)*Go(λ)    (*),

where r is the normal rank of G(λ). The resulting proper and stable inner factor satisfies Gi'(λ)*Gi(λ) = I. If sys is stable (proper), then the resulting syso is stable (proper). The resulting factor Go(λ) has full row rank r. Depending on the selected factorization option, if minphase = true, then Go(λ) is minimum phase, excepting possibly zeros on the boundary of the appropriate stability domain Cs, or if minphase = false, then Go(λ) contains all zeros of G(λ), in which case (*) is the extended QR-like factorization of G(λ). For a continuous-time system sys, the stability domain Cs is defined as the set of complex numbers with real parts at most , while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most 1-β (i.e., the interior of a disc of radius 1-β centered in the origin). The boundary offset β to be used to assess the stability of zeros and their number on the boundary of Cs can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The resulting named triple info contains (nrank, nfuz, niuz), where info.nrank = r, the normal rank of G(λ), info.nfuz is the number of finite zeros of syso on the boundary of Cs, and info.niuz is the number of infinite zeros of syso. info.nfuz is set to missing if minphase = false.

Note: syso may generally contain a free inner factor, which can be eliminated by removing the finite unobservable eigenvalues.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A and B, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C and D, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

For the assessment of zeros, the system pencil [A-λE B; C D] is reduced to a special Kronecker-like form (see [2]). In this reduction, the performed rank decisions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: For a continuous-time system, the factorization algorithm of [1] is used, while for a discrete-time system, the factorization algorithm of [1] is used.

References:

[1] C. Oara and A. Varga. Computation of the general inner-outer and spectral factorizations. IEEE Trans. Autom. Control, vol. 45, pp. 2307-2325, 2000.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

source
DescriptorSystems.goifacFunction
goifac(sys; atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol, 
-       fast = true, minphase = true, offset = sqrt(ϵ)) -> (sysi, syso, info)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the square inner factor sysi = (Ai-λEi,Bi,Ci,Di) with the transfer function matrix Gi(λ) and the minimum-phase quasi-outer factor or the full column rank factor syso = (Ao-λEo,Bo,Co,Do) with the transfer function matrix Go(λ) such that

 G(λ) = Go(λ)*Gi[1:r,:](λ)    (*),

where r is the normal rank of G(λ). The resulting proper and stable inner factor satisfies Gi'(λ)*Gi(λ) = I. If sys is stable (proper), then the resulting syso is stable (proper). The resulting factor Go(λ) has full column rank r. Depending on the selected factorization option, if minphase = true, then Go(λ) is minimum phase, excepting possibly zeros on the boundary of the appropriate stability domain Cs, or if minphase = false, then Go(λ) contains all zeros of G(λ), in which case (*) is the extended RQ-like factorization of G(λ). For a continuous-time system sys, the stability domain Cs is defined as the set of complex numbers with real parts at most , while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most 1-β (i.e., the interior of a disc of radius 1-β centered in the origin). The boundary offset β to be used to assess the stability of zeros and their number on the boundary of Cs can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The resulting named triple info contains (nrank, nfuz, niuz), where info.nrank = r, the normal rank of G(λ), info.nfuz is the number of finite zeros of syso on the boundary of Cs, and info.niuz is the number of infinite zeros of syso. info.nfuz is set to missing if minphase = false.

Note: syso may generally contain a free inner factor, which can be eliminated by removing the finite unobservable eigenvalues.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A and C, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of B and D, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

For the assessment of zeros, the dual system pencil transpose([A-λE B; C D]) is reduced to a special Kronecker-like form (see [2]). In this reduction, the performed rank decisions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: For a continuous-time system, the dual system is formed and the factorization algorithm of [1] is used, while for a discrete-time system, the factorization algorithm of [1] is used.

References:

[1] C. Oara and A. Varga. Computation of the general inner-outer and spectral factorizations. IEEE Trans. Autom. Control, vol. 45, pp. 2307–2325, 2000.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

source
DescriptorSystems.grsfgFunction
 sysf = grsfg(sys, γ; fast = true, stabilize = true, offset = β, 
-              atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) and ${\small γ > \|G(λ)\|_∞}$, the minimum-phase right spectral factor sysf = (Af-λEf,Bf,Cf,Df) with the transfer-function matrix F(λ), such that F(λ)'*F(λ) = γ^2*I-G(λ)'*G(λ). If stabilize = true (the default), a preliminary stabilization of sys is performed. In this case, sys must not have poles on the imaginary-axis in the continuous-time case or on the unit circle in the discrete-time case. If stabilize = false, then no preliminary stabilization is performed. In this case, sys must be stable.

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, then the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If stabilize = true, a preliminary separation of finite and infinite eigenvalues of A-λEis performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C, and the relative tolerance for the nonzero elements of A, E and C. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

Method: Extensions of the factorization approaches of [1] are used.

References:

[1] K. Zhou, J. C. Doyle, and K. Glover. Robust and Optimal Control. Prentice Hall, 1996.

source
DescriptorSystems.glsfgFunction
 sysf = glsfg(sys, γ; fast = true, stabilize = true, offset = β, 
-              atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) and ${\small γ > \|G(λ)\|_∞}$, the minimum-phase right spectral factor sysf = (Af-λEf,Bf,Cf,Df) with the transfer-function matrix F(λ), such that F(λ)*F(λ)' = γ^2*I-G(λ)*G(λ)'. If stabilize = true (the default), a preliminary stabilization of sys is performed. In this case, sys must not have poles on the imaginary-axis in the continuous-time case or on the unit circle in the discrete-time case. If stabilize = false, then no preliminary stabilization is performed. In this case, sys must be stable.

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, then the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If stabilize = true, a preliminary separation of finite and infinite eigenvalues of A-λEis performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C, and the relative tolerance for the nonzero elements of A, E and C. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

Method: Extensions of the factorization approaches of [1] are used.

References:

[1] K. Zhou, J. C. Doyle, and K. Glover. Robust and Optimal Control. Prentice Hall, 1996.

source
+ atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = n*ϵ) -> (sysn, sysm)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysn = (An-λEn,Bn,Cn,Dn) and sysm = (Am-λEm,Bm,Cm,Dm) of its stable and proper right coprime factorization. If sys, sysn and sysm have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = N(λ)*inv(M(λ)), with N(λ) and M(λ) proper and stable transfer function matrices. The resulting matrix pairs (An,En) and (Am,Em) are in (generalized) Schur form. The stability domain Cs of poles is defined by the keyword argument smarg for the stability margin, as follows: for a continuous-time system sys, Cs is the set of complex numbers with real parts at most smarg < 0, while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most smarg < 1 (i.e., the interior of a disc of radius smarg centered in the origin). If smarg is missing, then the employed default values are smarg = -sqrt(eps) for a continuous-time system and smarg = 1-sqrt(eps) for a discrete-time system.

The keyword argument sdeg specifies the prescribed stability degree for the assigned eigenvalues of the factors. If both sdeg and smarg are missing, then the employed default values are sdeg = -0.05 for a continuous-time system and sdeg = 0.95 for a discrete-time system, while if smarg is specified, then sdeg = smarg is used.

The keyword argument evals is a real or complex vector, which contains a set of finite desired eigenvalues for the factors. For a system with real data, evals must be a self-conjugated complex set to ensure that the resulting factors are also real.

If mindeg = false, both factors sysn and sysm have descriptor realizations with the same order and with An = Am, En = Em and Bn = Bm. If mindeg = true, the realization of sysm is minimal. The number of (finite) poles of sysm is equal to the number of unstable finite poles of sys.

If mininf = false, then An-λEn and Am-λEm may have simple infinite eigenvalues. If mininf = true, then An-λEn and Am-λEm have no simple infinite eigenvalues. Note that the removing of simple infinite eigenvalues involves matrix inversions.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of B, and the relative tolerance for the nonzero elements of A, E and B. The default relative tolerance is n*ϵ, where ϵ is the machine epsilon of the element type of A and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

The preliminary separation of finite and infinite eigenvalues of A-λE is performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The Procedure GRCF from [2] is implemented, which represents an extension of the recursive factorization approach of [1] to cope with infinite eigenvalues. All infinite poles are assigned to finite real values. If evals is missing or does not contain a sufficient number of real values, then a part or all of infinite eigenvalues of A-λE are assigned to the value specified by sdeg. The pairs (An,En) and (Am,Em) result in generalized Schur form with both An and Am quasi-upper triangular and En and Em either both upper triangular or both UniformScalings.

References:

[1] A. Varga. Computation of coprime factorizations of rational matrices. Linear Algebra and Its Applications, vol. 271, pp.88-115, 1998.

[2] A. Varga. On recursive computation of coprime factorizations of rational matrices. arXiv:1703.07307, https://arxiv.org/abs/1703.07307, 2020. (to appear in Linear Algebra and Its Applications)

source
DescriptorSystems.glcfFunction
glcf(sys; smarg, sdeg, evals, mindeg = false, mininf = false, fast = true, 
+     atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = n*ϵ) -> (sysn, sysm)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysn = (An-λEn,Bn,Cn,Dn) and sysm = (Am-λEm,Bm,Cm,Dm) of its stable and proper left coprime factorization. If sys, sysn and sysm have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = inv(M(λ))*N(λ), with N(λ) and M(λ) proper and stable transfer function matrices. The resulting matrix pairs (An,En) and (Am,Em) are in (generalized) Schur form. The stability domain Cs of poles is defined by the keyword argument smarg for the stability margin, as follows: for a continuous-time system sys, Cs is the set of complex numbers with real parts at most smarg, while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most smarg < 1 (i.e., the interior of a disc of radius smarg centered in the origin). If smarg is missing, then the employed default values are smarg = -sqrt(eps) for a continuous-time system and smarg = 1-sqrt(eps) for a discrete-time system.

The keyword argument sdeg specifies the prescribed stability degree for the assigned eigenvalues of the factors. If both sdeg and smarg are missing, then the employed default values are sdeg = -0.05 for a continuous-time system and sdeg = 0.95 for a discrete-time system, while if smarg is specified, then sdeg = smarg is used.

The keyword argument evals is a real or complex vector, which contains a set of finite desired eigenvalues for the factors. For a system with real data, evals must be a self-conjugated complex set to ensure that the resulting factors are also real.

If mindeg = false, both factors sysn and sysm have descriptor realizations with the same order and with An = Am, En = Em and Cn = Cm. If mindeg = true, the realization of sysm is minimal. The number of (finite) poles of sysm is equal to the number of unstable finite poles of sys.

If mininf = false, then An-λEn and Am-λEm may have simple infinite eigenvalues. If mininf = true, then An-λEn and Am-λEm have no simple infinite eigenvalues. Note that the removing of simple infinite eigenvalues involves matrix inversions.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C, and the relative tolerance for the nonzero elements of A, E and C. The default relative tolerance is n*ϵ, where ϵ is the machine epsilon of the element type of A and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

The preliminary separation of finite and infinite eigenvalues of A-λE is performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The dual of Procedure GRCF from [2] is used, which represents an extension of the recursive factorization approach of [1] to cope with infinite poles. All infinite eigenvalues are assigned to finite real values. If evals is missing or does not contain a sufficient number of real values, then a part or all of infinite eigenvalues of A-λE are assigned to the value specified by sdeg. The pairs (An,En) and (Am,Em) result in generalized Schur form with both An and Am quasi-upper triangular and En and Em either both upper triangular or both UniformScalings.

References:

[1] A. Varga. Computation of coprime factorizations of rational matrices. Linear Algebra and Its Applications, vol. 271, pp.88-115, 1998.

[2] A. Varga. On recursive computation of coprime factorizations of rational matrices. arXiv:1703.07307, https://arxiv.org/abs/1703.07307, 2020. (to appear in Linear Algebra and Its Applications)

source
DescriptorSystems.grcfidFunction
grcfid(sys; mindeg = false, mininf = false, fast = true, offset = sqrt(ϵ), 
+       atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = n*ϵ) -> (sysni, sysmi)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysni = (Ani-λEni,Bni,Cni,Dni) and sysmi = (Ami-λEmi,Bmi,Cmi,Dmi) of its right coprime factorization with inner denominator. If sys, sysni and sysmi have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = N(λ)*inv(M(λ)), with N(λ) and M(λ) proper and stable transfer function matrices and the denominator factor M(λ) inner. The resulting matrix pairs (Ani,Eni) and (Ami,Emi) are in (generalized) Schur form. The system sys must not have poles on the boundary of the stability domain Cs. In terms of eigenvalues, this requires for a continuous-time system, that A-λE must not have controllable eigenvalues on the imaginary axis (excepting simple infinite eigenvalues), while for a discrete-time system, A-λE must not have controllable eigenvalues on the unit circle centered in the origin.

To assess the presence of poles on the boundary of Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, then the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If mindeg = false, both factors sysni and sysmi have descriptor realizations with the same order and with Ani = Ami, Eni = Emi and Bni = Bmi. If mindeg = true, the realization of sysmi is minimal. The number of (finite) poles of sysmi is equal to the number of unstable finite poles of sys.

If mininf = false, then Ani-λEni and Ami-λEmi may have simple infinite eigenvalues. If mininf = true, then Ani-λEni and Ami-λEmi have no simple infinite eigenvalues. Note that the removing of simple infinite eigenvalues involves matrix inversions.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of B, and the relative tolerance for the nonzero elements of A, E and B. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

The preliminary separation of finite and infinite eigenvalues of A-λEis performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: An extension of the recursive factorization approach of [1] is used (see [2] for details). The pairs (Ani,Eni) and (Ami,Emi) result in generalized Schur form with both Ani and Ami quasi-upper triangular and Eni and Emi either both upper triangular or both UniformScalings.

References:

[1] A. Varga. Computation of coprime factorizations of rational matrices. Linear Algebra and Its Applications, vol. 271, pp.88-115, 1998.

[2] A. Varga. On recursive computation of coprime factorizations of rational matrices. arXiv:1703.07307, https://arxiv.org/abs/1703.07307, 2020. (to appear in Linear Algebra and Its Applications)

source
DescriptorSystems.glcfidFunction
glcfid(sys; mindeg = false, mininf = false, fast = true, offset = sqrt(ϵ), 
+       atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol = n*ϵ) -> (sysni, sysmi)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysni = (Ani-λEni,Bni,Cni,Dni) and sysmi = (Ami-λEmi,Bmi,Cmi,Dmi) of its left coprime factorization with inner denominator. If sys, sysni and sysmi have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = inv(M(λ))*N(λ), with N(λ) and M(λ) proper and stable transfer function matrices and the denominator factor M(λ) inner. The resulting matrix pairs (Ani,Eni) and (Ami,Emi) are in Schur forms. The system sys must not have poles on the boundary of the stability domain Cs. In terms of eigenvalues, this requires for a continuous-time system, that A-λE must not have controllable eigenvalues on the imaginary axis (excepting simple infinite eigenvalues), while for a discrete-time system, A-λE must not have controllable eigenvalues on the unit circle centered in the origin.

To assess the presence of poles on the boundary of Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, then the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If mindeg = false, both factors sysni and sysmi have descriptor realizations with the same order and with Ani = Ami, Eni = Emi and Cni = Cmi. If mindeg = true, the realization of sysmi is minimal. The number of (finite) poles of sysmi is equal to the number of unstable finite poles of sys.

If mininf = false, then Ani-λEni and Ami-λEmi may have simple infinite eigenvalues. If mininf = true, then Ani-λEni and Ami-λEmi have no simple infinite eigenvalues. Note that the removing of simple infinite eigenvalues involves matrix inversions.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C, and the relative tolerance for the nonzero elements of A, E and C. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

The preliminary separation of finite and infinite eigenvalues of A-λEis performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: An extension of the recursive factorization approach of [1] is used to the dual system (see [2] for details). The pairs (Ani,Eni) and (Ami,Emi) result in generalized Schur form with both Ani and Ami quasi-upper triangular and Eni and Emi either both upper triangular or both UniformScalings.

References:

[1] A. Varga. Computation of coprime factorizations of rational matrices. Linear Algebra and Its Applications, vol. 271, pp.88-115, 1998.

[2] A. Varga. On recursive computation of coprime factorizations of rational matrices. arXiv:1703.07307, https://arxiv.org/abs/1703.07307, 2020. (to appear in Linear Algebra and Its Applications)

source
DescriptorSystems.gnrcfFunction
gnrcf(sys; fast = true, ss = false, 
+     atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysn, sysm)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysn = (An-λEn,Bn,Cn,Dn) and sysm = (An-λEn,Bn,Cm,Dm) of its normalized right coprime factorization. If sys, sysn and sysm have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = N(λ)*inv(M(λ)), with N(λ) and M(λ) proper and stable transfer function matrices and [N(λ);M(λ)] inner. The resulting En = I if ss = true.

Pencil reduction algorithms are employed which perform rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the machine epsilon of the element type of A and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

Method: Pencil reduction algorithms are employed to determine the inner range space R(λ) of the transfer function matrix [G(λ); I] using the method described in [1], which is based on the reduction algorithm of [2]. Then the factors N(λ) and M(λ) result from the partitioning of R(λ) as R(λ) = [N(λ);M(λ)].

References:

[1] Varga, A. A note on computing the range of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.0048, 2017.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

source
DescriptorSystems.gnlcfFunction
gnlcf(sys; fast = true, ss = false, 
+     atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysn, sysm)

Compute for the descriptor system sys = (A-λE,B,C,D), the factors sysn = (An-λEn,Bn,Cn,Dn) and sysm = (An-λEn,Bm,Cn,Dm) of its normalized right coprime factorization. If sys, sysn and sysm have the transfer function matrices G(λ), N(λ) and M(λ), respectively, then G(λ) = inv(M(λ))*N(λ), with N(λ) and M(λ) proper and stable transfer function matrices and [N(λ) M(λ)] coinner. The resulting En = I if ss = true.

Pencil reduction algorithms are employed which perform rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2 and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C and D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the machine epsilon of the element type of A and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol.

Method: Pencil reduction algorithms are employed to determine the coinner coimage space R(λ) of the transfer function matrix [G(λ) I] using the dual of method described in [1], which is based on the reduction algorithm of [2]. Then the factors N(λ) and M(λ) result from the partitioning of R(λ) as R(λ) = [N(λ) M(λ)].

References:

[1] Varga, A. A note on computing the range of rational matrices. arXiv:1707.0048, https://arxiv.org/abs/1707.0048, 2017.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

source
DescriptorSystems.giofacFunction
giofac(sys; atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol, 
+       fast = true, minphase = true, offset = sqrt(ϵ)) -> (sysi, syso, info)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the square inner factor sysi = (Ai-λEi,Bi,Ci,Di) with the transfer function matrix Gi(λ) and the minimum-phase quasi-outer factor or the full row rank factor syso = (Ao-λEo,Bo,Co,Do) with the transfer function matrix Go(λ) such that

 G(λ) = Gi[:,1:r](λ)*Go(λ)    (*),

where r is the normal rank of G(λ). The resulting proper and stable inner factor satisfies Gi'(λ)*Gi(λ) = I. If sys is stable (proper), then the resulting syso is stable (proper). The resulting factor Go(λ) has full row rank r. Depending on the selected factorization option, if minphase = true, then Go(λ) is minimum phase, excepting possibly zeros on the boundary of the appropriate stability domain Cs, or if minphase = false, then Go(λ) contains all zeros of G(λ), in which case (*) is the extended QR-like factorization of G(λ). For a continuous-time system sys, the stability domain Cs is defined as the set of complex numbers with real parts at most , while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most 1-β (i.e., the interior of a disc of radius 1-β centered in the origin). The boundary offset β to be used to assess the stability of zeros and their number on the boundary of Cs can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The resulting named triple info contains (nrank, nfuz, niuz), where info.nrank = r, the normal rank of G(λ), info.nfuz is the number of finite zeros of syso on the boundary of Cs, and info.niuz is the number of infinite zeros of syso. info.nfuz is set to missing if minphase = false.

Note: syso may generally contain a free inner factor, which can be eliminated by removing the finite unobservable eigenvalues.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A and B, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C and D, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

For the assessment of zeros, the system pencil [A-λE B; C D] is reduced to a special Kronecker-like form (see [2]). In this reduction, the performed rank decisions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: For a continuous-time system, the factorization algorithm of [1] is used, while for a discrete-time system, the factorization algorithm of [1] is used.

References:

[1] C. Oara and A. Varga. Computation of the general inner-outer and spectral factorizations. IEEE Trans. Autom. Control, vol. 45, pp. 2307-2325, 2000.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

source
DescriptorSystems.goifacFunction
goifac(sys; atol = 0, atol1 = atol, atol2 = atol, atol3 = atol, rtol, 
+       fast = true, minphase = true, offset = sqrt(ϵ)) -> (sysi, syso, info)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the square inner factor sysi = (Ai-λEi,Bi,Ci,Di) with the transfer function matrix Gi(λ) and the minimum-phase quasi-outer factor or the full column rank factor syso = (Ao-λEo,Bo,Co,Do) with the transfer function matrix Go(λ) such that

 G(λ) = Go(λ)*Gi[1:r,:](λ)    (*),

where r is the normal rank of G(λ). The resulting proper and stable inner factor satisfies Gi'(λ)*Gi(λ) = I. If sys is stable (proper), then the resulting syso is stable (proper). The resulting factor Go(λ) has full column rank r. Depending on the selected factorization option, if minphase = true, then Go(λ) is minimum phase, excepting possibly zeros on the boundary of the appropriate stability domain Cs, or if minphase = false, then Go(λ) contains all zeros of G(λ), in which case (*) is the extended RQ-like factorization of G(λ). For a continuous-time system sys, the stability domain Cs is defined as the set of complex numbers with real parts at most , while for a discrete-time system sys, Cs is the set of complex numbers with moduli at most 1-β (i.e., the interior of a disc of radius 1-β centered in the origin). The boundary offset β to be used to assess the stability of zeros and their number on the boundary of Cs can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The resulting named triple info contains (nrank, nfuz, niuz), where info.nrank = r, the normal rank of G(λ), info.nfuz is the number of finite zeros of syso on the boundary of Cs, and info.niuz is the number of infinite zeros of syso. info.nfuz is set to missing if minphase = false.

Note: syso may generally contain a free inner factor, which can be eliminated by removing the finite unobservable eigenvalues.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A and C, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of B and D, and the relative tolerance for the nonzero elements of A, E, B, C and D. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

For the assessment of zeros, the dual system pencil transpose([A-λE B; C D]) is reduced to a special Kronecker-like form (see [2]). In this reduction, the performed rank decisions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: For a continuous-time system, the dual system is formed and the factorization algorithm of [1] is used, while for a discrete-time system, the factorization algorithm of [1] is used.

References:

[1] C. Oara and A. Varga. Computation of the general inner-outer and spectral factorizations. IEEE Trans. Autom. Control, vol. 45, pp. 2307–2325, 2000.

[2] C. Oara. Constructive solutions to spectral and inner–outer factorizations respect to the disk. Automatica, 41, pp. 1855–1866, 2005.

source
DescriptorSystems.grsfgFunction
 sysf = grsfg(sys, γ; fast = true, stabilize = true, offset = β, 
+              atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) and ${\small γ > \|G(λ)\|_∞}$, the minimum-phase right spectral factor sysf = (Af-λEf,Bf,Cf,Df) with the transfer-function matrix F(λ), such that F(λ)'*F(λ) = γ^2*I-G(λ)'*G(λ). If stabilize = true (the default), a preliminary stabilization of sys is performed. In this case, sys must not have poles on the imaginary-axis in the continuous-time case or on the unit circle in the discrete-time case. If stabilize = false, then no preliminary stabilization is performed. In this case, sys must be stable.

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, then the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If stabilize = true, a preliminary separation of finite and infinite eigenvalues of A-λEis performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C, and the relative tolerance for the nonzero elements of A, E and C. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

Method: Extensions of the factorization approaches of [1] are used.

References:

[1] K. Zhou, J. C. Doyle, and K. Glover. Robust and Optimal Control. Prentice Hall, 1996.

source
DescriptorSystems.glsfgFunction
 sysf = glsfg(sys, γ; fast = true, stabilize = true, offset = β, 
+              atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) and ${\small γ > \|G(λ)\|_∞}$, the minimum-phase right spectral factor sysf = (Af-λEf,Bf,Cf,Df) with the transfer-function matrix F(λ), such that F(λ)*F(λ)' = γ^2*I-G(λ)*G(λ)'. If stabilize = true (the default), a preliminary stabilization of sys is performed. In this case, sys must not have poles on the imaginary-axis in the continuous-time case or on the unit circle in the discrete-time case. If stabilize = false, then no preliminary stabilization is performed. In this case, sys must be stable.

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time system, then the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

If stabilize = true, a preliminary separation of finite and infinite eigenvalues of A-λEis performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

The keyword arguments atol1, atol2, atol3, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, the absolute tolerance for the nonzero elements of C, and the relative tolerance for the nonzero elements of A, E and C. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol, atol2 = atol, atol3 = atol.

Method: Extensions of the factorization approaches of [1] are used.

References:

[1] K. Zhou, J. C. Doyle, and K. Glover. Robust and Optimal Control. Prentice Hall, 1996.

source
diff --git a/dev/index.html b/dev/index.html index 47a1b7f..2ab444c 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,4 +1,4 @@ Home · DescriptorSystems.jl

DescriptorSystems.jl

DocBuild Code on Github.

A descriptor system is a generalized state-space representation of the form

Eλx(t) = Ax(t) + Bu(t),
 y(t)   = Cx(t) + Du(t),

where x(t) is the state vector, u(t) is the input vector, and y(t) is the output vector, and where λ is either the differential operator λx(t) = dx(t)/dt for a continuous-time system or the advance operator λx(t) = x(t + ΔT) for a discrete-time system with the sampling time ΔT. In all what follows, we assume E is square and possibly singular, and the pencil A − λE is regular (i.e., det(A − λE) ̸≡ 0). If E = I, we call the above representation a standard state-space system.

The corresponding input-output representation is

Y(λ) = G(λ)U(λ),

where, depending on the system type, λ = s, the complex variable in the Laplace transform for a continuous-time system, or λ = z, the complex variable in the Z-transform for a discrete-time system, Y(λ) and U(λ) are the Laplace- or Z-transformed output and input vectors, respectively, and G(λ) is the rational transfer function matrix (TFM) of the system, defined as

                -1
-G(λ) = C(λE − A)  B + D.

It is well known that the descriptor system representation is the most general description for a linear time-invariant system. Continuous-time descriptor systems arise frequently from modelling interconnected systems containing algebraic loops or constrained mechanical systems which describe contact phenomena. Discrete-time descriptor representations are frequently used to model economic processes. A main apeal of descriptor system models is that the manipulation of rational and polynomial matrices can be easily performed via their descriptor system representations, since each rational or polynomial matrix can be interpreted as the TFM of a descriptor system. For an introductory presentation of the main concepts, see [1].

The theoretical background for the analysis of descriptor systems closely relies on investigating the properties of certain linear matrix pencils, as the regular pole pencil P(λ) = A-λE, or the generally singular system matrix pencil S(λ) = [A-λE B; C D]. Therefore, the main analysis tools of descriptor systems are pencil manipulation techniques (e.g., reductions to various Kronecker-like forms), as available in the MatrixPencils package [2]. Among the main applications of pencil manipulation algorithms, we mention the computation of minimal nullspace bases, the computation of poles and zeros, the determination of the normal rank of polynomial and rational matrices, computation of various factorizations of rational matrices, as well as the solution of linear equations with polynomial or rational matrices. Important additional computational ingredients in these applications are tools for solving matrix equations, as various Lyapunov, Sylvester and Riccati equations. These tools are provided by the MatrixEquations package [3].

The available functions in the DescriptorSystems.jl package cover both standard and descriptor systems with real or complex coefficient matrices. The current version of the package includes the following functions:

Building descriptor system state-space models

  • dss Construction of descriptor state-space models.
  • dssdata Extraction of matrix-data from a descriptor state-space model.

Building rational transfer functions

Interconnecting descriptor system models

  • append Building aggregate models by appending the inputs and outputs.
  • parallel Connecting models in parallel (also overloaded with +).
  • series Connecting models in series (also overloaded with *).
  • horzcat Horizontal concatenation of descriptor system models (also overloaded with [ * * ]).
  • vertcat Vertical concatenation of descriptor system models (also overloaded with [ *; * ]).

Basic operations on descriptor system models

  • inv Inversion of a system.
  • ldiv Left division for two systems (also overloaded with \).
  • rdiv Right division for two systems (also overloaded with /).
  • gdual Building the dual of a descriptor system (also overloaded with transpose)
  • ctranspose Building the conjugate transpose of a system (also overloaded with adjoint and ').
  • adjoint Building the adjoint of a system.

Basic conversions on descriptor system models

  • gprescale Balancing of a descriptor system.
  • c2d Discretization of continuous-time descriptor systems.
  • dss2rm Rational transfer function matrix of a descriptor system.
  • dss2pm Polynomial transfer function matrix of a descriptor system.
  • gbilin Generalized bilinear transformation of a descriptor system.

Some operations on rational transfer functions and matrices

  • simplify Pole-zero cancellation.
  • normalize Normalization of a rational transfer function to monic denominator.
  • confmap Applying a conformal mapping transformation to a rational transfer function or rational transfer function matrix.
  • zpk Computation of zeros, poles and gain of a rational transfer function.
  • rtfbilin Generation of common bilinear transformations and their inverses.

Simplification of descriptor system models

  • gminreal Minimal realization of descriptor systems.
  • gir Irreducible realization of descriptor systems.
  • gbalmr Reduced-order approximations of descriptor systems using balancing related methods.
  • gss2ss Conversion to SVD-like forms without non-dynamic modes.
  • dss2ss Conversion of descriptor systems to standard form.

Descriptor system analysis

  • isregular Test whether a descriptor system has a regular pole pencil.
  • gpole Poles of a descriptor system.
  • gpoleinfo Poles and pole structure information of a descriptor system.
  • isproper Test whether a descriptor system is proper.
  • isstable Test whether a descriptor system is stable.
  • gzero Zeros of a descriptor system.
  • gzeroinfo Zeros and zero structure information of a descriptor system.
  • gnrank Normal rank of the transfer function matrix of a descriptor system.
  • ghanorm Hankel norm of a proper and stable descriptor system.
  • gl2norm L2 norm of a descriptor system.
  • gh2norm H2 norm of a descriptor system.
  • glinfnorm L∞ norm of a descriptor system.
  • ghinfnorm H∞ norm of a descriptor system.
  • gnugap ν-gap distance between two descriptor systems.
  • freqresp Frequency response of a descriptor system.
  • timeresp Time response of a descriptor system.
  • stepresp Step response of a descriptor system.
  • gbalqual Evaluation of the scaling quality of the matrices of a descriptor system.
  • pbalqual Evaluation of the scaling quality of the matrices of a linear pencil.

Factorization of descriptor systems

  • grcf Right coprime factorization with proper and stable factors.
  • glcf Left coprime factorization with proper and stable factors.
  • grcfid Right coprime factorization with inner denominator.
  • glcfid Left coprime factorization with inner denominator.
  • gnrcf Normalized right coprime factorization.
  • gnlcf Normalized left coprime factorization.
  • giofac Inner-outer/QR-like factorization.
  • goifac Co-outer-co-inner/RQ-like factorization.
  • grsfg Right spectral factorization of γ^2*I-G'*G.
  • glsfg Left spectral factorization of γ^2*I-G*G'.

Advanced operations on transfer function matrices

  • gsdec Additive spectral decompositions.
  • grnull Right nullspace basis of a transfer function matrix.
  • glnull Left nullspace basis of a transfer function matrix.
  • grange Range space basis of a transfer function matrix.
  • gcrange Coimage space basis of a transfer function matrix.
  • grsol Solution of the linear rational matrix equation G(λ)*X(λ) = F(λ).
  • glsol Solution of the linear rational matrix equation X(λ)*G(λ) = F(λ).
  • grmcover1 Right minimum dynamic cover of Type 1 based order reduction.
  • glmcover1 Left minimum dynamic cover of Type 1 based order reduction.
  • grmcover2 Right minimum dynamic cover of Type 2 based order reduction.
  • glmcover2 Left minimum dynamic cover of Type 2 based order reduction.
  • ginv Generalized inverses.

Solution of model-matching problems

  • gnehari Generalized Nehari approximation.
  • glinfldp Solution of the least distance problem.
  • grasol Approximate solution of the linear rational matrix equation G(λ)*X(λ) = F(λ).
  • glasol Approximate solution of the linear rational matrix equation X(λ)*G(λ) = F(λ).

Release Notes

Main developer

Andreas Varga

License: MIT (expat)

References

[1] A. Varga, Solving Fault Diagnosis Problems – Linear Synthesis Techniques, Vol. 84 of Studies in Systems, Decision and Control, Springer International Publishing, 2017.

[2] A. Varga, MatrixPencils.jl: Matrix pencil manipulation using Julia. Zenodo: https://doi.org/10.5281/zenodo.3894503.

[3] A. Varga, MatrixEquations.jl: Solution of Lyapunov, Sylvester and Riccati matrix equations using Julia. Zenodo: https://doi.org/10.5281/zenodo.3556867.

+G(λ) = C(λE − A) B + D.

It is well known that the descriptor system representation is the most general description for a linear time-invariant system. Continuous-time descriptor systems arise frequently from modelling interconnected systems containing algebraic loops or constrained mechanical systems which describe contact phenomena. Discrete-time descriptor representations are frequently used to model economic processes. A main apeal of descriptor system models is that the manipulation of rational and polynomial matrices can be easily performed via their descriptor system representations, since each rational or polynomial matrix can be interpreted as the TFM of a descriptor system. For an introductory presentation of the main concepts, see [1].

The theoretical background for the analysis of descriptor systems closely relies on investigating the properties of certain linear matrix pencils, as the regular pole pencil P(λ) = A-λE, or the generally singular system matrix pencil S(λ) = [A-λE B; C D]. Therefore, the main analysis tools of descriptor systems are pencil manipulation techniques (e.g., reductions to various Kronecker-like forms), as available in the MatrixPencils package [2]. Among the main applications of pencil manipulation algorithms, we mention the computation of minimal nullspace bases, the computation of poles and zeros, the determination of the normal rank of polynomial and rational matrices, computation of various factorizations of rational matrices, as well as the solution of linear equations with polynomial or rational matrices. Important additional computational ingredients in these applications are tools for solving matrix equations, as various Lyapunov, Sylvester and Riccati equations. These tools are provided by the MatrixEquations package [3].

The available functions in the DescriptorSystems.jl package cover both standard and descriptor systems with real or complex coefficient matrices. The current version of the package includes the following functions:

Building descriptor system state-space models

Building rational transfer functions

Interconnecting descriptor system models

Basic operations on descriptor system models

Basic conversions on descriptor system models

Some operations on rational transfer functions and matrices

Simplification of descriptor system models

Descriptor system analysis

Factorization of descriptor systems

Advanced operations on transfer function matrices

Solution of model-matching problems

Release Notes

Main developer

Andreas Varga

License: MIT (expat)

References

[1] A. Varga, Solving Fault Diagnosis Problems – Linear Synthesis Techniques, Vol. 84 of Studies in Systems, Decision and Control, Springer International Publishing, 2017.

[2] A. Varga, MatrixPencils.jl: Matrix pencil manipulation using Julia. Zenodo: https://doi.org/10.5281/zenodo.3894503.

[3] A. Varga, MatrixEquations.jl: Solution of Lyapunov, Sylvester and Riccati matrix equations using Julia. Zenodo: https://doi.org/10.5281/zenodo.3556867.

diff --git a/dev/makeindex.html b/dev/makeindex.html index 4fdde45..8992fe2 100644 --- a/dev/makeindex.html +++ b/dev/makeindex.html @@ -1,2 +1,2 @@ -Index · DescriptorSystems.jl

Index

+Index · DescriptorSystems.jl

Index

diff --git a/dev/model_matching.html b/dev/model_matching.html index 7914f38..7a771ae 100644 --- a/dev/model_matching.html +++ b/dev/model_matching.html @@ -1,9 +1,9 @@ Solution of model-matching problems · DescriptorSystems.jl

Solution of model-matching problems

  • gnehari Generalized Nehari approximation.
  • glinfldp Solution of the least distance problem.
  • grasol Approximate solution of the linear rational matrix equation G(λ)*X(λ) = F(λ).
  • glasol Approximate solution of the linear rational matrix equation X(λ)*G(λ) = F(λ).
DescriptorSystems.gnehariFunction
gnehari(sys[, γ]; fast = true, offset = β, 
-                atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, σ1)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) the optimal or suboptimal Nehari approximation sysx = (Ax-λEx,Bx,Cx,Dx) with the transfer function matrix X(λ). The optimal Nehari approximation X(λ) satisfies

\[ \| G(\lambda) - X(\lambda) \|_\infty = \| G^{*}_u(\lambda) \|_H := \sigma_1,\]

where ${\small G_u(\lambda)}$ is the proper antistable part of G(λ). The resulting $σ_1$ is the Hankel-norm of ${\small G^{*}_u(\lambda)}$ (also the L∞-norm of the optimal approximation error). For a given $γ > σ_1$, the suboptimal approximation satisfies

\[ \| G(\lambda) - X(\lambda) \|_\infty \leq \gamma .\]

The Nehari approximation is stable if G(λ) has no poles on the boundary of the stability domain Cs. In the continuous-time, Cs is the set of complex numbers with negative real parts and its boundary is the extended imaginary axis (containig also the poit at infinity), while, in the discrete-time case, Cs is the set complex number with moduli less than one and its boundary is the unit circle centered in the origin.

To assess the presence of poles in Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the stable poles in Cs have real parts less than or equal to β, while for a discrete-time system, they have moduli less than or equal to 1+β. The default value used forβissqrt(ϵ), whereϵis the working machine precision. For a negative values ofβ(e.g.,β = -sqrt(ϵ)), an extended stability domain corresponding to the closure ofCsis used instead ofCs`.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The separation of the finite and infinite eigenvalues is performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: Let G(λ) = Gs(λ) + Gu(λ) be an additive decomposition of G(λ) such that Gs(λ) has only poles in the closure of Cs (or its closure if β < 0) and Gu(λ) is the antistable part having only unstable poles. The Hankel-norm approximation methods of [1] and [2], with extensions for descriptor systems, are used to compute a stable Nehari approximation Gn(λ) of the unstable part Gu(λ) and the resulting solution is computed as X(λ) = Gs(λ) + Gn(λ).

References:

[1] K. Glover. All optimal Hankel-norm approximations of linear multivariable systems and their L∞ error bounds, Int. J. Control, vol. 39, pp. 1115-1193, 1984.

[2] M. G. Safonov, R. Y. Chiang, and D. J. N. Limebeer. Optimal Hankel model reduction for nonminimal systems. IEEE Trans. Automat. Control, vol. 35, pp. 496–502, 1990.

source
DescriptorSystems.glinfldpFunction
glinfldp(sys1, sys2, [, γ]; nehari = false, reltol = 0.0001, fast = true, offset = β, 
+                atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, σ1)

Compute for the descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ) the optimal or suboptimal Nehari approximation sysx = (Ax-λEx,Bx,Cx,Dx) with the transfer function matrix X(λ). The optimal Nehari approximation X(λ) satisfies

\[ \| G(\lambda) - X(\lambda) \|_\infty = \| G^{*}_u(\lambda) \|_H := \sigma_1,\]

where ${\small G_u(\lambda)}$ is the proper antistable part of G(λ). The resulting $σ_1$ is the Hankel-norm of ${\small G^{*}_u(\lambda)}$ (also the L∞-norm of the optimal approximation error). For a given $γ > σ_1$, the suboptimal approximation satisfies

\[ \| G(\lambda) - X(\lambda) \|_\infty \leq \gamma .\]

The Nehari approximation is stable if G(λ) has no poles on the boundary of the stability domain Cs. In the continuous-time, Cs is the set of complex numbers with negative real parts and its boundary is the extended imaginary axis (containig also the poit at infinity), while, in the discrete-time case, Cs is the set complex number with moduli less than one and its boundary is the unit circle centered in the origin.

To assess the presence of poles in Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time system, the stable poles in Cs have real parts less than or equal to β, while for a discrete-time system, they have moduli less than or equal to 1+β. The default value used forβissqrt(ϵ), whereϵis the working machine precision. For a negative values ofβ(e.g.,β = -sqrt(ϵ)), an extended stability domain corresponding to the closure ofCsis used instead ofCs`.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The separation of the finite and infinite eigenvalues is performed using rank decisions based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: Let G(λ) = Gs(λ) + Gu(λ) be an additive decomposition of G(λ) such that Gs(λ) has only poles in the closure of Cs (or its closure if β < 0) and Gu(λ) is the antistable part having only unstable poles. The Hankel-norm approximation methods of [1] and [2], with extensions for descriptor systems, are used to compute a stable Nehari approximation Gn(λ) of the unstable part Gu(λ) and the resulting solution is computed as X(λ) = Gs(λ) + Gn(λ).

References:

[1] K. Glover. All optimal Hankel-norm approximations of linear multivariable systems and their L∞ error bounds, Int. J. Control, vol. 39, pp. 1115-1193, 1984.

[2] M. G. Safonov, R. Y. Chiang, and D. J. N. Limebeer. Optimal Hankel model reduction for nonminimal systems. IEEE Trans. Automat. Control, vol. 35, pp. 496–502, 1990.

source
DescriptorSystems.glinfldpFunction
glinfldp(sys1, sys2, [, γ]; nehari = false, reltol = 0.0001, fast = true, offset = β, 
          atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, mindist)

Determine for the descriptor systems sys1 = (A1-λE1,B1,C1,D1) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrices $G_1(λ)$ and $G_2(λ)$, respectively, the descriptor system sysx with the transfer function matrix $X(λ)$ such that $X(λ)$ is the solution of the 2-block L∞ least distance problem (LDP)

\[ \text{mindist} := \min \|G_1(λ)-X(λ) \mid G_2(λ) \|_\infty \]

mindist is the achieved minimum distance corresponding to the optimal solution. If sys2 = [], an 1-block LDP is solved. sys1 and sys2 must not have poles on the boundary of the stability domain Cs. It is assumed that sys2 has no poles on the boundary of the stability domain (see below). The resulting solution is stable, provided sys1 has no poles on the boundary of the stability domain as well.

If ${\small γ > \|G_2(λ)\|_\infty}$ is a desired sub-optimality degree, then the γ-suboptimal LDP

\[ \text{mindist} := \|G_1(λ)-X(λ) \mid G_2(λ) \|_\infty < γ\]

is solved and mindist is the achieved suboptimal distance.

The call with

glinfldp(sys[, m2[, γ]]; nehari = false, fast = true, offset = β, 
-         atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, mindist)

uses the compound descriptor system sys = (A-λE,[B1 B2],C,[D1 D2]), where B2 has m2 columns, to define the descriptor systems sys1 = (A-λE,B1,C,D1) and sys2 = (A-λE,B2,C,D2) (i.e., A1-λE1 = A2-λE2 = A-λE and C1 = C2 = C). If m2 = 0, an 1-block LDP is solved. sys2 must not have poles on the boundary of the stability domain Cs.

If nehari = true, the optimal or suboptimal Nehari approximation is used to solve the LDP. If nehari = false (default), the optimal solution is computed using the γ-iteration [1].

The keyword argument reltol specifies the relative tolerance for the desired accuracy of γ-iteration. The iterations are performed until the current estimations of maximum $γ_u$ and minimum $γ_l$ of the optimal distance $γ_o$, $γ_l \leq γ_o \leq γ_u$, satisfies

\[ γ_u-γ_l \leq \text{reltol} * \text{gap} ,\]

where gap is the original gap (internally determined).

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time setting, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discete-time setting, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank decisions in the underlying pencil manipulation algorithms are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The approach of [1] is used for the solution of the 2-block least distance problem. Necessary conditions for solvability of the LDP with a stable solution is that sys1 and sys2 have no poles on the boundary of the stability domain Cs.

References: [1] C.-C. Chu, J. C. Doyle, and E. B. Lee The general distance problem in H∞ optimal control theory, Int. J. Control, vol 44, pp. 565-596, 1986.

source
DescriptorSystems.grasolFunction
grasol(sysg, sysf[, γ]; L2sol = false, nehari = false, reltol = 0.0001, mindeg = false, poles, sdeg, 
+         atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, mindist)

uses the compound descriptor system sys = (A-λE,[B1 B2],C,[D1 D2]), where B2 has m2 columns, to define the descriptor systems sys1 = (A-λE,B1,C,D1) and sys2 = (A-λE,B2,C,D2) (i.e., A1-λE1 = A2-λE2 = A-λE and C1 = C2 = C). If m2 = 0, an 1-block LDP is solved. sys2 must not have poles on the boundary of the stability domain Cs.

If nehari = true, the optimal or suboptimal Nehari approximation is used to solve the LDP. If nehari = false (default), the optimal solution is computed using the γ-iteration [1].

The keyword argument reltol specifies the relative tolerance for the desired accuracy of γ-iteration. The iterations are performed until the current estimations of maximum $γ_u$ and minimum $γ_l$ of the optimal distance $γ_o$, $γ_l \leq γ_o \leq γ_u$, satisfies

\[ γ_u-γ_l \leq \text{reltol} * \text{gap} ,\]

where gap is the original gap (internally determined).

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time setting, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discete-time setting, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank decisions in the underlying pencil manipulation algorithms are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: The approach of [1] is used for the solution of the 2-block least distance problem. Necessary conditions for solvability of the LDP with a stable solution is that sys1 and sys2 have no poles on the boundary of the stability domain Cs.

References: [1] C.-C. Chu, J. C. Doyle, and E. B. Lee The general distance problem in H∞ optimal control theory, Int. J. Control, vol 44, pp. 565-596, 1986.

source
DescriptorSystems.grasolFunction
grasol(sysg, sysf[, γ]; L2sol = false, nehari = false, reltol = 0.0001, mindeg = false, poles, sdeg, 
        fast = true, offset = β, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, info)

Determine for the descriptor systems sysg = (Ag-λEg,Bg,Cg,Dg) and sysf = (Af-λEf,Bf,Cf,Df) with the transfer function matrices G(λ) and F(λ), respectively, the descriptor system sysx with the transfer function matrix X(λ) such that X(λ) is the approximate solution of the linear rational equation G(λ)X(λ) = F(λ), which achieves the minimum error norm ${\small \text{mindist} := \min \|G(λ)X(λ) - F(λ)\|}$. The resulting X(λ) has all poles stable or lying on the boundary of the stability domain Cs. If L2sol = false (default) then the L∞-norm optimal solution is computed, while if L2sol = true the L2-norm optimal solution is computed. sysg and sysf must not have poles on the boundary of the stability domain Cs.

If γ > 0 is a desired sub-optimality degree, then the γ-suboptimal model-matching problem

\[ \text{mindist} := \|G(λ)X(λ) - F(λ) \| < γ\]

is solved and mindist is the achieved suboptimal distance.

The call with

grasol(sysgf[, mf[, γ]]; L2sol = false, nehari = false, reltol = 0.0001, mindeg = false, poles, sdeg, 
-       fast = true, offset = β, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, info)

uses the compound descriptor system sysgf = (A-λE,[Bg Bf],C,[Dg Df]), where Bf and Df have mf columns, to define the descriptor systems sysg = (A-λE,Bg,C,Dg) and sysf = (A-λE,Bf,C,Df) (i.e., Ag-λEg = Af-λEf = A-λE and Cg = Cf = C). sysgf must not have poles on the boundary of the stability domain Cs.

If nehari = true, the optimal or suboptimal Nehari approximation is used to compute a L∞-suboptimal solution of the underlying least-distance problem (LDP). If nehari = false (default), the L∞-optimal solution is computed using the γ-iteration in the underlying LDP [2].

If mindeg = true, a minimum order solution is determined (if possible), while if mindeg = false (default) a particular solution of non-minimal order is determined.

The resulting named tuple info contains additional information: info.nrank is the normal rank of G(λ), info.nr is the number of freely assignable poles of the solution X(λ), info.mindist is the achieved approximation error norm and info.nonstandard is true for a non-standard problem, with G(λ) having zeros on the boundary of the stability domain, and false for a standard problem, when G(λ) has no zeros on the boundary of the stability domain.

The keyword argument reltol specifies the relative tolerance for the desired accuracy of the γ-iteration employed to solve the underlying least-distance problem. The iterations are performed until the current estimations of maximum $γ_u$ and minimum $γ_l$ of the optimal distance satisfies ${\small γ_u-γ_l \leq \text{reltol} * \text{gap}}$, where gap is the initial estimation of the error gap.

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time setting, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time setting, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The vector poles specified as a keyword argument, can be used to specify the desired poles of sysx alternatively to or jointly with enforcing a desired stability degree sdeg of poles.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of Ag, Af, A, Bg, Bf, Cg, Cf, Dg, Df, the absolute tolerance for the nonzero elements of Eg, Ef, and the relative tolerance for the nonzero elements of all above matrices. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sysg. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank decisions in the underlying pencil manipulation algorithms are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: An extension of the approach of [1] to descriptor systems is used.

References:

[1] B. A. Francis. A Course in H-infinity Theory, Vol. 88 of Lecture Notes in Control and Information Sciences, Springer-Verlag, New York, 1987.

[2] C.-C. Chu, J. C. Doyle, and E. B. Lee. The general distance problem in H∞ optimal control theory, Int. J. Control, vol 44, pp. 565-596, 1986.

source
DescriptorSystems.glasolFunction
glasol(sysg, sysf[, γ]; L2sol = false, nehari = false, reltol = 0.0001, mindeg = false, poles, sdeg, 
+       fast = true, offset = β, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, info)

uses the compound descriptor system sysgf = (A-λE,[Bg Bf],C,[Dg Df]), where Bf and Df have mf columns, to define the descriptor systems sysg = (A-λE,Bg,C,Dg) and sysf = (A-λE,Bf,C,Df) (i.e., Ag-λEg = Af-λEf = A-λE and Cg = Cf = C). sysgf must not have poles on the boundary of the stability domain Cs.

If nehari = true, the optimal or suboptimal Nehari approximation is used to compute a L∞-suboptimal solution of the underlying least-distance problem (LDP). If nehari = false (default), the L∞-optimal solution is computed using the γ-iteration in the underlying LDP [2].

If mindeg = true, a minimum order solution is determined (if possible), while if mindeg = false (default) a particular solution of non-minimal order is determined.

The resulting named tuple info contains additional information: info.nrank is the normal rank of G(λ), info.nr is the number of freely assignable poles of the solution X(λ), info.mindist is the achieved approximation error norm and info.nonstandard is true for a non-standard problem, with G(λ) having zeros on the boundary of the stability domain, and false for a standard problem, when G(λ) has no zeros on the boundary of the stability domain.

The keyword argument reltol specifies the relative tolerance for the desired accuracy of the γ-iteration employed to solve the underlying least-distance problem. The iterations are performed until the current estimations of maximum $γ_u$ and minimum $γ_l$ of the optimal distance satisfies ${\small γ_u-γ_l \leq \text{reltol} * \text{gap}}$, where gap is the initial estimation of the error gap.

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time setting, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time setting, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The vector poles specified as a keyword argument, can be used to specify the desired poles of sysx alternatively to or jointly with enforcing a desired stability degree sdeg of poles.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of Ag, Af, A, Bg, Bf, Cg, Cf, Dg, Df, the absolute tolerance for the nonzero elements of Eg, Ef, and the relative tolerance for the nonzero elements of all above matrices. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sysg. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank decisions in the underlying pencil manipulation algorithms are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: An extension of the approach of [1] to descriptor systems is used.

References:

[1] B. A. Francis. A Course in H-infinity Theory, Vol. 88 of Lecture Notes in Control and Information Sciences, Springer-Verlag, New York, 1987.

[2] C.-C. Chu, J. C. Doyle, and E. B. Lee. The general distance problem in H∞ optimal control theory, Int. J. Control, vol 44, pp. 565-596, 1986.

source
DescriptorSystems.glasolFunction
glasol(sysg, sysf[, γ]; L2sol = false, nehari = false, reltol = 0.0001, mindeg = false, poles, sdeg, 
        fast = true, offset = β, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, info)

Determine for the descriptor systems sysg = (Ag-λEg,Bg,Cg,Dg) and sysf = (Af-λEf,Bf,Cf,Df) with the transfer function matrices G(λ) and F(λ), respectively, the descriptor system sysx with the transfer function matrix X(λ) such that X(λ) is the approximate solution of the linear rational equation X(λ)G(λ) = F(λ), which achieves the minimum error norm ${\small \text{mindist} := \min \|X(λ)G(λ) - F(λ)\|}$. The resulting X(λ) has all poles stable or lying on the boundary of the stability domain Cs. If L2sol = false (default) then the L∞-norm optimal solution is computed, while if L2sol = true the L2-norm optimal solution is computed. sysg and sysf must not have poles on the boundary of the stability domain Cs.

If γ > 0 is a desired sub-optimality degree, then the γ-suboptimal model-matching problem

\[ \text{mindist} := \|X(λ)G(λ) - F(λ) \| < γ\]

is solved and mindist is the achieved suboptimal distance.

The call with

glasol(sysgf[, pf[, γ]]; L2sol = false, nehari = false, reltol = 0.0001, mindeg = false, poles, sdeg, 
-       fast = true, offset = β, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, info)

uses the compound descriptor system sysgf = (A-λE,B,[Cg; Cf],[Dg; Df]), where Cf and Df have pf rows, to define the descriptor systems sysg = (A-λE,B,Cg,Dg) and sysf = (A-λE,B,Cf,Df) (i.e., Ag-λEg = Af-λEf = A-λE and Bg = Bf = B). sysgf must not have poles on the boundary of the stability domain Cs.

If nehari = true, the optimal or suboptimal Nehari approximation is used to solve the underlying least-distance problem (LDP). If nehari = false (default), the optimal solution is computed using the γ-iteration in the underlying LDP [2].

If mindeg = true, a minimum order solution is determined (if possible), while if mindeg = false (default) a particular solution of non-minimal order is determined.

The resulting named tuple info contains additional information: info.nrank is the normal rank of G(λ), info.nl is the number of freely assignable poles of the solution X(λ), info.mindist is the achieved approximation error norm and info.nonstandard is true for a non-standard problem, with G(λ) having zeros on the boundary of the stability domain, and false for a standard problem, when G(λ) has no zeros on the boundary of the stability domain.

The keyword argument reltol specifies the relative tolerance for the desired accuracy of the γ-iteration employed to solve the underlying least-distance problem. The iterations are performed until the current estimations of maximum $γ_u$ and minimum $γ_l$ of the optimal distance satisfies ${\small γ_u-γ_l < \text{reltol}* \text{gap}}$, where gap is the initial estimation of the error gap.

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time setting, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time setting, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The vector poles specified as a keyword argument, can be used to specify the desired poles of sysx alternatively to or jointly with enforcing a desired stability degree sdeg of poles.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of Ag, Af, A, Bg, Bf, Cg, Cf, Dg, Df, the absolute tolerance for the nonzero elements of Eg, Ef, and the relative tolerance for the nonzero elements of all above matrices. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sysg. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank decisions in the underlying pencil manipulation algorithms are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: An extension of the approach of [1] to descriptor systems is used.

References:

[1] B. A. Francis. A Course in H-infinity Theory, Vol. 88 of Lecture Notes in Control and Information Sciences, Springer-Verlag, New York, 1987.

[2] C.-C. Chu, J. C. Doyle, and E. B. Lee. The general distance problem in H∞ optimal control theory, Int. J. Control, vol 44, pp. 565-596, 1986.

source
+ fast = true, offset = β, atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ) -> (sysx, info)

uses the compound descriptor system sysgf = (A-λE,B,[Cg; Cf],[Dg; Df]), where Cf and Df have pf rows, to define the descriptor systems sysg = (A-λE,B,Cg,Dg) and sysf = (A-λE,B,Cf,Df) (i.e., Ag-λEg = Af-λEf = A-λE and Bg = Bf = B). sysgf must not have poles on the boundary of the stability domain Cs.

If nehari = true, the optimal or suboptimal Nehari approximation is used to solve the underlying least-distance problem (LDP). If nehari = false (default), the optimal solution is computed using the γ-iteration in the underlying LDP [2].

If mindeg = true, a minimum order solution is determined (if possible), while if mindeg = false (default) a particular solution of non-minimal order is determined.

The resulting named tuple info contains additional information: info.nrank is the normal rank of G(λ), info.nl is the number of freely assignable poles of the solution X(λ), info.mindist is the achieved approximation error norm and info.nonstandard is true for a non-standard problem, with G(λ) having zeros on the boundary of the stability domain, and false for a standard problem, when G(λ) has no zeros on the boundary of the stability domain.

The keyword argument reltol specifies the relative tolerance for the desired accuracy of the γ-iteration employed to solve the underlying least-distance problem. The iterations are performed until the current estimations of maximum $γ_u$ and minimum $γ_l$ of the optimal distance satisfies ${\small γ_u-γ_l < \text{reltol}* \text{gap}}$, where gap is the initial estimation of the error gap.

To assess the presence of poles on the boundary of the stability domain Cs, a boundary offset β can be specified via the keyword parameter offset = β. Accordingly, for a continuous-time setting, the boundary of Cs contains the complex numbers with real parts within the interval [-β,β], while for a discrete-time setting, the boundary of Cs contains the complex numbers with moduli within the interval [1-β,1+β]. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The vector poles specified as a keyword argument, can be used to specify the desired poles of sysx alternatively to or jointly with enforcing a desired stability degree sdeg of poles.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of Ag, Af, A, Bg, Bf, Cg, Cf, Dg, Df, the absolute tolerance for the nonzero elements of Eg, Ef, and the relative tolerance for the nonzero elements of all above matrices. The default relative tolerance is n*ϵ, where ϵ is the working machine epsilon and n is the order of the system sysg. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

The rank decisions in the underlying pencil manipulation algorithms are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: An extension of the approach of [1] to descriptor systems is used.

References:

[1] B. A. Francis. A Course in H-infinity Theory, Vol. 88 of Lecture Notes in Control and Information Sciences, Springer-Verlag, New York, 1987.

[2] C.-C. Chu, J. C. Doyle, and E. B. Lee. The general distance problem in H∞ optimal control theory, Int. J. Control, vol 44, pp. 565-596, 1986.

source diff --git a/dev/operations.html b/dev/operations.html index 60f1ccb..fdd7aee 100644 --- a/dev/operations.html +++ b/dev/operations.html @@ -1,9 +1,9 @@ -Basic operations on system models · DescriptorSystems.jl

Basic operations on system models

  • inv Inversion of a system.
  • ldiv Left division for two systems (also overloaded with \).
  • rdiv Right division for two systems (also overloaded with /).
  • gdual Building the dual of a descriptor system (also overloaded with transpose)
  • ctranspose Building the conjugate transpose of a system (also overloaded with adjoint and ').
  • adjoint Building the adjoint of a system.
Base.invFunction
sysinv = inv(sys; atol = 0, atol1 = atol, atol2 = atol, rtol, checkinv = true)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), a descriptor realization of its inverse system sysinv = (Ai-λEi,Bi,Ci,Di), such that the transfer function matrix Ginv(λ) of sysinv is the inverse of G(λ) (i.e., G(λ)*Ginv(λ) = I). The realization of sysinv is determined using inversion-free formulas and the invertibility condition is checked, unless checkinv = false.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.ldivFunction
sysldiv = ldiv(sys1, sys2; atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ, checkinv = true)
-sysldiv = sys1 \ sys2

Compute for the descriptor systems sys1 = (A1-λE1,B1,C1,D1) with the transfer function matrix G1(λ) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrix G2(λ), a descriptor realization sysldiv = (Ai-λEi,Bi,Ci,Di) of sysldiv = inv(sys1)*sys2, whose transfer-function matrix Gli(λ) represents the result of the left division Gli(λ) = inv(G1(λ))*G2(λ). The realization of sysldiv is determined using inversion-free formulas and the invertibility condition for sys1 is checked, unless checkinv = false.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where n is the maximum of orders of the square matrices A1 and A2, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.rdivFunction
sysrdiv = rdiv(sys1, sys2; atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ, checkinv = true)  
-sysrdiv = sys1 / sys2

Compute for the descriptor systems sys1 = (A1-λE1,B1,C1,D1) with the transfer function matrix G1(λ) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrix G2(λ), a descriptor realization sysrdiv = (Ai-λEi,Bi,Ci,Di) of sysrdiv = sys1*inv(sys2), whose transfer-function matrix Gri(λ) represents the result of the right division Gri(λ) = G1(λ)*inv(G2(λ)). The realization of sysrdiv is determined using inversion-free formulas and the invertibility condition for sys2 is checked, unless checkinv = false.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where n is the maximum of orders of the square matrices A1 and A2, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gdualFunction
sysdual = gdual(sys, rev = false) 
-sysdual = transpose(sys, rev = false)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the descriptor system realization of its dual system sysdual = (Ad-λEd,Bd,Cd,Dd), where Ad = transpose(A), Ed = transpose(E), Bd = transpose(C), Cd = transpose(B) and Dd = transpose(D), such that the transfer function matrix Gdual(λ) of sysdual is the transpose of G(λ) (i.e., Gdual(λ) = transpose(G(λ))).

If rev = true, the tranposition is combined with the reverse permutation of the state variables, such that sysdual = (P*Ad*P-λP*Ed*P,P*Bd,Cd*P,Dd), where P is the permutation matrix with ones down the second diagonal.

source
Base.adjointFunction
 rt = adjoint(r)

Compute the adjoint rt(λ) of the rational transfer function r(λ) such that for r(λ) = num(λ)/den(λ) we have:

(1) `rt(λ) = conj(num(-λ))/conj(num(-λ))`, if `r.Ts = 0`; 
+Basic operations on system models · DescriptorSystems.jl

Basic operations on system models

  • inv Inversion of a system.
  • ldiv Left division for two systems (also overloaded with \).
  • rdiv Right division for two systems (also overloaded with /).
  • gdual Building the dual of a descriptor system (also overloaded with transpose)
  • ctranspose Building the conjugate transpose of a system (also overloaded with adjoint and ').
  • adjoint Building the adjoint of a system.
Base.invFunction
sysinv = inv(sys; atol = 0, atol1 = atol, atol2 = atol, rtol, checkinv = true)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), a descriptor realization of its inverse system sysinv = (Ai-λEi,Bi,Ci,Di), such that the transfer function matrix Ginv(λ) of sysinv is the inverse of G(λ) (i.e., G(λ)*Ginv(λ) = I). The realization of sysinv is determined using inversion-free formulas and the invertibility condition is checked, unless checkinv = false.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.ldivFunction
sysldiv = ldiv(sys1, sys2; atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ, checkinv = true)
+sysldiv = sys1 \ sys2

Compute for the descriptor systems sys1 = (A1-λE1,B1,C1,D1) with the transfer function matrix G1(λ) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrix G2(λ), a descriptor realization sysldiv = (Ai-λEi,Bi,Ci,Di) of sysldiv = inv(sys1)*sys2, whose transfer-function matrix Gli(λ) represents the result of the left division Gli(λ) = inv(G1(λ))*G2(λ). The realization of sysldiv is determined using inversion-free formulas and the invertibility condition for sys1 is checked, unless checkinv = false.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where n is the maximum of orders of the square matrices A1 and A2, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.rdivFunction
sysrdiv = rdiv(sys1, sys2; atol = 0, atol1 = atol, atol2 = atol, rtol = n*ϵ, checkinv = true)  
+sysrdiv = sys1 / sys2

Compute for the descriptor systems sys1 = (A1-λE1,B1,C1,D1) with the transfer function matrix G1(λ) and sys2 = (A2-λE2,B2,C2,D2) with the transfer function matrix G2(λ), a descriptor realization sysrdiv = (Ai-λEi,Bi,Ci,Di) of sysrdiv = sys1*inv(sys2), whose transfer-function matrix Gri(λ) represents the result of the right division Gri(λ) = G1(λ)*inv(G2(λ)). The realization of sysrdiv is determined using inversion-free formulas and the invertibility condition for sys2 is checked, unless checkinv = false.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, the absolute tolerance for the nonzero elements of E1 and E2, and the relative tolerance for the nonzero elements of A1, B1, C1, D1, A2, B2, C2, D2, E1 and E2. The default relative tolerance is n*ϵ, where n is the maximum of orders of the square matrices A1 and A2, and ϵ is the working machine epsilon. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

source
DescriptorSystems.gdualFunction
sysdual = gdual(sys, rev = false) 
+sysdual = transpose(sys, rev = false)

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the descriptor system realization of its dual system sysdual = (Ad-λEd,Bd,Cd,Dd), where Ad = transpose(A), Ed = transpose(E), Bd = transpose(C), Cd = transpose(B) and Dd = transpose(D), such that the transfer function matrix Gdual(λ) of sysdual is the transpose of G(λ) (i.e., Gdual(λ) = transpose(G(λ))).

If rev = true, the tranposition is combined with the reverse permutation of the state variables, such that sysdual = (P*Ad*P-λP*Ed*P,P*Bd,Cd*P,Dd), where P is the permutation matrix with ones down the second diagonal.

source
Base.adjointFunction
 rt = adjoint(r)

Compute the adjoint rt(λ) of the rational transfer function r(λ) such that for r(λ) = num(λ)/den(λ) we have:

(1) `rt(λ) = conj(num(-λ))/conj(num(-λ))`, if `r.Ts = 0`; 
 
-(2) `rt(λ) = conj(num(1/λ))/conj(num(1/λ))`, if `r.Ts = -1` or `r.Ts > 0`.
source
sysconj = adjoint(sys) 
-sysconj = sys'

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the descriptor system realization of its adjoint (also called conjugate transpose) system sysconj = (Ac-λEc,Bc,Cc,Dc), such that the transfer function matrix Gconj(λ) of sysconj is the appropriate conjugate transpose of G(λ), as follows: for a continuous-time system with λ = s, Gconj(s) := transpose(G(-s)), while for a discrete-time system with λ = z, Gconj(z) := transpose(G(1/z)).

source
+(2) `rt(λ) = conj(num(1/λ))/conj(num(1/λ))`, if `r.Ts = -1` or `r.Ts > 0`.
source
sysconj = adjoint(sys) 
+sysconj = sys'

Compute for a descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), the descriptor system realization of its adjoint (also called conjugate transpose) system sysconj = (Ac-λEc,Bc,Cc,Dc), such that the transfer function matrix Gconj(λ) of sysconj is the appropriate conjugate transpose of G(λ), as follows: for a continuous-time system with λ = s, Gconj(s) := transpose(G(-s)), while for a discrete-time system with λ = z, Gconj(z) := transpose(G(1/z)).

source
diff --git a/dev/operations_rtf.html b/dev/operations_rtf.html index d915e3f..ad88d4c 100644 --- a/dev/operations_rtf.html +++ b/dev/operations_rtf.html @@ -1,5 +1,5 @@ -Some operations on rational transfer functions and matrices · DescriptorSystems.jl

Some operations on rational transfer functions and matrices

  • simplify Pole-zero cancellation.
  • normalize Normalization of a rational transfer function to monic denominator.
  • confmap Applying a conformal mapping transformation to a rational transfer function or a rational transfer function matrix.
  • zpk Computation of zeros, poles and gain of a rational transfer function.
  • rtfbilin Generation of common bilinear transformations and their inverses.
DescriptorSystems.simplifyFunction
 simplify(r; atol = 0, rtol = atol)

Simplify the rational transfer function r(λ) by cancellation of common divisors of numerator and denominator. The keyword arguments atol and rtol are the absolute and relative tolerances for the nonzero numerator and denominator coefficients.

source
DescriptorSystems.confmapFunction
rt = confmap(r, f)

Apply the conformal mapping transformation λ = f(δ) to the rational transfer function r(λ) and return rt(δ) = r(f(δ)). The resulting rt inherits the sampling time and variable of f.

source
Rt = confmap(R, f)

Apply elementwise the conformal mapping transformation λ = f(δ) to the rational transfer function matrix R(λ) and return Rt(δ) = R(f(δ)). The resulting elements of Rt inherit the sampling time and variable of f.

source
DescriptorSystems.zpkFunction
 zpk(r) -> (z, p, k)

Compute the roots (zeros) z, poles p and gain k of the rational transfer function r(λ).

source
DescriptorSystems.rtfbilinFunction
 rtfbilin(type = "c2d"; Ts = T, Tis = Ti, a = val1, b = val2, c = val3, d = val4) -> (g, ginv)

Build the rational transfer functions of several commonly used bilinear transformations and their inverses. The resulting g describes the rational transfer function g(δ) in the bilinear transformation λ = g(δ) and ginv describes its inverse transformation ginv(λ) in the bilinear transformation δ = ginv(λ). In accordance with the values of type and the keyword argument values Ts, Tis, a, b, c, and d, the resulting g and ginv contain first order rational transfer functions of the form g(δ) = (a*δ+b)/(c*δ+d) and ginv(λ) = (d*λ-b)/(-c*λ+a), respectively, which satisfy g(ginv(λ)) = λ and ginv(g(δ)) = δ.

Depending on the value of type, the following types of transformations can be generated in conjunction with parameters specified in Ts, Tis, a, b, c, and d:

"Cayley" - Cayley transformation: `s = g(z) = (z-1)/(z+1)` and `z = ginv(s) = (s+1)/(-s+1)`; 
+Some operations on rational transfer functions and matrices · DescriptorSystems.jl

Some operations on rational transfer functions and matrices

  • simplify Pole-zero cancellation.
  • normalize Normalization of a rational transfer function to monic denominator.
  • confmap Applying a conformal mapping transformation to a rational transfer function or a rational transfer function matrix.
  • zpk Computation of zeros, poles and gain of a rational transfer function.
  • rtfbilin Generation of common bilinear transformations and their inverses.
DescriptorSystems.simplifyFunction
 simplify(r; atol = 0, rtol = atol)

Simplify the rational transfer function r(λ) by cancellation of common divisors of numerator and denominator. The keyword arguments atol and rtol are the absolute and relative tolerances for the nonzero numerator and denominator coefficients.

source
DescriptorSystems.confmapFunction
rt = confmap(r, f)

Apply the conformal mapping transformation λ = f(δ) to the rational transfer function r(λ) and return rt(δ) = r(f(δ)). The resulting rt inherits the sampling time and variable of f.

source
Rt = confmap(R, f)

Apply elementwise the conformal mapping transformation λ = f(δ) to the rational transfer function matrix R(λ) and return Rt(δ) = R(f(δ)). The resulting elements of Rt inherit the sampling time and variable of f.

source
DescriptorSystems.zpkFunction
 zpk(r) -> (z, p, k)

Compute the roots (zeros) z, poles p and gain k of the rational transfer function r(λ).

source
DescriptorSystems.rtfbilinFunction
 rtfbilin(type = "c2d"; Ts = T, Tis = Ti, a = val1, b = val2, c = val3, d = val4) -> (g, ginv)

Build the rational transfer functions of several commonly used bilinear transformations and their inverses. The resulting g describes the rational transfer function g(δ) in the bilinear transformation λ = g(δ) and ginv describes its inverse transformation ginv(λ) in the bilinear transformation δ = ginv(λ). In accordance with the values of type and the keyword argument values Ts, Tis, a, b, c, and d, the resulting g and ginv contain first order rational transfer functions of the form g(δ) = (a*δ+b)/(c*δ+d) and ginv(λ) = (d*λ-b)/(-c*λ+a), respectively, which satisfy g(ginv(λ)) = λ and ginv(g(δ)) = δ.

Depending on the value of type, the following types of transformations can be generated in conjunction with parameters specified in Ts, Tis, a, b, c, and d:

"Cayley" - Cayley transformation: `s = g(z) = (z-1)/(z+1)` and `z = ginv(s) = (s+1)/(-s+1)`; 
            the sampling time `g.Ts` is set to the value `T ≠ 0` (default `T = -1`), while `ginv.Ts = 0`;
            g(z) and ginv(s) are also known as the continuous-to-discrete and discrete-to-continuous transformations, respectively; 
 
@@ -24,4 +24,4 @@
             - _rotation_: `|a| = 1`, `b = 0`, `c = 0`, `d = 1` (`λ = a*δ`)
             - _inversion_: `a = 0`, `b = 1`, `c = 1`, `d = 0`  (`λ = 1/δ`)
 
-"lft"     - alias to "Moebius" (linear fractional transformation).
source
+"lft" - alias to "Moebius" (linear fractional transformation).
source
diff --git a/dev/order_reduction.html b/dev/order_reduction.html index 4d03d8d..50a7d07 100644 --- a/dev/order_reduction.html +++ b/dev/order_reduction.html @@ -9,7 +9,7 @@ (4) rank[Er; Cr] = nr (infinite observability) - (5) Ar-λEr has no simple infinite eigenvalues

A realization satisfying only conditions (1)-(4) is called irreducible.

Some reduction steps can be skipped by appropriately selecting the keyword arguments contr, obs and nseig.

If contr = false, then the controllability conditions (1) and (2) are not enforced.

If obs = false, then observability condition (3) and (4) are not enforced.

If nseig = false, then condition (5) on the lack of simple infinite eigenvalues is not enforced.

To enforce conditions (1)-(4), orthogonal similarity transformations are performed on the matrices of the original realization (A-λE,B,C,D) to obtain an irreducible realization using structured pencil reduction algorithms, as the fast versions of the reduction techniques of the full row rank pencil [B A-λE] and full column rank pencil [A-λE;C] proposed in [1]. To enforce condition (5), residualization formulas (see, e.g., [2, page 329]) are employed which involves matrix inversions.

The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

[1] P. Van Dooreen, The generalized eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, vol. AC-26, pp. 111-129, 1981.

[2] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
DescriptorSystems.girFunction
sysr = gir(sys; finite = true, infinite = true, contr = true, obs = true, noseig = false,
+ (5) Ar-λEr has no simple infinite eigenvalues

A realization satisfying only conditions (1)-(4) is called irreducible.

Some reduction steps can be skipped by appropriately selecting the keyword arguments contr, obs and nseig.

If contr = false, then the controllability conditions (1) and (2) are not enforced.

If obs = false, then observability condition (3) and (4) are not enforced.

If nseig = false, then condition (5) on the lack of simple infinite eigenvalues is not enforced.

To enforce conditions (1)-(4), orthogonal similarity transformations are performed on the matrices of the original realization (A-λE,B,C,D) to obtain an irreducible realization using structured pencil reduction algorithms, as the fast versions of the reduction techniques of the full row rank pencil [B A-λE] and full column rank pencil [A-λE;C] proposed in [1]. To enforce condition (5), residualization formulas (see, e.g., [2, page 329]) are employed which involves matrix inversions.

The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

[1] P. Van Dooreen, The generalized eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, vol. AC-26, pp. 111-129, 1981.

[2] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
DescriptorSystems.girFunction
sysr = gir(sys; finite = true, infinite = true, contr = true, obs = true, noseig = false,
            fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ)

Compute for a descriptor system sys = (A-λE,B,C,D) of order n a reduced order descriptor system sysr = (Ar-λEr,Br,Cr,Dr) of order nr ≤ n such that sys and sysr have the same transfer function matrix, i.e.,

         -1                    -1
  C*(λE-A)  *B + D = Cr*(λEr-Ar)  *Br + Dr .

The least possible order nr is achieved if finite = true, infinite = true, contr = true, obs = true and nseig = true. Such a realization is called minimal and satisfies:

 (1) rank[Br Ar-λEr] = nr for all finite λ (finite controllability)
 
@@ -19,8 +19,8 @@
 
  (4) rank[Er; Cr] = nr (infinite observability)
 
- (5) Ar-λEr has no simple infinite eigenvalues

A realization satisfying only conditions (1)-(4) is called irreducible and is computed by default.

Some reduction steps can be skipped by appropriately selecting the keyword arguments contr, obs, finite, infinite and nseig.

If contr = false, then the controllability conditions (1) and (2) are not enforced. If contr = true and finite = true, then the finite controllability condition (1) is enforced. If contr = true and finite = false, then the finite controllability condition (1) is not enforced. If contr = true and infinite = true, then the infinite controllability condition (2) is enforced. If contr = true and infinite = false, then the infinite controllability condition (2) is not enforced.

If obs = false, then observability condition (3) and (4) are not enforced. If obs = true and finite = true, then the finite observability condition (3) is enforced. If obs = true and finite = false, then the finite observability condition (3) is not enforced. If obs = true and infinite = true, then the infinite observability condition (4) is enforced. If obs = true and infinite = false, then the infinite observability condition (4) is not enforced.

If nseig = true, then condition (5) on the lack of simple infinite eigenvalues is also enforced.

To enforce conditions (1)-(4), the Procedure GIR in [1, page 328] is employed, which performs orthogonal similarity transformations on the matrices of the original realization (A-λE,B,C,D) to obtain an irreducible realization using structured pencil reduction algorithms. To enforce condition (5), residualization formulas (see, e.g., [1, page 329]) are employed which involves matrix inversions.

The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

[1] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
DescriptorSystems.gir_lrtranFunction
gir_lrtran(sys; ltran = false, rtran = false, finite = true, infinite = true, contr = true, obs = true, 
-         noseig = false, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ) -> (sysr, Q, Z)

This is a special version of the function gir to additionally determine the left and right transformation matrices Q = [Q1 Q2] and Z = [Z1 Z2], respectively, such that the matrices Ar, Er, Br and Cr of the resulting descriptor system sysr = (Ar-λEr,Br,Cr,Dr) are given by Ar = Q1'*A*Z1, Er = Q1'*E*Z1, Br = Q1'*B, Cr = C*Z1, where the number of columns of Q1 and Z1 is equal to the order of matrix Ar. Q and Z result orthogonal if noseig = false. Q = nothing if ltran = false and Z = nothing if rtran = false. See gir for details on the rest of keyword parameters.

source
DescriptorSystems.gbalmrFunction
gbalmr(sys, balance = false, matchdc = false, ord = missing, offset = √ϵ,
+ (5) Ar-λEr has no simple infinite eigenvalues

A realization satisfying only conditions (1)-(4) is called irreducible and is computed by default.

Some reduction steps can be skipped by appropriately selecting the keyword arguments contr, obs, finite, infinite and nseig.

If contr = false, then the controllability conditions (1) and (2) are not enforced. If contr = true and finite = true, then the finite controllability condition (1) is enforced. If contr = true and finite = false, then the finite controllability condition (1) is not enforced. If contr = true and infinite = true, then the infinite controllability condition (2) is enforced. If contr = true and infinite = false, then the infinite controllability condition (2) is not enforced.

If obs = false, then observability condition (3) and (4) are not enforced. If obs = true and finite = true, then the finite observability condition (3) is enforced. If obs = true and finite = false, then the finite observability condition (3) is not enforced. If obs = true and infinite = true, then the infinite observability condition (4) is enforced. If obs = true and infinite = false, then the infinite observability condition (4) is not enforced.

If nseig = true, then condition (5) on the lack of simple infinite eigenvalues is also enforced.

To enforce conditions (1)-(4), the Procedure GIR in [1, page 328] is employed, which performs orthogonal similarity transformations on the matrices of the original realization (A-λE,B,C,D) to obtain an irreducible realization using structured pencil reduction algorithms. To enforce condition (5), residualization formulas (see, e.g., [1, page 329]) are employed which involves matrix inversions.

The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true, or the SVD-decomposition. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of matrices A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

[1] A. Varga, Solving Fault Diagnosis Problems - Linear Synthesis Techniques, Springer Verlag, 2017.

source
DescriptorSystems.gir_lrtranFunction
gir_lrtran(sys; ltran = false, rtran = false, finite = true, infinite = true, contr = true, obs = true, 
+         noseig = false, fast = true, atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ) -> (sysr, Q, Z)

This is a special version of the function gir to additionally determine the left and right transformation matrices Q = [Q1 Q2] and Z = [Z1 Z2], respectively, such that the matrices Ar, Er, Br and Cr of the resulting descriptor system sysr = (Ar-λEr,Br,Cr,Dr) are given by Ar = Q1'*A*Z1, Er = Q1'*E*Z1, Br = Q1'*B, Cr = C*Z1, where the number of columns of Q1 and Z1 is equal to the order of matrix Ar. Q and Z result orthogonal if noseig = false. Q = nothing if ltran = false and Z = nothing if rtran = false. See gir for details on the rest of keyword parameters.

source
DescriptorSystems.gbalmrFunction
gbalmr(sys, balance = false, matchdc = false, ord = missing, offset = √ϵ,
        atolhsv = 0, rtolhsv = nϵ, atolmin = atolhsv, rtolmin = rtolhsv, 
-       atol = 0, atol1 = atol, atol2 = atol, rtol, fast = true) -> (sysr, hs)

Compute for a proper and stable descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), a reduced order realization sysr = (Ar-λEr,Br,Cr,Dr) and the vector hs of decreasingly ordered Hankel singular values of the system sys. If balance = true, a balancing-based approach is used to determine a reduced order minimal realization of the form sysr = (Ar-λI,Br,Cr,Dr). For a continuous-time system sys, the resulting realization sysr is balanced, i.e., the controllability and observability grammians are equal and diagonal. If additonally matchdc = true, the resulting sysr is computed using state rezidualization formulas (also known as singular perturbation approximation) which additionally preserves the DC-gain of sys. In this case, the resulting realization sysr is balanced (for both continuous- and discrete-time systems). If balance = false, an enhanced accuracy balancing-free approach is used to determine the reduced order system sysr.

If ord = nr, the resulting order of sysr is min(nr,nrmin), where nrmin is the order of a minimal realization of sys determined as the number of Hankel singular values exceeding max(atolmin,rtolmin*HN), with HN, the Hankel norm of G(λ). If ord = missing, the resulting order is chosen as the number of Hankel singular values exceeding max(atolhsv,rtolhsv*HN).

To check the stability of the eigenvalues of the pencil A-λE, the real parts of eigenvalues must be less than for a continuous-time system or the moduli of eigenvalues must be less than 1-β for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

If E is singular, the uncontrollable infinite eigenvalues of the pair (A,E) and the non-dynamic modes are elliminated using minimal realization techniques. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: For the order reduction of a standard system, the balancing-free method of [1] or the balancing-based method of [2] are used. For a descriptor system the balancing related order reduction methods of [3] are used. To preserve the DC-gain of the original system, the singular perturbation approximation method of [4] is used in conjunction with the balancing-based or balancing-free approach of [5].

References

[1] A. Varga. Efficient minimal realization procedure based on balancing. In A. El Moudni, P. Borne, and S.G. Tzafestas (Eds.), Prepr. of the IMACS Symp. on Modelling and Control of Technological Systems, Lille, France, vol. 2, pp.42-47, 1991.

[2] M. S. Tombs and I. Postlethwaite. Truncated balanced realization of a stable non-minimal state-space system. Int. J. Control, vol. 46, pp. 1319–1330, 1987.

[3] T. Stykel. Gramian based model reduction for descriptor systems. Mathematics of Control, Signals, and Systems, 16:297–319, 2004.

[4] Y. Liu Y. and B.D.O. Anderson Singular Perturbation Approximation of Balanced Systems, Int. J. Control, Vol. 50, pp. 1379-1405, 1989.

[5] Varga A. Balancing-free square-root algorithm for computing singular perturbation approximations. Proc. 30-th IEEE CDC, Brighton, Dec. 11-13, 1991, Vol. 2, pp. 1062-1065.

source
DescriptorSystems.gss2ssFunction
gss2ss(sys; Eshape = "ident", atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ) -> (sysr, r)

Convert the descriptor system sys = (A-λE,B,C,D) to an input-output equivalent descriptor system realization sysr = (Ar-λEr,Br,Cr,Dr) without non-dynamic modes and having the same transfer function matrix. The resulting Er is in the SVD-like form Er = blockdiag(E1,0), with E1 an r × r nonsingular matrix, where r is the rank of E.

The keyword argument Eshape specifies the shape of E1 as follows:

if Eshape = "ident" (the default option), E1 is an identity matrix of order r and if E is nonsingular, then the resulting system sysr is a standard state-space system;

if Eshape = "diag", E1 is a diagonal matrix of order r, where the diagonal elements are the decreasingly ordered nonzero singular values of E;

if Eshape = "triu", E1 is an upper triangular nonsingular matrix of order r.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

If Eshape = "triu", the reductions of E and A are performed using rank decisions based on rank revealing QR-decompositions with column pivoting. If Eshape = "ident" or Eshape = "diag" the reductions are performed using the more reliable SVD-decompositions.

source
DescriptorSystems.dss2ssFunction
 dss2ss(sys[, x0 = 0]; state-mapping = false, simple_infeigs = true, fast = true, atol1, atol2, rtol) 
-           -> (sysr, xr0, Mx, Mu)

Return for a proper descriptor system sys = (A-λE,B,C,D) and initial state x0, the equivalent reduced order standard system sysr = (Ar-λI,Br,Cr,Dr) and the corresponding reduced consistent initial state xr0.

If state_mapping = true, the state mapping matrices Mx and Mu are also determined such that the values x(t) and xr(t) of the state vectors of the systems sys and sysr, respectively, and the input vector u(t) are related as x(t) = Mx*xr(t)+Mu*u(t). In this case, higher order uncontrollable infinite eigenvalues can be eliminated if simple_infeigs = false.

By default, state_mapping = false and Mx = nothing and Mu = nothing. In this case, higher order uncontrollable or unobservable infinite eigenvalues can be eliminated if simple_infeigs = false.

By default, simple_infeigs = true, and simple infinite eigenvalues for the pair (A,E) are assumed and eliminated.

The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true (default), or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon.

source
+ atol = 0, atol1 = atol, atol2 = atol, rtol, fast = true) -> (sysr, hs)

Compute for a proper and stable descriptor system sys = (A-λE,B,C,D) with the transfer function matrix G(λ), a reduced order realization sysr = (Ar-λEr,Br,Cr,Dr) and the vector hs of decreasingly ordered Hankel singular values of the system sys. If balance = true, a balancing-based approach is used to determine a reduced order minimal realization of the form sysr = (Ar-λI,Br,Cr,Dr). For a continuous-time system sys, the resulting realization sysr is balanced, i.e., the controllability and observability grammians are equal and diagonal. If additonally matchdc = true, the resulting sysr is computed using state rezidualization formulas (also known as singular perturbation approximation) which additionally preserves the DC-gain of sys. In this case, the resulting realization sysr is balanced (for both continuous- and discrete-time systems). If balance = false, an enhanced accuracy balancing-free approach is used to determine the reduced order system sysr.

If ord = nr, the resulting order of sysr is min(nr,nrmin), where nrmin is the order of a minimal realization of sys determined as the number of Hankel singular values exceeding max(atolmin,rtolmin*HN), with HN, the Hankel norm of G(λ). If ord = missing, the resulting order is chosen as the number of Hankel singular values exceeding max(atolhsv,rtolhsv*HN).

To check the stability of the eigenvalues of the pencil A-λE, the real parts of eigenvalues must be less than for a continuous-time system or the moduli of eigenvalues must be less than 1-β for a discrete-time system, where β is the stability domain boundary offset. The offset β to be used can be specified via the keyword parameter offset = β. The default value used for β is sqrt(ϵ), where ϵ is the working machine precision.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is , where ϵ is the working machine epsilon and n is the order of the system sys. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

If E is singular, the uncontrollable infinite eigenvalues of the pair (A,E) and the non-dynamic modes are elliminated using minimal realization techniques. The rank determinations in the performed reductions are based on rank revealing QR-decompositions with column pivoting if fast = true or the more reliable SVD-decompositions if fast = false.

Method: For the order reduction of a standard system, the balancing-free method of [1] or the balancing-based method of [2] are used. For a descriptor system the balancing related order reduction methods of [3] are used. To preserve the DC-gain of the original system, the singular perturbation approximation method of [4] is used in conjunction with the balancing-based or balancing-free approach of [5].

References

[1] A. Varga. Efficient minimal realization procedure based on balancing. In A. El Moudni, P. Borne, and S.G. Tzafestas (Eds.), Prepr. of the IMACS Symp. on Modelling and Control of Technological Systems, Lille, France, vol. 2, pp.42-47, 1991.

[2] M. S. Tombs and I. Postlethwaite. Truncated balanced realization of a stable non-minimal state-space system. Int. J. Control, vol. 46, pp. 1319–1330, 1987.

[3] T. Stykel. Gramian based model reduction for descriptor systems. Mathematics of Control, Signals, and Systems, 16:297–319, 2004.

[4] Y. Liu Y. and B.D.O. Anderson Singular Perturbation Approximation of Balanced Systems, Int. J. Control, Vol. 50, pp. 1379-1405, 1989.

[5] Varga A. Balancing-free square-root algorithm for computing singular perturbation approximations. Proc. 30-th IEEE CDC, Brighton, Dec. 11-13, 1991, Vol. 2, pp. 1062-1065.

source
DescriptorSystems.gss2ssFunction
gss2ss(sys; Eshape = "ident", atol = 0, atol1 = atol, atol2 = atol, rtol = nϵ) -> (sysr, r)

Convert the descriptor system sys = (A-λE,B,C,D) to an input-output equivalent descriptor system realization sysr = (Ar-λEr,Br,Cr,Dr) without non-dynamic modes and having the same transfer function matrix. The resulting Er is in the SVD-like form Er = blockdiag(E1,0), with E1 an r × r nonsingular matrix, where r is the rank of E.

The keyword argument Eshape specifies the shape of E1 as follows:

if Eshape = "ident" (the default option), E1 is an identity matrix of order r and if E is nonsingular, then the resulting system sysr is a standard state-space system;

if Eshape = "diag", E1 is a diagonal matrix of order r, where the diagonal elements are the decreasingly ordered nonzero singular values of E;

if Eshape = "triu", E1 is an upper triangular nonsingular matrix of order r.

The keyword arguments atol1, atol2, and rtol, specify, respectively, the absolute tolerance for the nonzero elements of A, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A and E. The keyword argument atol can be used to simultaneously set atol1 = atol and atol2 = atol.

If Eshape = "triu", the reductions of E and A are performed using rank decisions based on rank revealing QR-decompositions with column pivoting. If Eshape = "ident" or Eshape = "diag" the reductions are performed using the more reliable SVD-decompositions.

source
DescriptorSystems.dss2ssFunction
 dss2ss(sys[, x0 = 0]; state-mapping = false, simple_infeigs = true, fast = true, atol1, atol2, rtol) 
+           -> (sysr, xr0, Mx, Mu)

Return for a proper descriptor system sys = (A-λE,B,C,D) and initial state x0, the equivalent reduced order standard system sysr = (Ar-λI,Br,Cr,Dr) and the corresponding reduced consistent initial state xr0.

If state_mapping = true, the state mapping matrices Mx and Mu are also determined such that the values x(t) and xr(t) of the state vectors of the systems sys and sysr, respectively, and the input vector u(t) are related as x(t) = Mx*xr(t)+Mu*u(t). In this case, higher order uncontrollable infinite eigenvalues can be eliminated if simple_infeigs = false.

By default, state_mapping = false and Mx = nothing and Mu = nothing. In this case, higher order uncontrollable or unobservable infinite eigenvalues can be eliminated if simple_infeigs = false.

By default, simple_infeigs = true, and simple infinite eigenvalues for the pair (A,E) are assumed and eliminated.

The underlying pencil manipulation algorithms employ rank determinations based on either the use of rank revealing QR-decomposition with column pivoting, if fast = true (default), or the SVD-decomposition, if fast = false. The rank decision based on the SVD-decomposition is generally more reliable, but the involved computational effort is higher.

The keyword arguments atol1, atol2 and rtol specify, respectively, the absolute tolerance for the nonzero elements of A, B, C, D, the absolute tolerance for the nonzero elements of E, and the relative tolerance for the nonzero elements of A, B, C, D and E. The default relative tolerance is n*ϵ, where n is the order of the square matrices A and E, and ϵ is the working machine epsilon.

source
diff --git a/dev/rtf.html b/dev/rtf.html index d4b9d84..af45e6d 100644 --- a/dev/rtf.html +++ b/dev/rtf.html @@ -1,9 +1,9 @@ -Building rational transfer functions · DescriptorSystems.jl

Building rational transfer functions

DescriptorSystems.RationalTransferFunctionType
r = RationalTransferFunction(num::AbstractPolynomial, den::AbstractPolynomial, Ts:Real)

Construct a rational transfer function model r from its numerator and denominator polynomials num and den, respectively, and sampling time Ts.

If r::RationalTransferFunction{T,λ,P <: Polynomial(T,λ),Ts} is a rational transfer function system model object defined as r(λ) = num(λ)/den(λ), where num(λ) and den(λ) are polynomials with coefficients in T and with the indeterminate λ, and Ts is the sampling time, then:

r.num is the numerator polynomial num(λ);

r.den is the denominator polynomial den(λ).

The sampling time Ts can have the following values:

  • Ts = 0 for a continuous-time system and λ = s is the complex variable in the Laplace transform;

  • Ts > 0 or Ts = -1 for a discrete-time system and λ = z is the complex variable in the Z-transform; Ts = -1 indicates a discrete-time system with an unspecified sampling time.

The sampling time can be obtained as r.Ts. The symbol (or variable) used for the indeterminate λ is the common symbol used for the indeterminates of the polynomials num(λ) and den(λ) and can be obtained as r.var. The roots of the numerator polynomial num(λ) (also called zeros of r(λ)) can be obtained as r.zeros, while the roots of the denominator polynomial den(λ) (also called poles of r(λ)) can be obtained as r.poles. The ratio of the leading polynomial coefficients of num(λ) and den(λ) (also called gain of r(λ)) can be obtained as r.gain.

source
DescriptorSystems.rtfFunction
r = rtf(num, den; Ts = rts, var = rvar )

Create the rational transfer function r(λ) = num(λ)/den(λ) with the polynomials num(λ) and den(λ), sampling time rts and variable name rvar, representing the transfer function of a single-input single-output system of the form

Y(λ) = r(λ) U(λ),

where U(λ) and Y(λ) are the Laplace or Z transformed input u(t) and output y(t), respectively, and λ = s, the complex variable in the Laplace transform, if rts = 0, or λ = z, the complex variable in the Z transform, if rts ≠ 0. Both num and den can be real or complex numbers as well.

The resulting r is such that r.Ts = rts (default rts = 0) and r.var = rvar. The default value of rvar is rvar = Polynomials.indeterminate(num) if num is a polynomial, rvar = Polynomials.indeterminate(den) if num is a number and den is a polynomial, and rvar = :s if both num and den are numbers.

source
r = rtf(f; Ts = rts, var = rvar)

Create the rational transfer function r(λ) = f(λ) with sampling time rts and variable name rvar such that:

(1) if f(λ) is a rational transfer function, then r.Ts = rts (default rts = f.Ts) and r.var = rvar (default rvar = f.var);

(2) if f(λ) is a rational function, then r.Ts = rts (default rts = 0) and r.var = rvar (default rvar = Polynomials.indeterminate(f.num));

(3) if f(λ) is a polynomial, then r.Ts = rts (default rts = 0) and r.var = rvar (default rvar = Polynomials.indeterminate(f));

(4) if f(λ) is a ral or complex number, then r.Ts = rts (default rts = 0) and r.var = rvar (default rvar = :s);

source
r = rtf(var; Ts = rts)
+Building rational transfer functions · DescriptorSystems.jl

Building rational transfer functions

DescriptorSystems.RationalTransferFunctionType
r = RationalTransferFunction(num::AbstractPolynomial, den::AbstractPolynomial, Ts:Real)

Construct a rational transfer function model r from its numerator and denominator polynomials num and den, respectively, and sampling time Ts.

If r::RationalTransferFunction{T,λ,P <: Polynomial(T,λ),Ts} is a rational transfer function system model object defined as r(λ) = num(λ)/den(λ), where num(λ) and den(λ) are polynomials with coefficients in T and with the indeterminate λ, and Ts is the sampling time, then:

r.num is the numerator polynomial num(λ);

r.den is the denominator polynomial den(λ).

The sampling time Ts can have the following values:

  • Ts = 0 for a continuous-time system and λ = s is the complex variable in the Laplace transform;

  • Ts > 0 or Ts = -1 for a discrete-time system and λ = z is the complex variable in the Z-transform; Ts = -1 indicates a discrete-time system with an unspecified sampling time.

The sampling time can be obtained as r.Ts. The symbol (or variable) used for the indeterminate λ is the common symbol used for the indeterminates of the polynomials num(λ) and den(λ) and can be obtained as r.var. The roots of the numerator polynomial num(λ) (also called zeros of r(λ)) can be obtained as r.zeros, while the roots of the denominator polynomial den(λ) (also called poles of r(λ)) can be obtained as r.poles. The ratio of the leading polynomial coefficients of num(λ) and den(λ) (also called gain of r(λ)) can be obtained as r.gain.

source
DescriptorSystems.rtfFunction
r = rtf(num, den; Ts = rts, var = rvar )

Create the rational transfer function r(λ) = num(λ)/den(λ) with the polynomials num(λ) and den(λ), sampling time rts and variable name rvar, representing the transfer function of a single-input single-output system of the form

Y(λ) = r(λ) U(λ),

where U(λ) and Y(λ) are the Laplace or Z transformed input u(t) and output y(t), respectively, and λ = s, the complex variable in the Laplace transform, if rts = 0, or λ = z, the complex variable in the Z transform, if rts ≠ 0. Both num and den can be real or complex numbers as well.

The resulting r is such that r.Ts = rts (default rts = 0) and r.var = rvar. The default value of rvar is rvar = Polynomials.indeterminate(num) if num is a polynomial, rvar = Polynomials.indeterminate(den) if num is a number and den is a polynomial, and rvar = :s if both num and den are numbers.

source
r = rtf(f; Ts = rts, var = rvar)

Create the rational transfer function r(λ) = f(λ) with sampling time rts and variable name rvar such that:

(1) if f(λ) is a rational transfer function, then r.Ts = rts (default rts = f.Ts) and r.var = rvar (default rvar = f.var);

(2) if f(λ) is a rational function, then r.Ts = rts (default rts = 0) and r.var = rvar (default rvar = Polynomials.indeterminate(f.num));

(3) if f(λ) is a polynomial, then r.Ts = rts (default rts = 0) and r.var = rvar (default rvar = Polynomials.indeterminate(f));

(4) if f(λ) is a ral or complex number, then r.Ts = rts (default rts = 0) and r.var = rvar (default rvar = :s);

source
r = rtf(var; Ts = rts)
 r = rtf('s') or r = rtf('z'; Ts = rts) 
 r = rtf("s") or r = rtf("z"; Ts = rts) 
 r = rtf(:s) or r = rtf(:z; Ts = rts)

Create the rational transfer function r(λ) = λ, such that r.var and r.Ts are set as follows:

(1) `r.var = :s` and `r.Ts = 0` if `var = 's'`, or `var = "s"` or `var = :s` ;
 
 (2) `r.var = :z` and `r.Ts = rts` if `var = 'z'`, or `var = "z"` or `var = :z`;
 
-(3) `r.var = var` and `r.Ts = rts` (default `rts = 0.`) otherwise.
source
r = rtf(z, p, k; Ts = rts, var = rvar)

Create from the roots (zeros) z, poles p, gain k, sampling time rts and variable name rvar the rational transfer function r(λ) = k*num(λ)/den(λ), where num(λ) and den(λ) are monic polynomials with roots equal z and p, respectively, and such that r.Ts = rts (default rts = 0) and r.var = rvar (default rvar = :s if Ts = 0 or rvar = :z if Ts ≠ 0).

source
+(3) `r.var = var` and `r.Ts = rts` (default `rts = 0.`) otherwise.
source
r = rtf(z, p, k; Ts = rts, var = rvar)

Create from the roots (zeros) z, poles p, gain k, sampling time rts and variable name rvar the rational transfer function r(λ) = k*num(λ)/den(λ), where num(λ) and den(λ) are monic polynomials with roots equal z and p, respectively, and such that r.Ts = rts (default rts = 0) and r.var = rvar (default rvar = :s if Ts = 0 or rvar = :z if Ts ≠ 0).

source