Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Mathematica has a function to convert TransferFunctionModels to StateSpaceModels:

mytf=TransferFunctionModel[(2 s + 3)/(s^3 + 4 s^2 + 5), s]
StateSpaceModel[mytf]

Is there a corresponding function that will convert to a zero-pole-gain model?

share|improve this question
    
I asked this question simply because I knew the answer and had blogged about it ages ago. If such behaviour is frowned upon, please delete. –  WalkingRandomly Nov 26 '12 at 16:45
3  
Asking and answering your own question is specifically encouraged as a way of passing your own hard earned knowledge onto others. –  rcollyer Nov 26 '12 at 16:52
    
See also this –  Szabolcs Nov 26 '12 at 16:52
add comment

1 Answer

up vote 7 down vote accepted

It turns out that there is a function that will do this but it is hidden from the user a little in an internal function

In[]:= Control`ZeroPoleGainModel[mytf]

Out[]=
Control`ZeroPoleGainModel[{{{{-(3/2)}}}, 
    {1/3 (-4 - 16 (2/(263 - 3 Sqrt[5865]))^(1/3) - 
     (1/2 (263 - 3 Sqrt[5865]))^(1/3)), 
     -(4/3) + 8/3 (1 + I Sqrt[3]) (2/(263 - 3 Sqrt[5865]))^(1/3) +
         1/6 (1 - I Sqrt[3]) (1/2 (263 - 3 Sqrt[5865]))^(1/3), 
     -(4/3) + 8/3 (1 - I Sqrt[3]) (2/(263 - 3 Sqrt[5865]))^(1/3) +
         1/6 (1 + I Sqrt[3]) (1/2 (263 - 3 Sqrt[5865]))^(1/3)}, 
    {{2}}}, s]

original source: http://www.walkingrandomly.com/?p=2799

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.