Skip to content

fix timebase processing in frd, zpk #1064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 24, 2024

Conversation

murrayrm
Copy link
Member

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.

@murrayrm murrayrm linked an issue Nov 23, 2024 that may be closed by this pull request
@coveralls
Copy link

Coverage Status

coverage: 94.696% (+0.004%) from 94.692%
when pulling 8b29e45 on murrayrm:fix_frd_timebase-20Nov2024
into d810d5a on python-control:main.

@slivingston slivingston self-requested a review November 23, 2024 03:56
@bnavigator bnavigator merged commit 57b5307 into python-control:main Nov 24, 2024
23 checks passed
@murrayrm murrayrm added this to the 0.10.2 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Different impulse responses for zpk vs tf
4 participants