Group Abstract Group Abstract

Message Boards Message Boards

0
|
12.7K Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

What is the correct syntax for TransferFunctionModel?

Posted 12 years ago
POSTED BY: David Keith
5 Replies
POSTED BY: Fabian Wiek
Posted 10 years ago

If you look under the documentation under the "Scope" drop down, there is an example that shows the correct syntax for the {z, p, g} syntax. The documentation under "Details and Options" should probably include this (as it does for {num, den} syntax).

POSTED BY: David G

Instead of dealing with all those {{{...}}}, I like to just use the standard gain * num(s)/den(s) for everything. Like this:

gain = 5;
zeros = {-1, -2};
poles = {0, -4, -6};
num = Times @@ ((s - #) & /@ zeros);
den = Times @@ ((s - #) & /@ poles);

Now use standard gain * G(s) synatx

 tf = TransferFunctionModel[gain (num/den), s]

The above is simpler for me than writing

 tf = TransferFunctionModel[{{{{-1, -2}}}, {{{0, -4, -6}}}, {{gain}}}, s]

And having to count braces to make sure they match.

POSTED BY: Nasser M. Abbasi
Posted 10 years ago

This exact issue came up for me today; I even tried a variety of list nesting levels, and couldn't get it to work. Thanks! --Todd

POSTED BY: Todd Moyer
Posted 12 years ago

Thanks, Fabian. I was not using lists there were sufficiently deep in nesting.

Best, David

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard