Module sf
[frames] | no frames]

Module sf

Class and some supporting functions for representing and manipulating system functions.

Classes
  SystemFunction
Represent a system function as a ratio of polynomials in R
  DifferenceEquation
Represent a difference equation in a form that makes it easy to simulate.
Functions
 
Cascade(sf1, sf2)
Returns: SystemFunction representing the cascade of sf1 and sf2
 
FeedforwardAdd(sf1, sf2)
Returns: SystemFunction representing the sum of sf1 and sf2; this models the situation when the two component systems have the same input and the output of the whole system is the sum of the outputs of the components.
 
FeedforwardSubtract(sf1, sf2)
Returns: SystemFunction representing the difference of sf1 and sf2; this models the situation when the two component systems have the same input and the output of the whole system is the output of the first component minus the output of the second component.
 
FeedbackSubtract(sf1, sf2=None)
Returns: SystemFunction representing the result of feeding the output of sf1 back, with (optionally) sf2 on the feedback path, subtracting it from the input, and feeding the resulting signal into sf1.
 
FeedbackAdd(sf1, sf2=None)
Returns: SystemFunction representing the result of feeding the output of sf1 back, with (optionally) sf2 on the feedback path, adding it to the input, and feeding the resulting signal into sf1.
 
Sum(sf1, sf2)
Returns: SystemFunction representing the system that sums the outputs of the two systems
 
Gain(k)
Returns: SystemFunction representing a system that multiplies the input signal by k.
 
R()
Returns: SystemFunction representing a system that delays the input signal by one step.
 
periodOfPole(p)
Returns: period = 2 pi / phase of pole or None (if phase is 0)
 
complexPolar(p)
Returns: polar representation as a pair of r, theta
Variables
  __package__ = None
Function Details

Cascade(sf1, sf2)

 
Parameters:
  • sf1 - SystemFunction
  • sf2 - SystemFunction
Returns:
SystemFunction representing the cascade of sf1 and sf2

FeedforwardAdd(sf1, sf2)

 
Parameters:
  • sf1 - SystemFunction
  • sf2 - SystemFunction
Returns:
SystemFunction representing the sum of sf1 and sf2; this models the situation when the two component systems have the same input and the output of the whole system is the sum of the outputs of the components.

FeedforwardSubtract(sf1, sf2)

 
Parameters:
  • sf1 - SystemFunction
  • sf2 - SystemFunction
Returns:
SystemFunction representing the difference of sf1 and sf2; this models the situation when the two component systems have the same input and the output of the whole system is the output of the first component minus the output of the second component.

FeedbackSubtract(sf1, sf2=None)

 
Parameters:
  • sf1 - SystemFunction
  • sf2 - SystemFunction
Returns:
SystemFunction representing the result of feeding the output of sf1 back, with (optionally) sf2 on the feedback path, subtracting it from the input, and feeding the resulting signal into sf1. This situation can be characterized with Black's formula.

FeedbackAdd(sf1, sf2=None)

 
Parameters:
  • sf1 - SystemFunction
  • sf2 - SystemFunction
Returns:
SystemFunction representing the result of feeding the output of sf1 back, with (optionally) sf2 on the feedback path, adding it to the input, and feeding the resulting signal into sf1.

Sum(sf1, sf2)

 
Parameters:
  • sf1 - SystemFunction
  • sf2 - SystemFunction
Returns:
SystemFunction representing the system that sums the outputs of the two systems

Gain(k)

 
Parameters:
  • k - gain parameter
Returns:
SystemFunction representing a system that multiplies the input signal by k.

R()

 
Returns:
SystemFunction representing a system that delays the input signal by one step.

periodOfPole(p)

 
Parameters:
  • p - int, float, or complex number
Returns:
period = 2 pi / phase of pole or None (if phase is 0)

complexPolar(p)

 
Parameters:
  • p - int, float, or complex number
Returns:
polar representation as a pair of r, theta