Interpreting the Input Shaper Graphs

Interpreting the Input Shaper Graphs


  1. Theory - Resonances
  2. Theory - Power Spectral Density (PSD)
  3. Understanding the Graph
  4. How the shaper is recommended
  5. General Guidelines
  6. Identifying Mechanical Problems

If you are only interested in the graphs, skip the first two chapters. I recommend reading them, as it will improve your understanding of the graphs afterwards.

Theory - Resonances

The following explanation should make the idea of resonance tests and their influencing factors a bit more transparent. It does not claim to be scientifically complete.

  1. A periodic force with a certain frequency is applied to a system (the 3D printer). This is called the excitation frequency.
  2. The excitation frequency starts at a very low frequency (“slow” vibrations) and steadily increases over the measurement cycle to fast vibrations.
  3. The “response” of the system is measured with an Inertial Measurement Unit (IMU), also known as an accelerometer. The IMU measures the resulting g-forces (unit: G [m/s²]) at the location where the IMU is mounted.
  4. Depending on the excitation frequency, the system will respond weakly (low amplitude / low Power Spectral Density) or strongly (high amplitude).
  5. Local maxima may occur at certain frequencies. These are called resonant or natural frequencies (the peaks in the graph).
  6. Each part of the system may respond differently to the given excitation frequency. This means that each part has its own natural frequency at which it responds with a high amplitude (peak).
  7. The result is the complex response
    • of the entire system
    • at the IMU location
    • as a function of the frequency at which the system was excited.

Theory - Power Spectral Density (PSD)

The Power Spectral Density is a clever (though mathematically quite complex) way to make such time / frequency related measurements comparable. The following explanation tries to keep it in very simple terms and may be oversimplified.

As described in the first chapter, the system is excited at a known frequency in the range of 0 Hz to 200 Hz. The IMU measures this excitation acceleration as well as the resulting / superimposed vibrations.
The goal of the PSD method is to break this response down into individual frequencies and calculate how much power or energy a particular frequency contributes to the overall signal. Finally, the results are normalized to ensure that different measurements can be compared and then plotted graphically.

Understanding the Graph

1 - Y-Axis (left) - Power Spectral Density

See 2. Theory - Power Spectral Density (PSD)
The magnitude of this axis is given in scientific notation, e.g. “1e4” (see the top of the axis). This means that the value of the axis is multiplied by 10 000. So the peak in the example above has a PSD of

7.5 x 10 000 = 75 000

Any modification that would make the PSD value “1e5” would add another factor of 10, since “1e5” is a multiplication by 100 000.

:warning: This can easily lead to misinterpretation, especially when comparing two graphs: A peak with a PSD value of 2 in a graph scaled “1e4” seems to disappear in a graph scaled “1e5”. In fact, the peak is still there, just no longer graphically visible.

2 - X-Axis - Frequency

As explained above, the measurement is made along a broadband input of frequencies and the resulting frequencies are plotted along the X-axis.

3 - Y-Axis (right) - Shaper Vibration Reduction (Ratio)

This axis belongs to the dotted lines of each shaper (see No 5). It represents the “effectiveness” of a given shaper at a given frequency in reducing vibration.
For example, the orange line of the MVZ shaper has a ratio of 0.4 at 175 Hz. This means that each vibration at 175 Hz is multiplied by 0.4. The result is the residual vibration. Or to put it another way: Vibrations at 175 Hz are reduced by a factor of x2.5 when the MVZ shaper is used.
Again, this is a simplification: Internally, Klipper uses a mathematical scoring system that evaluates each shaper individually at the given frequencies and the corresponding PSD value. See also the chapter How the shaper is recommended.

4 - The actual graph

  • Measured vibrations are displayed in each X, Y, Z direction and their corresponding sum.
  • The height of the peak is the power of the vibration (PSD).
  • The dotted lines are the effectiveness of each shaper, as discussed above.
  • The cyan graph is the resulting vibration after applying the recommended shaper (see No 5).

5 - The Shaper Details

  • The available shapers are listed in this box.
  • They are sorted from least aggressive (least vibration reduction, but also the least smoothing) to most aggressive with highest smoothing.
  • The values in brackets (…) are
    • Frequency of the shaper for the [input_shaper] configuration setting.
    • vibr is the remaining total vibration after this shaper has been applied.
    • sm stands for smoothing and represents the effect of the shaper on the motion. Each shaper causes a certain amount of deviation from Klipper’s calculated target motion. This deviation is necessary for the avoidance of vibration, but can also have the effect of smoothing, i.e. the loss of small / fine details. It is a qualitative statement to compare the effect of the different shapers.
    • accel is the maximum recommended acceleration for a given shaper to avoid additional smoothing. For the example above, this means a printer that can run an acceleration of 20 000 should be limited to 15 600 when using the 3HUMP_EI shaper. It does not mean that this value should be used as the new acceleration of your printer, which is rated at, say, 3 000.
  • The last piece of information is the recommended shaper. This tries to find the best balance between smoothing and residual vibration.

How the shaper is recommended

  • The calculation is based on the sum of all axes (shown as a purple line on the graph).
  • The script calculates an abstract “score” for a given shaper and its frequency in two steps:
    • A per-frequency score (shown as a cyan line on the graph) based on the sum of all axes.
    • A combined score across the spectrum (shown as vibr in the graph’s box (No. 5)).
  • A separate scoring process is used for different input shaper types, taking into account smoothing and the remaining vibration score, to select the final recommended shaper.
  • The goal of this score is to correspond to a good shaper choice that reduces ringing for the printer, often resulting in an optimal or near-optimal shaper configuration.

General Guidelines

  • The resulting vibrations are not bound to any direction. This means that an excitation in Y can result in measured vibrations in X and/or Z.
  • Low frequency peaks are worse than high frequency peaks because they require lower frequency shapers to compensate, resulting in more smoothing and thus permitting lower maximum accelerations.
  • Mechanical tuning should be aimed at moving the lowest peaks to higher frequencies or eliminating some peaks altogether.
  • An ideal graph would be a single sharp peak at a very high frequency (greater than 50 - 70 Hz).
  • The tuning process considers the X and Y axes separately / independently. On a system where one axis has limited acceleration (either due to design or due to the required shaper), the other axis could benefit from a more aggressive shaper without (significantly) affecting the overall performance.
  • High PSD values are not a bad thing. On the contrary, they can indicate a very stiff system.
  • The reason for the resonances cannot be deduced from the graph.

Identifying Mechanical Problems

In fact, the shaper results can be used to identify mechanical problems with the printer:

The two pairs of graphs are from the same device:

  • The first is a Cartesian printer (similar to the Ender 5 layout).
  • The second is a high-end CoreXY printer.
  • The left graphs have a mechanical defect (binding) on one axis.
  • The right graphs have the defect fixed.

The following characteristics may indicate a mechanical problem with the motion system

  • Low power spectral density (< 1e3).
  • Very broad spectrum, almost as prominent as the main peak.
  • High proportions of auxiliary directions, e.g. high Z values.

The potential reasons for these effects are:

  • A binding axis cannot vibrate freely → low PSD.
  • A binding axis runs bumpy → Broad spectrum and additional directions.

This is not hard science, as there are certainly printers that show such a spectrum by default, but it is something to consider and check.