Commit da6c0601 authored by Torbjørn Ludvigsen's avatar Torbjørn Ludvigsen 👷
Browse files

Corrects HP2 errs and adds findings to research

Had previously forgotten that HP2 had mechanical advantage of 2 on D.
So HP2 required even more compensation than previously calculated.

Most important finding: Static compensation is more important
than dynamic compensation. Even in the most extreme positions,
dynamic compensation is always less than ca 1/3 of total compensation.
This bound is valid for all Hangprinters with safe origin-idle line
lengths.
parent bc5bc808
......@@ -170,12 +170,12 @@ def how_big_difference_will_buildup_compensation_make(
# How much maximum dyamic compensation we'd get on a HP2
# In the most extreme positions
hp2_dyn_comp = how_big_difference_will_dynamic_buildup_compensation_make(
anchors, anchors, 0.008 / 0.7, np.array([2, 2, 2, 3]), 33
anchors, anchors, 0.008 / 0.7, np.array([2, 2, 2, 6]), 33
)
# array([[-13.77148104, 8.1767179 , 7.37944913, 2.06747765],
# [ 10.70476621, -17.00170537, 8.19752565, 3.00703615],
# [ 7.37944913, 6.00649088, -13.77148104, 2.06747765],
# [ 8.10059161, 7.15931149, 8.10059161, -43.46713892]])
# array([[-13.77148104, 8.1767179 , 7.37944913, 4.1349553 ],
# [ 10.70476621, -17.00170537, 8.19752565, 6.0140723 ],
# [ 7.37944913, 6.00649088, -13.77148104, 4.1349553 ],
# [ 8.10059161, 7.15931149, 8.10059161, -86.93427784]])
# A negative number means the motor will rotate less (in any direction) than it would have without compensation.
# A positive number means the motor will rotate more than it would without compensation.
# When motor rotates less, the line length changes less
......@@ -183,8 +183,8 @@ hp2_dyn_comp = how_big_difference_will_dynamic_buildup_compensation_make(
# Numbers represent effector movement added or subtracted by compensation algorithm.
#
# Note on choice of args for HP2:
# The mechanical advantage was really one, but we had [2, 2, 2, 3] lines per spool, which causes same
# buildup effect as a [2, 2, 2, 3] mechanical advantage
# The mechanical advantage was really [1, 1, 1, 2], but we had [2, 2, 2, 3] lines per spool.
# In total, this causes same buildup effect as a [2, 2, 2, 6] mechanical advantage
# The spool buildup factor was larger because the spool was narrower by a factor of 1/0.7
# How much maximum dyamic compensation we'd get on a HP3
......@@ -196,7 +196,7 @@ hp3_dyn_comp = how_big_difference_will_dynamic_buildup_compensation_make(
# [ 1.85962118, 1.5136357 , -3.47041322, 0.52100437],
# [ 2.04134909, 1.80414649, 2.04134909, -10.95371901]])
# On the HP3, wider spools with larger radius reduced the dynamic spool buildup a lot
# The worst case scenario was cut in four
# HP3 also removed the mechanical advantage on the D-axis
# How much maximum dyamic compensation we'd get on a HP4
hp4_dyn_comp = how_big_difference_will_dynamic_buildup_compensation_make(
......@@ -208,7 +208,9 @@ hp4_dyn_comp = how_big_difference_will_dynamic_buildup_compensation_make(
# [ 1.46155763, 1.29172619, 1.46155763, -5.22840237]])
# The HP4 further increased the spool radius, and gave each line its own spool
# Increasing the total number of spools from 4 to 9.
# The worst case buildup (D-axis buildup when effector up in the ceiling)
# HP4 re-introduced mechanical advantage on the D-axis, and also introduced
# mechanical advantage on the A, B, and C-axes.
# It did so while at the same time cutting the dynamic buildup in ~half.
# Observe that these are upper bounds on errors, in the hypothetical scenario where we move the effector out to the anchor.
# If you move max ca 1/3 of the way to an anchor you get a max dynamic compenstion of only 0.58 mm.
......@@ -216,13 +218,13 @@ hp4_dyn_comp = how_big_difference_will_dynamic_buildup_compensation_make(
# The amount of dynamic buildup that is left since HP2 is shown by this calculation
fraction_of_dyn_comp_needed_on_hp4_vs_hp2 = hp4_dyn_comp / hp2_dyn_comp
# array([[0.18042604, 0.18042604, 0.18042604, 0.12028402],
# [0.18042604, 0.18042604, 0.18042604, 0.12028402],
# [0.18042604, 0.18042604, 0.18042604, 0.12028402],
# [0.18042604, 0.18042604, 0.18042604, 0.12028402]])
# We see that less than 12 - 18% of the dynamic compensation is needed on HP4 compared to HP2
# In other words: Dynamic spool buildup is reduced by ca 80% since HP2
# Similar computation shows dynamic buildup was reduced by ca 50% between HP3 and HP4
# array([[0.18042604, 0.18042604, 0.18042604, 0.06014201],
# [0.18042604, 0.18042604, 0.18042604, 0.06014201],
# [0.18042604, 0.18042604, 0.18042604, 0.06014201],
# [0.18042604, 0.18042604, 0.18042604, 0.06014201]])
# We see that less than 6 - 18% of the dynamic compensation is needed on HP4 compared to HP2
# In other words: Dynamic spool buildup is reduced by ca 82% on ABC, and 94% on D, since HP2
# Similar computation shows dynamic buildup was reduced by 28% (ABC) and 52% (D) between HP3 and HP4
################################################################################################
######## Static Compensation ###################################################################
......@@ -235,14 +237,16 @@ hp2_static_comp = how_big_difference_will_static_buildup_compensation_make(
anchors,
anchors,
0.008 / 0.7,
np.array([2, 2, 2, 3]),
np.array([2, 2, 2, 6]),
33,
np.array([5000, 5000, 5000, 6000]),
np.array([5000, 5000, 5000, 12000]),
)
# array([[-42.64695469, -31.92476516, -30.34781217, -15.76711056],
# [-36.46081797, -47.47009576, -31.96484068, -18.98477844],
# [-30.34781217, -27.4119855 , -42.64695469, -15.76711056],
# [-31.77769909, -29.89717571, -31.77769909, -75.43209739]])
# array([[ -42.64695469, -31.92476516, -30.34781217, -30.85261284],
# [ -36.46081797, -47.47009576, -31.96484068, -37.09348638],
# [ -30.34781217, -27.4119855 , -42.64695469, -30.85261284],
# [ -31.77769909, -29.89717571, -31.77769909, -153.31013063]])
# There were 2*2500 mm origin-idle lines on ABC. Two lines, no mech adv.
# There were 2*3*2000 mm origin-idle lines on D. Three lines, mech adv of two.
hp3_static_comp = how_big_difference_will_static_buildup_compensation_make(
anchors,
......@@ -256,6 +260,8 @@ hp3_static_comp = how_big_difference_will_static_buildup_compensation_make(
# [ -9.37713369, -11.91784016, -8.20968558, -4.8727733 ],
# [ -7.79058608, -7.03073739, -10.72106283, -4.04210374],
# [ -8.16116125, -7.67386438, -8.16116125, -18.74234315]])
# There were 2*2500 mm origin-idle lines on ABC. Two lines, no mech adv.
# There were 3*2000 mm origin-idle lines on D. Three lines, no mech adv.
hp4_static_comp = how_big_difference_will_static_buildup_compensation_make(
anchors,
......@@ -263,12 +269,14 @@ hp4_static_comp = how_big_difference_will_static_buildup_compensation_make(
0.008,
np.array([2, 2, 2, 2]),
65,
np.array([5000, 5000, 5000, 6000 * 2 / 3]),
np.array([5000, 5000, 5000, 4000]),
)
# array([[-7.67402308, -5.88140343, -5.58797583, -1.93535984],
# [-6.72717476, -8.52953831, -5.88886442, -2.33358816],
# [-5.58797583, -5.04252281, -7.67402308, -1.93535984],
# [-5.85402535, -5.50418169, -5.85402535, -8.92192291]])
# There are 2*2500 mm origin-idle lines on ABC. One line per spool, mech adv of two.
# There are 2*2000 mm origin-idle lines on D. One line per spool, mech adv of two.
################################################################################################
######## Both Static and Dynamic Compensation ##################################################
......@@ -279,14 +287,14 @@ hp2_comp = how_big_difference_will_buildup_compensation_make(
anchors,
anchors,
0.008 / 0.7,
np.array([2, 2, 2, 3]),
np.array([2, 2, 2, 6]),
33,
np.array([5000, 5000, 5000, 6000]),
np.array([5000, 5000, 5000, 12000]),
)
# array([[-55.73183566, -24.15571112, -23.33627775, -13.82210475],
# [-26.28975568, -63.62415285, -24.1760163 , -16.15587105],
# [-23.33627775, -21.70495821, -55.73183566, -13.82210475],
# [-24.08097593, -23.0948036 , -24.08097593, -116.32435951]])
# array([[ -55.73183566, -24.15571112, -23.33627775, -27.18014818],
# [ -26.28975568, -63.62415285, -24.1760163 , -31.75208208],
# [ -23.33627775, -21.70495821, -55.73183566, -27.18014818],
# [ -24.08097593, -23.0948036 , -24.08097593, -230.5208961 ]])
hp3_comp = how_big_difference_will_buildup_compensation_make(
anchors,
......@@ -307,7 +315,7 @@ hp4_comp = how_big_difference_will_buildup_compensation_make(
0.008,
np.array([2, 2, 2, 2]),
65,
np.array([5000, 5000, 5000, 6000 * 2 / 3]),
np.array([5000, 5000, 5000, 4000]),
)
# array([[-10.13545333, -4.41994691, -4.26901825, -1.68854468],
# [ -4.81387036, -11.56831908, -4.42368885, -1.97460865],
......@@ -340,10 +348,28 @@ dynamic_adjustment_hp4 = hp4_dyn_comp/hp4_static_comp
# [-0.24966712, -0.23468088, -0.24966712, 0.58601743]])
# We see that static compensation avoids a lot of unneccesary motor rotation.
# The dynamic compensation adjusts (adds or subtracts to) the static compensation by up to 50%.
# That is, if we would only change spool radius, it would get us to +-37% of the compensation that we want along each axis.
# (This is the upper bound in my office.)
# Notice though, that the dynamic compensation always adjusts in both directions.
# The static compensation will always rotate too much on one motor, and too little on the antagonist motor,
# causing over-tightening whever the effector moves too far away from the origin in any direction.
# The dynamic compensation adjusts (adds or subtracts to) the static compensation by a smaller amount.
# If we would only compensate the spool radius statically, it would get us to +-37% of the total compensation that we want along each axis.
# (37% is the maximum of dynamic adjustment for HP4 in my office.)
# We can conclude that static compensation is more important to get right than dynamic compensation in my office.
# Sidenote:
# This 37% maximum is fairly constant for all Hangprinter setups, given that the user always ties in
# just enough origin-idle line on all spools to be able to move to the positions of all anchors without emptying any of the spools.
# Another sidenote:
# While printing, the fraction of dynamic compensation is much less than 37%.
# I'd consider > 10% of dynamic compensation to be unusual during print.
# Why Dynamic Compensation At All Then?
# Notice in the data how static compensation only ever makes the motors rotate less than they would have done with no compensation.
# Dynamic compensation always adjust in both directions (at least one motor always gets positive adjustment, at least one will get negative adjustment, in any move).
# Even after applying a perfect static compensation, we will still have one, two, or three motors rotate too much,
# and their antagonist motors rotate too little, in every move that goes away from the origin (and cancel this error back out when moving back towards origin).
# That is, without dynamic compensation we're limited in how far we can move away from the origin withough over-tightening.
# Static compensation does not mitigate over-tightening whenever the effector moves too far away from the origin (in any direction).
# Shorter answer:
# We want to move to the ceiling during the homing procedure.
# We need that move to be controlled an accurate.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment