Skip to content

bode() returns only phases in interval +/- 180° #422

@stephans3

Description

@stephans3

If I want to determine the phase at some frequency using bode(G, w) with w as a 1-element vector, bode() only returns values in the interval (-180°, 180°).

This is a problem in case of higher-order systems or delay systems with phases below -180°.

This problem does not occur for vectors w with n>1 elements.

So is it a bug or a feature? :D

G = tf(1, [1, 3, 3, 1])
bode(G, [1.7]) # ϕ = -178°
bode(G, [1.78]) # ϕ = 177° is wrong, should be ϕ=-360° + 177° = -183°

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