Particle Filtering Method Based on Fuzzy Control and Mobile Device
Through the particle filtering method based on fuzzy control, the number of particles is dynamically adjusted, which solves the problems of slow calculation speed and poor positioning accuracy in the traditional method, and achieves the real-time and accuracy of positioning.
Patent Information
- Application Number
- CN202211485444.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-11-24
AI Technical Summary
Classic particle filtering and sample importance resampling filtering requires a lot of tests to determine the appropriate number of particles, resulting in slow calculation speed and affecting the real-time positioning, especially when moving devices such as unmanned vehicles turn or slip.
A particle filtering method based on fuzzy control is proposed. By dynamically controlling the number of particles, fuzzing processing and fuzzy reasoning are performed based on the data collected by the sensor, and the particle number is dynamically adjusted to adapt to different motion states.
It realizes that while maintaining positioning accuracy, the calculation amount is reduced and the real-time positioning is ensured, especially when turning or slipping movements of the movable device.
Smart Images

Figure CN115841157B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a particle filtering method based on fuzzy control and a mobile device. Background Art
[0002] Both classical particle filtering and sample importance resampling filtering need to perform a large number of tests to obtain a relatively appropriate number of particles, and this relatively appropriate number of particles is not applicable to all situations. When the number of particles is small, the calculation speed is fast, but when the prior estimation is inaccurate, such as when a mobile device like an unmanned vehicle turns or skids, the positioning accuracy will be very poor. If a number of particles that can ensure the positioning accuracy when the prior estimation is inaccurate is selected, the calculation amount will be greatly increased and the calculation speed will become very slow, thus affecting the real-time performance of positioning. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems in the related art to some extent. For this purpose, an object of the present invention is to propose a particle filtering method based on fuzzy control and a mobile device, so as to dynamically control the number of particles, appropriately reduce the number of particles when the mobile device moves relatively smoothly, and appropriately increase the number of particles when making large movements such as turning or skidding, which not only ensures the positioning accuracy but also reduces the calculation amount and guarantees the real-time performance of positioning.
[0004] To achieve the above object, a first aspect embodiment of the present invention proposes a particle filtering method based on fuzzy control, and the method includes: respectively performing fuzzy processing on the data collected by at least two sensors on the mobile device, where the data collected by each sensor at least includes first type data and second type data; sequentially performing fuzzy inference and defuzzification processing on at least two pieces of first type data after fuzzy processing to obtain a first correspondence relationship, and sequentially performing fuzzy inference and defuzzification processing on at least two pieces of second type data after fuzzy processing to obtain a second correspondence relationship; obtaining a system particle number according to the first correspondence relationship and the second correspondence relationship, where the first correspondence relationship is the correspondence relationship between the fuzzy set state, membership degree of the first type data and the number of particles, and the second correspondence relationship is the correspondence relationship between the fuzzy set state, membership degree of the second type data and the number of particles; obtaining an initial particle according to the system particle number, and performing particle filtering processing based on the initial particle.
[0005] In addition, the particle filtering method based on fuzzy control in the above embodiment of the present invention may further have the following additional technical features:
[0006] According to an embodiment of the present invention, the number of sensors is two, denoted as the first sensor and the second sensor respectively. The data collected by the first sensor includes first linear velocity data and first angular velocity data, and the data collected by the second sensor includes second linear velocity data and second angular velocity data.
[0007] According to an embodiment of the present invention, performing fuzzy inference and defuzzification processing on at least two first-type data after fuzzy processing in sequence to obtain a first correspondence relationship, and performing fuzzy inference and defuzzification processing on at least two second-type data after fuzzy processing in sequence to obtain a second correspondence relationship, including: performing fuzzy inference on the first linear velocity data and the second linear velocity data after fuzzy processing to obtain a linear velocity fuzzy result and its corresponding linear velocity membership degree, and performing defuzzification processing on the linear velocity fuzzy result and its corresponding linear velocity membership degree to obtain the first correspondence relationship; performing fuzzy inference on the first angular velocity data and the second angular velocity data after fuzzy processing to obtain an angular velocity fuzzy result and its corresponding angular velocity membership degree, and performing defuzzification processing on the angular velocity fuzzy result and its corresponding angular velocity membership degree to obtain the second correspondence relationship.
[0008] According to an embodiment of the present invention, the fuzzy inference follows the following rules: Rule 1: When the fuzzy language variables are the same, output the same fuzzy language variable; Rule 2: When there are differences in the fuzzy language variables, if the membership degrees are different, preferentially output the fuzzy language variable with a larger membership degree, and if the membership degrees are the same, output all fuzzy language variables.
[0009] According to an embodiment of the present invention, performing fuzzy processing on the data collected by at least two sensors on the movable device respectively, including: taking the absolute values of the first linear velocity data, the first angular velocity data, the second linear velocity data, and the second angular velocity data respectively, and performing fuzzy processing on the first linear velocity data, the first angular velocity data, the second linear velocity data, and the second angular velocity data after taking the absolute values respectively.
[0010] According to an embodiment of the present invention, using a triangular membership function to fuzzy the first linear velocity data, the first angular velocity data, the second linear velocity data, and the second angular velocity data after taking the absolute values into multiple fuzzy language variables.
[0011] According to an embodiment of the present invention, obtaining the system particle number according to the first correspondence relationship and the second correspondence relationship, including: obtaining the linear velocity particle number according to the first correspondence relationship, and obtaining the angular velocity particle number according to the second correspondence relationship; if the linear velocity particle number is greater than the angular velocity particle number, then use the linear velocity particle number as the system particle number, otherwise use the angular velocity particle number as the system particle number.
[0012] According to an embodiment of the present invention, the particle filter processing based on the initialized particles includes: performing importance sampling on the initialized particles to sample n particles, and calculating the weights of each particle to obtain n first weights, where n is the number of system particles; resampling the n particles according to the n first weights; calculating the weights of the resampled particles to obtain a plurality of second weights; if the maximum value among the second weights reaches a weight threshold, updating the position of the mobile device according to the resampled particles, otherwise returning to the step of performing importance sampling on the initialized particles.
[0013] According to an embodiment of the present invention, the multiple fuzzy linguistic variables include very large, large, small, and very small.
[0014] To achieve the above object, a second aspect embodiment of the present invention proposes a mobile device, including a memory, a processor, and a computer program stored on the memory. When the computer program is executed by the processor, the above-mentioned particle filter method based on fuzzy control is implemented.
[0015] The particle filter method based on fuzzy control and the mobile device according to the embodiments of the present invention can dynamically control the number of particles. For example, when the movement of the mobile device is relatively gentle, the number of particles can be appropriately reduced, and when there are large movements such as turning or skidding, the number of particles can be appropriately increased. Thereby, both the positioning accuracy can be guaranteed, and the calculation amount can be reduced to ensure the real-time nature of the positioning. Description of the Drawings
[0016] Figure 1 is a flowchart of the particle filter method based on fuzzy control according to an embodiment of the present invention;
[0017] Figure 2 is a data comparison table of angular velocity fuzzyfication according to an embodiment of the present invention;
[0018] Figure 3 is a coordinate diagram of angular velocity fuzzyfication rules according to an embodiment of the present invention;
[0019] Figure 4 is a data comparison table of linear velocity fuzzyfication according to an embodiment of the present invention;
[0020] Figure 5 is a coordinate diagram of linear velocity fuzzyfication rules according to an embodiment of the present invention;
[0021] Figure 6 is a flowchart of the particle filter method based on fuzzy control according to another embodiment of the present invention;
[0022] Figure 7It is a comparison table of the output fuzzy set state, membership degree and specific number of particles in an embodiment of the present invention;
[0023] Figure 8 It is a coordinate diagram of the particle number output fuzzification rule in an embodiment of the present invention;
[0024] Figure 9 It is a flowchart of a particle filter method based on fuzzy control in another embodiment of the present invention;
[0025] Figure 10 It is a structural block diagram of an electronic device in an embodiment of the present invention. Detailed implementation manners
[0026] The embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present invention, and should not be construed as limiting the present invention.
[0027] The particle filter method and electronic device based on fuzzy control in the embodiments of the present invention will be described below with reference to the accompanying drawings.
[0028] Figure 1 It is a flowchart of a particle filter method based on fuzzy control in an embodiment of the present invention.
[0029] As Figure 1 shown, the particle filter method based on fuzzy control includes:
[0030] S11, respectively perform fuzzification processing on the data collected by at least two sensors on the movable device, where the data collected by each sensor includes at least first type data and second type data.
[0031] S12, sequentially perform fuzzy inference and defuzzification processing on at least two pieces of first type data after fuzzification processing to obtain a first correspondence relationship, and sequentially perform fuzzy inference and defuzzification processing on at least two pieces of second type data after fuzzification processing to obtain a second correspondence relationship.
[0032] S13, obtain the system particle number according to the first correspondence relationship and the second correspondence relationship, where the first correspondence relationship is the correspondence relationship between the fuzzy set state, membership degree and particle number of the first type data, and the second correspondence relationship is the correspondence relationship between the fuzzy set state, membership degree and particle number of the second type data.
[0033] S14, obtain the initial particles according to the system particle number, and perform particle filter processing based on the initial particles.
[0034] The particle filter method based on fuzzy control according to the embodiments of the present invention can dynamically control the number of particles. For example, when the movement of the mobile device is relatively gentle, the number of particles can be appropriately reduced, and when there is a large movement such as turning or skidding, the number of particles can be appropriately increased. In this way, both the positioning accuracy can be ensured and the calculation amount can be reduced, ensuring the real-time performance of positioning.
[0035] In some embodiments, the number of sensors is two, which are respectively denoted as the first sensor and the second sensor. The data collected by the first sensor includes the first linear velocity data and the first angular velocity data, and the data collected by the second sensor includes the second linear velocity data and the second angular velocity data.
[0036] In this embodiment, S11 may include: (1) obtaining the data of the sensors to be fuzzified. The sensors include a wheel speed odometer and an IMU (Inertial Measurement Unit) provided on a mobile device such as an unmanned vehicle. The linear velocity data and the angular velocity data of the wheel speed odometer are respectively denoted as Vl odom and Va odom , that is, the first linear velocity data and the first angular velocity data. The linear velocity data and the angular velocity data obtained by integrating the acceleration collected by the IMU are respectively denoted as Vl imu and Va imu , that is, the second linear velocity data and the second angular velocity data; (2) taking the absolute values of the first linear velocity data, the first angular velocity data, the second linear velocity data, and the second angular velocity data. This step is to preprocess the input quantity for fuzzification. Taking the absolute value can simplify the fuzzification process; (3) fuzzifying the input quantity. After fuzzification, an angular velocity fuzzy set and a linear velocity fuzzy set can be obtained. The input quantity fuzzification includes the fuzzification of the linear velocity and the fuzzification of the angular velocity. The triangular membership function, that is, formula (1), can be used to fuzzify the absolute values of the linear velocity and the angular velocity obtained in step (2) into four types: very small, small, large, and very large. In formula (1), x is the absolute value of the input linear velocity and angular velocity, and a, b, and c are constants.
[0037]
[0038] In some embodiments, the data comparison table for angular velocity fuzzification is as Figure 2 shown, the coordinate diagram of the angular velocity fuzzification rule is as Figure 3 shown, the data comparison table for linear velocity fuzzification is as Figure 4 shown, and the coordinate diagram of the linear velocity fuzzification rule is as Figure 5As shown below. Taking the angular velocity fuzzification data comparison table as an example: The angular velocity between 0 and 3 is fuzzified as very small. The membership degree of the angular velocity 0 fuzzified as very small is 1, and the membership degree of the angular velocity 1.5 fuzzified as very small is 0.5. The angular velocity between 3 and 9 is fuzzified as small. The membership degrees of the angular velocity 3 and the angular velocity 9 fuzzified as small are 0. The membership degrees of the angular velocity 4.5 and the angular velocity 7.5 fuzzified as small are 0.5, and the membership degree of the angular velocity 6 fuzzified as small is 1.
[0039] In some embodiments, as Figure 6 shown, according to at least two first type data after fuzzification processing, fuzzy inference and defuzzification processing are sequentially performed to obtain a first corresponding relationship. According to at least two second type data after fuzzification processing, fuzzy inference and defuzzification processing are sequentially performed to obtain a second corresponding relationship, including:
[0040] S61, perform fuzzy inference according to the first linear velocity data and the second linear velocity data after fuzzification processing to obtain a linear velocity fuzzification result and its corresponding linear velocity membership degree, and perform defuzzification processing on the linear velocity fuzzification result and its corresponding linear velocity membership degree to obtain a first corresponding relationship.
[0041] S62, perform fuzzy inference according to the first angular velocity data and the second angular velocity data after fuzzification processing to obtain an angular velocity fuzzification result and its corresponding angular velocity membership degree, and perform defuzzification processing on the angular velocity fuzzification result and its corresponding angular velocity membership degree to obtain a second corresponding relationship.
[0042] Specifically, the result of fuzzy inference is a fuzzy state variable and the corresponding membership degree. According to the angular velocity fuzzy set and the linear velocity fuzzy set obtained in S11, denote the angular velocity fuzzy set of the IMU as Ia, the linear velocity fuzzy set of the IMU as Il, denote the angular velocity fuzzy set of the odometer as Oa, and the linear velocity fuzzy set of the odometer as Ol. Refer to the time meaning of the angular velocity and the linear velocity for fuzzy inference. The fuzzy inference follows the following two rules:
[0043] (1) The fuzzy language variables are consistent: When the data of the IMU and the wheel speed odometer are the same fuzzy language variable, it means that the data of the sensor can truly reflect the motion state of the movable device. At this time, the state of the fuzzy language variable is the output result of the fuzzy inference.
[0044] (2) There are differences in the fuzzy language variables: When the data of the IMU and the wheel speed odometer are different fuzzy language variables, it means that the motion state of the movable device has changed greatly. At this time, the inference result should be expanded to obtain more particle numbers. The membership degrees are different, and the fuzzy language variable with a larger membership degree is preferentially output. When the membership degrees are the same, the output order of the fuzzy language variables is: very large, large, small, very small.
[0045] According to the above two inference rules and the actual simulation results, the following 40 angular velocity fuzzy rules can be sorted out:
[0046] If both Ia and Oa are very small, the angular velocity result of fuzzy inference is very small, and the membership degree takes the average value of Ia and Oa.
[0047] If both Ia and Oa are small, the angular velocity result of fuzzy inference is very small, and the membership degree takes the average value of Ia and Oa.
[0048] If both Ia and Oa are large, the angular velocity result of fuzzy inference is large, and the membership degree takes the average value of Ia and Oa.
[0049] If both Ia and Oa are very large, the angular velocity result of fuzzy inference is very large, and the membership degree takes the average value of Ia and Oa.
[0050] If Ia is very small, Oa is small, and the membership degree of Ia is less than that of Oa, the angular velocity result of fuzzy inference is small, and the membership degree of Oa is taken.
[0051] If Ia is very small, Oa is small, and the membership degree of Ia is greater than that of Oa, the angular velocity result of fuzzy inference is very small, and the membership degree of Ia is taken.
[0052] If Ia is very small, Oa is small, and the membership degree of Ia is equal to that of Oa, the angular velocity result of fuzzy inference is small, and the membership degree of Oa is taken.
[0053] If Ia is very small, Oa is large, and the membership degree of Ia is less than that of Oa, the angular velocity result of fuzzy inference is large, and the membership degree of Oa is taken.
[0054] If Ia is very small, Oa is large, and the membership degree of Ia is greater than that of Oa, the angular velocity result of fuzzy inference is very small, and the membership degree of Ia is taken.
[0055] If Ia is very small, Oa is large, and the membership degree of Ia is equal to that of Oa, the angular velocity result of fuzzy inference is large, and the membership degree of Oa is taken.
[0056] If Ia is very small, Oa is very large, and the membership degree of Ia is less than that of Oa, the angular velocity result of fuzzy inference is very large, and the membership degree of Oa is taken.
[0057] If Ia is very small, Oa is very large, and the membership degree of Ia is greater than that of Oa, the angular velocity result of fuzzy inference is very small, and the membership degree of Ia is taken.
[0058] If Ia is very small, Oa is very large, and the membership degree of Ia is equal to that of Oa, the angular velocity result of fuzzy inference is very large, and the membership degree of Oa is taken.
[0059] If Ia is small, Oa is very small, and the membership degree of Ia is less than that of Oa, then the angular velocity result of fuzzy reasoning is very small, and the membership degree of Oa is taken.
[0060] If Ia is small, Oa is very small, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of fuzzy reasoning is small, and the membership degree of Ia is taken.
[0061] If Ia is small, Oa is very small, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of fuzzy reasoning is small, and the membership degree of Ia is taken.
[0062] If Ia is small, Oa is large, and the membership degree of Ia is less than that of Oa, then the angular velocity result of fuzzy reasoning is large, and the membership degree of Oa is taken.
[0063] If Ia is small, Oa is large, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of fuzzy reasoning is small, and the membership degree of Ia is taken.
[0064] If Ia is small, Oa is large, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of fuzzy reasoning is large, and the membership degree of Oa is taken.
[0065] If Ia is small, Oa is very large, and the membership degree of Ia is less than that of Oa, then the angular velocity result of fuzzy reasoning is very large, and the membership degree of Oa is taken.
[0066] If Ia is small, Oa is very large, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of fuzzy reasoning is small, and the membership degree of Ia is taken.
[0067] If Ia is small, Oa is very large, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of fuzzy reasoning is very large, and the membership degree of Oa is taken.
[0068] If Ia is large, Oa is very small, and the membership degree of Ia is less than that of Oa, then the angular velocity result of fuzzy reasoning is very small, and the membership degree of Oa is taken.
[0069] If Ia is large, Oa is very small, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of fuzzy reasoning is large, and the membership degree of Ia is taken.
[0070] If Ia is large, Oa is very small, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of fuzzy reasoning is large, and the membership degree of Ia is taken.
[0071] If Ia is large, Oa is small, and the membership degree of Ia is less than that of Oa, then the angular velocity result of fuzzy reasoning is small, and the membership degree of Oa is taken.
[0072] If Ia is large, Oa is small, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of fuzzy reasoning is large, and the membership degree of Ia is taken.
[0073] If Ia is large, Oa is small, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of the fuzzy inference is large, and the membership degree of Ia is taken.
[0074] If Ia is large, Oa is very large, and the membership degree of Ia is less than that of Oa, then the angular velocity result of the fuzzy inference is very large, and the membership degree of Oa is taken.
[0075] If Ia is large, Oa is very large, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of the fuzzy inference is large, and the membership degree of Ia is taken.
[0076] If Ia is large, Oa is very large, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of the fuzzy inference is very large, and the membership degree of Oa is taken.
[0077] If Ia is very large, Oa is small, and the membership degree of Ia is less than that of Oa, then the angular velocity result of the fuzzy inference is small, and the membership degree of Oa is taken.
[0078] If Ia is very large, Oa is small, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of the fuzzy inference is very large, and the membership degree of Ia is taken.
[0079] If Ia is very large, Oa is small, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of the fuzzy inference is very large, and the membership degree of Ia is taken.
[0080] If Ia is very large, Oa is small, and the membership degree of Ia is less than that of Oa, then the angular velocity result of the fuzzy inference is small, and the membership degree of Oa is taken.
[0081] If Ia is very large, Oa is small, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of the fuzzy inference is very large, and the membership degree of Ia is taken.
[0082] If Ia is very large, Oa is small, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of the fuzzy inference is very large, and the membership degree of Ia is taken.
[0083] If Ia is very large, Oa is large, and the membership degree of Ia is less than that of Oa, then the angular velocity result of the fuzzy inference is large, and the membership degree of Oa is taken.
[0084] If Ia is very large, Oa is large, and the membership degree of Ia is greater than that of Oa, then the angular velocity result of the fuzzy inference is very large, and the membership degree of Ia is taken.
[0085] If Ia is very large, Oa is large, and the membership degree of Ia is equal to that of Oa, then the angular velocity result of the fuzzy inference is very large, and the membership degree of Ia is taken.
[0086] Similarly, the following 40 linear velocity fuzzy rules can be sorted out:
[0087] If both Il and Ol are very small, the result of the linear velocity of the fuzzy inference is very small, and the membership degree takes the average value of Il and Ol.
[0088] If both Il and Ol are small, the result of the linear velocity of the fuzzy inference is very small, and the membership degree takes the average value of Il and Ol.
[0089] If both Il and Ol are large, the result of the linear velocity of the fuzzy inference is large, and the membership degree takes the average value of Il and Ol.
[0090] If both Il and Ol are very large, the result of the linear velocity of the fuzzy inference is very large, and the membership degree takes the average value of Il and Ol.
[0091] If Il is very small, Ol is small, and the membership degree of Il is less than that of Ol, the result of the linear velocity of the fuzzy inference is small, and the membership degree of Ol is taken.
[0092] If Il is very small, Ol is small, and the membership degree of Il is greater than that of Ol, the result of the linear velocity of the fuzzy inference is very small, and the membership degree of Il is taken.
[0093] If Il is very small, Ol is small, and the membership degree of Il is equal to that of Ol, the result of the linear velocity of the fuzzy inference is small, and the membership degree of Ol is taken.
[0094] If Il is very small, Ol is large, and the membership degree of Il is less than that of Ol, the result of the linear velocity of the fuzzy inference is large, and the membership degree of Ol is taken.
[0095] If Il is very small, Ol is large, and the membership degree of Il is greater than that of Ol, the result of the linear velocity of the fuzzy inference is very small, and the membership degree of Il is taken.
[0096] If Il is very small, Ol is large, and the membership degree of Il is equal to that of Ol, the result of the linear velocity of the fuzzy inference is large, and the membership degree of Ol is taken.
[0097] If Il is very small, Ol is very large, and the membership degree of Il is less than that of Ol, the result of the linear velocity of the fuzzy inference is very large, and the membership degree of Ol is taken.
[0098] If Il is very small, Ol is very large, and the membership degree of Il is greater than that of Ol, the result of the linear velocity of the fuzzy inference is very small, and the membership degree of Il is taken.
[0099] If Il is very small, Ol is very large, and the membership degree of Il is equal to that of Ol, the result of the linear velocity of the fuzzy inference is very large, and the membership degree of Ol is taken.
[0100] If Il is small, Ol is very small, and the membership degree of Il is less than that of Ol, then the linear velocity result of the fuzzy inference is very small, and the membership degree of Ol is taken.
[0101] If Il is small, Ol is very small, and the membership degree of Il is greater than that of Ol, then the linear velocity result of the fuzzy inference is small, and the membership degree of Il is taken.
[0102] If Il is small, Ol is very small, and the membership degree of Il is equal to that of Ol, then the linear velocity result of the fuzzy inference is small, and the membership degree of Il is taken.
[0103] If Il is small, Ol is large, and the membership degree of Il is less than that of Ol, then the linear velocity result of the fuzzy inference is large, and the membership degree of Ol is taken.
[0104] If Il is small, Ol is large, and the membership degree of Il is greater than that of Ol, then the linear velocity result of the fuzzy inference is small, and the membership degree of Il is taken.
[0105] If Il is small, Ol is large, and the membership degree of Il is equal to that of Ol, then the linear velocity result of the fuzzy inference is large, and the membership degree of Ol is taken.
[0106] If Il is small, Ol is very large, and the membership degree of Il is less than that of Ol, then the linear velocity result of the fuzzy inference is very large, and the membership degree of Ol is taken.
[0107] If Il is small, Ol is very large, and the membership degree of Il is greater than that of Ol, then the linear velocity result of the fuzzy inference is small, and the membership degree of Il is taken.
[0108] If Il is small, Ol is very large, and the membership degree of Il is equal to that of Ol, then the linear velocity result of the fuzzy inference is very large, and the membership degree of Ol is taken.
[0109] If Il is large, Ol is very small, and the membership degree of Il is less than that of Ol, then the linear velocity result of the fuzzy inference is very small, and the membership degree of Ol is taken.
[0110] If Il is large, Ol is very small, and the membership degree of Il is greater than that of Ol, then the linear velocity result of the fuzzy inference is large, and the membership degree of Il is taken.
[0111] If Il is large, Ol is very small, and the membership degree of Il is equal to that of Ol, then the linear velocity result of the fuzzy inference is large, and the membership degree of Il is taken.
[0112] If Il is large, Ol is small, and the membership degree of Il is less than that of Ol, then the linear velocity result of the fuzzy inference is small, and the membership degree of Ol is taken.
[0113] If Il is large, Ol is small, and the membership degree of Il is greater than that of Ol, then the linear velocity result of the fuzzy inference is large, and the membership degree of Il is taken.
[0114] If Il is large, Ol is small, and the membership degree of Il is equal to that of Ol, then the linear velocity result of fuzzy inference is large, and the membership degree of Il is taken.
[0115] If Il is large, Ol is very large, and the membership degree of Il is less than that of Ol, then the linear velocity result of fuzzy inference is very large, and the membership degree of Ol is taken.
[0116] If Il is large, Ol is very large, and the membership degree of Il is greater than that of Ol, then the linear velocity result of fuzzy inference is large, and the membership degree of Il is taken.
[0117] If Il is large, Ol is very large, and the membership degree of Il is equal to that of Ol, then the linear velocity result of fuzzy inference is very large, and the membership degree of Ol is taken.
[0118] If Il is very large, Ol is very small, and the membership degree of Il is less than that of Ol, then the linear velocity result of fuzzy inference is very small, and the membership degree of Ol is taken.
[0119] If Il is very large, Ol is very small, and the membership degree of Il is greater than that of Ol, then the linear velocity result of fuzzy inference is very large, and the membership degree of Il is taken.
[0120] If Il is very large, Ol is very small, and the membership degree of Il is equal to that of Ol, then the linear velocity result of fuzzy inference is very large, and the membership degree of Il is taken.
[0121] If Il is very large, Ol is small, and the membership degree of Il is less than that of Ol, then the linear velocity result of fuzzy inference is small, and the membership degree of Ol is taken.
[0122] If Il is very large, Ol is small, and the membership degree of Il is greater than that of Ol, then the linear velocity result of fuzzy inference is very large, and the membership degree of Il is taken.
[0123] If Il is very large, Ol is small, and the membership degree of Il is equal to that of Ol, then the linear velocity result of fuzzy inference is very large, and the membership degree of Il is taken.
[0124] If Il is very large, Ol is large, and the membership degree of Il is less than that of Ol, then the linear velocity result of fuzzy inference is large, and the membership degree of Ol is taken.
[0125] If Il is very large, Ol is large, and the membership degree of Il is greater than that of Ol, then the linear velocity result of fuzzy inference is very large, and the membership degree of Il is taken.
[0126] If Il is very large, Ol is large, and the membership degree of Il is equal to that of Ol, then the linear velocity result of fuzzy inference is very large, and the membership degree of Il is taken.
[0127] In some embodiments, the first correspondence is the relationship between the linear velocity fuzzy state, membership degree, and the specific number of particles; the second correspondence is the relationship between the angular velocity fuzzy set state, membership degree, and the specific number of particles; defuzzification includes mapping the linear velocity and angular velocity fuzzy results obtained in S61 and S62 and the membership degree into different numbers of particles. The output fuzzy set state, membership degree, and specific number of particles comparison table is as Figure 7 shown, and the coordinate diagram of the particle number output fuzzy rule is as Figure 8 shown. For example, for the angular velocity, the number of particles with the output fuzzy state of small and membership degree of 1 is 50, the number of particles with the output fuzzy state of small and membership degree of 0.5 is 60, and the number of particles with the output fuzzy state of small and membership degree of 0 is 70.
[0128] In some embodiments, obtaining the system particle number according to the first correspondence and the second correspondence includes: obtaining the linear velocity particle number according to the first correspondence and obtaining the angular velocity particle number according to the second correspondence; if the linear velocity particle number is greater than the angular velocity particle number, using the linear velocity particle number as the system particle number, otherwise using the angular velocity particle number as the system particle number, and initializing the system particle number.
[0129] Specifically, input the particle number Nl obtained by linear velocity fuzzification and the particle number Na obtained by angular velocity fuzzification into the particle number discriminator respectively. Judge Nl and Na; if Nl is greater than Na, use Nl as the system particle number, if Nl is less than Na, use Na as the system particle number. Initializing the particles includes: initializing the number n of particles with the system particle number, and collecting n particles from the prior probability density p(x0) at t = 0
[0130] In some embodiments, as Figure 9 shown, performing particle filter processing based on the initialized particles includes:
[0131] S91, performing importance sampling on the initialized particles, sampling to obtain n particles, and calculating the weights of each particle to obtain n first weights, where n is the system particle number.
[0132] Specifically, using the importance probability density to sample and generate n particles calculating the particle weights and normalizing the calculated particle weights to obtain the normalized weights
[0133] S92, resampling the n particles according to the n first weights.
[0134] Specifically, for the particle set with the obtained normalized weights Resampling is performed according to the weights of the particles to obtain a resampled particle set.
[0135] S93, calculate the weights of the particles obtained by resampling to obtain a plurality of second weights.
[0136] Specifically, the weights of all particles are calculated using formula (2). Specific explanation of formula (2): Converting the sum of particle states to the weighted sum of particle states. Each particle has a corresponding weight, and the larger the weight, the higher the possibility that the state represented by the particle is the true state of the system.
[0137]
[0138] S94, if the maximum value in the second weights reaches the weight threshold, update the position of the mobile device according to the particles obtained by resampling; otherwise, return to the step of performing importance sampling on the initialized particles.
[0139] In summary, the particle filter method based on fuzzy control in the embodiments of the present invention can dynamically control the number of particles, appropriately reduce the number of particles when the mobile device moves smoothly, and appropriately increase the number of particles during large movements such as turning or skidding, which not only ensures the positioning accuracy but also reduces the computational amount and guarantees the real-time performance of positioning.
[0140] Figure 10 It is a structural block diagram of a mobile device according to an embodiment of the present invention.
[0141] As Figure 10 shown, the mobile device 1000 includes: a processor 1001 and a memory 1003. Among them, the processor 1001 and the memory 1003 are connected, such as through a bus 1002. Optionally, the electronic device 1000 may further include a transceiver 1004. It should be noted that in practical applications, the transceiver 1004 is not limited to one, and the structure of the mobile device 1000 does not constitute a limitation to the embodiments of the present invention.
[0142] The processor 1001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of the present invention. The processor 901 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0143] The bus 1002 may include a path for transmitting information between the above components. The bus 1002 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 1002 may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 10 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0144] The memory 1003 is used to store a computer program corresponding to the fuzzy control-based particle filtering method of the above embodiments of the present invention, and this computer program is controlled and executed by the processor 1001. The processor 1001 is used to execute the computer program stored in the memory 1003 to implement the content shown in the foregoing method embodiments. Figure 10 The illustrated mobile device 1000 is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0145] It should be noted that the logic and / or steps represented in the flowchart or described otherwise herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection part with one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.
[0146] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0147] In the description of this specification, the description referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0148] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation on the present invention.
[0149] In addition, the terms "first" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, the meaning of "a plurality of" is at least two, such as two, three, etc., unless otherwise specifically and clearly defined.
[0150] In the present invention, unless otherwise clearly specified and limited, the terms "mounted", "connected", "connected to", "fixed", etc. should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two elements or the interaction relationship between two elements, unless otherwise clearly limited. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0151] In the present invention, unless otherwise clearly specified and limited, the first feature being "on" or "under" the second feature may be that the first and second features are in direct contact, or the first and second features are indirectly in contact through an intermediate medium. Moreover, the first feature being "above", "over" and "on top of" the second feature may be that the first feature is directly above or obliquely above the second feature, or merely indicates that the first feature has a higher horizontal height than the second feature. The first feature being "under", "beneath" and "underneath" the second feature may be that the first feature is directly below or obliquely below the second feature, or merely indicates that the first feature has a lower horizontal height than the second feature.
[0152] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as a limitation on the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A particle filtering method based on fuzzy control, characterized in that The method includes: Performing fuzzification processing on data collected by at least two sensors on the movable device, where the data collected by each of the sensors includes at least first-type data and second-type data; Performing fuzzy inference and defuzzification processing on at least two pieces of first-type data after fuzzification processing in sequence to obtain a first correspondence, and performing fuzzy inference and defuzzification processing on at least two pieces of second-type data after fuzzification processing in sequence to obtain a second correspondence; Obtaining the system particle number according to the first correspondence and the second correspondence, where the first correspondence is the correspondence between the fuzzy set state, membership degree, and particle number of the first-type data, and the second correspondence is the correspondence between the fuzzy set state, membership degree, and particle number of the second-type data; Obtaining an initial particle according to the system particle number and performing particle filtering processing based on the initial particle.
2. The method according to claim 1, wherein The number of sensors is two, denoted as the first sensor and the second sensor respectively. The data collected by the first sensor includes first linear velocity data and first angular velocity data, and the data collected by the second sensor includes second linear velocity data and second angular velocity data.
3. The method according to claim 2, wherein The performing fuzzy inference and defuzzification processing on at least two pieces of first-type data after fuzzification processing in sequence to obtain a first correspondence, and performing fuzzy inference and defuzzification processing on at least two pieces of second-type data after fuzzification processing in sequence to obtain a second correspondence includes: Performing fuzzy inference on the fuzzified first linear velocity data and second linear velocity data to obtain a linear velocity fuzzification result and its corresponding linear velocity membership degree, and performing defuzzification processing on the linear velocity fuzzification result and its corresponding linear velocity membership degree to obtain the first correspondence; Performing fuzzy inference on the fuzzified first angular velocity data and second angular velocity data to obtain an angular velocity fuzzification result and its corresponding angular velocity membership degree, and performing defuzzification processing on the angular velocity fuzzification result and its corresponding angular velocity membership degree to obtain the second correspondence.
4. The method according to claim 3, wherein The fuzzy inference follows the following rules: Rule 1: When the fuzzy language variables are the same, output the same fuzzy language variable; Rule 2: When there are differences in the fuzzy language variables, if the membership degrees are different, preferentially output the fuzzy language variable with a larger membership degree. If the membership degrees are the same, output all fuzzy language variables.
5. The method according to claim 2, wherein The performing fuzzification processing on data collected by at least two sensors on the movable device respectively includes: Taking the absolute values of the first linear velocity data, the first angular velocity data, the second linear velocity data, and the second angular velocity data respectively, and performing fuzzification processing on the first linear velocity data, the first angular velocity data, the second linear velocity data, and the second angular velocity data after taking the absolute values respectively.
6. The method according to claim 5, characterized in that Using a triangular membership function to fuzzify the first linear velocity data, the first angular velocity data, the second linear velocity data, and the second angular velocity data after taking the absolute values into multiple fuzzy language variables.
7. The method according to claim 2, characterized in that, The obtaining the system particle number according to the first correspondence and the second correspondence includes: Obtain the linear velocity particle number according to the first corresponding relationship, and obtain the angular velocity particle number according to the second corresponding relationship; If the linear velocity particle number is greater than the angular velocity particle number, use the linear velocity particle number as the system particle number, otherwise use the angular velocity particle number as the system particle number.
8. The method according to claim 1, characterized in that, The particle filtering process based on the initialized particles includes: Perform importance sampling on the initialized particles, sample to obtain n particles, and calculate the weights of each particle to obtain n first weights, where n is the system particle number; Resample the n particles according to the n first weights; Calculate the weights of the particles obtained by resampling to obtain a plurality of second weights; If the maximum value in the second weights reaches the weight threshold, update the position of the mobile device according to the particles obtained by resampling, otherwise return to the step of performing importance sampling on the initialized particles.
9. The method according to claim 6, wherein The multiple fuzzy linguistic variables include very large, large, small, and very small.
10. A mobile device, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1-9.
Citation Information
Patent Citations
Fuzzy logic controller
CA2163006A1
Particle filtering method and system and computer readable storage medium
CN109492769A