Input Shaping seems to break on different length moves
-
I have been experimenting with different frequency values for input shaping and I recently tried 6Hz. Something odd happened so I tried many different variations: different algorithms, axes in different order, different number of axes.
At 6Hz, long moves have an acceleration curve that is very gentle. wooOOOooow.
At 200mm it goes woooOO| (hard stop)
As I increase the move length the curve gets better. woooOOOO\ (less hard stop), then woooOOOo, then woooOOOoo, then woooOOOooo, and so on.
It's very reliably observably correlated to the length of the movement.
If I am 300mm away from the start of the recording session, it goes woooOOOooow to get to the starting position, then it runs its 200mm recording move and goes woooOO|. Then if I repeat, which means it only needs 200mm to get back to the starting position, it does woooOO| again on the way to the starting position. So I think this rules out the input shaping plugin.
-
-
@droftarts everything is latest firmware. Running on a tool board 1.3 and on a distribution board.
The moves are being generated by the Input Shaper Plug-in.
Board: Duet 3 MB6HC (MB6HC)
DSF Version: 3.4.5
Firmware: RepRapFirmware for Duet 3 MB6HC 3.4.5 (2022-11-30) -
; Configuration file for Duet 3 MB 6HC (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.12 on Sun Aug 07 2022 12:40:33 GMT-0700 (Pacific Daylight Time) ; General preferences M575 P1 S1 B57600 ; enable support for PanelDue G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Duet 3" ; set printer name M669 K1 ; select CoreXY mode ; Drives M569 P0.0 S0 ; physical drive 0.0 goes reverse M569 P0.1 S1 ; physical drive 0.1 goes forwards M569 P0.2 S0 ; physical drive 0.2 goes forwards M569 P0.3 S0 ; physical drive 0.3 goes reverse M569 P0.4 S0 ; physical drive 0.4 goes reverse M569 P0.5 S0 ; physical drive 0.0 goes reverse M569 P121.0 S0 ; physical drive 121.0 goes reverse M569 P122.0 S0 ; physical drive 122.0 goes reverse M569 P123.0 S0 ; physical drive 123.0 goes reverse M569 P124.0 S0 ; physical drive 124.0 goes reverse M584 X0.0 Y0.1 C0.2 Z0.5:0.4:0.3 E121.0:122.0:123.0:124.0 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M350 C8 I0 M92 X200.00 Y200.00 Z3200.00 E690.00 C100 ; set steps per mm M566 X500.00 Y500.00 Z100.20 E500 C2 ; set maximum instantaneous speed changes (mm/min) M203 X24000.00 Y24000.00 Z900.00 E6000.00 ; set maximum speeds (mm/min) M203 C5000 M201 X20000.00 Y20000.00 Z100.00 E3600 C400 ; set accelerations (mm/s^2) M204 T4000 P2000 M906 X2000 Y2000 Z1400 C500 I30 ; set motor currents (mA) and motor idle factor in per cent M906 E800 I10 M84 S30 ; Set idle timeout M207 S1.5 F7200 Z0.2 ; firmware retraction ; Axis Limits M208 X-82.8 Y-7 Z0 S1 ; set axis minima M208 X427 Y300 Z600 S0 ; set axis maxima ; Endstops M574 X1 S3 ; configure sensorless endstop for low end on X M574 Y1 S3 ; configure sensorless endstop for low end on Y ;M574 Z1 S1 P"null" ; configure switch-type (e.g. microswitch) endstop for low end on Z via pin null ; Z-Probe M558 P8 C"^io8.in" H1 I1 A5 F120 T18000 S.01 ; set Z probe type to switch and the dive height + speeds G31 P500 X0 Y12 Z0 ; set Z probe trigger value, offset and trigger height M557 X2:333 Y5:300 P24:17 ; define mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out1" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S140 ; set temperature limit for heater 0 to 140C M308 S1 P"121.temp0" Y"thermistor" B4725 T100000 C7.060000e-8 ; configure sensor 1 as thermistor on pin 121.temp0 M950 H1 C"121.out0" T1 ; create nozzle heater output on 121.out0 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S350 ; set temperature limit for heater 1 to 350C M308 S2 P"122.temp0" Y"thermistor" B4725 T100000 C7.060000e-8 ; configure sensor 2 as thermistor on pin 122.temp0 M950 H2 C"122.out0" T2 ; create nozzle heater output on 122.out0 and map it to sensor 2 M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H2 S350 ; set temperature limit for heater 2 to 350C M308 S3 P"123.temp0" Y"thermistor" B4725 T100000 C7.060000e-8 ; configure sensor 3 as thermistor on pin 123.temp0 M950 H3 C"123.out0" T3 ; create nozzle heater output on 123.out0 and map it to sensor 3 M307 H3 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H3 S350 ; set temperature limit for heater 3 to 350C M308 S4 P"124.temp0" Y"thermistor" B4725 T100000 C7.060000e-8 ; configure sensor 4 as thermistor on pin 124.temp0 M950 H4 C"124.out0" T4 ; create nozzle heater output on 124.out0 and map it to sensor 4 M307 H4 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H4 S350 ; set temperature limit for heater 4 to 350C ; Fans M950 F0 C"121.out2+out2.tach" Q500 ; create fan 0 on pin 121.out2 and set its frequency M106 P0 S0 H1 T80 C"Cooler 0" ; set fan 0 value. Thermostatic control is turned on M950 F1 C"121.out1" Q16000 ; create fan 1 on pin 121.out1 and set its frequency M106 P1 S0 H-1 C"Blower 0" ; set fan 1 value. Thermostatic control is turned off M950 F2 C"122.out2+out2.tach" Q500 ; create fan 2 on pin 122.out2 and set its frequency M106 P2 S0 H2 T80 C"Cooler 1" ; set fan 2 value. Thermostatic control is turned on M950 F3 C"122.out1" Q16000 ; create fan 3 on pin 122.out1 and set its frequency M106 P3 S0 H-1 C"Blower 1" ; set fan 3 value. Thermostatic control is turned off M950 F4 C"123.out2+out2.tach" Q500 ; create fan 4 on pin 123.out2 and set its frequency M106 P4 S1 H3 T80 C"Cooler 2" ; set fan 4 value. Thermostatic control is turned on M950 F5 C"123.out1" Q16000 ; create fan 5 on pin 123.out1 and set its frequency M106 P5 S0 H-1 C"Blower 2" ; set fan 5 value. Thermostatic control is turned off M950 F6 C"124.out2+out2.tach" ;Q500 ; create fan 6 on pin 124.out2 and set its frequency M106 P6 S1 H4 T80 C"Cooler 3" ; set fan 6 value. Thermostatic control is turned on M950 F7 C"124.out1" Q16000 ; create fan 7 on pin 124.out1 and set its frequency M106 P7 S0 H-1 C"Blower 3" ; set fan 7 value. Thermostatic control is turned off ; Tools M563 P0 S"Tool 0" D0 H1 F1 ; define tool 0 G10 P0 X42.696 Y2.87 Z-11.80 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C M563 P1 S"Tool 1" D1 H2 F3 ; define tool 1 G10 P1 X42.696 Y2.97 Z-11.35 ; set tool 1 axis offsets G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C M563 P2 S"Tool 2" D2 H3 F5 ; define tool 2 G10 P2 X42.169 Y2.470 Z-11.65 ; set tool 2 axis offsets G10 P2 R0 S0 ; set initial tool 2 active and standby temperatures to 0C M563 P3 S"Tool 3" D3 H4 F7 ; define tool 3 G10 P3 X42.696 Y2.87 Z-11.65 ; set tool 3 axis offsets G10 P3 R0 S0 ; set initial tool 3 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous M501 ; load saved parameters from non-volatile memory M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss M671 X-10:-9.2:341.5 Y3.5:257.1:130.6 S7.5 ;lead screws M572 D0 S0.042 ; pressure advance G21 ; millimeters ; Accelerometers M955 P121.0 I54 ;tool0 M955 P122.0 I10 ;tool1 M955 P123.0 I10 ;tool2 M955 P124.0 I10 ;tool3 ; orbiter sensors M950 J2 C"121.io0.in" M950 J4 C"122.io0.in" M950 J6 C"123.io0.in" M950 J8 C"124.io0.in" M950 J3 C"121.io0.out" M950 J5 C"122.io0.out" M950 J7 C"123.io0.out" M950 J9 C"124.io0.out" M581 P2 T2 S0 R2 M581 P3 T3 S0 R2 M581 P4 T4 S0 R2 M581 P5 T5 S0 R2 M581 P6 T6 S0 R2 M581 P7 T7 S0 R2 M581 P8 T8 S0 R2 M581 P9 T9 S0 R2 ;M581 P3 T11 S1 R1 M581 P5 T11 S1 R1 ;M581 P7 T11 S1 R1 ;M581 P9 T11 S1 R1
-
@gnydick does it behave like this even when you are not using the input shaping plugin, when you configure a very low IS frequency?
-
@dc42 99% sure. I will confirm ASAP.
-
@dc42 yes, confirmed. In fact, the start of the movement and the end of the movement are effected unueqally
(move length)
50mm - abrupt at both ends
100mm - smooth at start, abrupt at end
150mm - smooth at both ends -
@gnydick thanks. I will attempt to reproduce your results.
-
@gnydick I've reviewed your files and I can see what is happening. Some bservations:
- You have set your acceleration very high. This is not a criticism, but it means that the "hard stop" you describe is just acceleration or deceleration at the acceleration you specified, without input shaping applied.
- Input shaping works by splitting the acceleration into multiple segments (the number of segments depends on the type of IS selected).
- Each segment needs to last for a certain amount of time, in most cases close to half a cycle of the input shaping frequency. The lower the input shaping frequency, the longer each segment needs to be. This means that the average acceleration has to be reduced so as to reach the target speed in the total acceleration time (which is why RRF allows you to configure a minimum acceptable acceleration).
- Reducing acceleration/deceleration also lengthens the acceleration/deceleration distances. If the move is short then this will prevent the target speed being reached.
- Currently, RRF does not apply IS unless it is possible to reach the target speed even when IS is applied. In your examples, at 50mm long there isn't enough distance to reach the target speed when any IS is applied. At 100mm long it is possible to reach the target speed when IS is applied at one end of the move only. At 150mm long it is possible to apply IS at both ends.
The combination of high acceleration, fairly high max speed and very low IS frequency in your configuration causes this to show up. However, with more typical IS frequencies this effect will still occur on short moves. For this reason, we already intend to improve IS in RRF 3.5 by allowing moves to have their top speed reduced when that is necessary to allow IS to be applied. We'll likely have a minimum speed parameter to avoid this being applied excessively.
-
@dc42 interesting. How does it decide to apply IS to just the start, but not the end?
-
@gnydick said in Input Shaping seems to break on different length moves:
@dc42 interesting. How does it decide to apply IS to just the start, but not the end?
Because it looks at the acceleration segment before it looks at the deceleration segment.
-
@dc42 does it make sense to look at it as a whole first?
-
@gnydick said in Input Shaping seems to break on different length moves:
@dc42 does it make sense to look at it as a whole first?
That's what we'll be doing in future, in order to detect when the top speed needs to be reduced in order to accommodate input shaping.