3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

python-controlで線形システムの固有振動数を求める

Last updated at Posted at 2022-05-11

概要

python-controlで線形システムの固有振動数などの振動特性を求めるには control.matlab.damp が便利

振動特性を算出する control.matlab.damp

線形システムの固有振動数などの振動特性は control.matlab.damp で簡単に算出できる。

wn, damping, poles = control.matlab.damp(sys, doprint=True)
  • 引数
    • sys : 線形システムオブジェクト
    • doprint : 結果の標準出力の有無
  • 戻り値
    • wn : 固有角振動数
    • damping : 減衰比
    • poles : システムの極

control.matlab.damp の使用例

バネマスダンパー系での control.matlab.damp の使用例を示す。

from control import matlab
import numpy as np

m = 5.0
k = 2.0
c = 1.0

A = [[0.0, 1.0], [-k / m, -c / m]]
B = [[0.0], [1.0 / m]]
C = [[1.0, 0.0]]
sys = matlab.ss(A, B, C, 0)

wn, damping, poles = matlab.damp(sys, doprint=True)
標準出力
_____Eigenvalue______ Damping___ Frequency_
      -0.1   +0.6245j     0.1581     0.6325
      -0.1   -0.6245j     0.1581     0.6325

doprint=True による標準出力では単に Frequency と表示されているが、その下の値および戻り値の1番目 wn固有角振動数である。固有振動数が必要な場合は $2\pi$ で除算する。

frequency = wn / 2 / np.pi
print(frequency)
標準出力
[0.10065842 0.10065842]

確認として、固有角振動数と減衰比を次の数式から直接算出してみる。

\omega_n=\sqrt\frac{k}{m}, \zeta=\frac{c}{2\sqrt{mk}}
print("固有角振動数:", np.sqrt(k / m))
print("減衰比:", c / 2 / np.sqrt(m * k))
標準出力
固有角振動数: 0.6324555320336759
減衰比: 0.15811388300841897

control.matlab.damp による出力と整合が確認できる。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?