Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Result of the damp function for discrete time systems #646

Closed
Labels
@vincentchoqueuse

Description

@vincentchoqueuse

Hi,

This is my first contribution on GitHub ;)

Problem

The methoddamp() seems to return a wrong result for discrete systems with negative poles

import control as ctlH = ctl.tf([1],[1,0.2],1)H.damp()

Result : RuntimeWarning: invalid value encountered in log

Investigation

The problem seems to come from the type of thepoles variable in thedampmethod of the LTI object

if isdtime(self, strict=True):     splane_poles = np.log(poles)/self.dtelse:      splane_poles = poleswn = absolute(splane_poles)Z = -real(splane_poles)/wnreturn wn, Z, poles

Solution

Thepoles variable must be cast to a numpy complex type as follows

if isdtime(self, strict=True)      splane_poles = np.log(poles.astype(complex))/self.dt...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp