You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compute the invariant zeros of the system `sys`. If `sys` is a minimal
242
-
realization, these are also the transmission zeros."""
243
+
realization, these are also the transmission zeros.
244
+
245
+
If `sys` is a state-space system the function has additional keyword arguments, see [`?ControlSystemsBase.MatrixPencils.spzeros`](https://andreasvarga.github.io/MatrixPencils.jl/dev/sklfapps.html#MatrixPencils.spzeros) for more details. If `extra = Val(true)`, the function returns `z, iz, KRInfo` where `z` are the transmission zeros, information on the multiplicities of infinite zeros in `iz` and information on the Kronecker-structure in the KRInfo object. The number of infinite zeros is the sum of the components of iz.
246
+
"""
243
247
functiontzeros(sys::TransferFunction)
244
248
ifissiso(sys)
245
249
returntzeros(sys.matrix[1,1])
246
250
else
247
-
returntzeros(ss(sys))
251
+
returntzeros(ss(sys, minimal=true))
248
252
end
249
253
end
250
254
251
-
# Implements the algorithm described in:
252
-
# Emami-Naeini, A. and P. Van Dooren, "Computation of Zeros of Linear
253
-
# Multivariable Systems," Automatica, 18 (1982), pp. 415–430.
254
-
#
255
-
# Note that this returns either Vector{ComplexF32} or Vector{Float64}
T =promote_type(eltype(A), eltype(B), eltype(C), eltype(D))
260
259
A2, B2, C2, D2, _ =promote(A,B,C,D, fill(zero(T)/one(T),0,0)) # If Int, we get Float64
261
260
tzeros(A2, B2, C2, D2)
262
261
end
263
-
functiontzeros(A::AbstractMatrix{T}, B::AbstractMatrix{T}, C::AbstractMatrix{T}, D::AbstractMatrix{T}) where {T <:Union{AbstractFloat,Complex{<:AbstractFloat}}#= For eps(T) =#}
264
-
# Balance the system
265
-
A, B, C =balance_statespace(A, B, C)
266
-
267
-
# Compute a good tolerance
268
-
meps =10*eps(real(T))*norm([A B; C D])
269
-
270
-
# Step 1:
271
-
A_r, B_r, C_r, D_r =reduce_sys(A, B, C, D, meps)
272
-
273
-
# Step 2: (conjugate transpose should be avoided since single complex zeros get conjugated)
@testtzeros(ex_6) ==[2] # From paper: "Our algorithm will extract the singular part of S(A) and will yield a regular pencil containing the single zero at 2."
0 commit comments