Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2021-10-25 12:31:02 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-10-25 12:31:02 +0300
commit3c93fb2137e785e6660f5b5c13b49746ce322e08 (patch)
treee403cab2f322f5117a3a54cac8bf3799259fa76d /src/Movement
parentaf4c424a01b73a7bb4ad9b2e9ebdf1f6172990bb (diff)
Added ZVDD input shaping
Diffstat (limited to 'src/Movement')
-rw-r--r--src/Movement/AxisShaper.cpp13
-rw-r--r--src/Movement/AxisShaper.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/Movement/AxisShaper.cpp b/src/Movement/AxisShaper.cpp
index f7dc64b9..55de9ad0 100644
--- a/src/Movement/AxisShaper.cpp
+++ b/src/Movement/AxisShaper.cpp
@@ -210,6 +210,18 @@ GCodeResult AxisShaper::Configure(GCodeBuffer& gb, const StringRef& reply) THROW
numExtraImpulses = 3;
break;
+ case InputShaperType::zvddd:
+ {
+ const float j = fsquare(fsquare(1.0 + k));
+ coefficients[0] = 1.0/j;
+ coefficients[1] = coefficients[0] + 4.0 * k/j;
+ coefficients[2] = coefficients[1] + 6.0 * fsquare(k)/j;
+ coefficients[3] = coefficients[2] + 4.0 * fcube(k)/j;
+ }
+ durations[0] = durations[1] = durations[2] = durations[3] = 0.5 * dampedPeriod;
+ numExtraImpulses = 4;
+ break;
+
case InputShaperType::ei2: // see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.465.1337&rep=rep1&type=pdf. United States patent #4,916,635.
{
const float zetaSquared = fsquare(zeta);
@@ -491,6 +503,7 @@ void AxisShaper::PlanShaping(DDA& dda, PrepParams& params, bool shapingEnabled)
case InputShaperType::zvd:
case InputShaperType::mzv:
case InputShaperType::zvdd:
+ case InputShaperType::zvddd:
case InputShaperType::ei2:
case InputShaperType::ei3:
params.SetFromDDA(dda); // set up the provisional parameters
diff --git a/src/Movement/AxisShaper.h b/src/Movement/AxisShaper.h
index 18ee9e02..d4740a5f 100644
--- a/src/Movement/AxisShaper.h
+++ b/src/Movement/AxisShaper.h
@@ -27,6 +27,7 @@ NamedEnum(InputShaperType, uint8_t,
none,
zvd,
zvdd,
+ zvddd,
);
class DDA;