# Extract Transfer Matrix from TransferFunctionModel

I have a MIMO transfer function model, and I'd like to know how to perform arithmetic on this model. For instance, to see the difference between two systems' outputs for arbitrary inputs, I'd like to be able to subtract one transfer matrix from another. However, Mathematica doesn't interpret the difference between TransferFunctionModels as the difference between transfer matrices. Does anyone know how to extract the transfer matrix from a TransferFunctionModel?

m1 = 1/(s + 1);
m2 = 1/(s + 1)^2;

TransferFunctionModel[m1, s][s] - TransferFunctionModel[m2, s][s]


{{-(1/(1 + s)^2) + 1/(1 + s)}}

TransferFunctionModel[
TransferFunctionModel[m1, s][s] - TransferFunctionModel[m2, s][s],
s] == TransferFunctionModel[m1 - m2, s]


True

• For the record, the trick is that a TransferFunctionModel can be called as a function, with s as the input. It returns a matrix, which can then be manipulated as expected. Jul 13 '15 at 12:09