Home | Trees | Indices | Help |
|
---|
|
object --+ | TransferFunction
TransferFunction type
This class implements the TransferFunction type, based on the Polynomial type. The TransferFunction object uses 2 polynomials to store the numerator and the denominator. For example:
>>> a = TransferFunction([1], [1, 2, 3]) >>> print a Transfer Function: . . 1 ------------ s^2 + 2s + 3
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Initialization of TransferFunction object This method initialize a TransferFunction object.
|
String representation This method returns the string representation of the transfer functions. For example: Transfer Function: . . 1 ------------ s^2 + 2s + 3
|
Operation of addition This method returns a TransferFunction object with the result of the addition of the TransferFunction 'self' and the TransferFunction 'tf'. For example: >>> a = TransferFunction([1], [1, 2, 3]) >>> b = TransferFunction([1], [2, 3, 4]) >>> c = a + b >>> print c Transfer Function: . . 3s^2 + 5s + 7 ------------------------------ 2s^4 + 7s^3 + 16s^2 + 17s + 12 . >>> type(c) <class 'controlsystems.types.TransferFunction'> |
Operation of subtraction This method returns a TransferFunction object with the result of the subtraction of the TransferFunction 'self' and the TransferFunction 'tf'. For example: >>> a = TransferFunction([1], [1, 2, 3]) >>> b = TransferFunction([1], [2, 3, 4]) >>> c = a - b >>> print c Transfer Function: . . s^2 + s + 1 ------------------------------ 2s^4 + 7s^3 + 16s^2 + 17s + 12 . >>> type(c) <class 'controlsystems.types.TransferFunction'> |
Operation of multiplication of polynomials This method returns a TransferFunction object with the result of the multiplication of the TransferFunction 'self'and the TransferFunction 'tf'. for example: >>> a = TransferFunction([1], [1, 2, 3]) >>> b = TransferFunction([1], [2, 3, 4]) >>> c = a * b >>> print c Transfer Function: . . 1 ------------------------------ 2s^4 + 7s^3 + 16s^2 + 17s + 12 . >>> type(c) <class 'controlsystems.types.TransferFunction'> |
Simplify Transfer Functions This method returns a TransferFunction object with the transfer function simplified. For example: >>> a = TransferFunction([3], [3, 6, 9]) >>> print a Transfer Function: . . 3 ------------- 3s^2 + 6s + 9 . >>> b = a.simplify() >>> print b Transfer Function: . . 1 ------------ s^2 + 2s + 3 . >>> type(b) <class 'controlsystems.types.TransferFunction'> Attention: This method is far from perfect, and don't simplify all possible expressions, but it's usable. |
Operation of multiplication between numbers and transfer functions This method returns a TransferFunction object with the result of the multiplication of the TransferFunction 'self' and the number 'a'. For example: >>> a = TransferFunction([1], [1, 2, 3]) >>> b = a.mult(5) >>> print b Transfer Function: . . 5 --------------- 5s^2 + 10s + 15 >>> type(b) <class 'controlsystems.types.TransferFunction'> |
Operation of division of a transfer function per a number This method returns a TransferFunction object with the result of the division of the coefficients of the TransferFunction 'self' and the number 'a'. For example: >>> a = TransferFunction([3], [3, 6, 9]) >>> print a Transfer Function: . . 3 ------------- 3s^2 + 6s + 9 . >>> b = a.div(3) >>> print b Transfer Function: . . 1 ------------ s^2 + 2s + 3 . >>> type(b) <class 'controlsystems.types.TransferFunction'> |
Feedback with unit gain This method returns a TransferFunction object with the result of the unit gain feedback of the transfer function. For example: >>> a = TransferFunction([1], [1, 2, 3]) >>> b = a.feedback_unit() >>> print b Transfer Function: . . s^2 + 2s + 3 ----------------------------- s^4 + 4s^3 + 11s^2 + 14s + 12 . >>> type(b) <class 'controlsystems.types.TransferFunction'> Attention: This method is far from perfect, and don't simplify the expressions, but it's usable. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Nov 19 01:50:56 2009 | http://epydoc.sourceforge.net |