77.7k views
0 votes
Find the transfer function from the following state space. Use MATLAB to find the transfer function in two ways.

Find the transfer function from C(sI-A)⁻¹ B+D. Write out the transfer function

User Designdit
by
7.4k points

1 Answer

1 vote

Final answer:

Here's an example code snippet in MATLAB:

```matlab

% Define the system matrices

A = [1 2; 3 4];

B = [5; 6];

C = [7 8];

D = 9;

% Calculate the transfer function

sys = ss(A, B, C, D); % Create the state-space object

t`f_sys = t`f(sys); % Convert to transfer function

% Display the transfer function

t`f_sys

```

Step-by-step explanation:

To find the transfer function from the given state space using MATLAB, we can follow these steps:

1. Start by defining the state-space matrices A, B, C, and D.

2. Use the MATLAB command t`f() to find the transfer function. There are two ways to do this:

a. Method 1: Using the command `t`f(sys)`, where `sys` is the state-space model defined by the matrices A, B, C, and D. This command directly converts the state-space model into a transfer function.

b. Method 2: Using the command `t`f(num, den)`, where `num` and `den` are the numerator and denominator coefficients of the transfer function. To obtain these coefficients, we can calculate the inverse of (s`I - A) using the `inv()` function and then multiply it by B to get the numerator coefficients. D is used as the denominator coefficient.

3. Write out the transfer function in the standard transfer function form: G(s) = C(sI - A)⁽⁻¹⁾B + D.

Therefore, the transfer function from the given state space is obtained by following these steps in MATLAB.

User Ganymede
by
7.6k points