A method and system for driving transient large current of vehicle-mounted LED flash
Patent Information
- Application Number
- CN202611022343.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-08-18
AI Technical Summary
[0019]By acquiring multidimensional data from millimeter-wave radar and cameras at the rear of the vehicle, preprocessing it, and synchronizing the acquisition times according to timestamps, spatiotemporal errors between different sensors are eliminated, resulting in a precise synchronous measurement sequence. Based on this, a state vector is constructed from the synchronous measurement sequence, and state updates are performed by incorporating system noise and observation noise. This effectively suppresses environmental interference and sensor errors, yielding a high-precision fused state vector. This allows for the accurate extraction of longitudinal acceleration and lateral offset to generate a motion feature set. Furthermore, this application comprehensively calculates the reciprocal of the collision time and the lateral intrusion boundary distance based on the motion feature set, and fuses them to obtain the current collision risk index, overcoming the limitations of existing technologies that rely on a single sensor and a single measurement parameter. Overcoming the limitations of relying solely on numerical judgments, this system achieves accurate multi-dimensional collision risk assessment. When the current collision risk index exceeds a preset risk threshold, it further combines the cumulative trajectory deviation of the lateral offset across multiple frames to determine the target hazard level indicator. This enhances the recognition and fault tolerance capabilities for complex dynamic behaviors such as vehicle lane changes or abnormal trajectories, effectively reducing the misjudgment and missed judgment rates in complex traffic scenarios. Finally, based on the target hazard level indicator, the system dynamically determines the target flashing period and calculates the duty cycle parameters of the drive signal, generating a drive pulse sequence to control the flashing of the LED flashlight. This achieves adaptive transient high-current drive warning for different levels of hazard, thereby improving the accuracy of collision risk assessment and warning for vehicle-mounted LED flashlights in complex traffic scenarios.
Smart Images

Figure CN122585086A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, specifically a method and system for driving transient high current of vehicle-mounted LED flashlights. Background Technology
[0002] With the rapid development of intelligent connected vehicle technology, vehicle active safety systems are playing an increasingly important role in reducing traffic accident rates and ensuring road traffic safety. Rear-end collisions, as one of the most common types of traffic accidents, occur frequently in complex scenarios such as highways, rainy / foggy weather, and nighttime driving. To reduce the risk of rear-end collisions, vehicle-mounted LED flashlights not only serve as efficient and energy-saving lighting equipment, effectively reducing vehicle electrical energy consumption, but also act as a crucial visual warning device, proactively reminding drivers of following vehicles to maintain a safe distance in dangerous situations. To meet the warning needs of different road environments, vehicle conditions, and levels of danger, the drive control technology of such energy-saving lighting equipment is showing a trend towards intelligent and adaptive development. Its accuracy and timeliness of warnings in complex traffic scenarios are of great significance for improving vehicle active safety protection capabilities and reducing the incidence of rear-end collisions.
[0003] Currently, the driving control method for vehicle LED flashlights mainly adopts threshold triggering technology based on single sensor measurements. This method compares the measurement parameters collected by a single sensor such as millimeter-wave radar or a camera with a preset threshold to determine whether a warning needs to be activated. This method, based on comparing a single measurement parameter, controls the flashlight activation by detecting whether a single physical quantity such as the distance or speed of the vehicle behind reaches a danger threshold. It can achieve basic collision warning functions and has been applied to some extent in the field of vehicle rear-end collision prevention warning in conventional road scenarios.
[0004] However, due to the complexity of traffic environments and the multidimensional nature of collision risks, rear-end collision risk assessment in real-world road scenarios is becoming increasingly complex and variable. In practical applications, drive control methods based on single-sensor measurements struggle to suppress the interference of environmental disturbances and sensor errors on risk assessment, and the accuracy of collision risk assessment in complex traffic scenarios is difficult to guarantee. Especially in complex scenarios such as rainy / foggy weather, nighttime driving, and multi-lane changes, the limited dimensionality of measurement information obtainable by a single sensor and the potential differences in the perception capabilities of different types of sensors for the same target mean that existing methods using single-dimensional measurement data for risk assessment are prone to errors in warning timing or even misjudgments and missed judgments, thus reducing the accuracy of vehicle-mounted LED flashing warnings in traffic scenarios.
[0005] Application content
[0006] To address the above issues, this application provides a transient high-current driving method and system for vehicle-mounted LED flashlights, which solves the problem of insufficient accuracy in collision risk assessment under complex traffic scenarios and can improve the accuracy of vehicle-mounted LED flashlight warnings.
[0007] To achieve the above objectives, the technical solution adopted in this application is as follows:
[0008] The radial distance and Doppler velocity of the millimeter-wave radar at the rear of the vehicle, as well as the lane line position and lateral pixel coordinates of the camera, are obtained.
[0009] The radial distance, Doppler velocity, and lateral pixel coordinates are preprocessed and timestamp aligned to obtain a synchronous measurement sequence containing the initial relative distance and initial approximation velocity;
[0010] The position state quantity is initialized with the initial relative distance in the synchronous measurement sequence, the velocity state quantity is initialized with the initial approximation velocity, and the acceleration state quantity is initialized to a preset initial value. A target tracking state vector containing position state quantity, velocity state quantity and acceleration state quantity is constructed, and the state is updated by combining system noise and observation noise to obtain a fused state vector.
[0011] Based on the fused state vector, longitudinal acceleration and lateral offset are extracted to generate a set of motion features;
[0012] The reciprocal of the collision time and the lateral intrusion boundary distance are calculated based on the set of motion features, and the reciprocal of the collision time and the lateral intrusion boundary distance are weighted and fused to obtain the current collision risk index;
[0013] When the current collision risk index exceeds the preset risk threshold, the target danger level is determined by combining the multi-frame trajectory deviation accumulation of the lateral offset.
[0014] The target strobe period is determined based on the target hazard level identifier, and the duty cycle parameter of the drive signal is calculated.
[0015] Generate a drive pulse sequence for the duty cycle parameter and the target strobe period, and control the LED flash lamp to blink according to the drive pulse sequence.
[0016] By employing the aforementioned technical solution, the radial distance and Doppler velocity of the millimeter-wave radar at the rear of the vehicle, as well as the lane line position and lateral pixel coordinates of the camera, overcome the limitation of limited measurement information dimensions caused by single-sensor measurements in existing technologies. A synchronized measurement sequence is obtained by pre-setting and synchronizing the acquisition times according to timestamps, eliminating differences in acquisition time and measurement accuracy between different types of sensors. A fused state vector is obtained by constructing a state vector based on the synchronized measurement sequence and updating the state using system noise and observation noise, achieving deep fusion of multi-sensor measurement information and effectively suppressing the impact of environmental interference and sensor errors on risk assessment. Based on the fused state vector, longitudinal acceleration and lateral offset are extracted to generate a motion feature set, simultaneously capturing the motion characteristics of following vehicles in both longitudinal and lateral dimensions. Compared to existing technologies that rely on only a single physical quantity for judgment, this significantly improves the ability to perceive vehicle motion states in complex traffic scenarios. The collision risk index is calculated by integrating the reciprocal of the collision time and the lateral intrusion boundary distance based on the motion feature set. This provides a comprehensive quantitative assessment of the urgency of longitudinal collisions and the threat of lateral intrusion, solving the problem of inaccurate collision risk assessment using single-dimensional measurement data. It effectively avoids warning timing deviations and misjudgments / missed judgments in complex scenarios such as rainy / foggy weather, nighttime driving, and multi-lane changes. When the collision risk index exceeds a preset risk threshold, the target hazard level is determined by combining the cumulative trajectory deviation of the lateral offset across multiple frames. Dynamic hazard level classification is achieved through temporal cumulative analysis. The target flashing period is determined based on the target hazard level indicator, and the duty cycle parameter of the drive signal is calculated. A drive pulse sequence is generated to control the flashing of the LED flashlight, achieving adaptive matching between warning intensity and hazard level, thereby improving the accuracy of vehicle-mounted LED flashlight warnings in complex traffic scenarios.
[0017] Secondly, embodiments of this application provide a transient high-current drive system for an automotive LED flashlight. The automotive LED flashlight transient high-current drive system includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the automotive LED flashlight transient high-current drive system to perform the method described in the first aspect and any possible implementation thereof.
[0018] In summary, one or more technical solutions provided in this application have at least the following technical effects or advantages:
[0019] By acquiring multidimensional data from millimeter-wave radar and cameras at the rear of the vehicle, preprocessing it, and synchronizing the acquisition times according to timestamps, spatiotemporal errors between different sensors are eliminated, resulting in a precise synchronous measurement sequence. Based on this, a state vector is constructed from the synchronous measurement sequence, and state updates are performed by incorporating system noise and observation noise. This effectively suppresses environmental interference and sensor errors, yielding a high-precision fused state vector. This allows for the accurate extraction of longitudinal acceleration and lateral offset to generate a motion feature set. Furthermore, this application comprehensively calculates the reciprocal of the collision time and the lateral intrusion boundary distance based on the motion feature set, and fuses them to obtain the current collision risk index, overcoming the limitations of existing technologies that rely on a single sensor and a single measurement parameter. Overcoming the limitations of relying solely on numerical judgments, this system achieves accurate multi-dimensional collision risk assessment. When the current collision risk index exceeds a preset risk threshold, it further combines the cumulative trajectory deviation of the lateral offset across multiple frames to determine the target hazard level indicator. This enhances the recognition and fault tolerance capabilities for complex dynamic behaviors such as vehicle lane changes or abnormal trajectories, effectively reducing the misjudgment and missed judgment rates in complex traffic scenarios. Finally, based on the target hazard level indicator, the system dynamically determines the target flashing period and calculates the duty cycle parameters of the drive signal, generating a drive pulse sequence to control the flashing of the LED flashlight. This achieves adaptive transient high-current drive warning for different levels of hazard, thereby improving the accuracy of collision risk assessment and warning for vehicle-mounted LED flashlights in complex traffic scenarios. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a transient high-current driving method for a vehicle-mounted LED flashlight disclosed in an embodiment of this application.
[0021] Figure 2 This is another schematic flowchart of a transient high-current driving method for an automotive LED flashlight disclosed in an embodiment of this application;
[0022] Figure 3 This is a schematic diagram of the transient high-current drive system for a vehicle-mounted LED flashlight provided in an embodiment of this application.
[0023] In the diagram: 301, Central Processing Unit; 302, Read-Only Memory; 303, Random Access Memory; 304, Bus; 305, Input / Output Interface; 306, Input Section; 307, Output Section; 308, Storage Section; 309, Communication Section; 310, Driver; 311, Removable Media. Detailed Implementation
[0024] To enable those skilled in the art to better understand the technical solution, the present application will be described in detail below with reference to the embodiments. The description in this section is only exemplary and explanatory, and should not be used to limit the scope of protection of the present application in any way.
[0025] It should be noted that, in this document, the terms "comprising," "including," and any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Specific examples have been used in this document to illustrate the principles and implementation methods of the technical solutions of this application. The above examples are only for the purpose of helping to understand the methods and core ideas of this application. The above are merely preferred embodiments of this application. It should be pointed out that, due to the limitations of written expression and the objective existence of infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes, or combinations, or the direct application of the concept and technical solutions of this application to other situations without modification, should all be considered within the scope of protection of this application.
[0026] This application provides a transient high-current driving method for an automotive LED flashlight, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a transient high-current driving method for an automotive LED flashlight according to an embodiment of this application. The method is applied to a system, which refers to a hardware and software integrated platform capable of executing a transient high-current driving program for an automotive LED flashlight. The system can execute a transient high-current driving program for an automotive LED flashlight. The method includes steps 101 to 106, as follows:
[0027] Step 101: Obtain the radial distance and Doppler velocity of the millimeter-wave radar at the rear of the vehicle, as well as the lane line position and lateral pixel coordinates of the camera.
[0028] In this embodiment, millimeter-wave radar refers to an electromagnetic wave sensor installed at the rear of a vehicle to detect targets behind it. It achieves target detection by transmitting and receiving millimeter-wave electromagnetic signals, such as a vehicle-mounted millimeter-wave radar operating at a frequency of 77 GHz. Radial distance represents the measured straight-line distance between the millimeter-wave radar and the target vehicle behind it along the radar's detection direction; for example, the vehicle behind is 50 meters from the rear of the vehicle. Doppler velocity refers to the radial approach or departure speed of the target vehicle relative to the vehicle behind it, measured based on the Doppler effect; for example, the vehicle behind approaches the vehicle at a speed of 10 meters per second. A camera refers to an optical sensor installed at the rear of the vehicle to acquire image information, obtaining visual information about the road scene through an image sensor and lens system. Lane line position represents the position information of the left and right lane lines detected in the camera image in the image coordinate system; for example, the left lane line is located at 200 pixels on the horizontal coordinate of the image, and the right lane line is located at 800 pixels on the horizontal coordinate of the image. The horizontal pixel coordinates are used to represent the horizontal position of the target vehicle in the camera image. They are used to identify the coordinate value of the target in the width direction of the image in pixels. For example, the center of the target vehicle is located at the horizontal coordinate of 500 pixels.
[0029] Specifically, the system reads target detection data frames output by the millimeter-wave radar via the vehicle controller's local area network bus. It then parses these frames to obtain the radial distance and Doppler velocity measurements of the target vehicle behind, and records the radar timestamp corresponding to each frame. Simultaneously, it receives image frame data from the camera via the image transmission interface. Lane line detection processing is performed on these image frames, identifying the sets of left and right lane line pixels in the image, fitting the lane line position parameters, and recording the camera timestamp corresponding to each image frame. Target detection processing is then performed on the same image frame to identify the position of the vehicle behind in the image, extracting the center point or bottom center point of the vehicle detection box as the target's lateral pixel coordinates. The acquired radial distance, Doppler velocity, lane line position, and lateral pixel coordinates, along with the corresponding timestamp information, are stored in a buffer as raw input data for subsequent data processing.
[0030] Step 102: Preprocess and align the radial distance, Doppler velocity, and lateral pixel coordinates with timestamps to obtain a synchronous measurement sequence containing the initial relative distance, initial approximation velocity, and initial lateral offset.
[0031] In this embodiment, radial distance refers to the straight-line distance of a target vehicle behind the vehicle along the radar's line-of-sight direction, as measured by millimeter-wave radar; for example, a radar output value of 50 meters. Doppler velocity refers to the radial speed of the target vehicle relative to the vehicle itself; for example, when a vehicle approaches at a speed of 15 meters per second, the Doppler velocity is -15 meters per second. Lateral pixel coordinates refer to the pixel position value of the target vehicle in the horizontal direction in the camera image; for example, in an image with a width of 1920 pixels, the target is located in the 800th pixel column. Preprocessing refers to data processing operations that perform error compensation and coordinate correction on the raw sensor measurement data. Timestamp alignment refers to the synchronous processing process of unifying data collected by the millimeter-wave radar and camera at different times to the same acquisition time using interpolation methods. Synchronous measurement sequence refers to a multi-dimensional measurement data set formed by organizing the initial relative distance, initial approach velocity, and initial lateral offset in chronological order.
[0032] Specifically, firstly, the fixed transmission delay parameters of the millimeter-wave radar are obtained. This transmission delay is multiplied by the currently measured Doppler velocity to obtain the distance compensation amount. Then, the radial distance is subtracted from the distance compensation amount to obtain the compensated radial distance. Next, the camera timestamp of the camera data and the radar timestamp of the millimeter-wave radar data are extracted. The difference between the two timestamps is calculated as the synchronization error. A linear interpolation method is used to align the compensated radial distance and Doppler velocity values to the acquisition time corresponding to the radar timestamp. The aligned compensated radial distance is used as the initial relative distance, and the aligned Doppler velocity is used as the initial approach velocity. Simultaneously, the pre-calibrated and stored distortion correction coefficients are read. Based on these distortion correction coefficients, the lateral pixel coordinates are compensated for coordinate deviation to obtain the reference pixel coordinates. Then, based on the camera's intrinsic parameter matrix and installation height parameters, the reference pixel coordinates are mapped and converted into lateral physical distance values in the vehicle coordinate system as the initial lateral offset. Finally, the initial approach velocity, initial relative distance, and initial lateral offset are combined and arranged in chronological order to form a synchronous measurement sequence containing measurement information in three dimensions.
[0033] In one possible implementation, the radial distance is corrected based on time delay compensation, the lateral pixel coordinates are corrected based on distortion correction, and the acquisition time is synchronized according to the timestamp to obtain a synchronous measurement sequence, specifically including steps 1021-1023, as follows:
[0034] Step 1021: Use the product of the fixed hardware transmission delay of the millimeter-wave radar and the Doppler velocity as the range compensation amount; subtract the range compensation amount from the radial distance to obtain the compensated radial distance.
[0035] In this embodiment, the fixed hardware transmission delay refers to the fixed processing delay time between the millimeter-wave radar hardware circuit receiving the echo signal and outputting the measurement data, for example, a radar hardware processing delay of 15 milliseconds. Doppler velocity represents the radial speed of a target vehicle relative to the vehicle behind, measured based on Doppler frequency shift. A positive value indicates the target is approaching, and a negative value indicates the target is moving away. For example, a Doppler velocity of -12 meters per second indicates that the vehicle behind is approaching at a speed of 12 meters per second. The distance compensation amount represents the radial distance measurement deviation caused by the hardware processing delay. It is calculated by multiplying the fixed hardware transmission delay by the Doppler velocity. For example, with a delay of 15 milliseconds and a speed of -12 meters per second, the compensation amount is -0.18 meters. Radial distance refers to the original distance measurement value output by the millimeter-wave radar, representing the straight-line distance between the radar and the target behind along the detection direction. For example, the original measured distance is 50.2 meters. The compensated radial distance represents the corrected distance value obtained after eliminating the effects of hardware delay. For example, the original distance of 50.2 meters minus the compensation amount of -0.18 meters yields a compensated distance of 50.38 meters.
[0036] Specifically, the pre-calibrated fixed transmission delay value is read from the millimeter-wave radar hardware configuration parameters. This delay value is determined through calibration testing and stored in the configuration memory when the radar leaves the factory. Doppler velocity measurements are extracted from the current frame of radar data. The fixed transmission delay is multiplied by the Doppler velocity to obtain the range compensation. When the Doppler velocity is negative (i.e., the target is approaching), the range compensation is negative; when the Doppler velocity is positive (i.e., the target is moving away), the range compensation is positive. Radial range measurements are extracted from the current frame of radar data as the raw range data. The radial range measurement is subtracted from the range compensation to obtain the compensated radial range. The calculated compensated radial range value is written to the data buffer as the accurate range measurement value after delay compensation correction.
[0037] Step 1022: Compensate for the coordinate deviation of the horizontal pixel coordinates according to the pre-calibrated distortion correction coefficients to obtain the reference pixel coordinates, and map the reference pixel coordinates to the initial horizontal offset.
[0038] In this embodiment, the pre-calibrated distortion correction coefficients refer to the set of lens distortion parameters obtained through a calibration process before the camera leaves the factory. These coefficients describe the mathematical coefficients for radial and tangential distortion, such as radial distortion coefficients of -0.15 and 0.02, and tangential distortion coefficients of 0.001 and -0.001. The lateral pixel coordinates represent the position index of the target in the horizontal direction in the image coordinate system, counted in pixels starting from the left edge of the image. For example, when the image width is 1920 pixels, the lateral coordinate range is 0 to 1919. Coordinate deviation refers to the pixel position offset caused by lens distortion, including radial and tangential deviation components. For example, the coordinate deviation at the image edge can reach 8 pixels. The reference pixel coordinates represent the pixel coordinate values under the ideal pinhole imaging model obtained after distortion correction. For example, the original coordinates of 950 pixels become 945 pixels after correction. The initial lateral offset represents the physical distance deviation of the target vehicle from the lane centerline in the lateral direction, in meters. For example, an initial lateral offset of 0.3 meters means that the target is located 0.3 meters to the right of the lane centerline.
[0039] Specifically, the pre-stored distortion correction coefficients, including radial and tangential distortion coefficient sets, are read from the camera configuration file. The lateral pixel coordinates are extracted, and their normalized coordinates relative to the image center are calculated. The normalized coordinates are equal to the pixel coordinates minus the image center's lateral coordinate, divided by the focal length. The square and fourth powers of the normalized coordinates are calculated, and the square is multiplied by the first radial distortion coefficient, and the fourth by the second radial distortion coefficient. These two values are then added together to obtain the radial distortion component. Twice the product of the normalized coordinates and the longitudinal normalized coordinates is calculated, and this product is multiplied by the first tangential distortion coefficient to obtain the tangential distortion component. The radial and tangential distortion components are added together to obtain the total coordinate deviation. The total coordinate deviation multiplied by the focal length is subtracted from the lateral pixel coordinates to obtain the reference pixel coordinates. The pixel coordinates of the lane centerline are calculated from the detected lane line positions in the image, and the difference between the reference pixel coordinates and the lane centerline pixel coordinates is used as the lateral pixel offset. Based on the pre-defined pixel distance mapping relationship, the horizontal pixel offset is multiplied by the actual physical distance conversion coefficient corresponding to the unit pixel to obtain the initial horizontal offset in meters.
[0040] Step 1023: Using the difference between the camera timestamp and the millimeter-wave radar timestamp as the synchronization error, linear interpolation is used to align the compensated radial distance to the acquisition time corresponding to the radar timestamp, resulting in a synchronization measurement sequence containing the initial relative distance, initial approach velocity, and initial lateral offset.
[0041] In this embodiment, the camera timestamp represents the system time marker of the image frame acquired by the camera, recording the absolute time of data acquisition in milliseconds. The radar timestamp refers to the system time marker of the data frame output by the millimeter-wave radar, recording the radar data acquisition time in milliseconds, for example, a radar timestamp of 1234567890 milliseconds. The synchronization error is used to represent the time difference between the acquisition times of the two sensors, calculated by subtracting the radar timestamp from the camera timestamp, for example, a synchronization error of 30 milliseconds. Linear interpolation refers to the method of calculating the data value at the intermediate time based on the data values of two consecutive times according to the time ratio, assuming that the data changes linearly within the time interval. The initial relative distance represents the longitudinal distance between the rear target vehicle and the vehicle after time alignment, for example, an initial relative distance of 50.38 meters. The initial approach speed refers to the radial speed of the rear target vehicle relative to the vehicle after time alignment, for example, an initial approach speed of -12 meters per second. The synchronization measurement sequence is used to represent the ordered combination of multi-sensor measurement data after time alignment, including three data components: initial relative distance, initial approach speed, and initial lateral offset.
[0042] Specifically, the camera timestamp corresponding to the current frame's camera data and the radar timestamp corresponding to the current frame's radar data are extracted. The synchronization error is calculated by subtracting the radar timestamp from the camera timestamp. The absolute value of the synchronization error is checked against a preset synchronization threshold. If the absolute value does not exceed the threshold, the compensated radial distance is used as the initial relative distance, and the Doppler velocity is used as the initial approximation velocity. If the absolute value exceeds the threshold, the compensated radial distance of the previous frame and the corresponding radar timestamp of the previous frame are read from the historical data buffer. The inter-frame time interval is calculated by subtracting the radar timestamp of the previous frame from the radar timestamp of the current frame. The synchronization error is then divided by the inter-frame time interval to obtain the time interpolation ratio. The inter-frame distance change is calculated by subtracting the compensated radial distance of the previous frame from the compensated radial distance of the current frame. This inter-frame distance change is multiplied by the time interpolation ratio to obtain the alignment distance correction. Finally, the alignment distance correction is subtracted from the compensated radial distance of the current frame to obtain the aligned initial relative distance, and the Doppler velocity is directly used as the initial approximation velocity. The initial relative distance, initial approach velocity, and initial lateral offset are combined sequentially to form a synchronous measurement sequence, which is then written into the data processing buffer.
[0043] Step 103: Initialize the position state quantity with the initial relative distance in the synchronous measurement sequence, initialize the velocity state quantity with the initial approximation velocity, and initialize the acceleration state quantity to the preset initial value. Construct a target tracking state vector containing the position state quantity, velocity state quantity, and acceleration state quantity, and update the state by combining system noise and observation noise to obtain the fused state vector.
[0044] In this embodiment, the position state variable refers to the state variable used to represent the longitudinal position of the target vehicle in the target tracking system. The velocity state variable refers to the state variable used to represent the longitudinal velocity of the target vehicle. The acceleration state variable refers to the state variable used to represent the longitudinal acceleration of the target vehicle. The preset initial value refers to the default value set for the acceleration state variable during initialization, usually set to 0 meters per second squared. The target tracking state vector refers to a multi-dimensional state description vector formed by sequentially combining the position state variable, velocity state variable, and acceleration state variable. System noise refers to the uncertainty introduced by dynamic characteristics such as acceleration changes during the target vehicle's movement, which is quantified by the process noise covariance matrix. Observation noise refers to the measurement error caused by hardware accuracy limitations and environmental interference during sensor measurement, which is quantified by the observation noise covariance matrix.
[0045] Specifically, firstly, the initial relative distance value is extracted from the synchronous measurement sequence and directly assigned to the position state variable as the initial value of the position. Then, the initial approach velocity value is extracted and directly assigned to the velocity state variable as the initial value of the velocity. Next, the acceleration state variable is set to a preset initial value of 0 meters per second squared. The position state variable, velocity state variable, and acceleration state variable are combined in the order of position first, velocity in the middle, and acceleration last to construct a three-dimensional target tracking state vector. Then, the pre-calibrated sensor error variance parameters are obtained, and the state covariance matrix, which includes the process noise covariance matrix and the observation noise covariance matrix, is initialized. The longitudinal acceleration rate of change of the vehicle is read, and it is determined whether the rate of change exceeds the acceleration switching threshold. If it does, the ratio of the longitudinal acceleration rate of change to the acceleration switching threshold is calculated as the first adjustment coefficient, and the process noise covariance matrix is multiplied by the first adjustment coefficient. The signal-to-noise ratio (SNR) value of the millimeter-wave radar is read, and it is determined whether the SNR is lower than the SNR attenuation threshold. If it is lower, the ratio of the SNR attenuation threshold to the SNR is calculated as the second adjustment coefficient, and the observation noise covariance matrix is multiplied by the second adjustment coefficient. Based on the updated process noise covariance matrix and the observation noise covariance matrix, the filter gain matrix is calculated. The filter gain matrix is multiplied by the current observation residual to obtain the correction amount. The correction amount is added by the state vector to obtain the fused state vector.
[0046] In one possible implementation, a state vector is constructed based on the synchronous measurement sequence, and the state is updated by combining system noise and observation noise to obtain a fused state vector. Specifically, this includes steps 1031-1034, as follows:
[0047] Step 1031: Extract the initial relative distance, initial approximation velocity, and initial lateral offset from the synchronous measurement sequence as state variables, construct a state vector, and initialize the state covariance matrix with the pre-calibrated sensor error variance. The state covariance matrix includes the process noise covariance matrix and the observation noise covariance matrix.
[0048] In this embodiment, the initial relative distance represents the longitudinal distance measurement between the rear of the target vehicle and the vehicle after time alignment and delay compensation, for example, an initial relative distance of 50.38 meters. The initial approach speed refers to the radial speed of the target vehicle relative to the vehicle after time synchronization processing; negative values indicate approach and positive values indicate moving away, for example, an initial approach speed of -12 meters per second. The initial lateral offset represents the lateral position deviation of the target vehicle relative to the lane centerline after distortion correction and coordinate mapping, for example, an initial lateral offset of 0.3 meters. State variables are independent numerical quantities used to describe the motion state of the system; each state variable corresponds to one dimension of motion, for example, distance, speed, and position are three independent state variables. A state vector is used to represent a column vector formed by combining multiple state variables in a specific order, for example, a three-dimensional column vector composed of three state variables. Sensor error variance refers to the statistical variance of sensor measurement errors, quantifying the degree of uncertainty in sensor measurements; for example, the variance of radar distance measurement is 0.25 square meters, and the variance of speed measurement is 0.09 square meters per second squared.
[0049] Specifically, the initial relative distance, initial approximation velocity, and initial lateral offset values are sequentially read from the synchronous measurement sequence data structure. These three values are arranged in the order of distance, velocity, and lateral position, constructing a 3x1 state vector. The pre-stored radar distance measurement error variance, radar velocity measurement error variance, and camera lateral position measurement error variance are read from the sensor calibration configuration file. A 3x3 state covariance matrix is created, and all elements are initialized to zero. The radar distance measurement error variance is assigned to the first element in the first row and first column of the state covariance matrix, the radar velocity measurement error variance to the second element in the second row and second column, and the camera lateral position measurement error variance to the third element in the third row and third column. The off-diagonal elements of the state covariance matrix are kept zero, indicating that there is no correlation between the state variables at the initial moment. The constructed state vector and the initialized state covariance matrix are stored in the filter data structure as the initial state for subsequent filter iteration calculations.
[0050] Step 1032: Obtain the longitudinal acceleration change rate of the vehicle. When the longitudinal acceleration change rate exceeds the acceleration switching threshold, use the ratio of the longitudinal acceleration change rate to the acceleration switching threshold as the first adjustment coefficient, and multiply the process noise covariance matrix by the first adjustment coefficient to perform state update.
[0051] In this embodiment, the longitudinal acceleration change rate refers to the rate of change of the vehicle's longitudinal acceleration over time, i.e., the derivative of acceleration with respect to time, measured in meters per second cubic meters. For example, a longitudinal acceleration change rate of 2 meters per second cubic meters means that the acceleration increases by 2 meters per second squared per second. The acceleration switching threshold represents the critical value for determining when the vehicle enters a state of rapid acceleration change. When the longitudinal acceleration change rate exceeds this threshold, noise adjustment is triggered; for example, the acceleration switching threshold is set to 1 meter per second cubic meters. The first adjustment coefficient represents the amplification factor of the process noise dynamically adjusted based on the acceleration change rate. A value greater than 1 indicates an increase in process noise; for example, a first adjustment coefficient of 2 indicates that the process noise covariance is increased to twice its original value. The process noise covariance matrix describes the uncertainty of the system's motion process. The diagonal elements represent the process noise variance of each state variable; for example, the diagonal elements of a third-order diagonal matrix are 0.1, 0.05, and 0.02. State update represents the calculation process of iteratively correcting the state estimate based on the adjusted noise parameters, including two stages: time update and measurement update.
[0052] Specifically, the longitudinal acceleration measurement values of the vehicle at the current moment and the previous moment are read from the onboard inertial measurement unit. The longitudinal acceleration at the current moment is subtracted from the longitudinal acceleration at the previous moment to obtain the acceleration change. The acceleration change is divided by the time interval between the current moment and the previous moment to obtain the longitudinal acceleration change rate. The absolute value of the longitudinal acceleration change rate is compared with the acceleration switching threshold. When the absolute value of the longitudinal acceleration change rate does not exceed the acceleration switching threshold, the process noise covariance matrix remains unchanged. When the absolute value of the longitudinal acceleration change rate exceeds the acceleration switching threshold, the absolute value of the longitudinal acceleration change rate is calculated and divided by the acceleration switching threshold to obtain the first adjustment coefficient. The current process noise covariance matrix is read from the filter data structure. Each element of the matrix is traversed, and the value of each element is multiplied by the first adjustment coefficient to obtain the adjusted process noise covariance matrix. The adjusted process noise covariance matrix is written back to the filter data structure, replacing the original process noise covariance matrix, for subsequent filter gain calculation and state update.
[0053] Step 1033: Obtain the signal-to-noise ratio (SNR) of the millimeter-wave radar. When the SNR is lower than the SNR attenuation threshold, use the ratio of the SNR attenuation threshold to the SNR as the second adjustment coefficient. Multiply the observation noise covariance matrix by the second adjustment coefficient to perform state update.
[0054] In this embodiment, the signal-to-noise ratio (SNR) refers to the ratio of useful signal power to noise power in the millimeter-wave radar received signal, expressed in decibels (dB) to characterize the radar target echo quality. For example, an SNR of 18 dB indicates that the signal power is 63 times the noise power. The SNR attenuation threshold represents the critical value at which the radar signal quality deteriorates and the observation noise needs to be increased. When the SNR falls below this threshold, noise adjustment is triggered; for example, the SNR attenuation threshold is set to 15 dB. The second adjustment coefficient represents the amplification factor of the observation noise dynamically adjusted based on the SNR. A value greater than 1 indicates increased observation uncertainty; for example, a second adjustment coefficient of 1.5 indicates that the observation noise covariance increases to 1.5 times its original value. The observation noise covariance matrix describes the covariance matrix of sensor measurement uncertainty. The diagonal elements represent the measurement noise variance of each observation; for example, the diagonal elements of a third-order diagonal matrix are 0.5, 0.3, and 0.1, respectively.
[0055] Specifically, the signal-to-noise ratio (SNR) value corresponding to the current target is read from the data frame output by the millimeter-wave radar. The SNR value is compared with the SNR attenuation threshold. When the SNR value is greater than or equal to the SNR attenuation threshold, the observation noise covariance matrix remains unchanged. When the SNR value is less than the SNR attenuation threshold, the SNR attenuation threshold is calculated and divided by the SNR value to obtain the second adjustment coefficient. The current observation noise covariance matrix is read from the filter data structure, and each element of the matrix is iterated through, with each element's value multiplied by the second adjustment coefficient to obtain the adjusted observation noise covariance matrix. The adjusted observation noise covariance matrix is written back to the filter data structure, replacing the original observation noise covariance matrix. The adjusted process noise covariance matrix and observation noise covariance matrix are checked to confirm that both matrices have been dynamically adjusted for subsequent filter gain calculation. The state transition matrix and observation matrix are read, and combined with the two adjusted noise covariance matrices, the filter's time update step is executed to calculate the prior state estimate and prior covariance matrix, completing the preparation work for the state update based on dynamic noise adjustment.
[0056] Step 1034: Calculate the filter gain matrix based on the updated process noise covariance matrix and observation noise covariance matrix, and superimpose the product of the filter gain matrix and the current observation residual onto the state vector to obtain the fused state vector.
[0057] In this embodiment, the filter gain matrix refers to a weight matrix used to adjust the degree of correction of the state estimate by the observed values. The matrix elements depend on the relative magnitudes of process noise and observation noise, such as a three-row, three-column filter gain matrix. The current observation residual represents the difference vector between the actual observed value and the predicted observed value calculated based on the prior state estimate, reflecting the degree of deviation between the observed value and the predicted value. For example, the three components of the three-dimensional observation residual vector are 0.2 meters, -0.5 meters per second, and 0.1 meters, respectively. The fused state vector is used to represent the posterior state vector obtained after optimal estimation by combining multi-sensor observation information. It includes the fused relative distance, relative velocity, and lateral position. For example, the three components of the fused state vector are 50.4 meters, -12.3 meters per second, and 0.32 meters, respectively.
[0058] Specifically, the dynamically adjusted process noise covariance matrix and observation noise covariance matrix are read from the filter data structure. The state transition matrix is read, multiplied by the prior covariance matrix, and then multiplied by the transpose of the state transition matrix. The result is added to the process noise covariance matrix to obtain the updated prior covariance matrix. The observation matrix is read, multiplied by the prior covariance matrix, and then multiplied by the transpose of the observation matrix. The result is added to the observation noise covariance matrix to obtain the innovation covariance matrix. The inverse of the innovation covariance matrix is calculated by multiplying the prior covariance matrix by the transpose of the observation matrix and then by the inverse of the innovation covariance matrix to obtain the filter gain matrix. The observation vector of the current frame is extracted from the synchronous measurement sequence, and the observation matrix is multiplied by the prior state vector to obtain the predicted observation vector. The current observation residual vector is obtained by subtracting the predicted observation vector from the current frame observation vector. The filter gain matrix is multiplied by the current observation residual vector to obtain the state correction vector. The prior state vector and the state correction vector are added together to obtain the fused state vector. This fused state vector is stored in the filter data structure as the optimal state estimate output for the current time step.
[0059] Step 104: Extract longitudinal acceleration and lateral offset based on the fused state vector to generate a motion feature set; calculate the reciprocal of the collision time and the lateral intrusion boundary distance based on the motion feature set, and perform weighted fusion of the reciprocal of the collision time and the lateral intrusion boundary distance to obtain the current collision risk index.
[0060] In this embodiment, longitudinal acceleration represents the change in acceleration of the target vehicle in the longitudinal direction, calculated using the rate of change of relative velocity over time. For example, the vehicle approaches the vehicle with an acceleration of 3 meters per second squared. Lateral offset refers to the lateral position deviation of the target vehicle relative to the lane centerline; a positive value indicates deviation to the right, and a negative value indicates deviation to the left. For example, the target vehicle's center is located 0.3 meters to the right of the lane centerline. The motion feature set represents a combination of parameters describing the motion characteristics of the target vehicle, including instantaneous longitudinal acceleration, acceleration abrupt change amplitude, lateral offset, rate of change of lateral offset, and lateral intrusion boundary distance. The reciprocal of the collision time is the reciprocal of the predicted collision time; a larger value indicates a more imminent collision. For example, the reciprocal is 0.5 when the collision time is 2 seconds. The lateral intrusion boundary distance represents the remaining lateral distance between the target vehicle and the lane boundary. For example, when the lane width is 3.5 meters and the target vehicle is 0.5 meters off-center, the lateral intrusion boundary distance is 1.25 meters. The collision risk index is used to represent a quantitative value of the overall assessment of the degree of collision danger. The value ranges from 0 to 1, with a higher value indicating a higher risk.
[0061] Specifically, the velocity components of the current frame and the previous frame are extracted from the fused state vector. The difference between the two is divided by the inter-frame time difference to obtain the instantaneous longitudinal acceleration value. The arithmetic mean of the instantaneous longitudinal acceleration values of the most recent consecutive frames is calculated as the historical mean longitudinal acceleration. The difference between the current instantaneous longitudinal acceleration value and the historical mean longitudinal acceleration is used as the acceleration mutation amplitude. The variance component corresponding to the lateral position in the posterior state covariance matrix corresponding to the fused state vector is detected. When the variance component exceeds a preset lateral confidence threshold, the lateral position component is marked as unusable. When the lateral position variance component does not exceed the threshold, the lateral position component is extracted from the fused state vector. The lateral coordinates of the lane centerline are calculated based on the lane line position. The difference between the lateral position component and the lateral coordinates of the lane centerline is the lateral offset. The difference between the lateral offset of the current frame and the lateral offset of the previous frame is divided by the inter-frame time difference to obtain the lateral offset change rate. The lane half-width is calculated based on the lane line position. The lateral intrusion boundary distance is obtained by subtracting the absolute value of the lateral offset from the lane half-width. The reciprocal of the collision time is calculated based on the instantaneous value of longitudinal acceleration and relative velocity, and the lateral intrusion prediction time is calculated based on the lateral intrusion boundary distance and the rate of change of lateral offset. When the lateral intrusion prediction time is less than a preset time threshold, the reciprocal of the collision time is multiplied by the longitudinal risk weight coefficient, and the reciprocal of the lateral intrusion prediction time is multiplied by the lateral risk weight coefficient. The sum of the two weighted values is the current collision risk index.
[0062] In one possible implementation, the reciprocal of the collision time and the lateral intrusion boundary distance are calculated based on the motion feature set, and then fused to obtain the current collision risk index. Specifically, this includes steps 1041-1042, as follows:
[0063] Step 1041: Calculate the reciprocal of the collision time based on the instantaneous value of longitudinal acceleration and relative velocity in the motion feature set.
[0064] In this embodiment, the motion feature set refers to a combination of parameters describing the motion characteristics of a rear target vehicle, including motion-related parameters such as instantaneous longitudinal acceleration, acceleration abrupt change amplitude, lateral offset, and rate of change of lateral offset. The instantaneous longitudinal acceleration represents the measured longitudinal acceleration of the rear target vehicle relative to the vehicle at the current moment, calculated using the rate of change of relative velocity. For example, an instantaneous longitudinal acceleration of -2 m / s² indicates that the rear vehicle is accelerating towards the vehicle. Relative velocity refers to the velocity component in the fused state vector, representing the radial velocity of the rear target vehicle relative to the vehicle. Negative values indicate approach, and positive values indicate moving away; for example, a relative velocity of -12 m / s². The reciprocal of the collision time represents the reciprocal of the predicted collision time. A larger value indicates a more imminent collision; for example, a reciprocal of 0.5 for a predicted collision time of 2 seconds and a reciprocal of 1 for a predicted collision time of 1 second.
[0065] Specifically, the instantaneous value of longitudinal acceleration and the value of relative velocity are read from the motion feature set data structure. The sign of the relative velocity is determined: when the relative velocity is greater than or equal to zero, it indicates that the target is moving away or stationary, and the reciprocal of the collision time is set to zero. When the relative velocity is less than zero, it indicates that the target is approaching, and the sign of the instantaneous value of longitudinal acceleration is determined. When the instantaneous value of longitudinal acceleration is greater than or equal to zero, it indicates that the target is decelerating or approaching at a constant speed. The relative distance value is extracted from the fused state vector, and the constant speed approach collision time is calculated by dividing the relative distance by the absolute value of the relative velocity. The reciprocal of the collision time is then calculated by dividing 1 by the constant speed approach collision time. When the instantaneous value of longitudinal acceleration is less than zero, it indicates that the target is accelerating. The square root of the relative velocity squared minus twice the product of the instantaneous longitudinal acceleration value and the relative distance is taken to obtain the velocity discrimination value. The discrimination value minus the absolute value of the relative velocity and divided by the absolute value of the instantaneous longitudinal acceleration value yields the acceleration approach collision time. The reciprocal of the collision time is then calculated by dividing 1 by the acceleration approach collision time. The calculated reciprocal of the collision time is stored in the collision risk calculation buffer.
[0066] Step 1042: Calculate the lateral intrusion prediction time based on the rate of change of the lateral intrusion boundary distance and the lateral offset; when the lateral intrusion prediction time is less than the preset time threshold, the collision time reciprocal and the lateral intrusion prediction time are weighted and fused by the preset longitudinal risk weight coefficient and the preset lateral risk weight coefficient to obtain the current collision risk index.
[0067] In this embodiment, the lateral intrusion boundary distance represents the remaining lateral safety distance between the target vehicle and the lane boundary, calculated by subtracting the absolute value of the lateral offset from the lane half-width. For example, when the lane half-width is 1.75 meters and the lateral offset is 0.5 meters, the lateral intrusion boundary distance is 1.25 meters. The rate of change of the lateral offset refers to the speed at which the lateral offset changes over time, measured in meters per second. For example, a rate of change of 0.3 meters per second indicates that the target vehicle is approaching the lane boundary at a speed of 0.3 meters per second. The lateral intrusion prediction time represents the time required for the target vehicle to reach the lane boundary based on the current lateral movement trend. For example, the lateral intrusion prediction time is 4 seconds. The preset time threshold is the critical time value for determining whether the lateral intrusion risk needs to be included in the collision risk assessment. For example, the preset time threshold is set to 5 seconds. The preset longitudinal risk weight coefficient represents the weight percentage of the reciprocal of the collision time in the risk fusion calculation. For example, the longitudinal risk weight coefficient is 0.7. The preset lateral risk weight coefficient represents the weight percentage of the lateral intrusion risk in the risk fusion calculation. For example, the lateral risk weight coefficient is 0.3. Weighted fusion refers to a calculation method that sums multiple risk indicators according to different weighting coefficients. The current collision risk index is used to represent the overall degree of danger obtained by combining longitudinal collision risk and lateral intrusion risk. The value ranges from 0 to infinity, with a higher value indicating a higher risk.
[0068] Specifically, the lateral intrusion boundary distance and lateral offset change rate are read from the motion feature set. The absolute value of the lateral offset change rate is checked against a preset minimum change rate threshold. If the absolute value is less than or equal to the minimum change rate threshold, the lateral motion trend is not obvious, and the current collision risk index is directly set to the reciprocal of the collision time. If the absolute value of the lateral offset change rate is greater than the minimum change rate threshold, the lateral intrusion boundary distance is divided by the absolute value of the lateral offset change rate to obtain the lateral intrusion prediction time. The lateral intrusion prediction time is compared with a preset time threshold. If the lateral intrusion prediction time is greater than or equal to the preset time threshold, the lateral intrusion risk is low, and the current collision risk index is set to the reciprocal of the collision time. If the lateral intrusion prediction time is less than the preset time threshold, the lateral intrusion risk is high, and the preset vertical risk weight coefficient and preset horizontal risk weight coefficient are read from the risk configuration parameters. The vertical risk component is obtained by multiplying the reciprocal of the collision time by the preset vertical risk weight coefficient. The lateral intrusion time reciprocal is obtained by dividing 1 by the lateral intrusion prediction time, and then multiplying the reciprocal of the lateral intrusion time by the preset horizontal risk weight coefficient. The current collision risk index is obtained by adding the vertical risk component and the horizontal risk component. The calculated current collision risk index is stored in the risk assessment results buffer.
[0069] Step 105: When the current collision risk index exceeds the preset risk threshold, determine the target danger level label by combining the cumulative amount of trajectory deviation across multiple frames of lateral offset.
[0070] In this embodiment, the preset risk threshold refers to the critical value of the collision risk index that triggers the hazard level determination process; for example, the risk threshold is set to 0.6. The cumulative trajectory deviation across multiple frames represents the sum of the absolute values of the lateral offset over several consecutive historical frames, used to quantify the cumulative degree of lateral movement of the target vehicle. For example, when the absolute values of the lateral offset in the most recent 10 frames are 0.2 meters, 0.3 meters, and 0.4 meters, the cumulative deviation is 0.9 meters. The target hazard level identifier indicates the current hazard level category determined after dynamic classification, for example, divided into four levels: low risk, medium risk, high risk, and extremely dangerous, corresponding to identifiers 0, 1, 2, and 3, respectively. The upward trigger threshold refers to the risk index threshold that must be exceeded when adjusting the hazard level to a higher level, and the downward release threshold refers to the risk index threshold that must be lowered when adjusting the hazard level to a lower level.
[0071] Specifically, when the current collision risk index exceeds a preset risk threshold, the system retrieves the corresponding upward trigger threshold and downward release threshold from the preset risk classification parameter table. It calculates the absolute value of the lateral offset over several consecutive historical frames, summing these values to obtain the cumulative trajectory deviation across multiple frames. The threshold reduction is calculated based on this cumulative trajectory deviation, which is positively correlated with the cumulative trajectory deviation. The target upward trigger threshold is obtained by subtracting the threshold reduction from the upward trigger threshold. The system compares the current collision risk index with the target upward trigger threshold. If the current collision risk index is greater than the target upward trigger threshold, the upward continuous frame counter is incremented. The system checks if the upward continuous frame counter has reached a preset number of upward frames. If it has, the historical risk level value is incremented to upgrade the level, and the upward continuous frame counter is reset to zero. The current collision risk index is compared with the descent release threshold. When the current collision risk index is less than the descent release threshold, the descent continuous frame counter is incremented. It is then determined whether the descent continuous frame counter has reached the preset number of descent frames. If it has, the historical hazard level value is decremented to lower the hazard level, and the descent continuous frame counter is reset to zero. The updated historical hazard level is then output as the target hazard level identifier for the current frame.
[0072] In one possible implementation, when the current collision risk index exceeds a preset risk threshold, the target hazard level indicator is determined by combining the cumulative trajectory deviation of the lateral offset across multiple frames. Specifically, this includes steps 1051-1052, as follows:
[0073] Step 1051: Retrieve the rising trigger threshold and falling release threshold corresponding to the vehicle's historical hazard level from the preset risk classification parameter table; use the sum of the absolute values of the lateral offset of multiple consecutive historical frames as the cumulative amount of trajectory deviation across multiple frames; calculate the threshold reduction amount based on the cumulative amount of trajectory deviation across multiple frames, and subtract the threshold reduction amount from the rising trigger threshold to obtain the target rising trigger threshold.
[0074] In this embodiment, the preset risk classification parameter table refers to a data structure table that stores the mapping relationship between different hazard levels and corresponding trigger thresholds, including configuration information for the upward trigger threshold and downward release threshold for each level. The historical hazard level represents the hazard level of the rear target vehicle determined in the previous moment or frame, for example, a historical hazard level of level 2. The upward trigger threshold refers to the collision risk index threshold value that needs to be exceeded to increase the hazard level, for example, the upward trigger threshold from level 1 to level 2 is 0.8. The downward release threshold represents the collision risk index threshold value that needs to be lowered to decrease the hazard level, for example, the downward release threshold from level 2 to level 1 is 0.5. Historical consecutive frames refer to several consecutive sampling periods before the current moment, for example, historical consecutive 5 frames represent the most recent 5 sampling periods. The absolute value of the lateral offset represents a positive value of the lateral offset distance of the rear target vehicle relative to the lane centerline, for example, when the lateral offset is negative 0.3 meters, the absolute value is 0.3 meters. The cumulative sum refers to the sum obtained by sequentially adding multiple values. The cumulative trajectory deviation over multiple frames represents the total absolute value of the lateral offset across historical frames. For example, if the absolute values of the lateral offsets for five frames are 0.2 meters, 0.25 meters, 0.3 meters, 0.35 meters, and 0.4 meters, the cumulative value is 1.5 meters. The threshold reduction amount indicates the amount by which the upward trigger threshold calculated based on the cumulative trajectory deviation needs to be lowered. For example, the threshold reduction amount is 0.1. The target upward trigger threshold refers to the actual trigger threshold used for determining the escalation of the hazard level after the threshold reduction amount correction.
[0075] Specifically, the historical hazard level is used as the index key to perform a query operation in the preset risk classification parameter table. The corresponding rise trigger threshold and fall release threshold values are extracted from the query results. A sequence of lateral offset values for multiple consecutive frames is read from the historical data buffer. The absolute value of the lateral offset for each frame is calculated, and the absolute values of the lateral offsets for all frames are summed sequentially to obtain the cumulative trajectory deviation for multiple frames. It is determined whether the cumulative trajectory deviation for multiple frames is greater than a preset cumulative threshold. If the cumulative trajectory deviation for multiple frames is greater than the preset cumulative threshold, it indicates that the lateral movement trajectory of the target vehicle behind is fluctuating significantly. The cumulative trajectory deviation for multiple frames is multiplied by a preset reduction coefficient to obtain the threshold reduction amount. If the cumulative trajectory deviation for multiple frames is less than or equal to the preset cumulative threshold, the threshold reduction amount is set to zero. The rise trigger threshold is calculated, and the threshold reduction amount is subtracted from the rise trigger threshold to obtain the target rise trigger threshold. A boundary limit check is performed on the target rise trigger threshold to determine whether it is less than a preset minimum threshold. If the target rise trigger threshold is less than the preset minimum threshold, the target rise trigger threshold is corrected to the preset minimum threshold. The calculated target rise trigger threshold and the retrieved fall release threshold are stored in the risk judgment parameter buffer.
[0076] Step 1052: When the current collision risk index is greater than the target rise trigger threshold, the rise continuous frame counter is incremented. If the rise continuous frame counter reaches the preset rise frame count, the historical hazard level is increased. When the current collision risk index is less than the fall release threshold, the fall continuous frame counter is incremented. If the fall continuous frame counter reaches the preset fall frame count, the historical hazard level is decreased. The updated historical hazard level is used as the target hazard level identifier.
[0077] In this embodiment, the current collision risk index represents the comprehensive risk quantification value calculated after weighted fusion of longitudinal collision risk and lateral intrusion risk at the current moment. The target increase trigger threshold refers to the actual trigger threshold used to determine whether the hazard level needs to be increased after correction for accumulated trajectory deviations over multiple frames. The consecutive increase frame counter represents the statistical value of the number of consecutive frames in which the current collision risk index continuously exceeds the target increase trigger threshold; for example, a consecutive increase frame counter of 3 indicates that the threshold has been exceeded for 3 consecutive frames. The preset increase frame count refers to the minimum number of consecutive frames exceeding the threshold required to trigger an increase in the hazard level; for example, the preset increase frame count is 3 frames. The decrease release threshold represents the collision risk index threshold below which the hazard level needs to be lowered. The consecutive decrease frame counter represents the statistical value of the number of consecutive frames in which the current collision risk index continuously falls below the decrease release threshold. The preset decrease frame count represents the minimum number of consecutive frames below the threshold required to trigger a decrease in the hazard level; for example, the preset decrease frame count is 5 frames. The historical hazard level represents the hazard level of the rear target vehicle determined at the previous moment. The target hazard level label is used to indicate the hazard level of a target vehicle behind you at the current moment, which is finally determined after risk classification. For example, the target hazard level label is level 3.
[0078] Specifically, the system compares the current collision risk index with the target rise trigger threshold. When the current collision risk index is greater than the target rise trigger threshold, it reads the current value of the rise continuous frame counter from the counter buffer, increments the rise continuous frame counter value by 1 and updates the storage, while simultaneously resetting the fall continuous frame counter to zero. It then compares the updated rise continuous frame counter with the preset rise frame number. If the rise continuous frame counter is greater than or equal to the preset rise frame number, it determines whether the historical hazard level has reached the highest level. If not, it increments the historical hazard level value by 1 to complete the upward adjustment operation and resets the rise continuous frame counter to zero. When the current collision risk index is less than or equal to the target rise trigger threshold, it resets the rise continuous frame counter to zero. Finally, it compares the current collision risk index with the fall release threshold. When the current collision risk index is less than the fall release threshold, it reads the current value of the fall continuous frame counter from the counter buffer, increments the fall continuous frame counter value by 1 and updates the storage. The updated continuous descent frame counter is compared with the preset descent frame count. If the continuous descent frame counter is greater than or equal to the preset descent frame count, it is determined whether the historical hazard level has reached the minimum level. If it has not reached the minimum level, the historical hazard level value is decremented by 1 to complete the downward adjustment operation, and the continuous descent frame counter is reset to zero. When the current collision risk index is greater than or equal to the descent release threshold, the continuous descent frame counter is reset to zero. The updated historical hazard level is assigned to the target hazard level identifier, and the target hazard level identifier is stored in the risk assessment output buffer.
[0079] Step 106: Determine the target flashing period based on the target hazard level label and calculate the duty cycle parameter of the drive signal; based on the duty cycle parameter and the target flashing period, generate a drive pulse sequence to control the LED flash, and drive the LED flash to flash according to the drive pulse sequence.
[0080] In this embodiment, the target strobe period represents the length of one complete flash cycle of the LED flash, including the high-level on-time and low-level off-time. For example, a strobe period of 250 milliseconds corresponds to a flashing frequency of 4 times per second. The duty cycle parameter refers to the proportion of the high-level duration in the driving pulse sequence to the entire cycle time, with a value range of 0 to 1. For example, a duty cycle of 0.3 indicates that the high-level time accounts for 30% of the cycle time. The driving pulse sequence represents the pulse width modulation signal sequence used to control the on / off state of the LED, consisting of alternating high and low level signals repeated according to the target strobe period. The strobe period reference value refers to the standard strobe period value corresponding to different hazard levels in a preset mapping table. For example, low-risk level corresponds to 1000 milliseconds, medium-risk level corresponds to 500 milliseconds, high-risk level corresponds to 250 milliseconds, and extremely dangerous level corresponds to 125 milliseconds.
[0081] Specifically, the corresponding strobe cycle baseline value is searched in a preset mapping table using the target hazard level identifier as an index. The acceleration mutation amplitude is obtained by calculating the difference between the current longitudinal acceleration and the arithmetic mean of longitudinal accelerations over several consecutive historical frames. The risk gradient is obtained by calculating the difference between the current collision risk index and the collision risk index from the previous moment. A correction factor is calculated based on the acceleration mutation amplitude and the risk gradient. The correction factor increases with the acceleration mutation amplitude and the risk gradient. The strobe cycle baseline value is divided by the correction factor to obtain the target strobe cycle. The junction temperature monitoring value of the LED is obtained. The maximum allowable high-level duration is calculated based on the relationship between the junction temperature monitoring value and a preset temperature threshold as the thermal constraint high-level duration. The higher the junction temperature, the shorter the thermal constraint high-level duration. The thermal constraint high-level duration is divided by the target strobe cycle to obtain the duty cycle parameter. The duty cycle parameter is multiplied by the target strobe cycle to obtain the actual high-level duration of the driving pulse sequence. The actual high-level duration value is written to the comparison register of the pulse width modulation generator, and the target strobe cycle value is written to the overload register of the pulse width modulation generator. The pulse width modulation generator automatically generates a drive pulse sequence based on the settings of the comparison register and the reload register. The drive pulse sequence controls the LED flash lamp to flash periodically according to the set flash period and duty cycle through the drive circuit.
[0082] In one possible implementation, the target strobe period is determined based on the target hazard level identifier, and the duty cycle parameter of the drive signal is calculated, specifically including steps 1061-1063, as follows:
[0083] Step 1061: Retrieve the corresponding strobe cycle baseline value in the preset mapping table based on the target hazard level identifier; calculate the difference between the longitudinal acceleration at the current moment and the average longitudinal acceleration of multiple consecutive historical frames to obtain the acceleration mutation amplitude; and calculate the difference between the current collision risk index and the collision risk index at the previous moment to obtain the risk gradient.
[0084] In this embodiment, the target hazard level identifier represents the current hazard level of the target vehicle behind, determined after risk classification, for example, a target hazard level identifier of level 3. The preset mapping table refers to a configuration data table structure that stores the correspondence between hazard levels and strobe cycle reference values. The strobe cycle reference value represents the initial reference value of the strobe cycle of the warning light under different hazard levels, in milliseconds; for example, the strobe cycle reference value corresponding to level 3 is 200 milliseconds. The current longitudinal acceleration refers to the instantaneous value of the longitudinal acceleration of the target vehicle behind in the current sampling period; for example, the current longitudinal acceleration is -2.5 m / s². The historical average longitudinal acceleration across multiple consecutive frames represents the arithmetic mean of the longitudinal acceleration measurements over the previous several consecutive sampling periods; for example, the average longitudinal acceleration over the previous 5 frames is -2 m / s². The acceleration abrupt change amplitude refers to the change in longitudinal acceleration at the current moment relative to the historical average, used to characterize the drastic degree of acceleration change; for example, the acceleration abrupt change amplitude is -0.5 m / s². The current collision risk index represents the comprehensive collision risk quantification value calculated at the current moment. The collision risk index of the previous moment refers to the collision risk index value calculated in the previous sampling period. The risk gradient is used to represent the rate of change of the collision risk index over time. For example, a risk gradient of 0.15 means that the risk index increases by 0.15 per frame.
[0085] Specifically, the target hazard level identifier is used as an index key to perform a query operation in a preset mapping table, and the corresponding strobe cycle baseline value is read from the returned records. A sequence of longitudinal acceleration values for multiple consecutive frames is read from the historical data buffer, and the sum of the longitudinal acceleration values of all historical frames is divided by the number of historical frames to obtain the average longitudinal acceleration value for the multiple historical frames. The longitudinal acceleration value at the current moment is read from the current motion feature set, and the acceleration abrupt change amplitude is obtained by subtracting the average longitudinal acceleration value for the multiple historical frames from the current longitudinal acceleration value. The current collision risk index and the collision risk index value at the previous moment are read from the risk assessment result buffer, and the risk gradient is obtained by subtracting the collision risk index at the previous moment from the current collision risk index. The sign of the risk gradient is determined: a risk gradient greater than zero indicates an increasing risk trend, a risk gradient less than zero indicates a decreasing risk trend, and a risk gradient equal to zero indicates that the risk remains stable. The calculated strobe cycle baseline value, acceleration abrupt change amplitude, and risk gradient value are stored in the strobe parameter calculation buffer.
[0086] Step 1062: Calculate the correction factor based on the acceleration mutation amplitude and risk gradient; calculate the target strobe period based on the strobe period baseline value and the correction factor.
[0087] In this embodiment, the acceleration mutation amplitude represents the change in longitudinal acceleration relative to the historical average at the current moment, used to characterize the degree of abrupt change in the motion state of the target vehicle behind. The risk gradient refers to the change in the collision risk index between adjacent moments, used to characterize the rate of risk change. The correction factor represents the strobe cycle adjustment coefficient calculated based on the acceleration mutation amplitude and the risk gradient; its value range is typically between 0.5 and 1.5. For example, a correction factor of 0.8 indicates a need to increase the strobe speed. The strobe cycle baseline value represents the initial reference value of the strobe cycle obtained from the hazard level query. The target strobe cycle refers to the actual duration of the strobe cycle used to control the strobe of the warning lights after adjustment by the correction factor, in milliseconds. For example, a target strobe cycle of 160 milliseconds means that the warning lights complete one bright-dark cycle every 160 milliseconds.
[0088] Specifically, the acceleration abrupt change amplitude and risk gradient values are read from the flicker parameter calculation buffer. The absolute value of the acceleration abrupt change amplitude is multiplied by a preset acceleration weighting coefficient to obtain the acceleration correction component, and the risk gradient is multiplied by a preset risk weighting coefficient to obtain the risk correction component. The acceleration correction component and the risk correction component are added to obtain the initial correction value. The sign of the initial correction value is determined: if the initial correction value is greater than zero, it indicates that the flicker period needs to be shortened to enhance the warning effect; if the initial correction value is less than zero, it indicates that the flicker period can be extended to reduce the warning intensity. The correction factor is obtained by subtracting the initial correction value from 1. A boundary limit check is performed on the correction factor to determine whether the correction factor is less than the preset minimum correction factor. If the correction factor is less than the preset minimum correction factor, it is corrected to the preset minimum correction factor. If the correction factor is greater than the preset maximum correction factor, it is corrected to the preset maximum correction factor. The flicker period baseline value is read from the flicker parameter calculation buffer, and the flicker period baseline value is multiplied by the correction factor to obtain the target flicker period. A boundary limit check is performed on the target flicker period to determine if it is less than a preset minimum period threshold. If the target flicker period is less than the preset minimum period threshold, the target flicker period is corrected to the preset minimum period threshold. The calculated target flicker period value is stored in the flicker control parameter buffer.
[0089] Step 1063: Obtain the junction temperature monitoring value of the light-emitting diode, calculate the thermal constraint high-level duration based on the junction temperature monitoring value, and divide the thermal constraint high-level duration by the target flicker period to obtain the duty cycle parameter.
[0090] In this embodiment, a light-emitting diode (LED) refers to a semiconductor light-emitting device used for illumination in a warning light. The junction temperature monitoring value represents the real-time temperature of the LED chip junction measured by a temperature sensor, in degrees Celsius; for example, a junction temperature monitoring value of 65 degrees Celsius. The thermally constrained high-level duration represents the longest allowable conduction time of the LED within one flicker cycle under the current junction temperature conditions, in milliseconds; for example, a thermally constrained high-level duration of 120 milliseconds. The target flicker cycle represents the period length used to control the flicker of the warning light after adjustment by a correction factor. The duty cycle parameter is the ratio of the high-level duration of the LED within one complete flicker cycle to the total cycle length, ranging from 0 to 1; for example, a duty cycle parameter of 0.6 indicates that the LED is in the conduction state for 60% of the time within one cycle.
[0091] Specifically, the current junction temperature of the LED is read from the temperature monitoring module. It is then determined whether the junction temperature exceeds a preset temperature threshold. If it does, it indicates that the LED temperature is too high and power consumption needs to be limited. The thermal derating factor corresponding to the junction temperature is read from the thermal management configuration table; this factor decreases as the junction temperature increases. The target flicker period is read from the flicker control parameter buffer, and the target flicker period is multiplied by the thermal derating factor to obtain the thermal constraint high-level duration. A boundary limit check is performed on the thermal constraint high-level duration to determine if it is less than a preset minimum high-level time. If it is, the thermal constraint high-level duration is corrected to the preset minimum high-level time. The thermal constraint high-level duration is then determined to be greater than the target flicker period. If it is, the thermal constraint high-level duration is corrected to the target flicker period. The duty cycle parameter is calculated by dividing the thermal constraint high-level duration by the target flicker period. The duty cycle parameter is then processed to retain two decimal places. The calculated duty cycle parameter is stored in the pulse width modulation control register, which is used to drive the light-emitting diode to flash according to the duty cycle parameter.
[0092] In one possible implementation, a drive pulse sequence with duty cycle parameters and a target strobe period is generated, and the LED flash is controlled to blink according to the drive pulse sequence, specifically including steps 1064-1066, as follows:
[0093] Step 1064: Calculate the product of the duty cycle parameter and the target strobe period to obtain the high-level duration of the driving pulse sequence.
[0094] In this embodiment, the duty cycle parameter represents the ratio of the high-level duration of the LED within a complete flicker cycle to the total duration of the cycle, with a value ranging from 0 to 1, for example, a duty cycle parameter of 0.6. The target flicker cycle refers to the cycle duration used to control the flickering of the warning light after adjustment by a correction factor, in milliseconds, for example, a target flicker cycle of 200 milliseconds. The product refers to the calculated result obtained by multiplying two values. The driving pulse sequence represents the periodic level signal sequence used to control the LED's on and off states, including both high and low levels. The high-level duration represents the duration for which the driving pulse sequence remains in a high-level state within a complete cycle, in milliseconds, for example, a high-level duration of 120 milliseconds means that within a 200-millisecond cycle, the first 120 milliseconds are high-level, causing the LED to conduct and emit light, and the last 80 milliseconds are low-level, causing the LED to turn off.
[0095] Specifically, the duty cycle parameter value is read from the pulse width modulation control register, and the target strobe period value is read from the strobe control parameter buffer. A multiplication operation is performed to calculate the duty cycle parameter multiplied by the target strobe period to obtain the initial value of the high-level duration. The initial high-level duration value is then converted from a floating-point number to an integer to match the hardware timer's counting unit requirements. It is then determined whether the converted high-level duration is less than a preset minimum pulse width threshold. If so, it indicates that the pulse width is too narrow, potentially preventing the LED from starting properly; the high-level duration is then corrected to the preset minimum pulse width threshold. Next, it is determined whether the high-level duration is greater than the target strobe period. If so, it indicates an abnormal duty cycle calculation; the high-level duration is then corrected to the target strobe period. The calculated high-level duration value is stored in the drive parameter buffer. The timer clock frequency is read from the system configuration parameters. The high-level duration is calculated, multiplied by the timer clock frequency, and then divided by 1000 to obtain the timer count value corresponding to the high-level duration. This count value is stored as the target value to be written to the comparison register.
[0096] Step 1065: Write the high-level duration to the compare register of the pulse width modulation generator and write the target strobe period to the reload register of the pulse width modulation generator.
[0097] In this embodiment, the high-level duration represents the length of time the driving pulse sequence remains high within a complete cycle. The pulse width modulation (PWM) generator is a hardware timer module used to generate periodic, duty-cycle-adjustable pulse signals, including circuit units such as counters, comparators, and output control logic. The comparison register is a hardware register in the PWM generator used to store comparison thresholds. When the counter value reaches the comparison register value, a level-to-together operation is triggered. For example, a comparison register value of 1200 indicates that the output level changes from high to low when the count reaches 1200. The target strobe period represents the duration of the period used to control the flashing of the warning light. The reload register is a hardware register in the PWM generator used to store the upper limit of the cycle count. When the counter value reaches the reload register value, the counter is cleared and the counting restarts. For example, a reload register value of 2000 indicates that one pulse cycle is completed every 2000 clock cycles.
[0098] Specifically, the process involves: reading the timer count value corresponding to the high-level duration from the drive parameter buffer; accessing the control interface of the pulse width modulation generator (PWM generator) and reading the value of the timer's current enable status register; determining if the timer is running, and if so, writing a stop command to the control register to pause the timer counting; waiting for the timer stop completion flag to be set to confirm that the timer has entered the stop state; writing the timer count value corresponding to the high-level duration to the address of the PWM generator's compare register; reading the target strobe period value from the strobe control parameter buffer, reading the timer clock frequency from the system configuration parameters, calculating the target strobe period multiplied by the timer clock frequency and divided by 1000 to obtain the timer count value corresponding to the target strobe period; writing the timer count value corresponding to the target strobe period to the address of the PWM generator's reload register; reading back the contents of the PWM generator's compare register and reload register for verification to confirm that the written value matches the target value; writing a configuration update command to the control register to trigger the hardware to load new register parameters; clearing the current value of the timer counter and resetting the counter to zero.
[0099] Step 1066: Output a drive pulse sequence through a pulse width modulation generator to drive the LED flash to blink.
[0100] In this embodiment, the pulse width modulation generator refers to a hardware timer module used to generate periodic duty cycle adjustable pulse signals. The driving pulse sequence refers to a periodic sequence of level signals used to control the on / off state of the LED, consisting of alternating high and low levels. The LED flashlight refers to a warning indicator light composed of an LED and its driving circuit, used to provide visual warning signals to vehicles behind. Flashing indicates a periodic alternation of bright and dark illumination states in the LED flashlight, for example, cycling between bright and dark states every 200 milliseconds.
[0101] Specifically, an output enable command is written to the control register of the pulse width modulation (PWM) generator to activate the PWM signal output channel. A start command is written to the control register to activate the PWM generator's timer counting function. The timer increments from zero. When the count value is less than the value in the comparison register, the PWM generator outputs a high-level signal, which is transmitted to the control terminal of the LED driver circuit via its output pin. Upon receiving the high-level signal, the LED driver circuit turns on the power switch, allowing drive current to flow through the LED and causing it to illuminate. When the timer count reaches the value in the comparison register, the PWM generator output flips from high to low. Upon receiving the low-level signal, the LED driver circuit turns off the power switch, cutting off the drive current and extinguishing the LED. When the timer count reaches the value in the reload register, the timer counter automatically resets to zero and restarts counting. The PWM generator output returns to a high level, completing one full pulse cycle. The timer continues to run, repeating the above counting and level switching process. The pulse width modulation generator continuously outputs a periodic drive pulse sequence, and the LED flash lamp exhibits a periodic alternating bright and dark flashing state as the high and low levels of the drive pulse sequence change.
[0102] In the above embodiments, the optimal estimation of the fused state vector of the rear target vehicle and the real-time update of the posterior state covariance matrix are achieved by fusing millimeter-wave radar measurements and state predictions using a Kalman filter. To further improve the accuracy of motion feature extraction and the precision of lateral motion state assessment, this application also provides a transient high-current driving method for vehicle-mounted LED flashlights. This method calculates the instantaneous value of longitudinal acceleration based on the velocity component and inter-frame time difference in the fused state vector, compares it with the historical mean of longitudinal acceleration to obtain the acceleration mutation amplitude, detects the lateral position variance component in the posterior state covariance matrix to determine the lateral position confidence, and extracts the lateral position component when it is confident, calculates the lateral offset by the difference between the lateral position component and the lateral coordinate of the lane centerline, obtains the lateral offset change rate by dividing the difference between the lateral offset of the current frame and the previous frame by the inter-frame time difference, and obtains the lateral intrusion boundary distance by subtracting the absolute value of the lateral offset from the lane half-width. It then combines these motion parameters to form a motion feature set, accurately extracting the motion feature parameters of the target vehicle behind in multiple dimensions such as longitudinal acceleration, lateral offset, and lane intrusion. This provides accurate longitudinal motion characteristic data, lateral position deviation information, and lane intrusion warning judgment basis for subsequent collision time reciprocal calculation and collision risk index assessment. The following section combines... Figure 2 Another transient high-current driving method for vehicle-mounted LED flashlights in this application embodiment is described below:
[0103] Please see Figure 2 This is another flowchart illustrating a transient high-current driving method for a vehicle-mounted LED flashlight in an embodiment of this application.
[0104] Step 201: Calculate the instantaneous value of longitudinal acceleration by fusing the velocity component in the state vector and the inter-frame time difference; calculate the difference between the instantaneous value of longitudinal acceleration and the average value of historical instantaneous values of longitudinal acceleration to obtain the acceleration abrupt change amplitude.
[0105] In this embodiment, the fused state vector represents a data structure containing vehicle motion state parameters obtained through multi-sensor data fusion processing. The velocity component refers to the numerical value representing the vehicle's longitudinal motion speed in the fused state vector, measured in meters per second (m / s). For example, 15.5 indicates a longitudinal speed of 15.5 meters per second. The inter-frame time difference represents the time interval between two adjacent state updates, measured in seconds (0.1 indicates an interval of 0.1 seconds). The instantaneous longitudinal acceleration value represents the vehicle's acceleration in the direction of travel at the current moment, measured in meters per square second (m / s²). The historical mean of instantaneous longitudinal acceleration values refers to the arithmetic mean of the instantaneous longitudinal acceleration values over several past sampling periods. The acceleration abrupt change amplitude represents the degree of deviation of the current acceleration from the historical average acceleration, measured in meters per square second (m / s²).
[0106] Specifically, the current longitudinal velocity component value is read from the fused state vector and recorded as the current velocity, while the previous longitudinal velocity component value is read from the history buffer and recorded as the previous velocity. The time difference between the current frame and the previous frame is obtained. The velocity change is calculated by subtracting the previous velocity from the current velocity, and then divided by the inter-frame time difference to obtain the instantaneous longitudinal acceleration value. The instantaneous longitudinal acceleration values of the most recent N sampling periods are read from the acceleration history buffer queue, and these N values are summed and divided by N to obtain the average of the historical instantaneous longitudinal acceleration values. The acceleration abrupt change amplitude is obtained by subtracting the average of the historical instantaneous longitudinal acceleration values from the instantaneous longitudinal acceleration values. The instantaneous longitudinal acceleration values are stored at the tail of the acceleration history buffer queue, and the head value is deleted when the queue length exceeds N. The instantaneous longitudinal acceleration values and the acceleration abrupt change amplitude are stored in a motion feature temporary buffer for subsequent processing.
[0107] Step 202: Calculate the lateral offset and the rate of change of the lateral offset by the deviation between the lateral position component in the fused state vector and the lane centerline.
[0108] In this embodiment, the fused state vector represents a data structure containing vehicle motion state parameters obtained through multi-sensor data fusion processing. The lateral position component refers to the vehicle's position coordinates relative to the origin of the reference frame in the fused state vector, perpendicular to the driving direction, in meters. The lane centerline represents the trajectory connecting the geometric centers of the current driving lane, calculated by the lane line recognition module. The deviation represents the distance difference between the vehicle's lateral position and the lane centerline. The lateral offset refers to the distance the vehicle's actual lateral position deviates from the lane centerline, in meters; a positive value indicates a deviation to the right of the lane, and a negative value indicates a deviation to the left of the lane. For example, -0.3 indicates the vehicle is 0.3 meters to the left of the lane centerline. The rate of change represents the speed at which the lateral offset changes over time, in meters per second, reflecting the vehicle's lateral movement trend.
[0109] Specifically, the lateral position component value at the current moment is read from the fused state vector. The lateral coordinate value of the current lane centerline is obtained from the lane line recognition result. The lateral offset is obtained by subtracting the lateral coordinate of the lane centerline from the lateral position component. The lateral offset value of the previous moment is read from the lateral offset history buffer and recorded as the previous lateral offset. The inter-frame time difference between the current frame and the previous frame is obtained. The change in lateral offset is obtained by subtracting the previous lateral offset from the current lateral offset, and the change in lateral offset is divided by the inter-frame time difference to obtain the rate of change of lateral offset. The rate of change value is low-pass filtered to eliminate the influence of measurement noise, and the smoothed rate of change value is obtained from the filter output. The current lateral offset is stored in the lateral offset history buffer. The lateral offset and rate of change values are stored in the motion feature temporary buffer for subsequent processing.
[0110] In one possible implementation, the lateral offset and the rate of change of the lateral offset are calculated by fusing the deviation of the lateral position component in the state vector from the lane centerline, specifically including steps 2021-2022, as follows:
[0111] Step 2021: Detect the lateral position variance component in the posterior state covariance matrix corresponding to the fused state vector; when the lateral position variance component exceeds the preset lateral confidence threshold, mark the lateral position component as unavailable and retain the longitudinal motion features; when the lateral position variance component does not exceed the preset lateral confidence threshold, extract the lateral position component.
[0112] In this embodiment, the fused state vector represents a data structure containing vehicle motion state parameters obtained through multi-sensor data fusion processing. The posterior state covariance matrix is a symmetric matrix characterizing the uncertainty of state estimation after data fusion and updating; the diagonal elements of the matrix reflect the estimation error of each state component. The lateral position variance component refers to the diagonal element in the posterior state covariance matrix corresponding to the lateral position estimation error, with units of square meters. For example, 0.25 indicates that the lateral position estimation error variance is 0.25 square meters. A preset lateral confidence threshold is used to represent the critical variance value for determining whether the lateral position estimation is reliable, with units of square meters. For example, 0.5 indicates that the estimation is considered unreliable when the variance exceeds 0.5 square meters. Unavailable states indicate marked states where the data quality does not meet the usage requirements. Longitudinal motion features refer to the set of parameters describing the vehicle's motion characteristics along the driving direction, including information such as longitudinal acceleration.
[0113] Specifically, the corresponding posterior state covariance matrix data is read from the fused state vector data structure. The matrix index position corresponding to the horizontal position is determined according to the order of the state vector elements, and the horizontal position variance component value is read from the diagonal position of the posterior state covariance matrix. A preset horizontal confidence threshold value is read from the configuration parameter storage area. The horizontal position variance component is compared with the preset horizontal confidence threshold. When the horizontal position variance component value is greater than the preset horizontal confidence threshold value, the flag bit corresponding to the horizontal position component is set to an unavailable state in the state flag register, while maintaining the valid state of the vertical motion feature data in the motion feature temporary buffer. When the horizontal position variance component value is less than or equal to the preset horizontal confidence threshold value, the horizontal position component value is read from the fused state vector and written to the horizontal position data buffer for subsequent calculations.
[0114] Step 2022: Determine the lateral coordinates of the lane centerline based on the lane line position; obtain the lateral offset by the difference between the lateral position component and the lateral coordinates of the lane centerline; obtain the rate of change of the lateral offset by dividing the difference between the lateral offset of the current frame and the lateral offset of the previous frame by the inter-frame time difference.
[0115] In this embodiment, the lane line position represents the coordinates of the left and right lane boundary lines in the lateral direction, obtained through a visual sensor or map data. The lane centerline refers to the virtual reference line located in the center of the left and right lane boundary lines, representing the ideal driving trajectory of the lane. The lateral coordinates represent the positional value of an object perpendicular to the driving direction, in meters. The lateral position component refers to the value representing the vehicle's lateral position in the fused state vector. The difference represents the result of subtracting two values. The lateral offset refers to the distance the vehicle's lateral position deviates from the lane centerline, in meters; a positive value indicates deviation to the right, and a negative value indicates deviation to the left. The current frame represents the data at the current sampling time. The previous frame represents the data at the previous sampling time. The inter-frame time difference represents the time interval between two adjacent samples, in seconds. The rate of change represents the speed at which the lateral offset changes over time, in meters per second.
[0116] Specifically, the lateral position coordinates of the left and right lane lines are read from the lane line recognition result data. The sum of the left and right lane line lateral position coordinates is calculated and divided by 2 to obtain the lateral coordinate value of the lane centerline. The lateral position component value is read from the lateral position data buffer. The lateral position component is subtracted from the lane centerline lateral coordinate to obtain the lateral offset value, which is stored as the lateral offset of the current frame. The lateral offset value of the previous frame is read from the historical data buffer. The inter-frame time difference between the current and previous frames is obtained. The lateral offset of the current frame is subtracted from the lateral offset of the previous frame to obtain the lateral offset change, and the lateral offset change is divided by the inter-frame time difference to obtain the rate of change of the lateral offset. The lateral offset of the current frame is stored in the historical data buffer to update the lateral offset of the previous frame. The lateral offset and rate of change values are written to the motion feature temporary buffer for subsequent processing.
[0117] Step 203: Calculate the current lane half-width based on the lane line position, and subtract the absolute value of the lateral offset from the current lane half-width to obtain the lateral intrusion boundary distance; combine the instantaneous value of longitudinal acceleration, the amplitude of acceleration change, the lateral offset, the rate of change, and the lateral intrusion boundary distance into a motion feature set.
[0118] In this embodiment, lane line position represents the coordinates of the left and right lane boundary lines in the lateral direction, obtained through visual sensors or map data. Current lane half-width refers to the distance from the lane centerline to the boundary line of one lane, in meters; for example, 1.75 indicates a distance of 1.75 meters from the lane center to the boundary. Lateral offset represents the distance the vehicle's actual lateral position deviates from the lane centerline. Absolute values are used to indicate the magnitude of the value, ignoring positive and negative signs. Lateral intrusion distance refers to the remaining distance from the vehicle's current position to the nearest lane boundary line, in meters. Motion feature set represents a dataset containing multiple motion state feature parameters, used for subsequent risk assessment analysis.
[0119] Specifically, the lateral coordinates of the left and right lane lines are obtained from the lane line recognition results. The total lane width is calculated by subtracting the lateral coordinates of the left and right lane lines from the lateral coordinates of the right lane line. The total lane width is then divided by 2 to obtain the current lane half-width. The lateral offset value is read from the motion feature temporary buffer. The sign of the lateral offset is determined, and its absolute value is taken. The lateral intrusion boundary distance is obtained by subtracting the absolute value of the lateral offset from the current lane half-width. The instantaneous value of longitudinal acceleration, the magnitude of acceleration change, the lateral offset, and the rate of change are read sequentially from the motion feature temporary buffer. A motion feature set data structure is created, with the instantaneous value of longitudinal acceleration as the first element, the magnitude of acceleration change as the second element, the lateral offset as the third element, the rate of change as the fourth element, and the lateral intrusion boundary distance as the fifth element, written sequentially into the motion feature set. The assembled motion feature set is stored in the feature data buffer for subsequent use by the risk assessment module.
[0120] The following describes a transient high-current drive system for a vehicle-mounted LED flashlight in this application embodiment from a hardware processing perspective. Please refer to [link / reference]. Figure 3 This is a schematic diagram of the transient high-current drive system for a vehicle-mounted LED flashlight in an embodiment of this application.
[0121] It should be noted that, Figure 3 The structure of the transient high-current drive system for vehicle-mounted LED flashlights shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments in this application.
[0122] like Figure 3As shown, a transient high-current drive system for a vehicle-mounted LED flashlight includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303, such as executing the method described in the above embodiment. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.
[0123] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0124] The above description is merely a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for driving a vehicle-mounted LED flashlight with transient high current, characterized in that, The method includes: The radial distance and Doppler velocity of the millimeter-wave radar at the rear of the vehicle, as well as the lane line position and lateral pixel coordinates of the camera, are obtained. The radial distance, Doppler velocity, and lateral pixel coordinates are preprocessed and timestamp aligned to obtain a synchronous measurement sequence containing the initial relative distance, initial approximation velocity, and initial lateral offset. The position state quantity is initialized with the initial relative distance in the synchronous measurement sequence, the velocity state quantity is initialized with the initial approximation velocity, and the acceleration state quantity is initialized to a preset initial value. A target tracking state vector containing position state quantity, velocity state quantity and acceleration state quantity is constructed, and the state is updated by combining system noise and observation noise to obtain a fused state vector. Based on the fused state vector, longitudinal acceleration and lateral offset are extracted to generate a set of motion features; The reciprocal of the collision time and the lateral intrusion boundary distance are calculated based on the set of motion features, and the reciprocal of the collision time and the lateral intrusion boundary distance are weighted and fused to obtain the current collision risk index; When the current collision risk index exceeds the preset risk threshold, the target danger level is determined by combining the multi-frame trajectory deviation accumulation of the lateral offset. The target strobe period is determined based on the target hazard level identifier, and the duty cycle parameter of the drive signal is calculated. Based on the duty cycle parameter and the target strobe period, a drive pulse sequence for controlling the LED flash is generated, and the LED flash is driven to flash according to the drive pulse sequence.
2. The method according to claim 1, characterized in that, Preprocessing and timestamp alignment of the radial distance, Doppler velocity, and lateral pixel coordinates yields a synchronized measurement sequence containing the initial relative distance and initial approximation velocity, including: The product of the fixed hardware transmission delay of the millimeter-wave radar and the Doppler velocity is used as the range compensation amount; Subtract the distance compensation amount from the radial distance to obtain the compensated radial distance; The difference between the camera timestamp of the camera and the radar timestamp of the millimeter-wave radar is used as the synchronization error. Linear interpolation is used to align the compensated radial distance and the Doppler velocity to the acquisition time corresponding to the radar timestamp. The aligned compensated radial distance is used as the initial relative distance, and the aligned Doppler velocity is used as the initial approximation velocity. The coordinate deviation of the horizontal pixel coordinates is compensated according to the pre-calibrated distortion correction coefficients to obtain the reference pixel coordinates, and the reference pixel coordinates are mapped to the initial horizontal offset. The initial approximation velocity, the initial relative distance, and the initial lateral offset are combined into the synchronous measurement sequence.
3. The method according to claim 2, characterized in that, The state update, which combines system noise and observation noise, yields a fused state vector, including: The state covariance matrix is initialized with the pre-calibrated sensor error variance, and the state covariance matrix includes the process noise covariance matrix and the observation noise covariance matrix; The longitudinal acceleration change rate of the vehicle is obtained. When the longitudinal acceleration change rate exceeds the acceleration switching threshold, the ratio of the longitudinal acceleration change rate to the acceleration switching threshold is used as the first adjustment coefficient. The process noise covariance matrix is multiplied by the first adjustment coefficient to perform state update. The signal-to-noise ratio (SNR) of the millimeter-wave radar is obtained. When the SNR is lower than the SNR attenuation threshold, the ratio of the SNR attenuation threshold to the SNR is used as a second adjustment coefficient. The observation noise covariance matrix is multiplied by the second adjustment coefficient to perform state update. The filter gain matrix is calculated based on the process noise covariance matrix and the observation noise covariance matrix after the state update. The product of the filter gain matrix and the current observation residual is then added to the state vector to obtain the fused state vector.
4. The method according to claim 1, characterized in that, The step of extracting longitudinal acceleration and lateral offset based on the fused state vector to generate a motion feature set includes: The instantaneous value of longitudinal acceleration is calculated using the velocity component and inter-frame time difference in the fused state vector; The difference between the instantaneous value of longitudinal acceleration and the average of historical instantaneous values of longitudinal acceleration is calculated to obtain the acceleration abrupt change amplitude; The lateral offset and the rate of change of the lateral offset are calculated by the deviation of the lateral position component in the fused state vector from the lane centerline. The current lane half-width is calculated based on the lane line position, and the lateral intrusion boundary distance is obtained by subtracting the absolute value of the lateral offset from the current lane half-width. The instantaneous value of longitudinal acceleration, the magnitude of acceleration abrupt change, the lateral offset, the rate of change, and the lateral intrusion boundary distance constitute the motion feature set.
5. The method according to claim 4, characterized in that, The step of calculating the lateral offset and the rate of change of the lateral offset by the deviation of the lateral position component in the fused state vector from the lane centerline includes: Detect the lateral position variance component in the posterior state covariance matrix corresponding to the fused state vector; When the lateral position variance component exceeds the preset lateral confidence threshold, the lateral position component is marked as unavailable, while the longitudinal motion characteristics are preserved. When the lateral position variance component does not exceed the preset lateral confidence threshold, the lateral position component is extracted; Determine the lateral coordinates of the lane centerline based on the lane line position; The lateral offset is obtained by the difference between the lateral position component and the lateral coordinate of the lane centerline; The rate of change of the lateral offset is obtained by dividing the difference between the lateral offset of the current frame and the lateral offset of the previous frame by the inter-frame time difference.
6. The method according to claim 1, characterized in that, The step of calculating the reciprocal of the collision time and the lateral intrusion boundary distance based on the set of motion features, and fusing them to obtain the current collision risk index, includes: Calculate the reciprocal of the collision time based on the instantaneous value of longitudinal acceleration and relative velocity in the set of motion features; The lateral intrusion prediction time is calculated based on the rate of change of the lateral intrusion boundary distance and the lateral offset. When the lateral intrusion prediction time is less than a preset time threshold, the reciprocal of the collision time and the lateral intrusion prediction time are weighted and fused by a preset longitudinal risk weight coefficient and a preset lateral risk weight coefficient to obtain the current collision risk index.
7. The method according to claim 1, characterized in that, When the current collision risk index exceeds a preset risk threshold, the target hazard level indicator is determined by combining the cumulative trajectory deviation of the lateral offset across multiple frames, including: Retrieve the upward trigger threshold and downward release threshold corresponding to the historical hazard level of the vehicle from the preset risk classification parameter table; The sum of the absolute values of the lateral offsets of multiple consecutive historical frames is used as the cumulative trajectory deviation of the multiple frames; The threshold reduction amount is calculated based on the cumulative amount of trajectory deviation across multiple frames, and the target rise trigger threshold is obtained by subtracting the threshold reduction amount from the rise trigger threshold. When the current collision risk index is greater than the target rising trigger threshold, the rising continuous frame counter is incremented. If the rising continuous frame counter reaches the preset number of rising frames, the historical danger level is increased. When the current collision risk index is less than the drop release threshold, the drop continuous frame counter is incremented. If the drop continuous frame counter reaches a preset number of drop frames, the historical danger level is downgraded. The updated historical hazard level will be used as the identifier for the target hazard level.
8. The method according to claim 1, characterized in that, The step of determining the target strobe period based on the target hazard level identifier and calculating the duty cycle parameter of the drive signal includes: The corresponding strobe cycle reference value is retrieved from the preset mapping table using the target hazard level identifier; The difference between the current longitudinal acceleration and the average longitudinal acceleration of multiple consecutive historical frames is calculated to obtain the acceleration abrupt change amplitude. The difference between the current collision risk index and the collision risk index of the previous moment is also calculated to obtain the risk gradient. Calculate the correction factor based on the acceleration mutation magnitude and the risk gradient; The target flicker period is calculated based on the flicker period reference value and the correction factor; Obtain the junction temperature monitoring value of the light-emitting diode, and calculate the duration of the thermal constraint high level based on the junction temperature monitoring value; The duty cycle parameter is obtained by dividing the duration of the thermal constraint high level by the target strobe period.
9. The method according to claim 1, characterized in that, The step of generating a drive pulse sequence for controlling the LED flash lamp based on the duty cycle parameter and the target strobe period, and controlling the LED flash lamp to blink according to the drive pulse sequence, includes: The high-level duration of the driving pulse sequence is obtained by multiplying the duty cycle parameter by the target strobe period. Write the high-level duration into the compare register of the pulse width modulation generator, and write the target strobe period into the reload register of the pulse width modulation generator; The pulse width modulation generator outputs the driving pulse sequence to drive the LED flash to blink.
10. A transient high-current drive system for vehicle-mounted LED flashlights, characterized in that, The vehicle-mounted LED flash transient high-current drive system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the vehicle-mounted LED flash transient high-current drive system to perform the method as described in any one of claims 1-9.