A method and system for controlling the lights of a motorcycle

By combining a three-dimensional nonlinear mapping model and a fuzzy logic reasoning system with a Kalman filter to adjust the PID controller, the problem of lag and vibration in the motorcycle lighting control system under complex environments was solved. This enabled stable control of the motorcycle on sharp bends and bumpy roads, improving nighttime driving safety and driving experience.

CN120916309BActive Publication Date: 2025-12-05DAYUN GROUP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511453413.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2025-12-05
Estimated Expiration
2045-10-13

AI Technical Summary

Technical Problem

Traditional motorcycle lighting control systems struggle to adapt to complex and ever-changing driving conditions, resulting in delayed light response, vibration, and overshoot, which negatively impact driving safety and the driving experience.

Method used

A three-dimensional nonlinear mapping model and a fuzzy logic inference system are combined with a Kalman filter to adjust the proportional, integral, and derivative terms of the PID controller in real time. The fuzzy logic inference system adjusts the proportional gain based on illumination deviation, yaw rate, and road bumpiness to construct a Kalman filter to predict the future vehicle attitude and generate a headlight orientation control signal.

Benefits of technology

It achieves rapid response and stable control on sharp curves and bumpy roads, reduces beam jitter, avoids control overshoot caused by integral saturation, and ensures that the beam is always ahead of the vehicle's posture, thereby improving nighttime driving safety and driving experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120916309B_ABST
    Figure CN120916309B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of vehicle lamp lighting, and discloses a motorcycle light control method and system, which comprises the following steps: acquiring a vehicle body roll angle, a vehicle body pitch angle, a vehicle body yaw angular velocity, a vehicle body vertical direction acceleration and a current vehicle speed; calculating a current target light azimuth angle based on the vehicle body roll angle, the vehicle body pitch angle and the current vehicle speed; calculating a light azimuth deviation, determining a proportional term of a PID controller through a fuzzy logic reasoning system; calculating an integral term, constructing a Kalman filter, and predicting a vehicle body roll angle in a future time step; calculating a future target light azimuth angle; a differential leading term is calculated from the difference between the future target light azimuth angle and a current target light azimuth angle; and the proportional term, the integral term and the differential leading term are weighted and summed to generate a light azimuth control signal. The application can adapt to the complex and changeable driving state of a motorcycle, the light response is rapid, the light is not prone to shaking and overshooting, and the safety and driving experience of driving are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of vehicle light illumination, in particular to a motorcycle light control method and system. BACKGROUND

[0002] The light of a conventional motorcycle is usually fixed on the frame or front fork, and its illumination direction is consistent with the posture of the vehicle body. When the motorcycle is driving in a curve, the vehicle body will tilt to the side of the curve center, causing the fixed light beam to tilt as well, resulting in a large area of illumination blind area on the inside of the curve, and over-illumination on the outside of the curve, which seriously affects the driver's judgment of the road conditions ahead and constitutes a great safety hazard. The existing adaptive front light system of a motorcycle usually carries sensors such as inertial measurement units to obtain the roll angle of the motorcycle in real time, and adjusts the illumination direction of the light fixture according to the angle through a control algorithm, so as to actively compensate for the effects of vehicle body tilt, guide the light beam into the inside of the curve, and improve the safety of night curve driving.

[0003] Most of the existing technologies use traditional PID control algorithm to adjust the illumination direction of the light fixture, which is difficult to adapt to the complex and variable driving state of the motorcycle. For example, the response speed and stability of light control are quite different under different working conditions such as high-speed sharp curve and low-speed gentle curve, smooth road and bumpy road, etc., which easily leads to light response lag or unstable phenomena such as shaking and overshooting. The inherent sensing, calculation and execution delay of the system causes the actual pointing of the light beam to always lag behind the driver's steering intention and the dynamic trend of the vehicle, and cannot achieve the ideal light following the driver's intention. In addition, when continuously turning at a large angle or the vehicle encounters severe bumps, the integral element of the PID controller is easy to produce cumulative saturation, which may cause large control overshoot when the posture is restored. Therefore, how to design a light control method that can adapt to different working conditions and balance speed and stability is a technical problem to be solved. SUMMARY

[0004] The present application provides a motorcycle light control method and system to solve the above-mentioned problems in the prior art, such as the difficulty in adapting to the complex and variable driving state of the motorcycle, the easy occurrence of light response lag, shaking and overshooting, and the poor safety and driving experience of driving.

[0005] In a first aspect, the motorcycle light control method of the present application comprises the following steps:

[0006] The motorcycle inertial measurement unit real-time output of the body roll angle, pitch angle, yaw angular velocity and the body vertical direction acceleration, and the current vehicle speed output by the vehicle speed sensor are acquired; based on the body roll angle, pitch angle and current vehicle speed, the current target light azimuth angle is calculated through a three-dimensional nonlinear mapping model or a three-dimensional lookup table; the light azimuth deviation is obtained according to the difference between the current target light azimuth angle and the current azimuth angle of the light system, and the proportional term of the PID controller is determined through the fuzzy logic reasoning system; the integral term of the PID controller is calculated, the integral accumulation is frozen when the absolute value of the light azimuth deviation exceeds a first threshold or the absolute value of the yaw angular velocity exceeds a second threshold, the integral accumulation value is cleared when the instantaneous value of the body vertical direction acceleration exceeds a jolt threshold, and the integral accumulation of the light azimuth deviation is performed in other cases; a Kalman filter taking the body roll angle and the yaw angular velocity as the state vector is constructed; the body roll angle at a future time step is predicted by using the adjusted Kalman filter; the predicted body roll angle, together with the currently acquired pitch angle and current vehicle speed, is input into the three-dimensional nonlinear mapping model or the three-dimensional lookup table to calculate the future target light azimuth angle; the differential lead term of the PID controller is calculated from the difference between the future target light azimuth angle and the current target light azimuth angle; the proportional term, the integral term and the differential lead term are weighted and summed to generate a light azimuth control signal.

[0007] Preferably, the input of the fuzzy logic reasoning system is the absolute value of the light azimuth deviation, the absolute value of the yaw angular velocity and the road jolt degree; the road jolt degree is determined by the standard deviation of the body vertical direction acceleration after high-pass filtering; the process noise covariance matrix Q of the Kalman filter is adjusted in real time according to the current vehicle speed and the rate of change of the yaw angular velocity; the measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to the high-frequency component of the body vertical direction acceleration.

[0008] Preferably, the determination of the proportional term of the PID controller through the fuzzy logic reasoning system comprises: dividing the absolute value of the light azimuth deviation into {small, medium, large} three fuzzy sets, dividing the absolute value of the yaw angular velocity into {small, medium, large} three fuzzy sets, and dividing the road jolt degree into {flat, general, jolt} three fuzzy sets; the proportional gain coefficient K p is output by the fuzzy logic reasoning system; the proportional term of the PID controller is obtained according to the preset fuzzy rule.

[0009] Preferably, the road roughness is determined by the standard deviation of the vertical acceleration of the vehicle body after high-pass filtering, comprising: processing the vertical acceleration signal of the vehicle body by a second-order Butterworth high-pass digital filter, the cutoff frequency of the second-order Butterworth high-pass digital filter being 5 Hz; taking the high-pass filtered acceleration data in the last 1 second and calculating the standard deviation, and taking the standard deviation as the current road roughness.

[0010] Preferably, the Kalman filter constructed with the roll angle and yaw rate of the vehicle body as the state vector comprises: defining the state vector at time k as = [φ, ω z ] T , wherein φ is the roll angle of the vehicle body, and ω z is the yaw rate; defining the state transition model as , wherein is the state vector at time k-1, is the process noise at time k-1; defining the observation model as , wherein the observation value is the state vector formed by the roll angle and the yaw rate of the vehicle body output by the inertial measurement unit in real time at time k, is the measurement noise at time k.

[0011] Preferably, the process noise covariance matrix Q of the Kalman filter is adjusted in real time according to the current vehicle speed and the rate of change of the yaw rate, comprising: the process noise covariance matrix Q is a diagonal matrix ; wherein the diagonal element is the process noise variance of the roll angle of the vehicle body, is adjusted according to the current vehicle speed v, the diagonal element is the process noise variance of the yaw rate, is adjusted according to the rate of change of the yaw rate.

[0012] Preferably, the measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to the high-frequency component of the vertical acceleration of the vehicle body, comprising: the measurement noise covariance matrix R is a diagonal matrix ; wherein the diagonal element is the measurement noise variance of the roll angle of the vehicle body, is adjusted according to the energy of the high-frequency component of the vertical acceleration of the vehicle body, the diagonal element is the measurement noise variance of the yaw rate, is a constant preset according to the characteristics of the inertial measurement unit.

[0013] In a second aspect, the light control system of the motorcycle comprises the following modules: a measurement module configured to acquire a body roll angle, a body pitch angle, a yaw angular velocity and a body vertical direction acceleration output by a motorcycle inertial measurement unit in real time, and a current vehicle speed output by a vehicle speed sensor; a current target light azimuth angle is calculated by a three-dimensional nonlinear mapping model or a three-dimensional lookup table based on the body roll angle, the body pitch angle and the current vehicle speed;

[0014] an adjustment module configured to obtain a light azimuth deviation according to a difference between the current target light azimuth angle and a current light azimuth angle of a light system, determine a proportional term of a PID controller by a fuzzy logic reasoning system, calculate an integral term of the PID controller, freeze integral accumulation when an absolute value of the light azimuth deviation exceeds a first threshold value or an absolute value of the yaw angular velocity exceeds a second threshold value, clear the integral accumulation value when an instantaneous value of the body vertical direction acceleration exceeds a jolt threshold value, and integrate the light azimuth deviation in other cases;

[0015] a control module configured to construct a Kalman filter with the body roll angle and the yaw angular velocity as a state vector, predict the body roll angle at a future time step by using the adjusted Kalman filter, input the predicted body roll angle, the acquired body pitch angle and the current vehicle speed into the three-dimensional nonlinear mapping model or the three-dimensional lookup table to calculate a future target light azimuth angle, calculate a differential lead term of the PID controller according to a difference between the future target light azimuth angle and the current target light azimuth angle, and generate a light azimuth control signal by weighted summation of the proportional term, the integral term and the differential lead term.

[0016] Preferably, the input of the fuzzy logic reasoning system is an absolute value of the light azimuth deviation, an absolute value of the yaw angular velocity and a road jolt degree; the road jolt degree is determined by a standard deviation of the body vertical direction acceleration after high-pass filtering; a process noise covariance matrix Q of the Kalman filter is adjusted in real time according to a current vehicle speed and a rate of change of the yaw angular velocity; and a measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to a high-frequency component of the body vertical direction acceleration.

[0017] Preferably, the determination of the proportional term of the PID controller by the fuzzy logic reasoning system comprises: dividing the absolute value of the light azimuth deviation into three fuzzy sets {small, medium, large}, dividing the absolute value of the yaw angular velocity into three fuzzy sets {small, medium, large}, and dividing the road jolt degree into three fuzzy sets {flat, general, jolt}; the proportional gain coefficient K p of the PID controller is divided into four fuzzy sets {small, medium, large, very large}; and the proportional term of the PID controller is obtained by reasoning according to a preset fuzzy rule.

[0018] The application has the beneficial effects that: the application adjusts the proportional gain in real time according to the illumination deviation, the yaw rate and the road bumping degree through the fuzzy logic reasoning system, so that the control system is agile in the sharp bend requiring fast response and stable on the bumpy road, and the beam jitter is reduced. For the integral element, the control overshoot caused by integral saturation when continuously turning at a large angle or encountering impact is avoided by setting the freezing and zeroing mechanism, the Kalman filter whose noise parameter can be adjusted in real time according to the vehicle speed and bumping degree is constructed to predict the future vehicle body roll angle, and the differential leading term is calculated based on the vehicle body roll angle, which can effectively compensate for the inherent delay of the system, so that the beam is always ahead of the vehicle body posture and irradiates on the driving path to be entered, and the safety and driving experience of night driving are improved. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 The flowchart of the motorcycle light control method provided by the embodiment of the application is shown. DETAILED DESCRIPTION

[0020] The embodiments of the application are described in detail below, and examples of the embodiments are shown in the drawings. The embodiments described below by referring to the drawings are exemplary and are intended to explain the application, and cannot be understood as a limitation of the application.

[0021] As shown in Figure 1 The embodiment of the motorcycle light control method provided by the application includes the following steps:

[0022] S1, acquiring the vehicle body roll angle, the pitch angle, the yaw rate and the vehicle body vertical direction acceleration output by the motorcycle inertial measurement unit in real time, and the current vehicle speed output by the vehicle speed sensor; based on the vehicle body roll angle, the pitch angle and the current vehicle speed, the current target illumination azimuth angle is calculated through a three-dimensional nonlinear mapping model or a three-dimensional lookup table.

[0023] Specifically, a six-axis inertial measurement unit is installed near the center of gravity of the motorcycle, and the controller periodically reads the roll angle, pitch angle and yaw angular velocity calculated by the internal fusion of the six-axis inertial measurement unit through the I2C or SPI communication bus, and reads the output of the Z-axis accelerometer as the vertical acceleration of the vehicle body. Hall sensors are installed at the wheels or the original ABS wheel speed sensors of the vehicle are used, and the current vehicle speed is calculated by detecting the pulse frequency and combining the tire circumference. A three-dimensional lookup table is pre-burned in the memory of the controller, and the three input dimensions of the lookup table are the current vehicle speed, the roll angle and the pitch angle, and the stored values in the table are the corresponding optimal target light azimuth. For example, the vehicle speed dimension is divided by 20 km / h, the roll angle dimension is divided by 5 degrees, and the pitch angle dimension is divided by 2 degrees; the controller obtains the real-time input, such as a vehicle speed of 55 km / h, a roll angle of 22 degrees, and a pitch angle of 1 degree, and then calculates the current target light azimuth according to the eight table node data around the input value through a three-linear interpolation algorithm. In another embodiment, a three-dimensional nonlinear mapping model is used, such as a simple neural network or a nonlinear function.

[0024] S2, according to the difference between the current target light azimuth and the current azimuth of the light system, the light azimuth deviation is obtained, and the proportional term of the PID controller is determined through the fuzzy logic inference system; the integral term of the PID controller is calculated, when the absolute value of the light azimuth deviation exceeds the first threshold value or the absolute value of the yaw angular velocity exceeds the second threshold value, the integral accumulation is frozen, when the instantaneous value of the vertical acceleration of the vehicle body exceeds the jolt threshold value, the integral accumulation value is cleared, and in other cases, the light azimuth deviation is integrated and accumulated.

[0025] Specifically, the controller takes the current target light azimuth calculated in the previous step as the minuend, and the current azimuth of the light system fed back by the angle sensor or potentiometer connected to the light rotation mechanism as the subtrahend, and the difference is the light azimuth deviation. The collected vertical acceleration signal of the vehicle body is filtered by a digital high-pass filter to filter out low-frequency components such as gravity, and then the standard deviation of the filtered signal in the past short period of time is calculated to obtain the quantized value of the road jolt degree; the absolute values of the jolt degree, the light azimuth deviation and the yaw angular velocity are input into a pre-set fuzzy logic inference machine, and the inference machine contains a number of fuzzy rules inside, such as rule one: if the light azimuth deviation is large, the yaw angular velocity is large, and the road jolt degree is small, then the proportional gain coefficient K p is large; by fuzzying the input, rule inference and defuzzying, a K p value suitable for the current working condition is obtained. Finally, the proportional term is obtained by multiplying the K p value by the light azimuth deviation.

[0026] In a preferred embodiment, the inputs of the fuzzy logic inference system are the absolute value of the light orientation deviation, the absolute value of the yaw rate, and the road roughness degree; the road roughness degree is determined by the standard deviation of the body vertical acceleration after high-pass filtering; the process noise covariance matrix Q of the Kalman filter is adjusted in real time according to the current vehicle speed and the rate of change of the yaw rate; the measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to the high-frequency component of the body vertical acceleration.

[0027] The controller checks the judgment conditions in each calculation period, for example, if the absolute value of the light orientation deviation is greater than 10 degrees or the absolute value of the yaw rate is greater than 15 degrees per second, the integral accumulation operation in this period is skipped, and the integral accumulation value remains unchanged. At the same time, if the instantaneous value of the body vertical acceleration exceeds the jolt threshold, indicating that the vehicle has encountered a severe impact, the integral accumulation value is immediately reset to zero. When none of the above conditions is met, the regular integral accumulation is performed, that is, the current light orientation deviation is multiplied by the control period length and accumulated into the integral accumulation value.

[0028] S3, a Kalman filter is constructed with the body roll angle and the yaw rate as the state vector; the adjusted Kalman filter is used to predict the body roll angle in the future time step; the predicted body roll angle, together with the current pitch angle and the current vehicle speed, is input into the three-dimensional nonlinear mapping model or the three-dimensional lookup table to calculate the future target light orientation angle; the differential lead term of the PID controller is calculated by the difference between the future target light orientation angle and the current target light orientation angle; the weighted sum of the proportional term, the integral term, and the differential lead term generates the light orientation control signal.

[0029] For example, the controller internally runs a Kalman filter algorithm with the body roll angle and yaw rate as the state vector. At each calculation cycle, the controller dynamically adjusts the value of the process noise covariance matrix Q according to the current vehicle speed and the rate of change of the yaw rate. The higher the vehicle speed or the sharper the turn, the larger the value of Q. At the same time, the value of the measurement noise covariance matrix R is adjusted according to the amplitude of the high-frequency component of the body vertical acceleration. The bumpier the road, the larger the value of R. The adjusted Kalman filter is used to optimally estimate the data output by the current inertial measurement unit, and the body roll angle at a future time step is predicted based on the state transition equation. The predicted body roll angle at a future time step is input into a three-dimensional lookup table together with the current pitch angle and vehicle speed, and a future target light azimuth angle is calculated by a trilinear interpolation algorithm. Then the future target light azimuth angle is subtracted from the current target light azimuth angle, and the difference is the derivative lead term of the PID controller. The proportional term, the integral term, and the derivative lead term are weighted and summed to obtain the control quantity value, which is converted by the controller into a specific light azimuth control signal. For example, the light azimuth control signal is a PWM pulse width modulation signal with a specific duty cycle. The controller outputs this signal to the motor drive module, which controls the motor rotation according to the signal. The motor drives the lamp assembly to rotate through a transmission mechanism until its azimuth is consistent with the azimuth instructed by the control signal.

[0030] In order to adapt the proportional gain coefficient K p to changes in vehicle driving state and road environment, in a preferred embodiment, the determination of the proportional term of the PID controller by the fuzzy logic inference system comprises: dividing the absolute value of the light azimuth deviation into {small, medium, large} three fuzzy sets, dividing the absolute value of the yaw rate into {small, medium, large} three fuzzy sets, and dividing the road bumpiness into {flat, general, bumpy} three fuzzy sets; the proportional gain coefficient K p output by the fuzzy logic inference system is divided into {small, medium, large, very large} four fuzzy sets; and the proportional term of the PID controller is obtained by reasoning according to the preset fuzzy rules.

[0031] For example, the light azimuth deviation, the yaw rate, and the road bumpiness are taken as the three input variables of the fuzzy logic inference system. For example, when the absolute value of the light azimuth deviation is less than 5 degrees, it is defined as small, between 5 and 15 degrees, it is defined as medium, and greater than 15 degrees, it is defined as large. The fuzzy logic inference system fuzzifies the input quantities into small, medium, large, etc. fuzzy language variables through membership functions. The output of the fuzzy logic inference system is the proportional gain coefficient K p . The proportional gain coefficient K pThe four levels are small, medium, large, and very large. If the vehicle is stably running on a flat road, the yaw rate is small, and the headlamp illumination direction deviates from the target by a large distance, a very large proportional gain coefficient K p is needed to achieve a rapid and powerful correction so that the headlamp quickly returns to the target position. Therefore, the fuzzy rule can be set as: when the light illumination direction deviation is large, the yaw rate is small, and the road roughness is flat, K p is very large.

[0032] In a preferred embodiment, the road roughness is determined by the standard deviation of the vertical acceleration of the vehicle body after high-pass filtering, comprising: processing the vertical acceleration signal of the vehicle body by using a second-order Butterworth high-pass digital filter, the cutoff frequency of the second-order Butterworth high-pass digital filter being 5 Hz; taking the high-pass filtered acceleration data in the last 1 second and calculating the standard deviation, the standard deviation being taken as the current road roughness.

[0033] In order to accurately quantify the roughness of the road, the vertical acceleration signal of the vehicle body is used in this embodiment. The original vertical acceleration signal of the vehicle body contains low-frequency components such as slow changes in vehicle attitude, which are irrelevant to high-frequency vibrations of the road. Therefore, a second-order Butterworth high-pass digital filter is used to process the original vertical acceleration signal of the vehicle body, and the cutoff frequency of the second-order Butterworth high-pass digital filter is set to 5 Hz, which can filter out low-frequency interference such as gravity components and slow fluctuations of the vehicle body, and only keep the rapid vibration signal caused by road unevenness. Then, the acceleration data in the last one second time window is taken. The standard deviation of all data points in this time window is calculated, and the standard deviation reflects the severity of the recent vertical vibration of the vehicle body. The larger the standard deviation, the greater the vibration amplitude, and the more bumpy the road; on the contrary, the smaller the standard deviation, the flatter the road.

[0034] In a preferred embodiment, the Kalman filter constructed with the vehicle body roll angle and yaw rate as the state vector comprises: defining the state vector at time k as =[φ, ω z ] T , wherein φ is the vehicle body roll angle, ω z is the yaw rate; defining the state transition model as , wherein is the state vector at time k-1, is the process noise at time k-1; defining the observation model as , wherein the observation value is the state vector formed by the real-time output of the inertial measurement unit of the vehicle body roll angle and yaw rate at time k, is the measurement noise at time k.

[0035] To obtain accurate and smooth vehicle body attitude information, a Kalman filter is used to fuse and optimize the raw output of the inertial measurement unit. The core of the Kalman filter is to estimate the vehicle body roll angle φ and yaw rate ω z These two dynamic parameters together constitute the state vector. The state transition model uses a random walk model, that is, it is assumed that the state vector at the current time is equal to the state vector at the last time plus the process noise. The observation model represents the relationship between the observation value and the true state, that is, the observation value of the inertial measurement unit is equal to the true state value plus the measurement noise. The measurement noise represents the inherent error and uncertainty of the sensor itself. The Kalman filter can estimate the system state closest to the true state from the noisy measurement by recursively using the two models.

[0036] In a preferred embodiment, the process noise covariance matrix Q of the Kalman filter is adjusted in real time according to the current vehicle speed and the rate of change of the yaw rate, including: the process noise covariance matrix Q is a diagonal matrix ; wherein the diagonal elements are the process noise variances of the body roll angle, adjusted according to the current vehicle speed v, the diagonal elements are the process noise variances of the yaw rate, adjusted according to the rate of change of the yaw rate.

[0037] In order to improve the accuracy of the Kalman filter under different driving conditions, the process noise covariance matrix Q is further dynamically adjusted. The process noise covariance matrix Q is simplified to a diagonal matrix, that is, it is assumed that the process noise of the body roll angle and the yaw rate is independent of each other, wherein the diagonal elements and represent the uncertainty of the prediction of the two states, respectively.

[0038] wherein the diagonal elements are positively correlated with the current vehicle speed v. When the vehicle speed increases, the vehicle will perform steering or lane changing operations, which will cause a larger amplitude and faster body roll. At this time, the prediction model uncertainty of the roll angle increases, and needs to be increased, so that the filter trusts the new measurement value more. Similarly, the diagonal element is positively correlated with the rate of change of the yaw rate. When the vehicle makes a sharp turn, the rate of change of the yaw rate is large, indicating that the turning dynamics of the vehicle is very intense, and the prediction model uncertainty of the yaw rate also increases accordingly, so is increased, so that the Kalman filter can track the actual changes more quickly.

[0039] In a preferred embodiment, the measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to the high-frequency component of the vehicle body vertical direction acceleration, comprising: the measurement noise covariance matrix R is a diagonal matrix ; wherein the diagonal elements are the measurement noise variances of the vehicle body roll angle, are adjusted according to the energy of the high-frequency component of the vehicle body vertical direction acceleration, the diagonal elements are the measurement noise variances of the yaw rate, is a constant preset according to the characteristics of the inertial measurement unit.

[0040] By adjusting the measurement noise covariance matrix R, the performance of the Kalman filter is optimized, and the measurement noise covariance matrix R is also set as a diagonal matrix, and the diagonal elements and respectively represent the degree of distrust of the measurement values of the vehicle body roll angle sensor and the yaw rate sensor. Specifically, the adjustment of the diagonal element is closely related to the road bumping condition, and the value is determined according to the energy of the high-frequency component of the vehicle body vertical direction acceleration. When the vehicle is running on a bumpy road, the severe vertical vibration will seriously interfere with the output of the accelerometer, and then affect the measurement accuracy of the vehicle body roll angle, so that more noise is contained. By increasing , the Kalman filter knows that the current measurement value of the vehicle body roll angle is unreliable, and the weight of the state update should be reduced. The diagonal element is set as a constant, because the gyroscope is used to measure the yaw rate, and its performance is less affected by vertical vibration than the accelerometer, and its noise level is relatively stable, which can be determined by querying the device manual or offline calibration to determine a fixed optimal value.

[0041] The implementation principle of the motorcycle light control method of the embodiment of the application is as follows: the application adjusts the proportional gain in real time according to the light direction deviation, the yaw rate and the road bumping degree through the fuzzy logic reasoning system, so that the control system performs agilely in sharp turns that require fast response and stably on bumpy roads, and reduces the shaking of the light beam. For the integral element, the freeze and zero mechanism is set to prevent control overshoot caused by integral saturation when continuously turning at a large angle or encountering an impact, and the Kalman filter that can adjust the noise parameter in real time according to the vehicle speed and the bumping degree is constructed to predict the future vehicle body roll angle, and the derivative term is calculated based on the predicted future vehicle body roll angle, which can effectively compensate for the inherent delay of the system, so that the light beam is always ahead of the vehicle body posture and irradiates the driving path to be entered, thereby improving the safety and driving experience of night driving.

[0042] The embodiment of the motorcycle light control system provided by the application comprises the following modules:

[0043] a measurement module configured to acquire a body roll angle, a body pitch angle, a yaw rate and a body vertical acceleration output by a motorcycle inertial measurement unit in real time, and a current vehicle speed output by a vehicle speed sensor, and calculate a current target light azimuth angle based on the body roll angle, the body pitch angle and the current vehicle speed through a three-dimensional nonlinear mapping model or a three-dimensional lookup table;

[0044] an adjustment module configured to obtain a light azimuth deviation based on a difference between the current target light azimuth angle and a current light azimuth angle of a light system, determine a proportional term of a PID controller through a fuzzy logic inference system, calculate an integral term of the PID controller, freeze integral accumulation when an absolute value of the light azimuth deviation exceeds a first threshold value or an absolute value of the yaw rate exceeds a second threshold value, clear an integral accumulation value when an instantaneous value of the body vertical acceleration exceeds a jolt threshold value, and integrate the light azimuth deviation in other cases;

[0045] a control module configured to construct a Kalman filter with the body roll angle and the yaw rate as a state vector, predict a body roll angle at a future time step using the adjusted Kalman filter, input the predicted body roll angle, together with a currently acquired body pitch angle and a current vehicle speed, into the three-dimensional nonlinear mapping model or the three-dimensional lookup table to calculate a future target light azimuth angle, calculate a differential lead term of the PID controller based on a difference between the future target light azimuth angle and the current target light azimuth angle, and generate a light azimuth control signal by weighted summation of the proportional term, the integral term and the differential lead term.

[0046] In a preferred embodiment, an absolute value of the light azimuth deviation, an absolute value of the yaw rate and a road jolt degree are input into the fuzzy logic inference system; the road jolt degree is determined based on a standard deviation of the body vertical acceleration after high-pass filtering; a process noise covariance matrix Q of the Kalman filter is adjusted in real time according to a current vehicle speed and a rate of change of the yaw rate; and a measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to a high-frequency component of the body vertical acceleration.

[0047] In a preferred embodiment, the determination of the proportional term of the PID controller through the fuzzy logic inference system includes: dividing the absolute value of the light azimuth deviation into three fuzzy sets {small, medium, large}, dividing the absolute value of the yaw rate into three fuzzy sets {small, medium, large}, and dividing the road jolt degree into three fuzzy sets {flat, general, jolt}; and the proportional gain coefficient K p is divided into four fuzzy sets {small, medium, large, very large}; and the proportional term of the PID controller is obtained through inference according to a preset fuzzy rule.

[0048] In a preferred embodiment, the road roughness is determined by the standard deviation of the high-pass filtered vertical acceleration of the vehicle body, comprising: processing the vertical acceleration signal of the vehicle body by a second-order Butterworth high-pass digital filter with a cutoff frequency of 5 Hz; taking the high-pass filtered acceleration data in the last 1 second and calculating the standard deviation, and taking the standard deviation as the current road roughness.

[0049] In a preferred embodiment, the Kalman filter constructed with the body roll angle and yaw rate as the state vector, comprising: defining the state vector at time k as = [φ, ω z ] T , wherein φ is the body roll angle, ω z is the yaw rate; defining the state transition model as , wherein is the state vector at time k-1, is the process noise at time k-1; defining the observation model as , wherein the observation value is the state vector formed by the real-time output of the body roll angle and yaw rate of the inertial measurement unit at time k, is the measurement noise at time k.

[0050] In a preferred embodiment, the process noise covariance matrix Q of the Kalman filter is adjusted in real time according to the current vehicle speed and the rate of change of the yaw rate, comprising: the process noise covariance matrix Q is a diagonal matrix ; wherein the diagonal element is the process noise variance of the body roll angle, is adjusted according to the current vehicle speed v, the diagonal element is the process noise variance of the yaw rate, is adjusted according to the rate of change of the yaw rate.

[0051] In a preferred embodiment, the measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to the high-frequency component of the vertical acceleration of the vehicle body, comprising: the measurement noise covariance matrix R is a diagonal matrix ; wherein the diagonal element is the measurement noise variance of the body roll angle, is adjusted according to the energy of the high-frequency component of the vertical acceleration of the vehicle body, the diagonal element is the measurement noise variance of the yaw rate, is a constant preset according to the characteristics of the inertial measurement unit.

[0052] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and are not to be construed as limiting the present application, and that variations, modifications, substitutions and changes can be made by those skilled in the art without departing from the scope of the present application.

Claims

1. A light control method of a motorcycle characterized by comprising: The method comprises the following steps: acquiring a body roll angle, a pitch angle, a yaw angular velocity and a body vertical direction acceleration output by a motorcycle inertia measurement unit in real time, and a current vehicle speed output by a vehicle speed sensor; calculating a current target light illumination azimuth angle based on the body roll angle, the pitch angle and the current vehicle speed through a three-dimensional nonlinear mapping model or a three-dimensional lookup table; an illumination azimuth deviation is obtained according to a difference between the current target light illumination azimuth angle and a current light system azimuth angle, a proportional term of a PID controller is determined through a fuzzy logic reasoning system, an integral term of the PID controller is calculated, the integral accumulation is frozen when an absolute value of the illumination azimuth deviation exceeds a first threshold value or an absolute value of the yaw angular velocity exceeds a second threshold value, the integral accumulation value is cleared when an instantaneous value of the body vertical direction acceleration exceeds a jolt threshold value, and the integral accumulation of the illumination azimuth deviation is performed in other cases; a Kalman filter taking the body roll angle and the yaw angular velocity as state vectors is constructed; the body roll angle in a future time step is predicted by using the adjusted Kalman filter; the predicted body roll angle, together with the currently acquired pitch angle and current vehicle speed, is input into the three-dimensional nonlinear mapping model or the three-dimensional lookup table to calculate a future target light illumination azimuth angle; a differential lead term of the PID controller is calculated according to a difference between the future target light illumination azimuth angle and the current target light illumination azimuth angle; the proportional term, the integral term and the differential lead term are weighted and summed to generate a light azimuth control signal.

2. The motorcycle light control method according to claim 1, characterized by, The inputs of the fuzzy logic reasoning system are an absolute value of the illumination azimuth deviation, an absolute value of the yaw angular velocity and a road jolt degree; The road jolt degree is determined according to a standard deviation of the body vertical direction acceleration after high-pass filtering; A process noise covariance matrix Q of the Kalman filter is adjusted in real time according to a current vehicle speed and a change rate of the yaw angular velocity, and a measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to a high-frequency component of the body vertical direction acceleration.

3. The motorcycle light control method according to claim 2, characterized by, The determination of the proportional term of the PID controller through the fuzzy logic reasoning system comprises: the absolute value of the illumination azimuth deviation is divided into three fuzzy sets {small, medium, large}, the absolute value of the yaw angular velocity is divided into three fuzzy sets {small, medium, large}, and the road jolt degree is divided into three fuzzy sets {flat, general, jolt}; The proportional gain coefficient K output by the fuzzy logic inference system p is divided into four fuzzy sets {small, medium, large, very large}. the proportional term of the PID controller is obtained by reasoning according to preset fuzzy rules.

4. The motorcycle light control method according to claim 2, characterized by, The road jolt degree is determined according to a standard deviation of the body vertical direction acceleration after high-pass filtering, comprising: a second-order Butterworth high-pass digital filter is used to process the body vertical direction acceleration signal, and a cutoff frequency of the second-order Butterworth high-pass digital filter is 5 Hz; the standard deviation is taken as the current road jolt degree by taking the acceleration data after high-pass filtering in the last 1 second and calculating the standard deviation.

5. The motorcycle light control method according to claim 2, characterized by, The construction of the Kalman filter taking the body roll angle and the yaw angular velocity as state vectors comprises: The state vector at time k is defined as = [φ, ω z ] T where φ is the roll angle of the vehicle body and ω z is the yaw rate. The state transition model is defined as wherein, is the state vector at time k-1, is the process noise at time k-1; The observation model is defined as where the observation value is a state vector formed by the body roll angle and the yaw rate output in real time by the inertial measurement unit at time k, is the measurement noise at time k.

6. The motorcycle light control method according to claim 5, characterized by, The process noise covariance matrix Q of the Kalman filter is adjusted in real time according to a current vehicle speed and a change rate of the yaw angular velocity, comprising: The process noise covariance matrix Q is a diagonal matrix ; wherein the diagonal elements are the process noise variances of the body roll angle, are adjusted according to the current vehicle speed v, the diagonal elements are the process noise variances of the yaw rate, are adjusted according to the rate of change of the yaw rate.

7. The motorcycle light control method according to claim 6, characterized by, The measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to the high-frequency component of the vertical acceleration of the vehicle body, and the measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to the high-frequency component of the vertical acceleration of the vehicle body, including: The measurement noise covariance matrix R is a diagonal matrix ; wherein the diagonal elements are the measurement noise variances of the body roll angle, are adjusted according to the energy of the high frequency components of the body vertical direction acceleration, are the measurement noise variances of the yaw rate, are constants preset according to the characteristics of the inertial measurement unit.

8. A light control system for a motorcycle, characterized in that The method comprises the following modules: a measurement module, which is used to acquire the roll angle, the pitch angle, the yaw angular velocity and the vertical acceleration of the vehicle body output by the motorcycle inertial measurement unit in real time, and the current vehicle speed output by the vehicle speed sensor; based on the roll angle, the pitch angle and the current vehicle speed, a current target light azimuth angle is calculated through a three-dimensional nonlinear mapping model or a three-dimensional lookup table; An adjustment module, which is used to obtain a light azimuth deviation according to the difference between the current target light azimuth angle and the current azimuth angle of the light system, determine the proportional term of the PID controller through a fuzzy logic reasoning system, calculate the integral term of the PID controller, freeze the integral accumulation when the absolute value of the light azimuth deviation exceeds a first threshold value or the absolute value of the yaw angular velocity exceeds a second threshold value, clear the integral accumulation value when the instantaneous value of the vertical acceleration of the vehicle body exceeds a jolt threshold value, and integrate the light azimuth deviation in other cases; A control module, which is used to construct a Kalman filter with the roll angle and the yaw angular velocity as the state vector, predict the roll angle of the vehicle body at a future time step using the adjusted Kalman filter, input the predicted roll angle, together with the pitch angle and the current vehicle speed acquired at present, into the three-dimensional nonlinear mapping model or the three-dimensional lookup table to calculate a future target light azimuth angle; The differential lead term of the PID controller is calculated from the difference between the future target light azimuth angle and the current target light azimuth angle; The proportional term, the integral term and the differential lead term are weighted and summed to generate a light azimuth control signal.

9. The motorcycle light control system of claim 8, wherein, The inputs of the fuzzy logic reasoning system are the absolute value of the light azimuth deviation, the absolute value of the yaw angular velocity and the road jolt degree; the road jolt degree is determined by the standard deviation of the high-pass filtered vertical acceleration of the vehicle body; the process noise covariance matrix Q of the Kalman filter is adjusted in real time according to the current vehicle speed and the rate of change of the yaw angular velocity; the measurement noise covariance matrix R of the Kalman filter is adjusted in real time according to the high-frequency component of the vertical acceleration of the vehicle body.

10. The motorcycle light control system of claim 9, wherein, The determination of the proportional term of the PID controller by the fuzzy logic inference system comprises: dividing the absolute value of the illumination azimuth deviation into three fuzzy sets {small, medium, large}, dividing the absolute value of the yaw rate into three fuzzy sets {small, medium, large}, and dividing the road roughness into three fuzzy sets {flat, general, rough}; the proportional gain coefficient K p is divided into four fuzzy sets {small, medium, large, very large}; the proportional term of the PID controller is obtained by reasoning according to the preset fuzzy rules.

Citation Information

Patent Citations

  • Adjusting method and adjusting system for irradiation height of dipped headlight

    CN113147569A

  • Self-calibration method for vehicle-mounted BSD camera, device, and storage medium

    WO2023273376A1