Octave tf2ss: no way to build a system with multiple outputs?

479 Views Asked by At

The function in octave tf2ss is supposed to build a state space representation of a system. What I don't understand is how to make it produce a system that has a NxN C matrix, ie a system that outputs more than just one value and thus consists of more than just one transfer function from input to output. For example state space system with two transfer functions such as [1/s^2, 1/s] would be A = [0, 1; 0, 0], B = [0; 1], C = eye(2), D = 0.

Perhaps there is some other method to combine multiple transfer functions into one system in octave?

2

There are 2 best solutions below

0
On BEST ANSWER
2
On

A state space model is defined as

$$ \dot{x} = A\,x + B\,u \\ y = C\,x + D\,u $$

with $x\in\mathbb{R}^{n_x}$, $u\in\mathbb{R}^{n_u}$ and $y\in\mathbb{R}^{n_y}$. In order for these dimensions to match after vector-matrix multiplication this would imply that $A\in\mathbb{R}^{n_x \times n_x}$, $B\in\mathbb{R}^{n_x \times n_u}$, $C\in\mathbb{R}^{n_y \times n_x}$ and $D\in\mathbb{R}^{n_y \times n_u}$.

In your example $n_x = 2$, $n_u = 1$ and $n_y = 2$. These values do match with $A$, $B$ and $C$, however $D$ does not satisfy the expected size.