1
$\begingroup$

I am trying to understand the state space equation for a simple first-order LTI system. Suppose I have a system with impulse response

$$h(t) = \frac{1}{\tau}e^{\frac{-t}{\tau}} \ \theta(t)$$

In this system, the state ($x(t)$) and "output" ($y(t)$) are the same (both scalars). $\theta(t)$ is the Heaviside unit step function.

If we do a Laplace transform, we get

$$H(s) = \frac{1}{s\tau + 1} = \frac{X(s)}{U(s)}$$

as the transfer function.

Now, if I enter Matlab and ask that it transform this transfer function to its equivalent state space representation (suppose $\tau = 0.02$), I get:

>> [A, B, C, D] = tf2ss([1], [0.02, 1])

A = -50
B = 1
C = 50
D = 0

or more generally, I get $A=-\frac{1}{\tau}$, $B=1$, $C=\frac{1}{\tau}$, $D=0$.

Procedurally (just following the state space equations), this is clearly correct but I don't understand why $C$ is $\frac{1}{\tau}$ rather than $1$ if $x(t) = y(t)$.

From the transfer function $\frac{1}{s\tau + 1} = \frac{X(s)}{U(s)}$, I would think we could do

$$ U(s) = X(s) \big(s\tau + 1 \big) $$

re-arranging,

$$ sX(s) = -\frac{1}{\tau}X(s) + U(s) $$

and then since the output $Y(s)$ is the same as the input $X(s)$, I would think $C=1$:

$$ Y(S) = X(s) $$

Why do we instead get $C = \frac{1}{\tau}$ and a separation between the state and output?

$\endgroup$
3
  • $\begingroup$ You might be able to tell that this is a new topic for me. Please let me know if I'm mis-using terms $\endgroup$
    – solo
    Nov 17, 2022 at 18:19
  • $\begingroup$ I think getting to the bottom of this will be a dimensional analysis issue. Your mathematical equations can have dimension and units attached to quantities, but inside the mind of the computer, all numbers are just pure numbers. You will see that both the Dirac impuse $\delta(t)$ and the impulse response $h(t)$ of LTI systems in which the output is the same species of animal as the input, in both cases these functions have dimension of [time]${}^{-1}$. i'll ruminate about this and get you an answer. $\endgroup$ Nov 17, 2022 at 19:54
  • $\begingroup$ Thank you! I see now that I made an error in my equation and that I should have had: $$ sX(s) = -\frac{1}{\tau}X(s) + \frac{1}{\tau}U(s) $$ which would yield $A=-\frac{1}{\tau}$, $B=\frac{1}{\tau}$, $C=1$, $D=0$, which is equivalent $\endgroup$
    – solo
    Nov 17, 2022 at 20:52

2 Answers 2

0
$\begingroup$

If $X(s)$ and $Y(s)$ are the input and output in the Laplace domain, respectively, we have

$$Y(s)(s\tau +1)=X(s)\tag{1}$$

In the time domain, this is equivalent to

$$\tau y'(t)+y(t)=x(t)\tag{2}$$

It appears that Matlab defines the state $q(t)$ as

$$q(t)=\tau y(t)\tag{3}$$

You might as well choose $q(t)=y(t)$.

From $(2)$ and $(3)$ we get

$$q'(t)=-y(t)+x(t)=-\frac{1}{\tau}q(t)+x(t)\tag{4}$$

and

$$y(t)=\frac{1}{\tau}q(t)\tag{5}$$

From $(4)$ we see that $A=-1/\tau$ and $B=1$, and from $(5)$ we get $C=1/\tau$ and $D=0$.

$\endgroup$
2
  • $\begingroup$ Thank you! Now I see that I made a mistake in my equation for $sX(s)$, and if I set the state variable $x(t) = y(t)$ I should have gotten $A=-\frac{1}{\tau}$, $B=\frac{1}{\tau}$, $C=1$, $D=0$, which is equivalent to $A=-\frac{1}{\tau}$, $B=1$, $C=\frac{1}{\tau}$, $D=0$ $\endgroup$
    – solo
    Nov 17, 2022 at 20:55
  • $\begingroup$ @solo: Yes, that's right. $\endgroup$
    – Matt L.
    Nov 17, 2022 at 21:05
0
$\begingroup$

In this system, the state (𝑥(𝑡)) and "output" (𝑦(𝑡)) are the same (both scalars)

They don't have to be.

Why do we instead get 𝐶=1𝜏 and a separation between the state and output?

First -- as you've just discovered -- state-space realizations are not unique.

Second, any system that automatically translates a transfer function to state-space isn't necessarily going to do it in a way that's intuitive to you. It's going to follow whatever algorithm the designer specified. So you can expect it to cough up any of the infinite number of variations that is a state space that matches your transfer function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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