Matrix of transfer functions

66 vues (au cours des 30 derniers jours)
Davood Raoofsheibani
Davood Raoofsheibani le 10 Nov 2015
How do I define a matrix whose arrays are different transfer functions. I would like to do matrix multiplication and inversion later. I would like to avoid using symbolic definition of transfer functions.
  1 commentaire
CONGBO BAO
CONGBO BAO le 11 Juil 2021
Hi, Dear Davood;
I am facing the same problem.
Did you solve it?
Yours sincerely

Connectez-vous pour commenter.

Réponses (1)

Robert U
Robert U le 12 Juil 2021
Hi Davood Raoofsheibani,
you can define arrays of transfer functions similar to numeric arrays by using tf():
% define array
A = [tf([1],[1/(2*pi*24e3) 2/(2*pi*12e3) 1]), tf([1],[1/(2*pi*12e3) 2/(2*pi*8e3) 1]);...
tf([1],[1/(2*pi*6e3) 2/(2*pi*12e3) 1]), tf([1],[1/(2*pi*12e3) 2/(2*pi*12e3) 1])];
% use operations on array
A^2
ans = From input 1 to output... 3.958e-10 s^4 + 1.759e-09 s^3 + 5.305e-05 s^2 + 0.0001194 s + 2 1: ------------------------------------------------------------------------------------------------------------------------------ 1.547e-20 s^8 + 1.857e-19 s^7 + 6.417e-15 s^6 + 5.424e-14 s^5 + 9.236e-10 s^4 + 4.75e-09 s^3 + 5.306e-05 s^2 + 0.0001194 s + 1 5.277e-10 s^4 + 1.935e-09 s^3 + 7.295e-05 s^2 + 0.0001061 s + 2 2: ------------------------------------------------------------------------------------------------------------------------------- 6.189e-20 s^8 + 4.951e-19 s^7 + 1.867e-14 s^6 + 9.799e-14 s^5 + 1.847e-09 s^4 + 5.805e-09 s^3 + 7.295e-05 s^2 + 0.0001061 s + 1 From input 2 to output... 2.639e-10 s^4 + 1.495e-09 s^3 + 4.642e-05 s^2 + 0.0001326 s + 2 1: ------------------------------------------------------------------------------------------------------------------------------- 1.547e-20 s^8 + 1.857e-19 s^7 + 5.833e-15 s^6 + 5.133e-14 s^5 + 7.917e-10 s^4 + 4.574e-09 s^3 + 4.643e-05 s^2 + 0.0001326 s + 1 5.277e-10 s^4 + 2.111e-09 s^3 + 6.632e-05 s^2 + 0.0001194 s + 2 2: ------------------------------------------------------------------------------------------------------------------------------- 6.189e-20 s^8 + 4.951e-19 s^7 + 1.633e-14 s^6 + 9.566e-14 s^5 + 1.583e-09 s^4 + 5.981e-09 s^3 + 6.632e-05 s^2 + 0.0001194 s + 1 Continuous-time transfer function.
s = tf('s');
A.*s
ans = From input 1 to output... s 1: ------------------------------- 6.631e-06 s^2 + 2.653e-05 s + 1 s 2: ------------------------------- 2.653e-05 s^2 + 2.653e-05 s + 1 From input 2 to output... s 1: ------------------------------- 1.326e-05 s^2 + 3.979e-05 s + 1 s 2: ------------------------------- 1.326e-05 s^2 + 2.653e-05 s + 1 Continuous-time transfer function.
A^(-1)
ans = From input 1 to output... 8.842e-06 s^6 + 7.074e-05 s^5 + 2.334 s^4 + 11 s^3 + 1.759e05 s^2 + 3.519e05 s + 3.79e09 1: ---------------------------------------------------------------------------------------- s^4 + 3.333 s^3 + 7.54e04 s^2 + 5.027e04 s + 4.403e-07 -4.421e-06 s^6 - 3.979e-05 s^5 - 1.333 s^4 - 7.667 s^3 - 1.257e05 s^2 - 3.519e05 s - 3.79e09 2: -------------------------------------------------------------------------------------------- s^4 + 3.333 s^3 + 7.54e04 s^2 + 5.027e04 s + 4.403e-07 From input 2 to output... -8.842e-06 s^6 - 6.189e-05 s^5 - 2.333 s^4 - 9.333 s^3 - 1.759e05 s^2 - 3.016e05 s - 3.79e09 1: -------------------------------------------------------------------------------------------- s^4 + 3.333 s^3 + 7.54e04 s^2 + 5.027e04 s - 3.418e-07 1.768e-05 s^6 + 0.0001061 s^5 + 3.334 s^4 + 12.67 s^3 + 2.011e05 s^2 + 3.519e05 s + 3.79e09 2: ------------------------------------------------------------------------------------------- s^4 + 3.333 s^3 + 7.54e04 s^2 + 5.027e04 s - 3.418e-07 Continuous-time transfer function.
Kind regards,
Robert

Community Treasure Hunt

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

Start Hunting!

Translated by