Skip to main content

Control System Design Toolbox in Python for Coefficient Diagram Method (CDM)

Project description

cdmtb

Control System Design Toolbox in Python for Coefficient Diagram Method (CDM)

Coefficient Diagram Method (CDM) is control system design method proposed by Retired Prof. Shunji Manabe. The basic tutorial is available from Manabe's CDM Tutorial. CDM is an unique control system design method using an algegraic control design approach based on the coefficient of characteristic polynomials. The design tradeoff between stability and the response and the robustness analysis can be conducted in the coefficient diageam.

The detail of CDM is described in CDM Book[^1].

[^1]: Shunji Manabe, Young Chol Kim, Coefficient Diagram Method for Control System Design, Springer, 2021

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install cdmtb

Simple example

A simple example for motor control described in section 3.5 in CDM Book is shown as follows:

The system diagram of motor controller: motor controller

The sample of Python code:

import numpy as np
import control as ct
from cdmtb import cdia, g2c

s = ct.tf('s')

# plant definition
tau_v, tau_m = 0.25, 1

Ap = (tau_v*s+1)*(tau_m*s+1)*s
Bp = 1+0*s

# controller parameters
nc = 0  # Ac = l0 (=1)
mc = 1  # Bc = k1s+k0

gr = np.array([2.5, 2])
taur = 1

# controller gain calculation
P, Ac, Bc = g2c(Ap, Bp, nc, mc, gr, taur)
k1, k0 = Bc.num[0][0]
Ba = k0

# plot CDM
opt_p = [k1*Bp*s, k0*Bp, Ap]
leg_opt_p = ['$k_1B_ps$', '$k_0B_p$', '$A_p$']
cdia(P, opt_p, leg_opt_p)

# plot closed-loop step response
sys_cl = Ba*Bp/P
ct.step_response(sys_cl).plot()

The CDM is shown as follows: CDM plot

It shows the coeffficient of characsteric polynomials, the stability index $\gamma$, the stability index limit $\gamma^*$. The contribution each feedback gain is also shown in the CDM.

The step response is shown as follows: step response plot

License

cdmtb is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdmtb-0.2.1.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

cdmtb-0.2.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file cdmtb-0.2.1.tar.gz.

File metadata

  • Download URL: cdmtb-0.2.1.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for cdmtb-0.2.1.tar.gz
Algorithm Hash digest
SHA256 79a955eefb79706b01becc1a41c9cba0acc6728475fd6d19d5825f0c52714cdd
MD5 622ac190a471a2c34dc5eb435d8d5ed9
BLAKE2b-256 6d1102e75b6f14857b5cdd1f3bd010f74916d56efa5ed9854b5cc26b46468110

See more details on using hashes here.

File details

Details for the file cdmtb-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: cdmtb-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for cdmtb-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8eae95ebeee78020d93fcce962e06c2d1648c00adb1115c94e7b6d0fd853e5c
MD5 f4cb9b66b6582f0ea1f6d78f7112b5d4
BLAKE2b-256 0b1d654ee2ab69540b4c31ec5c9a23c14c14f66370a19fbab419477ee3de5e71

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page