<div id="yui_3_16_0_1_1445622719616_3315" class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;">The Velocity, Acceleration, and Jerk in the Step Response Screen (KFLOP parameter settings) and the Acceleration and Velocity in the KMotionCNC | Tool Setup | Trajectory Planner | Axis Parameters are both used for different things. The two sets of parameters are independent. </div>
<div id="yui_3_16_0_1_1445622719616_3313" class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"><span class="yiv2818182665class"> </span></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"><span class="yiv2818182665class">The</span> KFLOP parameters are used for 3rd order motions. These include things like: Jogging, Homing, and GCode Rapids (G0). The units in KFLOP are in counts or steps.<br /><br /><span id="yui_3_16_0_1_1445622719616_3320" class="yiv2818182665class">The KMotionCNC parameters are used for 2nd order (</span><span id="yui_3_16_0_1_1445622719616_3321" class="yiv2818182665class"><span class="yiv2818182665class">infinite </span>Jerk) coordinated motion paths. These are GCode G1,G2,G3 continuous paths. The units are in Inches (or in some cases degrees). Note there is an Option in KMotionCNC "Rapids as Feeds" where these parameters will also be used for Rapids. But this option should only be used for highly non-linear Kinematic Systems which can not take advantage of faster/smoother 3rd order point to point straight line Rapids.<br /><br /></span></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"><span class="yiv2818182665class">Tests</span> to find and verify optimal settings for both types of moves should be made using the Step Response Screen. Optimal settings are usually determined by experimentation. Although it might be possible to calculate the settings based on motor torque gains, back-emf, amplifier voltage/current, mass, moments of inertia, friction, encoder resolution, leadscrew pitch, required following accuracy, etc... It is often too complicated and with too many unknowns to be practical. So experimental moves can be tested at ever increasing Velocities, Accelerations, and Jerks until the system is unable to follow the trajectory without having too much error or shock to the system. After absolute limits of the system are determined then the settings should be backed off by some amount to provide operating margins (ie 20%).<br /><br /></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;">It is usually best to first determine max possible velocity using a relatively low acceleration. Maximum power is usually required at the point of the trajectory where velocity is high and still accelerating. Supply Voltage limitations tend to limit velocity. Current limitations tend to limit acceleration.<br /><br /></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;">[[File:MaxVelAccelPower.png|none|link=|485x361px]]<br />The Step Response Screen always performs 3rd order motion but 2nd order motion can be simulated by temporarily setting the Jerk to a huge value (1000X the acceleration value). In general reducing the Jerk value will result in longer times to perform motions, but often the improved smoothness will permit higher maximum accelerations and velocities to be used resulting in overall shorter motion times. An analogy might be how you might stop more quickly in a car, without skidding or spilling your coffee, by applying the brakes harder in a more gradual manner rather than slamming on the brakes.<br /><br /><span class="yiv2818182665class">Make</span> sure when testing the size of move is long enough for full acceleration and velocity are achieved. As a A common mistake is to have Acceleration or Velocity Settings set to too high for your system but when testing a short move there is no indication of a problem. The plot mode of Velocity Output vs Time can be helpful to verify full Velocity is being achieved.<span id=".C2.A0" class="mw-headline"> <br /> <br /></span></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;">The idea is that a motor axis has torque and speed limitations and you should determine and understand what they both are for your system. Available motor torque drops off with higher speed. At some speed the motor will not even be able to generate any torque at all. Motor torque is required to accelerate the axis. We need to make sure that no combination of velocity and acceleration will ever cause the axis to fault/stall/fail. So there is often a complex set of speeds and accelerations that will work ok that form an envelope of workable speed and acceleration. So one nice thing to know is top speed possible. It is like taking your car out on a long straight highway and gradually accelerating to find the max speed is 100MPH. You will then know that ever attempting a speed over 100MPH will always fail. Also speed should probably be limited to something like 80MPH to allow for margin and to allow reasonable acceleration up to that speed. The reason for performing the top speed test at low acceleration is to avoid a failure because of not being able to accelerate at the specified rate. So we want to set the acceleration to a low value so it will not be a limiting factor when determining top speed. However if we set the acceleration so low with a short trip distance we will never go very fast and the speed test will be meaningless. This should be avoided. Change the Plot type to Velocity, Output, vs Time to clearly see if this is the case. You may want to turn off Measured Velocity if it obscures viewing the Commanded Velocity<br /><br />For example to accelerate to 700,000 counts/sec at an acceleration rate of 700,000 counts/sec^2 would take 1 second. And then to slow back down would take 1 more second. So at least 2 seconds of motion would be required to get to full speed. A 100,000 count move (2 inches for a system with 50,000 counts/inch) takes much less time than that. Furthermore with a relatively low Jerk setting (1e6). This means the acceleration will be applied gradually over 0.7 seconds. This means an even much longer time and distance would be required to achieve top speed.<br /><br />Here is the method to follow to find 2nd/3rd order motion profile limits:<br />(note every system is different and will vary based on resolution, motor size/type, mass, etc...)
'''1 - Find Max Velocity at low Acceleration and infinite Jerk'''
The previous result from Step #1 and #2 used nearly infinite Jerk where Acceleration forces were applied nearly instantaneously. By reducing Jerk smoother motion should be possible. <br /><br />Set Jerk so it is applied over 20ms (ie for A=200000 J = A/0.020 = 1e7<br /><br />Test to see if motions are smoother. With closed loop systems the Position Error Plot can be used to see if the motion has less error and is smoother. Open loop system will require you to hear the difference.<br /><br />Increase/decrease Jerk to find the optimal value. Note reducing Jerk a lot will of course make the system very smooth, but will also be much slower using less acceleration and velocity which is undesirable. So the highest Jerk possible should be found that still provides some smoothness.<br /><br />Reducing Jerk only will always make the system slower with less performance (but hopefully significantly smoother). It is usually then possible to increase Acceleration and Velocity somewhat to achieve even higher performance than what was possible with infinite Jerk while being as smooth or smoother.
'''4 - Reduce Max Following Error Limit to small value'''
</div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div><div class="yiv2818182665class" style="color: #000000; font-size: 13Now that the system is properly tuned and reasonable Acceleration, Velocity, and Jerk are set the motor Position should always follow the commanded Destinations accurately with only small errors.3333px; font-family By Plotting Position Errors under various conditions (Distances) you can get an idea of the worst case following errors under normal conditions. The Max Following Error Parameter should be set to a value slightly larger than the worst case following error (ie 20~50% larger). In this case if anything abnormal occurs: HelveticaNeueie. The axis hits an obstacle, Helvetica Neuecommanded at too high of a speed, Helveticaservo goes unstable, Arialhardware/electronics failure, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"> a Following Error will be immediately detected and the axes disabled.</div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>