-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mathematical issue #284
Comments
It would help to know the machine, servos or steppers, the work to be accomplished, the material and the cutting tool. Also if possible a portion of the post file that isn’t meeting your needs and your existing settings.Let me be sure I understand. You want jerk and acceleration settings to be variable automatically per job based upon the job parameters. First let me comment that jerk and acceleration are typically set and forget. More true with a machine running servos, less so maybe with steppers. If the machine has enough power for the most difficult job, then it should work with the same settings with less difficult jobs. Unless there is a desired effect you are not mentioning.Hope this helps ~ AL
Disclaimer:The content provided in this written text or attachment is for informational, educational and entertainment purposes only. The opinions expressed herein are solely those of the author and are a work of fiction. They do not constitute professional advice, opinion or advocacy for any specific action or belief. Readers are encouraged to conduct their own research and form their own opinions. The author is not responsible for any actions taken by individuals based on the information presented. Always consult with a qualified professional before making any decisions.On Aug 19, 2024, at 11:03 AM, engrenage ***@***.***> wrote:
The idea is to write a tool to get the best jerk and acceleration values at a given height for a machine.
I tried ChatGPT 4o but it proved to fail repeatedly in the most obvious and absurd ways ; since I'm not a math wizard I was hoping someone here could help...
jerk_acceleration_velocity_position.png (view on web)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
I am not sure I understand all you want and why, but here are some elements of response. Since this is a purely mathematical question I fail to understand how all these elements matter, I will try to answer my best and if you lack information feel free to ask (and I will not be upset if you don't read all the info I provide)
in case you want to know more, there is a (needs update, but an issue prevents me from updating the website) https://www.engrenage.ch/i18n/blog/whale-printer/ (for the machine) and more on [a project I'm working on[(https://www.engrenage.ch/i18n/projects/superslice/) that yields super complex parts that cannot be obtained with a regular slicer (there is this prototype I would need to print whose gcode file is around 600MB in size, and this is just the beginning ; the details are so intricate that for full scale models it simply makes no sense to save the gcode to a file and then print it, rather pipe the gcode to the machine as it is generated). more to read here |
I did misunderstand and based on what you sent as a follow-up, I don’t think I can help you. Jerk, acceleration and then velocity are handled differently. The first two are parameters of the machine, while velocity (feed rate) is a function of the job: material, thickness, cutter type, etc.. Move to point while positioning and not cutting is again different entirely.But in general, feedback from your stepper motors would be required to determine “max anything”. It would require significant math calculations. It’s not possible with stepper motors. The biggest problem with steppers, is that when their power limit is reached, it will lose steps. It won’t know where it is anymore. The part will be scrap.I would be very interested in what your ChatGPT prompt was.Cheers ~ AL
Disclaimer:The content provided in this written text or attachment is for informational, educational and entertainment purposes only. The opinions expressed herein are solely those of the author and are a work of fiction. They do not constitute professional advice, opinion or advocacy for any specific action or belief. Readers are encouraged to conduct their own research and form their own opinions. The author is not responsible for any actions taken by individuals based on the information presented. Always consult with a qualified professional before making any decisions.On Aug 19, 2024, at 1:19 PM, engrenage ***@***.***> wrote:
I am not sure I understand all you want and why, but here are some elements of response. Since this is a purely mathematical question I fail to understand how all these elements matter, I will try to answer my best and if you lack information feel free to ask (and I will not be upset if you don't read all the info I provide)
machine is a heavily modified CR10S Pro v2, not much is left from when I got it. Frame and steppers are one thing that remain.
so far it is independent of material, cutting tool or extrusion, soldering or else : the idea is to get values for max accel and jerk (and possibly velocity, but this is secondary) and eventually - quite a fundamental I would say - max frequency the machine can tolerate without shaking too much. When printing/cutting/soldering, we're usually below these values anyway.
I don't really want to have those values set "per job" (this is way overkill for now), but per axis (and possibly per Z-value (or other of non cartesian, if applicable, depending on the machine configuration)
I mentioned frequency : based on the max jerk and accel values, providing we reach max velocity, the frequency is a consequence of those parameters, somewhat like the frequency of a pendulum depends on the value of the local gravity and air resistance. it's a sort-of obscure relationship but I believe it can provide decent estimates. If you take ie. "static" (not vision-based) input shaping this will depend on the height at which the gantry is standing, and (if the bed is mobile) on the shape of the object but we'll ignore this for now (so NOT job-based, too much work for now and personally I wouldn't build a machine with a moving bed for objects that are not flat)
The idea is really to set-and-forget, meaning run this test once, figure out the max tolerable values (maybe one set for quality prints and another for fast prints) and keep them for a lifetime (unless the gantry is modified to be more rigid)
in case you want to know more, there is a (needs update, but an issue prevents me from updating the website) https://www.engrenage.ch/i18n/blog/whale-printer/ (for the machine) and more on [a project I'm working on[(https://www.engrenage.ch/i18n/projects/superslice/) that yields super complex parts that cannot be obtained with a regular slicer (there is this prototype I would need to print whose gcode file is around 600MB in size, and this is just the beginning ; the details are so intricate that for full scale models it simply makes no sense to save the gcode to a file and then print it, rather pipe the gcode to the machine as it is generated). more to read here
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
@GaylordLivingston actually I'm sure you can help: max_jerk, max_accel and max_velocity are set by the user, so let me try to rephrase (this is on Marlin):
if it is too complicated to maintain a slope in the acceleration at the middle of the move (which is expected to be quite short), then it is tolerated that the central portion (of infinitesimal length) of the move is done at constant speed with zero acceleration, as shown in the first graph of 1 (actually, with a "symmetric" deceleration phase)
does this make it more clear? the initial ChatGPT prompt is the image I posted above, and then trying to refine it by emphasing on the constraints ; not once did it manage to produce a graph that had a smooth curve for the jerk, it frequently showed a graph with only positive acceleration yet velocity that would start at zero and still drop to zero, graphs were the position showed signs of "teleportation" (instant position changes), and so on... Footnotes |
FYI, here are the full ChatGPT logs: https://chatgpt.com/c/d461f997-4cc9-4e5f-96f2-9a24d9e3c771 I still fail to understand how people manage to find LLMs so great.. I rarely get useful answers :-S |
I had to rewrite your question in order for me to understand it. You are trying to describe a procedure for testing the motion parameters of a toolhead on a CNC machine, 3D printer, or something dealing with circuit boards, possibly engraving, but more likely picking and placing components and possibly soldering them using the Marlin firmware. Here's a clearer version of your question:You want to move the toolhead along the X-axis while controlling specific motion parameters: maximum jerk, maximum acceleration, and maximum velocity. You outline the following steps:1. Move the toolhead to the starting position at (x0, 0).2. Set the maximum jerk using the command `M205 Xj`.3. Set the maximum acceleration using `M201 Ta`, ensuring that the values do not exceed those set by `M204`. If needed, increase the `M204` values first.4. Set the maximum feedrate with `M203 Xf`.5. Move the toolhead from (x0, 0) to a new position (x0 + x, 0) using the command `G0 Xx Ff`. The goal is for the toolhead to: - Accelerate at the maximum acceleration (a) and maximum jerk (j) until it reaches the maximum feedrate (f). - Then, decelerate to a complete stop, ensuring that the deceleration does not exceed the maximum jerk or acceleration. - The move should be done with the shortest possible time and distance while adhering to these constraints. If maintaining acceleration at the midpoint of the move is too complicated, you allow for a brief period of constant speed (zero acceleration) in the middle of the move.6. After completing the move, return the toolhead to the starting position (x0, 0) using safe values for jerk, acceleration, and velocity.7. Repeat the procedure several times. If the toolhead fails to return precisely to (x0, 0) and instead stops at (x0 + xd, 0), it indicates that Stepswere lost, likely due to the stepper motor or driver not handling the high values of jerk, acceleration, or feedrate. If this occurs, reduce one of these parameters one at a time until you get the results you want. Warning: Operating at or near the physical limits of the hardware will likely cause occasional errors in the move.Here’s a logical sequence of steps you would take if you did not already have a machine, and wanted to build one that would accomplish your goal1. Define the Objective: Begin by clearly articulating the desired result or process. This could include the specific tasks the machine needs to perform, the level of precision required, the speed of operation, and any other critical outcomes. Understanding the end goal will guide all subsequent decisions.2. Analyze the Requirements: Break down the objective into measurable requirements. Consider factors such as the material properties, the forces involved, the range of motion, tolerances, production volume, and environmental conditions. These requirements will directly influence the machine's design and specifications.3. Identify Key Performance Parameters: Determine the critical performance parameters that the machine must meet to achieve the desired result. These might include speed, accuracy, force, power, and efficiency. Each parameter should be quantifiable and aligned with the end goal.4. Establish Constraints: Identify any constraints that could limit the machine's design or operation. These could be physical (size, weight), financial (costs, budget), technological (available components, software limitations), or environmental (temperature, humidity). Constraints are essential for narrowing down design options.5. Select Appropriate Technologies: Based on the requirements and constraints, choose the technologies or methods that will best achieve the desired result. This might involve selecting the type of motors, sensors, controllers, materials, or software that will be used in the machine.6. Design the Machine Architecture: Develop a conceptual design of the machine that integrates all the selected technologies and components. Consider the overall structure, component layout, and how different parts of the machine will interact. Ensure that the design can meet all performance parameters within the given constraints.7. Simulate and Model: Use computer simulations and modeling to test the machine's design against the desired performance parameters. This step helps identify potential issues and allows for optimization before physical prototyping.8. Prototype and Test: Build a prototype of the machine or a key subsystem. Conduct tests to evaluate its performance against the initial requirements. Testing is crucial for validating the design and identifying areas for improvement.9. Refine the Design: Based on the results from testing, refine the machine's design to address any shortcomings or inefficiencies. This might involve adjusting specifications, altering component selection, or improving control algorithms.10. Finalize Specifications: Once the design has been refined and validated, document the machine's final specifications. This should include all key performance parameters, component specifications, assembly instructions, and operating guidelines.11. Implementation and Deployment: After finalizing the design, proceed with full-scale production or deployment of the machine. Ensure that all operators or users are trained to understand the machine's capabilities and limitations.12. Monitor and Maintain: Once the machine is in operation, continuously monitor its performance to ensure it meets the desired results. Implement a maintenance schedule to preserve its reliability and address any emerging issues promptly.Note: It may be simpler and cheaper to send your project to someone else who specializes in the process you need.Good Luck ~ AL
Disclaimer:The content provided in this written text or attachment is for informational, educational and entertainment purposes only. The opinions expressed herein are solely those of the author and are a work of fiction. They do not constitute professional advice, opinion or advocacy for any specific action or belief. Readers are encouraged to conduct their own research and form their own opinions. The author is not responsible for any actions taken by individuals based on the information presented. Always consult with a qualified professional before making any decisions.On Aug 20, 2024, at 2:15 AM, engrenage ***@***.***> wrote:
@GaylordLivingston actually I'm sure you can help: max_jerk, max_accel and max_velocity are set by the user, so let me try to rephrase (this is on Marlin):
move the toolhead at (x0,0)
set max_jerk with M205 Xj
set max_accel with M201 Ta (making sure values set with M204 are not exceeded, increase that first if required)
set max_feedrate with M203 Xf
now, move the toolhead to (x0+x,0) so that the toolhead reaches max accel a with max jerk j (as per 1) until it reaches max feedrate f (with then zero acceleration), then immediately decelerate (not exceeding max jerk j nor max accel a (absolute values obviously) until the toolhead is at a complete halt ; with these constraints, there are a minimum time and distance required for the move. distance is to be set with G0 Xx Ff, the time required is a consequence of motion planning.
if it is too complicated to maintain a slope in the acceleration at the middle of the move (which is expected to be quite short), then it is tolerated that the central portion (of infinitesimal length) of the move is done at constant speed with zero acceleration, as shown in the first graph of 1 (actually, with a "symmetric" deceleration phase)
move the toolhead back at (x0,0) with safe values for jerk, accel and velocity
repeat the above procedure a number of times
if the stepper/driver cannot cope with the high jerk/accel/feedrate values, then - after a number of iterations - the toolhead will end not at (x0,0) but at (x0+xd,0) ; if xd is non null, then we have lost steps and we must decrease one of j, a or f.
does this make it more clear?
the initial ChatGPT prompt is the image I posted above, and then trying to refine it by emphasing on the constraints ; not once did it manage to produce a graph that had a smooth curve for the jerk, it frequently showed a graph with only positive acceleration yet velocity that would start at zero and still drop to zero, graphs were the position showed signs of "teleportation" (instant position changes), and so on...
Footnotes
https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained ↩ ↩2
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
this is precisely the idea: compute the shortest path required too achieve max jerk, max accel and max velocity in order to tackle those physical limits, and therefore find out experimentally what these limits are
This is actually what my job is about.
I am not building a machine, but a family of machines, as well a a set of procedures to physically test and tune the hardware. I still fail to understand why you need so much information about the machine when what I seek is the answer to a purely mathematical, hence abstract, problem. At least, with all the details you provided, I know we are on the same wavelength regarding the intricacies of the entire process : however and as stated above, the answer I seek is purely theoretical and does not depend on the machine itself ; it is only about solving a 6th order differential equation. If you are not able to answer, this is OK. Then I will need to either find someone else who is familiar with such equations and can solve it for me, and/or read and reverse engineer the code in order to answer that straightforward and purely theoretical question: using the Jerk-controlled motion algorithm, what is the shortest path required to achieve a given velocity without exceeding a given acceleration and jerk. |
The idea is to write a tool to get the best jerk and acceleration values at a given height for a machine.
I tried ChatGPT 4o but it proved to fail repeatedly in the most obvious and absurd ways ; since I'm not a math wizard I was hoping someone here could help...
The text was updated successfully, but these errors were encountered: