This application is based upon and claims priority to Chinese Patent Application No. 202410073686.0, filed on Jan. 18, 2024, the entire contents of which are incorporated herein by reference.
The present disclosure relates to the field of vehicular software development technologies, and in particular to an adaptive update method of signal data for bus simulation and test process.
In the bus simulation and test process based on bus tool, it is usually required to process a received bus signal in real time to generate a desired virtual signal. In vehicular software development process, the virtual signal refers to a signal set by artificial logic and not present in measurement data. For example, the signals such as bus load rate signal, peak load rate signal, frame rate signal, a sum of any signal values of A signal value and B signal value, addition, multiplication, subtraction, division, absolute value, arccosine, sine, arctangent, cosine, involution and rooting, logarithm, maximum and minimum, sine and tangent and the like are all virtual signals, which can complete subsequent bus simulation and test data analysis requirements.
In the relevant bus tools, there is no direct solution for performing real-time processing on the bus signals to generate desired virtual signals. This is because the major service functions of the bus tools are bus signal collection and sending and do not cover abstract information virtualization and real-time computation functions. If real-time processing scripts are forcefully added to the bus tools to generate desired virtual signals, the configurations of the scripts and parameters will be very complex due to diversity of signal types and occupy the system resources, affecting the real-time effect of the bus signal processing and hence affecting the bus simulation and test efficiency.
The object of the present disclosure is to provide an adaptive update method of signal data for bus simulation and test process, comprising:
The summary of the present disclosure aims to provide brief descriptions for the subjects of the specification. Thus, it should be understood that the above features are only illustrative and shall not be interpreted as narrowing the scope or essence of the subject of the specification in any way.
Other features, aspects and advantages of the subjects of the present disclosure will become apparent by way of the specific embodiments, drawings and claims.
In order to more clearly describe the technical solutions in the embodiments of the present disclosure or in the prior arts, the drawings required for descriptions of the specific embodiments or the prior arts will be briefly introduced. Apparently, the drawings described hereunder are only some embodiments of the present disclosure. Those skilled in the arts can obtain other drawings based on these drawings without making creative work.
In order to make the object, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the present disclosure will be fully and clearly described in combination with drawings. Apparently, the embodiments described herein are only some embodiments rather than all embodiments. All other embodiments obtained by those skilled in the art based on these drawings without making creative work shall fall within the scope of protection of the present disclosure.
In the bus simulation and test process based on bus tool, it is usually required to process a received bus signal in real time to generate a desired virtual signal. In vehicular software development process, the virtual signal refers to a signal set by artificial logic and not present in measurement data. For example, the signals such as bus load rate signal, peak load rate signal, frame rate signal, a sum of any signal values of A signal value and B signal value, addition, multiplication, subtraction, division, absolute value, arccosine, sine, arctangent, cosine, involution and rooting, logarithm, maximum and minimum, sine and tangent and the like are all virtual signals, which can complete subsequent bus simulation and test data analysis requirements.
In the relevant bus tools, there is no direct solution for performing real-time processing on the bus signal to generate desired virtual signal. This is because the major service functions of the bus tools are bus signal collection and sending and do not cover abstract information virtualization and real-time computation functions. If real-time processing scripts are forcefully added to the bus tools to generate desired virtual signal, the configurations of the scripts and parameters will be very complex due to diversity of signal types and occupy the system resources, affecting the real-time effect of the bus signal processing and hence affecting the bus simulation and test efficiency.
Therefore, at least one embodiment provides an adaptive update method of signal data to achieve the purpose of performing real-time processing on bus signal only with a mapping expression and hence satisfy adaptive update requirements of signal data. The method may include the following steps:
In the adaptive update method of signal data, without writing programs to perform special processing on bus signal, the user can achieve real-time processings on the bus signal only by using the mapping expression. These processings include:
In this way, the problem of difficulty in performing real-time updating processing on the desired virtual signal in the bus simulation and test process is solved and thus the bus simulation and test efficiency can be improved.
The method of processing the bus signal by using the adaptive update method of signal data will be described with one case below.
In a vehicular chassis test process, it is required to verify whether the ABS function is triggered in an entire braking process in which the vehicle speed is higher than 50 kph and the primary cylinder pressure is greater than 80 bar. In a traditional test method, it is required to write scripts to perform tracking detection, for example, on three pieces of signal data: the vehicle speed V, the primary cylinder pressure M and the ABS trigger flag A. In the adaptive update method of signal data, only the following steps are used.
From the above case, it can be known that the adaptive update method of signal data can increase the test verification efficiency without writing one line of processing codes.
Various non-limiting implementations of the embodiments of the present disclosure will be detailed below in combination with drawings.
As shown in
Specifically, the mapping execution container refers to a container for storing and executing mapping and has the following functions: 1) storing the mapping expression and the mapping parameters in a list; 2) importing and exporting the list storing the mapping expression and the mapping parameters; 3) automatically executing the mapping relationship to achieve mapping from the source signal to the target signal or from the target signal to the source signal or achieve bidirectional mapping.
In some embodiments, when the mapping expression between the source signal and the target signal is a linear type, the mapping expression is set to y=x.
When the mapping expression between the source signal and the target signal is a nonlinear type, the mapping expression is set to an expression: y is unequal to x, where x is the source signal which may be received bus signal or system variables in the bus tool system, and the system variables may be existing variables in the bus tool system or virtual signal generated by bus signal mapping; y is the target signal which refers to mapping system variables generated on a local computer and related to the source signal. The mapping system variables are computational results of the expression and may also be involved in the arithmetic logic operation of the expression at the same time.
A method of setting the mapping amplification factor, the offset amount and the mapping direction when the mapping expression y=x is set will be detailed below with one case.
It is assumed that in a vehicular ESC system function test, it is required to monitor a vehicle speed signal and use the value of the vehicle speed signal in various test conditions.
Therefore, it is required to establish unidirectional mapping from the vehicle speed CAN signal to the mapping system variable “VehicleSpeed”. That is, the mapping expression y=x is set, where y refers to the mapping system variable “VehicleSpeed”; x refers to the vehicle speed CAN signal, for example, “0/CAN_FD_ESC/ESC/ESCData/VehSpd”, which means: channel 1, CAN network CAN_FD_ESC, ESC node, ESCData message, VehSpd signal.
Based on the mapping expression, three mapping parameters the mapping amplification factor a, the offset amount δ and the mapping direction may be set. In this case, the mapping direction is fixed as from CAN signal to the mapping system variable and thus the actual value of the mapping system variable “VehicleSpeed” is:
When the units of the mapping system variable VehicleSpeed and the speed CAN signal VehSpdare both “km/h” or “m/s”, a=1 and δ=0.
When the unit of the mapping system variable VehicleSpeed is “km/h” and the unit of the CAN signal VehSpdis “m/s”, a=3.6 and δ=0, so as to ensure unification of two variable physics quantities.
When the unit of the mapping system variable VehicleSpeed is “m/s” and the unit of the CAN signal VehSpdis “km/h”, a=1/3.6 and δ=0, so as to ensure unification of two variable physics quantities.
A method of configuring the parameters of the mapping expression when the mapping expression y is unequal to x is set will be detailed below with one case.
It is assumed that, in a vehicular ESC system function test, it is required to check whether other specific flags are in on state when the vehicle speed is from 40 km/h to 60 km/h and the ESC function is enabled. At this time, it is required to use one mapping expression created using the vehicle speed signal and the ESC function enable signal:
Based on this mapping expression, the mapping parameters are set, namely, the mapping relationship of the independent variables x1 and x2 in the mapping expression is configured. In this case, x1 may associate “0/CAN_FD_ESC/ESC/ESCData/VehSpd”, which means: channel 1, CAN network CAN_FD_ESC, ESC node, ESCData message, VehSpd signal; x2 may associate “0/CAN_FD_ESC/ESC/ESCData/ESCActv”, which means: channel 1, CAN network CAN_FD_ESC, ESC node, ESCData message, ESCActv signal.
When the vehicle speed is 50 km/h and the ESC function is enabled, if x1=50 and x2=True, y can be finally obtained as y=True based on the mapping expression, that is, the condition that the vehicle speed is from 40 km/h to 60 km/h and the ESC function enable is established. When the vehicle speed is 70 km/h, and the ESC function is not enabled, if x1=70 and x2=False, y can be finally obtained as y=False based on the mapping expression, that is, the condition that the vehicle speed is from 40 km/h to 60 km/h and the ESC function enable is not established.
In some embodiments, the mapping direction includes unidirectional mapping and bidirectional mapping.
The unidirectional mapping includes mapping from the source signal to the target signal or from the target signal to the source signal;
The bidirectional mapping includes mapping from the source signal to the target signal while mapping from the target signal to the source signal.
Only output or only input is unidirectional mapping. For example, in the case of only output: it is required to output a voltage signal or a current signal to drive an external device; at this time, the direction of the unidirectional mapping is mapping from the target signal to the source signal, where the target signal is a mapping system variable carrying control information and the source signal is a CAN signal representing voltage or current control information; in the case of only input: it is required to monitor an external voltage or current signal to draw a curve or carry out relevant test determination; at this time, the direction of the unidirectional mapping is mapping from the source signal to the target signal, wherein the source signal is a monitoring CAN signal representing an external voltage or current, and the target signal is a corresponding mapping system variable.
The bidirectional mapping is used in the scenarios requiring both input and output. For example, for the maximum signal of the current of the electromagnetic valve, in a case of output, the mapping system variable i corresponding to the maximum can be modified by the bus tool, for example, can be reset to 0; in a case of input, it can be used to monitor a regional peak of the current of the electromagnetic valve. For example, upon test instance startup, the bus tool writes the reset value 0 into the mapping system variable i to clear the last test result and start a new round of current peak monitoring; in a test instance running process, the bus tool cyclically reads the mapping system variable i to achieve real-time monitoring for the current peak of this round.
In some embodiments, when mapping is performed from the source signal to the target signal, a method of calculating a target signal value is:
and
The methods of calculating the target signal value when mapping is performed from the source signal to the target signal and calculating the source signal value when mapping is performed from the target signal to the source signal will be described in details below with one case.
When read and write is performed on the maximum signal of the current of the electromagnetic valve, the target signal is set to the corresponding mapping system variable i measured in the unit of ampere (A), and the source signal is set to a maximum signal CurrMax of a current of an electromagnetic valve of the vehicular ECU measured in the unit of milliampere (mA). It is required to create bidirectional mapping to achieve bidirectional mapping from the source signal to the target signal and from the target signal to the source signal.
When mapping is performed from the source signal to the target signal, a method of calculating a target signal value is:
When mapping is performed from the target signal to the source signal, a method of calculating a source signal value is:
In some embodiments, when the mapping expression is that y is unequal to x, a method of configuring the parameters of the mapping expression includes:
It is assumed that, in a vehicular ESC system function test, it is required to check whether other specific flags are in on state when the vehicle speed is from 40 km/h to 60 km/h and the ESC function is enabled. At this time, it is required to use one mapping expression created using the vehicle speed signal and the ESC function enable signal:
Based on this mapping expression, the mapping parameters are set, namely, the mapping relationship of the independent variables x1 and x2 in the mapping expression is configured. In this case, x1 may associate “0/CAN_FD_ESC/ESC/ESCData/VehSpd”, which means: channel 1, CAN network CAN_FD_ESC, ESC node, ESCData message, VehSpd signal; x2 may associate “0/CAN_FD_ESC/ESC/ESCData/ESCActv”, which means: channel 1, CAN network CAN_FD_ESC, ESC node, ESCData message, ESCActv signal.
When the vehicle speed is 50 km/h and the ESC function is enabled, if x=50 and x2=True, y can be finally obtained as y=True based on the mapping expression, that is, the condition that the vehicle speed is from 40 km/h to 60 km/h and the ESC function enable is established. When the vehicle speed is 70 km/h, and the ESC function is not enabled, if x=70 and x2=False, y can be finally obtained as y=False based on the mapping expression, that is, the condition that the vehicle speed is from 40 km/h to 60 km/h and the ESC function enable is not established.
In some embodiments, the signal in the system includes one or more of a bus signal, a mapping system variable, a constant and an immediate number.
In some embodiments, a method of storing the mapping expression and the mapping parameters into the mapping execution container to create the mapping relationship between the source signal and the target signal includes: storing a, δ, a type value of the mapping direction and Mz=Yz*a+δ into the mapping execution container.
The method of storing the mapping expression and the mapping parameters into the mapping execution container to create the mapping relationship between the source signal and the target signal will be detailed below with one case.
It is assumed that, when monitoring is performed on an ECU supply voltage, the target signal is set to the mapping system variable v corresponding to the ECU supply voltage, measured in the unit of Volt (V), and the source signal is set to the vehicular ECU supply voltage VMon measured in the unit of millivolt (mV). It is required to create unidirectional mapping from the source signal to the target signal. A method of calculating a target signal value is:
In order to create the unidirectional mapping from the source signal to the target signal, it is required to store the above mapping expression and the mapping parameters as one record into the mapping execution container. This record has the following contents:
The method of storing the mapping expression and the mapping parameters into the mapping execution container to create the mapping relationship between the source signal and the target signal includes:
The method of storing the mapping expression and the mapping parameters into the mapping execution container to create the mapping relationship between the source signal and the target signal will be detailed below with one case.
It is assumed that when the drive current of the ECU electromagnetic valve is controlled, the target signal is set to the mapping system variable i corresponding to the drive current of the ECU electromagnetic valve, measured in the unit of ampere (A), and the source signal is set to the drive current iDrv of the vehicular ECU electromagnetic valve, measured in the unit of milliampere (mA). It is required to create unidirectional mapping from the target signal to the source signal. The method of calculating a source signal value is:
In order to create the unidirectional mapping from the target signal to the source signal, it is required to store the above mapping expression and the mapping parameters as one record into the mapping execution container. This record has the following contents:
A method of storing the mapping expression and the parameters of the mapping expression into the mapping execution container to create the mapping relationship between the source signal and the target signal includes:
The method of storing the mapping expression and the parameters of the mapping expression into the mapping execution container to create the mapping relationship between the source signal and the target signal will be detailed below with one case.
It is assumed that in a vehicular ESC system function test, it is required to check whether other specific flags are in on state when the vehicle speed is from 40 km/h to 60 km/h and the ESC function is enabled. At this time, it is required to use one mapping expression created using the vehicle speed signal and the ESC function enable signal:
In order to create the above mapping relationship between the source signal and the target signal, it is required to store the following mapping expression and the parameters of the mapping expression into the mapping execution container:
In some embodiments, the method of activating the mapping relationship includes: setting an execution switch of the mapping execution container to be on.
As shown in
For various application scenarios, for example, when y is equal to x, and y is unequal to x, one complete case is supplemented respectively.
The adaptive update method of signal data will be detailed below with one complete case.
It is assumed that in a vehicle test, it is required to monitor a change of a gear while drawing in real time a change curve of the gear in a curve diagram. In this case, it is required to create unidirectional mapping from the source signal to the target signal. First, the mapping expression y=x is set, where y is the target signal which refers to a mapping system variable corresponding to the source signal, and in this case, refers to a mapping system variable corresponding to a gear signal; x is the source signal, which refers to the gear signal in this case.
The target signal y is set to the mapping system variable “GearSys”; the source signal x is set to a gearbox gear signal “0/CAN_FD_Powertrain/Engine/GearBoxInfo/Gear” from the CAN bus, which means CAN channel 1, network name “CAN_FD_Powertrain”, sending ECU “Engine”, message name “GearBoxInfo”, signal name “Gear”.
The method of calculating the target signal value is:
The above mapping relationship between the source signal and the target signal is created, and the following mapping expression and mapping parameters are stored into the mapping execution container:
As shown in
The adaptive update method of signal data will be detailed below with one complete case.
It is assumed that in a vehicle test, it is required to monitor a real-time power of a direct current motor and draw a change curve of power in real time in a curve diagram. In order to collect a terminal voltage and current of the motor from the CAN bus, it is required to create unidirectional mapping from the source signal to the target signal. First, the mapping expression is set to y=x1*x2, where x1 and x2 are source signals, x1 represents a terminal voltage of the motor, x2 represents a current of the motor, and y refers to the target signal which is a mapping system variable corresponding to the motor power.
The target signal y is set to the mapping system variable “Power”; the source signal x1 is set to a terminal voltage signal “0/MotorTest/Motor/SensorInfo/Voltage” of the motor from the CANbus, which means CAN channel 1, network name “MotorTest”, sending ECU “Motor”, message name “SensorInfo”, signal name “Voltage”. The source signal x2 is set to a current signal “0/MotorTest/Motor/SensorInfo/Current” of the motor from the CAN bus, which means CAN channel 1, network name “MotorTest”, sending ECU “Motor”, message name “SensorInfo”, signal name “Current”.
The above mapping relationship between the source signal and the target signal is created, and the following mapping expression and mapping parameters are stored into the mapping execution container:
As shown in
As shown in
The specific functions of the setting module and the associating module can be implemented in the computer device. Reference can be made to the contents of the above adaptive update method of signal data for details, and no redundant descriptions are made herein.
From the angle of hardware processing, an electronic device in the embodiments of the present disclosure will be described.
No limitations are made for the specific implementation of the electronic device in the embodiments of the present disclosure.
As shown in
As shown in
In some embodiments, the computer device and the industrial control computer may also serve as one of the electronic devices.
The structures shown in
In some embodiments, the communication interface may be RS232, RS485, USB interface or TYPE interface or the like, which may be connected with an external bus adapter. The communication interface may also include wired or wireless network interface. The network interface may optionally include wired interface and/or wireless interface (such as WI-FI interface, Bluetooth interface and the like), which is usually used to establish communication connection between the server and other computer devices.
The readable storage medium or the computer readable storage medium includes at least one type of memories. The memory includes flash memory, harddisk drive, multimedia card, card type memory (e.g. SD memory or the like), magnetic memory, magnetic disk or compact disk or the like. In some embodiments, the memory may be an internal storage unit in the computer device, for example, a harddisk drive of the computer device. In some other embodiments, the memory may also be an external storage device of the computer device, for example, a plug type hard disk drive, a smart media card (SMC), a secure digital (SD) card, a flash card or the like on the computer device. Furthermore, the memory may include both the internal storage unit in the computer device and the external storage device. The memory may be used to not only store an application software installed on the computer device and various types of data, for example, the codes of the computer programs and the like but also temporarily store data already output or to be output.
In some embodiments, the processor may be a central processing unit (CPU), a processor, a controller, a microcontroller, a microprocessor or another data processing chip, which is used to run the program codes in the memory or process the data, for example, execute the computer programs or the like.
In some embodiments, the communication bus may also be an input/output bus, which may be a Peripheral Component Interconnect (PCI) bus, or an Enhanced Industry Standard Architecture (EISA) bus or the like. The bus may include an address bus, a data bus and a control bus and the like.
Optionally, the computer device may also include a user interface, which may include a display, and an input unit, for example, a keyboard. Optionally, the user interface may also include a standard wired interface and wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display and an Organic Light-Emitting Diode (OLED) touch display and the like. The display may also be appropriately referred to as display screen or display unit for displaying information processed in the computer device as well as a visual user interface.
The processor executes the programs to perform the steps in the embodiments of the adaptive update method of signal data shown in
Some embodiments further provide a computer readable storage medium, which is configured to store programs of performing any one of the above adaptive update methods of signal data.
Some embodiments further provide a computer readable storage medium, storing computer readable instructions, where the computer readable instructions are executed by at least one processor to perform the above adaptive update method of signal data, which specifically includes: setting a mapping expression and mapping parameters; creating a mapping execution container; storing the mapping expression and the mapping parameters into the mapping execution container to create a mapping relationship of a source signal and a target signal and activating the mapping relationship. For detailed descriptions, reference can be made to the above adaptive update method of signal data and no redundant descriptions are made herein.
Some embodiments further provide a computer program product, including computer programs or instructions, wherein the computer programs or instructions are executed on a computer to cause the computer to perform any one of the above adaptive update methods of signal data.
Some embodiments further provide a computer program product, including a computer readable storage medium, storing computer readable program codes, wherein the computer readable program codes include instructions which cause at least one processor or one or more computer devices to perform the operations of: setting a mapping expression and mapping parameters; creating a mapping execution container; storing the mapping expression and the mapping parameters into the mapping execution container to create a mapping relationship of a source signal and a target signal and activating the mapping relationship.
In the several embodiments provided by the present disclosure, it should be understood that the disclosed device and method can be implemented another way. The above device embodiments are merely illustrative, for example, the flowcharts or block diagrams in the drawings show possible system architectures, functions and operations of the device, method, and computer program product in the several embodiments provided by the present disclosure. Thus, each block in the flowcharts or block diagrams may represent one module, one program fragment or one part of codes. The module, the program fragment or the part of codes includes one or more executable instructions for implementing the specified logic functions. It should be noted that in some alternative embodiments, the functions indicated in the blocks may also be performed in a sequence different from that indicated in the drawings. For example, two continuous blocks can be actually performed basically in parallel, and sometimes may be performed in a reverse sequence, which is dependent on the functions involved. It is further noted that each block in the block diagrams and/or flowcharts and the combinations of the blocks in the block diagrams and/or flowcharts may be implemented by a dedicated hardware-based system for executing specified functions or actions, or by combination of dedicated hardware and computer instructions.
Furthermore, the functional modules in the embodiments of the present disclosure can be integrated into one independent part, or exist as separate modules or two or more of the modules are integrated into one independent part.
The functions, when implemented by software function modules and sold or used as independent products, can be stored in one computer readable storage medium. Based on such understanding, the essence of technical solutions of the present disclosure, or a part contributing to the prior arts or a part of the technical solutions can be embodied in the form of software product. The computer software product is stored in one storage medium which includes several instructions to enable one computer device (for example, a personal computer, a server, or a network device or the like) to perform all or part of the steps of the method of each of the embodiments of the present disclosure.
Enlightened by the ideal embodiments of the present disclosure, relevant workers can, based on the contents of the specification, make various changes and modifications within the scope of protection of the technical idea of the present disclosure. The technical scope of the present disclosure is not limited to the contents of the specification but to the technical scope claimed by the claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 202410073686.0 | Jan 2024 | CN | national |