150k views
4 votes
G(s)= 14(s+8)

​ s(s+3)(s+5)
Test the controllability and observability for this system, illustrate with MATLAB program.

User Rodrigoelp
by
7.7k points

1 Answer

4 votes

Final answer:

Here is an example MATLAB program that performs these tasks:

% Define the numerator and denominator of the transfer function

num = [14 112];

den = [1 8 15 0];

% Convert to state-space form

[A, B, C, D] = tf2ss(num, den);

% Calculate the controllability matrix and check its rank

Co = ctrb(A,B);

controllable = rank(Co) == size(A,1);

% Calculate the observability matrix and check its rank

Ob = obsv(A,C);

observable = rank(Ob) == size(A,1);

% Display the results

if controllable

disp('The system is controllable.');

else

disp('The system is not controllable.');

end

if observable

disp('The system is observable.');

else

disp('The system is not observable.');

end

Step-by-step explanation:

To test the controllability and observability of the system represented by the transfer function G(s), you can use MATLAB. Here's a step-by-step guide on how to perform these tests:

1. Controllability Test:

- In MATLAB, define the transfer function G(s) using the 't f' function. For example:

```

G = t f([14 112], [1 8 15 0]);

```

- Use the 'ctrb' function to calculate the controllability matrix, and the 'rank' function to determine the rank of the matrix. If the rank is equal to the number of states, then the system is controllable. For example:

```

C = ctrb(G);

rank_C = rank(C);

if rank_C == length(G.num{1})

disp("The system is controllable.");

else

disp("The system is not controllable.");

end

```

2. Observability Test:

- Use the 'obsv' function to calculate the observability matrix, and the 'rank' function to determine the rank of the matrix. If the rank is equal to the number of states, then the system is observable. For example:

```

O = obsv(G);

rank_O = rank(O);

if rank_O == length(G.num{1})

disp("The system is observable.");

else

disp("The system is not observable.");

end

```

User RyanZim
by
8.1k points