quadx88


Namequadx88 JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/alphaville/quadx88
SummaryConfigurable dynamical model of quadcopter
upload_time2023-03-13 23:24:26
maintainer
docs_urlNone
author['Ruairi Moran', 'Pantelis Sopasakis']
requires_python
licenseMIT License
keywords quadcopter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
## QUADx88

Configurable dynamical model of quadcopter

## API documentation

### The `Quadcopter` Class


To construct a quadcopter object we can call the constructor


```python
import quadx88 as qx

copter = qx.Quadcopter(mass=1.15, 
                       ts=0.0083,
                       prop_mass=0.01)
```

The following parameters can be provided to the above constructor

| Parameter    | Description                     | Default   |
| ------------ | ------------------------------- | --------- |
| `ts`         | Sampling time (s)               | 1/125     |
| `mass`       | Total mass of the copter (kg)   | 1         |
| `arm_length` | Arm length (m)                  | 0.225     |
| `moi_xx`     | x-x moment of inertia           | 0.01788   |
| `moi_yy`     | x-x moment of inertia           | 0.03014   |
| `moi_zz`     | z-z moment of inertia           | 0.04614   |
| `gravity_acc`| gravitational acceleration (m/s2)| 9.81     |
| `air_density`| air density (kg/m3) | 1.225 |
| `K_v` | Kv constant of motors (rpm/V) | 1000 | 
| `motor_time_constant` | motor time constant (s) | 0.05 | 
| `rotor_mass` | rotor mass (kg) | 0.04 |
| `rotor_radius` | rotor radius (m) | 0.019 | 
| `motor_mass` | motor mass (kg) | 0.112 | 
| `voltage_max` | maximum voltage (V) | 16.8 |
| `voltage_min` | minimum voltage (V) | 15.0 |
| `thrust_coeff` | thrust coefficient of propellers  | 0.112 |
| `power_coeff` | power coefficient of propellers | 0.044 | 
| `prop_mass` | propeller mass (kg) | 0.009 | 
| `prop_diameter_in` | propeller diameter (inches) | 10 |

### Getters


| Method/Property | Description |
| ------------ | ------------- |
| `state`    | Nine dimensional state of the system, $x=(q, \omega, n)$ |
| `quaternion` | Current quaternion |
| `hover_rpm` | Hovering spin in RPM |
| `euler_angles()` | Current Euler angles in degrees |

### Setters 

To initialise the state of the system the following methods are available

1. `set_initial_quaternion(q)`, where `q` is the quaternion
2. `set_initial_angular_velocity(w)`
3. `set_initial_motor_spin(spin)`
4. `set_initial_euler_angles(yaw, pitch, roll, angle_unit=ANGLE_UNITS.RADIANS)`, where `yaw`, `pitch` and `roll` and the three Euler angles (in this order) and `angle_unit` is the units of measurement. For example to construct a quadcopter object with an initial attitude of $\phi=0^\circ$, $\theta=1^\circ$ and $\psi=-5^\circ$ we can do 

```python
copter = qx.Quadcopter()
copter.set_initial_euler_angles(-5, 0, 1, ANGLE_UNITS.DEGREES)
```

### System matrices 

The methods `continuous_linearised_matrices` and `discrete_linearised_matrices` return a dictionary with the continuous-time and discrete-time matrices of the linearised system respectively. The discrete-time linearised system has the form 
$$\begin{aligned}
x_{t+1} =& Ax_t + Bu_t,
\\
y_t =& Cx_t.
\end{aligned}$$


### Nonlinear dynamical system 

To simulate the nonlinear model you can use `move(u)` which updates the system state following the application of a given control action for the duration of the sampling time. 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/alphaville/quadx88",
    "name": "quadx88",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "quadcopter",
    "author": "['Ruairi Moran', 'Pantelis Sopasakis']",
    "author_email": "p.sopasakis@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f4/31/3cc56a826016fac6290c797e4cba08fb87af893740892e2740594438b581/quadx88-0.3.1.tar.gz",
    "platform": null,
    "description": "\n## QUADx88\n\nConfigurable dynamical model of quadcopter\n\n## API documentation\n\n### The `Quadcopter` Class\n\n\nTo construct a quadcopter object we can call the constructor\n\n\n```python\nimport quadx88 as qx\n\ncopter = qx.Quadcopter(mass=1.15, \n                       ts=0.0083,\n                       prop_mass=0.01)\n```\n\nThe following parameters can be provided to the above constructor\n\n| Parameter    | Description                     | Default   |\n| ------------ | ------------------------------- | --------- |\n| `ts`         | Sampling time (s)               | 1/125     |\n| `mass`       | Total mass of the copter (kg)   | 1         |\n| `arm_length` | Arm length (m)                  | 0.225     |\n| `moi_xx`     | x-x moment of inertia           | 0.01788   |\n| `moi_yy`     | x-x moment of inertia           | 0.03014   |\n| `moi_zz`     | z-z moment of inertia           | 0.04614   |\n| `gravity_acc`| gravitational acceleration (m/s2)| 9.81     |\n| `air_density`| air density (kg/m3) | 1.225 |\n| `K_v` | Kv constant of motors (rpm/V) | 1000 | \n| `motor_time_constant` | motor time constant (s) | 0.05 | \n| `rotor_mass` | rotor mass (kg) | 0.04 |\n| `rotor_radius` | rotor radius (m) | 0.019 | \n| `motor_mass` | motor mass (kg) | 0.112 | \n| `voltage_max` | maximum voltage (V) | 16.8 |\n| `voltage_min` | minimum voltage (V) | 15.0 |\n| `thrust_coeff` | thrust coefficient of propellers  | 0.112 |\n| `power_coeff` | power coefficient of propellers | 0.044 | \n| `prop_mass` | propeller mass (kg) | 0.009 | \n| `prop_diameter_in` | propeller diameter (inches) | 10 |\n\n### Getters\n\n\n| Method/Property | Description |\n| ------------ | ------------- |\n| `state`    | Nine dimensional state of the system, $x=(q, \\omega, n)$ |\n| `quaternion` | Current quaternion |\n| `hover_rpm` | Hovering spin in RPM |\n| `euler_angles()` | Current Euler angles in degrees |\n\n### Setters \n\nTo initialise the state of the system the following methods are available\n\n1. `set_initial_quaternion(q)`, where `q` is the quaternion\n2. `set_initial_angular_velocity(w)`\n3. `set_initial_motor_spin(spin)`\n4. `set_initial_euler_angles(yaw, pitch, roll, angle_unit=ANGLE_UNITS.RADIANS)`, where `yaw`, `pitch` and `roll` and the three Euler angles (in this order) and `angle_unit` is the units of measurement. For example to construct a quadcopter object with an initial attitude of $\\phi=0^\\circ$, $\\theta=1^\\circ$ and $\\psi=-5^\\circ$ we can do \n\n```python\ncopter = qx.Quadcopter()\ncopter.set_initial_euler_angles(-5, 0, 1, ANGLE_UNITS.DEGREES)\n```\n\n### System matrices \n\nThe methods `continuous_linearised_matrices` and `discrete_linearised_matrices` return a dictionary with the continuous-time and discrete-time matrices of the linearised system respectively. The discrete-time linearised system has the form \n$$\\begin{aligned}\nx_{t+1} =& Ax_t + Bu_t,\n\\\\\ny_t =& Cx_t.\n\\end{aligned}$$\n\n\n### Nonlinear dynamical system \n\nTo simulate the nonlinear model you can use `move(u)` which updates the system state following the application of a given control action for the duration of the sampling time. \n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Configurable dynamical model of quadcopter",
    "version": "0.3.1",
    "split_keywords": [
        "quadcopter"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "513c7edb32bfe73368496d0f32e8d1f8535c5df0cd66a8c035e5136868ac076d",
                "md5": "94467bd540e7e684759f76b809bd2fea",
                "sha256": "2422c2ae8addbaab0ab95bbb78691dfa88153eb4df7e3848aaad6230b2752f04"
            },
            "downloads": -1,
            "filename": "quadx88-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "94467bd540e7e684759f76b809bd2fea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6242,
            "upload_time": "2023-03-13T23:24:24",
            "upload_time_iso_8601": "2023-03-13T23:24:24.880893Z",
            "url": "https://files.pythonhosted.org/packages/51/3c/7edb32bfe73368496d0f32e8d1f8535c5df0cd66a8c035e5136868ac076d/quadx88-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4313cc56a826016fac6290c797e4cba08fb87af893740892e2740594438b581",
                "md5": "0a2db9708b5000af4c7c7b6453ce6c35",
                "sha256": "6f0178d21385086a172e605611ddb08f395707374276f60c4bd01e27697857a3"
            },
            "downloads": -1,
            "filename": "quadx88-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0a2db9708b5000af4c7c7b6453ce6c35",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6225,
            "upload_time": "2023-03-13T23:24:26",
            "upload_time_iso_8601": "2023-03-13T23:24:26.893152Z",
            "url": "https://files.pythonhosted.org/packages/f4/31/3cc56a826016fac6290c797e4cba08fb87af893740892e2740594438b581/quadx88-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-13 23:24:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "alphaville",
    "github_project": "quadx88",
    "lcname": "quadx88"
}
        
Elapsed time: 0.04560s