A method and system for managing a power network based on motor controllers

By adopting a PN network management method based on motor controllers, and utilizing CAN transceivers and handwritten code to dynamically intervene in the state machine, the problem that the AUTOSAR standard cannot support PN management is solved, enabling refined network management, reducing power consumption, and extending the driving range of new energy vehicles.

CN122120057APending Publication Date: 2026-05-29CHONGQING TSINGSHAN IND
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING TSINGSHAN IND
Filing Date
2026-02-12
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies cannot achieve fine-grained, low-power local network management, and the AUTOSAR standard architecture cannot support the flexible state transitions required for PN network management.

Method used

By using a PN network management method based on the motor controller, the motor controller is woken up by responding to network management messages of a specific network segment via a CAN transceiver. The transition logic of the CanNM state machine is dynamically intervened by calling the AUTOSAR standard interface function through handwritten code, thereby realizing on-demand wake-up and partitioned sleep.

Benefits of technology

It enables fine-grained grouping and on-demand wake-up of network nodes, reduces the static current consumption of the whole vehicle, extends the driving range of new energy vehicles, and maintains the standardization of the AUTOSAR software architecture and toolchain compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120057A_ABST
    Figure CN122120057A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on motor controller's PN network management method and system, CAN transceiver during hibernation, response to the network management message of meeting preset network segment, and trigger motor controller to wake up from hibernation;Start basic software running environment, preferentially execute the communication protocol stack module initialization related with CAN transceiver, enable the sending and receiving capability of the CAN transceiver of motor controller;On the basis of standard AUTOSAR CanNM state machine operation, the jump logic of the CanNM state machine is executed to extend control, the extension control is configured to respond to local event, dynamically intervene the conversion process between maintaining network state and hibernation state of the CanNM state machine, to support PN network management.The application is based on AUTOSAR architecture foundation, adopts the technical means of handwritten code to call standard interface dynamically to intervene CanNM state machine, solves the problem that fine, low-power local network management cannot be realized due to the limitation of standard architecture function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of automotive electronics and automotive software technology, and in particular to a PN network management method and system based on a motor controller. Background Technology

[0002] Network management (NM) is a key function for ensuring the security, reliability, and efficiency of vehicular network communication. Its core objective is to coordinate the orderly entry into low-power sleep states or wake-up operations of multiple electronic control units (ECUs) in the network, thereby maximizing the conservation of vehicle battery energy, which is of great significance for improving the driving range of electric vehicles.

[0003] Currently, in-vehicle network management is mainly divided into two categories: Full Network Management and Partial Networking (PN). Full Network Management uses network segments as the smallest management unit. When a wake-up message (NM message) appears on the bus, it wakes up all ECU nodes within that segment. While simple and reliable, this method lacks flexibility and can lead to unnecessary power consumption in scenarios where some ECUs do not need to operate (such as the entertainment system when the vehicle is stationary). PN network management, on the other hand, achieves more refined network management by retaining ECUs that require operation and shutting down those that do not, using group control. Compared to full network management, PN network management is more energy-efficient and improves driving range.

[0004] The standard AUTOSAR (Automotive Open Systems) CanNM (CAN Network Management) module's state machine (such as repeating message state and ready-to-sleep state) is primarily designed and configured for traditional network management, with its state transition processes being pre-defined and relatively fixed. However, PN management, in order to achieve selective wake-up and sleep, requires the state machine to dynamically intervene and flexibly transition based on local events (such as IGN signals and diagnostic requests) (e.g., reactivating the network due to a new local event just before sleep). This contradiction cannot be resolved by generating code using AUTOSAR's standard configuration tools.

[0005] Therefore, existing technologies urgently need a new technical solution to address the above problems. Summary of the Invention

[0006] To address the aforementioned shortcomings of existing technologies, this invention provides a PN network management method and system based on a motor controller. Based on the AUTOSAR architecture, it employs a technique of dynamically intervening in the CanNM state machine by calling standard interfaces with handwritten code, thus solving the problem of being unable to achieve refined and low-power local network management due to the inherent limitations of standard architecture functions.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0008] A PN network management method based on a motor controller includes the following steps:

[0009] S1. During sleep mode, the CAN transceiver responds to network management messages that conform to the preset network segment and triggers the motor controller to wake up from sleep mode.

[0010] S2. Start the basic software runtime environment, prioritize the initialization of the communication protocol stack modules related to the CAN transceiver, including the initialization of the communication service module, CAN interface module and communication management module, and enable the CAN transceiver transmission and reception capabilities of the motor controller.

[0011] S3. Based on the operation of the standard AUTOSAR CanNM state machine, extended control is performed on the transition logic of the CanNM state machine. The extended control is configured to dynamically intervene in the transition process of the CanNM state machine between maintaining network state and sleep state in response to local events, so as to support PN network management.

[0012] As a preferred embodiment, in step S1, the network management message of the preset network segment includes: configuring the identifier of the wake-up frame to a preset value by setting the register of the CAN transceiver.

[0013] As a preferred embodiment, step S2 specifically includes:

[0014] S201. Perform operating system task scheduling, peripheral driver and ECU status manager hardware peripheral interface initialization to establish the basic software running environment;

[0015] S202. Start the operating system task scheduler and basic software manager in the basic software runtime environment to complete the CAN driver initialization;

[0016] S203. Under the control of the basic software manager, the initialization of the communication service module, CAN interface module and communication management module is completed first.

[0017] As a preferred embodiment, step S2 further includes: after completing the initialization of the communication protocol stack module, switching the state of the basic software manager to the CAN message sending state through the basic software manager, and requesting full communication state.

[0018] As a preferred embodiment, in step S3, the extended control of the transition logic of the CanNM state machine is specifically achieved by: accessing and intervening in the CanNM state machine by calling the standard AUTOSAR standard interface function through handwritten code.

[0019] As a preferred option, the extended control specifically includes the following three interventions:

[0020] First intervention: In response to detecting a local wake-up event when the CanNM state machine is in the repeating message state, control the CanNM state machine to reset the fast transmission sub-state of the repeating message state and reset the timer of the fast transmission sub-state;

[0021] Second intervention: In response to the timeout of the repeated message state and the network still being maintained, control the CanNM state machine to enter the normal working state; and in response to the satisfaction of the preset local sleep condition in the normal working state, control the CanNM state machine to jump from the normal working state to the ready sleep state.

[0022] Third intervention: In response to the detection of a local wake-up event in the ready sleep state, control the CanNM state machine to re-enter the fast send sub-state of the repeating message state.

[0023] As a preferred embodiment, after controlling the CanNM state machine to jump from the normal working state to the ready sleep state, the method further includes: setting the communication state to no communication through the basic software manager, and notifying the communication management module to stop sending and receiving messages.

[0024] As a preferred embodiment, the local wake-up event includes an ignition signal and a diagnostic request signal; the local sleep conditions include diagnostics not being activated, bus voltage being below a threshold, and all local wake-up events not being maintained.

[0025] As a preferred embodiment, after step S3, the method further includes: recording and monitoring the time interval from when the CAN transceiver is woken up to when the motor controller sends the first network management message. (This is to ensure that the timing requirements of the vehicle network are met.)

[0026] A PN network management system based on a motor controller includes:

[0027] The hardware wake-up module is used to wake up the motor controller from sleep mode by responding to network management messages that conform to the preset network segment during the sleep period of the CAN transceiver.

[0028] The protocol stack initialization module is used to start the basic software runtime environment. It prioritizes the initialization of communication protocol stack modules related to the CAN transceiver, including the initialization of the communication service module, CAN interface module and communication management module, and enables the CAN transceiver transmission and reception capabilities of the motor controller.

[0029] The PN state extension control module is used to perform extended control on the transition logic of the CanNM state machine based on the operation of the standard AUTOSAR CanNM state machine. The extended control is configured to dynamically intervene in the transition process of the CanNM state machine between maintaining network state and dormant state in response to local events, so as to support PN network management.

[0030] Compared with the prior art, the present invention has the following technical effects:

[0031] 1. This invention configures the CAN transceiver to only respond to network management (NM) messages of specific network segments and combines local events to dynamically control the state machine, thereby realizing fine-grained grouping and on-demand wake-up of network nodes. This allows unrelated controller nodes to remain in a deep sleep state for a long time while some functions of the vehicle are running, thereby significantly reducing the static current consumption of the whole vehicle and helping to extend the driving range of new energy vehicles.

[0032] 2. This invention uses handwritten code to call standard interfaces, successfully intervening in the standard state transition process (such as resetting from the repeating message state back to the fast sending sub-state) without directly modifying the AUTOSAR CanNM state machine generation code. This fundamentally solves the contradiction between the flexible requirements of PN network management and the fixed logic of AUTOSAR standard modules. It not only realizes the complex state transitions required by PN, but also maintains the standardization, modularity and toolchain compatibility of the AUTOSAR software architecture, avoiding potential stability risks caused by modifying the basic code.

[0033] 3. This invention uses handwritten code to determine the status (such as judging local events, diagnosing status, voltage thresholds, etc.), enabling the controller to switch from "normal operation state" to "ready sleep state" and the process of being woken up from sleep. This avoids the ambiguity that may be caused by relying entirely on network packets and enhances the robustness and predictability of the entire network management mode in complex real vehicle environments. Attached Figure Description

[0034] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0035] Figure 1 This is a flowchart of a PN network management method based on a motor controller disclosed in this invention. Detailed Implementation

[0036] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0038] It should be noted that similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the figures, or the orientation or positional relationship commonly used when the product is in use. They are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. In addition, the terms "horizontal," "vertical," etc., do not indicate that the component is required to be absolutely horizontal or suspended, but can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted. In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0039] Example 1:

[0040] With the relentless pursuit of extended driving range in new energy vehicles, Local Network Management (PN) has become a clear direction for technological development due to its energy-saving advantages such as on-demand wake-up and zoned hibernation. However, to ensure software quality and development efficiency, the industry currently mandates the adoption of the AUTOSAR standardized architecture, whose built-in CanNM state machine design and configuration interface are rigidly constructed around the traditional, full-segment synchronous management model. This means that standard AUTOSAR itself cannot natively support the flexible logic necessary for PN management, which involves dynamic intervention and changes to the state machine's trajectory by local events (such as reactivating the network during the sleep preparation phase due to a new ignition signal). Forcibly modifying the generated code of the AUTOSAR basic modules to meet PN functionality would completely destroy the core values ​​of this architecture, such as toolchain compatibility, software maintainability, and upgrade stability, making this approach unacceptable in practical engineering.

[0041] To address the aforementioned problems, this invention proposes a PN network management method based on a motor controller. First, this method utilizes CAN transceiver hardware that supports specific frame wake-up to achieve selective network wake-up. Second, it prioritizes the initialization of the communication protocol stack during the software startup phase, establishing a foundation for message transmission and reception. Finally, by writing an independent handwritten code module and calling AUTOSAR standard interface functions, it dynamically intervenes in and extends the transition logic of the standard CanNM state machine without modifying the standard generated code. This enables the machine to respond to local events and intelligently switch between maintaining network activity and preparing to enter a low-power state, thereby achieving refined on-demand wake-up and partitioned sleep management.

[0042] Specifically, such as Figure 1 As shown, the PN network management method based on a motor controller proposed in this invention includes the following steps:

[0043] S1. During sleep mode, the CAN transceiver responds to network management messages that conform to the preset network segment and triggers the motor controller to wake up from sleep mode.

[0044] In practice, the battery powers the motor controller, which is in sleep mode, and the CAN transceiver TJA1145 is in sleep mode, i.e., low-power mode. In this mode, the TJA1145 continuously detects whether there is a wake-up source on the network. At the same time, the TJA1145 configurable register can be set to wake up for a specific frame or a specific network segment.

[0045] S2. Start the basic software runtime environment, prioritize the initialization of the communication protocol stack modules related to the CAN transceiver, including the initialization of the communication service module (Com), CAN interface module (CanIf) and communication management module (ComM), and enable the CAN transceiver transmission and reception capabilities of the motor controller;

[0046] In practice, the initialization process of this communication protocol stack module includes:

[0047] S201. Perform operating system (OS) task scheduling, peripheral driver and ECU status manager (EcuM) hardware peripheral interface initialization to establish the basic software operating environment;

[0048] S202. Start the operating system task (OS) scheduler and basic software manager (BswM) in the basic software runtime environment to complete the CAN driver initialization;

[0049] S203. Under the control of the basic software manager, the initialization of the communication service module (Com), the CAN interface module (CanIf), and the communication management module (ComM) is completed first.

[0050] In this embodiment, after the communication protocol stack module initialization is completed, the basic software manager is switched to the CAN message sending state through the basic software manager and a full communication state is requested; at the same time, after the ComM state is switched to FullCom, the BswM needs to be switched to the AppRun state.

[0051] S3. Based on the operation of the standard AUTOSAR CanNM state machine, extended control is performed on the transition logic of the CanNM state machine. The extended control is configured to dynamically intervene in the transition process of the CanNM state machine between maintaining network state and sleep state in response to local events, so as to support PN network management.

[0052] In practical implementation, this embodiment, based on the standard AUTOSAR CanNM state machine operation, achieves dynamic response to local events by extending the control of the state machine's transition logic, thereby supporting PN network management. The core of this extended control lies in: outside the standard process, actively accessing and intervening in the operation of the CanNM state machine by calling AUTOSAR standard interface functions through handwritten code.

[0053] Specifically, the extended control includes the following three interventions:

[0054] The first intervention, in response to the detection of a local wake-up event (such as an IGN ignition signal or a diagnostic request signal) while the CanNM state machine is in the repeating message state, controls the CanNM state machine to reset the fast-transmit sub-state of the repeating message state and reset the timer of that fast-transmit sub-state. This intervention ensures that the network can be quickly reactivated and maintained when there are new local needs, rather than mechanically waiting for a timeout to enter the next state.

[0055] Second intervention: In response to the timeout of the repeated message state and the network still being maintained, control the CanNM state machine to enter the normal working state; and, in response to the satisfaction of preset local sleep conditions (such as diagnosis not activated, bus voltage below the threshold and all local wake-up events not being maintained) in the normal working state, control the CanNM state machine to jump from the normal working state to the ready sleep state.

[0056] Following this transition, the communication state will be set to no communication via the Basic Software Mode Manager (BswM), and the Communication Management Module (ComM) will be notified to stop sending and receiving messages, preparing for entry into low-power mode. This intervention enables intelligent sleep decision-making based on multi-dimensional local conditions (rather than just network silence).

[0057] The third intervention: In response to the detection of a local wake-up event in the ready sleep state, the CanNM state machine is controlled to re-enter the fast-send sub-state of the repeating message state. This intervention enables the controller to be promptly woken up by a local event and re-establish network communication when it is ready to sleep, thus meeting the requirement for dynamic start / stop of functional groups in PN management.

[0058] Example 2:

[0059] To better illustrate the effectiveness of the present invention, the following embodiments are provided.

[0060] Before the extended control logic runs, the motor controller must first be woken from sleep mode by a specific NM message and establish basic CAN communication capabilities. This embodiment supports PN network wake-up based on CAN messages, the key being configuring the CAN transceiver to respond only to messages from the target PN network segment. The specific implementation process is as follows, taking the wake-up network segment 0x400-0x4FF as an example:

[0061] ①CAN transceiver hardware filtering configuration

[0062] Use a CAN transceiver such as the TJA1145 that supports specific frame wake-up. By configuring its hardware filter registers such as MASK2 / MASK3, the identifier (ID) range of the wake-up frame is set to 0x400 to 0x4FF. When a valid NM message within this range appears on the bus, the TJA1145 will exit sleep mode and trigger the INH pin output, thereby enabling power to supply power to the microcontroller (MCU), completing the hardware-level selective wake-up.

[0063] ② AUTOSAR communication stack driver layer configuration

[0064] At the software level, corresponding configurations are required in the AUTOSAR CAN driver (CanDrv) and CAN interface (CanIf) modules to support the aforementioned hardware filtering and establish a correct receiving channel. Key configurations include:

[0065] CAN wake-up requires one mailbox corresponding to one set of CanIds. The CanHandleType of the CAN wake-up frame needs to be set to Basic, CanHwFilterCode to 0x400, and CanHwFilterMask to 0x700 (only the 0x4 bit is relevant). It is particularly important to note that network management message configuration cannot be placed before vehicle channel application / diagnostic messages; it must be placed at the end of the vehicle channel application / diagnostic messages. Otherwise, CanObjectID conflicts may occur, leading to abnormal frame transmission. Specific configuration details are shown in Table 1 below.

[0066] Table 1 PN Wake-on-LAN Mailbox Configuration Table

[0067]

[0068] ③ Communication stack initialization and state readiness

[0069] After the MCU is powered on, the system sequentially initializes the operating system, basic drivers, and AUTOSAR communication protocol stack (including modules such as Com, CanIf, and ComM). During this process, the Basic Software Mode Manager (BswM) sets the Communication Management Module (ComM) to enable communication and requests entry into FullCom mode, thereby preparing for the normal transmission and reception of subsequent application messages and network management messages.

[0070] At this point, the motor controller has completed wake-up based on the PN network segment and established the basic communication environment. Subsequently, it can enter the extended control stage of the PN network management state machine, implementing dynamic management of the CanNm state machine through hand-written code. Specifically:

[0071] 1. Enter the repeating message state in the CanNM state machine network mode and start the repeating message state timer. At this time, another local event is detected. Since PN network management is supported, it is necessary to re-enter the fast send sub-state of the repeating message state and reset the repeating message state timer. This part is implemented by writing code by hand. The specific implementation is shown below:

[0072] (1) Use the Autosar interface function to obtain the current NM state. If the NM state machine is in the repeating message state, check whether the local event exists.

[0073] (2) If a local event is detected, manually set the repeat message state timer; if no local event is detected, continue to detect local events.

[0074] (3) If a local event is detected, manually reset the number of quick send attempts;

[0075] (4) If a local event is detected, manually set the active wake-up bit to 1;

[0076] (5) When the repeat message state timer expires, if the local event still exists, it enters the normal operation state; if the local event does not exist, it enters the ready sleep state.

[0077] 2. After the repeating message state timer expires and the local event is still maintained on the network, the CanNM state machine enters the normal operation state. The transition from the normal operation state to the ready sleep state requires meeting local sleep conditions, such as whether the diagnostic is activated, whether the bus voltage is less than the threshold, and whether the local event is maintained. This part is implemented by hand-writing code, as shown below:

[0078] (1) Use the Autosar interface function to obtain the current NM state and detect when the NM state machine is in normal operating state;

[0079] (2) Check whether the local sleep conditions are met, such as whether the diagnosis is activated, whether the bus voltage is less than the threshold, and whether the local event is maintained.

[0080] (3) When the local sleep conditions are met, the system enters the ready sleep state. BSWM calls the SWC function of RTE to set the communication state to NoComm.

[0081] (4) Notify the ComM layer to control the sending and receiving of messages;

[0082] (5) If the sleep conditions are not met, the reason for not sleeping will be sent to the CAN via a data frame message.

[0083] 3. After entering the ready sleep state, a local event is detected. At this point, the CanNM state machine needs to re-enter the fast-send sub-state of the repeating message state. This part is implemented by hand-writing code, as shown below:

[0084] (1) Use the Autosar interface function to obtain the current NM state when the NM state machine is in the ready sleep state;

[0085] (2) Upon detecting a local event, the repeated message state function is called to re-enter the repeated message state;

[0086] (3) Manually reset the number of times the sub-state can be sent quickly;

[0087] (4) Manually set the active wake-up bit to 1;

[0088] (5) After entering the repeat message state, if the repeat message state timer expires but the local event is maintained, the system will enter the normal operation state; if the repeat message state timer expires but the local event is not maintained, the system will re-enter the ready sleep state.

[0089] Example 3:

[0090] Accordingly, this embodiment also provides a PN network management system based on a motor controller, including:

[0091] The hardware wake-up module is used to wake up the motor controller from sleep mode by responding to network management messages that conform to the preset network segment during the sleep period of the CAN transceiver.

[0092] The protocol stack initialization module is used to start the basic software runtime environment. It prioritizes the initialization of communication protocol stack modules related to the CAN transceiver, including the initialization of the communication service module, CAN interface module and communication management module, and enables the CAN transceiver transmission and reception capabilities of the motor controller.

[0093] The PN state extension control module is used to perform extended control on the transition logic of the CanNM state machine based on the operation of the standard AUTOSAR CanNM state machine. The extended control is configured to dynamically intervene in the transition process of the CanNM state machine between maintaining network state and dormant state in response to local events, so as to support PN network management.

[0094] This system can implement the steps in any of the foregoing method embodiments and has the corresponding beneficial effects. Since the principle of this system embodiment is similar to that of the method embodiments, it will not be described again here.

[0095] In summary, compared with the prior art, the present invention has the following technical effects:

[0096] This invention configures the CAN transceiver to respond only to network management (NM) messages of specific network segments and combines local events to dynamically control the state machine, thereby achieving fine-grained grouping and on-demand wake-up of network nodes. This allows unrelated controller nodes to remain in a deep sleep state for a long time while some vehicle functions are running, thus significantly reducing the static current consumption of the entire vehicle and helping to extend the driving range of new energy vehicles.

[0097] This invention uses handwritten code to call standard interfaces, successfully intervening in the standard state transition process of AUTOSAR CanNM (such as resetting from the repeating message state back to the fast sending sub-state) without directly modifying the AUTOSAR CanNM state machine generation code. This fundamentally solves the contradiction between the flexible requirements of PN network management and the fixed logic of AUTOSAR standard modules. It not only realizes the complex state transitions required by PN, but also maintains the standardization, modularity and toolchain compatibility of the AUTOSAR software architecture, avoiding potential stability risks caused by modifying the basic code.

[0098] This invention uses handwritten code to determine the status (such as judging local events, diagnosing status, voltage thresholds, etc.), enabling the controller to switch from "normal operation state" to "ready sleep state" and the process of being woken up from sleep. This avoids the ambiguity that may be caused by relying entirely on network packets and enhances the robustness and predictability of the entire network management mode in complex real vehicle environments.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.

Claims

1. A PN network management method based on a motor controller, characterized in that, Includes the following steps: S1. During sleep mode, the CAN transceiver responds to network management messages that conform to the preset network segment and triggers the motor controller to wake up from sleep mode. S2. Start the basic software runtime environment, prioritize the initialization of the communication protocol stack modules related to the CAN transceiver, including the initialization of the communication service module, CAN interface module and communication management module, and enable the CAN transceiver transmission and reception capabilities of the motor controller. S3. Based on the operation of the standard AUTOSAR CanNM state machine, extended control is performed on the transition logic of the CanNM state machine. The extended control is configured to dynamically intervene in the transition process of the CanNM state machine between maintaining network state and sleep state in response to local events, so as to support PN network management.

2. The PN network management method based on a motor controller according to claim 1, characterized in that, In step S1, the network management message of the preset network segment includes: configuring the identifier of the wake-up frame to a preset value by setting the register of the CAN transceiver.

3. The PN network management method based on a motor controller according to claim 1, characterized in that, Step S2 specifically includes: S201. Perform operating system task scheduling, peripheral driver and ECU status manager hardware peripheral interface initialization to establish the basic software running environment; S202. Start the operating system task scheduler and basic software manager in the basic software runtime environment to complete the CAN driver initialization; S203. Under the control of the basic software manager, the initialization of the communication service module, CAN interface module and communication management module is completed first.

4. The PN network management method based on a motor controller according to claim 3, characterized in that, Step S2 further includes: after completing the initialization of the communication protocol stack module, switching the state of the basic software manager to the CAN message sending state through the basic software manager, and requesting full communication state.

5. The PN network management method based on a motor controller according to claim 1, characterized in that, In step S3, the extended control of the transition logic of the CanNM state machine is specifically achieved by calling the standard AUTOSAR interface function through handwritten code to access and intervene in the CanNM state machine.

6. The PN network management method based on a motor controller according to claim 5, characterized in that, The extended control specifically includes the following three interventions: First intervention: In response to detecting a local wake-up event when the CanNM state machine is in the repeating message state, control the CanNM state machine to reset the fast transmission sub-state of the repeating message state and reset the timer of the fast transmission sub-state; Second intervention: In response to the timeout of the repeated message state and the network still being maintained, control the CanNM state machine to enter the normal working state; and in response to the satisfaction of the preset local sleep condition in the normal working state, control the CanNM state machine to jump from the normal working state to the ready sleep state. Third intervention: In response to the detection of a local wake-up event in the ready sleep state, control the CanNM state machine to re-enter the fast send sub-state of the repeating message state.

7. The PN network management method based on a motor controller according to claim 6, characterized in that, After controlling the CanNM state machine to transition from the normal working state to the ready sleep state, the method further includes: setting the communication state to no communication through the basic software manager, and notifying the communication management module to stop sending and receiving messages.

8. The PN network management method based on a motor controller according to claim 7, characterized in that, The local wake-up events include ignition signals and diagnostic request signals; the local sleep conditions include diagnostics not being activated, bus voltage being below a threshold, and all local wake-up events not being maintained.

9. The PN network management method based on a motor controller according to claim 1, characterized in that, After step S3, the method further includes: recording and monitoring the time interval from when the CAN transceiver is woken up to when the motor controller sends the first network management message.

10. A PN network management system based on a motor controller, characterized in that, include: The hardware wake-up module is used to wake up the motor controller from sleep mode by responding to network management messages that conform to the preset network segment during the sleep period of the CAN transceiver. The protocol stack initialization module is used to start the basic software runtime environment. It prioritizes the initialization of communication protocol stack modules related to the CAN transceiver, including the initialization of the communication service module, CAN interface module and communication management module, and enables the CAN transceiver transmission and reception capabilities of the motor controller. The PN state extension control module is used to perform extended control on the transition logic of the CanNM state machine based on the operation of the standard AUTOSAR CanNM state machine. The extended control is configured to dynamically intervene in the transition process of the CanNM state machine between maintaining network state and dormant state in response to local events, so as to support PN network management.