Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions src/matrix_comps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -592,27 +592,6 @@ function similarity_transform(sys::ST, T) where ST <: AbstractStateSpace
ST(A,B,C,D,sys.timeevol)
end

"""
syst, S = prescale(sys)
Perform a eigendecomposition on system state-transition matrix `sys.A`.
```
à = S⁻¹AS
B̃ = S⁻¹ B
C̃ = CS
D̃ = D
```
Such that `Ã` is diagonal.
Returns a new scaled state-space object and the associated transformation
matrix.
"""
function prescale(sys::AbstractStateSpace)
d, S = eigen(sys.A)
A = Diagonal(d)
B = S\sys.B
C = sys.C*S
normalized_sys = iscontinuous(sys) ? ss(A, B, C, sys.D) : ss(A, B, C, sys.D, sys.Ts)
return normalized_sys, S
end

"""
sysi = innovation_form(sys, R1, R2)
Expand Down
5 changes: 0 additions & 5 deletions test/test_matrix_comps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ syst = similarity_transform(sys, Tr)
@test sys.B ≈ Tr*syst.B
@test sys.C*Tr ≈ syst.C

nsys, T = prescale(sys)
@test isdiag(nsys.A)
@test T*nsys.A ≈ sys.A*T
@test T*nsys.B ≈ sys.B
@test nsys.C ≈ sys.C*T

sys = ss([1 0.1; 0 1], ones(2), [1. 0], 0)
sysi = ControlSystems.innovation_form(sys, I, I)
Expand Down