Modify the Laplace variable in a transfer function
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Shreyas Dethe
il 5 Apr 2019
Commentato: Star Strider
il 5 Apr 2019
I have a transfer function
H_analog = tf(Oc^N, lp_poles);
Where the variables are
Oc = 1.07;
N = 8;
lp_poles = 1x16 complex matrix (let's assume all 1's for now)
I want to transform the laplace variable from s to
so as to get a new transfer function H_analog_new

How should I proceed ?
0 Commenti
Risposta accettata
Star Strider
il 5 Apr 2019
You need to involve the Symbolic Math Toolbox for this.
syms s
sv = 1/(s^2 + 0.2059);
Oc = 1.07;
N = 8;
lp_poles = poly2sym(ones(1,16),s);
H_sym = subs((Oc^N)/lp_poles, {s},{sv});
H_sym = simplify(H_sym, 'Steps',50)
[H_num,H_den] = numden(H_sym);
Hn = sym2poly(H_num);
Hd = sym2poly(H_den);
H_analog_new = tf(Hn, Hd)
producing:
H_analog_new =
7.738e75 s^30 + 2.39e76 s^28 + 3.445e76 s^26 + 3.073e76 s^24 + 1.898e76 s^22 + 8.599e75 s^20
+ 2.951e75 s^18 + 7.812e74 s^16 + 1.609e74 s^14 + 2.576e73 s^12 + 3.182e72 s^10
+ 2.978e71 s^8 + 2.044e70 s^6 + 9.713e68 s^4 + 2.857e67 s^2 + 3.922e65
----------------------------------------------------------------------------------------------
4.504e75 s^30 + 1.841e76 s^28 + 3.753e76 s^26 + 5.182e76 s^24 + 5.588e76 s^22 + 5.166e76 s^20
+ 4.377e76 s^18 + 3.556e76 s^16 + 2.843e76 s^14 + 2.261e76 s^12 + 1.796e76 s^10
+ 1.426e76 s^8 + 1.133e76 s^6 + 8.994e75 s^4 + 7.142e75 s^2 + 5.671e75
Continuous-time transfer function.
Experiment to get the result you want.
2 Commenti
Star Strider
il 5 Apr 2019
My pleasure!
The simplify (link) call automatically rearranges the expression to provide a much more simplified expression. What it does depends on the expression, and here I want it to fully integrate the substituted ‘sv’ variable in the equation, rather than leaving every substituted value as the original ‘sv’ value. See the documentation I linked to for an extended discussion.
If my Answer helps you solve your problem, please Accept it!
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!