fix timebase processing in frd, zpk by murrayrm · Pull Request #1064 · python-control/python-control

This PR addresses issue #1062 by making sure that timebases are handled uniformly in all system creation factory functions:

  • For ss, tf, frd, and zpk, use either an additional argument specifying the sampling time or use the dt keyword (using both generates a warning).
  • For nlsys, use the dt keyword
  • If no timebase is specified, use the default timebase set by config.defaults['control.default_dt'], which is 0 (continuous time) unless you change it.
    It was the last of these that was the problem in zpk: it was defaulting to None and that was later interpreted as a discrete time system.

Also added unit tests to make sure everything is consistent across the different factory functions.