mfs12 last edited by mfs12
DWC-3.4.0-b5 and RRF-3.4.0-b5 were released. So It's also time for a tiny update of inputshaping plugin.
It brings mostly UI cleanup tweaks and updated dependency. So don't forget to updated DWC and RRF before exploring this plugin.
Please leave a comment when you tested it successfully, found a bug or want to leave some general feedback.
How are your inputshaping results? Does the plugin help to calibrate your printer? Is it time for a first official release and leaving the pre-stage? What do you say?
release notes for inputshaping plugin 0.2.0-pre6
This work is based on the original acceleration plugin. Input shaping plugin tries to take
the input shaping calibration to a next level.
The current state is still EXPERIMENTAL!!!
Although it's experimental it brings already some handy features which is why i
am doing this release. Therefore please comment, give feedback, report bugs and share your
- Duet Web Control 3.4.0-b5
- RepRap Firmware 3.4.0-b5
- restructre plugin to use vue components
- added test configuration component
- added recorder component
- added chart component
- use object model to determine status of test
- added add/delete of algorithm configurations
- added add/delete/select of records
- added add/delete/select of sessions
- display test parameters in chart component
- allow records with differing samples rates of up to 1%
- cleaned up debugging output
- added localization
- home device only if not homed
- improved ui layout
- added component to manage multiple sessions
- added more parameter validation for test and algorithm
- disable tab record tab when no algorithms defined
- disable tab chart when no records available
- improved error reporting
- localized date-timestamps
- added integrals for each axis
- skip algorithm test which already have test record (speed improvement, easier understanding)
- improved editing note in configuration tab
- cleaned input fields (ids or not editable but only names)
- fixed initial filtering of records by axis
- fixed session cleanup when session is deleted
- fixed data handling when swapping sessions
- fixed can address handling (needs more testing)
- fixed record integrity when referenced algorithm is changed
- fixed CAN address handling when address is null
- fixed one-time homing for some machines
- parameter validation doesn't cover every situation
- switch to tab "initialize"
- create a new session or
- select an available session
- switch to tab "configure"
- configure your session session
- configure test parameters
- add as many input shaping algorithm configurations as you like
- more than one per algorithm are allowed
- this is good to compare different input shaping configuration of the same algorithm
- CAUTION: once a record in a session exists test parameters can't be changed anymore.
- switch to tab "record profiles"
- press "run" button and wait until recording is done
- switch to tab "frequency analysis"
- in "acceleration records" section you see a list of profiles recorded
- clicking on the entry DELETEs it form the session!!! (it is lost!!!)
- in "filter" section the show/hidden graphs are displayed
- un-checking an axis will hide or show all charts of an axis group
- in chart section
- individual graphs can be shown or hidden by pressing the colour next to the name
- press "FFT" button to show FFT representation of the graph
- press "Time" button to show time representation of the graph
- currently no data is stored permanently!!!
- everything is volatile so avoid hitting browser's reload
Potential next steps are
- store session in a local file or in browser's local storage or
- load session from local file or browser's local storage
- recommend input shaping parameters
- improve input validation
- add translations
SIam last edited by
@mfs12 good work! For now I didn't find any issue
pfn last edited by
@mfs12 very interesting, I put this together today https://forum.duet3d.com/topic/25531/collecting-lis3dh-data-outside-of-rrf and this could be a nice integration to call into an external device to collect data and subsequently stream it into dwc/rrf (rather than M956 to initiate data collection, it would be instead a call to an http endpoint that would stream data to a file in /sys/accelerometer/...)
lots of work to be done, and I don't know if I necessarily want to take on the firmware work yet, but this could make for a nice seamless experience. @PCR, awesomely, has even offered to design a combined lis3dh&esp8266 board; that means data collection could work with just 2 wires, 3.3v and gnd.
mfs12 last edited by mfs12
@pfn, would be cool to have it run with a battery and now cables at all
Basically there are two modules to modules to modify
- configuration, how to reach the accelerometer
- recorder, howto to download the accelerometer data
Shouldn't be overly complicated. Altough it is nothing i want to take care of right now.
You can find the sources at
gloomyandy last edited by
@mfs12 I've been using the plugin to try and find the best setup for my printer and here are a few thoughts...
When testing an axis say X the test currently just uses whatever position the other axis happens to be in. I'm not sure this gives the best results. In particular if you are switching from testing x to y and back again (as the position at the end of the test may not be the best position for tests on the other axis). I wonder if either the test should choose say the mid point of the other axis or allow you to configure it? It seems to me that the magnitude of the resonance can vary depending upon the position to some extent. I think klipper has the notion of a test point for this purpose.
Do you have any idea how much the length of the test move and the end point impacts the test results? In particular does the final position of he print head change them? I've not tested this but I wonder if perhaps having the end point be in the centre of the printer may give better/different outputs? Again perhaps the notion of being able to set a test point might help here?
I notice that the plugin display the "integrals" for each axis, these seem to be useful when comparing different results to help choose a shaper or frequency. I assume that an automated process may make uses of these. It might also be of use to provide a total for all there axis (possibly selected by using the filter option so you just get the total for the visible results?).
The klipper test for this seems to move the head back and forth at different frequencies to try and identify different resonances rather than just using a single move, do you think this gives better results rather than just using a single move?
@gloomyandy re #4 only a single move is needed if the total time to decelerate is either much shorter than or several times longer than the period of any resonance, and the total move time is likewise long enough. If that condition isn't met, then moving at multiple speeds would be worthwhile.
Re #2 the point on the axis at which the deceleration occurs might affect the results, because the lengths of potentially resonating belt segments varies with position.
MaxGyver last edited by MaxGyver
@mfs12 When I try to collect accelerometer data for my Y-Axis my Duet3 6HC crashes and reboots after doing the first two Y-Axis moves. Strangely, it works flawlessly on the X-Axis.
EDIT: After power cycling, it works again on both axis. I will keep an eye on this.
=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.4.0beta5 (2021-10-12 13:53:56) running on Duet 3 MB6HC v1.01 or later (SBC mode)
Board ID: 08DJM-956L2-G43S8-6J1F8-3S86J-9B3LF
Used output buffers: 1 of 40 (17 max)
=== RTOS ===
Static ram: 151104
Dynamic ram: 69036 of which 0 recycled
Never used RAM 130460, free system stack 200 words
Tasks: ACCEL(notifyWait,0.0%,348) SBC(resourceWait:,0.8%,508) HEAT(notifyWait,0.0%,327) Move(notifyWait,0.0%,276) CanReceiv(notifyWait,0.0%,797) CanSender(notifyWait,0.0%,374) CanClock(delaying,0.0%,351) TMC(notifyWait,7.9%,92) MAIN(running,87.6%,921) IDLE(ready,3.6%,30), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:00:07 ago, cause: software
Last software reset at 2021-10-15 18:50, reason: HeatTaskStuck, GCodes spinning, available RAM 130416, slot 1
Software reset code 0x4143 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0040080f BFAR 0x00000000 SP 0x20435b44 Task ACCE Freestk 348 ok
Stack: 00449c51 00449c46 61000000 20435488 20435488 00000006 ffffffe8 0049c018 204240b8 00000003 00477329 204354aa 20435488 00000007 000003e8 0000000a 004773b5 00000007 20419130 000003e8 00476805 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5 a5a5a5a5
Error status: 0x00
Step timer max interval 129
MCU temperature: min 54.3, current 55.0, max 55.1
Supply voltage: min 4.5, current 23.9, max 24.0, under voltage events: 1, over voltage events: 0, power good: yes
12V rail voltage: min 3.9, current 12.0, max 12.6, under voltage events: 0
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Driver 0: pos 0, standstill, SG min/max 0/0, reads 38481, writes 27 timeouts 0
Driver 1: pos 0, standstill, SG min/max 0/0, reads 38482, writes 27 timeouts 0
Driver 2: pos 0, standstill, SG min/max 0/0, reads 38482, writes 27 timeouts 0
Driver 3: pos 0, standstill, SG min/max 0/0, reads 38482, writes 27 timeouts 0
Driver 4: pos 0, standstill, SG min/max 0/0, reads 38484, writes 25 timeouts 0
Driver 5: pos 0, standstill, SG min/max 0/0, reads 38484, writes 25 timeouts 0
Date/time: 2021-10-15 18:51:26
Slowest loop: 1.84ms; fastest: 0.04ms
=== Storage ===
Free file entries: 10
SD card 0 not detected, interface speed: 37.5MBytes/sec
SD card longest read time 0.0ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 125, segments created 3, maxWait 4428ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 2, completed 2, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters = 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
=== GCodes ===
Segments left: 0
Movement lock held by null
HTTP* is doing "M122" in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
USB is idle in state(s) 0
Aux is idle in state(s) 0
Trigger* is idle in state(s) 0
Queue is idle in state(s) 0
LCD is idle in state(s) 0
SBC is idle in state(s) 0
Daemon* is idle in state(s) 0
Aux2 is idle in state(s) 0
Autopause is idle in state(s) 0
Code queue is empty
=== CAN ===
Messages queued 80, received 335, lost 0, longest wait 1ms for reply type 6018, peak Tx sync delay 5, free buffers 49 (min 48), ts 36/35/0
Tx timeouts 0,0,0,0,0,0
=== SBC interface ===
State: 4, failed transfers: 0, checksum errors: 0
Last transfer: 2ms ago
RX/TX seq numbers: 25316/305
SPI underruns 0, overruns 0
Disconnects: 0, timeouts: 0, IAP RAM available 0x2b7dc
Buffer RX/TX: 0/0-0
=== Duet Control Server ===
Duet Control Server v3.4-b5
Code buffer space: 4096
Configured SPI speed: 8000000Hz
Full transfers per second: 36.35, max wait times: 48.2ms/24.3ms
Codes per second: 1.19
Maximum length of RX/TX data transfers: 6564/1320