Skip to content

Bode plots use Hz instead of rad/sec in MATLAB compatibility mode #373

@paulvicioso

Description

@paulvicioso

Hi everyone,

When I try the bode function from the control.matlab library to plot the Bode of a simple function (H(s)=1/(s+1)) I'm getting the wrong angular frequencies (shifted one decade). In other words, the break frequency is at 0.1 rad/s instead of 1.0 rad/s (see image). I'm not sure if this is an issue or I'm just doing something wrong. Could you please help me with this problem.

My system is a macOS Catalina 10.15.3 and I'm using Python 3.7.5.

import numpy as np
import control.matlab as ml
import matplotlib.pyplot as plt

num = np.array([1])
den = np.array([1, 1])

G = ml.tf(num, den)

print(G)

mag, phase, freq = ml.bode(G)
plt.show()

Bode_plot

Thank you

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy