Basic Concepts¶
This page summarizes the data and model conventions used by pyvrft.
Signals¶
Input and output signals are represented as NumPy matrices shaped (N, n):
Nis the number of samples.nis the number of inputs or outputs.
For a SISO system, use one-column arrays shaped (N, 1) rather than one-dimensional vectors.
Transfer functions¶
pyvrft uses SciPy discrete-time transfer functions, usually created with dt=1:
When a numerator is one, use [1] rather than [0, 1] to avoid SciPy warnings.
SISO systems¶
For SISO systems, some APIs accept a transfer function directly. Internally, pyvrft converts it to the same nested-list format used for MIMO systems.
Td = signal.TransferFunction([0.2], [1, -0.8], dt=1)
L = signal.TransferFunction([0.25], [1, -0.75], dt=1)
MIMO transfer matrices¶
MIMO transfer functions are represented as nested Python lists. The first index is the output and the second index is the input.
Zero entries are written as the literal value 0:
Controller structure¶
The controller structure C specifies the basis transfer functions used to estimate the controller parameters.
Each C[i][j] entry is a list of transfer functions for the subcontroller from output j to input i.
Cpi = [
[signal.TransferFunction([1, 0], [1, -1], dt=1)],
[signal.TransferFunction([1], [1, -1], dt=1)],
]
C = [
[Cpi, Cpi],
[Cpi, Cpi],
]
Use an empty list [] when a subcontroller is absent.
The parameter vector returned by vrft.design is stacked by controller block, following the order documented in vrft/control.py.
Instrumental variables¶
The third argument of vrft.design is y_iv, the output data used for instrumental variables.
Use the same output data for least-squares VRFT:
Use a second output data set for instrumental-variable VRFT:
VRFT design objects¶
The main design call is:
where:
Tdis the desired closed-loop reference model.Cis the controller structure.Lis the VRFT pre-filter.