{ "info": { "author": "Randy Rubin", "author_email": "randymrubin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Physics" ], "description": "# PyMotor\n\n## Overview\n\nPyMotor is a tool for electric motor selection. It generates force and torque plots from linear motion profiles and physical parameters describing motors, drivetrains, and loads.\n\n## Development Status\n\nPyMotor is being developed with Python 3.7 using packages described in requirements.txt.\n\n**This is Alpha phase software.** This means that features and usage are not fixed, the documentation is most likely incomplete, and there may be bugs.\n\nSome versions of this package are uploaded to pypi.org and can be installed, at your own risk, like this:\n\n``` bash\n$ pip install numpy\n$ pip install pandas\n$ pip install pymotor\n```\n\n## Physics Equations\n\nThe math used to calculate force, inertia and torque is shown below. Note that angular velocity and angular acceleration in the equations below are in rad/s and rad/s2, respectively. Internally, the software stores these values as Hz and Hz/s. \n\n![Equation Image](https://raw.githubusercontent.com/rmrubin/pymotor/master/readme/equations.png)\n\n## Physical Units\n\nThe native physical units used by the package are shown in the table below. Functions in the module conversions.py are provided so parameters can be entered in other units.\n\nParameter | Internal Symbol | Unit\n--|--|--\nTime | t | s\nLength | x | m\nLinear Velocity | v | m/s\nLinear Acceleration | a | m/s2\nForce | f | N\nRotations | revs | Revolutions\nAngular Velocity | hz | Hz\nAngular Acceleration | hzps | Hz/s\nTorque | tau | N*m\nMoment of Inertia | j | kg*m2\nAngle | incline_angle | \u00c2\u00b0\n\n## Usage\n\n### Creating a Linear Motion Profile\n\nCode to import the pymotor package and configure the LinearMotion object is shown below. Linear motion profiles are created from three segments: acceleration from zero, constant velocity, and deceleration to zero.\n\nfs is Fsample, or the sample rate in Hz of the generated profiles.\n\nAcceleration and deceleration segments can be defined by their time, distance, or acceleration. The constant velocity segment can be defined by time or distance. \n\nIf the smoothing options are set True, the acceleration and deceleration segments use Hann windows to create smoothed velocity profiles. If set False, triangular windows are used to create a trapezoidal velocity profile with constant acceleration. \n\nThe conversion functions ipm() and inch() have been used to convert from inches/min and inches, respectively, to native units.\n\n``` python\nimport pymotor as pm\n\nlm_settings = {\n 'fs': 10000.0,\n 'max_velocity': pm.ipm(40),\n 'acc_mode': 'time',\n 'acc_value': 0.06, \n 'acc_smooth': True,\n 'con_mode': 'distance',\n 'con_value': pm.inch(.02),\n 'dec_mode': 'acceleration',\n 'dec_value': 0.25,\n 'dec_smooth': False,\n}\n\nlm = pm.LinearMotion(lm_settings)\nlm.plot()\n```\n![Motion Profile Image](https://raw.githubusercontent.com/rmrubin/pymotor/master/readme/motion.png)\n\n\n### Converting to a Linear Force Profile\n\nLinearForce objects take a settings dictionary and LinearMotion object as arguments, and generates a plot of force and velocity versus time.\n\nThe safety factor defined here is also used in the AngularTorque objects. \n\n``` python\nlf_settings = {\n 'safety_factor': 2,\n 'moving_mass': 100,\n 'preload_force': 0.1,\n 'efficiency': 0.9,\n 'incline_angle': 45,\n 'friction_coef': 0.1,\n 'gravity': 9.8,\n}\n\nlf = pm.LinearForce(lf_settings, lm)\nlf.plot()\n```\n![Force Profile Image](https://raw.githubusercontent.com/rmrubin/pymotor/master/readme/force.png)\n\n### Defining a Motor Object\n\nMotor objects contain torque curve and moment of inertia data. The method Motor.tau(hz) returns an interpolated torque value for a given angular velocity, which is used by AngularTorque objects to plot available motor torque vs required torque. Motor.plot() generates a plot of the torque curve which can be used for verification.\n\nThe curve_hz list defines the X axis values of the curve. The values must be positive, unique, and ascending.\n\nThe curve_tau list defines the Y axis values of the curve. The values must be positive. \n\n``` python\ncurve_hz = [\n 0, \n pm.rpm(300), \n pm.rpm(600),\n pm.rpm(900),\n pm.rpm(1200),\n pm.rpm(1500),\n pm.rpm(1800),\n]\n\ncurve_tau = [\n 2.5,\n 2.2,\n 1.3,\n 0.9,\n 0.7,\n 0.6,\n 0.5,\n]\n\nmotor = pm.Motor(curve_hz=curve_hz, curve_tau=curve_tau, j=pm.gcm2(460))\nmotor.plot()\n```\n![Motor Torque Curve Image](https://raw.githubusercontent.com/rmrubin/pymotor/master/readme/motor.png)\n\n### Defining Other Drivetrain Objects\n\nOther necessary drivetrain objects are created in the following code. Gear ratios, drive screw lead, and moments of inertia are used in the torque generation process. The conversion functions gcm2() and inch() have been used to convert from g*cm2 and inches, respectively, to native units.\n\n``` python\ncoupler = pm.Coupler(j=pm.gcm2(5))\ngear = pm.Gear(ratio=2, j_in=pm.gcm2(10), j_out=pm.gcm2(15))\nscrew = pm.Screw(lead=pm.inch(.05), j=pm.gcm2(20))\n```\n\n### Generating a Torque Profile\n\nAngularTorque objects take LinearForce, Motor, and drivetrain objects as arguments. The generated torque profile uses the safety factor defined in the LinearForce object.\n\nThe required torque plot includes an overlay of available motor torque. The velocity profile is also plotted.\n\n``` python\nat = pm.AngularTorque(lf, motor=motor, coupler=coupler, gear=gear, drivetrain=screw)\nat.plot()\n```\n![Torque Profile Image](https://raw.githubusercontent.com/rmrubin/pymotor/master/readme/torque.png)\n\n## Planned Changes\n- [ ] More complete conversions.py module.\n- [ ] Complete functions to output profile statistics. \n- [ ] Reduction of pandas DataFrame copy operations.\n- [ ] Configurable plot units.\n- [ ] Stepper motor table and three-phase motor signal generation. \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/rmrubin/pymotor", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pymotor", "package_url": "https://pypi.org/project/pymotor/", "platform": "", "project_url": "https://pypi.org/project/pymotor/", "project_urls": { "Homepage": "https://github.com/rmrubin/pymotor" }, "release_url": "https://pypi.org/project/pymotor/0.3.6/", "requires_dist": [ "matplotlib", "numpy", "pandas", "scipy" ], "requires_python": "", "summary": "Generates motion, force and torque profiles for electric motor selection.", "version": "0.3.6" }, "last_serial": 4232514, "releases": { "0.2.10": [ { "comment_text": "", "digests": { "md5": "d2ce0d5663ae6a664da6122ec7d02a45", "sha256": "f9e4e5efe2d73e4d56fc2489d491fba064c63207667d60d4d9ccabf06d0d1e20" }, "downloads": -1, "filename": "pymotor-0.2.10-py3-none-any.whl", "has_sig": false, "md5_digest": "d2ce0d5663ae6a664da6122ec7d02a45", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4088, "upload_time": "2018-08-10T06:20:13", "url": "https://files.pythonhosted.org/packages/21/9c/fbe774a58b74310903a2b1a623400518acc69afffbbeba7d4fa40d4a4fba/pymotor-0.2.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5026fbc072a147f0563b074583baa66", "sha256": "26dec071c8414159d94fc1b7da54812588e41d9c80ea3cdab16c27994e0827e1" }, "downloads": -1, "filename": "pymotor-0.2.10.tar.gz", "has_sig": false, "md5_digest": "e5026fbc072a147f0563b074583baa66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3670, "upload_time": "2018-08-10T06:20:14", "url": "https://files.pythonhosted.org/packages/f4/1d/1fba32d72949de3b15c3bb18b4a18b0ff7f094867c084406fb83f28884ff/pymotor-0.2.10.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "f10795a7f1c802f9a674b46fd6d4c41e", "sha256": "d5a04f98903dcc0d009487468b46ab2a6f66678169ae2470aa1b3c417bbde250" }, "downloads": -1, "filename": "pymotor-0.2.8-py3-none-any.whl", "has_sig": false, "md5_digest": "f10795a7f1c802f9a674b46fd6d4c41e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4093, "upload_time": "2018-08-10T05:51:56", "url": "https://files.pythonhosted.org/packages/bc/bc/a1032c1869b69c751e6d139dd650d166c5da20800e56ea2c2e9023fbc6be/pymotor-0.2.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "155c99e6cc7835065c5a8fc68449d772", "sha256": "875f6a576820336b80d4b63f6da2154b304858b7e97fb048f8818b235423da74" }, "downloads": -1, "filename": "pymotor-0.2.8.tar.gz", "has_sig": false, "md5_digest": "155c99e6cc7835065c5a8fc68449d772", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3683, "upload_time": "2018-08-10T05:51:58", "url": "https://files.pythonhosted.org/packages/e5/a9/fb4f186e73234930c8dc81e63f72eb881fa5264b9a831e281c7edcd7fd91/pymotor-0.2.8.tar.gz" } ], "0.2.9": [ { "comment_text": "", "digests": { "md5": "5578c4408f191df7bf8fd440baf28810", "sha256": "b35fe762fa061a7a79e148daec2bb64b6def747e7e1f4e25eea442219cb9650c" }, "downloads": -1, "filename": "pymotor-0.2.9-py3-none-any.whl", "has_sig": false, "md5_digest": "5578c4408f191df7bf8fd440baf28810", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4082, "upload_time": "2018-08-10T06:06:02", "url": "https://files.pythonhosted.org/packages/a0/25/ca27a2db394c850fbc19b3d5750b11117cd62b481cab45da5598a9fc0da1/pymotor-0.2.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6fef05fcf37f8caed79e27bc272adfd4", "sha256": "8734f8cf1b8e9e47a5277f4ecca6ea4170125c44dffbc0410ef865d6f30a23cf" }, "downloads": -1, "filename": "pymotor-0.2.9.tar.gz", "has_sig": false, "md5_digest": "6fef05fcf37f8caed79e27bc272adfd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3666, "upload_time": "2018-08-10T06:06:03", "url": "https://files.pythonhosted.org/packages/39/c9/3753d6f3a3a93e82cb50fbff1270f7e4675cf0e819c8c86c1bcb1715d684/pymotor-0.2.9.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "d9005fbb659975359bfa48d2f9702f17", "sha256": "4ce4f515d23c5cfb4cf282698b388e0dc923259c7543b3c3e8fbb2cb1c8e802f" }, "downloads": -1, "filename": "pymotor-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d9005fbb659975359bfa48d2f9702f17", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10470, "upload_time": "2018-08-27T07:58:02", "url": "https://files.pythonhosted.org/packages/84/18/2d8647b73fc72bd0ac2195c9fb5f04867a51c825b3359b9b754ace537935/pymotor-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "81d4c5280f19bd4c00b54b9edac6746d", "sha256": "27bf5a9c137cad35beaf306c2a22701dcbe3f5e7309d40f673d603f6cef55549" }, "downloads": -1, "filename": "pymotor-0.3.0.tar.gz", "has_sig": false, "md5_digest": "81d4c5280f19bd4c00b54b9edac6746d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10846, "upload_time": "2018-08-27T07:58:03", "url": "https://files.pythonhosted.org/packages/6b/7a/a24adf282c0170a6faf2e9db021315390e26e5b33652242c28fe37e28690/pymotor-0.3.0.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "6bbcca3bb8df2cea8d0b17318c8ec634", "sha256": "3ef59838c3c4f005ea048b3bc3135494e2d092acea2579023011682d9200e7d0" }, "downloads": -1, "filename": "pymotor-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6bbcca3bb8df2cea8d0b17318c8ec634", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11022, "upload_time": "2018-08-27T08:05:36", "url": "https://files.pythonhosted.org/packages/0b/9e/9bf31085c7b5f2aed28c0d482f9f6204c830a1085a43326009f7a5c85d51/pymotor-0.3.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39aa88e10e1e997c80dfe02845e5520a", "sha256": "2880d857acfbbeca69704f0a1bca00d91c9c512a15ac81f5c902a96dcf733d94" }, "downloads": -1, "filename": "pymotor-0.3.2.tar.gz", "has_sig": false, "md5_digest": "39aa88e10e1e997c80dfe02845e5520a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12128, "upload_time": "2018-08-27T08:05:37", "url": "https://files.pythonhosted.org/packages/ab/58/cac7cb51f9b5855c0338f1a1bca9d34d2409d025bfe58824c2e76c2fdb24/pymotor-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "744cc49cf1827b784e6cf6fb4148bcbc", "sha256": "a4f0cb69b7815d7a660a56690d819285c49374b145b4c1e30e24aebed024163c" }, "downloads": -1, "filename": "pymotor-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "744cc49cf1827b784e6cf6fb4148bcbc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11046, "upload_time": "2018-08-27T08:09:38", "url": "https://files.pythonhosted.org/packages/3b/61/64583acfdf22ba6173a2660dcd27020ca61202bcc88ffbb01465f13a3ff0/pymotor-0.3.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4139caee9bc156ed1f26bd9964c16fd", "sha256": "94c2a594b01c50da007c2308a8bfa66263548c1cb1e6160db8ce9345ff10aee1" }, "downloads": -1, "filename": "pymotor-0.3.3.tar.gz", "has_sig": false, "md5_digest": "f4139caee9bc156ed1f26bd9964c16fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12177, "upload_time": "2018-08-27T08:09:39", "url": "https://files.pythonhosted.org/packages/c9/5a/7bedc3fbdf21c65f88ce2681cf2ee3afb89bafe65fc1936a00ae88802126/pymotor-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "9ab283e50170f9777006fd47144fbcf7", "sha256": "25bdd134a5e47c21f25593e7965111816a4033419468185a9447e0868afbfb82" }, "downloads": -1, "filename": "pymotor-0.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "9ab283e50170f9777006fd47144fbcf7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11014, "upload_time": "2018-09-02T19:17:42", "url": "https://files.pythonhosted.org/packages/82/1f/302334b30f8f96ac02adb463fe42532632de2d7ed8d738551a7693c603a1/pymotor-0.3.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5926dc68480d63531d55ea3708a0c91d", "sha256": "b3bb41fcfe6fa79cf6d9d5be5abeb5989de89904102c75b667720425452b42a8" }, "downloads": -1, "filename": "pymotor-0.3.4.tar.gz", "has_sig": false, "md5_digest": "5926dc68480d63531d55ea3708a0c91d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12143, "upload_time": "2018-09-02T19:17:43", "url": "https://files.pythonhosted.org/packages/fb/4b/97e59081686ee01130f80d3f50c97801ce5e334fc5aab516505a7ac94d11/pymotor-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "4d873cc68a6b46848617751edfcad706", "sha256": "0097587f744b505bb2647aab3601bd3dce5bdf28e49d25259cf5130d32a6298d" }, "downloads": -1, "filename": "pymotor-0.3.5-py3-none-any.whl", "has_sig": false, "md5_digest": "4d873cc68a6b46848617751edfcad706", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10993, "upload_time": "2018-09-02T19:31:00", "url": "https://files.pythonhosted.org/packages/e0/ac/eb5dd22b4a0f6ea495c7c1f29f35af612df6533fb16d5040b2ab15d3e804/pymotor-0.3.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "253862557cb104971a55de3ae6902c88", "sha256": "c9b9121f3fe3ec5ef8131ae2766385306ced214a4269769a28dc7c3eaf05fff7" }, "downloads": -1, "filename": "pymotor-0.3.5.tar.gz", "has_sig": false, "md5_digest": "253862557cb104971a55de3ae6902c88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12132, "upload_time": "2018-09-02T19:31:01", "url": "https://files.pythonhosted.org/packages/a3/96/c1d785d03385e872c0bf6c74fa09e3928ad26c14900a5451750bfc84474b/pymotor-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "3f4207563c866c98caa70770757717c1", "sha256": "350e053db4af9f5499529290a782e9191d00021bcd0ab937486d711f10039d4f" }, "downloads": -1, "filename": "pymotor-0.3.6-py3-none-any.whl", "has_sig": false, "md5_digest": "3f4207563c866c98caa70770757717c1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11002, "upload_time": "2018-09-02T19:47:07", "url": "https://files.pythonhosted.org/packages/d5/fa/cd0059d017a2312bae8164c6563e9a71510df02ce7a349ff8f3f80287a86/pymotor-0.3.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2dec01312036e42b6c4583bc7c4db9cd", "sha256": "69b467656f47bd5c0b36113aac4d809b75db562256faa37f10c9b0240d71406a" }, "downloads": -1, "filename": "pymotor-0.3.6.tar.gz", "has_sig": false, "md5_digest": "2dec01312036e42b6c4583bc7c4db9cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12152, "upload_time": "2018-09-02T19:47:08", "url": "https://files.pythonhosted.org/packages/18/23/7cfaaba67288501005be0404eb9fddb501ce1660c2dd25f5865335a8e47f/pymotor-0.3.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f4207563c866c98caa70770757717c1", "sha256": "350e053db4af9f5499529290a782e9191d00021bcd0ab937486d711f10039d4f" }, "downloads": -1, "filename": "pymotor-0.3.6-py3-none-any.whl", "has_sig": false, "md5_digest": "3f4207563c866c98caa70770757717c1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11002, "upload_time": "2018-09-02T19:47:07", "url": "https://files.pythonhosted.org/packages/d5/fa/cd0059d017a2312bae8164c6563e9a71510df02ce7a349ff8f3f80287a86/pymotor-0.3.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2dec01312036e42b6c4583bc7c4db9cd", "sha256": "69b467656f47bd5c0b36113aac4d809b75db562256faa37f10c9b0240d71406a" }, "downloads": -1, "filename": "pymotor-0.3.6.tar.gz", "has_sig": false, "md5_digest": "2dec01312036e42b6c4583bc7c4db9cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12152, "upload_time": "2018-09-02T19:47:08", "url": "https://files.pythonhosted.org/packages/18/23/7cfaaba67288501005be0404eb9fddb501ce1660c2dd25f5865335a8e47f/pymotor-0.3.6.tar.gz" } ] }