payload: {"action":"created","issue":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/16531","repository_url":"https://api.github.com/repos/MarlinFirmware/Marlin","labels_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/16531/labels{/name}","comments_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/16531/comments","events_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/16531/events","html_url":"https://github.com/MarlinFirmware/Marlin/issues/16531","id":548370065,"node_id":"MDU6SXNzdWU1NDgzNzAwNjU=","number":16531,"title":"[FR] (Practical algorithm provided) Vibration compensation","user":{"login":"nalimcos","id":30739168,"node_id":"MDQ6VXNlcjMwNzM5MTY4","avatar_url":"https://avatars3.githubusercontent.com/u/30739168?v=4","gravatar_id":"","url":"https://api.github.com/users/nalimcos","html_url":"https://github.com/nalimcos","followers_url":"https://api.github.com/users/nalimcos/followers","following_url":"https://api.github.com/users/nalimcos/following{/other_user}","gists_url":"https://api.github.com/users/nalimcos/gists{/gist_id}","starred_url":"https://api.github.com/users/nalimcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalimcos/subscriptions","organizations_url":"https://api.github.com/users/nalimcos/orgs","repos_url":"https://api.github.com/users/nalimcos/repos","events_url":"https://api.github.com/users/nalimcos/events{/privacy}","received_events_url":"https://api.github.com/users/nalimcos/received_events","type":"User","site_admin":false},"labels":[{"id":91737852,"node_id":"MDU6TGFiZWw5MTczNzg1Mg==","url":"https://api.github.com/repos/MarlinFirmware/Marlin/labels/T:%20Feature%20Request","name":"T: Feature Request","color":"1d76db","default":false,"description":""}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2020-01-11T02:46:01Z","updated_at":"2020-01-14T01:35:33Z","closed_at":null,"author_association":"NONE","body":"Hello!\r\n\r\n'Ringing' (wavy surface pattern) is a common problem when attempting higher printing speeds; vibration compensation has been brought up here before, but this approach seems new, and I believe it would require little enough processing power to **comfortably run even on 8-bit controllers**.\r\n\r\n\r\n**Quick description**\r\n\r\n- No acceleration, high jerk - any speed change is 'instantaneous' here. We can tone that down later on.\r\n- Roughly sinusoidal pattern -> print head motion can be approximated as a simple sprung mass system.\r\n- Let's call T the vibration period of the system when disturbed. (/!\\ T is something else in the article)\r\n\r\n<some math here, check the article for details>\r\n\r\nBy **cutting each corner** with an additional segment, along which the speed vector is the average of the speed vector for the previous and next segments, and starting T/4 before reaching the initial corner, and ending T/4 after when it would have been reached (i.e. T/2 after the start of the corrective segment), **we can replace the usual oscillation by two waves which cancel each other, resulting in strongly reduced artefacts**.\r\n![output](https://user-images.githubusercontent.com/30739168/72197475-f22fb780-3421-11ea-84e9-40e1547b6e9b.png)\r\nThis image was output by a simple simulator I wrote to test my idea.\r\n- Grey lines: uncompensated and compensated 'ideal' trajectories\r\n- Red line: actual print head motion, no compensation, slight damping.\r\n- Blue line: actual print head motion, compensation calculated without accounting for damping, slight damping applied anyway. i.e. non ideal conditions but a nice demonstration\r\n(No damping in the model leads to a slightly wilder red line and an even better fit of the blue line)\r\n\r\nFull explanation with lots of math in attached PDF: [vibcomp.pdf](https://github.com/MarlinFirmware/Marlin/files/4048883/vibcomp.pdf) . Old work in progress so a bit messy though.\r\n\r\n\r\n**A simple acceleration-induced-vibration correction method as a by-product**\r\nWhile extending this approach to compensate for linear-acceleration-induced vibrations is not as easy, acceleration can be replaced by segments of movement at varying velocities, such that each segment has the duration of half a vibration period of the uncorrected system. Incidentally, this requires much less processing power than even true linear acceleration.\r\n\r\n\r\nI will add more information and further ideas later on, time for bed here!\r\n\r\nMilan\r\n\r\nEDIT:\r\n- Requires one printer-specific correction factor per corrected axis (or one for all of them in case of a symmetrical design)\r\n- Factors easily measured on a test cube printed without compensation, at suitable settings\r\n- Article provides bits of formulas linking max acceleration, average acceleration, max uncompensated deviation, max compensated deviation...\r\n- Problem when working with files sliced into short segments: no solution for adjacent segments; solution: look for first further segment for which a suitable end point exists within its first half? needs more thought"},"comment":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/comments/573956824","html_url":"https://github.com/MarlinFirmware/Marlin/issues/16531#issuecomment-573956824","issue_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/16531","id":573956824,"node_id":"MDEyOklzc3VlQ29tbWVudDU3Mzk1NjgyNA==","user":{"login":"AnHardt","id":211931,"node_id":"MDQ6VXNlcjIxMTkzMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/211931?v=4","gravatar_id":"","url":"https://api.github.com/users/AnHardt","html_url":"https://github.com/AnHardt","followers_url":"https://api.github.com/users/AnHardt/followers","following_url":"https://api.github.com/users/AnHardt/following{/other_user}","gists_url":"https://api.github.com/users/AnHardt/gists{/gist_id}","starred_url":"https://api.github.com/users/AnHardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnHardt/subscriptions","organizations_url":"https://api.github.com/users/AnHardt/orgs","repos_url":"https://api.github.com/users/AnHardt/repos","events_url":"https://api.github.com/users/AnHardt/events{/privacy}","received_events_url":"https://api.github.com/users/AnHardt/received_events","type":"User","site_admin":false},"created_at":"2020-01-14T01:35:33Z","updated_at":"2020-01-14T01:35:33Z","author_association":"CONTRIBUTOR","body":"> At t = 0, there is by definition no deviation from the path yet;\r\n\r\nThat's questionable. If the previous line segment ended with a deceleration phase we already have a displacement. (spring loaded)"}}
other: {"actor":{"display_login":"AnHardt"}}