CN107463098B - Intelligent trolley speed control method and device based on quadratic function - Google Patents
Intelligent trolley speed control method and device based on quadratic function Download PDFInfo
- Publication number
- CN107463098B CN107463098B CN201710912340.5A CN201710912340A CN107463098B CN 107463098 B CN107463098 B CN 107463098B CN 201710912340 A CN201710912340 A CN 201710912340A CN 107463098 B CN107463098 B CN 107463098B
- Authority
- CN
- China
- Prior art keywords
- speed
- steering
- limit value
- quadratic function
- pulse quantity
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012887 quadratic function Methods 0.000 title claims abstract description 97
- 238000000034 method Methods 0.000 title claims abstract description 29
- 230000014509 gene expression Effects 0.000 claims abstract description 39
- 238000005070 sampling Methods 0.000 claims description 12
- 230000008859 change Effects 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 8
- SAZUGELZHZOXHB-UHFFFAOYSA-N acecarbromal Chemical compound CCC(Br)(CC)C(=O)NC(=O)NC(C)=O SAZUGELZHZOXHB-UHFFFAOYSA-N 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B13/00—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
- G05B13/02—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
- G05B13/04—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
- G05B13/042—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D13/00—Control of linear speed; Control of angular speed; Control of acceleration or deceleration, e.g. of a prime mover
- G05D13/62—Control of linear speed; Control of angular speed; Control of acceleration or deceleration, e.g. of a prime mover characterised by the use of electric means, e.g. use of a tachometric dynamo, use of a transducer converting an electric value into a displacement
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Steering Control In Accordance With Driving Conditions (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
Description
技术领域technical field
本发明涉及智能控制技术领域,特别是指一种基于二次函数的智能小车速度控制方法和装置。The invention relates to the technical field of intelligent control, in particular to a method and device for controlling the speed of an intelligent car based on a quadratic function.
背景技术Background technique
智能小车在比赛中要通过直道、弯道、大S弯道、小S弯道、十字、直角以及环岛等各种复杂的道路元素。为了能够保证智能小车在整个赛道行驶平稳,需要在不同赛道元素设置赛道的上限安全速度。对智能小车速度控制的目的在于让智能小车在不同的赛道元素表现出不同特色,即在不同的赛道元素都能给出合适的速度,包括:智能小车在进入直道时尽可能表现最强的加速度特性;在弯道行驶时能够以最大的安全速度准确地、顺畅地跟踪路径,以便于小车能够以最快的速度通过赛道,同时又不会冲出赛道或者压赛道的线。在速度控制的过程中,速度与舵机转向脉冲量的关系是很重要的,在舵机转向脉冲量一定的情况下,速度过快可能导致智能小车冲出跑道,速度过慢则不能成功转过弯道。现有技术中并没有一个好的方法能够在智能小车的速度与舵机转向脉冲量直接关联起来。In the race, the smart car has to pass various complex road elements such as straights, corners, big S-curves, small S-curves, crosses, right angles and roundabouts. In order to ensure that the smart car runs smoothly on the entire track, it is necessary to set the upper limit safe speed of the track on different track elements. The purpose of the speed control of the smart car is to make the smart car show different characteristics on different track elements, that is, it can give an appropriate speed on different track elements, including: the smart car is as strong as possible when entering the straight. Accurate acceleration characteristics; can accurately and smoothly track the path at the maximum safe speed when driving in a curve, so that the car can pass the track at the fastest speed without overshooting the track or pressing the line of the track . In the process of speed control, the relationship between the speed and the steering pulse amount of the steering gear is very important. In the case of a certain steering gear steering pulse amount, too fast speed may cause the smart car to rush out of the runway, and too slow speed will fail to turn successfully. corner. There is no good method in the prior art that can directly correlate the speed of the smart car with the steering pulse amount of the steering gear.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明的目的在于提出一种基于二次函数的智能小车速度控制方法和装置,将智能小车的实时速度与舵机转向脉冲量直接关联起来。In view of this, the purpose of the present invention is to propose a method and device for controlling the speed of an intelligent car based on a quadratic function, which directly correlates the real-time speed of the intelligent car with the steering pulse amount of the steering gear.
基于上述目的本发明提供的一种基于二次函数的智能小车速度控制方法,包括:Based on the above purpose, a quadratic function-based intelligent car speed control method provided by the present invention includes:
构建智能小车的速度与舵机转向脉冲量之间的二次函数;Build a quadratic function between the speed of the smart car and the steering pulse amount of the steering gear;
获取智能小车的舵机转向脉冲量左极限值、舵机转向脉冲量右极限值、最大行驶速度以及安全行驶速度;Obtain the left limit value of the steering gear steering pulse amount, the right limit value of the steering gear steering pulse amount, the maximum driving speed and the safe driving speed of the smart car;
根据所述舵机转向脉冲量左极限值、所述舵机转向脉冲量右极限值、所述最大行驶速度以及所述安全行驶速度获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数的初始表达式;The quadratic term coefficient, the linear term coefficient and constant to obtain the initial expression of the quadratic function;
使所述智能小车根据所述初始表达式行驶,并根据行驶状态调试所述二次项系数、所述一次项系数以及所述常量,获取所述二次函数的最终表达式。The smart car is driven according to the initial expression, and the quadratic term coefficient, the linear term coefficient and the constant are adjusted according to the driving state, and the final expression of the quadratic function is obtained.
进一步,所述获取智能小车的舵机转向脉冲量左极限值、舵机转向脉冲量右极限值、最大行驶速度以及安全行驶速度,包括:Further, the acquisition of the left limit value of the steering gear steering pulse amount, the right limit value of the steering gear steering pulse amount, the maximum driving speed and the safe driving speed of the intelligent car includes:
获取所述智能小车的舵机设置为左极限转角时采样周期内的脉冲量,作为所述舵机转向脉冲量左极限值LEFT_max;Obtain the pulse amount in the sampling period when the steering gear of the smart car is set to the left limit turning angle, as the left limit value LEFT_max of the steering gear steering pulse amount;
获取所述智能小车的舵机设置为右极限转角时采样周期内的脉冲量,作为所述舵机转向脉冲量右极限值RIGHT_max;Obtain the pulse amount in the sampling period when the steering gear of the smart car is set to the right limit turning angle, as the right limit value RIGHT_max of the steering gear steering pulse amount;
获取所述智能小车在直道平稳行驶所能达到的最大速度,作为所述最大行驶速度Speed_fast;Obtain the maximum speed that the smart car can reach when the smart car travels smoothly on a straight road, as the maximum speed Speed_fast;
获取所述智能小车的舵机设置为左极限转角或右极限转角时,所述智能小车沿最小圆环轨道的中心线内切行驶的速度,作为所述安全行驶速度Speed_safe;Obtain the speed at which the smart car travels inscribed along the centerline of the smallest circular track when the steering gear of the smart car is set to the left limit turning angle or the right limit turning angle, as the safe driving speed Speed_safe;
其中,所述舵机转向脉冲量左极限值LEFT_max与所述舵机转向脉冲量右极限值RIGHT_max大小相等、方向相反,即:LEFT_max=-RIGHT_max。Wherein, the left limit value LEFT_max of the steering pulse amount of the steering gear and the right limit value RIGHT_max of the steering pulse amount of the steering gear are equal in magnitude and opposite in direction, that is: LEFT_max=-RIGHT_max.
进一步,所述根据所述舵机转向脉冲量左极限值、所述舵机转向脉冲量右极限值、所述最大行驶速度以及所述安全行驶速度获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数的初始表达式,包括:Further, according to the left limit value of the steering gear steering pulse amount, the right limit value of the steering gear steering pulse amount, the maximum driving speed and the safe driving speed, the quadratic term coefficient of the quadratic function is obtained, The coefficients and constants of the first-order term are obtained to obtain the initial expression of the quadratic function, including:
根据(舵机转向脉冲量左极限值LEFT_max,安全行驶速度Speed_safe)、(0,最大行驶速度Speed_fast)以及(舵机转向脉冲量右极限值RIGHT_max,安全行驶速度Speed_safe)三个点进行拟合获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数,所述二次函数为:According to the three points of (left limit value of steering pulse amount of steering gear LEFT_max, safe driving speed Speed_safe), (0, maximum driving speed Speed_fast) and (right limit value of steering pulse amount of steering gear RIGHT_max, safe driving speed Speed_safe) three points are obtained by fitting. The quadratic term coefficient, linear term coefficient and constant of the quadratic function are used to obtain the quadratic function, and the quadratic function is:
其中,SPEED(t)为所述智能小车的速度,PWM(t)为所述舵机转向脉冲量;Wherein, SPEED(t) is the speed of the smart car, and PWM(t) is the steering pulse amount of the steering gear;
获取所述舵机转向脉冲量左极限值LEFT_max、所述舵机转向脉冲量右极限值RIGHT_max、所述最大行驶速度Speed_fast以及所述安全行驶速度Speed_safe的初始数值并代入所述二次函数,得到所述二次函数的初始表达式。Obtain the left limit value LEFT_max of the steering pulse amount of the steering gear, the right limit value RIGHT_max of the steering pulse amount of the steering gear, the maximum travel speed Speed_fast and the initial value of the safe travel speed Speed_safe and substitute them into the quadratic function to obtain The initial expression of the quadratic function.
进一步,所述根据所述智能小车的行驶状态调试所述二次项系数、所述一次项系数以及所述常量,获取所述智能小车的速度与舵机转向脉冲量之间的二次函数的最终表达式,包括:根据所述智能小车的行驶状态,微调所述最大行驶速度Speed_fast的数值,得到所述二次项系数以及所述常量的最终值,从而得到所述智能小车的速度与舵机转向脉冲量之间的二次函数的最终表达式。Further, debugging the quadratic term coefficient, the linear term coefficient and the constant according to the driving state of the smart car, to obtain the quadratic function between the speed of the smart car and the steering pulse amount of the steering gear. The final expression includes: fine-tuning the value of the maximum driving speed Speed_fast according to the driving state of the smart car, obtaining the quadratic term coefficient and the final value of the constant, so as to obtain the speed and rudder of the smart car The final expression of the quadratic function between the steering pulse quantities.
进一步,所述最大行驶速度Speed_fast的初始数值为所述智能小车的电机的极限速度乘以百分之八十。Further, the initial value of the maximum traveling speed Speed_fast is the limit speed of the motor of the smart car multiplied by 80%.
本发明还提供了一种基于二次函数的智能小车速度控制装置,包括:The present invention also provides a quadratic function-based intelligent car speed control device, comprising:
构建模块,用于构建智能小车的速度与舵机转向脉冲量之间的二次函数;The building block is used to construct the quadratic function between the speed of the smart car and the steering pulse amount of the steering gear;
获取模块,用于获取智能小车的舵机转向脉冲量左极限值、舵机转向脉冲量右极限值、最大行驶速度以及安全行驶速度;The acquisition module is used to acquire the left limit value of the steering pulse amount of the steering gear, the right limit value of the steering pulse amount of the steering gear, the maximum driving speed and the safe driving speed of the smart car;
函数生成模块,用于根据所述舵机转向脉冲量左极限值、所述舵机转向脉冲量右极限值、所述最大行驶速度以及所述安全行驶速度获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数的初始表达式;A function generation module, configured to obtain the quadratic term of the quadratic function according to the left limit value of the steering pulse amount of the steering gear, the right limit value of the steering pulse amount of the steering gear, the maximum travel speed and the safe travel speed coefficients, linear coefficients and constants to obtain the initial expression of the quadratic function;
调试模块,用于使所述智能小车根据所述初始表达式行驶,并根据行驶状态调试所述二次项系数、所述一次项系数以及所述常量,获取所述二次函数的最终表达式。A debugging module, configured to make the smart car drive according to the initial expression, and debug the quadratic term coefficient, the linear term coefficient and the constant according to the driving state, and obtain the final expression of the quadratic function .
优选的,所述获取模块进一步用于:Preferably, the acquisition module is further used for:
获取所述智能小车的舵机设置为左极限转角时采样周期内的脉冲量,作为所述舵机转向脉冲量左极限值LEFT_max;Obtain the pulse amount in the sampling period when the steering gear of the smart car is set to the left limit turning angle, as the left limit value LEFT_max of the steering gear steering pulse amount;
获取所述智能小车的舵机设置为右极限转角时采样周期内的脉冲量,作为所述舵机转向脉冲量右极限值RIGHT_max;Obtain the pulse amount in the sampling period when the steering gear of the smart car is set to the right limit turning angle, as the right limit value RIGHT_max of the steering gear steering pulse amount;
获取所述智能小车在直道平稳行驶所能达到的最大速度,作为所述最大行驶速度Speed_fast;Obtain the maximum speed that the smart car can reach when the smart car travels smoothly on a straight road, as the maximum speed Speed_fast;
获取所述智能小车的舵机设置为左极限转角或右极限转角时,所述智能小车沿最小圆环轨道的中心线内切行驶的速度,作为所述安全行驶速度Speed_safe;Obtain the speed at which the smart car travels inscribed along the centerline of the smallest circular track when the steering gear of the smart car is set to the left limit turning angle or the right limit turning angle, as the safe driving speed Speed_safe;
其中,所述舵机转向脉冲量左极限值LEFT_max与所述舵机转向脉冲量右极限值RIGHT_max大小相等、方向相反,即:LEFT_max=-RIGHT_max。Wherein, the left limit value LEFT_max of the steering pulse amount of the steering gear and the right limit value RIGHT_max of the steering pulse amount of the steering gear are equal in magnitude and opposite in direction, that is: LEFT_max=-RIGHT_max.
优选的,所述函数生成模块进一步用于:Preferably, the function generation module is further used for:
根据(舵机转向脉冲量左极限值LEFT_max,安全行驶速度Speed_safe)、(0,最大行驶速度Speed_fast)以及(舵机转向脉冲量右极限值RIGHT_max,安全行驶速度Speed_safe)三个点进行拟合获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数,所述二次函数为:According to the three points of (left limit value of steering pulse amount of steering gear LEFT_max, safe driving speed Speed_safe), (0, maximum driving speed Speed_fast) and (right limit value of steering pulse amount of steering gear RIGHT_max, safe driving speed Speed_safe) three points are obtained by fitting. The quadratic term coefficient, linear term coefficient and constant of the quadratic function are used to obtain the quadratic function, and the quadratic function is:
其中,SPEED(t)为所述智能小车的速度,PWM(t)为所述舵机转向脉冲量;Wherein, SPEED(t) is the speed of the smart car, and PWM(t) is the steering pulse amount of the steering gear;
获取所述舵机转向脉冲量左极限值LEFT_max、所述舵机转向脉冲量右极限值RIGHT_max、所述最大行驶速度Speed_fast以及所述安全行驶速度Speed_safe的初始数值并代入所述二次函数,得到所述二次函数的初始表达式。Obtain the left limit value LEFT_max of the steering pulse amount of the steering gear, the right limit value RIGHT_max of the steering pulse amount of the steering gear, the maximum travel speed Speed_fast and the initial value of the safe travel speed Speed_safe and substitute them into the quadratic function to obtain The initial expression of the quadratic function.
优选的,所述调试模块进一步用于:Preferably, the debugging module is further used for:
根据所述智能小车的行驶状态,微调所述最大行驶速度Speed_fast的数值,得到所述二次项系数以及所述常量的最终值,从而得到所述智能小车的速度与舵机转向脉冲量之间的二次函数的最终表达式。According to the driving state of the smart car, fine-tune the value of the maximum speed Speed_fast to obtain the quadratic term coefficient and the final value of the constant, so as to obtain the difference between the speed of the smart car and the steering pulse amount of the steering gear The final expression of the quadratic function of .
优选的,所述函数生成模块获取的所述最大行驶速度Speed_fast的初始数值为所述智能小车的电机的极限速度乘以百分之八十。Preferably, the initial value of the maximum travel speed Speed_fast obtained by the function generation module is the limit speed of the motor of the smart car multiplied by 80%.
从上面所述可以看出,本发明提供的基于二次函数的智能小车速度控制的方法和装置,提出一种通过二次函数表示智能小车实时速度随其舵机转向脉冲量变化关系的速度控制方法;提出该二次函数各项系数定性与定量的调试方法,只需调整一个参数,大大缩短参数整定的时间,提高整定参数的效率;该方法具有很好的适应性,能够根据车辆的转向程度动态调整速度,使得小车的速度很好地配合智能小车的转向;本方法简单易实施,且能够减小调试过程对车辆的损耗,降低设计成本。As can be seen from the above, the method and device for the speed control of an intelligent car based on a quadratic function provided by the present invention propose a speed control that expresses the relationship between the real-time speed of the intelligent car and the steering pulse amount of its steering gear through a quadratic function. method; a qualitative and quantitative debugging method for the coefficients of the quadratic function is proposed, only one parameter needs to be adjusted, which greatly shortens the parameter tuning time and improves the efficiency of parameter tuning; the method has good adaptability and can be adjusted according to the steering of the vehicle. The speed can be adjusted dynamically to a certain extent, so that the speed of the car can well match the steering of the intelligent car; the method is simple and easy to implement, and can reduce the loss of the vehicle during the debugging process and reduce the design cost.
附图说明Description of drawings
图1为本发明实施例速度随舵机转向脉冲量变化曲线;Fig. 1 is the variation curve of the speed with the steering gear steering pulse amount according to the embodiment of the present invention;
图2为本发明实施例基于二次函数的智能小车速度控制方法的流程图;2 is a flowchart of a quadratic function-based intelligent car speed control method according to an embodiment of the present invention;
图3为本发明实施例基于二次函数的智能小车速度控制装置的结构示意图。FIG. 3 is a schematic structural diagram of a quadratic function-based intelligent car speed control device according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明进一步详细说明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
需要说明的是,本发明实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本发明实施例的限定,后续实施例对此不再一一说明。It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities with the same name but not the same or non-identical parameters. It can be seen that "first" and "second" It is only for the convenience of expression and should not be construed as a limitation to the embodiments of the present invention, and subsequent embodiments will not describe them one by one.
本发明用一个二次函数来表示速度随舵机转向脉冲量的变化而变化的曲线函数,由于影响速度最关键的因素是赛道中心线的偏离程度,但由于在一些特殊的赛道元素如十字、入环岛元素和出环岛元素的处理中并不是按照看到的中心线的位置来处理,而是按照某一元素的特殊转向来处理。但是可以肯定的是,为了使智能小车更快地平安通过赛道,当舵机偏转的转向量最大的时候,速度要最小;当舵机偏转的转向量为零的时候速度要最大,考虑到速度变化的平滑性,参照附图1所示,给出三个点可以拟合得到二次函数的各项系数。The present invention uses a quadratic function to represent the curve function that the speed changes with the change of the steering pulse amount of the steering gear. Since the most critical factor affecting the speed is the degree of deviation of the center line of the track, but due to some special track elements such as The processing of the cross, the roundabout element and the roundabout element is not processed according to the position of the center line seen, but according to the special turning of an element. But what is certain is that in order to make the smart car pass the track faster and safely, when the steering amount of the steering gear is the largest, the speed should be the smallest; when the steering amount of the steering gear is zero, the speed should be the largest, considering that The smoothness of the speed change, as shown in Figure 1, gives three points to fit the coefficients of the quadratic function.
附图2为本发明实施例基于二次函数的智能小车速度控制方法的流程图。本发明实施例公开了一种基于二次函数的智能小车速度控制方法,包括:FIG. 2 is a flowchart of a method for controlling the speed of an intelligent car based on a quadratic function according to an embodiment of the present invention. The embodiment of the present invention discloses a method for controlling the speed of an intelligent car based on a quadratic function, comprising:
S101,构建智能小车的速度与舵机转向脉冲量之间的二次函数。S101, constructing a quadratic function between the speed of the smart car and the steering pulse amount of the steering gear.
S102,获取智能小车的舵机转向脉冲量左极限值、舵机转向脉冲量右极限值、最大行驶速度以及安全行驶速度。S102, obtain the left limit value of the steering gear steering pulse amount, the right limit value of the steering gear steering pulse amount, the maximum driving speed and the safe driving speed of the smart car.
S103,根据所述舵机转向脉冲量左极限值、所述舵机转向脉冲量右极限值、所述最大行驶速度以及所述安全行驶速度获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数的初始表达式。S103, according to the left limit value of the steering pulse amount of the steering gear, the right limit value of the steering pulse amount of the steering gear, the maximum driving speed and the safe driving speed, obtain the quadratic term coefficient and the linear term of the quadratic function coefficients and constants to obtain the initial expression of the quadratic function.
S104,根据所述智能小车的行驶状态调试所述二次项系数、所述一次项系数以及所述常量,获取所述智能小车的速度与舵机转向脉冲量之间的所述二次函数的最终表达式。S104: Debug the quadratic term coefficient, the linear term coefficient and the constant according to the driving state of the smart car, and obtain the quadratic function between the speed of the smart car and the steering pulse amount of the steering gear final expression.
作为本发明的另一个实施例,步骤S102获取智能小车的舵机转向脉冲量左极限值、舵机转向脉冲量右极限值、最大行驶速度以及安全行驶速度,包括:As another embodiment of the present invention, step S102 obtains the left limit value of the steering gear steering pulse amount, the right limit value of the steering gear steering pulse amount, the maximum driving speed and the safe driving speed of the smart car, including:
S201,获取将所述智能小车的舵机设置为左极限转角时采样周期内的脉冲量,作为所述舵机转向脉冲量左极限值LEFT_max。S201: Obtain the pulse amount in the sampling period when the steering gear of the smart car is set to the left limit turning angle, as the left limit value LEFT_max of the steering gear steering pulse amount.
S202,获取将所述智能小车的舵机设置为右极限转角时采样周期内的脉冲量,作为所述舵机转向脉冲量右极限值RIGHT_max。S202: Obtain the pulse amount within the sampling period when the steering gear of the smart car is set to the right limit turning angle, as the right limit value RIGHT_max of the steering gear steering pulse amount.
S203,获取所述智能小车在直道平稳行驶所能达到的最大速度,作为所述最大行驶速度Speed_fast。S203: Obtain the maximum speed that the smart car can reach when the smart car runs smoothly on a straight road, as the maximum running speed Speed_fast.
S204,获取所述智能小车的舵机设置为左极限转角或右极限转角时,所述智能小车沿最小圆环轨道的中心线内切行驶的速度,作为所述安全行驶速度Speed_safe。S204, acquiring the speed at which the smart car travels inscribed along the centerline of the smallest circular track when the steering gear of the smart car is set to the left limit turning angle or the right limit turning angle, as the safe travel speed Speed_safe.
其中,由于智能小车的舵机的能力左右对称,故所述舵机转向脉冲量左极限值LEFT_max与所述舵机转向脉冲量右极限值RIGHT_max大小相等、方向相反,即:LEFT_max=-RIGHT_max。步骤S201~204的顺序可以任意修改。Among them, since the capability of the steering gear of the smart car is symmetrical, the left limit value LEFT_max of the steering pulse amount of the steering gear is equal in magnitude and opposite in direction to the right limit value RIGHT_max of the steering pulse amount of the steering gear, that is: LEFT_max=-RIGHT_max. The sequence of steps S201-204 can be modified arbitrarily.
作为本发明的另一个实施例,步骤S103所述根据所述舵机转向脉冲量左极限值、所述舵机转向脉冲量右极限值、所述最大行驶速度以及所述安全行驶速度获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数的初始表达式,包括:As another embodiment of the present invention, in step S103, obtaining the said steering gear according to the left limit value of the steering pulse amount of the steering gear, the right limit value of the steering pulse amount of the steering gear, the maximum travel speed and the safe travel speed The quadratic term coefficient, linear term coefficient and constant of the quadratic function are obtained to obtain the initial expression of the quadratic function, including:
S301,根据(舵机转向脉冲量左极限值LEFT_max,安全行驶速度Speed_safe)、(0,最大行驶速度Speed_fast)以及(舵机转向脉冲量右极限值RIGHT_max,安全行驶速度Speed_safe)三个点进行拟合获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数,所述二次函数为:S301, according to three points (left limit value of steering pulse amount of steering gear LEFT_max, safe traveling speed Speed_safe), (0, maximum traveling speed Speed_fast) and (right limit value of steering pulse amount of steering gear RIGHT_max, safe traveling speed Speed_safe) Combine the quadratic term coefficients, linear term coefficients and constants of the quadratic function to obtain the quadratic function, where the quadratic function is:
其中,SPEED(t)为所述智能小车的速度,PWM(t)为所述舵机转向脉冲量。(舵机转向脉冲量左极限值LEFT_max,安全行驶速度Speed_safe)、(舵机转向脉冲量右极限值RIGHT_max,安全行驶速度Speed_safe)表示当智能小车的舵机设置为左极限转角LEFT_max或右极限转角RIGHT_max时,智能小车处于安全速度Speed_safe。(0,最大行驶速度Speed_fast)表示智能小车在直道行驶不发生偏转时,智能小车处于最大行驶速度Speed_fast。Wherein, SPEED(t) is the speed of the smart car, and PWM(t) is the steering pulse amount of the steering gear. (left limit value of steering gear pulse amount LEFT_max, safe driving speed Speed_safe), (right limit value of steering gear steering pulse amount RIGHT_max, safe driving speed Speed_safe) means when the steering gear of the smart car is set to the left limit turning angle LEFT_max or the right limit turning angle At RIGHT_max, the smart car is at the safe speed Speed_safe. (0, the maximum speed Speed_fast) indicates that the smart car is at the maximum speed Speed_fast when the smart car does not deflect while driving on a straight road.
S302,获取所述舵机转向脉冲量左极限值LEFT_max、所述舵机转向脉冲量右极限值RIGHT_max、所述最大行驶速度Speed_fast以及所述安全行驶速度Speed_safe的初始数值并代入所述二次函数,得到所述二次函数的初始表达式。S302: Obtain the initial values of the steering gear steering pulse amount left limit value LEFT_max, the steering gear steering pulse amount right limit value RIGHT_max, the maximum travel speed Speed_fast, and the safe travel speed Speed_safe, and substitute them into the quadratic function , obtain the initial expression of the quadratic function.
其中,舵机转向脉冲量左极限值LEFT_max以及舵机转向脉冲量右极限值RIGHT_max的初始数值与舵机性能有关,是舵机的物理参数,使很容易测定出来的数值;最大行驶速度Speed_fast是根据电机的能力和智能小车轮胎以及赛道材料特性测试出来的以舵机最大转向能力所能走出的安全速度;在一个具体的实施例中,最大行驶速度Speed_fast的初始数值为所述智能小车的电机的极限速度乘以百分之八十。所以一旦车轮、舵机和场地材料确定,也是很容易测定出来的数值。因此只需要测定确定安全行驶速度Speed_safe。Among them, the initial values of the left limit value LEFT_max of the steering pulse amount of the steering gear and the right limit value of the steering pulse amount of the steering gear RIGHT_max are related to the performance of the steering gear, and are the physical parameters of the steering gear, which are easy to measure; the maximum speed Speed_fast is According to the capability of the motor, the tires of the smart car, and the material properties of the track, the safe speed that can be reached with the maximum steering capability of the steering gear; in a specific embodiment, the initial value of the maximum speed Speed_fast is the speed of the smart car. The limit speed of the motor is multiplied by eighty percent. Therefore, once the wheel, steering gear and field materials are determined, it is also easy to determine the value. It is therefore only necessary to determine the safe driving speed Speed_safe.
测定确定安全行驶速度Speed_safe具体方法为:预估智能小车在一个小型环形赛道上的最高安全速度。在一个具体的实施例中,该小型环形赛道的半径为50cm。测定时,将智能小车的舵机设为固定的左极限转角或者右极限转角;当小车以缓慢的速度行驶时,小车能够转出很小的半径的圆环;随着速度的增大,智能小车跑出的环半径越来越大;当智能小车跑出的环正好与赛道的中心线相切小车能够平稳行驶不发生侧滑时,记下此时的速度值即为安全行驶速度Speed_safe。这是因为如果智能小车跑出的环内切则安全行驶速度没有充分利用,小车不会跑出最高的速度,也就不会以最快速度完成比赛;而如果跑出的环外切则已经超过了安全速度,达到了不稳定速度,小车极容易发生侧滑甚至压线或者冲出赛道。The specific method for determining the safe driving speed Speed_safe is to estimate the maximum safe speed of the smart car on a small circular track. In a specific embodiment, the radius of the small annular racetrack is 50cm. When measuring, set the steering gear of the smart car to a fixed left limit turning angle or right limit turning angle; when the car runs at a slow speed, the car can turn a circle with a small radius; as the speed increases, the intelligent The radius of the ring run by the car is getting larger and larger; when the ring run by the smart car is just tangent to the center line of the track, when the car can run smoothly without sideslip, write down the speed value at this time as the safe driving speed Speed_safe . This is because if the smart car runs inside the ring, the safe driving speed will not be fully utilized, the car will not run out of the highest speed, and it will not complete the race at the fastest speed; When the safe speed is exceeded and the unstable speed is reached, the car is very prone to sideslip or even pressing the line or rushing out of the track.
进一步,得到所述二次函数的初始表达式之后还需要对各项系数进行调试,以便于得到更优的表示速度随舵机转向脉冲量的变化关系的函数。在本实施例中,步骤104中所述根据所述智能小车的行驶状态调试所述二次项系数、所述一次项系数以及所述常量,获取所述智能小车的速度与舵机转向脉冲量之间的二次函数的最终表达式,包括:根据所述智能小车的行驶状态,微调所述最大行驶速度Speed_fast的数值,得到所述二次项系数以及所述常量Speed_fast的最终值,从而得到所述智能小车的速度与舵机转向脉冲量之间的二次函数的最终表达式。首先,由于一次项系数为0,不需要进行调试;二次项系数与常量只包含了Speed_fast、Speed_safe和舵机左、右极限能力LEFT_max和RIGHT_max,其中LEFT_max和RIGHT_max,与具体舵机性能有关,是舵机的物理参数,Speed_safe是根据电机的能力和小车轮胎以及地面材料特性测试出来的以舵机最大转向能力所能走出的安全速度,所以一旦车轮、舵机和场地材料确定,也是比较确定的量,所以只需要根据情况来修改Speed_fast的值。结合MATLAB进行分析,如果直道飞车,则减小Speed_fast的值,减小到智能小车能够在所有赛道跑得好的状态就是直道时在赛道中间快速前行,入弯能够迅速且平稳减速,出弯能够迅速且平稳的加速通过各种曲线型赛道,当通过十字时仍然能快速通过,入环岛时能平稳迅速减速,出环岛能够迅速加速时即得到二次函数的最终表达式。由于本发明实施例在系数调试时只需要针对一个系数即Speed_fast进行调试,故可以大大缩短参数调整的时间,提高整体整定参数的效率。Further, after obtaining the initial expression of the quadratic function, it is necessary to debug each coefficient, so as to obtain a better function representing the relationship between the speed and the steering pulse amount of the steering gear. In this embodiment, in
本发明实施例还提供了一种基于二次函数的智能小车速度控制装置,包括:The embodiment of the present invention also provides a quadratic function-based intelligent car speed control device, including:
构建模块10,用于构建智能小车的速度与舵机转向脉冲量之间的二次函数。The
获取模块11,用于获取智能小车的舵机转向脉冲量左极限值、舵机转向脉冲量右极限值、最大行驶速度以及安全行驶速度。The obtaining
函数生成模块12,用于根据所述舵机转向脉冲量左极限值、所述舵机转向脉冲量右极限值、所述最大行驶速度以及所述安全行驶速度获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数的初始表达式。The
调试模块13,用于根据所述智能小车的行驶状态调试所述二次项系数、所述一次项系数以及所述常量,获取所述智能小车的速度与舵机转向脉冲量之间的所述二次函数的最终表达式。The
优选的,所述获取模块11进一步用于:Preferably, the
获取所述智能小车的舵机设置为左极限转角时采样周期内的脉冲量,作为所述舵机转向脉冲量左极限值LEFT_max。The pulse amount within the sampling period when the steering gear of the smart car is set to the left limit turning angle is obtained as the left limit value LEFT_max of the steering gear steering pulse amount.
获取所述智能小车的舵机设置为右极限转角时采样周期内的脉冲量,作为所述舵机转向脉冲量右极限值RIGHT_max。The pulse amount within the sampling period when the steering gear of the smart car is set to the right limit turning angle is obtained as the right limit value RIGHT_max of the steering gear steering pulse amount.
获取所述智能小车在直道平稳行驶所能达到的最大速度,作为所述最大行驶速度Speed_fast。The maximum speed that the smart car can reach when the smart car runs smoothly on a straight road is obtained as the maximum running speed Speed_fast.
获取所述智能小车的舵机设置为左极限转角或右极限转角时,所述智能小车沿最小圆环轨道的中心线内切行驶的速度,作为所述安全行驶速度Speed_safe。When the steering gear of the smart car is set to the left limit turning angle or the right limit turning angle, the speed at which the smart car travels inscribed along the center line of the smallest circular track is obtained as the safe travel speed Speed_safe.
其中,所述舵机转向脉冲量左极限值LEFT_max与所述舵机转向脉冲量右极限值RIGHT_max大小相等、方向相反,即:LEFT_max=-RIGHT_max。Wherein, the left limit value LEFT_max of the steering pulse amount of the steering gear and the right limit value RIGHT_max of the steering pulse amount of the steering gear are equal in magnitude and opposite in direction, that is: LEFT_max=-RIGHT_max.
优选的,所述函数生成模块12进一步用于:Preferably, the
根据(LEFT_max,Speed_safe)、(0,Speed_fast)以及(RIGHT_max,Speed_safe)三个点进行拟合获取所述二次函数的二次项系数、一次项系数以及常量,得到所述二次函数,所述二次函数为:Perform fitting according to three points (LEFT_max, Speed_safe), (0, Speed_fast) and (RIGHT_max, Speed_safe) to obtain the quadratic term coefficient, linear term coefficient and constant of the quadratic function, and obtain the quadratic function, so The quadratic function is:
其中,SPEED(t)为所述智能小车的速度,PWM(t)为所述舵机转向脉冲量;Wherein, SPEED(t) is the speed of the smart car, and PWM(t) is the steering pulse amount of the steering gear;
获取所述舵机转向脉冲量左极限值LEFT_max、所述舵机转向脉冲量右极限值RIGHT_max、所述最大行驶速度Speed_fast以及所述安全行驶速度Speed_safe的初始数值并代入所述二次函数,得到所述二次函数的初始表达式。Obtain the left limit value LEFT_max of the steering pulse amount of the steering gear, the right limit value RIGHT_max of the steering pulse amount of the steering gear, the maximum travel speed Speed_fast and the initial value of the safe travel speed Speed_safe and substitute them into the quadratic function to obtain The initial expression of the quadratic function.
优选的,所述调试模块13进一步用于:Preferably, the
根据所述智能小车的行驶状态,微调所述最大行驶速度Speed_fast的数值,得到所述二次项系数以及所述常量的最终值,从而得到所述智能小车的速度与舵机转向脉冲量之间的二次函数的最终表达式。According to the driving state of the smart car, fine-tune the value of the maximum speed Speed_fast to obtain the quadratic term coefficient and the final value of the constant, so as to obtain the difference between the speed of the smart car and the steering pulse amount of the steering gear The final expression of the quadratic function of .
优选的,所述函数生成模块13获取的所述最大行驶速度Speed_fast的初始数值为所述智能小车的电机的极限速度乘以百分之八十。Preferably, the initial value of the maximum travel speed Speed_fast obtained by the
本发明所述基于二次函数的智能小车速度控制的方法和装置,提出一种通过二次函数表示智能小车实时速度随其舵机转向脉冲量变化关系的速度控制方法;提出该二次函数各项系数定性与定量的调试方法,只需调整一个参数,大大缩短参数整定的时间,提高整定参数的效率;该方法具有很好的适应性,,能够根据车辆的转向程度动态调整速度,使得小车的速度很好地配合智能小车的转向;控制智能小车的加速减速效果更佳,可以根据智能小车的需要控制智能小车入弯平稳快速加速,出弯平稳快速加速;本方法简单易实施,且能够减小调试过程对车辆的损耗,降低设计成本。The method and device for speed control of an intelligent car based on a quadratic function of the present invention proposes a speed control method in which a quadratic function is used to express the relationship between the real-time speed of an intelligent car and the steering pulse amount of its steering gear; The qualitative and quantitative debugging method of the term coefficient only needs to adjust one parameter, which greatly shortens the parameter setting time and improves the efficiency of parameter setting. This method has good adaptability and can dynamically adjust the speed according to the steering degree of the vehicle, so that the car The speed of the smart car is well matched with the steering of the smart car; the acceleration and deceleration effect of controlling the smart car is better, and the smart car can be controlled to accelerate smoothly and quickly when entering a corner, and accelerate smoothly and quickly when exiting a corner according to the needs of the smart car; this method is simple and easy to implement, and can Reduce the loss of the vehicle during the debugging process and reduce the design cost.
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本公开的范围(包括权利要求)被限于这些例子;在本发明的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本发明的不同方面的许多其它变化,为了简明它们没有在细节中提供。Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary, and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples; under the spirit of the present invention, the above embodiments or There may also be combinations between technical features in different embodiments, steps may be carried out in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
另外,为简化说明和讨论,并且为了不会使本发明难以理解,在所提供的附图中可以示出或可以不示出与集成电路(IC)芯片和其它部件的公知的电源/接地连接。此外,可以以框图的形式示出装置,以便避免使本发明难以理解,并且这也考虑了以下事实,即关于这些框图装置的实施方式的细节是高度取决于将要实施本发明的平台的(即,这些细节应当完全处于本领域技术人员的理解范围内)。在阐述了具体细节(例如,电路)以描述本发明的示例性实施例的情况下,对本领域技术人员来说显而易见的是,可以在没有这些具体细节的情况下或者这些具体细节有变化的情况下实施本发明。因此,这些描述应被认为是说明性的而不是限制性的。Additionally, well known power/ground connections to integrated circuit (IC) chips and other components may or may not be shown in the figures provided in order to simplify illustration and discussion, and in order not to obscure the present invention. . Furthermore, devices may be shown in block diagram form in order to avoid obscuring the present invention, and this also takes into account the fact that the details regarding the implementation of these block diagram devices are highly dependent on the platform on which the invention will be implemented (i.e. , these details should be fully within the understanding of those skilled in the art). Where specific details (eg, circuits) are set forth to describe exemplary embodiments of the invention, it will be apparent to those skilled in the art that these specific details may be made without or with changes The present invention is carried out below. Accordingly, these descriptions are to be regarded as illustrative rather than restrictive.
尽管已经结合了本发明的具体实施例对本发明进行了描述,但是根据前面的描述,这些实施例的很多替换、修改和变型对本领域普通技术人员来说将是显而易见的。例如,其它存储器架构(例如,动态RAM(DRAM))可以使用所讨论的实施例。Although the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations to these embodiments will be apparent to those of ordinary skill in the art from the foregoing description. For example, other memory architectures (eg, dynamic RAM (DRAM)) may use the discussed embodiments.
本发明的实施例旨在涵盖落入所附权利要求的宽泛范围之内的所有这样的替换、修改和变型。因此,凡在本发明的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本发明的保护范围之内。Embodiments of the present invention are intended to cover all such alternatives, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710912340.5A CN107463098B (en) | 2017-09-29 | 2017-09-29 | Intelligent trolley speed control method and device based on quadratic function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710912340.5A CN107463098B (en) | 2017-09-29 | 2017-09-29 | Intelligent trolley speed control method and device based on quadratic function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107463098A CN107463098A (en) | 2017-12-12 |
CN107463098B true CN107463098B (en) | 2020-07-31 |
Family
ID=60553796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710912340.5A Active CN107463098B (en) | 2017-09-29 | 2017-09-29 | Intelligent trolley speed control method and device based on quadratic function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107463098B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117097204B (en) * | 2023-10-20 | 2023-12-29 | 四川通安航天科技有限公司 | Motor control method based on rotary encoder detection |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7137673B2 (en) * | 2003-06-27 | 2006-11-21 | Visteon Global Technologies, Inc. | Vehicle yaw stability system and method |
KR100609791B1 (en) * | 2004-03-30 | 2006-08-08 | 가부시끼 가이샤 구보다 | Work vehicle |
JP4705602B2 (en) * | 2007-03-30 | 2011-06-22 | 本田技研工業株式会社 | Drive amount control device |
JP2010259299A (en) * | 2009-04-28 | 2010-11-11 | Toshiba Corp | Electric-vehicle controller and control method |
CN107031435A (en) * | 2017-01-17 | 2017-08-11 | 德州富路汽车智能化研究有限公司 | Control method, equipment and the system of the travel speed of electric vehicle |
CN106909787B (en) * | 2017-02-27 | 2018-09-25 | 中南林业科技大学 | A kind of spark plug gap prediction technique and device |
-
2017
- 2017-09-29 CN CN201710912340.5A patent/CN107463098B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107463098A (en) | 2017-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111703435B (en) | Vehicle speed control method, device, equipment and medium in automatic driving mode | |
CN104571112A (en) | Pilotless automobile lateral control method based on turning curvature estimation | |
CN107103749B (en) | Following traffic flow characteristic modeling method under Internet of vehicles environment | |
WO2019242718A1 (en) | Vehicle lane change control method and device | |
CN104714553B (en) | Glide vehicle terminal area energy method for planning track based on geometric programming | |
CN107272408B (en) | A Dynamic Planning Method in Flight Control of Small Unmanned Helicopter | |
CN106143540B (en) | The self-adaptive computing method of the closely connected operation controlling curve of rail transit train full speed | |
CN108446463A (en) | Merge microscopic traffic flow cooperating simulation platform, emulation mode and the safe evaluation method of dynamics of vehicle | |
CN105005311A (en) | Aircraft pitch channel attack angle synchronous tracking control method | |
CN107010074B (en) | Method for providing theoretical value signal for driver assistance device, motor vehicle and control device thereof | |
CN104590253B (en) | A kind of yaw velocity control method of four motorized wheels electric automobile | |
CN104615889A (en) | Intelligent vehicle path tracking method and system based on clothoid following | |
CN105652880B (en) | Non-linear anti-saturation for the big spatial domain flight of aircraft highly instructs generation method | |
CN107463098B (en) | Intelligent trolley speed control method and device based on quadratic function | |
CN108099908A (en) | Vehicle self-adaptive cruise optimization control calculation method | |
CN112124295A (en) | Unmanned vehicle and its terminal lateral steady state control method and electronic device | |
CN105182906A (en) | Method for controlling position and speed on the basis of high-order S motion trajectory | |
CN103312248B (en) | Method for compensating inflection point error of linear acceleration to deceleration based on DSP (Digital Signal Processor) | |
CN108995708A (en) | Automatic turning control method and device for vehicle | |
CN103713520A (en) | Gyroscope stabilized platform adaptive composite control method | |
CN106292685A (en) | model airplane and flight control method and system thereof | |
CN104197958A (en) | Speedometer calibration method based on laser velocimeter dead reckoning system | |
CN104007660B (en) | A kind of anti-saturation control method of servosystem based on back-stepping design | |
CN106769068A (en) | A kind of aircraft engine loads Servo simulation test method | |
CN108268027B (en) | Driving track optimization method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Jiang Shuxia Inventor after: Long Bo Inventor before: Jiang Shuxia |
|
OL01 | Intention to license declared | ||
OL01 | Intention to license declared |