Skip to content

dcgain on discrete-time systems is wrong #114

Description

@roryyorke

dcgain should distinguish between continuous- and discrete-time systems when determining DC gain.

import control
gct=control.tf([1],[1,1])
gcs=control.ss(gct)
gdt=control.sample_system(gct,5e-2,method='zoh')
gds=control.ss(gdt)
print('gct.dcgain()',gct.dcgain())
print('gcs.dcgain()',gcs.dcgain())
print('gdt.dcgain()',gdt.dcgain())
print('gds.dcgain()',gds.dcgain())
print('gdt.horner(1)',gdt.horner(1))
print('gds.horner(1)',gds.horner(1))

gives

gct.dcgain() 1.0
gcs.dcgain() 1.0
gdt.dcgain() -0.051271096376024033
gds.dcgain() -0.051271096376024033
gdt.horner(1) [[ 1.+0.j]]
gds.horner(1) [[ 1.]]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions