<< nyquist | Control System functions | obsvf >> |
Ob = obsv(A, C) |
Ob = obsv(sys) |
State-space model
State matrix: Nx-by-Nx matrix
State-to-output matrix: Ny-by-Nx matrix
Observability matrix.
The obsv functionis designed to calculate the observability matrix for state-space systems.
Given an Nx-by-Nx matrix A representing the system dynamics and a Ny-by-Nx matrix C specifying the output, the function call obsv(A, C) generates the observability matrix.
It is advised against using the rank of the observability matrix for testing observability due to numerical instability.
The observability matrix Ob tends to be numerically singular for systems with more than a few states, making the rank-based approach unreliable for such cases.
% Define the system matrices
A = [1 2; 3 4];
C = [7 8];
% Check observability using obsv function
O = obsv(A, C);
% Display the observability matrix
disp('Observability matrix:');
disp(O);
% Check if the system is observable
if rank(O) == size(A, 1)
disp('The system is observable.');
else
disp('The system is not observable.');
end
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET