# Calculating the response of a linear time-invariant system to arbitrary inputs

Given a linear time-invariant system:

$$\dot{x_1}(t)=-x_1+0.5x_2$$ $$\dot{x_2}(t)=0.3x_1-x_2$$

I want to study the response of the system to arbitrary impulse (dirac delta) inputs to $x_1$ and $x_2$ at given times. For example, giving an impulse to $x_1$ at $t=1$, $t=2$ and $t=5$ and to $x_2$ at $t=2$, $t=4$.

I know I could just add the impulses and integrate the system for each combination I choose like this:

$$\dot{x_1}(t)=-x_1+0.5x_2+\delta[t-1]+\delta[t-2]+\delta[t-5]$$ $$\dot{x_2}(t)=0.3x_1-x_2+\delta[t-1]+\delta[t-4]$$

but this seems rather cumbersome since I have to create equations for every combination. And since I want to study more than 3 dimensions (>100 equations), this becomes even more cumbersome.

Ideally, I want to understand the systems response to any combination of inputs at any time without solving separate equations for each new set of inputs. Since the system is LTI, I should be able to use the impulse response somehow to calculate the response to arbitrary inputs, but I struggle to apply the math to my example and hope for some help.

## 1 Answer

In general the solution to the initial value problem $\dot{x} = Ax + Bu$ subject to $x(0) = x_0$ is $x(t) = e^{At} x_0 + \int_0^t e^{A(t-\tau)} Bu(\tau) d \tau$.

In the particular question, $A$ is diagonalisable, so computing $e^{At}$ is fairly straightforward.

• Thank you! How to handle the impulse inputs in this case? Would it be best to create an $n$ by $m$ matrix $B$ where $m$ is the longest time $t$ there will be an impulse to the system and $u$ is a vector of delta functions up to time $t$, e.g. $\delta[t-1]$...$\delta[t-m]$? – holistic Nov 28 '17 at 22:29
• In this case $B$ is the identity and $u$ a vector of combinations of delayed impulses. – copper.hat Nov 28 '17 at 22:43