{ "info": { "author": "xiangyangkan", "author_email": "xiangyangkan@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Build Tools" ], "description": "# PID\u9505\u7089\u71c3\u70e7\u5668\u63a7\u5236\u7b97\u6cd5\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mix-pid)\n![PyPI - License](https://img.shields.io/pypi/l/mix-pid)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/mix-pid)\n![PyPI](https://img.shields.io/pypi/v/mix-pid)\n![PyPI](https://img.shields.io/badge/mixiot-2.0%20%7C%203.0-blue)\n\n\n## \u4f8b\u5b50\n\n```python\nfrom pid import PID\npid = PID(kp=1.0, ki=0.0, kd=0.0,\n set_pressure=0.5,\n thresholds=(-10, 10),\n throttle_limits=((30, 60), (40, 65), (50, 70)),\n output_limits=(None, None),\n auto_mode=True)\npid(input_gear=1, input_pressure=0.4, input_angle=59)\n```\n\n\u5b8c\u6574\u7684API\u6587\u6863\u5728 [\u8fd9\u91cc](https://mix-pid.readthedocs.io/en/latest/simple_pid.html#module-simple_pid.PID).\n\n## \u5b89\u88c5\n```\npip install mix-pid\n```\n\n## \u4f7f\u7528\n\u6bcf\u6b21\u7684\u8c03\u7528\u53cd\u9988\u8fd4\u56de\u6b64\u6b21\u63a8\u8350\u7684\u6cb9\u5634\u6863\u4f4d\u548c\u98ce\u95e8\u89d2\u5ea6\u503c\n```python\noutput_gear, output_angle = pid(input_pressure, input_angle)\n```\n\n### \u53c2\u6570\u8bf4\u660e\n\u8bbe\u7f6e\u76ee\u6807\u538b\u529b\n```python\npid.set_pressure = 0.5\n```\n\n\u8bbe\u7f6eKp, Ki, Kd\u7cfb\u6570\n```python\npid.Ki = 1.0\npid.tunings = (1.0, 0.2, 0.4)\n```\n\n\u8bbe\u7f6e\u5224\u65ad\u51b3\u7b56\u7684\u9608\u503c\n```python\npid.thresholds=(-10, 10)\n```\n\n\u8bbe\u7f6e\u71c3\u70e7\u5668\u4e0d\u540c\u6863\u4f4d\u7684\u98ce\u95e8\u89d2\u5ea6\u9650\u5236\n```python\npid.throttle_limits=((30, 60), (40, 65), (50, 70))\n```\n\n\u8bbe\u7f6ePID\u8f93\u51fa\u9650\u5236\u907f\u514d\u51fa\u73b0[integral windup](https://en.wikipedia.org/wiki/Integral_windup)\n```python\npid.output_limits = (0, 10) # output value will be between 0 and 10\npid.output_limits = (0, None) # output will always be above 0, but with no upper bound\n```\n\n\u8bbe\u7f6e\u624b\u52a8/\u81ea\u52a8\u6a21\u5f0f\n```python\npid.auto_mode=True\npid.auto_mode=False\n```\n\n## \u8bb8\u53ef\u8bc1\nLicensed under the [MIT License](https://github.com/xiangyangkan/pid/blob/master/LICENSE).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xiangyangkan/pid", "keywords": "pid controller control", "license": "", "maintainer": "", "maintainer_email": "", "name": "mix-pid", "package_url": "https://pypi.org/project/mix-pid/", "platform": "", "project_url": "https://pypi.org/project/mix-pid/", "project_urls": { "Documentation": "https://mix-pid.readthedocs.io/", "Homepage": "https://github.com/xiangyangkan/pid" }, "release_url": "https://pypi.org/project/mix-pid/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "\u9505\u7089\u538b\u529b\u7684PID\u63a7\u5236\u7b97\u6cd5", "version": "0.0.2" }, "last_serial": 5707500, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ceddc8e299420333e8550897a47c837a", "sha256": "88d25a9122459cf689f96ad1b62d953017539b8874ca90fb0ac156a105e7c697" }, "downloads": -1, "filename": "mix_pid-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ceddc8e299420333e8550897a47c837a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.3", "size": 2087, "upload_time": "2019-08-21T03:42:02", "url": "https://files.pythonhosted.org/packages/6b/f9/f3907b25c8c7fc128c5dd9222e0af40102f23ed40d05fc07b1539d054cfb/mix_pid-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3fb91a908d2d33a4706300e6ae1f34b6", "sha256": "dd4cc3e38c69dff4b7f01c2c6397d8fb629ae0d0cafd507654fc76b0ae745f6d" }, "downloads": -1, "filename": "mix-pid-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3fb91a908d2d33a4706300e6ae1f34b6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3", "size": 4722, "upload_time": "2019-08-21T03:42:05", "url": "https://files.pythonhosted.org/packages/7d/ad/4618744c9ecc43e542d21817e3a0ec5926f918b582b446fd80fb7a9ebc6b/mix-pid-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "16d1781b94c8eb777a5543c4f3bd0011", "sha256": "36176a346bd3685c819ac15386b867c89d6ad4a3d10b28d46865ae6d2840fc94" }, "downloads": -1, "filename": "mix_pid-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "16d1781b94c8eb777a5543c4f3bd0011", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5305, "upload_time": "2019-08-21T07:19:49", "url": "https://files.pythonhosted.org/packages/b2/fb/252ebe9b03d8cccb5a0fd003f7f615888a0928b69f42a889640b68f70791/mix_pid-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "abbe5a9d783bb4e0b6877ceccb1d185e", "sha256": "bbee17e48a9111b1e30301a767c090fce394ff443cc9a1bdfb4080e6bcc83517" }, "downloads": -1, "filename": "mix-pid-0.0.2.tar.gz", "has_sig": false, "md5_digest": "abbe5a9d783bb4e0b6877ceccb1d185e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5372, "upload_time": "2019-08-21T07:19:51", "url": "https://files.pythonhosted.org/packages/d1/bf/d70e087b62d2e7b70c0dcfbc66556efb69b1e55d697fb589f4c92e80d642/mix-pid-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "16d1781b94c8eb777a5543c4f3bd0011", "sha256": "36176a346bd3685c819ac15386b867c89d6ad4a3d10b28d46865ae6d2840fc94" }, "downloads": -1, "filename": "mix_pid-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "16d1781b94c8eb777a5543c4f3bd0011", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5305, "upload_time": "2019-08-21T07:19:49", "url": "https://files.pythonhosted.org/packages/b2/fb/252ebe9b03d8cccb5a0fd003f7f615888a0928b69f42a889640b68f70791/mix_pid-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "abbe5a9d783bb4e0b6877ceccb1d185e", "sha256": "bbee17e48a9111b1e30301a767c090fce394ff443cc9a1bdfb4080e6bcc83517" }, "downloads": -1, "filename": "mix-pid-0.0.2.tar.gz", "has_sig": false, "md5_digest": "abbe5a9d783bb4e0b6877ceccb1d185e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5372, "upload_time": "2019-08-21T07:19:51", "url": "https://files.pythonhosted.org/packages/d1/bf/d70e087b62d2e7b70c0dcfbc66556efb69b1e55d697fb589f4c92e80d642/mix-pid-0.0.2.tar.gz" } ] }