Vehicle position and pose prediction method and system based on fingerprinting visible light positioning

By using fingerprint-based visible light positioning technology, combined with neural networks and whale optimization algorithms, a mathematical relationship model between signal strength and vehicle relative position and attitude angle is established. This solves the problems of limited attitude adaptation, low accuracy, and blind spots in vehicle positioning, and achieves high-precision vehicle relative positioning and attitude prediction.

CN121805948BActive Publication Date: 2026-05-29SUZHOU UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU UNIV
Filing Date
2026-03-09
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing vehicle positioning technologies suffer from limitations in attitude adaptation, insufficient hardware bandwidth, low positioning accuracy, high ranging error, and blind spots. In particular, they struggle to achieve centimeter-level high precision and full coverage in relative vehicle positioning.

Method used

A visible light positioning method based on fingerprinting is adopted. By dividing the fingerprint region and constructing a fingerprint database, a mathematical relationship model between signal strength and vehicle relative position and attitude angle is established through neural network training and optimization. The whale optimization algorithm is introduced to optimize the network hyperparameters. Combined with an adjustable gain amplifier circuit, the real-time signal strength is obtained to realize vehicle relative positioning and attitude prediction.

Benefits of technology

It achieves centimeter-level accuracy in vehicle relative positioning, overcomes the problems of large positioning errors and blind spots, reduces system storage space consumption and deployment and maintenance costs, and enhances environmental adaptability and engineering practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121805948B_ABST
    Figure CN121805948B_ABST
Patent Text Reader

Abstract

The application relates to a vehicle position and attitude prediction method and system based on a fingerprint method visible light positioning, and belongs to the technical field of vehicle positioning. The method comprises the following steps: dividing fingerprint areas according to the signal coverage range of a vehicle-mounted visible light emitting device; wherein the fingerprint areas comprise multiple fingerprint position points; each fingerprint position point comprises multiple attitude angles; taking one of the attitude angles of one of the fingerprint position points as a fingerprint point; acquiring signal strength values on all the fingerprint points, establishing a fingerprint database, and preprocessing the database to obtain a standard fingerprint database; training the standard fingerprint database to construct a relationship model of the signal strength values and the relative position and attitude angle of the vehicle; acquiring real-time signal strength of a vehicle in front of the vehicle, and calculating the relative position and attitude angle of the current vehicle relative to the front vehicle according to the relationship model to complete relative positioning and attitude prediction of the vehicle. The application improves the accuracy and adaptability to complex scenes of vehicle-to-vehicle relative positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle positioning technology, and in particular to a method and system for predicting vehicle position and attitude based on visible light fingerprint positioning. Background Technology

[0002] In recent years, autonomous driving, intelligent connected vehicles, and advanced driver assistance systems (ADAS) have become the core directions of technological innovation in the automotive industry. Vehicle-to-vehicle (V2V) positioning technology, as a key foundation for the advanced applications of these systems, requires real-time and accurate acquisition of the relative position and attitude (angle) information between vehicles to provide data support for functions such as collision warning, cooperative lane changing, platooning, dynamic map building, and path planning. Because positioning errors are extremely sensitive during vehicle operation—even a few decimeters of error can cause a vehicle to deviate from its lane and even lead to collisions with vehicles or pedestrians in adjacent lanes—onboard positioning systems must achieve centimeter-level positioning accuracy.

[0003] Currently, the most widely used system in vehicle positioning is the Global Navigation Satellite System (GNSS). However, GNSS has inherent technical limitations. Its satellite signals attenuate severely in indoor, tunnel, and other obstructed environments, and it is susceptible to multipath interference, achieving only meter-level (approximately 10m) positioning accuracy, which is insufficient for the relative positioning requirements between vehicles. Even when GNSS is combined with an Inertial Measurement Unit (IMU), the positioning accuracy can be improved to the decimeter level, but it still falls short of the stringent requirement of centimeter-level positioning. To overcome the accuracy bottleneck of GNSS, researchers have gradually shifted their focus to vehicle-mounted sensor positioning technology, developing positioning solutions based on sensors such as cameras, radar, and lidar. Among them, cameras can expand the driver's field of vision and are widely used in scenarios such as parking assistance and driving recording. However, their own ranging and positioning capabilities are weak. Only binocular cameras can generate 3D images from multi-angle images to achieve positioning, and there are problems such as complex image matching algorithms and poor real-time performance. Radar achieves target ranging by measuring the round-trip time of radio waves, and the positioning accuracy is limited to the meter to decimeter level, which cannot meet the high-precision requirements. LiDAR emits multiple laser beams, combines signal strength and round-trip time to calculate the target distance and build a surrounding feature map. Relying on map matching algorithms, it can achieve long-distance centimeter-level positioning. However, it has the drawbacks of high power consumption, large system computing power requirements and expensive hardware costs, making it difficult to widely use.

[0004] Visible light positioning (VLP) technology originates from visible light communication (VLC) technology. It uses LED lights as signal transmitters and photodetectors to receive signals, simultaneously achieving lighting, communication, and positioning functions. Operating in the visible light band and easily integrated into existing lighting systems, VLP technology boasts significant advantages such as high bandwidth, low cost, low power consumption, and no electromagnetic interference, achieving centimeter-level positioning accuracy in indoor scenarios. However, existing indoor VLP technology cannot be directly transferred to vehicle positioning scenarios due to fundamental differences in channel transmission conditions, light source layout, and real-time requirements. More importantly, indoor VLP applications primarily focus on predicting target positions, with limited research addressing target attitude (angle) detection. In vehicle relative positioning, however, attitude information directly reflects the relative orientation between vehicles, serving as an indispensable core parameter for determining vehicle driving trends, implementing collision warnings, and path planning.

[0005] With the rapid development of visible light communication technology, it has been incorporated into the core components of 6G networks and is considered one of the important technological paths for future vehicle-to-vehicle communication. Based on this, the application of VLP technology in vehicle positioning has gradually attracted attention. However, related research is still in its early stages, and the technical solutions have many limitations. Existing VLP-based vehicle positioning solutions mainly suffer from the following technical defects: First, positioning schemes based on phase difference (PDoA), while achieving centimeter-level positioning accuracy, are strictly limited by the relative attitude of the vehicles, only applicable to scenarios where the two vehicles are parallel. Furthermore, to ensure the effectiveness of phase difference measurement, a high-frequency signal of 10-50MHz is required, but the bandwidth of onboard LEDs is limited, making this technical requirement difficult to meet. Second, ranging and positioning schemes based on time-of-flight (TOF) calculate the distance between the two vehicles using the round-trip time delay of the LED signal. However, due to the extremely high speed of light (1μs can propagate 300m), the signal propagation delay between the two vehicles is significant. The system processing delay is too short, resulting in a large ranging error. For example, the distance prediction error exceeds 10cm. Even with the correction through processing delay estimation, the ranging resolution within the 5-20 meter range is only about 25cm. Moreover, the micro-delay fluctuations in the system signal processing will further amplify the error. Thirdly, the positioning scheme based on the angle of arrival (AoA) uses a four-quadrant photodiode (QRX) to send signals through the headlights on both sides of the vehicle, resulting in a positioning blind spot near the vehicle. Simulation results show that centimeter-level positioning can only be achieved within 5 meters directly in front. The positioning accuracy in the lateral direction and beyond 5 meters drops sharply to the meter level or even 10 meters level, which cannot meet the needs of complex driving scenarios. Summary of the Invention

[0006] Therefore, the technical problem to be solved by the present invention is to overcome the defects of the existing vehicle positioning scheme, such as limited attitude adaptation, difficulty in meeting hardware bandwidth requirements, low positioning accuracy, high ranging error, and the existence of positioning blind spots.

[0007] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for predicting vehicle position and attitude based on visible light fingerprint localization, comprising:

[0008] S1. Divide the fingerprint region according to the signal coverage of the vehicle's on-board visible light emitting device; wherein, the fingerprint region includes multiple fingerprint location points; each fingerprint location point includes multiple attitude angles; and one of the attitude angles of one of the fingerprint location points is taken as the fingerprint point;

[0009] S2. Obtain the position coordinates, attitude angles, and signal strength values ​​of all the fingerprint points to establish a fingerprint database; preprocess each column vector of the signal strength set in the fingerprint database to obtain a standard fingerprint database; wherein, the signal strength set includes the signal strength values ​​of all the fingerprint points;

[0010] S3. Divide the standard fingerprint database into a training set, a validation set, and a test set; train the neural network structure using the training set; update the hidden layer structure of the current network structure using the validation set, and iteratively optimize the hidden layer structure of the network structure to obtain the optimal network structure; the optimal network structure is represented as [W]. * B * H * ], where W * B represents the weight matrix of the optimal network structure. * H represents the bias matrix of the optimal network structure. * The hidden layer structure represents the optimal network structure;

[0011] S4. Input the test set into the optimal network structure to obtain the predicted position coordinates and attitude angles of each fingerprint point in the test set; calculate the average positioning error and average attitude prediction error based on all the predicted position coordinates and attitude angles.

[0012] S5. Determine whether the average positioning error and the average attitude prediction error meet the preset requirements. If yes, obtain the mathematical relationship model between the signal strength value and the vehicle's relative position and attitude angle based on the optimal network structure. Otherwise, re-obtain the optimal network structure.

[0013] S6. Obtain the real-time signal strength of the on-board visible light emitting device of the vehicle in front of the vehicle, and obtain multiple sets of real-time signal strength values; calculate the relative position parameters and attitude angle of the current vehicle relative to the vehicle in front based on the multiple sets of real-time signal strength values ​​and the mathematical relationship model, and complete the vehicle relative positioning and attitude prediction.

[0014] In one embodiment of the present invention, step S2, which involves acquiring the signal strength values ​​of all the fingerprint points and establishing a fingerprint database, is as follows:

[0015] The center of the current vehicle's front taillight is taken as the origin of the coordinate system, the horizontal line of the current vehicle's front taillight is taken as the X-axis, and the normal of the current vehicle's front taillight is taken as the Y-axis; the angle between the normal of the current vehicle's front center and the X-axis is taken as the attitude angle; based on the X-axis, the Y-axis, and the attitude angle, the position coordinates and attitude information of each fingerprint point are obtained.

[0016] The signal strength value of the vehicle ahead at each fingerprint point is obtained using the detector of the current vehicle, and a signal strength vector is obtained;

[0017] A fingerprint vector for each fingerprint point is constructed based on the signal strength vector, the position coordinates, and the attitude information;

[0018] Obtain the fingerprint vectors of all the fingerprint points to construct a fingerprint database; wherein the expression for the fingerprint database is:

[0019] ;

[0020] in, Represents the fingerprint database. Indicates the first fingerprint vectors of fingerprint points; Indicates the first The location coordinates of each fingerprint point; Indicates the first The pose angle of each fingerprint point; Indicates the total number of fingerprint points; Indicates the first Signal strength values ​​of each fingerprint point; .

[0021] In one embodiment of the present invention, step S3 involves training the neural network structure using the training set; updating the hidden layer structure of the current network structure using the validation set; and iteratively optimizing the hidden layer structure of the network structure to obtain the optimal network structure.

[0022] S310. Randomly generate G hidden layer structures as the initial population; where G represents a positive integer;

[0023] S320. The G hidden layer structures are sequentially used as the hidden layer structures of the neural network. Based on the training set and the current hidden layer structure, the weight matrix and bias matrix of the current network structure are optimized using a neural network training method to obtain candidate structures with loss values ​​lower than a preset threshold.

[0024] S330. Input the verification set into the candidate structure and determine whether the hidden layer structure of the current candidate structure is better than the current optimal hidden layer structure. If so, use the hidden layer structure of the current candidate structure as the current optimal hidden layer structure; otherwise, do not update the current optimal hidden layer structure.

[0025] S340. Based on the current hidden layer structure and the current optimal hidden layer structure, the whale optimization method is used to generate the hidden layer structure in the next population.

[0026] S350, Repeat S320 to S340, after... The optimal network structure was obtained after verification of each population; among which Represents a positive integer.

[0027] In one embodiment of the present invention, step S330 involves inputting the verification set into the candidate structure and determining whether the hidden layer structure of the current candidate structure is superior to the current optimal hidden layer structure. If so, the hidden layer structure of the current candidate structure is adopted as the current optimal hidden layer structure; otherwise, the step of not updating the current optimal hidden layer structure is as follows:

[0028] The fingerprint data in the verification set is input into the candidate structure, and the forward propagation process of the neural network is performed to obtain the second position coordinate prediction value and the second attitude angle prediction value corresponding to each fingerprint point; the fitness is calculated based on all the second position coordinate prediction values ​​and the second attitude angle prediction values.

[0029] Determine whether the fitness of the current candidate structure is lower than the optimal fitness. If so, the hidden layer structure of the current candidate structure is taken as the current optimal hidden layer structure; otherwise, the current optimal hidden layer structure is not updated.

[0030] In one embodiment of the present invention, step S340, which involves generating the next hidden layer structure in the population using the whale optimization method based on the current hidden layer structure and the current optimal hidden layer structure, is as follows:

[0031] Multiple random numbers are randomly generated, and a first control parameter, a second control parameter, and a third control parameter are calculated based on the multiple random numbers and the current population; wherein, the multiple random numbers include the first random number;

[0032] Based on the magnitudes of the first random number and the second control parameter, a strategy for updating the hidden layer structure of the next population is determined; based on the currently selected update strategy, the hidden layer structure in the next population is obtained; wherein, the update strategy includes a first update strategy, a second update strategy, and a third update strategy; the expression for the first update strategy is:

[0033] ;

[0034] The expression for the second update strategy is:

[0035] ;

[0036] The expression for the third update strategy is:

[0037] ;

[0038] in, This represents the hidden layer structure of the next population. This represents the current optimal hidden layer structure. Indicates the current hidden layer structure. This indicates the second control parameter. This represents the third control parameter. Represents the helical constant. Represents a random constant. The symbol for pi.

[0039] In one embodiment of the present invention, step S320, which involves optimizing the weight matrix and bias matrix of the current network structure using a neural network training method based on the training set and the current hidden layer structure to obtain candidate structures with loss values ​​lower than a preset threshold, is as follows:

[0040] The forward propagation structure of the neural network includes an input layer, multiple hidden layers, and an output layer. Each signal intensity vector in the training set is sequentially input into the input layer to obtain a first feature set. The first feature set is input into the multiple hidden layers to obtain a second feature set. The second feature set is input into the output layer to obtain a first position coordinate prediction value and a first pose angle prediction value corresponding to each fingerprint point.

[0041] Based on the predicted first position coordinates and predicted first attitude angles of all fingerprint points obtained from the training set, calculate the loss value for this forward prediction.

[0042] If the loss value is lower than a preset threshold, the network structure trained this time is used as a candidate structure; otherwise, backpropagation is performed on the network structure trained this time, and the weight matrix and bias matrix of the network structure trained this time are continuously updated until the loss value is lower than the preset threshold and backpropagation stops.

[0043] In one embodiment of the present invention, the steps of inputting the first feature set into the plurality of hidden layers to obtain a second feature set, and inputting the second feature set into the output layer to obtain the first position coordinate prediction value and the first pose angle prediction value corresponding to each fingerprint point are as follows:

[0044] Calculate the first hidden layer based on the first feature set. There are 10 neurons; wherein the expression of a neuron is:

[0045] ;

[0046] in, Indicates the first hidden layer. One neuron, This indicates the number of corresponding vectors in each signal strength vector; Indicates the first Hidden layer (1≤ ≤ ) neurons to the 1st Layer (1≤ ≤ The connection weights of ) neurons; This represents the total number of neurons in the first hidden layer; In the first feature set, the first... A signal intensity vector; This indicates the first hidden layer. One bias;

[0047] The features output from the first hidden layer are processed sequentially through the remaining hidden layers to obtain the second feature set; wherein, the calculation formula for each neuron in the remaining hidden layers is:

[0048] ;

[0049] in, Indicates the first Hidden layer One neuron, Indicates the first The first hidden layer One bias;

[0050] The second feature set is input into the output layer to obtain the first position coordinate prediction value and the first attitude angle prediction value corresponding to each fingerprint point.

[0051] In one embodiment of the present invention, the network structure trained this time is backpropagated to continuously update the weight matrix and bias matrix of the network structure trained this time, wherein the output layer and the first The update formula for weights and biases between hidden layers is:

[0052] ;

[0053] ;

[0054] No. The update formula for the weights and biases of the hidden layer is:

[0055] ;

[0056] ;

[0057] in, This indicates the total number of hidden layers. Indicates the updated number -1 hidden layer The first neuron to the second Layer The connection weights of each neuron; Indicates the first -1 hidden layer The first neuron to the second Layer The unupdated weights of the neurons; Indicates the learning rate; Indicates the updated number Hidden layer Bias of each neuron Indicates the number that has not been updated. Hidden layer Bias of each neuron; Indicates the loss value. This represents the total number of fingerprint points in the training set. Indicates the first in the output layer The actual output value corresponding to each neuron. This indicates the hidden layer L in the network after forward propagation. The predicted output value of each neuron.

[0058] In one embodiment of the present invention, the expression of the mathematical relation model is:

[0059] ;

[0060] in, Representing a mathematical relational model, Indicates the first Weight matrices, Indicates the first A bias matrix , Indicates the first The standard signal strength vector of each fingerprint point This represents the activation function.

[0061] In one embodiment of the present invention, step S6, which involves using a detector and an adjustable gain amplifier circuit to obtain the real-time signal strength of the onboard visible light emitting device of the vehicle in front of the vehicle, and obtaining multiple sets of real-time signal strength values, is as follows:

[0062] The detector receives the mixed light signal from the visible light emitting device on the vehicle in front and converts the mixed light signal into a current signal.

[0063] The current signal is converted into a voltage signal, the voltage signal is filtered, and then amplified using an adjustable gain amplifier circuit to obtain a preprocessed signal. The adjustable gain amplifier circuit adjusts its gain value based on the maximum sampling value of the mixed optical signal. If the maximum sampling value exceeds an upper threshold, the circuit gain value is reduced; if the maximum sampling value is below a lower threshold, the circuit gain value is increased.

[0064] The preprocessed signal is sampled and subjected to a fast Fourier transform to obtain the amplitude values ​​at multiple frequency points as the signal strength values ​​of the vehicle in front, thus obtaining multiple sets of real-time signal strength values.

[0065] Secondly, to solve the above-mentioned technical problems, the present invention provides a vehicle position and attitude prediction system based on fingerprint-based visible light positioning, used to implement the above-mentioned vehicle position and attitude prediction method based on fingerprint-based visible light positioning, comprising:

[0066] A segmentation module is used to segment a fingerprint region based on the signal coverage of the vehicle's onboard visible light emitting device; wherein, the fingerprint region includes multiple fingerprint location points; each fingerprint location point includes multiple pose angles; and one of the pose angles of one of the fingerprint location points is used as a fingerprint point;

[0067] A database construction module is used to obtain the position coordinates, attitude angles, and signal strength values ​​of all the fingerprint points to establish a fingerprint database; and to preprocess each column vector of the signal strength set in the fingerprint database to obtain a standard fingerprint database; wherein, the signal strength set includes the signal strength values ​​of all the fingerprint points;

[0068] The network structure optimization module is used to divide the standard fingerprint database into a training set, a validation set, and a test set; train the neural network structure using the training set; update the hidden layer structure of the current network structure using the validation set; and iteratively optimize the hidden layer structure of the network structure to obtain the optimal network structure; the optimal network structure is represented as [W]. * B * H * ], where W * B represents the weight matrix of the optimal network structure. *H represents the bias matrix of the optimal network structure. * The hidden layer structure represents the optimal network structure;

[0069] The relationship construction module is used to input the test set into the optimal network structure to obtain the predicted position coordinates and attitude angles of each fingerprint point in the test set; calculate the average positioning error and average attitude prediction error based on all the predicted position coordinates and attitude angles; determine whether the average positioning error and average attitude prediction error meet preset requirements; if so, obtain the mathematical relationship model between the signal strength value and the vehicle's relative position and attitude angle based on the optimal network structure; otherwise, re-acquire the optimal network structure.

[0070] The prediction module is used to obtain the real-time signal strength of the on-board visible light emitting device of the vehicle in front of the vehicle, and obtain multiple sets of real-time signal strength values; based on the multiple sets of real-time signal strength values ​​and the mathematical relationship model, the relative position parameters and attitude angle of the current vehicle relative to the vehicle in front are calculated, and the relative positioning and attitude prediction of the vehicle are completed.

[0071] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:

[0072] (1) The vehicle position and attitude prediction method and system based on fingerprint visible light positioning described in this invention establishes a mapping relationship between the received signal strength and the relative position and attitude angle of the vehicle by constructing a fingerprint database; then, a neural network is used for nonlinear modeling, and a whale optimization algorithm is introduced to globally optimize the network hyperparameters, so as to achieve centimeter-level positioning accuracy of the rear vehicle relative to the front vehicle, effectively overcoming the defects of existing technologies such as large positioning error and difficulty in meeting the high precision requirements of autonomous driving and ADAS systems.

[0073] (2) The present invention uses a neural network algorithm to train the mapping relationship between signal strength and position coordinates and angle in the fingerprint database into a mathematical relationship model. The vehicle system only needs to store the mathematical model, without storing the dense fingerprint database. This greatly reduces the consumption of storage space in the vehicle system and further improves the applicability of the present invention.

[0074] (3) The present invention designs an adjustable gain amplifier circuit at the vehicle receiver end, which can ensure that no saturation distortion occurs at close range and the signal strength information is lost, and can also ensure a wide range of signal coverage. At the same time, it maintains high sensitivity of signal strength as position and angle change within the range, so as to achieve high positioning accuracy.

[0075] (4) The present invention adopts a strategy of one-time offline modeling and multi-vehicle universal adaptation, which significantly reduces the system deployment and maintenance costs. By scientifically planning the fingerprint area and sampling point distribution, it achieves full coverage of distances of more than 5 meters and various relative posture scenarios, eliminates positioning blind spots, and enhances environmental adaptability and engineering practicality. Attached Figure Description

[0076] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0077] Figure 1 This is a flowchart of a vehicle position and attitude prediction method based on visible light positioning using fingerprinting, according to a preferred embodiment of the present invention.

[0078] Figure 2 This is a schematic diagram of the vehicle-to-vehicle positioning state in a preferred embodiment of the present invention;

[0079] Figure 3 This is a schematic diagram of the functional components of the vehicle receiver in a preferred embodiment of the present invention;

[0080] Figure 4 This is a schematic diagram illustrating the relationship between the offline modeling stage and the online positioning stage in a preferred embodiment of the present invention;

[0081] Figure 5 This is a schematic diagram of offline fingerprint acquisition in a preferred embodiment of the present invention;

[0082] Figure 6 This is a schematic diagram of the neural network structure in a preferred embodiment of the present invention;

[0083] Figure 7 This is a schematic diagram of the transmitting end structure of the hardware experimental platform in a preferred embodiment of the present invention;

[0084] Figure 8 This is a schematic diagram of the receiving end structure of the hardware experimental platform in a preferred embodiment of the present invention;

[0085] Figure 9 This is a schematic diagram of the performance of the programmable gain amplifier circuit of the hardware experimental platform in a preferred embodiment of the present invention;

[0086] Figure 10 This is a fingerprint point distribution diagram in a preferred embodiment of the present invention;

[0087] Figure 11 This is a schematic diagram comparing the predicted position and attitude with the actual values ​​in a preferred embodiment of the present invention;

[0088] Figure 12 This is a box plot of position and attitude error in a preferred embodiment of the present invention. Detailed Implementation

[0089] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0090] Example 1:

[0091] Reference Figure 1 As shown, this embodiment of the invention provides a vehicle position and attitude prediction method based on visible light fingerprint localization, including but not limited to the following steps:

[0092] S1. Divide the fingerprint region according to the signal coverage of the vehicle's on-board visible light emitting device; wherein, the fingerprint region includes multiple fingerprint location points; each fingerprint location point includes multiple pose angles; one pose angle of one fingerprint location point is taken as the fingerprint point;

[0093] S2. Obtain the position coordinates, attitude angles, and signal strength values ​​of all fingerprint points to establish a fingerprint database; preprocess each column vector of the signal strength set in the fingerprint database to obtain a standard fingerprint database; wherein, the signal strength set includes the signal strength values ​​of all fingerprint points;

[0094] S3. Divide the standard fingerprint database into training, validation, and test sets; train the neural network structure using the training set; update the hidden layer structure of the current network structure using the validation set, and iteratively optimize the hidden layer structure to obtain the optimal network structure; the optimal network structure is represented as [W]. * B * H * ], where W * B represents the weight matrix of the optimal network structure. * H represents the bias matrix of the optimal network structure. * The hidden layer structure represents the optimal network structure;

[0095] S4. Input the test set into the optimal network structure to obtain the predicted position coordinates and attitude angles for each fingerprint point in the test set; calculate the average positioning error and average attitude prediction error based on all the predicted position coordinates and attitude angles.

[0096] S5. Determine whether the average positioning error and average attitude prediction error meet the preset requirements. If yes, obtain the mathematical relationship model between the signal strength value and the vehicle's relative position and attitude angle based on the optimal network structure. Otherwise, re-obtain the optimal network structure.

[0097] S6. Obtain the real-time signal strength of the on-board visible light emitting device of the vehicle in front of the vehicle, and obtain multiple sets of real-time signal strength values; based on the multiple sets of real-time signal strength values ​​and mathematical relationship model, calculate the relative position parameters and attitude angle of the current vehicle relative to the vehicle in front, and complete the vehicle relative positioning and attitude prediction.

[0098] This invention discloses a vehicle position and attitude prediction method based on visible light fingerprint positioning. Through fingerprint database construction and neural network algorithm modeling, combined with whale optimization algorithm to optimize the network structure, it can accurately establish a mathematical relationship model between signal strength and the relative position and attitude angle of the vehicle. This achieves centimeter-level positioning accuracy of the following vehicle relative to the preceding vehicle, effectively solving the problems of large positioning errors and difficulty in meeting the requirements of autonomous driving and ADAS systems in existing technologies. The embodiments of this invention achieve synchronous and accurate acquisition of the vehicle's relative position and attitude angle by setting multiple angles as attitude information at fingerprint points. This overcomes the deficiency of existing VLP technology, which only focuses on position prediction and ignores attitude information, providing key data support for advanced applications such as collision warning and path planning, and enhancing the practicality and reliability of the vehicle positioning system. Furthermore, the embodiments of this invention target the same type of vehicle-mounted visible light emitting device, whose radiation characteristics are consistent. Only one offline modeling is required in the automotive factory, and the established model can be universally adapted to all vehicles corresponding to this type of device, significantly reducing the workload of repeated modeling and lowering the deployment and maintenance costs of the vehicle positioning system. This invention achieves comprehensive coverage of the relative position and posture of vehicles by reasonably setting fingerprint areas and fingerprint points. It can adapt to complex positioning scenarios with different relative postures of two vehicles and distances of more than 5 meters, effectively avoiding the positioning blind spot problem existing in the prior art and improving the system's scenario adaptability.

[0099] This embodiment uses the VLP fingerprint method to achieve relative positioning and attitude prediction between vehicles. (Refer to...) Figure 2 As shown, the visible light signal is emitted by the LED lights at the rear of the front vehicle, and a photodiode (PD) is placed at the center point of the front of the rear vehicle to receive the signal. The Y-axis is the normal to the center of the rear of the front vehicle, and the X-axis is the horizontal line at the top of the rear. The coordinates of the detector's location are... The angle between the center normal of the rear vehicle's front end and the X-axis is... This value reflects the attitude (angle) of the following vehicle relative to the preceding vehicle. During driving, the rear vehicle detector continuously collects signal strength information emitted by the LEDs of the preceding vehicle. The vehicle control system (ECU) establishes a mathematical relationship model based on the VLP fingerprint method provided in this embodiment to calculate the position and attitude coordinates of the following vehicle in real time. Based on this information, and combined with the vehicle body structure, the onboard controller can achieve functions such as collision warning and map building.

[0100] Specifically, in this embodiment, the vehicle's onboard visible light emitting device (i.e., the transmitter) is designed. (Refer to...) Figure 2 As shown, the LED transmitter at the rear of the vehicle is divided into four parts, denoted as LED1, LED2, LED3, and LED4. Each LED segment uses on / off keying (OOK) modulation to transmit square wave signals of different frequencies, denoted as f1, f2, f3, and f4, respectively. This provides the receiver with multiple signal sources to achieve positioning.

[0101] Existing VLP-based vehicle positioning methods often use headlights at the front or rear of the vehicle to send signals. This has two limitations: first, the radiation angle of the headlights is limited, creating a positioning blind spot in the middle; second, headlights are only turned on during braking and nighttime driving, limiting the system's operating time. Activating headlights for positioning would conflict with existing lighting or warning functions and consume more energy. Therefore, this embodiment uses daytime running lights (DRUs), which are increasingly common in modern vehicles, to send signals. The DRU light strip runs across the rear of the vehicle and bends towards both sides, significantly increasing the signal radiation range compared to headlights and eliminating the middle positioning blind spot. The DRUs remain illuminated throughout the vehicle's operation, thus the positioning function does not generate additional power consumption. Furthermore, the DRUs offer flexible installation options, accommodating both lighting and positioning needs.

[0102] Furthermore, the vehicle's receiver is designed. To extend the positioning range so that the following vehicle can receive signals from at least the left, center, and right lanes ahead, this embodiment employs two detectors (each including a photodiode), PD1 and PD2, at the vehicle's receiver. These are positioned at a 90° angle to the vehicle's center point, with the included angle's midline being the vehicle's central normal. Figure 3 As shown, the two detectors (PDs) employ identical but independent signal processing circuits at their back ends, connected to different ports of the vehicle control system. First, the PD receives the mixed light signals from the four LEDs of the preceding vehicle, converts them into current signals, and then converts them into voltage signals via the conversion circuit IV. The voltage signals are then filtered by a band-pass filter to remove noise and interference, and amplified by a programmable gate amplifier (PGA) before entering the vehicle control system ECU. In the ECU, the signal is sampled by an ADC and subjected to a Fast Fourier Transform (FFT). The amplitude values ​​at four frequency points (f1, f2, f3, and f4) are taken as the corresponding LED signal strength values ​​(RSS values), thus separating the four LED signals.

[0103] The design of each functional component of the receiver in this embodiment plays a crucial role in the superiority of the subsequent vehicle position and attitude prediction method. First, the receiver employs a bandpass filter circuit to physically remove the DC signal from sunlight, low-frequency interference signals from other light sources, and high-frequency noise in the circuit. Second, FFT operations are used to separate the LED signals, effectively filtering them again in the frequency domain. Furthermore, the ECU uses a mean filtering method, taking the average of s instantaneous FFT sampling values ​​as the measured signal strength value corresponding to the LED, further eliminating noise-induced jitter and effectively ensuring signal stability under different indoor and outdoor lighting conditions.

[0104] Because of the extremely high speed of light, minute changes in distance are difficult to measure using the propagation time of the light signal. Therefore, VLP (Vehicle Positioning Program) methods based on time difference and phase difference suffer from large positioning errors at close range. However, according to the Lambert model, the intensity of a light signal is inversely proportional to the square of the distance between the transmitting and receiving ends and directly proportional to the cosine of the incident and emission angles. Therefore, the received signal strength decreases rapidly with increasing distance and angle. For example, moving from 0m to 2m along the center normal of the vehicle in front, the original (unamplified) signal strength drops rapidly from 500mV to 30mV. This high sensitivity of signal strength to distance (position) is the foundation for the high-precision positioning achieved by VLP fingerprinting. However, if the amplification circuit uses a fixed gain and a large gain value is selected to ensure signal transmission over long distances, the received signal will reach its upper voltage limit within a short range, resulting in saturation distortion and preventing close-range positioning. Conversely, if a small gain value is chosen, the signal transmission range is reduced, making long-range positioning impossible. Therefore, this embodiment designs a programmable amplifier (PGA) circuit and a dynamic gain control algorithm, with the goal of ensuring that the signal strength remains constant over a large area. Between, and with high sensitivity to changes in position and distance, among which Indicates the lower limit threshold. This represents the upper limit threshold. It enables the range from near distance (0m) to far distance (D). max Large-scale, high-precision ranging. Among them, D... max It depends on the LED's emission power, the detector PD gain, and the PGA's maximum gain.

[0105] In this embodiment, although the amplification circuits of the two PDs use the same gain control algorithm, they operate independently. Initially, the gain values ​​of both channels are set to 1, i.e. Taking the PD1 detector as an example, first, the maximum sample value rss_max of the four LED signals is taken, and the gain is adjusted based on this value. If rss_max exceeds the upper limit threshold... Then reduce the gain. This is to prevent signal strength from reaching the upper voltage limit at close range, causing saturation distortion and thus losing distance information at close range. If rss_max is below the lower threshold... Then it is necessary to increase the circuit gain. This amplifies weak signals at long distances, increases signal coverage, and ensures positioning accuracy at long distances. If rss_max is within... If the gain remains constant, then the current gain will remain unchanged.

[0106] Furthermore, to accurately reflect distance information, the final signal strength output by the algorithm is a normalized value, which is the measured signal strength value divided by the current amplifier gain.

[0107] The vehicle position and attitude prediction method based on fingerprint-based visible light positioning described in this embodiment includes two stages: offline modeling and online positioning. Figure 4 As shown. The offline phase is completed in the vehicle factory. Since the radiation characteristics of the LED light strips are the same for a particular vehicle model, only one offline modeling is needed, and the model is universal. The online positioning phase is mainly completed in real-time by the onboard system at the detector end while the vehicle is in motion. Two detectors (PDs) measure the real-time signal strength from the four LEDs of the preceding vehicle, generating a total of eight sets of RSS values. These values ​​are then substituted into a pre-stored positioning mathematical model (i.e., a mathematical relationship model) to calculate the current vehicle's position relative to the preceding vehicle. and attitude angle This allows for vehicle positioning and attitude prediction. The positioning information can be integrated into the vehicle system to generate a real-time relative position diagram of the two vehicles based on the vehicle's structural design, providing crucial positioning information for algorithms such as vehicle collision detection.

[0108] In this embodiment, the offline stage includes offline database construction (i.e., steps S1 to S2) and data modeling (i.e., steps S3 to S5). The online positioning stage includes obtaining the real-time signal strength of the vehicle in front of the current vehicle and calculating the position coordinates and attitude angle of the current vehicle relative to the vehicle in front (i.e., step S6).

[0109] Specifically, in step S1, a fingerprint region is defined within the coverage area of ​​the vehicle's visible light emitting device's headlights, and fingerprint location points within the fingerprint region are determined. Multiple angles (poses) are set at each fingerprint location point as pose information, and a specific pose at a given location is used as a fingerprint point. The RSS values ​​from each LED are collected from all fingerprint points to establish a fingerprint database. .

[0110] Specifically, in step S2, the fingerprint database is trained using a BP neural network algorithm. The fingerprint data is used to establish a mathematical model relating signal strength values ​​to the vehicle's relative position and attitude angle. Ultimately, the established mathematical relationship model can be... The information is stored in the vehicle positioning system at the receiving end (detector).

[0111] Further, in step S2, the specific steps for obtaining the signal strength values ​​of all fingerprint points and establishing the fingerprint database are as follows:

[0112] S210. Take the center of the front taillight of the current vehicle as the origin of the coordinate system, the horizontal line of the front taillight of the current vehicle as the X-axis, and the normal of the front taillight of the current vehicle as the Y-axis; take the angle between the normal of the front center of the current vehicle and the X-axis as the attitude angle; and obtain the position coordinates and attitude information of each fingerprint point based on the X-axis, Y-axis and attitude angle.

[0113] Specifically, refer to Figure 5 As shown, B fingerprint location points are set within the radiation areas of the four headlights LED1, LED2, LED3, and LED4. A angles are assigned to each fingerprint location point to represent the posture. Using a specific angle at a given location point as a fingerprint point, the fingerprint database contains a total of [number missing]. One fingerprint information. With the center of the headlight as the origin, the horizontal line as the X-axis, and the normal line as the Y-axis. ( The coordinates of the fingerprint points are This setting incorporates the distance information between the detector and the vehicle lights into the coordinate values, enabling subsequent neural network algorithms to more efficiently capture the spatial variation of the signal and improve the model's perception accuracy and generalization ability regarding location information. The posture angle of each fingerprint point Let be the angle between the normal to the center point of the rear vehicle and the X-axis, representing the attitude of the rear vehicle relative to the front vehicle. Therefore, the first... Each fingerprint point is formed by Unique identifier.

[0114] S220. Use the detector of the current vehicle to obtain the signal strength value of the vehicle ahead at each fingerprint point, and obtain the signal strength vector.

[0115] Specifically, for the first For each fingerprint point, the vehicle control system collects the signal strength values ​​measured by two detectors to obtain a signal strength vector. The first four groups are the signal strengths from LED1 to LED4 measured by detector PD1, while the last four groups are the corresponding measurement results of detector PD2.

[0116] S230. Based on the signal strength vector, position coordinates, and attitude information, construct the fingerprint vector for each fingerprint point. The specific expression for the fingerprint vector is as follows:

[0117] .

[0118] S240, Get All The fingerprint vectors of 10 fingerprint points are used to construct a fingerprint database; the expression for the fingerprint database is:

[0119] ;

[0120] in, Represents the fingerprint database. Indicates the first fingerprint vectors of fingerprint points; Indicates the first The location coordinates of each fingerprint point; Indicates the first The pose angle of each fingerprint point; Indicates the total number of fingerprint points; Indicates the first Signal strength values ​​of each fingerprint point; .

[0121] Existing VLP fingerprinting methods primarily predict the location coordinates of target points for indoor positioning. However, this embodiment differs from indoor positioning; V2V positioning requires simultaneous prediction of both location coordinates and relative pose. Furthermore, at each fingerprint location, eight sets of RSS values ​​for two PDs need to be measured at multiple angles (e.g., 10 angles in subsequent experiments), and the radiation range of vehicle lights (i.e., the fingerprint area) is typically larger than that of indoor lighting. Therefore, compared to fingerprint databases used for typical indoor positioning, the fingerprint database for V2V positioning in this embodiment is orders of magnitude larger, and the fingerprint feature dimensions are also more complex. In addition, existing fingerprint matching algorithms used for indoor positioning struggle to achieve multi-dimensional feature fusion of coordinates, angles, and RSS values, and also struggle to capture the complex nonlinear mapping relationship between RSS values ​​and location / angle in large-scale data scenarios. Therefore, this embodiment proposes a fingerprint database modeling method based on a BP neural network (BPNN), and uses the Whale Optimization Algorithm (WOA algorithm) to optimize the network structure. The BP neural network, as a classic implementation of deep neural networks (DNN), possesses excellent nonlinear mapping capabilities and can deeply mine high-dimensional massive data. Furthermore, the neural network can ultimately train the fingerprint database into a mathematical relational model and store it in the vehicle control system, significantly reducing the amount of data stored compared to storing the original fingerprint database. The fingerprint database modeling structure based on the BP neural network is as follows: Figure 6 As shown, it mainly consists of five parts: data preprocessing, forward propagation of BP neural network, backward propagation of BP neural network, network structure optimization, and model evaluation.

[0122] Specifically, for data preprocessing, the neural network in this embodiment uses the signal strength set in the fingerprint database. As input features, according to the Lambertian transmission model, the intensity of the LED radiated signal is inversely proportional to the square of the distance and directly proportional to the cosine of the incident angle and the radiation angle. Therefore, the RSS value decays rapidly with increasing distance and angle. Referring to Table 1, which compares the RSS values ​​before and after standardization, Table 1 shows the variation of the LED1 signal intensity measured by detector PD1 along the Y-axis from 0m to 2m in the fingerprint database established by the subsequent experimental platform in this embodiment, as well as the variation of the RSS value at different angles (attitudes) at the same location. It can be seen that the RSS value varies greatly even within a small range. If the original fingerprint database... When RSS data is directly input into a BP neural network, the network becomes overly sensitive to features with large numerical ranges, and the learning weights of small numerical features are severely compressed, leading to an imbalance in feature contribution. This, in turn, causes oscillations in the training process, slow convergence speed, and ultimately affects the accuracy of subsequent position coordinate and angle predictions.

[0123] Table 1:

[0124]

[0125] Therefore, this embodiment employs the min-max normalization method to map RSS features to a uniform numerical range, thereby balancing the contribution weights of features of different magnitudes. This embodiment uses a fingerprint database. The RSS column vectors (for the same LED and the same detector PD) are standardized, and the standardization method is the same for each column. Therefore, step S250 is included after step S240.

[0126] S250, the signal strength set in the fingerprint database The specific steps for preprocessing each column vector to obtain the standard fingerprint database are as follows:

[0127] S251. Obtain the signal strength set from the fingerprint database. The minimum and maximum values ​​of each column vector; where the expression for the signal strength set is:

[0128] ;

[0129] ;

[0130] in, Represents the set of signal strengths. Indicates the first The signal strength vector of each fingerprint point.

[0131] S252. Determine the lower and upper limits of the target standardization interval for each column vector; calculate the preprocessed signal strength value of the signal strength value in each column vector based on the minimum, maximum, lower and upper limits corresponding to each column vector.

[0132] S253. Replace each signal strength value in the signal strength set with the corresponding preprocessed signal strength value to obtain the standard fingerprint database. The standard fingerprint database... The expression is:

[0133] ;

[0134] ;

[0135] ;

[0136] in, Indicates the first The standard signal strength vector of each fingerprint point This represents the signal strength value after preprocessing.

[0137] Furthermore, with the first column (i.e., detector PD1 in) Taking the RSS value of LED1 measured from each fingerprint point as an example, step S250 is described in detail. The specific steps are as follows:

[0138] Step 1: Get the minimum value in the first column and maximum value . No. Original signal strength at each fingerprint point After preprocessing, it becomes:

[0139] ;

[0140] in, and These represent the lower and upper limits of the target standardization interval; in this embodiment, they are preferably -1 and 1. It should be noted that the signal strength set... The calculation formulas for each column are the same. The calculated signal strength is then replaced with the original signal strength to obtain the standard fingerprint database.

[0141] Step 2: Save the RSS extreme value vector (i.e., the minimum and maximum values ​​of each column), the upper limit vector and the lower limit vector of the target standardized interval for each column.

[0142] Furthermore, the expression for the RSS extremum vector is:

[0143] ;

[0144] ;

[0145] in, This represents the minimum value vector, which contains the minimum value in each column vector; This represents the maximum value vector, which contains the maximum value in each column vector.

[0146] Furthermore, the expressions for the upper and lower bound vectors of the target standardized interval are:

[0147] ;

[0148] ;

[0149] in, This represents the upper bound vector, which contains the upper bound of each column vector; This represents the lower bound vector, which contains the lower bound of each column vector.

[0150] This embodiment provides a unified standardized benchmark for the RSS signals acquired in real time during the subsequent online positioning stage after preprocessing in step S250. This ensures that the input feature data maintains the same scale range as the offline training stage, thereby guaranteeing the accuracy of positioning and attitude prediction.

[0151] Specifically, in this embodiment, step S3, training the fingerprint data in the standard fingerprint database, includes the forward propagation process of the BP neural network, the backward propagation process of the BP neural network, and network structure optimization. Steps S4 and S5 include model evaluation, and the finally trained optimal network structure is used as the mathematical relation model. The overall process from steps S3 to S5 is as follows: Figure 6 As shown.

[0152] Furthermore, referring to Figure 6 As shown, in step S3, the standard fingerprint database obtained after preprocessing in step S250 is... Divided into training set Φ trn , Validation set Φ val and test set Φ tst These are used for BP neural network training, network structure optimization, and model evaluation, respectively.

[0153] Further, in step S3, the network structure of the neural network is trained using the training set; the hidden layer structure of the current network structure is updated using the validation set; and the hidden layer structure of the network structure is iteratively optimized to obtain the optimal network structure. The specific steps are as follows:

[0154] S310. Randomly generate G hidden layer structures as the initial population; where G represents a positive integer. Specifically, this includes: setting the number of neurons in each layer (i.e., the number of hidden layer structures). Elements The upper limit of ) is The lower limit is In the initial state, it is first randomly generated. Hidden layer structure ( ), as the first group, in which the number of neurons per layer ( )for[ , A random number between [ ] and [ ]. Then, the G hidden layer structures are sequentially [ ]. As the hidden layer structure of a BP neural network, it is involved in the training process, the validation process, and the structure optimization process, respectively.

[0155] S320. During the training process, based on the training set Φ trn fingerprint data and current hidden layer structure The weight matrix and bias matrix of the current network structure are optimized using a neural network training method to obtain candidate structures with loss values ​​lower than a preset threshold. The specific steps are as follows:

[0156] S321. Perform the forward propagation process for the BP neural network. The forward propagation structure of the neural network includes an input layer, multiple hidden layers, and an output layer. The training set Φ... trn Each signal strength vector in The features are sequentially input into the input layer to obtain a first feature set; the first feature set is then input into multiple hidden layers to obtain a second feature set; the second feature set is then input into the output layer to obtain the predicted first position coordinates and the predicted first attitude angle for each fingerprint point. In this embodiment, the signal strength vector... The data is sequentially input into the input layer, with each RSS value corresponding to a neuron; therefore, the input layer always contains 8 neurons. The output layer always contains 3 neurons, each corresponding to the trained RSS value. Coordinates and orientation of each fingerprint point .

[0157] Furthermore, considering the computing power of the ECU in the experimental platform and combining a large amount of training results, this embodiment selects... The hidden layer structure effectively balances model performance and hardware capabilities. Let the hidden layer structure vector be... , Indicates the first Number of neurons in a layer. Let Indicates the input layer. Represents the output layer. In the... -1st floor and the There are weight matrices between layers. Its expression is:

[0158] ;

[0159] in, Indicates the first -1st floor ( ) neurons to the 1st Layer ( The connection weights of the )th neuron. Layer neuron vector is Each neuron corresponds to a bias , No. The layer bias vector is denoted as , This represents the matrix transpose symbol.

[0160] Furthermore, the specific steps of the forward propagation process for the BP neural network are as follows:

[0161] S3211. Calculate the first hidden layer based on the first feature set output by the input layer (8 neurons). There are neurons; where the expression for a neuron is:

[0162] ;

[0163] in, Indicates the first hidden layer. One neuron, This represents the number of corresponding vectors in each signal strength vector, in this embodiment... ; This represents the total number of neurons in the first hidden layer; In the first feature set, the first... A signal intensity vector; This indicates the first hidden layer. One bias.

[0164] S3212. The features output from the first hidden layer are processed sequentially through the remaining hidden layers to obtain the second feature set; wherein, the calculation formula for each neuron in the remaining hidden layers is:

[0165] ;

[0166] in, Indicates the first Hidden layer One neuron, Indicates the first The first hidden layer One bias.

[0167] Furthermore, the hyperbolic tangent function is employed. As an activation function, it is used to perform nonlinear transformations. The formula for calculating the activation function is:

[0168] ;

[0169] in, Represents the exponent symbol.

[0170] S3213. Input the second feature set into the output layer to obtain the first position coordinate prediction value and the first attitude angle prediction value corresponding to each fingerprint point.

[0171] Specifically, the signal intensity vector of the input layer After five hidden layers, the corresponding coordinate and angle prediction values ​​are generated in the output layer. The specific expression is as follows:

[0172] ;

[0173] ;

[0174] ;

[0175] in, This represents the first predicted position coordinate obtained from the training set. This indicates that the predicted first attitude angle is obtained from the training set.

[0176] S322, Based on the training set Φ trn The predicted first position coordinates and first attitude angles of all obtained fingerprint points are used to calculate the loss value for this forward prediction. The expression for the loss function used to calculate the loss value is:

[0177] ;

[0178] in, Indicates the loss value. The training set Φ represents trn The total number of fingerprint points, Indicates the first The predicted first location coordinates of each fingerprint point Indicates the first training set The actual location coordinates of each fingerprint point Indicates the first The first pose angle prediction value of each fingerprint point Indicates the first training set The true value of the pose angle of each fingerprint point.

[0179] The loss function described in this embodiment is the coordinates and angles predicted by the current network structure. Between and actual values The mean square error (MSE) describes the accuracy of the current network structure parameters.

[0180] S323. Determine whether the loss value is lower than a preset threshold. If so, use the network structure of the neural network model trained this time as a candidate structure; otherwise, perform backpropagation on the network structure trained this time and continuously update the weight matrix of the neural network model trained this time. and bias matrix The backward propagation continues until the loss value of the new neural network model falls below a preset threshold.

[0181] Furthermore, if the loss value Below the preset threshold The neural network model trained this time These can be used as candidate models and stored in the model database. This represents the hidden layer structure matrix. The expression for the model database is:

[0182] .

[0183] Furthermore, if the loss value Above the threshold Then it enters the backpropagation process of the BP neural network to optimize the weight matrix. and bias matrix This reduces prediction errors. In this embodiment, the gradient descent algorithm is used to revise the weight matrix in the network structure. and bias matrix This is used to reduce the error between training values ​​and true values, and improve the current hidden layer structure matrix. The accuracy of the network model.

[0184] Furthermore, the backpropagation process (also known as reverse propagation) is a process of revising the weights and biases of each layer from the output layer to the hidden layers, specifically as follows:

[0185] ;

[0186] ;

[0187] in, This indicates the total number of hidden layers. Indicates the first in the output layer The actual output value corresponding to each neuron. This indicates the hidden layer after the network forward propagation. The first in the layer The predicted output value of each neuron.

[0188] For example, the output layer and the first The update formula for weights and biases between hidden layers is as follows:

[0189] ;

[0190] .

[0191] Based on this, the first ( The update formulas for the weights and biases of the hidden layer are as follows:

[0192] ;

[0193] ;

[0194] in, Indicates the updated number -1 hidden layer The first neuron to the second Layer The connection weights of each neuron; Indicates the first -1 hidden layer The first neuron to the second Layer The unupdated weights of the neurons; This represents the learning rate, used to control the step size for parameter updates; Indicates the updated number Hidden layer Bias of each neuron Indicates the number that has not been updated. Hidden layer The biases of each neuron are determined. Based on the updated weights and biases, the updated weight matrix and bias matrix are obtained.

[0195] For example, taking the iterative training framework of a 6-layer neural network as an example, the specific steps are as follows:

[0196] Step 1: Randomly generate the weight matrix for the 6 layers of the neural network and bias matrix All parameters are limited to the range [0,1]. The total number of iterations is set to... Each iteration (denoted as round q) includes a forward propagation phase, which consists of: the first layer iterating through all 6 layers of the neural network; the second layer iterating through all neurons in the current layer and calculating the neurons in each hidden layer.

[0197] The core function of this nested loop is to perform forward propagation computation, using the current weights and biases to calculate the output of each neuron from layer 1 to layer 6 in sequence, and finally obtain the predicted value of the neural network model, and calculate the loss value based on the predicted value and the true value.

[0198] Step 2: Loss Value Determination and Parameter Update. After calculating the loss value for the current round, it is compared with the preset loss threshold. Specifically:

[0199] Scenario 1: If the loss value exceeds a preset threshold, a backpropagation process is performed to update the parameters. This includes: a first-layer loop iterating back through all six layers of the neural network; and a second-layer loop iterating through all neurons in the current layer. The core function of this nested loop is to perform backpropagation calculations. Specifically, it calculates the gradients of the parameters (W, B) of each layer based on the loss value, and then updates the weight matrix using methods such as gradient descent. and bias matrix This is to reduce the losses in the next iteration.

[0200] Case 2: If the loss value is less than the preset threshold, stop training and output the result, directly outputting the currently trained weight matrix. and bias matrix This concludes the entire training process. Furthermore, if in the... If the loss value is less than or equal to a preset threshold before each iteration, training is terminated early and the parameters are output; otherwise, training is terminated early. If the loss still does not meet the target after a round of iterations, then output the weight matrix and bias matrix for the last round.

[0201] The backpropagation process of a BP neural network can optimize the weight matrix and the bias matrix. This allows the neural network model to operate within the current structure. The goal is to obtain a network model with an error loss value less than a preset threshold. However, while different network structures can fit network models that meet the basic threshold conditions, their training accuracy still varies. Traditional empirical methods (such as manual trial and error, grid search) have significant drawbacks in the design of the hidden layer structure of BP neural networks, resulting in low optimization efficiency and a tendency to get trapped in local optima, thus affecting network modeling performance. Therefore, this embodiment introduces the Whale Optimization Algorithm (WOA algorithm) to optimize the hidden layer structure of the BP neural network. Adaptive optimization is performed. The global search mechanism of the WOA algorithm can search for the optimal value within the preset constraint of the number of neurons and achieve a dynamic balance between global and local optimization. This effectively avoids the network structure redundancy or underfitting problems caused by human experience and ensures that the optimized network structure maintains stable modeling performance on both the training and test sets.

[0202] S330. During the verification process, the verification set Φ valFingerprint data is input into the candidate structure In the process, it is determined whether the hidden layer structure of the current candidate structure is better than the current optimal hidden layer structure. If so, the hidden layer structure of the current candidate structure is adopted as the current optimal hidden layer structure; otherwise, the current optimal hidden layer structure is not updated. The specific steps of this process are as follows:

[0203] S331, reference Figure 6 As shown, the BP neural network is based on the training set Φ trn Optimize the weight matrix and bias matrix The WOA algorithm is based on the validation set Φ val Optimizing the hidden layer structure of a BP neural network The two processes run alternately and complement each other. Once the weight matrix and bias matrix are updated, the validation set Φ is... val The fingerprint data is substituted into the candidate structure, and the next round of forward propagation process of the neural network is carried out (the forward propagation process refers to steps S3211 to S3213 above) to obtain the second position coordinate prediction value and the second attitude angle prediction value corresponding to each fingerprint point; the fitness is calculated based on all the second position coordinate prediction values ​​and the second attitude angle prediction values.

[0204] Furthermore, during the verification process, the verification set Φ val Fingerprint data is substituted into the candidate structure The forward propagation process of the BP neural network is executed to predict the coordinates and angles corresponding to each fingerprint point, thereby obtaining the predicted second position coordinates and second pose angles for each fingerprint point, and calculating the corresponding fitness function. The specific expression is:

[0205] ;

[0206] in, Represents the validation set Φ val Total number of fingerprint points. At this time, This represents the predicted second location coordinates obtained from the validation set. This indicates that the second attitude angle prediction value is obtained from the validation set.

[0207] S332. Determine whether the fitness of the current candidate structure is lower than the optimal fitness. * If so, then the hidden layer structure of the current candidate structure is taken as the current optimal hidden layer structure, that is, the network structure is taken as the current optimal network structure. And update the optimal fitness Fit * Conversely, do not update the current optimal hidden layer structure.

[0208] S340, Based on the current hidden layer structure And the current optimal hidden layer structure H * The whale optimization method is used to generate the hidden layer structure in the next population. Specifically, in the case of a hidden layer structure Optimize the weight matrix and bias vector Next, the hidden layer structure in the next population will be generated based on the WOA algorithm. The aim is to further optimize the hidden layer structure, thereby improving the network structure of the next population. With higher model accuracy, the optimal network structure is ultimately obtained [W] * B * H * This is used to establish the optimal mathematical relationship model for the neural network. The specific steps of this process are as follows:

[0209] S341. In the initial state, generate multiple random numbers. Based on the multiple random numbers and the current population, calculate the first control parameter, the second control parameter, and the third control parameter; wherein, the multiple random numbers include the first random number.

[0210] Specifically, in this embodiment, three random numbers are generated in the initial state. , , Then, three control parameters are calculated, including the first control parameter. Second control parameter and third control parameter First control parameter The formula for calculating the algorithm's ability to "global explore" (explore new candidate structures) and "local exploit" (optimize existing superior structures) is as follows:

[0211] .

[0212] Furthermore, the second control parameter The calculation formula is:

[0213] ;

[0214] Third control parameter The calculation formula is:

[0215] ;

[0216] in, Indicates population, This represents the total population size. In the early stages of iteration, When the value is large, the algorithm tends to perform a broad global search, which helps to escape local optima and explore new regions with greater potential in the hidden layer structure space; as iterations proceed... As the value gradually decreases, the algorithm gradually shifts to fine-tuning local optimization, making minor adjustments around the current optimal structure to improve convergence accuracy.

[0217] S342, with the population The increase of the first control parameter This value decreases linearly from 2 to 0 and is applied to the second control parameter. First random number With the second control parameter These factors collectively determine the three update strategies of the WOA algorithm. Therefore, based on the first random number... Second control parameter The size of the hidden layer is used to determine the update strategy for the next population's hidden layer structure; based on the currently selected update strategy, the hidden layer structure in the next population is obtained; the update strategies include a first update strategy, a second update strategy, and a third update strategy. The three update strategies are as follows:

[0218] The first update strategy is "surround the prey": if and Then update the hidden layer structure as follows: :

[0219] ;

[0220] in, This represents the hidden layer structure of the next population. This is the optimal hidden layer structure obtained so far. This indicates the current hidden layer structure.

[0221] The second update strategy is "random search": if but The updated formula is:

[0222] ;

[0223] in, This usually occurs in the early stages of the iteration. When the value is large or fluctuates randomly, this prompts the algorithm to explore extensively.

[0224] The third update strategy is "bubble web attack": Then, a spiral approximation of the optimal structure is adopted, and its update expression is:

[0225] ;

[0226] in, The constant is the helical constant. It is a random constant between [-1, 1]. This represents the symbol for pi. The spiral motion allows candidate solutions to explore a wider neighborhood while progressing towards the optimal solution. This mechanism maintains the tendency to converge to the optimal solution (development property) while introducing randomness and diversity to the search through the spiral path (exploration property). Parameters and Together, they determine the extent of each spiral exploration, making local searches more flexible and precise.

[0227] Furthermore, based on the hidden layer structure obtained from the above update strategy, the hidden layer structure for the next population is obtained, and its expression is:

[0228] .

[0229] The updated formula above Each element is assumed to be an integer, and the algorithm's final output is the updated value. And ensure that the value is within [ , ]between.

[0230] S350. Repeat steps S320 to S340 above, after... The optimal network structure was obtained after verification of each population; among which Represents a positive integer. Specifically, after... After verification of each population, the WOA overall algorithm will generate Fitness in a network structure The optimal network structure with the lowest value and highest model accuracy [W] * B * H * ].

[0231] Based on the above WOA algorithm, the optimal network structure of the network model was obtained [W * B * H * To further evaluate the generalization ability of the model, the test set Φ was... tst The RSS data is fed into the forward propagation path of the BP neural network of this structure to obtain the predicted coordinates and angles. Test set Φ tst Its core function is to verify the generalization ability of the network model; it is independent of the training set Φ. trn , Validation set Φ val The dataset, whose samples have not participated in any training or structural optimization process of the network model, can simulate the performance of the model when sampling RSS data in real-time in real-world applications. It is the core of judging whether the model has escaped overfitting and has practical deployment value.

[0232] Specifically, in step S4, the test set Φ tst Input the optimal network structure [W] obtained in step S3 * B * H * In this process, the predicted position coordinates (hereinafter referred to as the third position coordinate prediction value) and the predicted attitude angle (hereinafter referred to as the third attitude angle prediction value) for each fingerprint point in the test set are obtained. In this embodiment, vehicle positioning includes position coordinates. and angle Prediction using two dimensions of information. To evaluate model performance, Mean Position Error (MPE) and Mean Angle Error (MAE) are defined to measure the model's performance in both position and attitude prediction.

[0233] Furthermore, the average positioning error and average attitude prediction error are calculated based on all predicted third position coordinates and third attitude angles. The formulas for calculating the average positioning error and average attitude prediction error are as follows:

[0234] ;

[0235] ;

[0236] in, This represents the average positioning error. This represents the total number of fingerprints in the test set. Indicates the first The predicted third location coordinates of each fingerprint point. Indicates the first test set The actual location coordinates of each fingerprint point Indicates the average attitude prediction error. Indicates the first The predicted third pose angle of each fingerprint point Indicates the first test set The true value of the pose angle of each fingerprint point.

[0237] Specifically, in step S5, the average positioning error is determined. and average attitude prediction error Does it meet the preset requirements? If so, then based on the current optimal network structure [W] * B * H * A mathematical model was obtained to show the relationship between signal strength values ​​and the vehicle's relative position and attitude angle. Conversely, continue to update the network structure of the candidate models.

[0238] Furthermore, mathematical relational models The final expression is:

[0239] ;

[0240] in, Representing a mathematical relational model, Indicates the first Weight matrices, Indicates the first A bias matrix , Indicates the first The standard signal strength vector of each fingerprint point This represents the activation function.

[0241] Furthermore, the mathematical relational model Stored in the vehicle's ECU (Electronic Control Unit), it is used for real-time vehicle positioning and attitude prediction. Furthermore, before the vehicle leaves the factory, the ECU pre-stores a mathematical relationship model obtained from a standard fingerprint database trained using a BP neural network. It also includes RSS extreme value vectors and and the upper bound vector of the target standardized interval. and lower bound vector .

[0242] Specifically, in step S6, the online positioning phase, the vehicle uses the same circuitry and algorithm as in the offline phase described above. The two front-end detectors (PDs) of the current vehicle continuously measure the RSS information from the four LEDs of the preceding vehicle. And preprocess each RSS value using the following formula:

[0243] .

[0244] Then, the preprocessed RSS values ​​are substituted into the mathematical relation model. In the process, the vehicle's current position coordinates and attitude are predicted. The specific expression is:

[0245] .

[0246] Further, in step S6, the step of obtaining multiple sets of real-time signal strength values ​​by using the aforementioned vehicle receiver (including a detector and an adjustable gain amplifier circuit) to acquire the real-time signal strength of the on-board visible light emitting device of the vehicle in front of the vehicle is as follows:

[0247] First, the detector receives the mixed light signal from the visible light emitting device on the vehicle in front and converts the mixed light signal into an electrical signal.

[0248] Secondly, the current signal is converted into a voltage signal, the voltage signal is filtered, and then amplified using an adjustable gain amplifier circuit to obtain a preprocessed signal. The adjustable gain amplifier circuit adjusts the circuit gain value based on the maximum sampling value of the mixed optical signal. If the maximum sampling value exceeds the upper limit threshold, the circuit gain value is reduced; if the maximum sampling value is lower than the lower limit threshold, the circuit gain value is increased.

[0249] Finally, the preprocessed signal is sampled and subjected to a fast Fourier transform to obtain the amplitude values ​​at multiple frequency points as the signal strength values ​​of the vehicle in front, thus obtaining multiple sets of real-time signal strength values.

[0250] Furthermore, in order to verify the feasibility and effectiveness of the V2V prediction method based on visible light fingerprinting proposed in this embodiment, a complete V2V VLP hardware experimental platform was built to verify the performance of the scheme in both position prediction and attitude prediction.

[0251] For the transmitter in the V2V VLP hardware experimental platform, a commercial daytime running LED light strip is used as the transmitter, running through the rear of the vehicle. The rear end of the light strip is divided into four independently controlled sections. The transmitter structure is as follows: Figure 7 As shown, an STM32F103 microcontroller is selected as the core control unit of the ECU, generating four independent square wave signals. These signals are amplified by an OPA541 power amplifier and then drive four LED strips respectively. The frequencies of the drive signals are set to 4kHz, 8kHz, 14kHz, and 18kHz to distinguish the signals from different LEDs. Figure 7 The LEDs are represented by the symbols LED1_4K, LED2_8K, LED3_14K, and LED3_18K, respectively. This frequency combination can avoid the aliasing of various harmonic components of the signal in the frequency domain, maintain sufficient spacing from each fundamental frequency, and prevent eye damage from light flicker.

[0252] For the receiver in the V2V VLP hardware experimental platform, the receiver circuit is fixed on a high-precision computer numerical control (CNC) machine tool with a positional movement accuracy of 0.1 mm, far exceeding the expected centimeter-level positioning accuracy. Two detectors (PDs) are mounted on a Thorlabs CRM1PT / M precision cage-type rotary mount. This mount has an angular resolution of 5 arcminutes, fully meeting the accuracy requirements for adjusting the vehicle's attitude (angle). The detectors are positioned 63 cm above the ground, with a 5 cm height difference from the bottom of the headlights, to avoid excessively high RSS when the PDs are very close to the LEDs, which could cause saturation distortion in the amplifier circuit. The receiver structure is as follows: Figure 8As shown, the front end consists of two Thorlabs FDS1010 photodiodes (PDs) responsible for receiving optical signals and converting them into current signals. These signals then pass through an IV converter circuit (OPA690), a fourth-order bandpass filter (LM2904) composed of cascaded second-order high-pass and low-pass filters, and a programmable gain amplifier (PGA) circuit (LTC6912). The two signals are then input to two independent ports of the ECU control unit (STM32F103). The ECU performs ADC sampling on the signals at a sampling rate of 128 kHz, performs an FFT operation every 64 sampling points, and extracts the fundamental amplitude value of the corresponding LED frequency as the corresponding received signal strength (RSS).

[0253] The prediction method described in this embodiment can achieve high-precision positioning from near distance (0 m) to far distance. A key point is that the receiver uses a programmable gain amplifier circuit and a gain control algorithm. In the experiment, the LTC6912-2 chip was used to implement the PGA, and the gain adjustment range was 1~256. Figure 9 The signal strength RSS received by detector PD1 from LED1 was compared under two schemes: one using a PGA at the receiver and the other using a fixed-gain amplifier (2x amplification). The detector plane was kept directly facing the plane containing the LED. The RSS value was measured using an oscilloscope. The fixed-gain scheme showed obvious limitations; the RSS value decreased rapidly with increasing distance, and the trend basically conformed to the Lambertian model. However, at close range (< 40 cm), the RSS value of a single PD was higher than 300 mV. This value is the fundamental component after FFT operation. In the time domain, the RSS value of the superimposed signal of the four LED lights exceeded 3V. The ADC sampling range is 0 to 3.3V, resulting in failure to sample, which caused the ECU to lose distance information. When the distance increased to only 1.8 m, the signal amplitude decreased to about 60 mV, which is comparable to the circuit noise level. The signal-to-noise ratio deteriorated severely, and the signal could not be transmitted to a greater distance. In contrast, the scheme using the PGA in this embodiment maintained the RSS value output range in the 100~250 mV range, and a high signal-to-noise ratio was maintained even at 30 m. Within this range, the signal can both avoid entering the saturation region and maintain high sensitivity to changes in distance.

[0254] Further, experimental parameters were set. The experiment implemented a complete fingerprint-based VLP positioning process, including offline fingerprint database establishment (hereinafter referred to as the fingerprint database), BP neural network and WOA algorithm for establishing a mathematical relationship model, and online positioning. Key parameter settings are shown in Table 2. In the offline fingerprint database establishment stage, fingerprint points were set at intervals of 5 cm and 10 cm to establish two fingerprint databases with different densities, to verify the impact of fingerprint density on the system's positioning accuracy. Ten poses were set at each location point, with an angular interval of 10°. The fingerprint point distribution within a 2 m * 2 m area in front of the headlights is shown below. Figure 10As shown. The BP neural network and WOA mathematical modeling process were implemented on a PC using MATLAB software. Training set Φ trn , Validation set Φ val and test set Φ tst The percentages of fingerprint points were 90%, 9.8%, and 0.2%, respectively.

[0255] Table 2:

[0256]

[0257] Furthermore, based on the above experimental parameter settings, 40 target location points were randomly selected during the real-time positioning phase to test the positioning effect of the method described in this embodiment. Taking a fingerprint database with a 5 cm spacing as an example... Figure 11 The prediction results for each target location are presented intuitively. The specific location and attitude angle prediction values ​​are shown in Table 3.

[0258] Table 3:

[0259]

[0260] Furthermore, Figure 11 It intuitively displays the error distribution of the predicted position coordinates and attitude. The overall position error is the distance between the actual position point and the corresponding predicted point. Figure 12 The box plots show the errors for each error. It can be seen that, using the method proposed in this embodiment, the median error for lateral position (x) is 0.83 cm, with a maximum of 6.15 cm; the median error for longitudinal position (y) is 1.31 cm, with a maximum of 8.34 cm. The median distance (error) between the predicted and actual positions is 2.03 cm, generally not exceeding 8.48 cm, achieving centimeter-level positioning accuracy. Simultaneously, the median attitude prediction error is only 0.67°, generally below 6.71°.

[0261] Furthermore, in the scenario with a 10 cm fingerprint interval, the distribution pattern of the obtained positioning performance is generally consistent with that in the aforementioned 5 cm fingerprint interval scenario. However, the positioning performance is significantly reduced, as shown in the comparison results in Table 4, which presents the comparison results of positioning performance under different fingerprint densities. Both the system positioning error and attitude prediction error are significantly improved. This also verifies the important influence of fingerprint distribution density on the positioning performance of fingerprint-based VLP. However, it can also be seen that, based on the experimental platform of this embodiment, a fingerprint database density with a 5 cm interval can already achieve centimeter-level positioning accuracy, and the attitude prediction effect is also very good (median is only 0.67°). In real-world applications, the establishment of offline fingerprint databases is completed in highly automated and intelligent automotive factories, which are fully capable of establishing fingerprint databases with higher densities, thereby generating more accurate mathematical models. Therefore, the method described in this embodiment can achieve better positioning performance than that in the aforementioned experimental platform.

[0262] Table 4:

[0263]

[0264] This invention, based on the fingerprint-based Vehicle Level Model (VLP) and combined with a Backpropagation (BP) neural network, achieves vehicle-to-vehicle (V2V) localization. It can predict not only the relative positions of the two vehicles but also their relative attitudes (angles). Through complete circuit and algorithm design, a practical vehicle localization scheme is proposed, and an experimental platform is built to verify the scheme's centimeter-level positioning accuracy and average attitude (angle) prediction error within 1°. This invention offers the following advantages:

[0265] First, this invention utilizes the VLP fingerprinting method to collect the received signal strength (RSS) information of each fingerprint point in the offline stage to establish a fingerprint database. In the online positioning stage, positioning is achieved by measuring the RSS value of the target point in real time and using a fingerprint matching algorithm. The VLP fingerprinting method does not require complex hardware or synchronization at either end; only inexpensive photodiodes (PDs) are needed to achieve centimeter-level positioning accuracy. Furthermore, to address the shortcomings of fingerprinting methods, such as their high dependence on fingerprint database density and the high manpower and time costs of establishing dense fingerprint databases in large spaces (such as shopping malls), this invention establishes the fingerprint database in an automotive factory during the offline V2V positioning stage. For a specific model of LED lights and designated detectors, only one fingerprint database needs to be established, and the generated mathematical relationship model can be used for all vehicles of that model. The high level of intelligence and automation in modern automotive factories is sufficient to establish a high-precision, dense fingerprint database for vehicle-mounted LEDs. Therefore, the fingerprinting VLP method has higher feasibility in V2V positioning than in indoor positioning and is more suitable for widespread application.

[0266] Second, the dense fingerprint database is trained into a mathematical relation model using the BP neural network algorithm. This mathematical relation model can realize multi-dimensional mapping between signal strength (RSS) and location coordinates and angle information. The Whale Optimization Algorithm (WOA) is designed to optimize the hidden layer structure of the neural network, thereby improving the accuracy of the mathematical relation model.

[0267] In existing fingerprint-based vehicle dynamics (VLP) technologies, the WKNN algorithm is widely used for fingerprint database matching. However, nearest neighbor (NN) algorithms can only match information in a single dimension—position coordinates—and cannot simultaneously predict the relative attitude (angle) of two vehicles. Therefore, this invention employs a backpropagation (BP) neural network algorithm to train a mathematical model of the mapping relationship between signal strength (RSS) and position coordinates and angles in the fingerprint database. The vehicle system only needs to store the mathematical model, eliminating the need to store a dense fingerprint database. This significantly reduces the storage space consumption of the vehicle system and further enhances the applicability of the solution. Furthermore, modern automobiles can be equipped with up to 100 microprocessors, providing a computational foundation for artificial intelligence (AI) applications. AI has become an important component of modern intelligent vehicles, providing a necessary guarantee for the implementation of this method.

[0268] Third, the method described in the embodiments of the present invention can achieve high-precision position and attitude prediction from near distance (0 m) to far distance, which depends not only on the above algorithm, but also on the vehicle system hardware design.

[0269] This invention uses daytime running lights (DRLs), widely equipped in modern automobiles, as the transmitting LEDs, instead of the headlights or taillights commonly used in existing technologies. The DRLs remain constantly lit while driving, have low power consumption, and do not conflict with the original warning and illumination functions of the vehicle lights. Furthermore, the DRLs are flexible in their installation location, extending across the front and rear of the vehicle, eliminating blind spots near the vehicle and enabling seamless positioning from 0 m to distant locations, with the maximum distance depending on the headlight power and the maximum gain of the amplifier circuit. In addition, existing VLP vehicle positioning technologies are mostly based on time difference or phase difference methods. However, due to the extremely high speed of light, the time difference (phase difference) resolution of light signals is low at close range, resulting in large positioning errors. The fingerprint-based VLP of this invention is based on signal strength RSS. As shown by the Lambertian model, the RSS value is highly sensitive to changes in distance and angle, which is the basis for the high-precision positioning achieved by the fingerprint method. However, the RSS also decays rapidly with increasing distance and angle, limiting the signal transmission range. Therefore, the embodiments of the present invention design an adjustable gain amplifier circuit for the receiving end, which can ensure that no saturation distortion occurs at close range and RSS information is lost, and can also ensure a wide range of signal coverage. At the same time, it maintains high sensitivity of RSS as position and angle change within the range, so as to achieve high positioning accuracy.

[0270] Fourth, the embodiments of the present invention established a V2V positioning experimental platform, which verified the feasibility of the method and corresponding algorithm described in the embodiments of the present invention, as well as the centimeter-level positioning accuracy of the system.

[0271] Existing vehicle positioning or ranging technologies are mostly based on simulation analysis. However, in real-world applications, factors such as the bandwidth of vehicle lights, environmental noise and interference, and system processing latency can all significantly impact positioning accuracy, resulting in a large discrepancy between actual and simulation results. This invention, based on commercial vehicle lights and detectors, establishes a practical experimental platform for a fingerprint-based VLP vehicle positioning system, verifying the high-precision positioning performance of the proposed solution.

[0272] Example 2:

[0273] Based on the same inventive concept, this embodiment provides a vehicle position and attitude prediction system based on fingerprint visible light positioning. The principle of solving the problem is similar to the vehicle position and attitude prediction method based on fingerprint visible light positioning provided in Embodiment 1, and the repeated parts will not be described again.

[0274] This embodiment provides a vehicle position and attitude prediction system based on fingerprint-based visible light positioning, used to implement the vehicle position and attitude prediction method based on fingerprint-based visible light positioning described in Embodiment 1, including:

[0275] The segmentation module is used to segment the fingerprint region according to the signal coverage of the vehicle's on-board visible light emitting device; wherein, the fingerprint region includes multiple fingerprint location points; each fingerprint location point includes multiple pose angles; and one pose angle of one fingerprint location point is used as the fingerprint point;

[0276] The database construction module is used to obtain the location coordinates, attitude angles, and signal strength values ​​of all fingerprint points to establish a fingerprint database; each column vector of the signal strength set in the fingerprint database is preprocessed to obtain a standard fingerprint database; wherein, the signal strength set includes the signal strength values ​​of all fingerprint points;

[0277] The network structure optimization module is used to divide the standard fingerprint database into training, validation, and test sets; train the neural network structure using the training set; update the hidden layer structure of the current network structure using the validation set; and iteratively optimize the hidden layer structure of the network structure to obtain the optimal network structure; the optimal network structure is represented as [W]. * B * H * ], where W * B represents the weight matrix of the optimal network structure. * H represents the bias matrix of the optimal network structure. * The hidden layer structure represents the optimal network structure;

[0278] The relationship construction module is used to input the test set into the optimal network structure to obtain the predicted position coordinates and attitude angles of each fingerprint point in the test set; calculate the average positioning error and average attitude prediction error based on all the predicted position coordinates and attitude angles; determine whether the average positioning error and average attitude prediction error meet the preset requirements; if so, obtain the mathematical relationship model between the signal strength value and the vehicle's relative position and attitude angle based on the optimal network structure; otherwise, re-obtain the optimal network structure.

[0279] The prediction module is used to obtain the real-time signal strength of the on-board visible light emitting device of the vehicle in front of the vehicle, and obtain multiple sets of real-time signal strength values. Based on the multiple sets of real-time signal strength values ​​and mathematical relationship models, the relative position parameters and attitude angle of the current vehicle relative to the vehicle in front are calculated, and the relative positioning and attitude prediction of the vehicle are completed.

[0280] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0281] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0282] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0283] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0284] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for predicting vehicle position and attitude based on visible light fingerprint localization, characterized in that, include: S1. Divide the fingerprint region according to the signal coverage of the vehicle's on-board visible light emitting device; wherein, the fingerprint region includes multiple fingerprint location points; each fingerprint location point includes multiple attitude angles; and one of the attitude angles of one of the fingerprint location points is taken as the fingerprint point; S2. Obtain the position coordinates, attitude angles, and signal strength values ​​of all the fingerprint points to establish a fingerprint database; preprocess each column vector of the signal strength set in the fingerprint database to obtain a standard fingerprint database; wherein, the signal strength set includes the signal strength values ​​of all the fingerprint points; S3. Divide the standard fingerprint database into a training set, a validation set, and a test set; train the neural network structure using the training set; update the hidden layer structure of the current network structure using the validation set, and iteratively optimize the hidden layer structure of the network structure to obtain the optimal network structure, specifically as follows: S310. Randomly generate G hidden layer structures as the initial population; where G represents a positive integer; S320. The G hidden layer structures are sequentially used as the hidden layer structures of the neural network. Based on the training set and the current hidden layer structure, the weight matrix and bias matrix of the current network structure are optimized using a neural network training method to obtain candidate structures with loss values ​​lower than a preset threshold. S330. Input the verification set into the candidate structure and determine whether the hidden layer structure of the current candidate structure is better than the current optimal hidden layer structure. If so, use the hidden layer structure of the current candidate structure as the current optimal hidden layer structure; otherwise, do not update the current optimal hidden layer structure. S340. Based on the current hidden layer structure and the current optimal hidden layer structure, the whale optimization method is used to generate the hidden layer structure in the next population. S350, Repeat S320 to S340, after... The optimal network structure is obtained after verification of each population, and the optimal network structure is represented as [W]. * B * H * ];in, W represents a positive integer. * B represents the weight matrix of the optimal network structure. * H represents the bias matrix of the optimal network structure. * The hidden layer structure represents the optimal network structure; S4. Input the test set into the optimal network structure to obtain the predicted position coordinates and attitude angles of each fingerprint point in the test set; calculate the average positioning error and average attitude prediction error based on all the predicted position coordinates and attitude angles. S5. Determine whether the average positioning error and the average attitude prediction error meet the preset requirements. If yes, obtain the mathematical relationship model between the signal strength value and the vehicle's relative position and attitude angle based on the optimal network structure. Otherwise, re-obtain the optimal network structure. S6. Obtain the real-time signal strength of the on-board visible light emitting device of the vehicle in front of the vehicle, and obtain multiple sets of real-time signal strength values; calculate the relative position parameters and attitude angle of the current vehicle relative to the vehicle in front based on the multiple sets of real-time signal strength values ​​and the mathematical relationship model, and complete the vehicle relative positioning and attitude prediction.

2. The vehicle position and attitude prediction method based on fingerprint-based visible light positioning according to claim 1, characterized in that, In step S2, the steps of obtaining the signal strength values ​​of all fingerprint points and establishing a fingerprint database are as follows: The center of the current vehicle's front taillight is taken as the origin of the coordinate system, the horizontal line of the current vehicle's front taillight is taken as the X-axis, and the normal of the current vehicle's front taillight is taken as the Y-axis; the angle between the normal of the current vehicle's front center and the X-axis is taken as the attitude angle. Based on the X-axis, the Y-axis, and the attitude angle, the position coordinates and attitude information of each fingerprint point are obtained; The signal strength value of the vehicle ahead at each fingerprint point is obtained using the detector of the current vehicle, and a signal strength vector is obtained; A fingerprint vector for each fingerprint point is constructed based on the signal strength vector, the position coordinates, and the attitude information; Obtain the fingerprint vectors of all the fingerprint points to construct a fingerprint database; wherein the expression for the fingerprint database is: ; in, Represents the fingerprint database. Indicates the first fingerprint vectors of fingerprint points; Indicates the first The location coordinates of each fingerprint point; Indicates the first The pose angle of each fingerprint point; Indicates the total number of fingerprint points; Indicates the first Signal strength values ​​of each fingerprint point; .

3. The vehicle position and attitude prediction method based on fingerprint-based visible light positioning according to claim 1, characterized in that, In step S330, the verification set is input into the candidate structure, and it is determined whether the hidden layer structure of the current candidate structure is better than the current optimal hidden layer structure. If so, the hidden layer structure of the current candidate structure is taken as the current optimal hidden layer structure. Conversely, the steps to not update the current optimal hidden layer structure are: The fingerprint data in the verification set is input into the candidate structure, and the forward propagation process of the neural network is performed to obtain the second position coordinate prediction value and the second attitude angle prediction value corresponding to each fingerprint point; the fitness is calculated based on all the second position coordinate prediction values ​​and the second attitude angle prediction values. Determine whether the fitness of the current candidate structure is lower than the optimal fitness. If so, then take the hidden layer structure of the current candidate structure as the current optimal hidden layer structure. Conversely, the current optimal hidden layer structure is not updated.

4. The vehicle position and attitude prediction method based on fingerprint-based visible light positioning according to claim 1, characterized in that, In step S340, the step of generating the hidden layer structure for the next population using the whale optimization method based on the current hidden layer structure and the current optimal hidden layer structure is as follows: Multiple random numbers are randomly generated, and a first control parameter, a second control parameter, and a third control parameter are calculated based on the multiple random numbers and the current population; wherein, the multiple random numbers include the first random number; Based on the magnitudes of the first random number and the second control parameter, a strategy for updating the hidden layer structure of the next population is determined; based on the currently selected update strategy, the hidden layer structure in the next population is obtained; wherein, the update strategy includes a first update strategy, a second update strategy, and a third update strategy; the expression for the first update strategy is: ; The expression for the second update strategy is: ; The expression for the third update strategy is: ; in, This represents the hidden layer structure of the next population. This represents the current optimal hidden layer structure. Indicates the current hidden layer structure. This indicates the second control parameter. This represents the third control parameter. Represents the helical constant. Represents a random constant. The symbol for pi.

5. The vehicle position and attitude prediction method based on fingerprint-based visible light positioning according to claim 1, characterized in that, S320, the step of optimizing the weight matrix and bias matrix of the current network structure using a neural network training method based on the training set and the current hidden layer structure to obtain candidate structures with loss values ​​lower than a preset threshold, is as follows: The forward propagation structure of the neural network includes an input layer, multiple hidden layers, and an output layer; each signal intensity vector in the training set is sequentially input into the input layer to obtain a first feature set; the first feature set is input into the multiple hidden layers to obtain a second feature set; The second feature set is input into the output layer to obtain the first position coordinate prediction value and the first attitude angle prediction value corresponding to each fingerprint point; Based on the predicted first position coordinates and predicted first attitude angles of all fingerprint points obtained from the training set, calculate the loss value for this forward prediction. If the loss value is lower than a preset threshold, the network structure trained this time is used as a candidate structure; otherwise, backpropagation is performed on the network structure trained this time, and the weight matrix and bias matrix of the network structure trained this time are continuously updated until the loss value is lower than the preset threshold and backpropagation stops.

6. The vehicle position and attitude prediction method based on fingerprint-based visible light positioning according to claim 5, characterized in that, The steps of inputting the first feature set into the plurality of hidden layers to obtain the second feature set, and inputting the second feature set into the output layer to obtain the predicted first position coordinates and the predicted first pose angle for each fingerprint point are as follows: Calculate the first hidden layer based on the first feature set. There are 10 neurons; wherein the expression of a neuron is: ; in, Indicates the first hidden layer. One neuron, This indicates the number of corresponding vectors in each signal strength vector; Indicates the first Hidden layer (1≤ ≤ ) neurons to the 1st Layer (1≤ ≤ The connection weights of ) neurons; This represents the total number of neurons in the first hidden layer; In the first feature set, the first... A signal intensity vector; This indicates the first hidden layer. One bias; The features output from the first hidden layer are processed sequentially through the remaining hidden layers to obtain the second feature set; wherein, the calculation formula for each neuron in the remaining hidden layers is: ; in, Indicates the first Hidden layer One neuron, Indicates the first The first hidden layer One bias; The second feature set is input into the output layer to obtain the first position coordinate prediction value and the first attitude angle prediction value corresponding to each fingerprint point.

7. The vehicle position and attitude prediction method based on fingerprint-based visible light positioning according to claim 5, characterized in that, The trained network structure is backpropagated, and the weight matrix and bias matrix of the trained network structure are continuously updated. The output layer and the... The update formula for weights and biases between hidden layers is: ; ; No. The update formula for the weights and biases of the hidden layer is: ; ; in, This indicates the total number of hidden layers. Indicates the updated number -1 hidden layer The first neuron to the second Layer The connection weights of each neuron; Indicates the first -1 hidden layer The first neuron to the second Layer The unupdated weights of the neurons; Indicates the learning rate; Indicates the updated number Hidden layer Bias of each neuron Indicates the number that has not been updated. Hidden layer Bias of each neuron; Indicates the loss value. This represents the total number of fingerprint points in the training set. Indicates the first in the output layer The actual output value corresponding to each neuron. This indicates the hidden layer L in the network after forward propagation. The predicted output value of each neuron.

8. The vehicle position and attitude prediction method based on fingerprint-based visible light positioning according to claim 1, characterized in that, The expression for the mathematical relation model is: ; in, Representing a mathematical relational model, Indicates the first A weight matrix, Indicates the first A bias matrix , Indicates the first The standard signal strength vector of each fingerprint point This represents the activation function.

9. The vehicle position and attitude prediction method based on fingerprint-based visible light positioning according to claim 1, characterized in that, In step S6, the step of obtaining multiple sets of real-time signal strength values ​​by using a detector and an adjustable gain amplifier circuit to acquire the real-time signal strength of the vehicle-mounted visible light emitting device in front of the vehicle is as follows: The detector receives the mixed light signal from the visible light emitting device on the vehicle in front and converts the mixed light signal into a current signal. The current signal is converted into a voltage signal, the voltage signal is filtered, and then amplified using an adjustable gain amplifier circuit to obtain a preprocessed signal. The adjustable gain amplifier circuit adjusts its gain value based on the maximum sampling value of the mixed optical signal. If the maximum sampling value exceeds an upper threshold, the circuit gain value is reduced; if the maximum sampling value is below a lower threshold, the circuit gain value is increased. The preprocessed signal is sampled and subjected to a fast Fourier transform to obtain the amplitude values ​​at multiple frequency points as the signal strength values ​​of the vehicle in front, thus obtaining multiple sets of real-time signal strength values.

10. A vehicle position and attitude prediction system based on fingerprint-based visible light positioning, used to implement the vehicle position and attitude prediction method based on fingerprint-based visible light positioning as described in any one of claims 1 to 9, characterized in that, include: A segmentation module is used to segment a fingerprint region based on the signal coverage of the vehicle's onboard visible light emitting device; wherein, the fingerprint region includes multiple fingerprint location points; each fingerprint location point includes multiple pose angles; and one of the pose angles of one of the fingerprint location points is used as a fingerprint point; A database construction module is used to obtain the position coordinates, attitude angles, and signal strength values ​​of all the fingerprint points to establish a fingerprint database; and to preprocess each column vector of the signal strength set in the fingerprint database to obtain a standard fingerprint database; wherein, the signal strength set includes the signal strength values ​​of all the fingerprint points; The network structure optimization module is used to divide the standard fingerprint database into a training set, a validation set, and a test set; train the neural network structure using the training set; update the hidden layer structure of the current network structure using the validation set; and iteratively optimize the hidden layer structure of the network structure to obtain the optimal network structure; the optimal network structure is represented as [W]. * B * H * ], where W * B represents the weight matrix of the optimal network structure. * H represents the bias matrix of the optimal network structure. * The hidden layer structure represents the optimal network structure; The relationship construction module is used to input the test set into the optimal network structure to obtain the predicted position coordinates and attitude angles of each fingerprint point in the test set; calculate the average positioning error and average attitude prediction error based on all the predicted position coordinates and attitude angles; determine whether the average positioning error and average attitude prediction error meet preset requirements; if so, obtain the mathematical relationship model between the signal strength value and the vehicle's relative position and attitude angle based on the optimal network structure; otherwise, re-acquire the optimal network structure. The prediction module is used to obtain the real-time signal strength of the on-board visible light emitting device of the vehicle in front of the vehicle, and obtain multiple sets of real-time signal strength values; based on the multiple sets of real-time signal strength values ​​and the mathematical relationship model, the relative position parameters and attitude angle of the current vehicle relative to the vehicle in front are calculated, and the relative positioning and attitude prediction of the vehicle are completed.