State space models are same?
18 views (last 30 days)
Show older comments
Hi, if I have two state space models, how can i calculate if these two state space models represent the same plant?
0 Comments
Answers (2)
Paul
on 23 Nov 2020
This is actually not a trivial question. Two state space models sys1 = ss(A1,B1,C1,D1) and sys2 = ss(A2,B2,C2,D2) will have the same transfer function if there is a transformation matrix T s.t.
A2 = T*A1*inv(T)
B2 = T*B1;
C2 = C1*inv(T)
D2 = D1
So given two state space models, you need to show that D2 = D1 (obviously triivial to check) and determine if there exists an (invertible) T that would satisfy the other three equations.
sys3 = ss2ss(sys1,T)
and check if the resulting state space matrices of sys3 are equal (to within a tolerance) to those in sys2 (caveat: sys1 and sys2 defined here are the opposite of how they are defined in that link).
If you're willing to stipulate that the plant is minimal, or at least willing to accept equality to within a "pole/zero" cancellation, then you can try using minreal on the difference
check = minreal(sys1-sys2,tol)
with the confirming result being that check is a zero m x n static gain matrix where m and n are the number of outputs and inputs of the plant respectively. You might have to play around with tol to see what works for your specific application.
For SISO cases you may also be interested in a similar question discussed here.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!