small bug-fixes and greek alphabet for paired peaks
This commit is contained in:
@@ -25,7 +25,7 @@ Then, call the `COMPARE_BELTS_RESPONSES` macro and look for the graphs in the re
|
|||||||
|
|
||||||
### Belts frequency profiles
|
### Belts frequency profiles
|
||||||
|
|
||||||
On these graphs, **you want both curves to look similar and overlap to form a single curve**: try to make them fit as closely as possible in frequency **and** in amplitude. Usually a belt graph is composed of one or two main peaks (more than 2 peaks can hint about mechanical problems). It's acceptable to have "noise" around the main peaks, but it should be present on both curves with a comparable amplitude. Keep in mind that when you tighten a belt, its peaks should move diagonally toward the upper right corner, changing significantly in amplitude and slightly in frequency. Additionally, the magnitude order of the main peaks *should typically* range from ~500k to ~2M on most machines.
|
On these graphs, **you want both curves to look similar and overlap to form a single curve**: try to make them fit as closely as possible in frequency **and** in amplitude. Usually a belt graph is composed of one or two main paired peaks (more than 2 peaks can hint about mechanical problems). It's acceptable to have "noise" around the main peaks, but it should be present on both curves with a comparable amplitude. Keep in mind that when you tighten a belt, its peaks should move diagonally toward the upper right corner, changing significantly in amplitude and slightly in frequency. Additionally, the magnitude order of the main peaks *should typically* range from ~500k to ~2M on most machines.
|
||||||
|
|
||||||
Aside from the actual belt tension, the resonant frequency/amplitude of the curves depends primarily on three parameters:
|
Aside from the actual belt tension, the resonant frequency/amplitude of the curves depends primarily on three parameters:
|
||||||
- the *mass of the toolhead*, which is identical on CoreXY, CrossXY and H-Bot machines for both belts. So this will unlikely have any effect here
|
- the *mass of the toolhead*, which is identical on CoreXY, CrossXY and H-Bot machines for both belts. So this will unlikely have any effect here
|
||||||
@@ -40,7 +40,7 @@ The Cross-Belts plot is an innovative cool way to compare the frequency profiles
|
|||||||
|
|
||||||
The good zone, wider at the bottom (low-amplitude regions where the deviation doesn't matter much) and narrower at the top right (high-energy region where the main peaks lie), represents acceptable deviations. So **you want all points to be close to the ideal center line and as many as possible within the green zone**, as this means that the bands are well tuned and behave similarly.
|
The good zone, wider at the bottom (low-amplitude regions where the deviation doesn't matter much) and narrower at the top right (high-energy region where the main peaks lie), represents acceptable deviations. So **you want all points to be close to the ideal center line and as many as possible within the green zone**, as this means that the bands are well tuned and behave similarly.
|
||||||
|
|
||||||
Paired peaks of exactly the same frequency will be on the same point (labeled A1/A2, ...) and the distance from the center line will show the difference in energy. For paired peaks that also have a frequency delta between them, they are displayed as two points (labeled A1 and A2, ...) and the additional distance between them along the plotted line represents their frequency delta.
|
Paired peaks of exactly the same frequency will be on the same point (labeled α1/α2, β1/β2, ...) and the distance from the center line will show the difference in energy. For paired peaks that also have a frequency delta between them, they are displayed as two points (labeled α1 and α2, ...) and the additional distance between them along the plotted line represents their frequency delta.
|
||||||
|
|
||||||
### Estimated similarity and mechanical issues indicator
|
### Estimated similarity and mechanical issues indicator
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ def axes_shaper_calibration(gcmd, config, st_thread: ShakeTuneThread) -> None:
|
|||||||
point = (x, y, z)
|
point = (x, y, z)
|
||||||
|
|
||||||
toolhead.manual_move(point, feedrate_travel)
|
toolhead.manual_move(point, feedrate_travel)
|
||||||
|
toolhead.dwell(0.5)
|
||||||
|
|
||||||
# Configure the graph creator
|
# Configure the graph creator
|
||||||
creator = st_thread.get_graph_creator()
|
creator = st_thread.get_graph_creator()
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ def compare_belts_responses(gcmd, config, st_thread: ShakeTuneThread) -> None:
|
|||||||
point = (x, y, z)
|
point = (x, y, z)
|
||||||
|
|
||||||
toolhead.manual_move(point, feedrate_travel)
|
toolhead.manual_move(point, feedrate_travel)
|
||||||
|
toolhead.dwell(0.5)
|
||||||
|
|
||||||
# Configure the graph creator
|
# Configure the graph creator
|
||||||
motors_config_parser = MotorsConfigParser(config, motors=None)
|
motors_config_parser = MotorsConfigParser(config, motors=None)
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ def excitate_axis_at_freq(gcmd, config) -> None:
|
|||||||
point = (x, y, z)
|
point = (x, y, z)
|
||||||
|
|
||||||
toolhead.manual_move(point, feedrate_travel)
|
toolhead.manual_move(point, feedrate_travel)
|
||||||
|
toolhead.dwell(0.5)
|
||||||
|
|
||||||
min_freq = freq - 1
|
min_freq = freq - 1
|
||||||
max_freq = freq + 1
|
max_freq = freq + 1
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ matplotlib.use('Agg')
|
|||||||
from ..helpers.common_func import detect_peaks, parse_log, setup_klipper_import
|
from ..helpers.common_func import detect_peaks, parse_log, setup_klipper_import
|
||||||
from ..helpers.console_output import ConsoleOutput
|
from ..helpers.console_output import ConsoleOutput
|
||||||
|
|
||||||
ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' # For paired peaks names
|
ALPHABET = 'αβγδεζηθικλμνξοπρστυφχψω' # For paired peak names (using the Greek alphabet to avoid confusion with belt names)
|
||||||
|
|
||||||
PEAKS_DETECTION_THRESHOLD = 0.1 # Threshold to detect peaks in the PSD signal (10% of max)
|
PEAKS_DETECTION_THRESHOLD = 0.1 # Threshold to detect peaks in the PSD signal (10% of max)
|
||||||
DC_MAX_PEAKS = 2 # Maximum ideal number of peaks
|
DC_MAX_PEAKS = 2 # Maximum ideal number of peaks
|
||||||
@@ -524,7 +524,7 @@ def belts_calibration(
|
|||||||
|
|
||||||
# Adding Shake&Tune version in the top right corner
|
# Adding Shake&Tune version in the top right corner
|
||||||
if st_version != 'unknown':
|
if st_version != 'unknown':
|
||||||
fig.text(0.995, 0.985, st_version, ha='right', va='bottom', fontsize=8, color=KLIPPAIN_COLORS['purple'])
|
fig.text(0.995, 0.980, st_version, ha='right', va='bottom', fontsize=8, color=KLIPPAIN_COLORS['purple'])
|
||||||
|
|
||||||
return fig
|
return fig
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ class BeltsGraphCreator(GraphCreator):
|
|||||||
)
|
)
|
||||||
fig = belts_calibration(
|
fig = belts_calibration(
|
||||||
lognames=[str(path) for path in lognames],
|
lognames=[str(path) for path in lognames],
|
||||||
|
kinematics=self._kinematics,
|
||||||
klipperdir=str(self._config.klipper_folder),
|
klipperdir=str(self._config.klipper_folder),
|
||||||
accel_per_hz=self._accel_per_hz,
|
accel_per_hz=self._accel_per_hz,
|
||||||
st_version=self._version,
|
st_version=self._version,
|
||||||
|
|||||||
@@ -381,9 +381,9 @@ def shaper_calibration(
|
|||||||
title_line4 = ''
|
title_line4 = ''
|
||||||
title_line5 = ''
|
title_line5 = ''
|
||||||
fig.text(0.12, 0.957, title_line2, ha='left', va='top', fontsize=16, color=KLIPPAIN_COLORS['dark_purple'])
|
fig.text(0.12, 0.957, title_line2, ha='left', va='top', fontsize=16, color=KLIPPAIN_COLORS['dark_purple'])
|
||||||
fig.text(0.58, 0.965, title_line3, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
|
fig.text(0.58, 0.963, title_line3, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
|
||||||
fig.text(0.58, 0.951, title_line4, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
|
fig.text(0.58, 0.948, title_line4, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
|
||||||
fig.text(0.58, 0.919, title_line5, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
|
fig.text(0.58, 0.933, title_line5, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
|
||||||
|
|
||||||
# Plot the graphs
|
# Plot the graphs
|
||||||
plot_freq_response(
|
plot_freq_response(
|
||||||
|
|||||||
Reference in New Issue
Block a user