Controller bus simulation methods, devices and electronic equipment

By acquiring baseline datasets and vehicle bus databases, generating and calibrating simulation templates, and importing redundancy check and counter rule data, the problem of unrealistic modeling of signal amplitude, timing, and CRC checks in controller bus simulation was solved, achieving high-fidelity simulation signal output.

CN123067192APending Publication Date: 2026-11-10BEIJING AUTOMOBILE RES GENERAL INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611260490.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In existing technologies, controller bus simulations struggle to quantitatively model the amplitude and timing fluctuation characteristics of real vehicle signals, leading to discrepancies between simulation and real vehicle behavior. Furthermore, the lack of CRC check and counter mechanisms prevents the reproduction of real bus behavior.

Method used

By acquiring the baseline dataset of the target controller, extracting redundancy check rules and counter rules data, creating simulation nodes in conjunction with the vehicle bus database, generating simulation templates and performing iterative simulations, calibrating the amplitude and timing of the simulation templates, importing redundancy check and counter rules data, and outputting high-fidelity simulation bus signals.

Benefits of technology

It significantly improves the fidelity and testing effectiveness of controller bus simulation. The simulation signals are highly consistent with the real vehicle in terms of data content, timing behavior and verification mechanism, reducing the deviation between simulation and real vehicle behavior.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067192A_ABST
    Figure CN123067192A_ABST
Patent Text Reader

Abstract

This application relates to the fields of automotive electronics and vehicle testing technology, and particularly to a controller bus simulation method, apparatus, and electronic device. The method includes: acquiring a baseline dataset carrying baseline signals for the target controller; extracting redundancy check and counter rule data from automotive software architecture protocol text; binding a bus simulation tool to a vehicle bus database, creating simulation nodes for the target controller using the bus simulation tool and the vehicle bus database, and generating a simulation template based on the simulation nodes; calibrating the amplitude and timing of the simulation template using the baseline dataset, importing the redundancy check rule data and counter rule data into the calibrated simulation template, and iteratively simulating the target controller's bus using the bus simulation tool to output the simulated bus signals of the target controller. This solves the problem of deviations between simulation and real-vehicle behavior caused by the controller bus simulation's failure to realistically model signal amplitude, timing, and CRC check and counter mechanisms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of automotive electronics and vehicle testing technology, and in particular to a controller bus simulation method, apparatus and electronic equipment. Background Technology

[0002] In related technologies, controller bus simulation is usually based on a preset ideal model to generate signals, which makes it difficult to quantitatively model the amplitude and timing fluctuation characteristics of real vehicle signals. At the same time, the CRC (Cyclic Redundancy Check) verification and counter mechanism are not bound to the physical transmission timing, which makes it impossible to reproduce the real bus behavior, resulting in a deviation between the simulation and the real vehicle. Summary of the Invention

[0003] This application provides a controller bus simulation method, apparatus, and electronic device to solve the problems in related technologies where controller bus simulation does not realistically model signal amplitude, timing, CRC checksum, and counter mechanism, leading to deviations between simulation and actual vehicle behavior.

[0004] The first aspect of this application provides a controller bus simulation method, comprising the following steps: acquiring a baseline dataset carrying baseline signals for a target controller; extracting redundancy check rule data and counter rule data from automotive software architecture protocol text; binding a bus simulation tool to a vehicle bus database, creating simulation nodes for the target controller using the bus simulation tool and the vehicle bus database, and generating a simulation template based on the simulation nodes; calibrating the amplitude and timing of the simulation template using the baseline dataset, importing the redundancy check rule data and counter rule data into the calibrated simulation template, and iteratively simulating the bus of the target controller using the bus simulation tool to output the simulation bus signal of the target controller.

[0005] Optionally, the baseline dataset carrying the baseline signal of the target controller is obtained, including: conducting multiple operating condition tests on the target controller through full vehicle testing and bench testing; collecting time series sets of the target controller under multiple operating conditions, calculating the baseline expected amplitude, stable fluctuation intensity, period deviation factor and joint confidence function of the baseline signal of the target controller based on the time series set; filtering the baseline signal based on the period deviation factor and joint confidence function, and generating the baseline dataset based on the baseline expected amplitude and stable fluctuation intensity of the filtered baseline signal.

[0006] Optionally, the baseline expected amplitude The calculation formula is:

[0007] in, The baseline expected amplitude; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; For the first A simulation sample in The bus signal sample value at that moment; Stable fluctuation intensity The calculation formula is:

[0008] in, To stabilize the intensity of fluctuations; The baseline expected amplitude; The baseline expected amplitude; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; For the first A simulation sample in The bus signal sample value at that moment; Periodic deviation factor The calculation formula is:

[0009] in, This is the periodic deviation factor; The average communication cycle of the target controller under stable operating conditions; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; Joint credibility function The calculation formula is:

[0010] in, For joint credibility function; To stabilize the intensity of fluctuations; The baseline expected amplitude; This is the periodic deviation factor.

[0011] Optionally, the redundancy check rule data includes a redundancy check evolution function and a timing alignment factor. The redundancy check evolution function is used to check the actual bus signals within the communication cycle, and the timing alignment factor is used to describe the coupling relationship between the communication cycle and the check update cycle. The counter rule data includes a counter update function, which is used to update the counter state within the communication cycle. The formula for calculating the redundancy check evolution function is:

[0012] in, For the first The CRC check result calculated within each cycle; Generate polynomial encoding parameters for CRC; CRC checksum length; For the first The effective payload involved in the verification within each communication cycle; The formula for calculating the timing alignment factor is:

[0013] in, This is the timing alignment factor; For the first The actual time interval between CRC calculation and transmission within each cycle; The average communication cycle of the target controller under stable operating conditions; The formula for calculating the counter update function is:

[0014] in, The counter output value for the next communication cycle; For the first Counter status within a communication cycle; The counting rules and overflow threshold are defined.

[0015] Optionally, generating a simulation template based on the simulation nodes includes: defining a template parameter vector for each bus signal to be simulated; establishing a signal output function in the simulation node based on the template parameter vector; establishing a constraint function based on the triggering relationship between signal output, redundancy check calculation, and counter update; and generating a simulation template based on the template parameter vector, output function, and constraint function. The expression for the template parameter vector is:

[0016] in, For template parameter vectors; The baseline expected amplitude; To stabilize the intensity of fluctuations; Indicates the baseline communication period consistent with the CRC timing alignment factor; Generate polynomial encoding parameters for CRC; CRC checksum length; This is the counter overflow threshold; The expression for the output function is:

[0017] in, This is the output function; A time-series modulation function normalized within a unit time interval; The baseline expected amplitude; To stabilize the intensity of fluctuations; Indicates the baseline communication period consistent with the CRC timing alignment factor; The expression for the constraint function is:

[0018] in, For constraint functions; For the first The CRC check result calculated within each cycle; The counter output value for the next communication cycle; This is the output function.

[0019] Optionally, the amplitude and timing of the simulation template are calibrated using a baseline dataset, including: acquiring the simulated bus signal output by the bus simulation tool within the communication cycle; aligning the simulated bus signal point-by-point based on the baseline dataset to construct an amplitude deviation function; performing iterative updates based on the amplitude reference and fluctuation constraints in the simulation template to construct an amplitude convergence update relationship; and correcting the cumulative drift of the simulated bus signal in the time domain based on a timing deviation metric function with phase consistency; wherein, The expression for the amplitude deviation function is:

[0020] in, This indicates the overall deviation of the simulated signal relative to the baseline signal in the amplitude dimension; For the first time in a single communication cycle Each discrete sampling time; This represents the total number of sampling points within a single period. For the first A simulation sample in The bus signal sample value at that moment; For the first Simulation signals output by a general-purpose bus simulation tool within a communication cycle; The expression for the magnitude convergence update relation is:

[0021] in, For the first Next calibration iteration status; It is a fixed amplitude; This is the fluctuation adjustment factor; The baseline expected amplitude; To stabilize the intensity of fluctuations; This indicates the overall deviation of the simulated signal relative to the baseline signal in the amplitude dimension; The expression for the timing deviation measure of phase consistency is:

[0022] in, This is a timing deviation measurement function for phase consistency; For the simulated signal and the baseline sampling point The corresponding triggering time; This indicates the baseline communication period that is consistent with the CRC timing alignment factor.

[0023] Optionally, the redundancy check rule data and counter rule data are imported into the calibrated simulation template, including: constructing a synchronization mapping function and a synchronization consistency factor based on the redundancy check rule data; constructing a time-coupled state evolution function based on the counter rule data; implementing redundancy check of the simulation template through the synchronization mapping function and the synchronization consistency factor; and implementing counter update of the simulation template through the time-coupled state evolution function; wherein, The expression for the synchronization mapping function is:

[0024] in, For the first CRC check results generated within each cycle; For the first The calibrated simulated signal within one communication cycle; This is a synchronization mapping function; Generate polynomial encoding parameters for CRC; CRC checksum length; The expression for the synchronization consistency factor is:

[0025] in, For synchronization consistency factor; For the first The time point at which CRC is actually calculated and encapsulated within each cycle; Indicates the baseline communication period consistent with the CRC timing alignment factor; The expression for the time-coupled state evolution function is:

[0026] in, This is the counter state value for the current cycle; This will be the counter state value for the next cycle. This is a time-coupled state evolution function; This is the counter overflow threshold.

[0027] Optionally, after iteratively simulating the bus of the target controller using a bus simulation tool to output the simulated bus signal of the target controller, the method further includes: acquiring the actual bus signal of the target controller; inputting the simulated bus signal and the actual bus signal into a consistency error function, a protocol compliance rate index function, and a parameter correction operator function, and correcting the simulation parameters of the bus simulation tool based on the output of each function; wherein, The expression for the consistency error function is:

[0028] in, Let the consistency error function be used. For the first The true baseline signal within each communication cycle; For the first The calibrated simulated signal within one communication cycle; These are fixed time-series weighting coefficients; For the simulated signal at the 1st The actual transmission cycle within the period; Indicates the baseline communication period consistent with the CRC timing alignment factor; To stabilize the intensity of fluctuations; The expression for the protocol compliance rate indicator function is:

[0029] in, For the compliance rate of the agreement; For the simulated signal at the 1st CRC check results within the period; For the true signal in the first CRC check results within the period; for; for; For consistency discrimination operators; The expression for the parameter correction operator function is:

[0030] in, For parameter correction operator functions; For the first The set of simulation parameters for each iteration; This is a fixed convergence step size coefficient; Let the consistency error function be used. For the compliance rate of the agreement.

[0031] A second aspect of this application provides a controller bus simulation device, comprising: an acquisition module for acquiring a baseline dataset carrying a baseline signal of a target controller; an extraction module for extracting redundancy check rule data and counter rule data from automotive software architecture protocol text; a generation module for binding a bus simulation tool to a vehicle bus database, creating simulation nodes of the target controller through the bus simulation tool and the vehicle bus database, and generating a simulation template based on the simulation nodes; and a simulation module for calibrating the amplitude and timing of the simulation template using the baseline dataset, importing the redundancy check rule data and counter rule data into the calibrated simulation template, and performing iterative simulation of the target controller's bus using the bus simulation tool to output the simulated bus signal of the target controller.

[0032] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the controller bus emulation method as described in the above embodiments.

[0033] Therefore, this application has at least the following beneficial effects: This application embodiment can acquire a baseline dataset carrying baseline signals from the target controller, and extract redundancy check rule data and counter rule data from the automotive software architecture protocol text. Then, a bus simulation tool is bound to a vehicle bus database, and simulation nodes for the target controller are created using the bus simulation tool and the vehicle bus database. A simulation template is generated based on the simulation nodes. The amplitude and timing of the simulation template are calibrated using the baseline dataset. The redundancy check rule data and counter rule data are imported into the calibrated simulation template, and the bus of the target controller is iteratively simulated using the bus simulation tool to output the simulated bus signal of the target controller. By automatically extracting redundancy check rules and counter rules from the automotive software architecture protocol text, and calibrating the amplitude and timing of the simulation template using real vehicle baseline signals, the generated simulated bus signal is highly consistent with the real vehicle in terms of data content, timing behavior, and verification mechanism. This reduces the deviation between simulation and real vehicle behavior and significantly improves the fidelity and testing effectiveness of the controller bus simulation. Therefore, it solves the problem of deviation between simulation and real vehicle behavior caused by the controller bus simulation not realistically modeling signal amplitude, timing, CRC check, and counter mechanism.

[0034] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0035] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1This is a flowchart of a controller bus simulation method provided according to an embodiment of this application; Figure 2 This is a schematic diagram of a baseline dataset generation process provided according to an embodiment of this application; Figure 3 This is a schematic diagram of the automotive software architecture protocol parameter modeling process according to an embodiment of this application; Figure 4 This is a schematic diagram of a simulation template construction process provided according to an embodiment of this application; Figure 5 This is a schematic diagram of a simulation signal amplitude timing calibration process according to an embodiment of this application; Figure 6 This is a schematic diagram of a controller bus simulation control flow according to an embodiment of this application; Figure 7 This is a block diagram of a controller bus simulation device provided according to an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0036] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0037] Related technologies typically rely on rule configuration based on bus tools or diagnostic script-driven approaches to complete signal simulation and testing. For example, multiple modules are built using secondary development of TSMaster software to achieve UDS (Unified Diagnostic Services) diagnostics and upgrade testing of ECUs (Electronic Control Units). The focus is on the diagnostic request and response process, and multi-vehicle adaptation and cost control are achieved by configuring message IDs, timing parameters, and process control. However, the above solutions focus more on the diagnostic process and message interaction itself, without realizing system modeling of the actual operating characteristics of the remaining bus in the vehicle. They do not baseline constraints on key physical and timing characteristics such as signal amplitude, period jitter, and phase relationship, which can easily lead to deviations between the simulated signal and the actual behavior of the vehicle in the bench environment. At the same time, their handling of CRC check and counter mechanisms in the AUTOSAR (AUTomotive Open System Architecture) protocol is functionally usable but difficult to achieve strict coupling with signal transmission timing, and cannot support the high consistency and high fidelity requirements of whole-vehicle bus simulation.

[0038] The controller bus simulation method, apparatus, and electronic device of this application are described below with reference to the accompanying drawings. Addressing the problem mentioned in the background art where controller bus simulation fails to realistically model signal amplitude, timing, CRC checksum, and counter mechanisms, leading to deviations between simulation and real-vehicle behavior, this application provides a controller bus simulation method. In this method, a baseline dataset carrying baseline signals of the target controller is obtained, and redundancy check rule data and counter rule data are extracted from the automotive software architecture protocol text. Then, a bus simulation tool is bound to a vehicle bus database, and simulation nodes for the target controller are created using the bus simulation tool and the vehicle bus database. A simulation template is generated based on the simulation nodes. The amplitude and timing of the simulation template are calibrated using the baseline dataset. The redundancy check rule data and counter rule data are imported into the calibrated simulation template. The bus of the target controller is iteratively simulated using the bus simulation tool to output the simulated bus signal of the target controller. By automatically extracting redundancy check rules and counter rules from automotive software architecture protocol text, and calibrating the amplitude and timing of the simulation template using real vehicle baseline signals, the generated simulation bus signals are highly consistent with those of the real vehicle in terms of data content, timing behavior, and verification mechanisms. This reduces the deviation between simulation and real vehicle behavior and significantly improves the fidelity and testing effectiveness of controller bus simulation. Therefore, this solves the problem of deviation between simulation and real vehicle behavior caused by the controller bus simulation's failure to accurately model signal amplitude, timing, CRC checksum, and counter mechanisms.

[0039] Specifically, Figure 1This is a flowchart of a controller bus simulation method provided in an embodiment of this application.

[0040] like Figure 1 As shown, the controller bus simulation method includes the following steps: In step S101, the baseline dataset carrying the baseline signal of the target controller is obtained.

[0041] The target controller refers to the electronic control unit under test that is to be simulated for the remaining bus; the baseline dataset refers to the original CAN (Controller Area Network) message set collected from the target controller and containing all baseline signals in its normal communication behavior.

[0042] It is understood that the baseline dataset carrying the baseline signal of the target controller obtained in this application embodiment can accurately restore its communication characteristics in the real network, provide a data foundation for the subsequent construction of a high-fidelity residual bus simulation model, and ensure that the behavior of the remaining virtual nodes in the simulation environment is consistent with that of the real vehicle, thereby improving the accuracy and reliability of hardware-in-the-loop testing.

[0043] In some embodiments, acquiring a baseline dataset carrying a baseline signal for the target controller includes: conducting multiple operating condition tests on the target controller through full vehicle testing and bench testing; collecting time series sets of the target controller under multiple operating conditions; calculating the baseline expected amplitude, stable fluctuation intensity, period deviation factor, and joint confidence function of the baseline signal of the target controller based on the time series set; filtering the baseline signal based on the period deviation factor and joint confidence function; and generating a baseline dataset based on the baseline expected amplitude and stable fluctuation intensity of the filtered baseline signal.

[0044] Among them, real vehicle testing refers to the functional and communication testing of the target controller under the actual operating conditions of the vehicle; bench testing refers to the testing of the target controller in a laboratory environment by simulating the operating conditions of the vehicle through a hardware bench; time series set refers to the set of signal data collected by the target controller in time sequence under multiple operating conditions; baseline expected amplitude refers to the expected average amplitude of the baseline signal under steady-state operating conditions; stable fluctuation intensity refers to the allowable amplitude fluctuation range or standard deviation of the baseline signal under normal operating conditions; period deviation factor is used to measure the degree to which the baseline signal deviates periodically from the ideal period; joint confidence function refers to the confidence index calculated by combining signal amplitude, fluctuation and period characteristics to evaluate whether the signal belongs to the valid baseline signal; baseline signal refers to the key CAN signal continuously sent or responded to by the target controller under normal operating conditions and used to characterize its communication behavior.

[0045] It is understood that the embodiments of this application obtain the time series set of the target controller under multiple operating conditions through full vehicle real vehicle testing and bench testing, and calculate the baseline expected amplitude, stable fluctuation intensity, period deviation factor and joint confidence function based on the set. Then, the baseline signal is screened according to the period deviation factor and joint confidence function. Finally, the baseline dataset is generated based on the baseline expected amplitude and stable fluctuation intensity of the screened signal. This can ensure that the constructed baseline dataset truly reflects the communication behavior characteristics of the target controller under various typical operating conditions, and improve the accuracy and robustness of virtual node modeling in the residual bus simulation.

[0046] Specifically, such as Figure 2 As shown, the baseline dataset generation process includes: In step 201, the target controller is tested under multiple operating conditions through full vehicle testing and bench testing.

[0047] In step 202, the time series set of the target controller under multiple operating conditions is collected.

[0048] In step 203, the baseline expected amplitude and the stable fluctuation intensity are calculated.

[0049] In step 204, baseline signals are screened to eliminate anomalies based on the periodic deviation factor and the joint confidence function.

[0050] In step 205, a joint confidence function for amplitude and time series is constructed.

[0051] In step 206, valid samples are selected to generate a standardized baseline dataset.

[0052] In some embodiments, the baseline expected amplitude The calculation formula is:

[0053] in, The baseline expected amplitude; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; For the first A simulation sample in The bus signal sample value at that moment; It should be noted that, Used to characterize the steady-state reference level of the signal in a real system.

[0054] Stable fluctuation intensity The calculation formula is:

[0055] in, To stabilize the intensity of fluctuations; The baseline expected amplitude; The baseline expected amplitude; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; For the first A simulation sample in The bus signal sample value at that moment; It should be noted that, This set of parameters, used to characterize the allowable fluctuation range under normal operating conditions, together constitute the baseline constraint core of the signal amplitude dimension.

[0056] Periodic deviation factor The calculation formula is:

[0057] in, This is the periodic deviation factor; The average communication cycle of the target controller under stable operating conditions; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; It should be noted that, This is used to quantify the periodic jitter intensity of real signals during full-operation conditions. When this indicator exceeds a preset engineering threshold, the corresponding periodic sample will be judged as abnormal interference data and removed from the baseline dataset, thereby ensuring the consistency and reproducibility of the baseline data in the time dimension.

[0058] Joint credibility function The calculation formula is:

[0059] in, For joint credibility function; To stabilize the intensity of fluctuations; The baseline expected amplitude; This is the periodic deviation factor.

[0060] Specifically, It simultaneously reflects the comprehensive reliability level of the signal in both amplitude stability and period consistency dimensions, only when A signal sample is included in the standardized signal baseline dataset only when it meets the minimum confidence threshold set by the engineering team.

[0061] It should be noted that the signal baseline data formed through the above algorithmic processing not only has statistical stability and temporal consistency, but also provides a real reference basis that can be directly constrained and calibrated for the subsequent accurate embedding of AUTOSARCRC (AUTomotive Open System Architecture Cyclic Redundancy Check) and counter parameters, thus naturally transitioning to the next step of extracting and aligning protocol layer parameter specifications.

[0062] It is understood that the embodiments of this application, by calculating the baseline expected amplitude, stable fluctuation intensity, and period deviation factor, and combining these three to construct a joint confidence function, can quantitatively evaluate and filter bus signals acquired under multiple operating conditions, thereby generating a high-precision, high-confidence baseline dataset. This effectively improves the realism of virtual node behavior and the reliability of the test system in the remaining bus simulation. An algorithmic processing mechanism based on timing consistency and amplitude stability is introduced to quantitatively model and constrain the acquired full-condition bus signals, thereby enhancing the subordination and constraint of the signal baseline dataset in subsequent simulation calibration.

[0063] In step S102, redundancy check rule data and counter rule data are extracted from the automotive software architecture protocol text.

[0064] Among them, the automotive software architecture protocol text refers to the standardized protocol document describing the communication behavior, signal format, and verification mechanism of the vehicle controller; the redundancy verification rule data is used to verify the integrity and correctness of bus signals; and the counter rule data refers to the data that defines the changing rules of the counter field in the signal message.

[0065] It is understood that the embodiments of this application extract redundancy check rule data and counter rule data from the automotive software architecture protocol text, which can provide accurate verification and synchronization basis for the subsequent construction of a residual bus simulation model that conforms to the original manufacturer's communication security mechanism, ensuring that the messages generated by the virtual node are consistent with the real controller in terms of redundancy check and counter behavior, thereby improving the ability of hardware-in-the-loop testing to verify communication faults and security mechanisms.

[0066] In some embodiments, the redundancy check rule data includes a redundancy check evolution function and a timing alignment factor. The redundancy check evolution function is used to check the actual bus signals within the communication cycle, and the timing alignment factor is used to describe the coupling relationship between the communication cycle and the check update cycle. The counter rule data includes a counter update function, which is used to update the counter state within the communication cycle. The formula for calculating the redundancy check evolution function is:

[0067] in, For the first The CRC check result calculated within each cycle; Generate polynomial encoding parameters for CRC; CRC checksum length; For the first The effective payload involved in the verification within each communication cycle; It should be noted that the above-mentioned redundancy check evolution function, by fixing the input dimension and output bit width, ensures that the CRC result at the simulation end is consistent with that of the real controller in numerical space.

[0068] The formula for calculating the timing alignment factor is:

[0069] in, This is the timing alignment factor; For the first The actual time interval between CRC calculation and transmission within each cycle; The average communication cycle of the target controller under stable operating conditions; It should be noted that, The value is directly used to constrain the triggering time of CRC calculation in the simulation, thereby avoiding the problem of the check value being out of sync with the signal content.

[0070] The formula for calculating the counter update function is:

[0071] in, The counter output value for the next communication cycle; For the first Counter status within a communication cycle; The counting rules and overflow threshold are defined.

[0072] It should be noted that, This represents the counter output value in the next communication cycle. The modulo operation strictly corresponds to the overflow and reset behaviors defined in AUTOSAR, making the simulated counter completely consistent with the real controller in terms of numerical change path.

[0073] Specifically, the redundancy check evolution function is a function used to calculate the check result of the payload of the real bus signal according to the CRC generator polynomial and the check bit length in each communication cycle; the timing alignment factor is a normalized ratio characterizing the time interval between the actual calculation and transmission of the CRC check relative to the average communication cycle of the target controller; the real bus signal is the original CAN bus signal actually emitted by the target controller in a real vehicle or bench test and not simulated; the communication cycle is a fixed or nominal time interval for the target controller to send a specific message; the check update cycle is the cycle in which the redundancy check is recalculated and embedded in the message; the counter update function is a function that calculates the counter output value of the next communication cycle according to the current counter state and preset counting rules and overflow threshold; the counter state is the value of the counter field in the current communication cycle, used to identify the message order or prevent replay.

[0074] It is understood that this application embodiment, by defining a redundancy check evolution function to periodically check the real bus signal, introducing a timing alignment factor to describe the coupling relationship between the check update cycle and the communication cycle, and using a counter update function to dynamically maintain the counter state, can accurately reproduce the check logic and timing behavior of the original controller within the communication cycle. This ensures that the messages generated in the simulation environment are strictly consistent with the real controller in terms of redundancy check and counter mechanism, thereby improving the security compliance and testing effectiveness of the remaining bus simulation model. Through the joint modeling of the above-mentioned CRC function parameterization, timing alignment constraints, and counter recursion model, a set of protocol-level parameter specifications that can be directly embedded into simulation nodes is formed, providing clear and executable input conditions for subsequently building and instantiating standardized simulation parameter templates in general bus simulation tools.

[0075] Specifically, such as Figure 3 As shown, the automotive software architecture protocol parameter modeling process includes: In step 301, redundancy check rule data and counter rule data are extracted from the automotive software architecture protocol text.

[0076] In step 302, a redundancy check evolution function is constructed.

[0077] In step 303, the redundancy check timing alignment factor is calculated.

[0078] In step 304, a discrete state recursive model of the counter is established.

[0079] In step 305, the protocol-level parameter specification is generated.

[0080] In step S103, the bus simulation tool is bound to the vehicle bus database, and a simulation node for the target controller is created using the bus simulation tool and the vehicle bus database. A simulation template is then generated based on the simulation node.

[0081] Among them, the bus simulation tool is software or platform used to simulate the communication behavior of in-vehicle networks, supporting message sending, receiving and bus protocol simulation; the whole vehicle bus database refers to a standardized database file containing information such as the communication message definition, signal layout, cycle and verification rules of all controllers in the whole vehicle; the simulation node refers to a virtual node created in the bus simulation tool based on the whole vehicle bus database and representing the communication behavior of the target controller; the simulation module refers to a reusable configuration file exported from the simulation node.

[0082] It is understood that by binding the bus simulation tool to the vehicle bus database, creating the simulation node of the target controller and generating the simulation template, the embodiments of this application can ensure that the simulation environment accurately inherits the real vehicle communication definition, realize fast, consistent and reproducible modeling of the target controller bus behavior, and provide basic support for subsequent high-fidelity remaining bus simulation.

[0083] In some embodiments, generating a simulation template based on simulation nodes includes: defining a template parameter vector for each bus signal to be simulated; establishing a signal output function in the simulation node based on the template parameter vector; establishing a constraint function based on the triggering relationship between signal output, redundancy check calculation, and counter update; and generating a simulation template based on the template parameter vector, output function, and constraint function. The expression for the template parameter vector is:

[0084] in, The template parameter vector; The baseline expected amplitude; To stabilize the intensity of fluctuations; Indicates the baseline communication period consistent with the CRC timing alignment factor; Generate polynomial encoding parameters for CRC; CRC checksum length; This is the counter overflow threshold; It should be noted that, The template parameter vector serves as the sole driving source for signal generation and verification in the simulation system. The construction of this parameter vector ensures that all modules within the general-purpose bus simulation tool work collaboratively within the same parameter domain.

[0085] The expression for the output function is:

[0086] in, For output functions; A time-series modulation function normalized within a unit time interval; The baseline expected amplitude; To stabilize the intensity of fluctuations; Indicates the baseline communication period consistent with the CRC timing alignment factor; It should be noted that, Used to characterize the trajectory of a signal within a single period, this output function is exposed to the simulation environment through a templated interface, enabling independent control of amplitude adjustment and timing reconstruction, thereby ensuring that the numerical form of the signal in the simulation is strictly constrained by the baseline parameters.

[0087] The expression for the constraint function is:

[0088] in, For constraint functions; For the first The CRC check result calculated within each cycle; The counter output value for the next communication cycle; This is the output function.

[0089] It should be noted that the aforementioned constraint functions are fixed into a unified parameter template execution order in the general-purpose bus simulation tool, thereby avoiding logical decoupling or timing misalignment issues during simulation. Through the construction of the above parameter template and linkage mechanism, the simulation environment of the general-purpose bus simulation tool has the ability to bear real signal amplitude constraints and AUTOSAR protocol behavior, laying a directly adjustable structural foundation for subsequent fine-tuning of simulation default values ​​and timing deviations based on signal baseline data.

[0090] Specifically, the template parameter vector refers to the set of parameters that define the characteristics of the simulated signal; the signal output function refers to the bus signal that generates according to the template parameters and conforms to the actual timing and statistical characteristics; and the constraint function refers to the trigger relationship function that ensures that the signal output, CRC check result and counter update are synchronized in timing and logic.

[0091] It is understood that the embodiments of this application map the aforementioned protocol-level parameters and signal baseline constraints to the simulation configuration space of a general-purpose bus simulation tool, and realize the reusable construction of simulation nodes through a parameter template mechanism. Furthermore, by defining template parameter vectors, constructing signal output functions based on them, and establishing constraint functions in conjunction with redundancy check calculations and counter updates, a simulation template is finally generated. This enables the simulated signal to strictly match the behavior of the real controller in terms of amplitude distribution, fluctuation characteristics, communication period, CRC check, and timing coupling relationship, thereby improving the realism, consistency, and functional safety of the virtual node output in the remaining bus simulation.

[0092] Specifically, such as Figure 4 As shown, the simulation template construction process includes: In step 401, a template parameter vector is defined for each bus signal to be simulated.

[0093] In step 402, a signal output function is established in the simulation node based on the template parameter vector.

[0094] In step 403, a constraint function is established based on the triggering relationship between signal output, redundancy check calculation and counter update.

[0095] In step 404, the simulation execution order is solidified.

[0096] In step 405, a simulation template is generated based on the template parameter vector, output function, and constraint function.

[0097] In step S104, the amplitude and timing of the simulation template are calibrated using the baseline dataset. Redundancy check rule data and counter rule data are imported into the calibrated simulation template. The bus of the target controller is iteratively simulated using a bus simulation tool to output the simulation bus signal of the target controller.

[0098] Among them, the simulation template amplitude refers to the parameter in the simulation template that characterizes the strength of the bus signal; the simulation bus signal refers to the signal output by the bus simulation tool that simulates the actual communication behavior of the target controller on the vehicle bus.

[0099] It is understood that the embodiments of this application calibrate the amplitude and timing of the simulation template through the baseline dataset, import the redundancy check rule data and counter rule data into the calibrated simulation template, and perform iterative simulation of the bus of the target controller through the bus simulation tool, outputting the simulation bus signal of the target controller, thereby achieving high-precision simulation of the bus signal of the target controller, ensuring that the simulation signal is consistent with the real controller in terms of amplitude, timing, redundancy check and counter behavior, and improving the realism and reliability of the bench remaining bus simulation.

[0100] In some embodiments, the calibration of the simulation template amplitude and timing using a baseline dataset includes: acquiring the simulated bus signal output by the bus simulation tool within the communication cycle; aligning the simulated bus signal point-by-point based on the baseline dataset to construct an amplitude deviation function; performing iterative updates based on the amplitude reference and fluctuation constraints in the simulation template to construct an amplitude convergence update relationship; and correcting the cumulative drift of the simulated bus signal in the time domain based on a timing deviation metric function with phase consistency; wherein... The expression for the amplitude deviation function is:

[0101] in, This indicates the overall deviation of the simulated signal relative to the baseline signal in the amplitude dimension; For the first time in a single communication cycle Each discrete sampling time; This represents the total number of sampling points within a single period. For the first A simulation sample in The bus signal sample value at that moment; For the first Simulation signals output by a general-purpose bus simulation tool within a communication cycle; It should be noted that, It can be directly used as an optimization target for amplitude calibration.

[0102] The expression for the magnitude convergence update relation is:

[0103] in, For the first Next calibration iteration status; It is a fixed amplitude; This is the fluctuation adjustment factor; The baseline expected amplitude; To stabilize the intensity of fluctuations; This indicates the overall deviation of the simulated signal relative to the baseline signal in the amplitude dimension; It should be noted that, Fixed amplitude and The fluctuation adjustment coefficient is used to control the convergence speed of parameter correction. Through the above amplitude convergence update relationship, the overall amplitude center and discrete amplitude of the simulation signal gradually conform to the statistical characteristics of the baseline data.

[0104] The expression for the timing deviation measure of phase consistency is:

[0105] in, This is a timing deviation measurement function for phase consistency; For the simulated signal and the baseline sampling point The corresponding triggering time; This indicates the baseline communication period that is consistent with the CRC timing alignment factor.

[0106] It should be noted that, This is used to unify the combined impact of period offset and phase error on the time scale, and it is directly fed back to the signal scheduling module in the general-purpose bus simulation tool to correct the signal trigger start point and transmission period, so that the simulated signal maintains a phase structure consistent with the baseline signal during continuous operation. This is achieved through the amplitude deviation function. With timing deviation function Through joint iterative calibration, the default output of the simulated signal gradually converges to the baseline constraint range of the real signal, thus providing a reliable time and numerical basis for embedding protocol-level parameters such as CRC and counters and achieving synchronous transmission while maintaining the stability of the calibration results.

[0107] Specifically, point-to-point alignment refers to matching the simulated signal with the baseline signal at each sampling moment within a single cycle; the amplitude deviation function is used to quantify the overall offset of the simulated signal relative to the baseline signal in the amplitude dimension; the timing deviation metric function is used to measure the offset of the trigger moment corresponding to the baseline sampling point in the simulated signal relative to the baseline communication cycle; and cumulative drift refers to the phase deviation phenomenon caused by the continuous accumulation of timing deviation in the time domain of the simulated bus signal.

[0108] It is understood that the embodiments of this application introduce a quantitative calibration mechanism based on a signal baseline dataset to perform dual convergence correction on the default output of the general bus simulation tool in terms of amplitude and timing. This enables the simulated signal to approximate the behavior of the real controller in both the numerical space and the time domain. Furthermore, by acquiring the simulated bus signal output by the bus simulation tool within the communication cycle, the simulated bus signal is aligned point by point based on the baseline dataset to construct an amplitude deviation function. Based on the amplitude deviation function, the amplitude reference and fluctuation constraints in the simulation template are iteratively updated to construct an amplitude convergence update relationship. Finally, the cumulative drift of the simulated bus signal in the time domain is corrected based on the timing deviation metric function of phase consistency. This achieves high-precision calibration of the simulated signal in both amplitude and timing dimensions, effectively eliminating amplitude offset and timing accumulation errors, and improving the consistency between the simulated signal and the real baseline signal.

[0109] Specifically, such as Figure 5 As shown, the simulation signal amplitude timing calibration process includes: In step 501, the simulation signal and the baseline signal are acquired.

[0110] In step 502, the amplitude deviation function is calculated.

[0111] In step 503, the amplitude benchmark and fluctuation constraints are iteratively updated.

[0112] In step 504, the timing deviation metric function for phase consistency is calculated.

[0113] In step 505, the signal triggering start point and transmission period are corrected.

[0114] In step 506, the simulation signal is converged to the baseline constraint interval.

[0115] In some embodiments, importing redundancy check rule data and counter rule data into the calibrated simulation template includes: constructing a synchronization mapping function and a synchronization consistency factor based on the redundancy check rule data; constructing a time-coupled state evolution function based on the counter rule data; implementing redundancy check of the simulation template through the synchronization mapping function and the synchronization consistency factor; and implementing counter update of the simulation template through the time-coupled state evolution function; wherein, the expression of the synchronization mapping function is:

[0116] in, For the first CRC check results generated within each cycle; For the first The calibrated simulated signal within one communication cycle; This is a synchronization mapping function; Generate polynomial encoding parameters for CRC; CRC checksum length; It should be noted that the above-mentioned synchronization mapping function ensures that the check value is attached to the actual signal content in both the time and numerical dimensions by strictly binding the CRC calculation to the moment when the signal transmission is completed, thereby eliminating the risk of protocol inconsistency caused by check lag or premature triggering.

[0117] The expression for the synchronization consistency factor is:

[0118] in, For synchronization consistency factor; For the first The time point at which CRC is actually calculated and encapsulated within each cycle; Indicates the baseline communication period consistent with the CRC timing alignment factor; It should be noted that, It is directly used to constrain the scheduling priority of the CRC execution thread in general-purpose bus simulation tools, making it strictly obey the signal transmission rhythm.

[0119] The expression for the time-coupled state evolution function is:

[0120] in, This is the counter state value for the current cycle; This will be the counter state value for the next cycle. This is a time-coupled state evolution function; This is the counter overflow threshold.

[0121] It should be noted that the aforementioned time-coupled state evolution function is used in the simulation template in conjunction with... By using the same trigger event, the counter increment and CRC generation are completed at the same cycle boundary, thus strictly replicating the requirements for counter continuity and reset timing in AUTOSAR. This is achieved through a synchronization mapping function. Consistency factor and the counter evolution function By embedding a common simulation template, the simulation nodes are fully coupled at the protocol and signal layers, providing a stable output foundation with protocol compliance for subsequent iterative verification of the consistency between simulation data and real baseline data.

[0122] Specifically, the synchronization mapping function refers to the function that maps the calibrated simulation signal, CRC generator polynomial parameters, and check bit length to the CRC check result of the current communication cycle; the synchronization consistency factor refers to the factor used to measure the degree of temporal alignment between the actual CRC encapsulation time point and the baseline communication cycle; and the state evolution function refers to the function that determines the counter state value of the next cycle based on the current counter state value, the counter overflow threshold, and the time coupling relationship.

[0123] It is understood that this application's embodiments embed the CRC check and counter mechanism of the AUTOSAR protocol layer into the calibrated simulation template in a synchronous execution manner, enabling signal generation, check calculation, and state recursion to operate collaboratively under a unified time base. A synchronous mapping function and a synchronous consistency factor are constructed based on redundancy check rule data to achieve redundancy check of the simulation template; a time-coupled state evolution function is constructed based on counter rule data to achieve counter updates of the simulation template. This ensures that the simulation bus signal is consistent with the behavior of the real controller in terms of CRC check logic and timing, and counter state evolution, avoiding ECU communication failures due to check errors or abnormal counter states.

[0124] In some embodiments, after iteratively simulating the bus of the target controller using a bus simulation tool to output the simulated bus signal of the target controller, the method further includes: acquiring the actual bus signal of the target controller; inputting the simulated bus signal and the actual bus signal into a consistency error function, a protocol compliance rate index function, and a parameter correction operator function, and correcting the simulation parameters of the bus simulation tool based on the output of each function; wherein, The expression for the consistency error function is:

[0125] in, Let the consistency error function be used. For the first The true baseline signal within each communication cycle; For the first The calibrated simulated signal within one communication cycle; These are fixed time-series weighting coefficients; For the simulated signal at the 1st The actual transmission cycle within the period; Indicates the baseline communication period consistent with the CRC timing alignment factor; To stabilize the intensity of fluctuations; It should be noted that the above consistency error function achieves an overall evaluation of simulation consistency by unifying the dimensions of amplitude and timing.

[0126] The expression for the protocol compliance rate indicator function is:

[0127] in, For the compliance rate of the agreement; For the simulated signal at the 1st CRC check results within the period; For the true signal in the first CRC check results within the period; for; for; For consistency discrimination operators; It should be noted that, This is used to characterize the synchronization degree of CRC check and counter states between the simulation and the real system. The consistency discrimination operator takes a value of 1 if and only if the input conditions are met, and the protocol compliance rate ensures that the simulation results meet the continuity and integrity requirements of AUTOSAR from a protocol perspective.

[0128] The expression for the parameter correction operator function is:

[0129] in, For parameter correction operator functions; For the first The set of simulation parameters for each iteration; This is a fixed convergence step size coefficient; Let the consistency error function be used. For the compliance rate of the agreement.

[0130] It should be noted that the above parameter correction operator functions enable the amplitude parameters, timing parameters, and protocol parameters to converge synchronously when consistency is insufficient, and automatically stabilize after consistency is achieved. Through continuous iterative verification and parameter correction under multiple cycles and multiple operating conditions, the simulation signal maintains a high degree of consistency with the real baseline at the numerical, timing, and protocol levels, thereby forming reliable residual bus simulation results that can be directly used for whole vehicle Labcar bench verification, completing the overall closed loop of this method.

[0131] Specifically, the actual bus signal refers to the bus signal output by the target controller during actual operation.

[0132] It is understood that the embodiments of this application systematically align and verify the simulation output with the baseline of the real signal through a closed-loop consistency evaluation mechanism, and drive the self-convergence correction of parameters with quantitative indicators, thereby ensuring the final credibility of the vehicle bench simulation. After outputting the simulation bus signal of the target controller, its real bus signal is obtained, and both are input into the consistency error function, the protocol compliance rate index function, and the parameter correction operator function. Based on the output results of each function, the simulation parameters of the bus simulation tool are corrected, thereby realizing closed-loop feedback optimization of the simulation parameters and improving the consistency and compliance of the simulation signal with the real signal in terms of timing, amplitude, and protocol behavior.

[0133] Specifically, such as Figure 6 As shown, the controller bus simulation control flow includes: In step 601, the baseline dataset carrying the baseline signal of the target controller is obtained.

[0134] Specifically, bus signal data of the target controller under all operating conditions is collected through full-vehicle testing or bench testing, covering signal amplitude, transmission period, timing logic and fluctuation range. After removing abnormal interference data, a standardized signal baseline dataset is formed to provide a real reference for subsequent simulation signal calibration.

[0135] In step 602, redundancy check rule data and counter rule data are extracted from the automotive software architecture protocol text.

[0136] Specifically, consult the AUTOSAR protocol document corresponding to the target controller to clarify the CRC check algorithm type, check bit length and calculation period, and synchronously extract the counter's counting rules, overflow threshold and reset conditions to ensure that the parameter extraction conforms to the protocol compliance requirements and avoids communication failures caused by parameter mismatch during simulation.

[0137] In step 603, simulation nodes are created using bus simulation tools and the vehicle bus database, and a simulation template is generated.

[0138] Specifically, the general bus simulation tool is launched and bound to the vehicle bus database, a simulation node corresponding to the target controller is built, the bus communication rate, signal transmission protocol and data interaction format are set, a standardized simulation parameter template is created, and adjustable interfaces for CRC, counter and signal amplitude are reserved to adapt to subsequent parameter embedding and calibration operations.

[0139] In step 604, the default values ​​and timing deviations of the simulation signal are calibrated.

[0140] Specifically, the signal baseline dataset generated in the above steps is called, and compared with the signal values ​​output by the default value of the general bus simulation tool. The amplitude deviation is eliminated through iterative calibration, and the signal transmission timing is adjusted synchronously to make the period and phase of the simulated signal consistent with the real baseline data, thereby effectively solving the problem of simulation result distortion caused by the default value.

[0141] In step 605, the redundancy check rule data and counter rule data are imported into the calibrated simulation model and the timing is synchronized.

[0142] Specifically, the AUTOSAR CRC and counter parameters extracted in step 602 above are embedded into the simulation template, and the linkage logic between the parameters and signal transmission is configured to ensure that the CRC check and signal transmission are executed synchronously, and the counter completes counting and resetting according to the specifications, thereby ensuring that the simulation process complies with the requirements of the AUTOSAR protocol and improving the simulation compliance.

[0143] In step 606, iterative verification simulation is performed to achieve consistency with the real signal.

[0144] Specifically, the bench simulation and real vehicle signal comparison test is initiated. Multiple sets of simulation data are collected and compared with the real baseline data item by item. The amplitude deviation, timing error and protocol compliance are analyzed. For items with excessive deviation, the simulation parameters are repeatedly calibrated until the simulation signal and the real signal are consistent and the simulation results are reliable.

[0145] In step 607, reliable simulation data is output after the simulation results meet the standards.

[0146] According to the controller bus simulation method proposed in this application, a baseline dataset carrying baseline signals of the target controller is obtained, and redundancy check rule data and counter rule data are extracted from the automotive software architecture protocol text. Then, a bus simulation tool is bound to a vehicle bus database, and simulation nodes for the target controller are created using the bus simulation tool and the vehicle bus database. A simulation template is generated based on the simulation nodes. The amplitude and timing of the simulation template are calibrated using the baseline dataset. The redundancy check rule data and counter rule data are imported into the calibrated simulation template, and the bus of the target controller is iteratively simulated using the bus simulation tool to output the simulated bus signal of the target controller. By automatically extracting redundancy check rules and counter rules from the automotive software architecture protocol text and calibrating the amplitude and timing of the simulation template using real vehicle baseline signals, the generated simulated bus signal is highly consistent with the real vehicle in terms of data content, timing behavior, and verification mechanism. This reduces the deviation between simulation and real vehicle behavior and significantly improves the fidelity and testing effectiveness of the controller bus simulation. Therefore, this solves the problem of deviation between simulation and real vehicle behavior caused by the controller bus simulation not realistically modeling signal amplitude, timing, CRC check, and counter mechanism.

[0147] Next, the controller bus simulation device proposed according to the embodiments of this application is described with reference to the accompanying drawings.

[0148] Figure 7 This is a block diagram of a controller bus simulation device according to an embodiment of this application.

[0149] like Figure 7 As shown, the controller bus simulation device 10 includes: an acquisition module 100, an extraction module 200, a generation module 300, and a simulation module 400.

[0150] The system comprises the following modules: Acquisition module 100, which acquires a baseline dataset carrying baseline signals for the target controller; Extraction module 200, which extracts redundancy check rule data and counter rule data from the automotive software architecture protocol text; Generation module 300, which binds the bus simulation tool to the vehicle bus database, creates simulation nodes for the target controller using the bus simulation tool and the vehicle bus database, and generates a simulation template based on the simulation nodes; and Simulation module 400, which calibrates the amplitude and timing of the simulation template using the baseline dataset, imports the redundancy check rule data and counter rule data into the calibrated simulation template, and iteratively simulates the bus of the target controller using the bus simulation tool to output the simulation bus signal of the target controller.

[0151] In some embodiments, the acquisition module 100 is configured to: perform multiple operating condition tests on the target controller through full vehicle testing and bench testing; collect time series sets of the target controller under multiple operating conditions; calculate the baseline expected amplitude, stable fluctuation intensity, period deviation factor, and joint confidence function of the baseline signal of the target controller based on the time series set; filter the baseline signal based on the period deviation factor and joint confidence function; and generate a baseline dataset based on the baseline expected amplitude and stable fluctuation intensity of the filtered baseline signal.

[0152] In some embodiments, the baseline expected amplitude The calculation formula is:

[0153] in, The baseline expected amplitude; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; For the first A simulation sample in The bus signal sample value at that moment; Stable fluctuation intensity The calculation formula is:

[0154] in, To stabilize the intensity of fluctuations; The baseline expected amplitude; The baseline expected amplitude; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; For the first A simulation sample in The bus signal sample value at that moment; Periodic deviation factor The calculation formula is:

[0155] in, This is the periodic deviation factor; The average communication cycle of the target controller under stable operating conditions; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; Joint credibility function The calculation formula is:

[0156] in, For joint credibility function; To stabilize the intensity of fluctuations; The baseline expected amplitude; This is the periodic deviation factor.

[0157] In some embodiments, the redundancy check rule data includes a redundancy check evolution function and a timing alignment factor. The redundancy check evolution function is used to check the actual bus signals within the communication cycle, and the timing alignment factor is used to describe the coupling relationship between the communication cycle and the check update cycle. The counter rule data includes a counter update function, which is used to update the counter state within the communication cycle. The formula for calculating the redundancy check evolution function is:

[0158] in, For the first The CRC check result calculated within each cycle; Generate polynomial encoding parameters for CRC; CRC checksum length; For the first The effective payload involved in the verification within each communication cycle; The formula for calculating the timing alignment factor is:

[0159] in, This is the timing alignment factor; For the first The actual time interval between CRC calculation and transmission within each cycle; The average communication cycle of the target controller under stable operating conditions; The formula for calculating the counter update function is:

[0160] in, The counter output value for the next communication cycle; For the first Counter status within a communication cycle; The counting rules and overflow threshold are defined.

[0161] In some embodiments, the generation module 300 is used to: define a template parameter vector for each bus signal to be simulated; establish a signal output function in the simulation node based on the template parameter vector; establish a constraint function according to the triggering relationship between signal output, redundancy check calculation and counter update; and generate a simulation template based on the template parameter vector, output function and constraint function. The expression for the template parameter vector is:

[0162] in, The template parameter vector; The baseline expected amplitude; To stabilize the intensity of fluctuations; Indicates the baseline communication period consistent with the CRC timing alignment factor; Generate polynomial encoding parameters for CRC; CRC checksum length; This is the counter overflow threshold; The expression for the output function is:

[0163] in, For output functions; A time-series modulation function normalized within a unit time interval; The baseline expected amplitude; To stabilize the intensity of fluctuations; Indicates the baseline communication period consistent with the CRC timing alignment factor; The expression for the constraint function is:

[0164] in, For constraint functions; For the first The CRC check result calculated within each cycle; The counter output value for the next communication cycle; This is the output function.

[0165] In some embodiments, the simulation module 400 is configured to: acquire the simulated bus signal output by the bus simulation tool during the communication cycle; perform point-by-point alignment of the simulated bus signal based on the baseline dataset to construct an amplitude deviation function; perform iterative updates based on the amplitude reference and fluctuation constraints in the amplitude deviation function simulation template to construct an amplitude convergence update relationship; and correct the cumulative drift of the simulated bus signal in the time domain based on the phase consistency timing deviation metric function; wherein, The expression for the amplitude deviation function is:

[0166] in, This indicates the overall deviation of the simulated signal relative to the baseline signal in the amplitude dimension; For the first time in a single communication cycle Each discrete sampling time; This represents the total number of sampling points within a single period. For the first A simulation sample in The bus signal sample value at that moment; For the first Simulation signals output by a general-purpose bus simulation tool within a communication cycle; The expression for the magnitude convergence update relation is:

[0167] in, For the first Next calibration iteration status; It is a fixed amplitude; This is the fluctuation adjustment factor; The baseline expected amplitude; To stabilize the intensity of fluctuations; This indicates the overall deviation of the simulated signal relative to the baseline signal in the amplitude dimension; The expression for the timing deviation measure of phase consistency is:

[0168] in, This is a timing deviation measurement function for phase consistency; For the simulated signal and the baseline sampling point The corresponding triggering time; This indicates the baseline communication period that is consistent with the CRC timing alignment factor.

[0169] In some embodiments, the simulation module 400 is used to: construct a synchronization mapping function and a synchronization consistency factor based on redundancy check rule data; construct a time-coupled state evolution function based on counter rule data; implement redundancy check of the simulation template through the synchronization mapping function and the synchronization consistency factor; and implement counter update of the simulation template through the time-coupled state evolution function; wherein, The expression for the synchronization mapping function is:

[0170] in, For the first CRC check results generated within each cycle; For the first The calibrated simulated signal within one communication cycle; This is a synchronization mapping function; Generate polynomial encoding parameters for CRC; CRC checksum length; The expression for the synchronization consistency factor is:

[0171] in, For synchronization consistency factor; For the first The time point at which CRC is actually calculated and encapsulated within each cycle; Indicates the baseline communication period consistent with the CRC timing alignment factor; The expression for the time-coupled state evolution function is:

[0172] in, This is the counter state value for the current cycle; This will be the counter state value for the next cycle. This is a time-coupled state evolution function; This is the counter overflow threshold.

[0173] In some embodiments, the controller bus emulation device 10 further includes a correction module.

[0174] The correction module is used to: acquire the actual bus signals of the target controller; input the simulated bus signals and the actual bus signals into a consistency error function, a protocol compliance rate indicator function, and a parameter correction operator function; and correct the simulation parameters of the bus simulation tool based on the output of each function. The expression for the consistency error function is:

[0175] in, Let the consistency error function be used. For the first The true baseline signal within each communication cycle; For the first The calibrated simulated signal within one communication cycle; These are fixed time-series weighting coefficients; For the simulated signal at the 1st The actual transmission cycle within the period; Indicates the baseline communication period consistent with the CRC timing alignment factor; To stabilize the intensity of fluctuations; The expression for the protocol compliance rate indicator function is:

[0176] in, For the compliance rate of the agreement; For the simulated signal at the 1st CRC check results within the period; For the true signal in the first CRC check results within the period; for; for; For consistency discrimination operators; The expression for the parameter correction operator function is:

[0177] in, For parameter correction operator functions; For the first The set of simulation parameters for each iteration; This is a fixed convergence step size coefficient; Let the consistency error function be used. For the compliance rate of the agreement.

[0178] It should be noted that the foregoing explanation of the controller bus simulation method embodiment also applies to the controller bus simulation device of this embodiment, and will not be repeated here.

[0179] According to the controller bus simulation device proposed in this application, a baseline dataset carrying baseline signals of the target controller is obtained, and redundancy check rule data and counter rule data are extracted from the automotive software architecture protocol text. Then, a bus simulation tool is bound to a vehicle bus database, and simulation nodes for the target controller are created using the bus simulation tool and the vehicle bus database. A simulation template is generated based on the simulation nodes. The amplitude and timing of the simulation template are calibrated using the baseline dataset. The redundancy check rule data and counter rule data are imported into the calibrated simulation template, and the bus of the target controller is iteratively simulated using the bus simulation tool to output the simulated bus signal of the target controller. By automatically extracting redundancy check rules and counter rules from the automotive software architecture protocol text and calibrating the amplitude and timing of the simulation template using real vehicle baseline signals, the generated simulated bus signal is highly consistent with the real vehicle in terms of data content, timing behavior, and verification mechanism. This reduces the deviation between simulation and real vehicle behavior and significantly improves the fidelity and testing effectiveness of the controller bus simulation. Therefore, this solves the problem of deviation between simulation and real vehicle behavior caused by the controller bus simulation not realistically modeling signal amplitude, timing, CRC check, and counter mechanism.

[0180] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 801, the processor 802, and the computer program stored on the memory 801 and capable of running on the processor 802.

[0181] When the processor 802 executes the program, it implements the controller bus simulation method provided in the above embodiments.

[0182] Furthermore, electronic devices also include: Communication interface 803 is used for communication between memory 801 and processor 802.

[0183] The memory 801 is used to store computer programs that can run on the processor 802.

[0184] The memory 801 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.

[0185] If the memory 801, processor 802, and communication interface 803 are implemented independently, then the communication interface 803, memory 801, and processor 802 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0186] Optionally, in a specific implementation, if the memory 801, processor 802, and communication interface 803 are integrated on a single chip, then the memory 801, processor 802, and communication interface 803 can communicate with each other through an internal interface.

[0187] The processor 802 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.

[0188] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0189] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0190] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0191] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0192] Those skilled in the art will understand that all or part of the steps of the methods implementing the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0193] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A controller bus simulation method, characterized in that, Includes the following steps: Acquire the baseline dataset carrying the baseline signal from the target controller; Extract redundancy check rule data and counter rule data from automotive software architecture protocol text; The bus simulation tool is bound to the vehicle bus database. Simulation nodes for the target controller are created using the bus simulation tool and the vehicle bus database. Simulation templates are generated based on the simulation nodes. The simulation template amplitude and timing are calibrated using the baseline dataset. The redundancy check rule data and the counter rule data are then imported into the calibrated simulation template. The bus of the target controller is iteratively simulated using the bus simulation tool to output the simulation bus signal of the target controller.

2. The controller bus simulation method according to claim 1, characterized in that, The acquisition of the baseline dataset carrying the baseline signal from the target controller includes: The target controller was tested under multiple operating conditions through full vehicle testing and bench testing. Collect time series data of the target controller under multiple operating conditions, and calculate the baseline expected amplitude, stable fluctuation intensity, period deviation factor, and joint confidence function of the target controller's baseline signal based on the time series data. Baseline signals are filtered based on the period deviation factor and the joint confidence function, and the baseline dataset is generated based on the baseline expected amplitude and stable fluctuation intensity of the filtered baseline signals.

3. The controller bus simulation method according to claim 2, characterized in that, The expected amplitude of the baseline The calculation formula is: in, The baseline expected amplitude; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; For the first A simulation sample in The bus signal sample value at that moment; The stable fluctuation intensity The calculation formula is: in, To stabilize the intensity of fluctuations; The baseline expected amplitude; The baseline expected amplitude; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; For the first A simulation sample in The bus signal sample value at that moment; Periodic deviation factor The calculation formula is: in, This is the periodic deviation factor; The average communication cycle of the target controller under stable operating conditions; Indicates index under the same working conditions and at the same time. The number of valid sampling periods included in the statistics; Joint credibility function The calculation formula is: in, For joint credibility function; To stabilize the intensity of fluctuations; The baseline expected amplitude; This is the periodic deviation factor.

4. The controller bus simulation method according to claim 1, characterized in that, The redundancy check rule data includes a redundancy check evolution function and a timing alignment factor. The redundancy check evolution function is used to check the real bus signal within the communication cycle. The timing alignment factor is used to describe the coupling relationship between the communication cycle and the check update cycle. The counter rule data includes a counter update function, which is used to update the counter state within the communication cycle. in The calculation formula for the redundancy check evolution function is as follows: in, For the first The CRC check result calculated within each cycle; Generate polynomial encoding parameters for CRC; CRC checksum length; For the first The effective payload involved in the verification within each communication cycle; The formula for calculating the timing alignment factor is as follows: in, This is the timing alignment factor; For the first The actual time interval between CRC calculation and transmission within each cycle; The average communication cycle of the target controller under stable operating conditions; The calculation formula for the counter update function is as follows: in, The counter output value for the next communication cycle; For the first Counter status within a communication cycle; The counting rules and overflow threshold are defined.

5. The controller bus simulation method according to claim 1, characterized in that, The step of generating a simulation template based on the simulation node includes: Define the template parameter vector for each bus signal to be simulated; A signal output function is established in the simulation node based on the template parameter vector; Establish a constraint function based on the triggering relationship between signal output, redundancy check calculation, and counter update; A simulation template is generated based on the template parameter vector, the output function, and the constraint function. The expression for the template parameter vector is: in, For template parameter vectors; The baseline expected amplitude; To stabilize the intensity of fluctuations; Indicates the baseline communication period consistent with the CRC timing alignment factor; Generate polynomial encoding parameters for CRC; CRC checksum length; This is the counter overflow threshold; The expression for the output function is: in, This is the output function; A time-series modulation function normalized within a unit time interval; The baseline expected amplitude; To stabilize the intensity of fluctuations; Indicates the baseline communication period consistent with the CRC timing alignment factor; The expression for the constraint function is: in, For constraint functions; For the first The CRC check result calculated within each cycle; The counter output value for the next communication cycle; This is the output function.

6. The controller bus simulation method according to claim 1, characterized in that, The calibration of the simulation template amplitude and timing using the baseline dataset includes: Obtain the simulated bus signals output by the bus simulation tool during the communication cycle; The simulation bus signals are aligned point-by-point based on the baseline dataset to construct the amplitude deviation function; Based on the amplitude reference and fluctuation constraints in the simulation template, iterative updates are performed to construct an amplitude convergence update relationship, and the cumulative drift of the simulation bus signal in the time domain is corrected based on the phase consistency timing deviation metric function; wherein, The expression for the amplitude deviation function is: in, This indicates the overall deviation of the simulated signal relative to the baseline signal in the amplitude dimension; For the first time in a single communication cycle Each discrete sampling time; This represents the total number of sampling points within a single period. For the first A simulation sample in The bus signal sample value at that moment; For the first Simulation signals output by a general-purpose bus simulation tool within a communication cycle; The expression for the amplitude convergence update relationship is: in, For the first Next calibration iteration status; It is a fixed amplitude; This is the fluctuation adjustment factor; The baseline expected amplitude; To stabilize the intensity of fluctuations; This indicates the overall deviation of the simulated signal relative to the baseline signal in the amplitude dimension; The expression for the timing deviation measurement function of phase consistency is: in, This is a timing deviation measurement function for phase consistency; For the simulated signal and the baseline sampling point The corresponding triggering time; This indicates the baseline communication period that is consistent with the CRC timing alignment factor.

7. The controller bus simulation method according to claim 1, characterized in that, The step of importing the redundancy check rule data and the counter rule data into the calibrated simulation template includes: Based on the aforementioned redundant verification rule data, a synchronization mapping function and a synchronization consistency factor are constructed. Construct a time-coupled state evolution function based on the counter rule data; The redundancy verification of the simulation template is achieved through the synchronization mapping function and the synchronization consistency factor, and the counter update of the simulation template is achieved through the time-coupled state evolution function; wherein, The expression for the synchronization mapping function is: in, For the first CRC check results generated within each cycle; For the first The calibrated simulated signal within one communication cycle; This is a synchronization mapping function; Generate polynomial encoding parameters for CRC; CRC checksum length; The expression for the synchronization consistency factor is: in, For synchronization consistency factor; For the first The time point at which CRC is actually calculated and encapsulated within each cycle; Indicates the baseline communication period consistent with the CRC timing alignment factor; The expression for the time-coupled state evolution function is: in, This is the counter state value for the current cycle; This will be the counter state value for the next cycle. This is a time-coupled state evolution function; This is the counter overflow threshold.

8. The controller bus simulation method according to claim 1, characterized in that, After iteratively simulating the bus of the target controller using the bus simulation tool to output the simulated bus signal of the target controller, the method further includes: Obtain the actual bus signal of the target controller; The simulated bus signal and the real bus signal are input into a consistency error function, a protocol compliance rate indicator function, and a parameter correction operator function. The simulation parameters of the bus simulation tool are then corrected based on the output of each function. The expression for the consistency error function is: in, Let the consistency error function be used. For the first The true baseline signal within each communication cycle; For the first The calibrated simulated signal within one communication cycle; These are fixed time-series weighting coefficients; For the simulated signal at the 1st The actual transmission cycle within the period; Indicates the baseline communication period consistent with the CRC timing alignment factor; To stabilize the intensity of fluctuations; The expression for the protocol compliance rate indicator function is as follows: in, For the compliance rate of the agreement; For the simulated signal at the 1st CRC check results within the period; For the true signal in the first CRC check results within the period; for; for; For consistency discrimination operators; The expression for the parameter correction operator function is: in, For parameter correction operator functions; For the first The set of simulation parameters for each iteration; This is a fixed convergence step size coefficient; Let the consistency error function be used. For the compliance rate of the agreement.

9. A controller bus simulation device, characterized in that, include: The acquisition module is used to acquire the baseline dataset carrying the baseline signal from the target controller; The extraction module is used to extract redundant verification rule data and counter rule data from automotive software architecture protocol text; The generation module is used to bind the bus simulation tool to the vehicle bus database, create a simulation node for the target controller through the bus simulation tool and the vehicle bus database, and generate a simulation template based on the simulation node. The simulation module is used to calibrate the amplitude and timing of the simulation template using the baseline dataset, import the redundancy check rule data and the counter rule data into the calibrated simulation template, and perform iterative simulation of the bus of the target controller using the bus simulation tool to output the simulation bus signal of the target controller.

10. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the controller bus emulation method according to any one of claims 1-8.