Given (z,p,k) my goal is to convert to a state-space representation (A, B, C, D) with high numerical accuracy and stability. I do not really care about complexity and implementation cost.
One approach is of course to use Transfer Functions as an intermediate point and for example to work out in matlab the numerator and denominator as:
N = poly(z);
D = poly(p);
Then from the Transfer Function, it is pretty straightforward to get a state-space representation.
Based on numerical accuracy arguments, I would rather avoid Transfer Functions as an intermediate though. See the famous Wilkinson example where p = (1, 2, 3, .... 19, 20): double-precision is not adequate to represent poly(p).
Rather, it seems to me that there should be a way to convert directly from (z,p,k) to state-space representation (A, B, C, D), while avoiding (some, perhaps not all) numerical accuracy issues.
I was hopeful to find some relevant details here: Transforming between Mathematical Models of Systems.
Using Transfer Functions as an intermediate to perform the conversion from (z,p,k) to (A, B, C, D) is mentioned as an "alternative" way: SS ↔ TF; TF ↔ PZ Unfortunately, the "main" and supposedly direct approach SS ↔ PZ only suggests the very same thing (unless I totally missed the point, which is possible !)
So in this quest for a direct conversion from zero-pole to state-space representation, a fairly obvious step is to build A = diag(p)
because by definition, the poles are the eigenvalues of A.
Besides, if the system is assumed to be strictly proper, we can set D = 0
.
But to complete the process, how can B
and C
be practically determined directly from the zeros ?