0
$\begingroup$

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?

$\endgroup$
0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Right. D should be 2x1. $\endgroup$ – Martin Jan 11 '18 at 14:43
  • $\begingroup$ @Martin Correct. $\endgroup$ – Kwin van der Veen Jan 11 '18 at 16:20
0
$\begingroup$

Here is a great page that helped a lot: https://se.mathworks.com/help/control/examples/connecting-models.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.