Calculate The Transfer Function From The Following State Space Representation
This guide explains how to convert a state space representation to a transfer function, which is essential for analyzing and designing control systems. The calculator on the right provides a quick way to perform this conversion for your specific system.
Introduction
In control systems engineering, the state space representation and transfer function are two fundamental ways to describe dynamic systems. While state space representations provide a more comprehensive view of system behavior, transfer functions are often preferred for analysis and design due to their simplicity.
The state space representation of a linear time-invariant system is given by:
State equations: ẋ(t) = Ax(t) + Bu(t)
Output equation: y(t) = Cx(t) + Du(t)
Where:
- x(t) is the state vector
- u(t) is the input vector
- y(t) is the output vector
- A is the state matrix
- B is the input matrix
- C is the output matrix
- D is the feedthrough matrix
The transfer function, on the other hand, describes the relationship between the input and output of a system in the frequency domain. It's given by:
G(s) = C(sI - A)^{-1}B + D
This guide will walk you through the process of converting a state space representation to a transfer function.
State Space Representation
The state space representation provides a mathematical model of a physical system as a set of input, output, and state variables related by first-order differential equations. It's particularly useful for systems with multiple inputs and outputs.
For a single-input, single-output (SISO) system, the state space representation can be written as:
ẋ(t) = Ax(t) + bu(t)
y(t) = cx(t) + du(t)
Where:
- x(t) is the state vector of dimension n×1
- A is the state matrix of dimension n×n
- b is the input vector of dimension n×1
- u(t) is the input signal
- c is the output vector of dimension 1×n
- d is the feedthrough term (direct transmission from input to output)
- y(t) is the output signal
The state space representation can be extended to multi-input, multi-output (MIMO) systems by using matrices instead of vectors.
Transfer Function Calculation
The transfer function can be derived from the state space representation using the following steps:
- Take the Laplace transform of both sides of the state and output equations.
- Solve for the Laplace transform of the state vector X(s).
- Substitute the expression for X(s) into the Laplace transform of the output equation.
- Simplify to obtain the transfer function G(s).
The detailed derivation is as follows:
1. Laplace transform of state equation:
sX(s) - x(0) = AX(s) + BU(s)
2. Solve for X(s):
X(s) = (sI - A)^{-1}x(0) + (sI - A)^{-1}BU(s)
3. Laplace transform of output equation:
Y(s) = CX(s) + DU(s)
4. Substitute X(s) and simplify:
Y(s) = C(sI - A)^{-1}x(0) + [C(sI - A)^{-1}B + D]U(s)
5. For zero initial conditions (x(0) = 0), the transfer function is:
G(s) = C(sI - A)^{-1}B + D
This formula shows that the transfer function is determined by the system matrices A, B, C, and D.
Note: The feedthrough term D is often zero for physical systems, but it's included here for completeness.
Example Calculation
Let's consider a simple second-order system with the following state space representation:
ẋ(t) = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}x(t) + \begin{bmatrix} 0 \\ 1 \end{bmatrix}u(t)
y(t) = \begin{bmatrix} 1 & 0 \end{bmatrix}x(t)
Here, A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}, B = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, C = \begin{bmatrix} 1 & 0 \end{bmatrix}, and D = 0.
To find the transfer function:
- Compute (sI - A):
- Find the inverse of (sI - A):
- Multiply by B:
- Multiply by C:
- Add D (which is 0 in this case):
sI - A = \begin{bmatrix} s & -1 \\ 2 & s + 3 \end{bmatrix}
(sI - A)^{-1} = \frac{1}{s(s + 3) + 2} \begin{bmatrix} s + 3 & 1 \\ -2 & s \end{bmatrix} = \frac{1}{s^2 + 3s + 2} \begin{bmatrix} s + 3 & 1 \\ -2 & s \end{bmatrix}
(sI - A)^{-1}B = \frac{1}{s^2 + 3s + 2} \begin{bmatrix} s + 3 & 1 \\ -2 & s \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \frac{1}{s^2 + 3s + 2} \begin{bmatrix} 1 \\ s \end{bmatrix}
C(sI - A)^{-1}B = \frac{1}{s^2 + 3s + 2} \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} 1 \\ s \end{bmatrix} = \frac{1}{s^2 + 3s + 2}
G(s) = \frac{1}{s^2 + 3s + 2}
The transfer function for this system is:
G(s) = \frac{1}{s^2 + 3s + 2}
This represents a second-order system with natural frequency \sqrt{2} and damping ratio \frac{3}{2\sqrt{2}} \approx 0.866.
FAQ
What is the difference between state space representation and transfer function?
The state space representation provides a more comprehensive view of a system by including state variables, while the transfer function focuses on the input-output relationship. Transfer functions are often easier to analyze and design with, especially for single-input, single-output systems.
When should I use state space representation instead of transfer functions?
State space representations are particularly useful for multi-input, multi-output systems, nonlinear systems, and when you need to include state variables in your analysis. They also provide a more intuitive way to model physical systems.
Can I convert any state space representation to a transfer function?
Yes, for linear time-invariant systems, you can always convert a state space representation to a transfer function using the formula G(s) = C(sI - A)^{-1}B + D. However, this conversion is not always straightforward for nonlinear or time-varying systems.
What happens if the matrix (sI - A) is not invertible?
If (sI - A) is not invertible, it means the system has poles at infinity, which typically indicates a non-proper transfer function. This can happen with certain physical systems, but it's usually not a problem in practical applications.