Matlab Adding two transfer functions

Sam picture Sam · Mar 16, 2013 · Viewed 8k times · Source

I'm trying to add two transfer functions together, for example:

tf1=tf(1,[1 0]);  
tf2=tf(2,[1 0]);  
tsum=tf1+tf2

MATLAB considers tf1 and tf2 as blocks connected in series and therefore multiplies tf1 and tf2 together, the result is:

tsum =

3 s
---
s^2

Continuous-time transfer function.

how can I get MATLAB to return the sum of tf1 and tf2 ? so the transfer function that i'm looking for is:

3
-
s

Answer

Nasser picture Nasser · Mar 16, 2013
EDU>> minreal(tsum)

ans =

  3
  -
  s

Continuous-time transfer function.

see

http://www.mathworks.com/help/control/ref/minreal.html