add zpk() function by murrayrm · Pull Request #816 · python-control/python-control
This PR adds the function zpk, which creates a transfer function (as a NamedIOSystem) from a zero, pole, gain representation. This responds to issue #749.
Also added in code to make sure that signal names are copied correctly in various conversions, removing some comments entered in PR #804. In _convert_to_transfer_function this involved removing renaming from the low level function, as documented in the comment string.
Notes:
-
Unlike in MATLAB and SciPy, which have zpk classes, here we just create a transfer function from the zpk data. That seems like the most common use case.
-
In the
matlabmodule there are also functionszpk2ssandzpk2tfthat implement lower level behavior (eg, zpk2ss returns A, B, C, D). This is similar to MATLAB. if you want to get aStateSpacesystem from a zpk representation, usesys = ct.ss(ct.zpk(zeros, poles, gain)). -
Unit tests and updated documentation are also included.