Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S specialtopics
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • eriksuer
  • specialtopics
  • Wiki
  • Packages
  • landing_controller

landing_controller · Changes

Page history
Update landing_controller authored Aug 30, 2021 by oroyalrider's avatar oroyalrider
Hide whitespace changes
Inline Side-by-side
Packages/landing_controller.md
View page @ bf6075bb
......@@ -195,16 +195,38 @@ The following diagram shows the very simplified feedback loop of the controlled
ctrl-->px4-->dyn-->|e|ctrl
```
The `landing_controller` commands a velocity to a cascaded controller in the PX4 Firmware. This generates the command for the motors, which serve as input for the drone dynamics process. The output of this process is the position of the drone, relative to the aruco marker, which is the input for the `landing_controller`. To access the overall dynamics, the PX4 controller and the drone dynamics are approximated by a PT1 element:
The `landing_controller` commands a velocity to a cascaded controller in the PX4 Firmware. This generates the command for the motors, which serve as input for the drone dynamics process. The output of this process is the position of the drone, relative to the aruco marker, which is the input for the `landing_controller`. To access the overall dynamics, the PX4 controller and the drone dynamics are approximated by a PT1 element with delay:
$ F_{eu} = \frac{1}{T\cdot s + 1} $
```math
F_{sys} = \frac{1}{T_{sys} s + 1} \cdot e^{-T_{sys,delay}s}
```
The values for $`T_{sys}`$ and $`T_{sys,delay}`$ can be determined by experiments: Command a velocity using the `velocity_commander` and log the resulting velocity of the drone. The result for a custom drone in a gazebo simulation is shown below.
![system_identification.svg](uploads/d5d5ce6a9ea4211dd58ab6df5463846d/system_identification.svg)
The value of $`T_{sys,delay}`$ is the time between the step command and the first reaction of the velocity response (here $´0.25s´$) and $`T_{sys}`$ is the time from the first response until $`63%`$ of the final value is reached (here $´0.65s´$). The PT1 approximation with delay can now be simulated with exactly the same input. The result (yellow line) shows, that it is a very good representation of the dynamics. \
The transfer function now serves as the basis for tuning the PI controller (see [Controller](#controller)).
- Identification as PT1 element
### Determine control deviation e
- internal tf tree
- determining error e
### Controller
- PI controller
For the landing controller, a PI controller with the following transfer function is used:
```math
F_{ctrl} = \frac{K_I}{s} + K_P = \frac{K_I + K_Ps}{s}
```
Thus, the open control loop is determined by:
```math
L = \frac{1}{T_{sys} s + 1} \cdot \frac{K_I + K_Ps}{s} \cdot e^{-T_{sys,delay}s}
```
When the lag element is discarded, the gains $`K_I`$ and $`K_P`$ can now be calculated by a generic controller design method (e.g. [pole placement](https://de.mathworks.com/help/control/ref/place.html)). \
In the `velocity_controller` node, the controller gains are stored in the dictionary `gains`, which is a class variable. It contains the keys "P" and "I". The node subscribes to the topics which are stored under the TOPICS class variable (currently `"/landing_controller/p_gain"` and `"/landing_controller/i_gain"`). If a float is published to these topics, the local controller gains are overwritten with these values.
## Velocity Commander
-> no arming nor changing mode
\ No newline at end of file
Clone repository
  • General
    • Discussion and Problems
    • How to approach this project
    • Next Steps
    • Progress Archieved
    • Project Description
    • Requirements
  • Hardware
    • Aruco Markers
    • RTPS Communication
    • Raspberry Pi Camera V2
  • Packages
    • TF03
    • image_processing
    • landing_controller
    • ros2bag
    • v4l2_camera
  • _Misc
    • Estimate Waypoints
View All Pages