Self-adjusting method for fully-automatic control motor of vehicle

文档序号:772424 发布日期:2021-04-09 浏览:45次 中文

阅读说明:本技术 一种用于车辆的全自动控制电机的自调整方法 (Self-adjusting method for fully-automatic control motor of vehicle ) 是由 王立云 王科 谢海东 石利俊 李秋南 易双 熊雄 淳刚 于 2021-03-09 设计创作,主要内容包括:本发明涉及一种用于车辆的全自动控制电机的自调整方法,步骤为:S1、采用姿态角度传感器测量车身角度;S21、设置车身的角度误差变量A作为输入变量,设置车身的两次角度误差Ac作为另一个输入变量,设置负责转弯的麦克纳姆轮转速U作为输出变量;S22、确定输出精确量的变化范围;S23、设置变量的语言值,设A、A-c、U的语言值为7个级;S24、设置模糊控制率;S25、定义变量的隶属函数求角度误差和偏差的隶属率;S26、算出最终的模糊输出U*:S27、将最终的模糊输出带入到U*的隶属函数中,得到两个精确输出量,最终的输出取平均值。S3、将平均值赋值给驱动系统。本发明达到的有益效果是:能精确转弯。(The invention relates to a self-adjusting method of a full-automatic control motor for a vehicle, which comprises the following steps: s1, measuring the angle of the vehicle body by adopting an attitude angle sensor; s21, setting an angle error variable A of the vehicle body as an input variable, setting a twice angle error Ac of the vehicle body as another input variable, and setting a Mecanum wheel rotating speed U in charge of turning as an output variable; s22, determining the variation range of the output accurate quantity; s23, setting the language value of the variable, A, A c The language value of U is 7 levels; s24, setting a fuzzy control rate; s25, solving the membership rate of the angle error and the deviation by defining the membership function of the variable; s26, calculating the final fuzzy output U: and S27, the final fuzzy output is brought into a membership function of U to obtain two accurate output quantities, and the final output is averaged. S3, assigning the average value toA drive system. The invention achieves the following beneficial effects: can accurately turn.)

1. A self-adjusting method for a fully automatic control motor of a vehicle is characterized in that:

s1, measuring the angle of the vehicle body by adopting an attitude angle sensor;

s2, determining the rotating speed of the Mecanum wheel by adopting a two-dimensional fuzzy control algorithm, wherein the specific implementation mode is as follows:

s21, setting two input variables A, Ac and an output variable U;

wherein A: a is the angle error of the vehicle body, the unit is DEG, A is a function of the angle error of the vehicle body, and a is one of the numerical values;

Ac:ac-the value of the angular error of the body twice, in units, a being a function of the angular error of the body, a being one of the values;

u: u-the rotation speed of the Mecanum wheel responsible for turning, with the unit of r/s, A being a function of the angle error of the vehicle body, and a being one of the values;

s22, determining the variation range of the output accurate quantity;

wherein a is more than or equal to-3 degrees and less than or equal to 3 degrees, and a is more than or equal to-0.3 degrees and less than or equal to 3 degreesc≤0.3°,-9r/s≤u≤9r/s;

S23, setting language values of variables;

let A, AcThe language value of U is 7 levels,

a ∈ { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) }

AcE { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) }

U belongs to { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) };

s24, setting a fuzzy control rate;

selecting A, Ac and U as output variables of fuzzy logic, and setting linguistic variables of fuzzy subsets of input variables asPB,PM,PS,ZE,NS,NM,NB (ii) a Setting linguistic variables of the fuzzy subset of output variables to

S25, solving the membership rates A and Ac of the angle error and the deviation by defining the membership functions of the variables;

membership functions of a are:

ac is the membership function:

s26, determining the final fuzzy output;

when the measured and calculated a and Ac are brought into the corresponding membership functions, two corresponding membership degrees are respectively obtained, namely A1, A2, Ac1 and Ac2, and the final fuzzy output U is determined by the following formula:

s27, determining the final accurate output;

membership function of U ×:

according to the fuzzy control rate, the final fuzzy output is brought into a membership function of U to obtain two accurate output quantities, and the final output is the average value of the two quantities;

and S3, assigning the rotating speed of the Mecanum wheel obtained in the step S27 to a driving system, and enabling the driving system to enable the four independent Mecanum wheels to reach an ideal motion state.

2. The self-adjusting method of a fully automatically controlled electric machine for vehicles according to claim 1, characterized in that: the four independent mecanum wheels are driven by separate PMSM motors;

the driving system simultaneously controls four independent PMSM motors to realize self-adjustment of the vehicle.

3. The self-adjusting method of a fully automatically controlled electric machine for vehicles according to claim 2, characterized in that: when the driving system drives, the environment information and the speed information are combined to form motion information, and the motion states of the four Mecanum wheels are adjusted through the motion information;

the speed information is determined in steps S1-S27;

the environment information is difference information obtained by comparing the actual shot picture with the picture library.

4. A self-adjusting method of a fully automatically controlled electric machine for vehicles according to claim 3, characterized in that: when the angle of the vehicle body is adjusted, manual control is performed through Bluetooth, and data transmitted during the manual control of the Bluetooth comprise packet header data, continuous data bytes and an end check bit;

the packet header data is used for identifying Bluetooth data; the continuous data bytes comprise speed information, environment information and motion information; the technical check bits are used to check for errors in the data packet.

5. The self-adjusting method of a fully automatically controlled electric machine for vehicles according to claim 4, characterized in that: in step S1, the vehicle body angle is measured by the nine-axis attitude angle sensor, and the measurement calculation is as follows:

introducing roll angle revision variables aiming at specific complex environments of factoriesRevised variable of pitch angleYaw angle revision variableAnd a gravity acceleration revision coefficient Kg, wherein the first three variables are sent to the control system by the Bluetooth control module when the system is debugged, and the relationship among the three variables is as follows:

assuming that the gravity acceleration G is 1G, the three-axis acceleration components a of the gravity acceleration G on the b-system carrier coordinate systemx、ay、az

Formula (2);

under the navigation coordinate system, the gravity acceleration is completely equal to Z under the navigation coordinate systemnThe axes coincide, and XnAnd YnThe component of the axis is 0, when the navigation coordinate system is converted to the carrier coordinate system, the conversion relation is a direction cosine matrix expressed by Euler angle, the specific relation is,

in the formula (3),

in the formula (4),

in the formula (5),

the three formulas are substituted into corresponding revision variables to obtain the final product through calculation

Pitch angle of vehicle body attitudeIn the formula (6),

roll angle of vehicle body attitudeFormula (7);

and because the output of the magnetometer is as follows when the magnetic geographic coordinate system is coincident with the b-system carrier coordinate systemWherein M isnRepresenting the magnetic field of a geographical coordinate system, MdRepresenting a magnetic declination under a magnetic geographic coordinate system;

and the output of the magnetometer in the b-system carrier coordinate system isWherein M isx bRepresenting the north component of the earth's magnetic field in the b coordinate system, My bRepresenting the east component of the magnetic field, Mz bRepresents the perpendicular component of the magnetic field becauseSubstituting the formula (6) and the formula (7) into the directional cosine array to obtain:

and finally, calculating and substituting the revised variables to obtain the yaw angle of the vehicle body attitude:

6. the self-adjusting method of a fully automatically controlled electric machine for vehicles according to claim 5, characterized in that: the environment information is difference information obtained by comparing an actual shot picture with a picture library;

when in comparison, the image is regarded as a matrix, the element in the matrix is a color value, the value is composed of three RGB parameters, the image is subjected to binarization processing to obtain a matrix only composed of numbers 1 and 0, and the specific method for calculating the similarity of the image by using a projection contrast method comprises the following steps:

counting the number of black dots of the image row and column to obtain a group of vectors (x, y), and comparing the vectors with the vector (x) of the target image0,y0) Comparing and obtaining twoObtaining similarity by the distance of the group vectors, dividing the image into n blocks by adopting a block comparison method so as not to lose the characteristics of the image, matching and calculating the similarity of each block to obtain a similarity vector, and then calculating the vector distance to obtain the similarity;

wherein, the vector distance is calculated by adopting the formula of Euclidean distance algorithm as,xiDenotes the abscissa, y, of the ith pointiDenotes the ordinate of the ith point, and n denotes an image divided into n blocks.

7. The self-adjusting method of a fully automatically controlled electric machine for vehicles according to claim 6, characterized in that: the driving system drives the PMSM motor in a sine wave driving mode.

Technical Field

The invention relates to the technical field of vehicle direction adjustment, in particular to a self-adjusting method for a fully-automatic control motor of a vehicle.

Background

During the running process of the vehicle, the vehicle is usually steered artificially. For some intelligent automobiles, the automatic lane changing action of the automobile is realized through set control logic according to the self speed of the automobile, the distance between the automobile and the surrounding automobiles and other environmental information.

Namely, when the driving posture of the ordinary vehicle is changed, the posture is changed mainly according to the automobile condition and the road trend condition, and the randomness is high when the posture is adjusted, so that the driving posture is not accurate enough.

Therefore, the automatic adjusting method for manually controlling the motor through the Bluetooth is designed, although manual adjustment is carried out, specific actions are automatically judged according to the self condition of the vehicle and then fine adjustment is carried out, and therefore the precision is improved.

In this scheme, mainly used on the carrier, but also be applicable to ordinary vehicle. The truck is not particularly fast, unlike different vehicles, but the trajectory is precise, otherwise it is easy to touch other objects, so that the precise control of the truck itself is very important. When the position of the artificial parking or loading goods has errors or position deviation occurs in the operation, the automatic correction and adjustment can be automatically carried out.

Disclosure of Invention

The invention aims to overcome the defects of the prior art and provide a self-adjusting method of a full-automatic control motor for a vehicle, which can accurately turn.

The purpose of the invention is realized by the following technical scheme: a self-adjusting method of a fully automatically controlled motor for a vehicle, S1, measuring a vehicle body angle using an attitude angle sensor:

s2, determining the rotating speed of the Mecanum wheel by adopting a two-dimensional fuzzy control algorithm, wherein the specific mode is as follows:

s21, setting two input variables A, Ac and an output variable U;

wherein A: a is the angle error of the vehicle body, the unit is DEG, A is a function of the angle error of the vehicle body, and a is one of the numerical values;

Ac:ac-the value of the angular error of the body twice, in units, a being a function of the angular error of the body, a being one of the values;

u: u-the rotation speed of the Mecanum wheel responsible for turning, with the unit of r/s, A being a function of the angle error of the vehicle body, and a being one of the values;

wherein a is more than or equal to-3 degrees and less than or equal to 3 degrees, and a is more than or equal to-0.3 degrees and less than or equal to 3 degreesc≤0.3°,-9r/s≤u≤9r/s;

S23, setting language values of variables;

let A, AcThe language value of U is 7 levels,

a ∈ { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) }

AcE { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) }

U belongs to { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) };

s4, setting a fuzzy control rate;

selecting A, Ac and U as output variables of fuzzy logic, and setting linguistic variables of fuzzy subsets of input variables asPB,PM,PS,ZE,NS,NM,NB (ii) a Setting output variablesLinguistic variables of the fuzzy subset are PB,PM,PS,ZE,NS,NM,NB

S25, solving the membership rates A and Ac of the angle error and the deviation by defining the membership functions of the variables;

membership functions of a are:

ac is the membership function:

s26, determining the final fuzzy output;

when the measured and calculated a and Ac are brought into the corresponding membership functions, two corresponding membership degrees are respectively obtained, namely A1, A2, Ac1 and Ac2, and the final fuzzy output U is determined by the following formula:

s27, determining the final accurate output;

membership function of U ×:

and (4) bringing the final fuzzy output into a membership function of U according to the fuzzy control rate so as to obtain two accurate output quantities, and averaging the two quantities by the final output.

And S3, assigning the rotating speed of the Mecanum wheel obtained in the step S27 to a driving system, and enabling the driving system to enable the four independent Mecanum wheels to reach an ideal motion state.

Further, the four independent mecanum wheels are driven by separate PMSM motors; the driving system simultaneously controls four independent PMSM motors to realize self-adjustment of the vehicle.

Furthermore, when the driving system drives, the environment information and the speed information are combined to form motion information, and the motion states of the four Mecanum wheels are adjusted through the motion information; the speed information is determined in steps S1-S27; the environment information is difference information obtained by comparing the actual shot picture with the picture library.

Furthermore, when the angle of the vehicle body is adjusted, manual control is performed through Bluetooth, and data transmitted during the manual control through the Bluetooth comprise packet header data, continuous data bytes and an end check bit; the packet header data is used for identifying Bluetooth data; the continuous data bytes comprise speed information, environment information and motion information; the technical check bits are used to check for errors in the data packet.

Further, in step S1, the vehicle body angle is measured by the nine-axis attitude angle sensor, and the measurement is calculated as follows:

in a factory environment, roll angle revision variables are introduced aiming at specific complex environmentsRevised variable of pitch angleYaw angle revision variableAnd a gravity acceleration revision coefficient Kg, wherein the first three variables are sent to the control system by the Bluetooth control module when the system is debugged, and the relationship among the three variables is as follows:

assuming that the gravity acceleration G is 1G, the three-axis acceleration components ax, ay and az of the gravity acceleration G on the b-system carrier coordinate system are respectively,

formula (2);

under the navigation coordinate system, the gravity acceleration is completely equal to Z under the navigation coordinate systemnThe axes coincide, and XnAnd YnThe component of the axis is 0, when the navigation coordinate system is converted to the carrier coordinate system, the conversion relation is a direction cosine matrix expressed by Euler angle, the specific relation is,

in the formula (3),

in the formula (4),

in the formula (5),

the three formulas are substituted into corresponding revision variables to obtain the final product through calculation

Pitch angle of vehicle body attitudeIn the formula (6),

roll angle of vehicle body attitudeFormula (7);

and because the output of the magnetometer is coincident with the b-system carrier coordinate system when the magnetic geographic coordinate system and the b-system carrier coordinate system are coincidentIs composed ofWherein M isnRepresenting the magnetic field of a geographical coordinate system, MdRepresenting a magnetic declination under a magnetic geographic coordinate system;

and the output of the magnetometer in the b-system carrier coordinate system isWherein M isx bRepresenting the north component of the earth's magnetic field in the b coordinate system, My bRepresenting the east component of the magnetic field, Mz bRepresents the perpendicular component of the magnetic field becauseSubstituting the formula (6) and the formula (7) into the directional cosine array to obtain:

and finally, calculating and substituting the revised variables to obtain the yaw angle of the vehicle body attitude:

further, the environment information is difference information obtained by comparing the actually shot picture with a picture library;

when in comparison, the image is regarded as a matrix, the element in the matrix is a color value, the value is composed of three RGB parameters, the image is subjected to binarization processing to obtain a matrix only composed of numbers 1 and 0, and the specific method for calculating the similarity of the image by using a projection contrast method comprises the following steps:

counting the number of black dots of the image row and column to obtain a group of vectors (x, y), and comparing the vectors with the vector (x) of the target image0,y0) Comparing, finding out the distance between two groups of vectors to obtain similarity, dividing the image into n blocks by block comparison method in order not to lose the characteristics of the image,then, respectively matching and calculating the similarity of each block to obtain a similarity vector, and then calculating the vector distance to obtain the similarity;

wherein, the vector distance is calculated by adopting the formula of Euclidean distance algorithm as,xiDenotes the abscissa, y, of the ith pointiDenotes the ordinate of the ith point, and n denotes an image divided into n blocks.

Further, the driving system drives the PMSM motor in a sine wave driving mode.

The invention has the following advantages: the output value of the accuracy, namely the accurate speed information, is obtained by the sequential angle error of the vehicle body angle and the two times of vehicle body angle error through a fuzzy algorithm, the motion information is finally obtained through the environmental information, and the Mecanum wheel is finally driven to act.

Drawings

FIG. 1 is a schematic flow chart of image comparison in environmental information;

FIG. 2 is a graph of A as a function of;

FIG. 3 is AcA function graph of;

fig. 4 is a graph of U as a function.

Detailed Description

The invention will be further described with reference to the accompanying drawings, but the scope of the invention is not limited to the following.

As shown in fig. 1 to 4, a self-adjusting method for a fully automatically controlled motor of a vehicle includes:

s1, measuring the angle of the vehicle body by adopting an attitude angle sensor, and then adjusting;

s2, determining the rotating speed of the Mecanum wheel by adopting a two-dimensional fuzzy control algorithm, wherein the specific mode is as follows:

s21, setting two input variables A, Ac and an output variable U;

wherein A: a is the angle error of the vehicle body, the unit is DEG, A is a function of the angle error of the vehicle body, and a is one of the numerical values;

Ac:ac-the value of the angular error of the body twice, in units, a being a function of the angular error of the body, a being one of the values;

u: u-the rotation speed of the Mecanum wheel responsible for turning, with the unit of r/s, A being a function of the angle error of the vehicle body, and a being one of the values;

s22, determining the variation range of the output accurate quantity;

wherein a is more than or equal to-3 degrees and less than or equal to 3 degrees, and a is more than or equal to-0.3 degrees and less than or equal to 3 degreesc≤0.3°,-9r/s≤u≤9r/s;

S23, setting language values of variables;

let A, AcThe language value of U is 7 levels,

a ∈ { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) }

AcE { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) }

U belongs to { NB (negative large), NM (negative middle), NS (negative small), ZE (zero), PS (positive small), PM (middle), PB (positive large) };

s24, setting a fuzzy control rate as shown in Table 1;

selecting A, Ac and U as output variables of fuzzy logic, and setting linguistic variables of fuzzy subsets of input variables asPB,PM,PS,ZE,NS,NM,NB(ii) a Setting linguistic variables of the fuzzy subset of output variables toPB,PM,PS,ZE,NS,NM,NB

TABLE 1 fuzzy control rules Table

S25, solving the membership rates A and Ac of the angle error and the deviation by defining the membership functions of the variables;

membership functions of a are:the functional graph of A is shown in FIG. 2;

ac is the membership function:the graph of the function of Ac is shown in fig. 3;

s26, determining the final fuzzy output;

when the measured and calculated a and Ac are brought into the corresponding membership functions, two corresponding membership degrees are respectively obtained, namely A1, A2, Ac1 and Ac2, and the final fuzzy output U is determined by the following formula:

s27, determining the final accurate output;

membership function of U ×:the functional graph of U is shown in fig. 4;

and (4) bringing the final fuzzy output into a membership function of U according to the fuzzy control rate so as to obtain two accurate output quantities, and averaging the two quantities by the final output.

And S3, assigning the rotating speed of the Mecanum wheel obtained in the step S27 to a driving system, and enabling the driving system to enable the four independent Mecanum wheels to reach an ideal motion state.

Steps S1 to S27 mainly determine speed information. In step S3, when the drive system is driven, the environmental information and the speed information are combined to form motion information, and the motion states of the four mecanum wheels are adjusted by the motion information. The environment information is difference information obtained by comparing the actual shot picture with the picture library.

Specifically, when the environment information is obtained, the image is regarded as a matrix, an element in the matrix is a color value, the color value is composed of three RGB parameters, and the binarization processing is performed on the image to obtain a matrix composed of only numbers 1 and 0.

When the actual shot picture is compared with the picture library, the projection contrast method is used for calculating the picture similarity, and the specific method comprises the following steps: counting the number of black dots of the image row and column to obtain a group of vectors (x, y), and comparing the vectors with the vector (x) of the target image0,y0) And comparing, calculating the distance between the two groups of vectors to obtain the similarity, dividing the image into n blocks by adopting a block comparison method in order to avoid losing the characteristics of the image, matching and calculating the similarity of each block to obtain a similarity vector, and calculating the distance between the vectors to obtain the similarity.

Calculating the vector distance by using an Euclidean distance algorithm according to the formula,xiDenotes the abscissa, y, of the ith pointiDenotes the ordinate of the ith point, and n denotes an image divided into n blocks.

In this scheme, in step S1, a nine-axis attitude angle sensor is used to measure the vehicle body angle, and the measurement calculation is as follows:

in a factory environment, roll angle revision variables are introduced aiming at specific complex environmentsRevised variable of pitch angleYaw angle revision variableAnd a gravity acceleration revision coefficient Kg, wherein the first three variables are sent to a control system by a Bluetooth control module during system debugging, and the three variables areThe relationship is as follows:

assuming that the gravity acceleration G is 1G, the three-axis acceleration components ax, ay and az of the gravity acceleration G on the b-system carrier coordinate system are respectively,

formula (2);

under the navigation coordinate system, the gravity acceleration is completely equal to Z under the navigation coordinate systemnThe axes coincide, and XnAnd YnThe component of the axis is 0, when the navigation coordinate system is converted to the carrier coordinate system, the conversion relation is a direction cosine matrix expressed by Euler angle, the specific relation is,

in the formula (3),

in the formula (4),

in the formula (5),

the three formulas are substituted into corresponding revision variables to obtain the final product through calculation

Pitch angle of vehicle body attitudeIn the formula (6),

roll angle of vehicle body attitudeFormula (7);

and because the output of the magnetometer is as follows when the magnetic geographic coordinate system is coincident with the b-system carrier coordinate system

And the output of the magnetometer in the b-system carrier coordinate system isBecause ofSubstituting the formula (6) and the formula (7) into the directional cosine array to obtain:

and finally, calculating and substituting the revised variables to obtain the yaw angle of the vehicle body attitude:

it should be noted that in the scheme, four independent sine wave-driven PMSM motors are used as power sources of the driving system, and the four motors drive four mecanum wheels. And the four PMSN motors are respectively controlled by four high-power drivers, and the drivers are connected to a main control board of the truck through a CAN bus.

During control, an AD2S1205 rotary transformer decoding chip is adopted to convert sine and cosine modulation signals output by the rotary transformer into digital signals, and the digital signals are output to a driver through an SPI communication interface. The driver controls the switching state of the high-power three-phase bridge arm according to the received decoding signal, and sine wave driving is achieved.

For a PMSM motor, in order to realize sine wave driving, a rotating voltage vector with a constant size is synthesized through three-phase windings of the motor. In the motor structure, the phase difference of three windings is 120 degrees, and then the vector-divided voltages which are mutually different by 120 degrees and the voltage of which changes along with the time according to the sine rule can be synthesized into a target voltage vector.

When the angle of the vehicle body is adjusted, manual control is performed through Bluetooth, and data transmitted during the manual control of the Bluetooth comprise packet header data, continuous data bytes and an end check bit; the packet header data is used for identifying Bluetooth data; the continuous data bytes comprise speed information, environment information and motion information; the technical check bits are used to check for errors in the data packet.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:适用于弓网受流系统的整车控制方法、弓网受流系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!