A method and device for automatically leveling vehicle headlights

By acquiring road conditions and body height change signals, calculating vehicle posture information, and adaptively adjusting the headlight illumination direction, it solves the problems of dependence on the inertial measurement unit and noise influence in the existing technology, and achieves more stable headlight adjustment. , reducing the risk of traffic accidents.

CN115837875BActive Publication Date: 2024-09-06CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211452543.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2024-09-06
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

The existing headlight adaptive adjustment system has a high dependence on the acceleration measured by the inertial measurement unit and is easily affected by noise. Especially on rough roads, the jitter of the road surface causes the system to be unstable and cannot effectively offset changes in vehicle attitude, affecting the driver's vision. experience.

Method used

By acquiring road condition information and body height change signals, the vehicle posture information is calculated, the headlight control signal is generated to achieve automatic leveling, the pitch angle, roll angle and vertical displacement data are provided, the headlight illumination direction is adaptively adjusted, and the lock Angle the light to maintain stability on rough roads.

Benefits of technology

It improves the stability and robustness of headlight adjustment, avoids the risk of traffic accidents caused by changes in illumination position, ensures the stability of the illumination range, and reduces visual fatigue caused by changes in vehicle posture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115837875B
    Figure CN115837875B
Patent Text Reader

Abstract

The present invention discloses a method and device for automatically leveling vehicle headlights, the method comprising: obtaining road condition information; judging whether the current road surface is a rough road surface according to the road condition information; if not, obtaining vehicle height change signals of multiple preset positions; calculating vehicle posture information according to vehicle height change signals of multiple preset positions; obtaining an initial aiming angle; obtaining headlight turning angle information according to vehicle posture information and the initial aiming angle; generating a headlight control signal according to the headlight turning angle information; and sending the headlight control signal to the headlight so that the headlight performs light leveling according to the headlight control signal. The vehicle headlight automatic leveling method provided by the present invention generates a control signal based on a vehicle height change signal, and adaptively adjusts the illumination direction of the headlight vertically when the vehicle posture changes, so that its illumination range remains stable, avoiding the potential risk of traffic accidents caused by its illumination position being too high or too low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of vehicles, and in particular to a method and a device for automatically leveling a vehicle headlamp. Background Art

[0002] On a horizontal road, factors such as vehicle load changes, vehicle speed changes, and vehicle turns may cause the vehicle body to change in posture, which in turn causes the headlights to shake with the vehicle body. This phenomenon can cause blind spots in areas that should be illuminated and cause visual fatigue to the driver.

[0003] In existing studies, researchers have made the headlight's illumination range more stable by making appropriate adjustments to the headlight.

[0004] There is a headlamp adaptive adjustment system in the prior art, in which an inertial measurement unit and a processor are installed at each of the left and right headlamps. The inertial measurement unit is used to measure acceleration and angular velocity and calculate the posture of the vehicle body, and then send the calculated posture to the corresponding processor. The processor determines whether the vehicle is in a stationary state according to the external input vehicle speed signal. If the vehicle is in a stationary state, the acceleration measured by the inertial measurement unit is considered to be the acceleration of gravity. The posture of the vehicle body at this time can be determined according to its relative direction with the inertial measurement unit. The processor sends a corresponding instruction to the stepper motor connected to the headlamp according to the posture at this time, and the stepper motor rotates vertically so that the illumination direction of the headlamp meets the regulatory requirements; if the vehicle is in a moving state, the inertial measurement unit measures the acceleration of the vehicle to determine whether the vehicle is in an acceleration / braking condition. The processor sends an instruction to the stepper motor according to this information to control the headlamp to rotate vertically to offset the change in the illumination direction of the headlamp caused by the acceleration / deceleration of the vehicle.

[0005] The above scheme is highly dependent on the acceleration measured by the inertial measurement unit. However, the acceleration measured by the inertial measurement unit usually has high noise, which may affect the accuracy of the stepper motor output. In addition, when the vehicle is driving on a rough road, the frequent shaking of the road surface will cause the measurement results of the inertial measurement unit to change frequently and drastically, making the position of the stepper motor unstable, resulting in the system not only failing to achieve the effect of safety lighting, but also causing visual discomfort to the driver and the driver of the oncoming vehicle. Summary of the invention

[0006] The purpose of the present invention is to provide a method for automatically leveling vehicle headlights, which obtains the rotation angles of the stepper motors of the left and right headlights through real-time estimation of the vehicle state and the road state, thereby realizing the automatic leveling function of the headlights.

[0007] The present invention provides a method for automatically leveling a vehicle headlamp, comprising:

[0008] Get traffic information;

[0009] Determine whether the current road surface is rough according to the road condition information; if not,

[0010] Acquiring vehicle height change signals at multiple preset positions;

[0011] Calculating vehicle posture information according to vehicle height change signals at the plurality of preset positions;

[0012] Get the initial aiming angle;

[0013] Obtaining headlamp angle information according to the vehicle posture information and the initial aiming angle;

[0014] generating a headlamp control signal according to the headlamp angle information;

[0015] The headlamp control signal is sent to the headlamp, so that the headlamp performs light leveling according to the headlamp control signal.

[0016] Optionally, the vehicle headlamp automatic leveling method further includes:

[0017] Determine whether the current road surface is a rough road surface according to the road condition information; if so,

[0018] generating a control signal for locking the angle of the headlight;

[0019] sending the control signal for locking the headlamp angle to the headlamp;

[0020] So that the headlamp locks the light angle according to the headlamp control signal.

[0021] Optionally, the vehicle height change signals of the plurality of preset positions include: a relative change in the left front vehicle height, a relative change in the left rear vehicle height, a relative change in the right front vehicle height, and a relative change in the right rear vehicle height;

[0022] Calculating the vehicle posture information according to the vehicle height change signals at the plurality of preset positions includes:

[0023] Obtaining the distance between the left front vehicle height sensor and the left rear vehicle height sensor, and the distance between the left front vehicle height sensor and the right front vehicle height sensor;

[0024] The vehicle posture information is calculated based on the relative change in the left front vehicle height, the relative change in the left rear vehicle height, the relative change in the right front vehicle height, the relative change in the right rear vehicle height, the distance between the left front vehicle height sensor and the left rear vehicle height sensor, and the distance between the left front vehicle height sensor and the right front vehicle height sensor.

[0025] Optionally, obtaining the headlamp angle information according to the vehicle posture information and the initial aiming angle includes:

[0026] Obtain the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle's sprung mass coordinate system, the distance between the left headlamp and the right headlamp, the wheelbase, the target illumination distance, and the height of the vehicle's center of gravity from the ground;

[0027] The headlamp angle information is calculated based on the vehicle posture information, the initial illumination angle, the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle's sprung mass coordinate system, the distance between the left headlamp and the right headlamp, the wheelbase, the target illumination distance, and the height of the vehicle's center of gravity from the ground.

[0028] Optionally, the vehicle height change signals of the plurality of preset positions include: a relative change in the left front vehicle height, a relative change in the left rear vehicle height;

[0029] Calculating the vehicle posture information according to the vehicle height change signals at the plurality of preset positions includes:

[0030] Obtain the distance between the left front vehicle height sensor and the left rear vehicle height sensor;

[0031] The vehicle posture information is calculated according to the relative change in the left front vehicle height, the relative change in the left rear vehicle height, and the distance between the left front vehicle height sensor and the left rear vehicle height sensor.

[0032] Optionally, obtaining the headlamp angle information according to the vehicle posture information and the initial aiming angle includes:

[0033] Obtain the headlamp installation height, the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, the wheelbase, the target irradiation distance, and the height of the vehicle's center of gravity from the ground;

[0034] The headlamp angle information is calculated based on the vehicle posture information, the initial aiming angle, the headlamp installation height, the projection of the distance between the left headlamp and the front axle on the x-axis of the vehicle sprung mass coordinate system, the wheelbase, the target irradiation distance, and the height of the vehicle's center of gravity from the ground.

[0035] Optionally, acquiring the target irradiation distance includes:

[0036] Get the headlamp installation height and vehicle speed;

[0037] Obtain target illumination distance based on headlamp height and vehicle speed.

[0038] Optionally, generating a headlamp control signal according to the headlamp angle information includes:

[0039] Get the lower limit of the output angle, the upper limit of the output angle, the anti-shake threshold, the control cycle, the output angle of the stepper motor at the previous moment, the limiting function, and the output angle scaling value at the current moment;

[0040] A headlamp control signal is generated according to a lower limit of an output angle, an upper limit of an output angle, an anti-shake threshold, a control cycle, an output angle of the stepper motor at a previous moment, a limiting function, and an output angle scaling value at a current moment.

[0041] Optionally, obtaining the output angle scaling value at the current moment includes:

[0042] Obtaining a scaling factor, a left headlamp output angle, and / or a right headlamp output angle;

[0043] The output angle scaling value at the current moment is calculated according to the scaling factor, the left headlamp output angle and / or the right headlamp output angle.

[0044] In another aspect, the present invention provides an automatic leveling device for vehicle headlights, the automatic leveling device for vehicle headlights comprising:

[0045] A road condition information acquisition module, wherein the road condition information acquisition module is used to acquire road condition information;

[0046] A judgment module, used to judge whether the current road surface is a rough road surface according to the road condition information;

[0047] A vehicle height change signal acquisition module, wherein the vehicle height change signal acquisition module is used to acquire vehicle height change signals of a plurality of preset positions when the judgment result of the judgment module is no;

[0048] A posture information acquisition module, the posture information acquisition module is used to calculate the vehicle posture information according to the vehicle height change signals at the plurality of preset positions;

[0049] An initial aiming angle acquisition module, wherein the initial aiming angle acquisition module is used to acquire an initial aiming angle;

[0050] A headlamp angle information acquisition module, wherein the headlamp angle information acquisition module is used to obtain the headlamp angle information according to the vehicle posture information and the initial irradiation point when the judgment result of the judgment module is no;

[0051] A headlamp control signal acquisition module, the headlamp control signal acquisition module is used to generate a headlamp control signal according to the headlamp turning angle information;

[0052] A sending module is used to send the headlight control signal to the headlight, so that the headlight performs light leveling according to the headlight control signal.

[0053] The beneficial effects of the present invention are:

[0054] The vehicle headlamp automatic leveling method provided by the present invention generates a control signal based on a vehicle body height change signal, has higher stability and robustness than an inertial measurement element solution, and can simultaneously provide three posture data of pitch angle, roll angle and vertical displacement for output angle calculation, and adaptively adjust the illumination direction of the headlamp vertically when the vehicle posture changes, so that its illumination range remains stable, avoiding the potential risk of traffic accidents caused by its illumination position being too high or too low. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a schematic diagram of the relationship between the position of the light and dark cut-off line and the irradiation distance according to the present invention.

[0056] Figure 2 The present invention is a schematic flow chart of the method for automatically leveling vehicle headlights.

[0057] Figure 3 It is a schematic diagram of the vehicle body posture change of the present invention.

[0058] Figure 4 This is a schematic diagram of the output angle calculation of the present invention.

[0059] Figure 5 This is a schematic diagram of the vehicle status during the vehicle acceleration process after using the ALS method described in the present invention.

[0060] Figure 6 This is a schematic diagram of the vehicle status when the vehicle starts braking after using the ALS method described in the present invention.

[0061] Figure 7 This is a schematic diagram of the vehicle status when the vehicle comes to a complete stop using the ALS method described in the present invention.

[0062] Figure 8 Schematic diagram of the vehicle state during the vehicle acceleration process without the ALS method described in the present invention.

[0063] Fig. 9 This is a schematic diagram of the vehicle state when the vehicle starts braking without the ALS method described in the present invention.

[0064] Fig.10 This is a schematic diagram of the vehicle status when the vehicle is completely stopped without the ALS method described in the present invention.

[0065] Fig.11 This is a flow chart of road surface recognition according to the present invention.

[0066] Fig.12 This is the decision tree flow chart of the present invention.

[0067] Fig.13 The present invention is a schematic flow chart of the method for automatically leveling vehicle headlights.

[0068] Fig.14 It is a schematic diagram of an electronic device for implementing the vehicle headlamp automatic leveling method provided by the present invention. DETAILED DESCRIPTION

[0069] The present invention is further described in detail below so that those skilled in the art can implement it according to the description.

[0070] Fig.13 The figure is a flow chart of a method for automatically leveling vehicle headlights according to an embodiment of the present invention.

[0071] Reference Fig.13 The present invention provides a method for automatically leveling a vehicle headlamp, comprising:

[0072] Get traffic information;

[0073] Determine whether the current road surface is rough according to the road condition information; if not,

[0074] Acquiring vehicle height change signals at multiple preset positions;

[0075] Calculate vehicle posture information based on a vehicle height change signal at a preset position;

[0076] Get the initial aiming angle;

[0077] Obtaining headlamp turning angle information according to vehicle posture information and initial aiming angle;

[0078] generating a headlamp control signal according to the headlamp angle information;

[0079] The headlamp control signal is sent to the headlamp, so that the headlamp performs light leveling according to the headlamp control signal.

[0080] The vehicle headlamp automatic leveling method provided by the present invention generates a control signal based on a vehicle body height change signal, has higher stability and robustness than an inertial measurement element solution, and can simultaneously provide three posture data of pitch angle, roll angle and vertical displacement for output angle calculation, and adaptively adjust the illumination direction of the headlamp vertically when the vehicle posture changes, so that its illumination range remains stable, avoiding the potential risk of traffic accidents caused by its illumination position being too high or too low.

[0081] In one embodiment, the method for automatically leveling vehicle headlights further includes:

[0082] Determine whether the current road surface is a rough road surface according to the road condition information; if so,

[0083] generating a control signal for locking the angle of the headlight;

[0084] sending the control signal for locking the headlamp angle to the headlamp;

[0085] So that the headlamp locks the light angle according to the headlamp control signal.

[0086] In one embodiment, the vehicle height change signals of the plurality of preset positions include: a relative change in the left front vehicle height, a relative change in the left rear vehicle height, a relative change in the right front vehicle height, and a relative change in the right rear vehicle height;

[0087] Calculating vehicle posture information based on vehicle height change signals at multiple preset positions includes:

[0088] Obtaining the distance between the left front vehicle height sensor and the left rear vehicle height sensor, and the distance between the left front vehicle height sensor and the right front vehicle height sensor;

[0089] The vehicle posture information is calculated based on the relative change in the left front body height, the relative change in the left rear body height, the relative change in the right front body height, the relative change in the right rear body height, the distance between the left front body height sensor and the left rear body height sensor, and the distance between the left front body height sensor and the right front body height sensor.

[0090] Specifically, the vehicle posture information is calculated according to the following formula:

[0091]

[0092]

[0093]

[0094] Where θ is the pitch angle of the vehicle's sprung mass relative to the vehicle's unsprung mass, Z fl is the relative change in the height of the left front vehicle body, Z rl is the relative change in the height of the left rear vehicle body, Z fr is the relative change in the height of the right front vehicle body, Z rr is the relative change in the right rear vehicle height, γ is the roll angle of the vehicle sprung mass relative to the vehicle unsprung mass, Δz is the z-axis displacement of the vehicle sprung mass relative to the vehicle unsprung mass, L0 is the distance between the left front vehicle height sensor and the left rear vehicle height sensor, and W0 is the distance between the left front vehicle height sensor and the right front vehicle height sensor.

[0095] The vehicle posture information includes: the pitch angle of the vehicle's sprung mass relative to the vehicle's unsprung mass, the roll angle of the vehicle's sprung mass relative to the vehicle's unsprung mass, and the z-axis displacement of the vehicle's sprung mass relative to the vehicle's unsprung mass.

[0096] In one embodiment, obtaining the headlamp angle information according to the vehicle posture information and the initial aiming angle includes:

[0097] Obtain the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle's sprung mass coordinate system, the distance between the left headlamp and the right headlamp, the wheelbase, the target illumination distance, and the height of the vehicle's center of gravity from the ground;

[0098] The headlamp turning angle information is calculated based on the vehicle posture information, the initial illumination angle, the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle's sprung mass coordinate system, the distance between the left headlamp and the right headlamp, the wheelbase, the target illumination distance, and the height of the vehicle's center of gravity from the ground.

[0099] Specifically, the headlamp angle information is calculated according to the following formula:

[0100]

[0101]

[0102] In the formula, α Lout is the output angle of the left headlamp, L1 is the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, W1 is the distance between the left headlamp and the right headlamp, L is the wheelbase, D(v) is the target irradiation distance, α0 is the initial aiming angle, H is the height of the vehicle center of gravity from the ground, α Rout is the output angle of the right headlamp.

[0103] It can be known that the output angles of the left headlamp and the right headlamp are both positive when they are directed downward.

[0104] In one embodiment, the vehicle height change signals of the plurality of preset positions include: a relative change in the left front vehicle height, a relative change in the left rear vehicle height;

[0105] Calculating vehicle posture information based on vehicle height change signals at multiple preset positions includes:

[0106] Obtain the distance between the left front vehicle height sensor and the left rear vehicle height sensor;

[0107] The vehicle posture information is calculated based on the relative change in the left front vehicle height, the relative change in the left rear vehicle height, and the distance between the left front vehicle height sensor and the left rear vehicle height sensor.

[0108] Specifically, the vehicle posture information is calculated according to the following formula:

[0109]

[0110] γ=0

[0111]

[0112] Where θ is the pitch angle of the vehicle's sprung mass relative to the vehicle's unsprung mass, Z f is the relative change in the height of the left front vehicle body, Z r is the relative change in the left rear vehicle height, γ is the roll angle of the vehicle sprung mass relative to the vehicle unsprung mass, Δz is the z-axis displacement of the vehicle sprung mass relative to the vehicle unsprung mass, and L0 is the distance between the left front vehicle height sensor and the left rear vehicle height sensor.

[0113] In one embodiment, obtaining the headlamp angle information according to the vehicle posture information and the initial aiming angle includes:

[0114] Obtain the headlamp installation height, the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, the wheelbase, the target irradiation distance, and the height of the vehicle's center of gravity from the ground;

[0115] The headlamp turning angle information is calculated based on the vehicle posture information, initial aiming angle, headlamp installation height, projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle's sprung mass coordinate system, wheelbase, target irradiation distance, and height of the vehicle's center of gravity from the ground.

[0116] Specifically, the headlamp angle information is calculated according to the following formula:

[0117]

[0118] In the formula, α out is the output angle of the headlamp, H0 is the installation height of the headlamp, L1 is the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, L is the wheelbase, D(v) is the target irradiation distance, H is the height of the vehicle's center of gravity from the ground, and α0 is the initial aiming angle.

[0119] In this embodiment, the output angle of the headlamp is positive when it is downward; the output angles of the left headlamp and the right headlamp are the same.

[0120] In one embodiment, obtaining the target irradiation distance includes:

[0121] Get the headlamp installation height and vehicle speed;

[0122] Obtain target illumination distance based on headlamp height and vehicle speed.

[0123] Specifically, the target irradiation distance is calculated according to the following formula:

[0124]

[0125] Where H0 is the headlight installation height and v is the vehicle speed.

[0126] In one embodiment, generating a headlamp control signal according to the headlamp angle information includes:

[0127] Get the lower limit of the output angle, the upper limit of the output angle, the anti-shake threshold, the control cycle, the output angle of the stepper motor at the previous moment, the limiting function, and the output angle scaling value at the current moment;

[0128] A headlamp control signal is generated according to a lower limit of an output angle, an upper limit of an output angle, an anti-shake threshold, a control cycle, an output angle of the stepper motor at a previous moment, a limiting function, and an output angle scaling value at a current moment.

[0129] Specifically, the output angle of the stepper motor of the vehicle headlight is calculated according to the following formula:

[0130]

[0131] In the formula, α fout (t) is the output angle of the stepper motor at time t (current time), α min is the lower limit of the output angle, α max is the upper limit of the output angle, α thres is the anti-shake threshold, t0 is the control period, α fout (t-t0) is the output angle of the stepper motor at time t-t0, f(α out-1 (t)) is the limiting function, α out-1 (t) is the output angle scaling value at time t.

[0132] In one embodiment,

[0133] Obtaining the output angle scaling value at the current time (time t) includes:

[0134] Obtaining a scaling factor, a left headlamp output angle, and / or a right headlamp output angle;

[0135] The output angle scaling value at the current moment is calculated according to the scaling factor, the output angle of the left headlamp and / or the output angle of the right headlamp. Specifically, the output angle scaling value at the moment t is calculated according to the following formula:

[0136] α out-1 (t) = k a α(i)

[0137] In the formula, ka is the scaling factor, and α(i) is the left headlamp output angle and / or the right headlamp output angle.

[0138] A vehicle headlamp automatic leveling method provided by the present invention is described in detail below with reference to a specific embodiment. It should be noted that this embodiment is not a limitation of the present invention.

[0139] The present invention provides an automatic leveling method for vehicle headlamps (ALS, Automotive Headlamp Leveling System), which takes into account the automatic leveling of the vehicle headlamp under the low beam when the vehicle is traveling on a horizontal and flat road surface, a rough road surface, a slope, a transition between two sections of road surfaces with different slopes, and traveling over a speed bump or a large pothole.

[0140] A horizontal road surface refers to a road surface that is flat, has no bumps, and is perpendicular to the direction of gravity. Figure 1 As shown in the figure, it is easy to think from the definition of the light-dark cut-off line that since the light emitted by the headlamp can produce a light-dark dividing line on the vertical screen within a certain distance in front, it should also be able to produce a certain light-dark dividing line on the horizontal road ahead. The projection of the distance between the light-dark dividing line on the ground and the headlamp on the ground is called the "irradiation distance" of the headlamp, denoted as D. According to the position of the light-dark cut-off line of the headlamp on the light distribution screen, its illumination distance on the horizontal road ahead can be calculated:

[0141]

[0142] Where H0 is the installation height of the headlamp; α0 is the initial aiming angle, also known as the initial downward tilt angle, which is positive when it is downward. In the light distribution test, the value of α0 can be calculated by the following formula:

[0143]

[0144] In the low beam light distribution test, D0 is the distance between the headlight and the light distribution screen, D0 is 10m, h0 is the height of the light-dark cut-off line, and H0-h0 is 0.1m; due to the different installation conditions of the low beam lights on actual vehicles, the value of α0 is not exactly the same. GB4785 stipulates that the initial aiming of the low beam lights should be between -1.0% and -1.5%, that is, 0.57°<α0<0.86°.

[0145] The point located on the light-dark dividing line on the ground and directly in front of the left and right headlights is called the aiming point of the left and right headlights. It can be considered that the area between the headlights and their aiming points is within the effective lighting range of the headlights. Therefore, "keeping the headlight illumination range stable" can be equivalently described as "keeping the position of the aiming points of the left and right headlights stable."

[0146] A coordinate system is established with the unsprung mass of the vehicle as a reference. The direction of the line connecting the center of the front wheel axle and the center of the rear wheel axle is the x-axis direction (pointing to the front of the vehicle), the direction of the wheel axle is the y-axis direction (pointing to the left side of the vehicle), and the direction perpendicular to the xy plane is the z-axis direction (pointing to the top of the vehicle); a coordinate system is established with the sprung mass of the vehicle as a reference. The direction of the axis of symmetry of the vehicle chassis is the x-axis direction (pointing to the front of the vehicle), the direction perpendicular to the chassis is the z-axis direction (pointing to the top of the vehicle), and the direction perpendicular to the xz plane is the y-axis direction (pointing to the left side of the vehicle). When the vehicle is stationary on a horizontal road and under rated load (rated state), the center of gravity of the vehicle is selected as the common origin of the two coordinate systems, and the two coordinate systems completely overlap. The aiming points of the left and right headlights at this time are called initial aiming points, and their coordinates in the unsprung mass coordinate system are recorded as L and L respectively. A0 =[x L0 ,y L0 ,z L0 ], R A0 =[x R0 ,y R0 ,z R0 ]. When the vehicle is driving on a horizontal road, if the deformation of the tire is ignored, the xy plane of the unsprung mass coordinate system is always parallel to the xy plane of the inertial system, while the position of the sprung mass coordinate system relative to the unsprung mass coordinate system will change with changes in load, vehicle speed, etc. Since the headlight is fixedly connected to the sprung mass, its coordinates and illumination direction in the unsprung mass coordinate system will also change, and thus the position of its aiming point will also change. In order to "offset" this change as much as possible, it is necessary to output a turning angle α to the left and right headlights respectively. Lout , α Rout , the coordinates of the aiming points of the left and right headlights in the unsprung mass coordinate system are recorded as L A =[x L ,y L ,z L ], R A =[x R ,y R ,z R ], the condition for the headlamp aiming point to remain stable is:

[0147]

[0148] That is, the coordinates of the aiming points of the left and right headlights in the unsprung mass coordinate system remain constant.

[0149] Obviously, L A is the position of the sprung mass relative to the unsprung mass A and A L The left headlight turning angle α output by the S method Lout The function of R Ais the position A of the sprung mass relative to the unsprung mass and the right headlamp angle α output by the ALS method Rout function, so the above formula can be rewritten as:

[0150]

[0151] Formula (1-4) is the goal to be achieved by the vehicle headlight automatic leveling method described in the present invention.

[0152] In order to derive the calculation formula of the output angle in the ALS method using formula (1-4), two problems need to be solved:

[0153] 1. Obtain the position A of the vehicle's sprung mass relative to the unsprung mass:

[0154] There are currently three solutions for obtaining the sprung mass position, which are applicable to three types of vehicles equipped with different sensors: (1) four vehicle height sensors are configured and installed near the four wheels to obtain information through the CAN bus; (2) two vehicle height sensors are configured and installed near the left front and left rear wheels respectively to directly collect information through the AD module; (3) a gyroscope is configured to directly obtain the attitude angle of the vehicle body.

[0155] like Figure 2 As shown, for four vehicle height sensors and two vehicle height sensors, the raw data measured by the sensors need to be converted into usable, high-quality ALS method input signals.

[0156] For the four vehicle height sensor solutions, the sensor measurement signals do not need to be filtered. They only need to be converted into dimensions and subtracted from the zero point before they can be used as the input of the ALS method.

[0157] For the two vehicle height sensors, their sensor measurement signals need to be converted. The linear relationship between the sensor output voltage and the input angle is used to obtain the linear relationship between the sprung and unsprung relative height measured by the vehicle height sensor and the output voltage. The value of the sprung and unsprung relative height corresponding to a sensor in a certain state is subtracted from its zero point to obtain the relative height change Z measured by the left front or left rear wheel sensor in that state. f or Z r , as the input of the ALS method.

[0158] The digital signal output by the vehicle height sensor contains noise and needs to be filtered.

[0159] After filtering the static part and the dynamic part of the vehicle's driving respectively, it is determined to select a sliding window mean filter with a window width of 10 to perform smoothing filtering on the AD signal.

[0160] Among them, the height value measured by the vehicle height sensor when the vehicle is in the rated state is called the zero point of the sensor.

[0161] When the body posture changes, the aiming point of the headlight should always be maintained at the initial aiming point, that is, the aiming point when the vehicle is in the rated state. Therefore, the posture of the sprung mass should also be based on the posture in the rated state as a reference. The measured values ​​of the four body height sensors in this state are Z 0_fl ,Z 0_fr ,Z 0_rl ,Z 0_rr (fl: left front, fr: right front, rl: left rear, rr: right rear), these four values ​​are called the "zero points" of the four vehicle height sensors. When the sprung mass posture changes to a certain state, the measured values ​​of the four vehicle height sensors also change accordingly. The changes of the four sensor measured values ​​relative to their respective zero points are recorded as Z fl , Z fr , Z rl , Z rr ,like Figure 3 As shown in the figure (the dotted box corresponds to the initial posture of the sprung mass under the rated state, the solid box corresponds to its changed posture, and the four vertices of each box correspond to the connection points between the four sensors and the sprung mass), these four measured value changes are used as the input of the ASL method to estimate the relative posture of the sprung mass and the unsprung mass.

[0162] The relative position between two coordinate systems in three-dimensional space can be described by six parameters: the Euler angles in three directions (pitch angle - θ - rotation around the Y axis, roll angle - γ - rotation around the X axis, yaw angle Rotation around the Z axis) and relative displacements in three dimensions Δx, Δy, Δz, using Z fl , Z fr , Z rl , Z rr It is impossible to calculate the above six parameters from four values. To simplify the problem, when the vehicle is driving on a horizontal road, the yaw angle of the sprung mass relative to the unsprung mass coordinate system is The x-axis displacement Δx and the y-axis displacement Δy can be ignored. It can be assumed that there are only pitch motion θ, roll motion γ and z-axis motion Δz between the two coordinate systems. The order of change from the unsprung mass coordinate system to the sprung mass coordinate system is θ-γ-Δz (all with the unsprung mass coordinate system as a reference).

[0163] Under rated conditions, record the coordinates of the connection points between the four vehicle height sensors and the sprung mass (i.e. Figure 3 The coordinates of the four vertices in the dashed box are P 0_fl , P 0_fr , P 0_rl , P0_rr , P 0_fl , P 0_fr The projection of the distance between the left front vehicle height sensor and the right front vehicle height sensor on the y-axis is W0 (the distance between the left front vehicle height sensor and the right front vehicle height sensor), P 0_fl , P 0_rl The projection of the distance between the left front vehicle height sensor and the left rear vehicle height sensor on the x-axis is L0 (the distance between the left front vehicle height sensor and the left rear vehicle height sensor), P 0_fl , P 0_fr , P 0_rl , P 0_rr The height relative to the vehicle's center of gravity is z c (Ignore the z corresponding to the four sensors c The small gap between them), the coordinates of the above four points are

[0164]

[0165] The coordinates of the four points are rotated / translated in the three directions of θ-γ-Δz in turn to obtain the coordinates P of the connection points between the four sensors and the sprung mass after the posture change. fl , P fr , P rl , P rr (Right now Figure 3 Coordinates of the four vertices of the solid wireframe):

[0166]

[0167]

[0168] In the formula, R X is the rotation transformation matrix of the sprung mass around the X axis, R Y is the rotation transformation matrix of the sprung mass around the Y axis, γ is the roll angle of the sprung mass relative to the unsprung mass, θ is the pitch angle of the sprung mass relative to the unsprung mass, and Δz represents the z-axis displacement of the sprung mass relative to the unsprung mass; P fl , P fr , P rl , P rr The X-axis and Y-axis coordinates of the four points do not participate in the subsequent calculation. fl ,y fl Replaced by symbols such as Figure 3 It can be seen that P fl With P 0_fl The difference in the Z-axis coordinates is Z fl For the value of Z fr , Z rl , Z rr Similarly, that is:

[0169]

[0170] Considering that the values ​​of γ and θ are small (usually within ±2°), from the perspective of simplifying the operation, the trigonometric function Taylor expansion in the above formula is performed and the quadratic and higher terms are ignored, that is, sinθ=θ, sinγ=γ, cosθ=cosγ=1, then the above formula is simplified to:

[0171]

[0172] Adding the four equations in formula (2-4) together, we get:

[0173]

[0174] Subtract the first and second equations in equation (2-4), and subtract the third and fourth equations, and we get:

[0175]

[0176] From the perspective of reducing errors, formula (2-6) can be rewritten as:

[0177]

[0178] Subtract the first and third equations in equation (2-4), and subtract the second and fourth equations, and we get:

[0179]

[0180] From the perspective of reducing errors, formula (2-8) can be rewritten as:

[0181]

[0182] Equations (2-5), (2-7), and (2-9) are the sprung mass posture estimation methods based on four vehicle height sensors:

[0183]

[0184] Among them, the pitch angle θ is positive when the head is raised, and the roll angle γ is positive when the left is higher and the right is lower.

[0185] The simulation verification was carried out through veDYNA, and the simulation results showed that the pitch angle, roll angle, and z-axis displacement estimation method based on the vehicle body height sensor (Formula 2-10) proposed in the present invention has high reliability.

[0186] The two-sensor configuration can be considered as a special case of four sensors, that is, the left front sensor measurement under two-sensor input can be simultaneously considered as the left front sensor and right front sensor measurement under four-sensor input, and the left rear sensor measurement under two-sensor input can be simultaneously considered as the left rear sensor and right rear sensor measurement under four-sensor input, that is:

[0187]

[0188] In the formula, Z f is the relative height change of the left front vehicle height sensor, Z r is the relative height change of the left rear vehicle height sensor;

[0189] Substituting formula (2-11) into formula (2-10) we get the pose estimation formula under two sensor inputs:

[0190]

[0191] 2. The position A of the vehicle's sprung mass relative to the unsprung mass and the initial aiming point L A0 , R A0 Derivation of the vehicle's headlamp turning angle α Lout and α Rout :

[0192] Taking the sprung mass coordinate system as a reference, take the left headlamp as an example. Figure 4 As shown in the figure, when the vehicle is stationary and under rated load, the sprung mass coordinate system and the unsprung mass coordinate system completely overlap. Let the projection of the distance between the headlight and the front axle on the x-axis be L1, the distance between the left and right headlights be W1, the height of the vehicle's center of gravity from the ground be H, and the height of the headlight from the ground be H0. The initial position P of the left headlight can be obtained. L0 Coordinates (assuming the distance from the center of gravity of the vehicle to the front and rear axles of the vehicle is equal):

[0193]

[0194] Given the initial aiming angle α0 of the headlamp, the initial aiming point P of the left headlamp can be obtained. lA0 Coordinates:

[0195]

[0196] When the body posture changes, the sprung mass coordinate system undergoes rotational translation transformation relative to the unsprung mass coordinate system, and the transformation sequence is θ-γ-Δz (all with the unsprung mass coordinate system as reference). Since the left headlamp is fixedly connected to the sprung mass coordinate system, its coordinate in the sprung mass coordinate system remains unchanged and is still P. L0 ; Initial aiming point P of the left headlamp LA0 The coordinates of the desired aiming point after the posture change in the unsprung mass coordinate system remain unchanged, so its coordinates in the sprung mass coordinate system are P LA , obtained by the translation transformation in the z-axis direction and the inverse transformation of the XY Euler angles:

[0197]

[0198] In formula (3-3), R X is the vehicle's rotation transformation matrix around the X axis, R Y is the rotation transformation matrix of the vehicle around the Y axis, γ is the roll angle of the sprung mass relative to the unsprung mass, θ is the pitch angle of the sprung mass relative to the unsprung mass, and Δz is the z-axis displacement of the sprung mass relative to the unsprung mass. According to the previous description, the aiming direction vector of the left headlamp at this time is It should point from L0 to L A Point, that is

[0199]

[0200] The purpose of the present invention is to adjust the aiming direction of the left headlamp from the initial direction (the angle with the xz plane is 0, and the angle with the x-axis is α0) to the desired direction. The left headlamp has two degrees of rotational freedom in its aiming direction, namely, rotation in the xz plane (i.e., up and down rotation) and rotation in the xy plane (i.e., left and right rotation). In theory, the headlamp needs to adjust its aiming direction to direction; but in fact, the calculation results show that L x and L z The same order of magnitude, while L y The value of is only about 0.01% of the first two. Therefore, it can be considered that the headlight does not need to be adjusted left and right, and only needs to be rotated up and down to achieve the goal. The final angle between the left headlight irradiation direction and the x-axis (i.e., the downward deflection angle of the headlight) is

[0201]

[0202] Therefore, the vertical adjustment angle that the left headlamp needs to output is the difference between the initial vertical angle and the required vertical angle, that is:

[0203]

[0204] α Lout Downward orientation is positive.

[0205] Formulas (3-1)(3-2)(3-3)(3-4)(3-5)(3-6) are the complete contents of the algorithm for automatic leveling of the left headlamp on a flat and horizontal road surface.

[0206] In all calculation formulas, the values ​​of γ, θ, and Δz are given by the aforementioned estimation formulas, and the remaining parameters can be obtained.

[0207] By combining the above six equations and expanding the matrix operation, the change in the four-sensor measurement value Z can be used fl , Z rl , Z fr , Zrr Calculate the left headlamp output angle α Lout The algorithm:

[0208]

[0209] In fact, the calculation method of the output angle of the left and right headlights is basically the same. The output angle α of the right headlight is calculated as Rout When L0 and L A0 The y-axis coordinates of the two points can be changed to their opposite numbers, that is

[0210]

[0211] For the two-body height sensor solution, the left and right output angles are equal, which is denoted as α out , then:

[0212]

[0213] Where H0 is the installation height of the headlamp, L1 is the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, L is the wheelbase, D(v) is the target irradiation distance, H is the height of the vehicle's center of gravity from the ground, α0 is the initial aiming angle, and the output angle of the headlamp is positive when it is downward;

[0214] The output angle was simulated by MATLAB. The value of Δz was fixed at 0. The values ​​of γ and θ were adjusted in the range of 0 to 2°. According to the above algorithm, the output angle of the left headlamp was approximately in direct proportion to the input pitch angle and roll angle. The values ​​of γ and θ were fixed at 0. The value of Δz was adjusted in the range of ±0.25m. The output angle of the left headlamp was also approximately in direct proportion to Δz.

[0215] like Figure 5 , 6As shown in Figure 7, veDYNA is used to simulate the process of a vehicle accelerating from rest for a period of time (during four gear changes) and then braking to a stop. The three moments of the vehicle acceleration, braking, and complete stop are captured, and the displacement, speed, acceleration, and pitch angle are recorded during the driving process as the real-time motion status of the vehicle. The height value measured by the vehicle height sensor is recorded as input to calculate the pitch attitude and vertical displacement of the vehicle body. On the one hand, it is reflected in the change of the vehicle posture in the top animation, and on the other hand, it is used as the input of the ALS method to calculate the corresponding real-time output angle of the headlight and the height of the light and dark cutoff line of the headlight on the light distribution screen. Line, as a verification of the ALS performance indicators, the top of the figure is an animation reflecting the movement of the vehicle and the light, which indicates the lighting range, the upper edge of the area is the cut-off line, and the right line is the imaginary light distribution screen, which is always 10m in front of the headlight. The vehicle body and the light will move with the pitch angle and z-axis displacement of the sprung mass, but it can be seen that due to the effect of the ALS algorithm, the position of the cut-off line on the imaginary light distribution screen remains almost unchanged. The headlight angle output by the ALS method is close to the input pitch angle. Due to the effect of ALS, the absolute value of the height change of the cut-off line does not exceed 3cm at most, and does not exceed 1cm in most of the time.

[0216] In order to more clearly see the adjustment effect of the ALS method, use Figure 5 , 6 7. Using the same program, model and simulation data, set the output angle of ALS to 0 and observe the illumination effect of the headlights: Figure 8 , 9 、The situations corresponding to the three pictures in 10 are Figure 5 , 6 , 7, it can be seen that the position change of the light-dark cut-off line produced by the headlight on the imaginary light distribution screen changes significantly with the pitch of the vehicle body. From the curve in the lower left corner of the third figure, it can be seen that the height change of the light-dark cut-off line can reach up to 30cm.

[0217] 3. Calculate the output steps of the stepper motor connected to the headlight from the output angle of the headlight, so as to drive the stepper motor to rotate to the target position to complete the ALS function:

[0218] The premise for the posture estimation formulas in equations (2-10) and (2-12) is that the working plane of the vehicle height sensor is perpendicular to the ground, that is, the "extension direction" of the sensor is perpendicular to the ground. If there is an angle between the "extension direction" of the sensor and the ground Then Z fl The measured values ​​need to be multiplied by a coefficient before entering the algorithm The calculated attitude angle should also be multiplied by Due to the approximate linear relationship between the ALS input posture and the output rotation angle, the output rotation angle also needs to be multiplied by the original calculated value. Since the influence of the measurement errors of the body parameters and sensor parameters on the output angle is approximately linear, the influence of the superposition of various errors on the output angle is also approximately linear, which is equivalent to multiplying the output angle by a coefficient k. e , that is, it only needs to be integrated into a scaling factor, so the output angle should be appropriately linearly scaled:

[0219]

[0220] In the formula, k a is the scaling factor, α(i) is the output angle of the left headlamp or the output angle of the right headlamp when there are four vehicle height sensors;

[0221] Since the body parameters of the two-sensor solution and the four-sensor solution may be different, and the types of sensors and measurement principles are also different, it is necessary to calibrate an appropriate k for each of the two solutions. α .

[0222] Calibration k α When k α Set to 1, park the test vehicle under rated load at a distance of 10m from the light distribution screen in a dark environment, and mark the position of the light-dark cutoff line on the wall. Perform a loading test. In order to ensure better observation results, it is recommended to add a larger load in the trunk to increase the headlight output angle, but it should not be too large, otherwise it will exceed the ALS adjustment limit; it is appropriate to add a load of about 300kg in the trunk. After loading, observe the position of the light-dark cutoff line on the light distribution screen. If its position is higher than the mark, it is necessary to increase k α If its position is lower than the mark, k needs to be reduced. α Repeat the adjustment until the cut-off line coincides with the mark.

[0223] The step angle of the stepper motor used in this embodiment is 0.00158°, and the position codes corresponding to the zero position, upper limit position and lower limit position are 3288, 4863 and 0 respectively, so that the motor output angle limit values ​​are 2.49° upward and 5.19° downward. Combined with the national standard, the lower and upper limits of the output angle are α min =max(0.29°-α0,-2.49°),α max =min(1.43°-α0,5.19°)(downward is positive), since the range of α0 is also subject to regulatory restrictions (-1.0% to -1.5%, i.e. 0.57° to 0.85°), it can be calculated that under regulatory restrictions, the output angle cannot reach the physical limit of the motor, so α min=0.29°-α0,α max =1.43°-α0, according to the actual situation of the vehicle, max The expression of α is adjusted to max =1.43°-α0+α b , where α b is a calibrable variable, and its calibration method is: first, b Set the value of 0, and apply extreme load on the vehicle. If the aiming point cannot be adjusted back to the range allowed by the regulations, then slightly increase the value of this parameter. Repeat the above process until the headlight can be adjusted back to the range allowed by the regulations through ALS under extreme load. Then set α b value as the final result.

[0224] During vehicle driving, the output angle obtained by the ALS algorithm may change frequently due to factors such as changes in road input, vehicle acceleration and deceleration, and sensor noise. If the unprocessed output angle is used as the input of the stepper motor control module, it will cause frequent shaking of the headlights, thereby affecting the driver's visual experience and even the driving safety of the vehicle. On the basis of filtering the sensor signal, it is also necessary to perform anti-shake processing on the output angle, that is, setting a threshold α for the change in the output angle. thres To limit the shaking of the headlight, if the change in the output angle is less than this threshold, the angle input to the stepper motor control module remains unchanged, and the headlight output angle α is finally used to calculate the motor target position. fout (t) About α out The function of (t) is:

[0225]

[0226] In the formula, α fout (t) is the output angle of the stepper motor at time t, α min is the lower limit of the output angle, α max is the upper limit of the output angle, α thres is the anti-shake threshold, t0 is the control period, α fout (t-t0) is the output angle of the stepper motor at time t-t0, f(α out-1 (t)) is the clipping function, which satisfies:

[0227]

[0228] The target position of the stepper motor is determined by the output rotation angle of the stepper motor.

[0229] The performance indicators of the output angle of the ALS method can be considered from three aspects: response speed, following accuracy, and stability (i.e., anti-shake ability). These three performance indicators are affected by the anti-shake threshold α.thres and the filter window width n. thres As n increases, the following accuracy of ALS decreases and the stability improves; as n increases, the response speed of ALS decreases and the stability improves.

[0230] The vehicle driving state is divided into three types: stationary state, rapid acceleration / deceleration state and slow speed change state. These three driving states correspond to three different working modes of ALS: static mode, dynamic mode and speed following mode:

[0231] (1) Static mode: When the vehicle is stationary, the ALS system works in static mode. At this time, the main factor causing the change in the headlight angle is the change in load. In static mode, α thres A smaller value is used to improve the following accuracy; a larger value of n is used to improve the stability. The conditions for the vehicle to enter the static mode are: 1) the starting state is Running (engine model) or the vehicle is Ready (electric model); 2) the vehicle is stationary; 3) initialization has been completed; 4) the low beam headlights are turned on;

[0232] (2) Dynamic mode: When the vehicle accelerates / decelerates suddenly, the ALS system works in dynamic mode. At this time, the main factor causing the change in the headlight angle is the pitch movement of the vehicle body caused by sudden acceleration / deceleration. In dynamic mode, the value of n is small to ensure sufficient following speed; α thres The value of is small, which is used to improve the following accuracy. The conditions for the vehicle to enter the dynamic mode are: a) the starting state is Running (engine model) or the vehicle is Ready (electric model); b) the vehicle is in motion; c) the gear is in the forward gear; d) initialization has been completed; e) the low beam has been turned on; f) the system determines that the current working condition is a sudden acceleration or deceleration; g) the vehicle height sensor signal changes; h) the ALS controller has completed initialization;

[0233] (3) Speed-following mode: When the vehicle is running steadily, at a certain speed and with very low acceleration, the ALS system works in speed-following mode. At this time, the main factor causing the change in the headlight angle is the change in the target illumination distance caused by the slow change in vehicle speed. In speed-following mode, the value of n is large and α thres The value of is also large, both of which are to prevent frequent jitter of the output angle. The conditions for the vehicle to enter the speed following mode are: 1) the starting state is Running (engine model) or the vehicle is Ready (electric model); 2) the vehicle is in motion; 3) the gear is in the forward gear; 4) initialization has been completed; 5) the low beam has been turned on; 6) the system determines that the current working condition is a slow speed change condition; 7) the ALS controller has completed initialization.

[0234] The anti-shake threshold and the filter window width are obtained by actual vehicle calibration according to different vehicle models and the number of vehicle height sensors. The present invention only provides the selection trend of the anti-shake threshold and the filter window width.

[0235] 4. Vehicles driving on other roads:

[0236] The ALS method on a horizontal road is obtained when the vehicle is traveling at a low speed. However, as the vehicle speed increases, the stopping sight distance of the vehicle also increases. This requires that the illumination range of the headlights needs to cover a longer distance of the road to ensure driving safety. Therefore, the target illumination distance is expressed as a function of the vehicle speed v D(v). After modifying equation (1-4) and combining it with the definition of the stopping sight distance, the target illumination distance D(v) can be described as a piecewise function of the vehicle speed v:

[0237]

[0238] Therefore, modify equations (3-7), (3-8), and (3-9):

[0239]

[0240]

[0241]

[0242] When a vehicle is driving on a rough road, the high-frequency vibration input of the road surface will cause the vibration of the vehicle body, and the measurement value of the vehicle height sensor will also produce high-frequency jitter, which will cause the jitter of the output angle of the ALS method. Due to the inevitable delay in the algorithm, the jitter of the vehicle body and the jitter of the headlight output angle are not synchronized. In this case, the ALS method needs to identify the rough road surface and shield the output of the ALS algorithm when the vehicle enters the rough road surface, that is, lock the output angle of the headlight at the current position.

[0243] In this embodiment, the decision tree method in machine learning is used to identify road condition information. The general process of machine learning includes four parts: feature selection and construction, data collection, processing and data set division, and model training and verification.

[0244] The decision tree used for road surface recognition is a classification problem, and its process is as follows Fig.11 As shown, specifically including:

[0245] 1. Data collection, processing and data set division: Drive the vehicle on various road conditions / operating conditions (as shown in the table below), record several groups of data (no less than ten groups) for each road condition / operating condition as a data set, and distinguish good roads from bad roads through the amplitude of the data returned by the vehicle height sensor. The part with obvious amplitude is the bad road, and the rest is the good road. All the collected data are divided into training set and test set at a ratio of about 4:1. It should be noted that the ratio of good roads to bad roads in the training set should be the same as the ratio of good roads to bad roads in the test set.

[0246] Table 1 Road conditions / operating conditions for which data collection is required

[0247] Good Road Bad Road still Road in disrepair Normal driving (constant speed, level road surface) Railroad Uphill and downhill Small round bump road Acceleration and deceleration Big round bump road Belgium Road Washboard Road Pebble Road Yulingkeng Road Twisted road

[0248] 2. Feature selection and construction: Among all the input data of the ALS method under the two-sensor solution, there are four that can be used for rough road recognition: the measurement value of the left front vehicle height sensor, the measurement value of the left rear vehicle height sensor, the vehicle speed, and the vehicle axial acceleration. In order to improve the recognition effect, the input data is processed here to extract six feature variables from each input data: original value, differential value, sliding window mean, sliding window standard deviation, sliding window maximum, and sliding window minimum. The following takes vehicle speed as an example to introduce the specific method of feature extraction. In the following description, t0 represents the system sampling period.

[0249] (1) Original value: The vehicle speed can be directly used as the first feature.

[0250] (2) Difference value: Subtract the vehicle speed at time t from the vehicle speed at time t-t0, and use this difference as the second feature at time t.

[0251] (3) Sliding window mean: calculate the mean of the sequence consisting of the vehicle speed at time t, time t-t0, time t-2t0, time t-3t0, ... time t-nt0, and use this mean as the third feature at time t. n is called the sliding window width, and its specific value can be adjusted according to the experimental results. In this embodiment, n=15 is used, and the same applies below.

[0252] (4) Sliding window standard deviation: Calculate the standard deviation of the sequence consisting of the vehicle speed at time t, time t-t0, time t-2t0, time t-3t0, ... time t-nt0, and take this standard deviation as the fourth feature at time t.

[0253] (5) Sliding window maximum value: Find the maximum value of the sequence consisting of the vehicle speed at time t, time t-t0, time t-2t0, time t-3t0, ... time t-nt0, and take this maximum value as the fifth feature at time t.

[0254] (6) Sliding window minimum: Find the minimum value of the sequence consisting of the vehicle speed at time t, time t-t0, time t-2t0, time t-3t0, ... time t-nt0, and use this minimum value as the sixth feature at time t.

[0255] The above six features are extracted from the four input data respectively, and finally 24 features are obtained. For each sampling point, 24 feature values ​​can be extracted according to the above method, and they are combined with the label (the sampling point corresponds to the quality of the road condition, 0 indicates a bad road, 1 indicates a good road) to form a vector containing 25 elements. This vector is generated for each sampling point in the training set, and finally an m0×25 matrix is ​​obtained (m0 is the total number of sampling points in the training set). This feature matrix can be used as the input for model training.

[0256] 3. Model training, implementation and verification:

[0257] The decision tree training process is based on the decision tree toolkit provided by MATLAB. The basic training statement is:

[0258] Factor=TreeBagger(1,Train_input,Train_Output,'Method','classification').

[0259] In the above formula, Train_input is the matrix composed of the first 24 columns in the feature matrix, Train_Output is the 25th column vector in the feature matrix, and the other parameters are default; the final Factor is the parameter of the entire model, which contains all the parameters of the model established according to the training data, from which an m1×4 matrix can be finally extracted, where m1 is the total number of nodes in the decision tree. This matrix contains all the information related to the decision tree, and thus the matrix can output a recognition result for any input feature vector (that is, a vector composed of the first 24 elements in a row in the feature matrix) - 1 (good path) or 0 (bad path). The four columns of this matrix represent the feature index, split threshold, left child node index, and output result.

[0260] In another embodiment, it is assumed that the decision tree is represented by the following table matrix:

[0261] Table 2 Decision tree matrix

[0262] 3 60 4 0 7 33 4 0 14 56 6 0 6 21 7 0 21 65 17 0 16 25 21 0 0 0 0 0 0 0 0 1

[0263] The input feature vector is shown in the following table:

[0264] Table 3 Input feature vector

[0265]

[0266] The decision tree implementation process is as follows:

[0267] (1) Starting from the first row of the decision tree, the first element is 3, which means that the third feature in the input feature vector needs to be compared, that is, 31;

[0268] (2) The second element of the first row is 60, which means that 31 needs to be compared with 60, and the result is 31<60, which means that the decision tree should jump to the left child node;

[0269] (3) The third element in the first row is 4, which means that the left child node is stored in the fourth row of the matrix. Therefore, the decision tree jumps to the fourth row and starts to check the elements in the fourth row of the decision tree matrix one by one.

[0270] (4) The first element of the fourth row of the decision tree matrix is ​​6, and the second element is 21. Then the sixth feature in the input feature vector (i.e., 34) is compared with 21, and it is found that 34>21, indicating that the decision tree should jump to the right child node;

[0271] (5) The third element of the fourth row is 7, which means that the right child node is stored in the 7+1=8th row of the matrix. Therefore, the decision tree jumps to the eighth row and starts to check the elements of the eighth row one by one.

[0272] (6) The first element of the eighth row is 0, indicating that the node corresponding to the eighth row is a leaf node (i.e., the decision end point). The fourth element 1 of the eighth row can be directly output, indicating that the vehicle is traveling on a good road at the time when the feature vector corresponding to the sampling point in Table 4 is located.

[0273] like Fig.12 As shown in the figure, it is the complete process of decision tree implementation. After the model training is completed, it is necessary to build the model in Simulink and perform simulation verification. Further optimization is performed based on the verification accuracy, and the value of the sliding window width n is repeatedly adjusted until the ideal recognition accuracy is achieved.

[0274] A supplementary strategy is added to the output of the decision tree model, that is, the proportion of the time of "good road" and "bad road" output by the model in the past period of time is counted. If the proportion of "good road" is higher, the current road surface is considered to be good, otherwise it is considered to be bad, thereby reducing the negative impact caused by the misidentification of a few points. The detection window in the supplementary strategy also needs to be obtained through repeated experiments, and it is finally determined to be 75.

[0275] When a vehicle is on a slope (referring to a road surface that is large enough and whose plane is not perpendicular to the direction of gravity) and transitioning between roads with different slopes (passing at low speed and high speed), the ALS method described in the present invention is still applicable.

[0276] The vehicle headlight automatic leveling method provided by the present invention generates a control signal based on a vehicle body height change signal, has higher stability and robustness than an inertial measurement element solution, and can simultaneously provide three posture data of pitch angle, roll angle and vertical displacement for calculating the output angle; a threshold is set for the adjustment of the output angle through three working modes, and the stepper motor will only make an adjustment action when the cumulative change of the output angle exceeds the threshold, thereby avoiding frequent jitters of the output angle caused by the high-frequency vibration of the vehicle body affecting the driver's field of vision; in addition, a machine learning method is used to identify rough roads and temporarily disable the adjustment function on rough roads, thereby further improving the stability of the headlight illumination range, and is used to adaptively adjust the headlight illumination direction vertically when the vehicle posture changes, so that its illumination range remains stable, avoiding the potential risk of traffic accidents caused by its illumination position being too high or too low.

[0277] It should be noted that the method of one or more embodiments of this specification can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of one or more embodiments of this specification, and the multiple devices will interact with each other to complete the described method.

[0278] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0279] The present invention also provides a vehicle headlight automatic leveling device, the vehicle headlight automatic leveling device comprising:

[0280] A road condition information acquisition module, wherein the road condition information acquisition module is used to acquire road condition information;

[0281] A judgment module, used to judge whether the current road surface is a rough road surface according to the road condition information;

[0282] A vehicle height change signal acquisition module, wherein the vehicle height change signal acquisition module is used to acquire vehicle height change signals of a plurality of preset positions when the judgment result of the judgment module is no;

[0283] A posture information acquisition module, the posture information acquisition module is used to calculate the vehicle posture information according to the vehicle height change signals at the plurality of preset positions;

[0284] An initial aiming angle acquisition module, wherein the initial aiming angle acquisition module is used to acquire an initial aiming angle;

[0285] A headlamp angle information acquisition module, wherein the headlamp angle information acquisition module is used to obtain the headlamp angle information according to the vehicle posture information and the initial irradiation point when the judgment result of the judgment module is no;

[0286] A headlamp control signal acquisition module, the headlamp control signal acquisition module is used to generate a headlamp control signal according to the headlamp turning angle information;

[0287] A sending module is used to send the headlight control signal to the headlight, so that the headlight performs light leveling according to the headlight control signal.

[0288] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing one or more embodiments of this specification, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0289] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0290] Fig.14 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0291] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the vehicle headlight automatic leveling method provided in the embodiments of this specification.

[0292] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0293] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0294] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0295] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0296] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0297] An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned vehicle headlamp automatic leveling method can be implemented.

[0298] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0299] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. In line with the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present specification as described above, which are not provided in detail for the sake of simplicity.

[0300] In addition, to simplify the description and discussion, and in order not to obscure one or more embodiments of the present specification, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device may be shown in the form of a block diagram so as to avoid obscuring one or more embodiments of the present specification, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which one or more embodiments of the present specification will be implemented (i.e., these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that one or more embodiments of the present specification may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0301] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0302] One or more embodiments of this specification are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification should be included in the scope of protection of this disclosure.

Claims

1. A method for automatically leveling a vehicle headlamp, characterized in that: The vehicle headlamp automatic leveling method comprises: Get traffic information; Determine whether the current road surface is rough according to the road condition information; if not, Acquiring vehicle height change signals at multiple preset positions; Calculating vehicle posture information according to vehicle height change signals at the plurality of preset positions; Get the initial aiming angle; Obtaining headlamp angle information according to the vehicle posture information and the initial aiming angle; generating a headlamp control signal according to the headlamp angle information; The vehicle height change signals of the plurality of preset positions include: a relative change in the left front vehicle height, a relative change in the left rear vehicle height, a relative change in the right front vehicle height, and a relative change in the right rear vehicle height; Calculating the vehicle posture information according to the vehicle height change signals at the plurality of preset positions includes: Obtaining the distance between the left front vehicle height sensor and the left rear vehicle height sensor, and the distance between the left front vehicle height sensor and the right front vehicle height sensor; Calculating vehicle posture information based on the relative change in the left front vehicle height, the relative change in the left rear vehicle height, the relative change in the right front vehicle height, the relative change in the right rear vehicle height, the distance between the left front vehicle height sensor and the left rear vehicle height sensor, and the distance between the left front vehicle height sensor and the right front vehicle height sensor; Among them, calculating the vehicle posture information includes: ; ; ; In the formula, is the pitch angle of the vehicle's sprung mass relative to the vehicle's unsprung mass, is the relative change in the height of the left front vehicle body, is the relative change in the height of the left rear vehicle body, is the relative change in the height of the right front vehicle body, is the relative change in the height of the right rear vehicle body, is the roll angle of the vehicle's sprung mass relative to the vehicle's unsprung mass, is the z-axis displacement of the vehicle's sprung mass relative to the vehicle's unsprung mass, is the distance between the left front vehicle height sensor and the left rear vehicle height sensor, is the distance between the left front vehicle height sensor and the right front vehicle height sensor.

2. The method for automatically leveling vehicle headlights according to claim 1, characterized in that: The vehicle headlamp automatic leveling method further comprises: Determine whether the current road surface is a rough road surface according to the road condition information; if so, generating a control signal for locking the angle of the headlamp; sending the control signal for locking the headlamp angle to the headlamp; So that the headlamp locks the light angle according to the headlamp control signal.

3. The method for automatically leveling vehicle headlights according to claim 1, characterized in that: The obtaining of the headlamp angle information according to the vehicle posture information and the initial aiming angle comprises: Obtain the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle's sprung mass coordinate system, the distance between the left headlamp and the right headlamp, the wheelbase, the target illumination distance, and the height of the vehicle's center of gravity from the ground; Calculate the headlamp turning angle information according to the vehicle posture information, the initial illumination angle, the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, the distance between the left headlamp and the right headlamp, the wheelbase, the target illumination distance, and the height of the vehicle's center of gravity from the ground; The calculation of the headlight angle information includes: ; ; In the formula, is the output angle of the left headlamp, is the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, is the distance between the left headlight and the right headlight, is the wheelbase, is the target irradiation distance, is the initial aiming angle, is the height of the vehicle's center of gravity from the ground, is the output angle of the right headlamp; The output angle of the left headlamp and the output angle of the right headlamp are both positive when they are oriented downward.

4. The method for automatically leveling vehicle headlights according to claim 2, characterized in that: The vehicle height change signals of the plurality of preset positions include: a relative change amount of the left front vehicle height, and a relative change amount of the left rear vehicle height; Calculating the vehicle posture information according to the vehicle height change signals at the plurality of preset positions includes: Obtain the distance between the left front vehicle height sensor and the left rear vehicle height sensor; Calculating vehicle posture information according to the relative change in the left front vehicle height, the relative change in the left rear vehicle height, and the distance between the left front vehicle height sensor and the left rear vehicle height sensor; Among them, calculating the vehicle posture information includes: ; ; ; In the formula, is the pitch angle of the vehicle's sprung mass relative to the vehicle's unsprung mass, is the relative change in the height of the left front vehicle body, is the relative change in the height of the left rear vehicle body, is the rolling angle of the vehicle's sprung mass relative to the vehicle's unsprung mass, is the z-axis displacement of the vehicle's sprung mass relative to the vehicle's unsprung mass, is the distance between the left front vehicle height sensor and the left rear vehicle height sensor.

5. The method for automatically leveling vehicle headlights according to claim 4, characterized in that: The obtaining of the headlamp angle information according to the vehicle posture information and the initial aiming angle comprises: Obtain the headlamp installation height, the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, the wheelbase, the target irradiation distance, and the height of the vehicle's center of gravity from the ground; Calculating the headlamp turning angle information according to the vehicle posture information, the initial aiming angle, the headlamp installation height, the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, the wheelbase, the target irradiation distance, and the height of the vehicle's center of gravity from the ground; The calculation of the headlight angle information includes: ; In the formula, is the output angle of the headlamp, For the headlight installation height, is the projection of the distance between the left headlamp and the front axle on the X-axis of the vehicle sprung mass coordinate system, is the wheelbase, is the target irradiation distance, is the height of the vehicle's center of gravity from the ground, is the initial aiming angle; The output angle of the headlamp is positive when it is downward; the output angles of the left and right headlamp are the same.

6. The method for automatically leveling vehicle headlights according to any one of claims 3 or 5, characterized in that: Obtaining the target irradiation distance includes: Get the headlamp installation height and vehicle speed; Obtain target illumination distance based on headlamp height and vehicle speed; Among them, calculating the target irradiation distance includes: ; In the formula, For the headlight installation height, For vehicle speed.

7. The method for automatically leveling vehicle headlights according to claim 6, characterized in that: Generating a headlamp control signal according to the headlamp turning angle information comprises: Get the lower limit of the output angle, the upper limit of the output angle, the anti-shake threshold, the control cycle, the output angle of the stepper motor at the previous moment, the limiting function, and the output angle scaling value at the current moment; Generate a headlamp control signal according to a lower limit of an output angle, an upper limit of an output angle, an anti-shake threshold, a control cycle, an output angle of the stepper motor at a previous moment, a limiting function, and an output angle scaling value at a current moment; Among them, calculating the output angle of the stepper motor of the vehicle headlight includes: ; ; In the formula, for The output angle of the stepper motor at the moment, is the lower limit of the output angle, is the upper limit of the output angle, is the anti-shake threshold, To control the cycle, is the output angle of the stepper motor at the moment, is the limiting function, for The output angle scaling value at time.

8. The method for automatically leveling vehicle headlights according to claim 7, characterized in that: Obtaining the current output angle scaling value includes: Obtaining a scaling factor, a left headlamp output angle, and / or a right headlamp output angle; Calculate the output angle scaling value at the current moment according to the scaling factor, the left headlamp output angle and / or the right headlamp output angle; The calculation of the output angle scaling value at the current moment includes: ; In the formula, is the scaling factor, Output the cornering angle for the left headlamp and / or the right headlamp.

9. An automatic leveling device for vehicle headlights, characterized in that: The vehicle headlamp automatic leveling device applies the vehicle headlamp automatic leveling method according to any one of claims 1 to 8, comprising: A road condition information acquisition module, wherein the road condition information acquisition module is used to acquire road condition information; A judging module, used for judging whether the current road surface is a rough road surface according to the road condition information; A vehicle height change signal acquisition module, wherein the vehicle height change signal acquisition module is used to acquire vehicle height change signals of a plurality of preset positions when the judgment result of the judgment module is no; A posture information acquisition module, the posture information acquisition module is used to calculate the vehicle posture information according to the vehicle height change signals at the plurality of preset positions; An initial aiming angle acquisition module, wherein the initial aiming angle acquisition module is used to acquire an initial aiming angle; A headlamp angle information acquisition module, wherein the headlamp angle information acquisition module is used to obtain the headlamp angle information according to the vehicle posture information and the initial irradiation point when the judgment result of the judgment module is no; A headlamp control signal acquisition module, the headlamp control signal acquisition module is used to generate a headlamp control signal according to the headlamp turning angle information; A sending module is used to send the headlight control signal to the headlight, so that the headlight performs light leveling according to the headlight control signal.