# How can we represent this transfer function into state space representation in MATLAB?

21 vues (au cours des 30 derniers jours)
Hind Aljallaf le 1 Mai 2023
How can we represent this transfer function into state space representation in MATLAB? What are the commands that are regarding state space?
##### 1 commentaireAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens
Star Strider le 1 Mai 2023
Use the appropriate Control System Toolbox functions.

Connectez-vous pour commenter.

### Réponses (2)

Sachin le 11 Mai 2023
Hi
I understand that you want to find a state space representation of the transfer function.
For this, I suggest you to use MathWorks Control System Toolbox.
Follow these steps for a workaround:
1. First, find the state space form on the transfer function using the “tf2ss” function. This output will be in the form of [A, B, C, D].
2. After finding the state space form use the “canon” function to find the state space form.
[A_c, B_c, C_c, D_c] = canon(A, B, C, D, 'companion') %transform linear model into the canonical realization
Refer the below MATLAB documentation for state space Realizations:
You can refer to the following MATLAB documentation page for more information about “tf2ss”
Refer to this MATLAB page for the “canon” function
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

Sam Chak le 11 Mai 2023
As far as I know, there is no MATLAB command in the Control System Toolbox for directly computing the controllable canonical form. The canon() command only convert the identified state-space model to either the modal or companion canonical form.
G = tf([1 3], [1 3 2])
G = s + 3 ------------- s^2 + 3 s + 2 Continuous-time transfer function.
sys = ss(G); % convert from TF to random SS (non-unique)
You need to write a code to get the Observable Canonical form first and then transform it to Controllable Canonical form
obsys = ss(Aa, Bb, Cc, Dd) % Observable Canonical form
obsys = A = x1 x2 x1 0 -2 x2 1 -3 B = u1 x1 3 x2 1 C = x1 x2 y1 0 1 D = u1 y1 0 Continuous-time state-space model.
%% State-space in Conventional Controllable Canonical form
A = Aa';
B = Cc';
C = Bb';
D = Dd;
ctsys = ss(A, B, C, D) % Controllable Canonical form
ctsys = A = x1 x2 x1 0 1 x2 -2 -3 B = u1 x1 0 x2 1 C = x1 x2 y1 3 1 D = u1 y1 0 Continuous-time state-space model.
cttf = tf(ctsys)
cttf = s + 3 ------------- s^2 + 3 s + 2 Continuous-time transfer function.
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Dynamic System Models dans Help Center et File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by