{"id":65093,"date":"2020-06-19T09:39:41","date_gmt":"2020-06-19T00:39:41","guid":{"rendered":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/?p=65093"},"modified":"2020-06-19T18:11:05","modified_gmt":"2020-06-19T09:11:05","slug":"python-python-control%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2020\/06\/19\/65093\/","title":{"rendered":"Python: Python-Control\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>Python-Control\u3092Anaconda\u3078\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002MATLAB\u4e92\u63db\u6a5f\u80fd\u304c\u3053\u3093\u306a\u306b\u7c21\u5358\u306bPython\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u306f\u601d\u308f\u306a\u304b\u3063\u305f\u3002<\/p>\n<div class=\"hl-surround\" style=\"height:280px;\"><div class=\"hl-main\"><pre>&gt;conda install -c conda-forge control slycot\r\nCollecting package metadata (current_repodata.json): done\r\nSolving environment: done\r\n\r\n## Package Plan ##\r\n\r\n  environment location: C:\\Users\\oshiro\\Anaconda3\r\n\r\n  added \/ updated specs:\r\n    - control\r\n    - slycot\r\n\r\n\r\nThe following packages will be downloaded:\r\n\r\n    package                    |            build\r\n    ---------------------------|-----------------\r\n    ca-certificates-2020.4.5.2 |       hecda079_0         184 KB  conda-forge\r\n    certifi-2020.4.5.2         |   py37hc8dfbb8_0         152 KB  conda-forge\r\n    clangdev-5.0.0             |          flang_3       189.0 MB  conda-forge\r\n    conda-4.8.3                |   py37hc8dfbb8_1         3.1 MB  conda-forge\r\n    control-0.8.3              |           py37_1         350 KB  conda-forge\r\n    libblas-3.8.0              |8_h8933c1f_netlib         188 KB  conda-forge\r\n    libcblas-3.8.0             |8_h8933c1f_netlib          88 KB  conda-forge\r\n    libflang-5.0.0             |h6538335_20180525         519 KB  conda-forge\r\n    liblapack-3.8.0            |8_h8933c1f_netlib         2.7 MB  conda-forge\r\n    openmp-5.0.0               |           vc14_0         576 KB  conda-forge\r\n    python_abi-3.7             |          1_cp37m           4 KB  conda-forge\r\n    slycot-0.4.0.0             |   py37h9a9bad4_1         1.2 MB  conda-forge\r\n    ------------------------------------------------------------\r\n                                           Total:       198.0 MB\r\n\r\nThe following NEW packages will be INSTALLED:\r\n\r\n  clangdev           conda-forge\/win-64::clangdev-5.0.0-flang_3\r\n  control            conda-forge\/win-64::control-0.8.3-py37_1\r\n  libblas            conda-forge\/win-64::libblas-3.8.0-8_h8933c1f_netlib\r\n  libcblas           conda-forge\/win-64::libcblas-3.8.0-8_h8933c1f_netlib\r\n  libflang           conda-forge\/win-64::libflang-5.0.0-h6538335_20180525\r\n  liblapack          conda-forge\/win-64::liblapack-3.8.0-8_h8933c1f_netlib\r\n  openmp             conda-forge\/win-64::openmp-5.0.0-vc14_0\r\n  python_abi         conda-forge\/win-64::python_abi-3.7-1_cp37m\r\n  slycot             conda-forge\/win-64::slycot-0.4.0.0-py37h9a9bad4_1\r\n\r\nThe following packages will be UPDATED:\r\n\r\n  ca-certificates     pkgs\/main::ca-certificates-2020.1.1-0 --&gt; conda-forge::ca-certificates-2020.4.5.2-hecda079_0\r\n  certifi              pkgs\/main::certifi-2020.4.5.1-py37_0 --&gt; conda-forge::certifi-2020.4.5.2-py37hc8dfbb8_0\r\n  conda                       pkgs\/main::conda-4.8.3-py37_0 --&gt; conda-forge::conda-4.8.3-py37hc8dfbb8_1\r\n\r\nThe following packages will be SUPERSEDED by a higher-priority channel:\r\n\r\n  openssl                                         pkgs\/main --&gt; conda-forge\r\n\r\n\r\nProceed ([y]\/n)? y\r\n\r\n\r\nDownloading and Extracting Packages\r\nopenmp-5.0.0         | 576 KB    | ############################################################################ | 100%\r\nclangdev-5.0.0       | 189.0 MB  | ############################################################################ | 100%\r\ncertifi-2020.4.5.2   | 152 KB    | ############################################################################ | 100%\r\nca-certificates-2020 | 184 KB    | ############################################################################ | 100%\r\npython_abi-3.7       | 4 KB      | ############################################################################ | 100%\r\nlibcblas-3.8.0       | 88 KB     | ############################################################################ | 100%\r\nconda-4.8.3          | 3.1 MB    | ############################################################################ | 100%\r\nliblapack-3.8.0      | 2.7 MB    | ############################################################################ | 100%\r\ncontrol-0.8.3        | 350 KB    | ############################################################################ | 100%\r\nslycot-0.4.0.0       | 1.2 MB    | ############################################################################ | 100%\r\nlibblas-3.8.0        | 188 KB    | ############################################################################ | 100%\r\nlibflang-5.0.0       | 519 KB    | ############################################################################ | 100%\r\nPreparing transaction: done\r\nVerifying transaction: done\r\nExecuting transaction: done<\/pre><\/div><\/div>\n<p><strong>\u30b3\u30fc\u30c9\u4f8b<\/strong><\/p>\n<div class=\"hl-surround\" ><div class=\"hl-main\"><pre>from control import matlab                   # MATLAB\u4e92\u63db\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u8aad\u307f\u8fbc\u307f\r\nimport numpy as np                           # \u6570\u5024\u8a08\u7b97\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u8aad\u307f\u8fbc\u307f\r\nfrom matplotlib import pyplot as plt         # \u30b0\u30e9\u30d5\u63cf\u753b\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u8aad\u307f\u8fbc\u307f\r\n\r\nsys1 = matlab.tf([0, 0, 1], [0.1, 0.1, 1.0]) # \u4f1d\u9054\u95a2\u6570\u306e\u8a2d\u5b9a\uff08\u5206\u5b50\u3001\u5206\u6bcd\u591a\u9805\u5f0f\uff09\r\ny1, t1 = matlab.step(sys1, T = np.arange(0, 10, 0.01))  # \u30b9\u30c6\u30c3\u30d7\u5fdc\u7b54\u306e\u7b97\u51fa\uff08t=0\uff5e10\uff09\r\nplt.plot(t1, y1)                                        # \u5fdc\u7b54\u63cf\u753b\r\n\r\nbd = matlab.bode(sys1)                       # \u30dc\u30fc\u30c9\u7dda\u56f3\u306e\u63cf\u753b<\/pre><\/div><\/div>\n<p><a href=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/step-sample.png\"><img decoding=\"async\" src=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/step-sample.png\" alt=\"\" width=\"300\" class=\"aligncenter size-full wp-image-65099\" srcset=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/step-sample.png 372w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/step-sample-300x200.png 300w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/step-sample-150x100.png 150w\" sizes=\"(max-width: 372px) 100vw, 372px\" \/><\/a><br \/>\n<a href=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/bode-sample.png\"><img decoding=\"async\" src=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/bode-sample.png\" alt=\"\" width=\"300\" class=\"aligncenter size-full wp-image-65098\" srcset=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/bode-sample.png 397w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/bode-sample-300x201.png 300w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2020\/06\/bode-sample-150x101.png 150w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/a><\/p>\n<p><strong>\u30ea\u30f3\u30af<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/www.kspub.co.jp\/book\/detail\/5137475.html\">\u300c\u306f\u3058\u3081\u3066\u306e\u5236\u5fa1\u5de5\u5b66\u300d\uff082018\u3001\u6539\u8a02\u7b2c2\u7248\u3001\u4f50\u85e4\u30fb\u5e73\u5143\u30fb\u5e73\u7530\u3001\u8b1b\u8ac7\u793e\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30d5\u30a3\u30af\uff09<br \/>\n<\/a><\/p>\n<ul>\n<li><a href=\"http:\/\/control.me.saga-u.ac.jp\/First_Control_Eng\/first_control_eng.html\">\u300c\u306f\u3058\u3081\u3066\u306e\u5236\u5fa1\u5de5\u5b66\u300d\u306e\u56f3\u306e\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\uff1a\u30b5\u30dd\u30fc\u30c8\u30da\u30fc\u30b8<br \/>\n<\/a>\n <\/ul>\n<li><a href=\"https:\/\/python-control.readthedocs.io\/en\/0.8.3\/\">Python Control Systems Library ? Python Control Systems Library dev documentation<br \/>\n<\/a><\/p>\n<ul>\n<li><a href=\"https:\/\/python-control.readthedocs.io\/en\/0.8.3\/examples.html\">Examples : Python Control Systems Library dev documentation<br \/>\n<\/a><\/p>\n<li><a href=\"https:\/\/python-control.readthedocs.io\/en\/0.8.3\/matlab.html\">MATLAB compatibility module \u2014 Python Control Systems Library dev documentation<br \/>\n<\/a>\n <\/ul>\n<li><a href=\"https:\/\/qiita.com\/nnn112358\">nnn112358 &#8211; Qiita<br \/>\n<\/a><\/p>\n<ul>\n<li><a href=\"https:\/\/qiita.com\/nnn112358\/items\/3b400598e74f8414b1e1\">PythonControl\u30671\u81ea\u7531\u5ea6\u7cfb\u306e\u4f1d\u9054\u95a2\u6570\u3092\u6c42\u3081\u308b\u3002 &#8211; Qiita<br \/>\n<\/a><\/p>\n<li><a href=\"https:\/\/qiita.com\/nnn112358\/items\/3604156086351a07e860\">PythonControl\u30672\u81ea\u7531\u5ea6\u7cfb\u306e\u4f1d\u9054\u95a2\u6570\u3092\u6c42\u3081\u308b\u3002 &#8211; Qiita<br \/>\n<\/a><\/p>\n<li><a href=\"https:\/\/qiita.com\/nnn112358\/items\/384d0399465fbf57be8f\">Python Control\u3067Aircraft\u306e\u5236\u5fa1\u8a2d\u8a08\u3092\u884c\u3046(\u524d\u7de8) &#8211; Qiita<br \/>\n<\/a><\/p>\n<li><a href=\"https:\/\/qiita.com\/nnn112358\/items\/bdab7c2b2c35fcefbbdf\">Python Control\u3067Aircraft\u306e\u5236\u5fa1\u8a2d\u8a08\u3092\u884c\u3046(\u5f8c\u7de8) &#8211; Qiita<br \/>\n<\/a>\n <\/ul>\n<li><a href=\"https:\/\/qiita.com\/hikaruyaku\/items\/021769a76e72ed34a881\">python-control \u3092\u7528\u3044\u305ffeedback\u5236\u5fa1\u306e\u57fa\u790e &#8211; Qiita<br \/>\n<\/a>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Python-Control\u3092Anaconda\u3078\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002MATLAB\u4e92\u63db\u6a5f\u80fd\u304c\u3053\u3093\u306a\u306b\u7c21\u5358\u306bPython\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u306f\u601d\u308f\u306a\u304b\u3063\u305f\u3002 &gt;conda install -c conda-forge  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[433,454],"_links":{"self":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/65093"}],"collection":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/comments?post=65093"}],"version-history":[{"count":15,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/65093\/revisions"}],"predecessor-version":[{"id":65216,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/65093\/revisions\/65216"}],"wp:attachment":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/media?parent=65093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/categories?post=65093"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/tags?post=65093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}