Title
Method and system for updating of software
Field of the invention
The present invention relates to a method for updating of software in a control unit in a vehicle, and to a system adapted to updating of same.
Background to the invention
Today's vehicles are usually provided with electronic control units (ECUs) which control many of their functions and which contain software.
Modern software incorporated in ECUs often comprises parameters adapted to the vehicle in which the control unit is situated. Adaptation takes place when the vehicle is in operation, which means the vehicle having to be run for tens of kilometres (and to encounter certain situations) before it functions optimally. The adaptation is done to compensate for the vehicle's individual variations such as tolerances, injection to the engine etc.
These adaptation parameters are often saved in some form of memory in the ECU and remain there even if the control unit's power supply is interrupted.
The state of the art makes it possible to update software in vehicles which have already been sold to customers, and it may in future become usual to offer customers a software update on the occasion of a visit to a workshop or via some mobile solution. See for example US 2005/0256614 which describes a system and a method for remote updating of software on ECUs. The ECUs are connected to a telematic unit with a processor via which they are updated wirelessly.
However, there is great risk that the new software may be saved without adaptation parameters in some other way and that the parameters may not be stored at the same positions in the control unit's memory, which in the state of the art means having to delete the old adaptation and start again with default values of the adaptation parameters. This
FlSCORD CGFY-TRANSLMTION
(Rule 1 2,4)
may lead to the vehicle's behaviour being initially inferior to before the update. This will not be acceptable at a future time when vehicle software is updated several times a year. Setting the new adaptation parameters after an update may then entail running the vehicle in a test cell, an expensive and time-consuming procedure.
US 2006/0156297 describes a method and device for modification of software in a control unit, and a corresponding control unit. In that case the software is updated by old software being linked to new software and the execution of old parts of software being replaced by execution of new parts of software, obviating any need to update all of the control unit's software and reducing the time taken to update the software.
However, US 2006/0156297 does not solve the problem of old adaptation parameters being cross-saved. The object of the invention is therefore to propose a method for updating of software in an ECU in a vehicle so that the software in the ECU can continue to use the old adaptation parameters after the update.
Summary of the invention
The object described above is achieved according to an aspect by a method for updating of software in a control unit in a vehicle, which software comprises adaptation parameters specific to said vehicle and map information about the adaptation parameters which the control unit uses and where they are stored in the control unit, which method comprises:
A) identifying the old adaptation parameters used in the old software by using map information pertaining to the old software;
B) saving identifications and values of said old adaptation parameters in a memory;
C) identifying the adaptation parameters used in the new software by using map information pertaining to the new software, and installing the new software in the control unit;
D) transferring values of old adaptation parameters identified in step C) to the new software, and storing the old adaptation parameters at locations determined by the new map information.
The method makes it possible for parameters in a control unit which have been adapted and are therefore specific to the vehicle to be preserved during an update of the software. The driver will then find the vehicle's behaviour better from the start. As the vehicle can be run immediately with the adapted parameters, its performance is better than it would be if it were run with default values of the adaptation parameters.
The object of the invention is achieved according to another aspect by a system adapted to updating of software in a control unit in a vehicle, which software comprises adaptation parameters specific to said vehicle and map information about the adaptation parameters which the control unit uses and where they are stored in the control unit, which system comprises: communication means adapted to communicating between the system and the control unit; identification means adapted to identifying the old adaptation parameters used in the old software by using map information pertaining to the old software, and to identifying the adaptation parameters used in the new software by using map information pertaining to the new software; and a processor adapted to applying instructions for saving said old adaptation parameters in a memory; installing new software in the control unit; and to transferring values of old adaptation parameters identified in the new software from the memory to the new software, and storing the old adaptation parameters at locations in the control unit which are determined by the new map information.
The method and/or the system may according to an embodiment be implemented in PC- based software which for example a workshop uses for reprogramming the control units.
Preferred embodiments are described in the dependent claims and the detailed description.
Brief description of the attached drawings
The invention is described below with reference to the attached drawings, in which:
Figure 1 is a flowchart for the method according to an embodiment of the invention.
Figure 2 illustrates software with relating map information according to an embodiment of the invention.
Figure 3 is a flowchart for the method according to another embodiment of the invention.
Figure 4 illustrates a system adapted to updating of software in a control unit according to an embodiment of the invention.
Detailed description of preferred embodiments of the invention
The electronic control units (ECUs) referred to in this description are programmable.
They have no fixed behaviour and can be reprogrammed. A vehicle usually has a plurality of ECUs which each control one or more different functions in the vehicle. The ECUs communicate with one another and with sensors in the system by using CAN (controller area network) which is a serial bus system specially developed for use in vehicles. The CAN data bus makes digital data exchange possible between sensors, regulating components, actuators, control units etc. and provides assurance that several control units can have access to signals from a given sensor in order to use them for control of components connected to them. An ECU may comprise a microcontrol (CPU) which can process input signals from sensors in real time. The CPU usually comprises a processor, a memory and peripheral equipment.
A programmable ECU may for example control the amount of fuel which is to be injected into each cylinder. This varies, depending inter alia on the speed of the engine and the position of the accelerator pedal. When the vehicle is running, optimum parameters for each situation are gradually determined. These optimum parameters are called adaptation parameters. If modifications are applied to the vehicle's engine, the software in, for example, the ECU which controls the amount of fuel to be injected may need to be updated to be able to control the amount of fuel on the basis of the modified engine.
Figure 1 is a flowchart for a method according to an embodiment of the invention which will now be described. In the diagrams, "adp." is an abbreviation for adaptation parameter(s). The method describes the steps for updating of software in a control unit in a vehicle. The software comprises adaptation parameters specific to said vehicle and map information about the adaptation parameters which the control unit uses and where they are stored in the control unit. The method steps comprise: A) identifying the old
adaptation parameters used in the old software by using map information pertaining to the old software; B) saving identifications and values of said old adaptation parameters in a memory; C) identifying adaptation parameters used in the new software by using map information pertaining to the new software, and installing the new software in the control unit; D) transferring values of old adaptation parameters identified in step C) to the new software, and storing the old adaptation parameters at locations determined by the new map information. The old values, or processed old values, of the adaptation parameters are therefore stored at locations in the control unit's memory which are determined by the new map information.
Building application software, a so-called release, for a control unit involves also creating a map of the adaptation parameters which the application uses and where they are stored in a memory in the electronic control unit. This information may therefore be used to read up the adapted parameters from a control unit whose software is to be adapted, and to redirect the information to the appropriate memory locations for the new software which is to be downloaded. Figure 2 illustrates an example of what this map information might be like. It shows on the left in schematic form the old software in the control unit. The software comprises map information, abbreviated to map info., about the adaptation parameters which the software uses, Al ...An, with linking Pl ...Pn to where in the control unit's memory the value VI ...Vn of the adaptation parameter is saved. On the right in Figure 2 is a schematic depiction of the new software which is to be installed in the control unit. The software comprises map information, abbreviated to map info., about the adaptation parameters which the software uses, Al '...Am', with linking PI '...Pm' to where in the control unit's memory the value VI '...Vm' of the adaptation parameter is to be saved. When old values of adaptation parameters have to be transferred to the new software, the identifications Al ...An and values VI ... Vn of the old adaptation parameters are put into intermediate storage in a memory before being transferred to the new software installed in the control unit, and being stored at locations in the control unit's memory indicated by the linking PI '...Pm' in the new software. Where appropriate, the old adaptation parameters Al ...An may also be processed to suit new adaptation algorithms etc. in the new software. The number of adaptation parameters "m" in the new software may therefore be different from the number of adaptation parameters "n" in the old
software. This is depicted schematically as a box in Figure 2 and is explained in more detail below.
The map information about the adaptation parameters in the new software, or the new software itself, may therefore contain information about a need for the old adaptation parameters to be adapted to suit any new algorithms or changes incorporated in the new software. Figure 3 is a flowchart according to this embodiment of the invention, in which step C) comprises: C identifying in the map information pertaining to the new software, or in the new software, whether one or more old adaptation parameters have to be processed, e.g. rescaled, interpolated or added, in which case: C2) effects this processing of the old adaptation parameter or parameters before it or they are transferred to the new software in step D). The information about processing may for example take the form of an instruction in the new software, or in the memory space for the values of the new adaptation parameters. This makes it possible for the old adaptation parameters to be adapted to new adaptation algorithms incorporated in the new software. An example of such adaptation is if old adaptation parameters are in degrees Celsius and the new ones are in degrees Kelvin, in which case the old adaptation values have to be rescaled to values in Kelvins. Another example of processing of old adaptation parameters is where the new software uses a larger number of adaptation parameters than the old software within the same region. Obtaining proper values for the new adaptation parameters that do not appear among the old adaptation parameters can then be achieved by interpolating from the old values.
According to an embodiment, the control unit comprises an RAM (random access memory) and the identified old adaptation parameters are saved in the control unit's RAM at least until they are transferred to the new software. This makes it possible for the update to be conducted without saving the old adaptation parameters in an external memory. According to another embodiment, the control unit comprises a writable ROM (read only memory) and the identified old adaptation parameters are saved in an allocated space in the control unit's ROM, which space is not writable for the new software which is to be installed, at least until the stored adaptation parameters have been transferred to the new software. According to another embodiment, the ROM is an EEPROM or a flash
memory. This makes it possible for old adapted parameters to be saved away from the control unit without risk of them being cross-saved by the new software which is to be installed. According to an embodiment, the identified old adaptation parameters are stored in a memory external to the control unit at least until they are transferred to the new software. This makes it possible for all of the data in the control unit to be cross-saved without risk of the old adaptation parameters being cross-saved and without the control unit needing a memory of its own.
Updating of software is carried out according to an embodiment by an external computer unit connected either wirelessly or by cable to the CAN bus in the vehicle or directly to the control unit whose software is to be updated. This makes it possible, for example, for a workshop to effect the update via its computers, e.g. when the vehicle is to be serviced, or the transfer may be remote-conducted wirelessly.
The invention relates also to a system adapted to updating of software in a control unit in a vehicle, which is illustrated according to an embodiment in Figure 3. The software comprises adaptation parameters specific to said vehicle and map information about the adaptation parameters which the control unit uses and where they are stored in the control unit. As illustrated in the diagram, the system comprises: communication means adapted to communicating between the system and the control unit, identification means adapted to identifying the old adaptation parameters used in the old software by using map information pertaining to the old software; and to identifying the adaptation parameters used in the new software by using map information pertaining to the new software; and a processor adapted to applying instructions for saving said old adaptation parameters in a memory, installing new software in the control unit, and to transferring values of old adaptation parameters identified in the new software from the memory to the new software, and storing the old adaptation parameters at locations in the control unit which are determined by the new map information.
The communication means comprises preferably hardware and/or software for conveying programme instructions etc. wirelessly or by cable to and from the system and the control unit. The identification means comprises preferably means for recognising map information in the software and to identifying adaptation parameters in the old and new software by map information pertaining to the respective software. The identification means is preferably implemented in the form of programme instructions. According to an embodiment, the system comprises a memory adapted to being able to save identifications and values of said old adaptation parameters. This makes it possible for the adaptation parameters to be saved without being cross-saved when new software is installed in the control unit. The identification means is adapted, according to an embodiment, to identifying in the map information pertaining to the new software, or in the new software, whether one or more old adaptation parameters need processing, e.g. rescaling or interpolating, in which case it effects this processing and stores the processed value or values in the new software. This makes it possible to adapt the old adaptation parameters to new adaptation algorithms which may have been incorporated in the new software, e.g. the parameters may be rescaled, added, interpolated or otherwise processed before being transferred to the new software.
The invention comprises also a computer programme product comprising computer programme instructions for enabling a computer system to perform steps according to the method when the computer programme instructions are run on said computer system, and a computer programme product in which said computer programme instructions are stored on a medium which is readable by a computer system. The present invention is not confined to the embodiments described above. Various alternatives, modifications and equivalents may be used. The aforesaid embodiments therefore do not limit the scope of the invention, which is defined by the attached claims.