Package controlsystems :: Module discretization
[hide private]

Module discretization

source code

Transfer Functions discretization

This module implements some numerical methods to discretize the Transfer Functions on the time domain.

Functions [hide private]
 
Euler(g, sample_time, total_time)
Euler Method
source code
 
RungeKutta2(g, sample_time, total_time)
RungeKutta2 Method
source code
 
RungeKutta3(g, sample_time, total_time)
RungeKutta3 Method
source code
 
RungeKutta4(g, sample_time, total_time)
RungeKutta4 Method
source code
Variables [hide private]
  __package__ = 'controlsystems'
Function Details [hide private]

Euler(g, sample_time, total_time)

source code 

Euler Method

Returns the points of the step response of the transfer function 'g', discretized with the Euler method, using the sample time 'sample_time' on 'total_time' seconds. For example:

>>> g = TransferFunction([1], [1, 2, 3])
>>> t, y = Euler(g, 0.01, 10)
>>> print t
(prints a vector of times 0-10s, with the sample time 0.01s)
>>> print y
(prints a vector of points, with the same size of 't')

RungeKutta2(g, sample_time, total_time)

source code 

RungeKutta2 Method

Returns the points of the step response to the transfer function 'g', discretized with the Runge Kutta (order 2) method, using the sample time 'sample_time' on 'total_time' seconds. For example:

>>> g = TransferFunction([1], [1, 2, 3])
>>> t, y = RungeKutta2(g, 0.01, 10)
>>> print t
(prints a vector of times 0-10s, with the sample time 0.01s)
>>> print y
(prints a vector of points, with the same size of 't')

RungeKutta3(g, sample_time, total_time)

source code 

RungeKutta3 Method

Returns the points of the step response to the transfer function 'g', discretized with the Runge Kutta (order 3) method, using the sample time 'sample_time' on 'total_time' seconds. For example:

>>> g = TransferFunction([1], [1, 2, 3])
>>> t, y = RungeKutta3(g, 0.01, 10)
>>> print t
(prints a vector of times 0-10s, with the sample time 0.01s)
>>> print y
(prints a vector of points, with the same size of 't')

RungeKutta4(g, sample_time, total_time)

source code 

RungeKutta4 Method

Returns the points of the step response to the transfer function 'g', discretized with the Runge Kutta (order 4) method, using the sample time 'sample_time' on 'total_time' seconds. For example:

>>> g = TransferFunction([1], [1, 2, 3])
>>> t, y = RungeKutta4(g, 0.01, 10)
>>> print t
(prints a vector of times 0-10s, with the sample time 0.01s)
>>> print y
(prints a vector of points, with the same size of 't')