How do I create a transfer function of a high order

24 views (last 30 days)
I am trying to write a high order transfer function in matlab that i need to approximate and reduce to a lower order transfer function. My question is, how do i write a transfer function that has multiplication in between in the denominator:
Looks like this:
G(s) = (14.14s^2 + 318.2s + 707) / (s^2 +20s+101)*(100*s+1)*(0.2*s^2 + 1.2*s+1)

Answers (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 7 Feb 2023
It can be done this way:
s = tf('s');
G = (14.14*s^2 + 318.2*s + 707) / ((s^2 +20*s+101)*(100*s+1)*(0.2*s^2 + 1.2*s+1))
G = 14.14 s^2 + 318.2 s + 707 --------------------------------------------------------------- 20 s^5 + 520.2 s^4 + 4525 s^3 + 1.417e04 s^2 + 1.024e04 s + 101 Continuous-time transfer function.
% Simulate and get step response of this TF:
step(G)

Sam Chak
Sam Chak on 8 Feb 2023
Hi @DAL
Here is an alternative approach that should produce the same result.
Note that num, p3, and den are vectors of polynomial coefficients.
num = [14.14 318.2 707] % numerator
num = 1×3
14.1400 318.2000 707.0000
p3 = conv([1 20 101], [100 1]); % obtain a 3rd-order polynomial via Convolution
den = conv(p3, [0.2 1.2 1]) % denominator
den = 1×6
1.0e+04 * 0.0020 0.0520 0.4525 1.4165 1.0241 0.0101
G = tf(num, den) % transfer function
G = 14.14 s^2 + 318.2 s + 707 --------------------------------------------------------------- 20 s^5 + 520.2 s^4 + 4525 s^3 + 1.417e04 s^2 + 1.024e04 s + 101 Continuous-time transfer function.
To find a reduced-order approximation rsys of the LTI model G, balred() function can be used.
rsys = balred(G, 1) % Model order reduction
rsys = -0.06452 s + 0.06998 -------------------- s + 0.009997 Continuous-time transfer function.
subplot(2, 1, 1)
step(G, 1000) % step response of G behaves like a 1st-order system
subplot(2, 1, 2)
step(rsys, 1000) % step response of rsys

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!