python-controlを使用して、メカニカルシステムの状態空間モデルから伝達関数(Bode Plot)を計算・表示する
calc_bodeThis skill builds a state-space model from a mechanical system defined by mass (M), stiffness (K), and damping (C) matrices, and generates a frequency response (Bode Plot) using the python-control library.
System Matrix Acquisition:
State-Space Construction:
Application of python-control:
import control as ct.sys = ct.ss(A, B, C, D).IO Selection (for MIMO systems):
sys_siso = sys[output_idx, input_idx] to select the desired input/output channel.Plotting and Analysis:
ct.bode_plot(sys_siso, ...).Hz=True, dB=True, and deg=True.sys.poles().np.logspace(np.log10(start_hz * 2*np.pi), np.log10(end_hz * 2*np.pi), n_points), while specifying Hz=True in bode_plot.