Drake
Drake C++ Documentation
TransferFunction Class Reference

Detailed Description

Represents a linear-time-invariant (LTI) system in transfer function form, e.g.

complex rational functions corresponding to the Laplace transform or z-transform of the impulse response (https://en.wikipedia.org/wiki/Transfer_function).

For example, to create the transfer function H(s) = 1/(s + 1), you can write:

TransferFunction H(1.0 / (s + 1.0));

To create the transfer function H(z) = 1/(z - 0.5), you can write:

double time_step = 0.1;
TransferFunction H(1.0 / (z - 0.5), time_step);

Note that TransferFunction is not a LeafSystem. To use it in the Systems framework, you must convert it to state-space form, represented by LinearSystem.

#include <drake/systems/primitives/transfer_function.h>

Public Member Functions

 TransferFunction ()
 Constructs a zero-input, zero-output (continuous-time) transfer function. More...
 
 TransferFunction (MatrixX< symbolic::RationalFunction > H, double time_step=0.0)
 Constructs a transfer function from the symbolic form. More...
 
 TransferFunction (symbolic::RationalFunction H, double time_step=0.0)
 Convenience overload for single-input, single-output (SISO) systems. More...
 
 ~TransferFunction ()=default
 TODO(russt): Construct a TransferFunction from a LinearSystem once we have more symbolic support for complex numbers (#20159). More...
 
const MatrixX< symbolic::RationalFunction > & H () const
 Returns the transfer function matrix. More...
 
double time_step () const
 Returns the time step. More...
 
Does not allow copy, move, or assignment
 TransferFunction (const TransferFunction &)=delete
 
TransferFunctionoperator= (const TransferFunction &)=delete
 
 TransferFunction (TransferFunction &&)=delete
 
TransferFunctionoperator= (TransferFunction &&)=delete
 

Static Public Member Functions

static symbolic::RationalFunction s ()
 Returns a symbolic::RationalFunction s which can be used to build a continuous-time transfer function symbolically. More...
 
static symbolic::Variable s_var ()
 Returns the singleton symbolic::Variable denoting the complex frequency (σ+jω) used in the Laplace transform for continuous-time transfer functions. More...
 
static symbolic::RationalFunction z ()
 Returns a symbolic::RationalFunction s which can be used to build a discrete-time transfer function symbolically. More...
 
static symbolic::Variable z_var ()
 Returns the singleton symbolic::Variable denoting the complex frequency (σ+jω) used in the Z transform for discrete-time transfer functions. More...
 

Constructor & Destructor Documentation

◆ TransferFunction() [1/5]

TransferFunction ( const TransferFunction )
delete

◆ TransferFunction() [2/5]

◆ TransferFunction() [3/5]

Constructs a zero-input, zero-output (continuous-time) transfer function.

◆ TransferFunction() [4/5]

TransferFunction ( MatrixX< symbolic::RationalFunction H,
double  time_step = 0.0 
)
explicit

Constructs a transfer function from the symbolic form.

If time_step is zero, then the model is of a continuous-time system, and H must only be a function of s(). If time_step > 0, then the model is of a discrete-time system, and H must only be a function of z().

Exceptions
std::exceptionif time_step is negative.
std::exceptionif H has variables other than s() or z(), as described above.

◆ TransferFunction() [5/5]

TransferFunction ( symbolic::RationalFunction  H,
double  time_step = 0.0 
)
explicit

Convenience overload for single-input, single-output (SISO) systems.

◆ ~TransferFunction()

~TransferFunction ( )
default

TODO(russt): Construct a TransferFunction from a LinearSystem once we have more symbolic support for complex numbers (#20159).

Member Function Documentation

◆ H()

const MatrixX<symbolic::RationalFunction>& H ( ) const

Returns the transfer function matrix.

◆ operator=() [1/2]

TransferFunction& operator= ( TransferFunction &&  )
delete

◆ operator=() [2/2]

TransferFunction& operator= ( const TransferFunction )
delete

◆ s()

static symbolic::RationalFunction s ( )
static

Returns a symbolic::RationalFunction s which can be used to build a continuous-time transfer function symbolically.

◆ s_var()

static symbolic::Variable s_var ( )
static

Returns the singleton symbolic::Variable denoting the complex frequency (σ+jω) used in the Laplace transform for continuous-time transfer functions.

◆ time_step()

double time_step ( ) const

Returns the time step.

◆ z()

static symbolic::RationalFunction z ( )
static

Returns a symbolic::RationalFunction s which can be used to build a discrete-time transfer function symbolically.

◆ z_var()

static symbolic::Variable z_var ( )
static

Returns the singleton symbolic::Variable denoting the complex frequency (σ+jω) used in the Z transform for discrete-time transfer functions.


The documentation for this class was generated from the following file: