9
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ 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. $\endgroup$ Nov 26, 2012 at 16:45
  • 5
    $\begingroup$ Asking and answering your own question is specifically encouraged as a way of passing your own hard earned knowledge onto others. $\endgroup$
    – rcollyer
    Nov 26, 2012 at 16:52
  • 1
    $\begingroup$ See also this $\endgroup$
    – Szabolcs
    Nov 26, 2012 at 16:52

1 Answer 1

9
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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