-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssdata
& storage format of systems?
#857
Comments
Yes, there are a few different ways the systems are stored. The extra julia> (rand(1, 1), rand(2, 1), rand(1, 2))
([0.1785620036939919;;], [0.6089651884889287; 0.7791505974417174;;], [0.494261101514058 0.47886582862763305]) It denotes that there is a second dimension when it is not otherwise clear from the data, i.e. for a 2x1 size matrix to distinguish it from a 2-length vector. |
Why was this puzzling? Transfer functions and statespace models have quite different properties when it comes to computation and it makes sense to be able to represent both. For one, transfer functions can represent non-proper systems, whereas statespace models (without mass matrix) can not. The computations involved in computing, e.g., frequency responses are also vastly different for the two different representations. |
I also encourage you to actually look at the source code, it would trivially answer this kind of question, a big benefit of using open-source software ;) |
"Puzzling" for one with background in MATLAB's ControlToolbox - where But you are right - I shouldn't assume that ControlSystems.jl has exactly the same use as MATLAB's toolbox. As you say, storing the system as a transfer function has some advantages in that transfer functions can handle infinite dimensional systems (such as with the Anyways, my confusion was due to MATLAB experience. |
I tried to open the ControlSystems.jl source code in GitHub, but didn't really find However, utility function |
I can recommend the function julia> H = tf(1, [1,1]);
julia> dump(H)
TransferFunction{Continuous, ControlSystemsBase.SisoRational{Int64}}
matrix: Array{ControlSystemsBase.SisoRational{Int64}}((1, 1))
1: ControlSystemsBase.SisoRational{Int64}
num: Polynomials.Polynomial{Int64, :x}
coeffs: Array{Int64}((1,)) [1]
den: Polynomials.Polynomial{Int64, :x}
coeffs: Array{Int64}((2,)) [1, 1]
timeevol: Continuous Continuous() The macro julia> @edit ssdata(H) As a side, we represent time-delay systems as an LFT of a statespace system with a time-delay block: julia> tf(1, [1,1]) * delay(2.0)
DelayLtiSystem{Float64, Float64}
P: StateSpace{Continuous, Float64}
A =
-1.0
B =
0.0 1.0
C =
1.0
0.0
D =
0.0 0.0
1.0 0.0
Continuous-time state-space model
Delays: [2.0] you can read more about this in the paper https://github.com/JuliaControl/CDC2021/blob/master/CDC2021.pdf |
For many things yes, but not for everything, we thus allow the user to choose the representation. We also store We have a whole page in the documentation dedicated to these choices |
I'm puzzled by the following:
This indicates that the system is stored in the format it was created in, and not in state space form?
Another observation...
ssdata
creates two extra, blank lines for the outputs,;;
for the C matrix and the D matrix. Why? (I've seen similar things in other Julia code, too, and it puzzles me :-o )The text was updated successfully, but these errors were encountered: