A kind of automobile speed signal processing methodTechnical field
The invention belongs to technical field of automotive electronics, relate to a kind of automobile speed signal processing method.
Background technology
Along with expanding economy, the raising of living standards of the people, automobile has become one of important vehicle that people ride instead of walk.Automobile control is the process of a more complicated, and wherein, it is a very important signal that vehicle speed signal is controlled automobile.
Each automobile all must show its speed of a motor vehicle in instrument, and the source of this speed of a motor vehicle is nothing but from car speed sensor or ABS (antiblock device) wheel speed, and for different cars, car speed sensor and ABS not necessarily all have, so each vehicle adopts the source that shows the speed of a motor vehicle possible different, and some controller all needs to use vehicle speed signal, if these vehicle speed signal sources that need the controller of vehicle speed signal to obtain under the vehicle of difference configuration of the different so possibility of automobile type configuration are different, will cause same controller in the vehicle of difference configuration, to adopt different software to process vehicle speed signal.
For this reason, our company has applied for the patent of invention of " a kind of vehicle speed signal processing system " by name on December 18th, 2009, engine controller EMS and combination instrument ICU gather vehicle speed signal one, vehicle speed signal two and gather vehicle speed signal three by the wheel speed signal processing equipment from car speed sensor respectively in this disposal system, and can select according to the selection mechanism of self, the situation that vehicle speed signal is lost in the time of can avoiding car speed sensor to lose efficacy, but this selection mechanism is fairly simple, and alerting ability is not enough.
Summary of the invention
The objective of the invention is for the existing the problems referred to above of existing automobile speed signal, process more rigorous automobile speed signal processing method and proposed a kind of selection to vehicle speed signal.
Purpose of the present invention can realize by following technical proposal: a kind of automobile speed signal processing method, be used for vehicle speed signal processing system, engine controller (EMS) and combination instrument (ICU) that described vehicle speed signal processing system comprises car speed sensor and connects with this car speed sensor, described engine controller (EMS) and combination instrument (ICU) can gather vehicle speed signal one and vehicle speed signal two from above-mentioned car speed sensor respectively, this system also comprises CAN bus and the gateway that is connected on the CAN bus, described engine controller (EMS) is connected ICU with combination instrument) all be connected with above-mentioned CAN bus, described gateway can receive above-mentioned vehicle speed signal one and in vehicle speed signal two these two kinds of elementary vehicle speed signal one or both by above-mentioned CAN bus, and can select the most a kind of elementary vehicle speed signal to supply with various control units as secondary vehicle speed signal, it is characterized in that, described gateway is selected to process to the various elementary vehicle speed signal of transmitting on the CAN bus and is comprised the steps:
A, the various elementary vehicle speed signal on the CAN bus is received; If vehicle speed signal one and/or vehicle speed signal two are only arranged on the CAN bus, then enter step b;
B, whether effective, if effectively, enter step c if detecting vehicle speed signal one; If the invalid steps d that then enters;
C, secondary vehicle speed signal are effective, and vehicle speed signal one assignment is given secondary vehicle speed signal, and enters step I;
D, whether effective, if effectively, then enter step e if detecting vehicle speed signal two;
E, secondary vehicle speed signal are effective, and vehicle speed signal two assignment are given secondary vehicle speed signal, and enter step I;
I, gateway send secondary vehicle speed signal to the CAN bus, adopt for each control unit.
In above-mentioned a kind of automobile speed signal processing method, described vehicle speed signal processing system also comprises the wheel speed signal processing equipment that is connected with the CAN bus, described wheel speed signal processing equipment can gather the wheel wheel speed signal and this wheel speed signal can be changed into vehicle speed signal three, and described gateway can receive described vehicle speed signal three by the CAN bus equally.Vehicle speed signal three also is as a kind of elementary vehicle speed signal.
In above-mentioned a kind of automobile speed signal processing method, when only having vehicle speed signal three these a kind of elementary vehicle speed signal effective on the CAN bus, then described gateway is selected to process to the various elementary vehicle speed signal of transmitting on the CAN bus and is also comprised the steps:
A2, the vehicle speed signal three on the CAN bus is received, and enter step f;
F, whether effective, if effectively then enter step g, if invalid, then enter step h if detecting vehicle speed signal three;
G, secondary vehicle speed signal are effective, and vehicle speed signal three assignment are given secondary vehicle speed signal, and enter step I;
H, keep nearest secondary vehicle speed signal after a period of time, secondary vehicle speed signal set is invalid, enters simultaneously step I.When gateway do not receive vehicle speed signal one and vehicle speed signal two or receive vehicle speed signal one all be invalid value with vehicle speed signal two after, then gateway just begins to carry out the operation of above-mentioned steps.
In above-mentioned a kind of automobile speed signal processing method, in the described steps d, when vehicle speed signal two is invalid, enter step f.
In above-mentioned a kind of automobile speed signal processing method, among the described step c, after vehicle speed signal one assignment is given secondary vehicle speed signal, also have following steps:
C1, whether effective, if effectively then enter step c2 if detecting vehicle speed signal two; If the invalid step c5 that then enters;
C2, vehicle speed signal one and vehicle speed signal two are compared, and enter step c3;
The difference size that compares among c3, the determining step c2 is if difference relatively then enters step c4 in the error limit that allows; Otherwise enter step c5;
C4, secondary vehicle speed signal are effective, and secondary vehicle speed signal is equivalent to vehicle speed signal one, and enters step I;
C5, employing vehicle speed signal one are originated as the assignment of secondary vehicle speed signal, and are entered step I.
In above-mentioned a kind of automobile speed signal processing method, described wheel speed signal processing equipment is antiblock device (ABS).
Compared with prior art, present patent application can make each vehicle can use same set of speed of a motor vehicle processing policy, simultaneously also so that more rigorous for the processing of the speed of a motor vehicle for the control unit that needs vehicle speed signal, the controller software that namely can realize same function adopts same version, again can be so that controller has certain fault-tolerance for the employing of vehicle speed signal.
Description of drawings
The schematic diagram of Fig. 1 vehicle speed signal processing system.
Fig. 2 is the flow chart of steps of this automobile speed signal processing method.
The specific embodiment
Below be specific embodiments of the invention and by reference to the accompanying drawings, technical scheme of the present invention is further described, but the present invention be not limited to these embodiment.
This automobile speed signal processing method is applied in the vehicle speed signal processing system, as shown in Figure 1, vehicle speed signal processing system comprises car speed sensor, engine controller (EMS), combination instrument (ICU), wheel speed sensors, antiblock device (ABS) and as the car body controller (BCM) of gateway, antiblock device (ABS), car body controller (BCM), engine controller (EMS) and combination instrument (ICU) all are connected on the CAN bus.Engine controller (EMS) is connected ICU with combination instrument) also be connected with car speed sensor by rigid line simultaneously, and gathering vehicle speed signal one and vehicle speed signal two from car speed sensor respectively, engine controller (EMS) and combination instrument (ICU) collect and send this signal with cycle T behind the signal of car speed sensor and transmit in the CAN bus.Also be connected by rigid line between antiblock device (ABS) and the wheel speed sensors, can gather the wheel wheel speed signal and be converted into vehicle speed signal three from wheel speed sensors, antiblock device (ABS) sends this signal with cycle T equally and transmits in the CAN bus.Vehicle speed signal one, vehicle speed signal two and vehicle speed signal three are transmitted in the CAN bus as elementary vehicle speed signal.
As shown in Figure 2, car body controller (BCM) is unified to receive to the various elementary vehicle speed signal on the CAN bus, and it is selected to process, secondary vehicle speed signal after output is processed again, need the node of vehicle speed signal to receive the secondary vehicle speed signal that car body controller (BCM) sends on the CAN bus, then carry out self corresponding control, select treating process to comprise the steps:
A, the various elementary vehicle speed signal on the CAN bus is carried out reception ﹠ disposal; If vehicle speed signal one and/or vehicle speed signal two are arranged on the CAN bus, then enter step b;
If when only vehicle speed signal three being arranged on the a2 CAN bus, then enter step f;
B, whether effective, if effectively, enter step c if detecting vehicle speed signal one; If the invalid steps d that then enters;
C, secondary vehicle speed signal are effective, and vehicle speed signal one assignment is given secondary vehicle speed signal, and enters step c1;
C1, whether effective, if effectively then enter step c2 if detecting vehicle speed signal two; If the invalid step c5 that then enters;
C2, vehicle speed signal one and vehicle speed signal two are compared, and enter step c3;
The difference size that compares among c3, the determining step c2 is if difference relatively then enters step c4 in the error limit that allows; Otherwise enter step c5;
C4, secondary vehicle speed signal are effective, and secondary vehicle speed signal is equivalent to vehicle speed signal one, and enters step I;
C5, employing vehicle speed signal one are originated as the assignment of secondary vehicle speed signal, and are entered step I;
D, whether effective, if effectively, then enter step e if detecting vehicle speed signal two; If the invalid step f that then enters;
E, secondary vehicle speed signal are effective, and vehicle speed signal two assignment are given secondary vehicle speed signal, and enter step I;
F, whether effective, if effectively then enter step g, if invalid, then enter step h if detecting vehicle speed signal three;
G, secondary vehicle speed signal are effective, and vehicle speed signal three assignment are given secondary vehicle speed signal, and enter step I
H, keep nearest secondary vehicle speed signal after a period of time, secondary vehicle speed signal set is invalid, enters simultaneously step I;
I, gateway send secondary vehicle speed signal to the CAN bus, adopt for each control unit.
Step11: if vehicle speed signal one is effective, car body controller (BCM) is given secondary vehicle speed signal with vehicle speed signal one assignment, then sends to each other node (ECU) in the CAN bus;
Step12: if vehicle speed signal one is invalid, and vehicle speed signal two is effective, and car body controller (BCM) is given secondary vehicle speed signal with vehicle speed signal two assignment, then sends to each other node (ECU) in the CAN bus;
Step13: if vehicle speed signal one is all invalid with vehicle speed signal two, and vehicle speed signal three is effective, and car body controller (BCM) is given secondary vehicle speed signal with vehicle speed signal three assignment, then sends to each other node (ECU) in the CAN bus;
Step14: if vehicle speed signal one, vehicle speed signal two and vehicle speed signal three are all invalid, car body controller (BCM) will send the secondary vehicle speed signal of nearest actv. to each other node (ECU) a period of time T in the CAN bus, if still do not receive during this period the elementary vehicle speed signal of actv. always, crossed so during this period of time T, car body controller (BCM) is invalid value with secondary vehicle speed signal assignment, then sends to each other node (ECU); If receive during this period effective speed of a motor vehicle, close so this timer, carry out step11.
Each detect after vehicle speed signal one and the vehicle speed signal two as 2 speed of a motor vehicle all effectively also need 2 speed of a motor vehicle are done contrast, no matter 2 vehicle speed value deviations are much, gateway forwards all be the signal of vehicle speed signal one.But, for combination instrument (ICU) internal operation (following all is for 2 speed of a motor vehicle are all in the actv. situation), if vehicle speed signal one and vehicle speed signal two deviations are in permissible range, the speed of a motor vehicle source of combination instrument (ICU) demonstration directly is the processing costs from the car speed sensor that oneself gathers so, if vehicle speed signal one and vehicle speed signal two deviations are greater than permissible range, combination instrument (ICU) will adopt the source that the vehicle speed value of engine controller (EMS) shows as the speed of a motor vehicle so.
Only in the situation that vehicle speed signal one and vehicle speed signal two are all invalid or all do not receive just and can process simultaneously simultaneously, namely vehicle speed signal three is space signals to vehicle speed signal three, but to receive be to receive to gateway always.
Specific embodiment described herein only is to the explanation for example of the present invention's spirit.Those skilled in the art can make various modifications or replenish or adopt similar mode to substitute described specific embodiment, but can't depart from spirit of the present invention or surmount the defined scope of appended claims.