The embodiment of the invention discloses an error processing method, a S curve calculation accuracy caused by displacement comprises the steps of: each time the value of the calculation of S curve in the acceleration stage, constant speed section, deceleration period; total displacement of the acceleration section, the uniform section, the deceleration section is compared with the set position, the difference was the set position and the total displacement; the difference between a predetermined condition is satisfied, the displacement of every moment of the acceleration or deceleration in value is corrected according to the displacement; every moment values of the modified machine motion control. The implementation of the invention can make the end of the S curve more smooth and avoid the jitter of the machine.
【技术实现步骤摘要】
一种S曲线计算精度引起的误差处理方法
本专利技术涉及工业控制领域,特别涉及一种S曲线计算精度引起的误差处理方法。
技术介绍
在工控行业中,PLC控制器通过S型曲线控制策略,可以能够对机器开始运动和停止运动时更加平滑,而S曲线的规划过程中会由于数据类型和计算的精度误差,导致最后规划的位置(计算出的位置)和给定的位置有偏差,如果偏差值处理不好的话会在S曲线末端不平滑,使机器(受控设备)运行时出现抖动。
技术实现思路
本专利技术所要解决的技术问题在于,提供一种S曲线计算精度引起的误差处理方法,可以使S曲线末端更加平滑,避免机器出现抖动。为了解决上述技术问题,本专利技术的实施例的一方面提供一种S曲线计算精度引起的误差处理方法,包括步骤:计算S曲线中加速段、匀速段、减速段中每一时刻的位移值;将所述加速段、匀速段、减速段的总位移与设定的位置进行比较,获得设定的位置与总位移的差值;在所述差值满足预定条件时,对所述加速段或减速段中每一时刻的位移值进行修正。其中,所述计算S曲线中加速段、匀速段、减速段中每一时刻的位移值的步骤具体为:在加速段,通过公式一计算获得每一时刻的位移值:Sa=V_lim*Ta*(1-Ta*sin(tπ/Ta)/π)/2(一)其中,V_lim为最大目标速度,Ta为加速的总时间,t为某一时刻;在匀速段,通过公式二计算获得第一时刻的位移值:Sc=V_lim*t(0<t<Tc)(二)其中,Tc为匀速段的总时间;在减速段,通过公式三计算获得每一时刻的位移值:Sd=V_lim*(t+Td*sin(tπ/Td)/π)/2(三)其中,Td为减 ...
【技术保护点】
一种S曲线计算精度引起的误差处理方法,其特征在于,包括步骤:计算S曲线中加速段、匀速段、减速段中每一时刻的位移值;将所述加速段、匀速段、减速段的总位移与设定的位置进行比较,获得设定的位置与总位移的差值;在所述差值满足预定条件时,对所述加速段或减速段中每一时刻的位移值进行修正处理;根据修正后的每一时刻的位移值控制机器进行运动。
【技术特征摘要】
1.一种S曲线计算精度引起的误差处理方法,其特征在于,包括步骤:计算S曲线中加速段、匀速段、减速段中每一时刻的位移值;将所述加速段、匀速段、减速段的总位移与设定的位置进行比较,获得设定的位置与总位移的差值;在所述差值满足预定条件时,对所述加速段或减速段中每一时刻的位移值进行修正处理;根据修正后的每一时刻的位移值控制机器进行运动。2.如权利要求1所述的方法,其特征在于,所述计算S曲线中加速段、匀速段、减速段中每一时刻的位移值的步骤具体为:在加速段,通过公式一计算获得每一时刻的位移值:Sa=V_lim*Ta*(1-Ta*sin(tπ/Ta)/π)/2(一)其中,V_lim为最大目标速度,Ta为加速的总时间,t为某一时刻;在匀速段,通过公式二计算获得第一时刻的位移值:Sc=V_lim*t(0<t<Tc)(二)其中,Tc为匀速段的总时间;在减速段,通过公式三计算获得每一时刻的位移值:Sd=V_lim*(t+Td*sin(tπ/Td)/π)/2(三)其中,Td为减速的总时间。3.如权利要求2所述的方法,其特征在于,在所述差值满足预定条件时,对所述加速段减速段中每...
【专利技术属性】
技术研发人员:粟汝基,
申请(专利权)人:深圳市合信自动化技术有限公司,
类型:发明
国别省市:广东,44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。