cdmtb


Namecdmtb JSON
Version 0.2.4 PyPI version JSON
download
home_pageNone
SummaryControl System Design Toolbox in Python for Coefficient Diagram Method (CDM)
upload_time2024-08-18 11:33:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords cdm control system design
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](http://www.cityfujisawa.ne.jp/~manabes/CDMRef2011-8-3/BriefTutorialCdm(AC028102)2002b.pdf).
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](https://img.shields.io/pypi/v/cdmtb.svg)](https://pypi.org/project/cdmtb)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cdmtb.svg)](https://pypi.org/project/cdmtb)

-----

## Table of Contents

- [Installation](#installation)
- [License](#license)

## Installation

```console
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:
<img src="docs/system_motor.png" alt="motor controller" title="motor controller">

The sample of Python code:
```python
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:
<img src="docs/t1_cdm.png" alt="CDM plot" title="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:
<img src="docs/t1_step.png" alt="step response plot" title="step response plot">

## License

`cdmtb` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cdmtb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "CDM, Control System Design",
    "author": null,
    "author_email": "Rui Hirokawa <rui.hirokawa@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/9d/1c/4fa45354a3dc15e50fc0e8055066fd936b051ade1fdfa4ef278a6abd791f/cdmtb-0.2.4.tar.gz",
    "platform": null,
    "description": "# cdmtb\nControl System Design Toolbox in Python for Coefficient Diagram Method (CDM) \n\nCoefficient Diagram Method (CDM) is control system design method proposed by Retired Prof. Shunji Manabe. The basic tutorial is available from [Manabe's CDM Tutorial](http://www.cityfujisawa.ne.jp/~manabes/CDMRef2011-8-3/BriefTutorialCdm(AC028102)2002b.pdf).\nCDM 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.\n\nThe detail of CDM is described in CDM Book[^1].\n\n[^1]: Shunji Manabe, Young Chol Kim, Coefficient Diagram Method for Control System Design, Springer, 2021\n\n[![PyPI - Version](https://img.shields.io/pypi/v/cdmtb.svg)](https://pypi.org/project/cdmtb)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cdmtb.svg)](https://pypi.org/project/cdmtb)\n\n-----\n\n## Table of Contents\n\n- [Installation](#installation)\n- [License](#license)\n\n## Installation\n\n```console\npip install cdmtb\n```\n\n## Simple example\n\nA simple example for motor control described in section 3.5 in CDM Book is shown as follows:\n\nThe system diagram of motor controller:\n<img src=\"docs/system_motor.png\" alt=\"motor controller\" title=\"motor controller\">\n\nThe sample of Python code:\n```python\nimport numpy as np\nimport control as ct\nfrom cdmtb import cdia, g2c\n\ns = ct.tf('s')\n\n# plant definition\ntau_v, tau_m = 0.25, 1\n\nAp = (tau_v*s+1)*(tau_m*s+1)*s\nBp = 1+0*s\n\n# controller parameters\nnc = 0  # Ac = l0 (=1)\nmc = 1  # Bc = k1s+k0\n\ngr = np.array([2.5, 2])\ntaur = 1\n\n# controller gain calculation\nP, Ac, Bc = g2c(Ap, Bp, nc, mc, gr, taur)\nk1, k0 = Bc.num[0][0]\nBa = k0\n\n# plot CDM\nopt_p = [k1*Bp*s, k0*Bp, Ap]\nleg_opt_p = ['$k_1B_ps$', '$k_0B_p$', '$A_p$']\ncdia(P, opt_p, leg_opt_p)\n\n# plot closed-loop step response\nsys_cl = Ba*Bp/P\nct.step_response(sys_cl).plot()\n```\n\nThe CDM is shown as follows:\n<img src=\"docs/t1_cdm.png\" alt=\"CDM plot\" title=\"CDM plot\">\n\nIt 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.\n\nThe step response is shown as follows:\n<img src=\"docs/t1_step.png\" alt=\"step response plot\" title=\"step response plot\">\n\n## License\n\n`cdmtb` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Control System Design Toolbox in Python for Coefficient Diagram Method (CDM)",
    "version": "0.2.4",
    "project_urls": {
        "Documentation": "https://github.com/hirokawa/cdmtb#readme",
        "Issues": "https://github.com/hiirokawa/cdmtb/issues",
        "Source": "https://github.com/hiirokawa/cdmtb"
    },
    "split_keywords": [
        "cdm",
        " control system design"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b182fec2c2166e1dfb97fff2696cf6d6d2d6eb5b8b9df0870e2b87260b255a4",
                "md5": "41f5e8400188389392c3dc89b5a227de",
                "sha256": "2e43c03227676689aa6be901ede91ea7d73bab28b8ba25df016873eac5a21d08"
            },
            "downloads": -1,
            "filename": "cdmtb-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "41f5e8400188389392c3dc89b5a227de",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6011,
            "upload_time": "2024-08-18T11:33:33",
            "upload_time_iso_8601": "2024-08-18T11:33:33.087441Z",
            "url": "https://files.pythonhosted.org/packages/3b/18/2fec2c2166e1dfb97fff2696cf6d6d2d6eb5b8b9df0870e2b87260b255a4/cdmtb-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d1c4fa45354a3dc15e50fc0e8055066fd936b051ade1fdfa4ef278a6abd791f",
                "md5": "4d78b1db27dc8540fbac70675000810b",
                "sha256": "f9b2cd842daee649ea7b8e65d45590c0e950b9f417997f043f32a48220c820aa"
            },
            "downloads": -1,
            "filename": "cdmtb-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4d78b1db27dc8540fbac70675000810b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 44435,
            "upload_time": "2024-08-18T11:33:34",
            "upload_time_iso_8601": "2024-08-18T11:33:34.712900Z",
            "url": "https://files.pythonhosted.org/packages/9d/1c/4fa45354a3dc15e50fc0e8055066fd936b051ade1fdfa4ef278a6abd791f/cdmtb-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-18 11:33:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hirokawa",
    "github_project": "cdmtb#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cdmtb"
}
        
Elapsed time: 0.29585s