Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
General Math
Calculus
Differential Equations
Topology and Analysis
Linear and Abstract Algebra
Differential Geometry
Set Theory, Logic, Probability, Statistics
MATLAB, Maple, Mathematica, LaTeX
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
General Math
Calculus
Differential Equations
Topology and Analysis
Linear and Abstract Algebra
Differential Geometry
Set Theory, Logic, Probability, Statistics
MATLAB, Maple, Mathematica, LaTeX
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Mathematics
General Math
3rd order motion profile programming ("sinusoidal")
Reply to thread
Message
[QUOTE="Dominik Tugend, post: 5456852, member: 591625"] [B]Well currently I am examining if it's at least a convex optimization problem.[/B]The absoulte objective function can be replaced as it is done with LP-problems, by adding two constraints and a new variable and changing the first objective function: [tex] \text{absDiff} \in \mathbb{R}_{\geq 0} \\ \text{targetDeltaPos} -\text{resultDeltaPos} <= \text{absDiff} \\ -\text{targetDeltaPos} +\text{resultDeltaPos} <= \text{absDiff} [/tex] [B]New 1.4. Minimize:[/B] 1. [itex]\text{absDiff}[/itex] 2. as in first postIf we fix dir on any of the possible two values and if we have any two feasible solutions [tex] u_1 = \left( \text{phase1T}_1, \text{phase2T}_1, \text{phase3T}_1, \text{phase4T}_1, \text{phase5T}_1, \text{phase6T}_1, \text{phase7T}_1 \right) \\ u_2 = \left( \text{phase1T}_2, \text{phase2T}_2, \text{phase3T}_2, \text{phase4T}_2, \text{phase5T}_2, \text{phase6T}_2, \text{phase7T}_2 \right) [/tex] Then we can check if the linear combination [itex]u_3 = \lambda_1 \cdot u_1 +\lambda_2 \cdot u_2[/itex] where [itex]\lambda_1 + \lambda_2 = 1[/itex] and [itex]\lambda_1 \in \mathbb{R}_{\geq 0}[/itex] and [itex]\lambda_2 \in \mathbb{R}_{\geq 0}[/itex] is a feasible solution too:[B]Checking the Jerk equations:[/B] Those are not affected.[B]Checking the Acceleration equation constraints:[/B] [tex] \text{accel}(0) = \text{lastAccel} \\ \text{accel}(1) = \text{accel}(0) +\text{jerk}(1) \cdot \left(\lambda_1 \cdot \text{phase1T}_1 + \lambda_2 \cdot \text{phase1T}_2 \right) \\ \text{accel}(2) = \text{accel}(1) +\text{jerk}(2) \cdot \left(\lambda_1 \cdot \text{phase2T}_1 + \lambda_2 \cdot \text{phase2T}_2 \right) \\ \text{accel}(3) = \text{accel}(2) +\text{jerk}(3) \cdot \left(\lambda_1 \cdot \text{phase3T}_1 + \lambda_2 \cdot \text{phase3T}_2 \right) \\ \text{accel}(4) = \text{accel}(3) +\text{jerk}(4) \cdot \left(\lambda_1 \cdot \text{phase4T}_1 + \lambda_2 \cdot \text{phase4T}_2 \right) \\ \text{accel}(5) = \text{accel}(4) +\text{jerk}(5) \cdot \left(\lambda_1 \cdot \text{phase5T}_1 + \lambda_2 \cdot \text{phase5T}_2 \right) \\ \text{accel}(6) = \text{accel}(5) +\text{jerk}(6) \cdot \left(\lambda_1 \cdot \text{phase6T}_1 + \lambda_2 \cdot \text{phase6T}_2 \right) \\ \text{accel}(7) = \text{accel}(6) +\text{jerk}(7) \cdot \left(\lambda_1 \cdot \text{phase7T}_1 + \lambda_2 \cdot \text{phase7T}_2 \right) \\ \text{accel}(7) = 0 [/tex] Let us check if thes equations still hold valid (meaning don't get infeasible): It follows: [tex] \text{lastAccel} +\text{jerk}(1) \cdot \left(\lambda_1 \cdot \text{phase1T}_1 + \lambda_2 \cdot \text{phase1T}_2 \right) +\text{jerk}(2) \cdot \left(\lambda_1 \cdot \text{phase2T}_1 + \lambda_2 \cdot \text{phase2T}_2 \right) +\text{jerk}(3) \cdot \left(\lambda_1 \cdot \text{phase3T}_1 + \lambda_2 \cdot \text{phase3T}_2 \right) +\text{jerk}(4) \cdot \left(\lambda_1 \cdot \text{phase4T}_1 + \lambda_2 \cdot \text{phase4T}_2 \right) +\text{jerk}(5) \cdot \left(\lambda_1 \cdot \text{phase5T}_1 + \lambda_2 \cdot \text{phase5T}_2 \right) +\text{jerk}(6) \cdot \left(\lambda_1 \cdot \text{phase6T}_1 + \lambda_2 \cdot \text{phase6T}_2 \right) +\text{jerk}(7) \cdot \left(\lambda_1 \cdot \text{phase7T}_1 + \lambda_2 \cdot \text{phase7T}_2 \right) = 0 [/tex] Now let's assume [itex]\text{dir} = 1[/itex] and [itex]\text{LimitJerk} = 1[/itex] Then it follows that: [tex] \text{lastAccel} + \left(\lambda_1 \cdot \text{phase1T}_1 + \lambda_2 \cdot \text{phase1T}_2 \right) - \left(\lambda_1 \cdot \text{phase3T}_1 + \lambda_2 \cdot \text{phase3T}_2 \right) - \left(\lambda_1 \cdot \text{phase5T}_1 + \lambda_2 \cdot \text{phase5T}_2 \right) + \left(\lambda_1 \cdot \text{phase7T}_1 + \lambda_2 \cdot \text{phase7T}_2 \right) = 0 [/tex] We know that both solutions [itex]u_1[/itex], [itex]u_2[/itex] are 0, so it follows: [tex] \text{lastAccel} + \left(\lambda_1 \cdot \text{phase1T}_1 + \lambda_2 \cdot \text{phase1T}_2 \right) - \left(\lambda_1 \cdot \text{phase3T}_1 + \lambda_2 \cdot \text{phase3T}_2 \right) - \left(\lambda_1 \cdot \text{phase5T}_1 + \lambda_2 \cdot \text{phase5T}_2 \right) + \left(\lambda_1 \cdot \text{phase7T}_1 + \lambda_2 \cdot \text{phase7T}_2 \right) = \text{lastAccel} + \left(1 \cdot \text{phase1T}_1 \right) - \left(1 \cdot \text{phase3T}_1 \right) - \left(1 \cdot \text{phase5T}_1 \right) + \left(1 \cdot \text{phase7T}_1 \right) [/tex] Which is equivalent to: [tex] + \lambda_1 \cdot \text{phase1T}_1 + \lambda_2 \cdot \text{phase1T}_2 - \lambda_1 \cdot \text{phase3T}_1 - \lambda_2 \cdot \text{phase3T}_2 - \lambda_1 \cdot \text{phase5T}_1 - \lambda_2 \cdot \text{phase5T}_2 + \lambda_1 \cdot \text{phase7T}_1 + \lambda_2 \cdot \text{phase7T}_2 = + 1 \cdot \text{phase1T}_1 - 1 \cdot \text{phase3T}_1 - 1 \cdot \text{phase5T}_1 + 1 \cdot \text{phase7T}_1 [/tex] Which is equivalent to: [tex] + \lambda_1 \cdot \text{phase1T}_1 + \lambda_2 \cdot \text{phase1T}_2 - \lambda_1 \cdot \text{phase3T}_1 - \lambda_2 \cdot \text{phase3T}_2 - \lambda_1 \cdot \text{phase5T}_1 - \lambda_2 \cdot \text{phase5T}_2 + \lambda_1 \cdot \text{phase7T}_1 + \lambda_2 \cdot \text{phase7T}_2 = + \left( \lambda_1 + \lambda_2 \right) \cdot \text{phase1T}_1 - \left( \lambda_1 + \lambda_2 \right) 1 \cdot \text{phase3T}_1 - \left( \lambda_1 + \lambda_2 \right) 1 \cdot \text{phase5T}_1 + \left( \lambda_1 + \lambda_2 \right) 1 \cdot \text{phase7T}_1 [/tex] Which is equivalent to: [tex] + \lambda_1 \cdot \text{phase1T}_1 + \lambda_2 \cdot \text{phase1T}_2 - \lambda_1 \cdot \text{phase3T}_1 - \lambda_2 \cdot \text{phase3T}_2 - \lambda_1 \cdot \text{phase5T}_1 - \lambda_2 \cdot \text{phase5T}_2 + \lambda_1 \cdot \text{phase7T}_1 + \lambda_2 \cdot \text{phase7T}_2 = + \left( \lambda_1 + \lambda_2 \right) \cdot \text{phase1T}_1 - \left( \lambda_1 + \lambda_2 \right) \cdot \text{phase3T}_1 - \left( \lambda_1 + \lambda_2 \right) \cdot \text{phase5T}_1 + \left( \lambda_1 + \lambda_2 \right) \cdot \text{phase7T}_1 [/tex] Which is equivalent to: [tex] + \lambda_2 \cdot \text{phase1T}_2 - \lambda_2 \cdot \text{phase3T}_2 - \lambda_2 \cdot \text{phase5T}_2 + \lambda_2 \cdot \text{phase7T}_2 = + \lambda_2 \cdot \text{phase1T}_1 - \lambda_2 \cdot \text{phase3T}_1 - \lambda_2 \cdot \text{phase5T}_1 + \lambda_2 \cdot \text{phase7T}_1 [/tex] If [itex]\lambda_2 = 0[/itex] the solution is trivial, otherwise it follows that [tex] + \text{phase1T}_2 - \text{phase3T}_2 - \text{phase5T}_2 + \text{phase7T}_2 = + \text{phase1T}_1 - \text{phase3T}_1 - \text{phase5T}_1 + \text{phase7T}_1 [/tex] However that would mean that for any feasible solution the sum of these times of phase 1,3,5,7 have to be equal. [B]In other words if we can show that there are feasible solutions for [itex]\text{dir} = 1[/itex] and [itex]\text{LimitJerk} = 1[/itex], that have different values for the sum of the times of phase 1,3,5,7, then the optimization problem is not even a [I]convex optimization problem[/I].[/B] I will try to continue from here within the next days. [/QUOTE]
Insert quotes…
Post reply
Forums
Mathematics
General Math
3rd order motion profile programming ("sinusoidal")
Back
Top