smithhenryd
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Training in Simulation (Part 2) ## Recap 1. Training a neural network to model the nominal dynamics is equivalent to training a neural network $r_{\theta}$ such that \begin{align*} \mathbf{f}_{\text{ext}}(t) = \underbrace{\textbf{a}(t) - \textbf{u}(t)}_{\text{ideal}} - \underbrace{\textbf{r}_{\theta}(v(t))}_{\text{residual}}. \end{align*} Recall that $r_{\theta} = \frac{d}{dt} f_{\theta}(\textbf{v}(t))$. In our "naive" approach, we take $\textbf{r}_{\theta}(v(t)) = [0, 0, -g]^T$. 2. One issue with this model is that we need the non drone-drone forces to have mean zero in our training dataset: \begin{align*} \mathbf{f}_{\text{ext}}^{(i)} = \underbrace{\phi^{\star}\left( \bigcup_{j \in \mathcal{N}^{(i)}} \mathbf{x}^{(i)} - \mathbf{x}^{(j)}\right)}_{\text{drone-drone forces}} + \underbrace{\boldsymbol{\varepsilon}}_{\text{other forces}}, \quad \mathbb{E}[\boldsymbol{\varepsilon}] = \mathbf{0}. \end{align*} ## Simulation Results We visualize the curriculum learning procedure. As we iteratively augment our training dataset, the learned force function should get more and more accurate. Here, we are learning the force in the 'd' direction, $\mathbf{f}_z$, as a function of the two drones' relative position. ### Learned Force Function #### Stage 1 ($\Delta p = -2m$) ![](https://i.imgur.com/ZR4hnvO.png) Force estimates are very small for $\Delta p > -2m$. Suggests we need more training data to accurately learn the (true) force function. However, we can fly our drone accurately at $\Delta p = -2m$ (see video Jan sent). #### Stage 2 ($\Delta p = -1.5m$) ![](https://i.imgur.com/eqIXYB0.png) #### Stage 3 ($\Delta p = -1m$) ![](https://i.imgur.com/bDb4nqV.png) #### Stage 4 ($\Delta p = -0.5m$) ![](https://i.imgur.com/ix0DepH.png) ![](https://i.imgur.com/ena6cT6.png) ![](https://i.imgur.com/9fHMjBs.png) What is the issue with our previous training procedure? We use the mean-square error. This implies that we give more weight to accurately predicting large forces. Instead, try using the loss function \begin{align*} L(\theta) :=\sum_{t=1}^T \sum_{i=1}^N \frac{1}{\left\Vert \mathbf{f}_t^{(i)} \right\Vert_2}\left\Vert \phi_{\theta}\left( \bigcup_{j \in \mathcal{N}_t^{(i)}} \mathbf{x}_t^{(j)} - \mathbf{x}_t^{(i)} \mathbf{}\right) - \mathbf{f}_t^{(i)}\right\Vert_2 \end{align*} where $N$ is the number of drones and $t$ is the number of training samples. The important thing is that we are normalizing by the $\ell^2$ norm of the force labels $\mathbf{f}_t^{(i)}$. ![](https://i.imgur.com/RDwaw3f.png) ![](https://i.imgur.com/jDoecD0.png) ![](https://i.imgur.com/XEeUH3S.png) ![](https://i.imgur.com/PhsiV4N.png) ![](https://i.imgur.com/VuWWy8l.png) ![](https://i.imgur.com/zO1nMfn.png) ## Force Compensation Model (Deployed in Simulation) ![](https://i.imgur.com/phEZuRp.png) ## Accounting for Controller Biases For the real-world datasets, the biases in 'n' and 'e' directions are, on average, $0.1-0.3 m/s^2$. In the 'd' direction, we had a very large bias, approximately $1 m/s^2$. Ajay: We can correct the bias in the 'd' direction so that it is comparable to the biases in the 'n' and 'e' directions. **Question**: If our biases are, on average, $0.1-0.3 m/s^2$, should we even worry about them at all? The drone-drone forces will have much larger magnitudes. ### Mounting Jennifer's idea: Rigidly mount the 'sufferer' (S) drone (i.e. the one we are performing the force estimation for) to a mast. Set the S drone to the approximate thrust nessecary to counteract gravity. The rigid mounting prevents the S drone actually moving, and with integrated load cells, we can directly measure the forces imposed upon the mount/S drone coupling. In this setup, the S drone has equivelent aerodynamic interactions due to being at the correct thrust. When the interfering (I) drone is then flown in proximity to the S drone, the variations in force on the S drone are recorded, directly providing the data for our predictive model. Since S is not running a dynamic controller, no controller bias is present. If the experiment is run with a sweeep of the following, we should be able to give the NN the majority of factors that will arrise from prop wash interactions: * S-I drone relative positions Builds a map of the basic static interaction forces * I drone velocity Corrects for velocity induced delays due to the force field off of I. * I drone acceleration Corrects for I drone thrust levels changing shape of force field. * S drone static thrust level Corrects for the changes made in the force field due to S varying its thrust in reponse to I drone downwash. #### Alternative We may also be able to include a dynamic controller on the S drone which varies its thrust in response to the load cell load (i.e. attempts to return load cell loading to 0). With the controller having no estimation process for location/orientation, this may be easier to train the full model while accounting for the fact that controller actions have an impact on the S-I drone aerodynamic system. ## Training in the Real-world What do we need to consider when transferring our training procedure from simulation to reality? - No oracle forces to validate our force labels - Presence of biases: measured forces will not line up as well with the oracle drone-drone forces - Force function will be higher-dimensional: will be a function of relative velocity and perhaps relative acceleration - In simulation, we have only modeled the drone-drone forces in the 'd' direction - Force function will be continuous

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully