Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
@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