Matlab transfer function problem

  • MATLAB
  • Thread starter MechatronO
  • Start date
  • #1
30
1

Main Question or Discussion Point

I have a transfer function

L(s) = A(s)/B(s)

that I call Ls.

However, when defining

H(s)= L(s)/(1+L(s))

by

Code:
%%
Ls =
 
  -70.6s^2 - 2003 s + 3375
  --------------------------
   s^3 + 119.6 s^2 + 2806 s

%%

Hs = Ls / (1+Ls)
things go wild. The highest exponent power doubles or so and I get several extra poles or zeros. What I should get is

H(s) = A(s) / ( B(s)+A(s) )

which is the exact result. This I can achieve in matlab by

Code:
[As,Bs] = tfdata(Ls,'v');

Hs= tf(As,Bs+As)
and the result from this are exactly the expected.

However, why wont

Code:
 Hs = Ls / (1+Ls)
work?

Are matlabs routines that bad? Or am I doing something wrong?
 

Answers and Replies

  • #2
marcusl
Science Advisor
Gold Member
2,714
382
Is s a vector?
 
  • #3
30
1
No,

s= tf('s');
 
  • #4
marcusl
Science Advisor
Gold Member
2,714
382
Code:
%%
Ls =
 
  -70.6s^2 - 2003 s + 3375
  --------------------------
   s^3 + 119.6 s^2 + 2806 s

%%
[/QUOTE]
This doesn't look like a valid Matlab statement to me. I would write it as 
Ls = ( -70.6s^2 - 2003 s + 3375 ) / ( s^3 + 119.6 s^2 + 2806 s );
(It presumes that s has already been defined earlier.)
 

Related Threads on Matlab transfer function problem

  • Last Post
Replies
1
Views
37K
Replies
1
Views
2K
Replies
6
Views
5K
Replies
0
Views
8K
Replies
7
Views
5K
  • Last Post
Replies
3
Views
11K
  • Last Post
Replies
1
Views
4K
Replies
0
Views
2K
Replies
1
Views
21K
Replies
2
Views
3K
Top