Skip to content

guilab104/ddpid-python

Repository files navigation

Pythonではじめる データ駆動PID制御

本リポジトリは書籍「Pythonではじめる データ駆動PID制御」のサポートページです。書籍で解説しているデータ駆動型制御およびデータ駆動型シミュレーション手法のサンプルコードを提供しています。

This repository is the support page for the book "Introduction to Data-Driven PID Control with Python" (written in Japanese). It provides sample code for the data-driven control and data-driven simulation methods described in the book.

環境構築 / Setup

動作要件 / Requirements

  • Python 3.10 および 3.14 で動作確認済み / Tested with Python 3.10 and 3.14
  • 依存パッケージは requirements.txt を参照 / See requirements.txt for dependencies

Windows

launch.bat をダブルクリックすると、仮想環境の作成、依存パッケージのインストール、Jupyter Notebook の起動までを自動で行います。

Double-click launch.bat to automatically create a virtual environment, install dependencies, and launch Jupyter Notebook.

手動セットアップ / Manual Setup

python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate.bat
pip install --upgrade pip
pip install -r requirements.txt
python -m ipykernel install --user --name=venv --display-name="Python (Control Sim)"
jupyter notebook

リポジトリ構成 / Repository Structure

ddpid-python/
  control_sim.py          ... シミュレーションフレームワーク / Simulation framework
  docs/
    control_sim.md        ... APIリファレンス / API reference
  ch4_plant_motor.ipynb   ... 第4章 モータ速度制御系
  ch4_plant_smd.ipynb     ... 第4章 バネマスダンパ位置制御系
  ch5_ift.ipynb           ... 第5章 IFT法
  ch5_vrft.ipynb          ... 第5章 VRFT法
  ch5_ncbt.ipynb          ... 第5章 NCbT法
  ch5_frit.ipynb          ... 第5章 FRIT法
  ch5_vimt.ipynb          ... 第5章 VIMT法
  ch6_subspace.ipynb      ... 第6章 部分空間法
  ch6_erit.ipynb          ... 第6章 ERIT法
  ch6_vtiger.ipynb        ... 第6章 V-Tiger法
  ch6_cdds.ipynb          ... 第6章 CDDS法 (最小二乗法)
  ch6_cdds_direct.ipynb   ... 第6章 CDDS法 (直接最適化)
  ch6_cdds_direct_sat.ipynb . 第6章 CDDS法 (入力飽和あり)

ノートブック一覧 / Notebooks

第4章: シミュレーション環境の準備 / Chapter 4: Simulation Environment

ノートブック / Notebook 内容 / Content
ch4_plant_motor.ipynb モータ速度制御系のプラントモデル / Motor velocity control plant model
ch4_plant_smd.ipynb バネマスダンパ位置制御系のプラントモデル / Spring-mass-damper position control plant model

第5章: データ駆動型制御 / Chapter 5: Data-Driven Control

ノートブック / Notebook 手法 / Method 解法 / Solver
ch5_ift.ipynb IFT (Iterative Feedback Tuning) ニュートン法 / Newton's method
ch5_vrft.ipynb VRFT (Virtual Reference Feedback Tuning) 最小二乗法 / Least squares
ch5_ncbt.ipynb NCbT (Noniterative Correlation-based Tuning) 最小二乗法 / Least squares
ch5_frit.ipynb FRIT (Fictitious Reference Iterative Tuning) 差分進化法 / Differential evolution
ch5_vimt.ipynb VIMT (Virtual Internal Model Tuning) 最小二乗法 / Least squares

第6章: データ駆動型シミュレーション / Chapter 6: Data-Driven Simulation

ノートブック / Notebook 手法 / Method 計算手法 / Computation
ch6_subspace.ipynb 部分空間法 / Subspace method ハンケル行列 / Hankel matrix
ch6_erit.ipynb ERIT (Estimated Response Iterative Tuning) 伝達関数比 / Transfer function ratio
ch6_vtiger.ipynb V-Tiger DFT/IDFT
ch6_cdds.ipynb CDDS (最小二乗法 / Least squares) 畳み込み / Convolution
ch6_cdds_direct.ipynb CDDS (直接最適化 / Direct optimization) 畳み込み / Convolution
ch6_cdds_direct_sat.ipynb CDDS (入力飽和あり / With saturation) 畳み込み / Convolution

各ノートブックではモータ速度制御系とバネマスダンパ位置制御系の2つの制御対象に対してシミュレーションを実行します。

Each notebook runs simulations on two plants: a motor velocity control system and a spring-mass-damper position control system.

シミュレーションフレームワーク / Simulation Framework

control_sim.py は本書のシミュレーションで使用する共通ライブラリです。詳細は docs/control_sim.md を参照してください。

control_sim.py is the common library used for simulations in this book. See docs/control_sim.md for details.

ライセンス / License

MIT License. 詳細は LICENSE を参照してください。 / See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages