SYSTEMS FOR VEHICLES USING SIMPLIFIED STATE MACHINES
20200272117 ยท 2020-08-27
Inventors
Cpc classification
International classification
Abstract
Systems for vehicles are disclosed using simplified state machines. For one example, a data processing system for a vehicle includes a plurality of subsystem nodes interconnected by a network topology. Each subsystem node includes a transceiver and micro-controller coupled to the transceiver. The micro-controller is configured to obtain an atomic machine state bit vector. Each bit of the atomic bit vector describes a state of the vehicle used by a state machine operating within the vehicle. The micro-controller multiplies a first bit vector mask with the atomic machine state bit vector to obtain a first result. The first result identifies first states of interest. The micro-controller determines a next state for the state machine based on the identified first states of interest. The micro-controller performs a function for the vehicle based on the determined next state. The atomic machine state bit vector can be updated based on the determined next state and distributed within the vehicle.
Claims
1. A data processing system for a vehicle comprising: a plurality of subsystem nodes interconnected by a network topology, each subsystem node including a transceiver and micro-controller coupled to the transceiver and the micro-controller configured to obtain an atomic machine state bit vector via the transceiver, each bit of the atomic machine state a bit vector describing a state of the vehicle used by a state machine operating within a subsystem node, multiply a first bit vector mask with the atomic machine state bit vector to obtain a first result, the first result identifying first states of interest, determine a next state based on the identified first states of interest, and perform a function for the vehicle based on the determined next state.
2. The data processing system of claim 1, wherein the micro-controller is configured to multiply a second bit vector mask with the atomic machine state bit vector to obtain a second result, the second result identifying second states of interest, determine a next state based on the identified first and second states of interest, and perform a function for the vehicle based on the determined next state based on the identified first and second states of interest.
3. The data processing system of claim 1, wherein the micro-controller is configured to determine the next state by comparing the first states of interest with states identified for a next state.
4. The data processing system of claim 2, wherein the micro-controller is configured to determine the next state based on the identified first and second states of interest by comparing first states of interest or second states of interest with states identified for a next state.
5. The data processing system of claim 1, further wherein the micro-controller is configured to update the atomic machine state bit vector based on the determined next state, and distribute the updated atomic machine state bit vector within the vehicle.
6. A non-transitory computer-readable medium, including instructions which if executed by a data processing system, causes the data processing system to perform an operation comprising: obtaining an atomic machine state bit vector, each bit of the atomic machine state bit vector describing a state of the vehicle used by a state machine operating within the vehicle; multiplying a first bit vector mask with the atomic machine state bit vector to obtain a first result, the first result identifying first states of interest; determining a next state for the state machine based on the identified first states of interest; and performing a function for the vehicle based on the determined next state.
7. The non-transitory computer-readable medium of claim 6, wherein the data processing system performs an operation comprising: multiplying a second bit vector mask with the atomic machine state bit vector to obtain a second result, the second result identifying second states of interest; determining a next for the state machine based on the identified first and second states of interest; and performing a function for the vehicle based on the determined next state based on the identified first and second states of interest.
8. The non-transitory computer-readable medium of claim 6, wherein the data processing system performs an operation comprising comparing the first states of interest with states identified for the next state in determining the next state.
9. The non-transitory computer-readable medium of claim 6, wherein the data processing system performs an operation comprising comparing first states of interest or second states of interest in determining the next state.
10. The non-transitory computer-readable medium of claim 6, wherein the data processing system performs an operation comprising: updating the atomic machine state bit vector based on the determined next state; and distributing the updated atomic machine state bit vector within the vehicle.
11. A vehicle comprising: a plurality of electronic control units (ECU), each ECU implementing a state machine to perform a function for the vehicle, wherein the state machine is configured to: obtain an atomic machine state bit vector, each bit of the atomic bit vector describing a state of the vehicle, multiply a first bit vector mask with the atomic machine state bit vector to obtain a first result, the first result identifying first states of interest, determine a next state based on the identified first states of interest, and perform a function for the vehicle based on the determined next state.
12. The vehicle of claim 11, wherein the state machine is further configured to: multiply a second bit vector mask with the atomic machine state bit vector to obtain a second result, the second result identifying second states of interest, determine a next based on the identified first and second states of interest, and perform a function for the vehicle based on the determined next state based on the identified first and second states of interest.
13. The vehicle of claim 11, wherein the state machine is further configured to compare the first states of interest with states identified for the next state in determining the next state.
14. The vehicle of claim 12, wherein the state machine is further configured to comparing first states of interest or second states of interest in determining the next state.
15. The vehicle of claim 11, wherein the state machine is further configured to: update the atomic machine state bit vector based on the determined next state, and distribute the updated atomic machine state bit vector within the vehicle.
16. A method for a vehicle comprising: obtaining atomic machine state bit vector, wherein each bit of the atomic machine state bit vector describes a state of the vehicle used by a state machine operating within the vehicle; multiplying a first bit vector mask with the atomic bit vector to obtain a first result, the first result identifying first states of interest; determining a next state based on the identified first states of interest; and performing a function for the vehicle based on the determined next state.
17. The method of claim 16, further comprising: multiplying a second bit vector mask with the atomic bit vector to obtain a second result, the second result identifying second states of interest; determining a next state based on the identified first and second states of interest; and performing a function for the vehicle based on the determined next state based on the identified first and second states of interest.
18. The method of claim 16, further comprising: comparing the first states of interest with states identified for a next state.
19. The method of claim 17, further comprising: comparing first states of interest or second states of interest with states identified for a next state.
20. The computing method of claim 16, further comprising: updating the atomic bit vector based on the determined next state; and distributing the updated atomic bit vector within the vehicle.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The appended drawings illustrate examples and are, therefore, exemplary embodiments and not considered to be limiting in scope.
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
DETAILED DESCRIPTON
[0017] Systems for vehicles are disclosed for using simplified state machines. For one example, a vehicle includes any number of electronic control units (ECUs) that performs a function of the vehicle based on one more states of the vehicle using a state machine. The state machine for the ECUs can use an atomic machine state bit vector comprising a plurality of bits, and each bit can describe a state within a vehicle. The atomic machine state bit vector can provide a simplified way of maintaining states throughout a vehicle, which can be maintained by updating and distributing the atomic machine state bit vector based on changing states within the vehicle. For one example, bit vector masks can be used to multiply with the atomic machine state bit vector to obtain states of interest. The states of interest can be compared to states for a next state. If the next state is determined based on the states of interest, the state machine for one or more ECUs can perform a function for the vehicle based on the next state.
[0018] As set forth herein, various embodiments, examples and aspects will be described with reference to details discussed below, and the accompanying drawings will illustrate various embodiments and examples. The following description and drawings are illustrative and are not to be construed as limiting. Numerous specific details are described to provide a thorough understanding of various embodiments and examples. However, in certain instances, well-known or conventional details are not described in order to provide a concise discussion of the embodiments and examples. Although the following examples and embodiments are directed to vehicles including electric or non-electric automobiles or sports utility vehicles (SUVs), the disclosed techniques can be applied to any type of environment using a data processing system with finite-state machines.
Exemplary Vehicle with Interconnected ECUs and Subsystem Nodes
[0019]
[0020] Referring to
[0021] For one example, network topology 120 includes network or communication busses 117 and 118 interconnecting ECUs 151 through 156 and coupling the ECUs to vehicle gateway 127. In this way, network topology 120 allows ECUs and vehicle gateway 127 in different networking areas of vehicle 110 to communicate messages and signals with each other. For one example, vehicle gateway 127 can be a micro-controller, computing or data processing system, system-on-chip (SOS), or any embedded system that can run firmware or software code to perform individual functions and control of various components within vehicle 110 including running a finite-state machine as disclosed herein.
[0022] For one example, network topology 120 and busses 117 and 119 can support any number of messaging networks and protocols including Controller Area Network (CAN), Local Interconnect Protocol (LIN), and Ethernet network and protocol. For one example, the messaging protocols can define messages using network descriptor files, e.g., CAN database container (DBC) files, LIN network descriptor files (LDF) and Ethernet network descriptor files, which describe the network topology, ECUs connected to a bus, and the messages and signals used by the ECUs. In other words, network descriptor files can provide a map of ECUs for network topology 150. For some examples, ECUs for network area 105-A can have its own network descriptor file as well as ECUs for network areas 105-B and 105-C, respectively. In other examples, each ECU can have its own network descriptor file. Each ECU can run firmware or code based on message and signal definitions in respective network descriptor files.
[0023] For one example, vehicle gateway 127 can coordinate communication within network topology 120 between the ECUs 111-116. For one example, vehicle gateway 127 interconnects groups (or networks) and can coordinate communication between a group of ECUs 111-113 with another group of ECUs 114-116 on busses 117 and 118. Vehicle gateway 127 can also have a wireless network connection to connect externally to the cloud or Internet and communicate external signals and data, e.g., global positioning system (GPS) signals and data.
[0024]
Exemplary Simplified State Machine Operation
[0025]
[0026] For one example, an ECU or subsystem node for a motor can implement finite-state machine 200 that can enter state 1 (202)Engine On. At state 1 (202), finite-state machine 200 can receive any number of inputs, e.g., inputs 1 through N. Each input 1-N can be another state or signal and used to determine a next state, e.g., states 2-4. For example, at state 1 (202), finite-state machine 200 can receive inputs as states such as, e.g., rear brake lights on which is provided from a rear brake ECU or subsystem node and low motor speed which can be a signal or state from a sensor indicating low speed. Such states, e.g., rear brake lights on and low motor speed can be represented by a respective bit in atomic machine state bit vector 302 as shown in
[0027] For one example, in determining a next state from state 1 (202), finite-state machine 200 can use a bit mask 304 as shown in
[0028] For one example, the result 306 (or other results) can be input to a comparator 407 as shown in
Exemplary Atomic Machine State Bit Vector, Masks and Results
[0029]
[0030]
[0031]
[0032] For another example, second bit mask 324 having bit values for the first four bits as 0 0 0 1 and all other bits 0. In this example, second bit mask 324 masked all bits except for the fourth bit which is set with a value 1. Second bit mask 324 can be multiplied with atomic machine state bit vector 312 having values 0 1 1 1 for its first four bits and all other bits having a value of 0. In this multiplication, second result 326 can be obtained that provides a result of 0 0 0 1 for the first four bits. For one example, finite state machine 200 can use either first result 316 OR second result 326 which can be inputs comparator 407 in
Exemplary Simplified State Machine Operations
[0033]
[0034] At operation 502, an atomic state of an atomic machine state bit vector (e.g., atomic machine state bit vector 302 or 312) is obtained. The atomic machine state bit vector can include a plurality of bits, where each bit can represent a state of a vehicle, and be obtained from a register or from one or more words in memory.
[0035] At operation 504, one or more bit masks are multiplied with the obtained atomic machine state bit vector. The bit masks can mask bits or states of interest within an atomic machine state bit vector. The multiplication or Boolean AND operation can produce one or more results that identified states of interest as illustrated in
[0036] At operation 506, a next state can be determined using one or more result values based on the multiplication of the bit masks with the atomic machine state bit vector. For example, referring to
[0037] At operation 508, a vehicle function can be performed based on the next state. For example, a finite-state machine (e.g., finite-state machine 200) can be implemented by one or more ECUs operating within a vehicle (e.g., vehicle 110). The finite-state machine can determine a next state which is used by one or more ECUs to perform a function for the vehicle, e.g., turn on regenerative breaking or turn on headlights etc.
[0038]
[0039] At operation 602, an atomic machine state bit vector (e.g., atomic machine state bit vector 302 or 312) is updated based on a next state (e.g., next state 410). For one example, once a next state is determined a new state can be determined and atomic machine state bit vector updated to reflect the new state.
[0040] At operation 604, the updated atomic machine state bit vector can be distributed within a vehicle (e.g., vehicle 110). For example, one or more ECUs, subsystem nodes or vehicle gateway running a state machine can distribute the updated atomic machine state bit vector to other ECUs or a gateway. In one example, a next state can be distributed and each ECU can update respective atomic machine state bit vectors to reflect the updated state.
[0041] At operation 606, the updated atomic machine state bit vector is used by a state machine to determine a next state and to perform a vehicle function based on the next state. The updated atomic machine state bit vector can be used by any ECU, subsystem node or gateway operating within a vehicle.
[0042] In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of disclosed examples and embodiments. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.