CROSS REFERENCE TO RELATED APPLICATIONS
The present application is a continuation application of U.S. patent application Ser. No. 11/554,370 filed Oct. 30, 2006, the contents of which are hereby incorporated by reference into this application, which is a continuation under 35 U.S.C. 120 of International Application PCT/SE2005/000581 filed on Apr. 21, 2005, the contents of which are hereby incorporated by reference into this application, which claims priority to Swedish Application 0401130-0 filed on Apr. 30, 2004.
The present disclosure relates to a fixed and/or movable system, in particular in or for vehicles, for example cars. The system operates with common or related time bases for indication of the time of detected or generated events in the system, and/or in a system or systems connected to this.
The present disclosure also relates to a device for effecting the establishment of functions carried out by two or more units (nodes) comprised in the system in a fixed and/or movable system, in particular in or for vehicles, for example cars. The device can relate to arrangements for detection, control, analysis and/or simulation of comprised units.
The use of systems of this type in, for example, vehicles, is already known and reference can accordingly be made, among other things, to the patent applications and patents submitted by and granted to the same applicant as the present applicant. In the respective systems, the message and information (data) transmissions are carried out using or in accordance with protocols of a known type, which can be of a standardized type, for example Universal Serial Bus (USB), Controller Area Network (CAN), Local Interconnect Network (LIN), Ethernet, IEEE 802.11x, Infrared (IR), Wireless USB (WUSB), etc.
With this type of system, there are problems in determining events and/or time functions without relatively complicated and bandwidth-intensive arrangements. There is, for example, a desire to be able to determine the occurrence of the events and/or give indications of the time so that the normal traffic can be utilized to indicate the relevant time and/or occurrence of the event, for example, without extra hardware needing to be involved. The object of the disclosure is, among other things, to solve this problem. There is a need, in the respective module units, to be able to operate with preferably small resources with the object of simplifying the construction of the units. There should also be great freedom of choice in the construction of systems and their relationships. This disclosure also solves this problem.
A major problem in distributed embedded control system is to synchronize the generation of events in different nodes to each other in a timely manner, e.g., reading sensor values, execution of movements, releasing of power etc. The main solution to this problem is to create a global time and synchronize clocks at each node. Usually the time synchronization is made at the communication level. Typical examples are TTCAN, TTP and FlexRay protocols in the vehicle industry and SERCOS in the factory automation industry. All of these communication protocols are time triggered and it is a common opinion that safety critical distributed embedded control systems have to be based on a time triggered communication. An alternative to synchronizing clocks is to have each module relying on its own local clock and have a time translator recalculating the time of each clock to a common global time, but it has been regarded impossible to do in real time.
U.S. Pat. No. 5,896,524 suggests a method to recalculate clock readings by associating event pairs related to each other. However, such conventional methods cannot be used in realtime (e.g., see column 1, line 65 through column 2, line 4). What is needed is a method and apparatus that calculates the relationship between local clocks at run time. What is further needed is to calculate the relationship between local clocks and a global time base at run time.
U.S. Patent Application Publication US2006-0143345A1 shows that, in realtime systems at run time, it is more efficient to use different time domains within the system, wherein each time domain is created according to the need of cooperating nodes, rather than to rely on a global time. However, a global time may be better used for analyzing a system.
Each system in which the disclosure can be used can be regarded as individual, one or more series or sequences of events that are related to each other in time and space. There can be different time descriptions and time frames within one and the same system. Smaller systems can be comprised in the system, which in turn can, now or later, be comprised in other systems. During the first stage, the “drawing board” stage, of a system development, it is expedient to relate all the events to one and the same time frame, for example related to the physically defined second. The degree of coordination that is required of the different events in order for the required system function to be achieved can be analyzed in a first stage. In a second stage, an analysis of the relationship of the individual events to each other can indicate that other time frames and the utilization of knowledge concerning the association of different events to each other can simplify the design of the final system and the description, verification and validation of the same. The disclosure simplifies these development processes.
For analysis or verification of systems, there is a need not only to timestamp events that have occurred, but also to know with what precision and/or accuracy the timestamping is carried out.
It can happen in systems that different parts of the system relate events to different time bases, which in turn are related to each other.
Analysis and monitoring instruments of different types for vehicles are often based on standard computers with operating systems, for example a personal computer (PC) with WINDOWS XP®. The operating system (OS) simplifies the development of the software at the price of precision of timestamping of external events. Therefore special units are introduced between the PC and the bus system that, among other things, comprise a clock for timestamping of incoming time messages. For example, with the utilization of the program CANANALYZER from the company VECTOR, a CANCARDXL from the same company is connected to the PC. The CANCARDXL has a local clock and can timestamp messages from two CAN busses. If there is a need for several CAN busses, an additional CANCARDXL unit must be connected to the PC and the two CANCARDXL units must be connected to a coordination unit via a coaxial cable arrangement in order to synchronize their local clocks to a common time. By utilizing the disclosure, timestamping can be carried out with great precision, utilizing only components to be found as standard in the PC.
- Top of Page
This disclosure addresses time synchronization in distributed embedded control systems by selecting specific events and their relation to the local time at different nodes ahead of time to be identified as reference events. A time translator can then filter out messages with time stamps related to the reference events, and a respective transmitting node within the system. By defining the relationship between a reference event, time-stamped according to a first clock at a first node, and the time relation of the reference event to a second clock, the time translator can recalculate the first time to the second time and vice versa at run time, i.e., in real time.
In addition, a reference event can generate several secondary events. By defining the relationship between such a reference event, its secondary events, the time stamping of these events, and how these time stamps are transmitted to a time translator, a time translator can be programmed to recalculate the time at one time domain to the time at another time domain at run time
An occurrence of the execution of a function can be arranged to be able to be detected and determined by means of one or more devices that perceive time, for example clocks, and/or devices that indicate events, which devices are comprised in one or more of the units that constitute or form module units in the system. The system can thereby include one or more serial, distributed and protocol-utilizing systems. The respective determination is to be arranged to form the basis of or invoke functionality in the system and/or in monitoring, analyzing, verifying, completely or partially simulating or stimulating devices in the system.
A consequence of the concept of the disclosure is that the same or different events that are perceived or generated by different modules in the same or different systems can be time related in a simple way. The modules that are affected by the time relating can perceive certain events at the same time, or alternatively certain different events for which the time relationship is known. Such events belong to the group “reference events”. The modules can be arranged to generate or detect reference events, display local clock function, be able to read off local time upon the detection or generation of a reference event and provide time information on the basis of the value that was read off being sent to one or more translation units. The translation unit(s) then utilize these values in order to create a common time reference for the modules and events concerned, with the result that it is possible to create time indications that are comparable. The translation unit can be considered to create a common time domain for relating events. Comparisons can be carried out in different time domains that can be created by different translation units, which can utilize common reference events. In an embodiment, the bit pattern in a communication protocol is utilized as reference event. For example, the Start Of Frame bit (SOF) in CAN is suitable. More specifically, the sampling point in the bit can be used, as certain CAN controllers, for example MCP 2515 from MICROCHIP (Microchip Technology, Inc., 2355 West Chandler Boulevard, Chandler, Ariz., USA, 85224-6199), generate a signal for this that can be used in order to trigger the requisite electronics for the reading off of local time for the occurrence of the event.
Further developments of the concept of the disclosure are apparent from the following.
For example, the system operates with event functions and accordingly reference events can be utilized which can be related to one or more reference event generators. A reference event can be sent from a common point and can refer to a common group. The reference events can occur at particular intervals and can themselves define the clock function (compare with a Phase Locked Loop). The reference event detectors must be able to be placed in the units and accordingly a detector can be placed in each unit. An interrupt generated by a selected protocol's communication circuit can be utilized as a detector. The respective detector can be set up by defining or implementing how it is to be obtained (for example, by connecting to a suitable layer in the protocol stack and searching there for a special packet/bit pattern/edge). Events must be able to be related by group, for example with regard to sequence or time. The group can work with a common starting point. Thus, for example, a unit can communicate directly with all units in the group or at least send messages that all the other units can detect. The messages can represent typical events. The respective message can, for example, include packets according to any serial communication standard, for example the protocols mentioned in the introduction. The reference event can consist wholly or partially of a message. The USB protocol's Start-of-Frame (SOF) packet can advantageously be selected as reference event. This packet is transmitted in the normal way and has a sequence number, which facilitates the correct association of timestamp to reference event. USB packets propagate in a USB system in a defined way and a USB host can be regarded as a reference event generator in its own time domain, distinct from other time domains, for example the domain in which a WINDOWS application operates, in the same PC as the USB host. The reference events can be transmitted to all units that are comprised in the same USB arrangement, that is all units can listen to the same event, for example, at the same time. The phrase at the same time here means a maximum of 50-100 ns jitter in the detection for all the units plus up to a couple of hundred ns constant delays. A USB Hi-speed maximal delay can be 26 ns in the cable, 4 ns in the “hub trace”, 36 hs-bits in the hub electronics in a maximum of 5 levels plus 30 ns for connecting in last unit, totaling 530 ns. A Hi-speed jitter due to the USB protocol can be a maximum of 5 hs-bits per hub and a maximum of 5 hubs can be connected, which gives a maximal uncertainty of 25 hs-bits, which corresponds to approximately 50 ns time inaccuracy for the propagation of an SOF through a USB connection. A “hs-bit” is here considered to be the duration of a hi-speed USB bit time i.e. 1/(480 MHz), or approximately 2 ns.
In the embodiments, each unit can comprise a local clock which is able to be read by or in the application in question. Timestamping can be carried out of each reference event and the timestamping is carried out preferably with externally triggered capture register. Correct association of the timestamp with the reference event can be ensured. The timestamps can form the basis for relating clocks, time and events. The clocks or the read-off time must be able to be related. In addition, in an embodiment, a time master can be included, whose time is, if required, to be regarded as global (in groups). In order to create a transitive relationship, that is even if two different units cannot directly relate their time to each other, this can still be achieved if both can relate their times to a utilized master or intermediate unit. The time master can, in turn, be synchronized or related to a second reference, for example GPS. This gives the system access to a correct physical second that can be used for physical calculations, for example engine speed, power, accelerations, etc. The location of the time master can be in a common point in the system concerned, can be separate or can have another role in another unit. The role or the function can be changed. In an embodiment, the system does not need to utilize any master unit, but instead the translation takes place in an all-to-all function. In addition, it should be pointed out that a time master does not need to have its own physical clock, but instead can construct a virtual clock function by utilizing timestamps of reference events carried out by and messages from modules with their own time domains, that are connected to the system. With knowledge of the relationships of the reference events and respective time domains to each other, the time master can transform the time information to a time domain of its own and give respective time information referring to its own time domain to other units within or outside the system.
An important part for an efficient utilization of the disclosure is the actual development process for the device. In a first stage, the events are identified that are to be generated and detected and their relationships to a common notional time base relating to times and a permitted range around these, in order for the device to have the required functionality. In a second stage, events are identified that can constitute reference points between different units, in order for these to be able to detect, initiate or generate other events within the required time range, relative or absolute. In a third stage, functions are implemented in an actual design in order to achieve the required functionality. It should be pointed out that reference events are defined at system level and that these do not need to be known at module level. A basic idea in the disclosure is the concept of time. Each interaction between given event patterns can be regarded as having its own time domain, that is the time frame is based on its own time tick generator (which can be linear or non-linear) and the time indication is given as the number of ticks, whole plus if required parts thereof, according to a linear or circular model. The different time domains can be transformed from and to each other. Domains with circular model will appear as a cyclic course of events and those with a linear restricted model as discrete intervals in a linear unrestricted model. For general analysis tools, it is expedient to utilize a linear unrestricted model with the physical second as time tick. Another basic idea in the disclosure is the concept of a system. According to the disclosure, the system is regarded as a number of event functions that are coordinated by a controlling unit, the sum of all the event functions. These functions can be of two types, event-generating or event-detecting. The coordination takes place in time and space. A part of the coordination is carried out mechanically, and a part is carried out through the exchange of information between electronic units, of which a part of the latter is carried out via serial communication, for example of the CAN or USB type, directly or in combination. The system S is described with the number n of subsidiary functions F as:
where Fi is the sum of the number m of events h, that is
In the first stage, the system in one or a few time domains is described, which system is well suited for describing and calculating its characteristics, for example the time domain T. This can be represented symbolically by: