{"action":"created","issue":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2087","repository_url":"https://api.github.com/repos/cleanflight/cleanflight","labels_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2087/labels{/name}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2087/comments","events_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2087/events","html_url":"https://github.com/cleanflight/cleanflight/pull/2087","id":151234795,"number":2087,"title":"For discussion - use of noise-robust differentiators for DTerm in PIDs","user":{"login":"martinbudden","id":194586,"avatar_url":"https://avatars.githubusercontent.com/u/194586?v=3","gravatar_id":"","url":"https://api.github.com/users/martinbudden","html_url":"https://github.com/martinbudden","followers_url":"https://api.github.com/users/martinbudden/followers","following_url":"https://api.github.com/users/martinbudden/following{/other_user}","gists_url":"https://api.github.com/users/martinbudden/gists{/gist_id}","starred_url":"https://api.github.com/users/martinbudden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinbudden/subscriptions","organizations_url":"https://api.github.com/users/martinbudden/orgs","repos_url":"https://api.github.com/users/martinbudden/repos","events_url":"https://api.github.com/users/martinbudden/events{/privacy}","received_events_url":"https://api.github.com/users/martinbudden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":81,"created_at":"2016-04-26T20:45:12Z","updated_at":"2016-05-03T21:32:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2087","html_url":"https://github.com/cleanflight/cleanflight/pull/2087","diff_url":"https://github.com/cleanflight/cleanflight/pull/2087.diff","patch_url":"https://github.com/cleanflight/cleanflight/pull/2087.patch"},"body":"For discussion I've implemented a set of noise-robust differentiators for the DTerm.\r\n\r\nThese were formulated by Pavel Holoborodko and are described at http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/\r\n\r\nEssentially these combine differentiation with noise suppression and zero time lag in a computationally efficient manner.\r\n\r\nOf course the only way to see if they are any good for DTerm calculation is to actually try them out. @digitalentity is already using a variant in iNav.\r\n\r\n@borisbstyle , you may be interested in these for Betaflight.\r\n@ledvinap , @hydra , @joshuabardwell , I'd certainly value your thoughts on these.\r\n\r\nThe differentiators are configurable by filter length, from N=1 which is just ordinary numeric differentiation to N=5.\r\n\r\nCleanflight necessarily uses one-sided filters, and these have some disadvantages compared with centred filters, in that they need to be longer and they amplify noise in the \"mid-frequency range\". How that effects Cleanflight is to be seen.\r\n\r\nThe coefficients are customisable to give different filter characteristics and Pavel has given some indication on his web page that he might be willing to help with such customisation, but I haven't contacted him yet."},"comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/comments/216671173","html_url":"https://github.com/cleanflight/cleanflight/pull/2087#issuecomment-216671173","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2087","id":216671173,"user":{"login":"borisbstyle","id":10757508,"avatar_url":"https://avatars.githubusercontent.com/u/10757508?v=3","gravatar_id":"","url":"https://api.github.com/users/borisbstyle","html_url":"https://github.com/borisbstyle","followers_url":"https://api.github.com/users/borisbstyle/followers","following_url":"https://api.github.com/users/borisbstyle/following{/other_user}","gists_url":"https://api.github.com/users/borisbstyle/gists{/gist_id}","starred_url":"https://api.github.com/users/borisbstyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisbstyle/subscriptions","organizations_url":"https://api.github.com/users/borisbstyle/orgs","repos_url":"https://api.github.com/users/borisbstyle/repos","events_url":"https://api.github.com/users/borisbstyle/events{/privacy}","received_events_url":"https://api.github.com/users/borisbstyle/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T21:32:20Z","updated_at":"2016-05-03T21:32:20Z","body":"I vote for IIR. Did some more testing today and it indeed seemed better.\r\n\r\nBesides that all these ESC firmwares are getting better too and have their filtering.\r\n\r\nFor example I tried the latest blheli 14.5 and it was night and day difference with previous versions."}}