# How to use exp^s for a transfer function in matlab

12 vues (au cours des 30 derniers jours)
Syed Muhammad Mujtaba le 19 Mar 2024
Commenté : VBBV le 19 Mar 2024
I have a equation
• Gd= exp(-1.5*s*Ts);
with s = tf('s');
but whenever I use it in any other transfer function later, it changes the function to continious time state-space model.
For example if I run Gx1= Gd / ( (s^2) + (s*Gd) + 1 ) , Gx1 will become continious time state-space model rather than continious time transfer function model. I tried ss2tf matlab tool but it's also not working.
##### 3 commentairesAfficher 1 commentaire plus ancienMasquer 1 commentaire plus ancien
Syed Muhammad Mujtaba le 19 Mar 2024
sure, the Gx1 here is becoming state space model, I need a transfer function model for Gx1
VBBV le 19 Mar 2024
@Syed Muhammad Mujtaba, for linear ,models there is no such issue , however, if the model is non-linear such as in your case, it needs to be converted to linear approximation
Ts = 1/2000;
s = tf('s');
Gd = exp(-1.5*s*Ts);
G = (Gd / ( (s^2) + (s) + 1 )) % linear model
G = 1 exp(-0.00075*s) * ----------- s^2 + s + 1 Continuous-time transfer function.
G = (Gd / ( (s^2) + (s*Gd) + 1 )) % non-linear model
G = A = x1 x2 x3 x4 x5 x6 x1 1 0 0 0 0 0 x2 0 1 0 0 0 0 x3 0 0 1 0 0 -1 x4 0 0 0 1 0 0 x5 0 0 0 0 1 -1 x6 1 0 0 1 0 1 B = u1 x1 0 x2 0 x3 0 x4 0 x5 0 x6 -1 C = x1 x2 x3 x4 x5 x6 y1 0 0 0 0 0 1 D = u1 y1 0 E = x1 x2 x3 x4 x5 x6 x1 0 1 0 0 0 0 x2 0 0 1 0 0 0 x3 0 0 0 0 0 0 x4 0 0 0 0 1 0 x5 0 0 0 0 0 0 x6 0 0 0 0 0 0 (values computed with all internal delays set to zero) Output delays (seconds): 0.00075 Internal delays (seconds): 0.00075 Continuous-time state-space model.

Connectez-vous pour commenter.

### Réponses (1)

Paul le 19 Mar 2024
Models with internal delays are implemented in state space form.
Ts = 1/2000;
s = tf('s');
Gd = exp(-1.5*s*Ts);
With Gd only in the numerator, the system has a simple delay between the input and output, which Matlab places on the Output. I guess that's the default if you don't specify otherwise.
h1 = Gd/(s^2 + s + 1)
h1 = 1 exp(-0.00075*s) * ----------- s^2 + s + 1 Continuous-time transfer function.
h1.OutputDelay
ans = 7.5000e-04
Here, because Gd is applied to one term in the demominator, the model essentially has an additional delay on one of the feedback loops, and such models are always implemented in state space form.
h2 = Gd/(s^2 + s*Gd + 1)
h2 = A = x1 x2 x3 x4 x5 x6 x1 1 0 0 0 0 0 x2 0 1 0 0 0 0 x3 0 0 1 0 0 -1 x4 0 0 0 1 0 0 x5 0 0 0 0 1 -1 x6 1 0 0 1 0 1 B = u1 x1 0 x2 0 x3 0 x4 0 x5 0 x6 -1 C = x1 x2 x3 x4 x5 x6 y1 0 0 0 0 0 1 D = u1 y1 0 E = x1 x2 x3 x4 x5 x6 x1 0 1 0 0 0 0 x2 0 0 1 0 0 0 x3 0 0 0 0 0 0 x4 0 0 0 0 1 0 x5 0 0 0 0 0 0 x6 0 0 0 0 0 0 (values computed with all internal delays set to zero) Output delays (seconds): 0.00075 Internal delays (seconds): 0.00075 Continuous-time state-space model.
Attempting to convert to tf throws an error.
tf(h2)
Error using DynamicSystem/tf
State-space models with internal delays cannot be converted to transfer function form.
Check the doc pages for "models with internal delays" (or something like that) for more details.
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Model Order Reduction 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