Motor control method and device, vehicle and storage medium
By obtaining the motor status and determining the operating mode when the vehicle is powered on, the problem of single motor control in the prior art caused by errors is solved, and the working efficiency and reliability of the motor are improved.
Patent Information
- Application Number
- CN202411993027.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the motor control is relatively single and cannot meet the various working states of the motor, resulting in frequent errors during the operation of the motor, affecting normal use.
When the vehicle changes from the power-off state to the power-on state, the state of the motor is obtained and its operating mode is determined according to the different states of the motor, including the working mode and the self-test mode, to control the operation of the motor in this way.
By determining the operating mode according to the status of the motor, the probability of error reporting during operation of the motor is reduced, and the working efficiency and reliability of the motor are improved.
Smart Images

Figure CN119611327A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of intelligent automobile technology, and in particular, relates to a motor control method, device, vehicle and storage medium. Background Art
[0002] In order to alleviate the global resource crisis and environmental pollution, the automotive power system has shifted from the traditional fuel engine as the main power source to the electric drive system as the core or the combination of electricity and traditional fuel power. Among them, the BSG (Belt-alternator Starter Generator) motor is a motor used in the automotive power system. The BSG motor is connected to the engine through a belt. During the vehicle startup phase, the BSG motor can be used as a starter, using electrical energy to drive the engine crankshaft to rotate, so that the engine can start smoothly; and during the normal driving of the vehicle, it can be used as a generator, converting part of the engine's mechanical energy into electrical energy through belt drive to charge the vehicle's electrical system.
[0003] At present, after the vehicle is powered on, the motor will directly enter the working state. The control of the motor is relatively simple and cannot meet the working state of the motor. During the working process, the motor often reports errors, affecting the normal use of the motor. Summary of the invention
[0004] The embodiments of the present application provide a motor control method, device, vehicle and storage medium, which can solve the problem that the motor control is relatively simple and cannot meet the working state of the motor, the motor often reports errors during operation, and the normal use of the motor is affected.
[0005] In a first aspect, an embodiment of the present application provides a method for controlling a motor, comprising:
[0006] When the vehicle changes from a power-off state to a power-on state, obtaining a state of a motor, wherein the motor is a motor having a starting and a power generation function;
[0007] Determining an operating mode of the motor according to a state of the motor, wherein different states of the motor correspond to different operating modes;
[0008] The motor is controlled to operate based on the operation mode.
[0009] In the present application, when the vehicle changes from a power-off state to a power-on state, the operating mode of the motor is determined according to the state of the motor, and different states of the motor correspond to different operating modes; the operation of the motor is controlled based on the operating mode; the present application sets different operating modes for different motor states, which is richer than the control mode of the prior art; in addition, the present application can determine the operating mode of the motor according to the state of the motor after the vehicle is powered on, so that the determined operating mode of the motor is related to the state of the motor, and the operating mode of the motor is more in line with the state of the motor. Since the determined operating mode of the motor is more in line with the state of the motor, the probability of error reporting of the motor during operation is reduced.
[0010] In a possible implementation manner of the first aspect, determining the operation mode of the motor according to the state of the motor includes:
[0011] If the state of the motor is not in the sleep state, prohibit the motor from entering the self-test mode, and determine that the operation mode of the motor is the working mode; or, if no self-test record of the motor in this operation is found, output the self-test error information of the motor;
[0012] If the state of the motor is a sleep state, it is determined that the operation mode of the motor is the self-test mode.
[0013] In the present application, if the state of the motor is not in the sleep state, it means that the motor has not been powered off after the vehicle was powered off. Therefore, there is no need to perform self-check on the motor, and the motor can be directly put into the working mode, thereby improving the working efficiency of the motor. If the state of the motor is in the sleep state, it means that the motor is in the power-off state. After the motor is powered on, a self-check can be performed before working, so as to timely detect whether there is a fault in the motor, avoid the situation where the motor cannot work normally due to damage to the internal motor and related circuits, and ensure the smooth operation of the motor.
[0014] In addition, if the motor is in a non-sleep state, it means that the motor has not been powered off after the vehicle was powered off. If the motor has not been self-checked before, the self-check record of the motor cannot be found after powering on this time, and a self-check error message is output to remind the user to check whether the motor is normal to ensure that the motor can be used normally.
[0015] In a possible implementation manner of the first aspect, when the operation mode of the motor is a self-test mode, controlling the motor to operate based on the operation mode includes:
[0016] Controlling the motor to enter the self-test mode;
[0017] When the motor is in a self-test mode, obtaining a first current speed of the motor;
[0018] If the first current rotation speed is greater than a preset threshold, the motor is controlled to exit the self-check mode, and the motor is controlled to enter the working mode.
[0019] In the present application, during the self-test process of the motor, if the first current speed of the motor is greater than a preset threshold, it means that the motor has a speed. In order not to affect the operation of the motor, the self-test process is exited and the motor is controlled to enter the working mode to improve the working response speed of the motor. At the same time, the number of self-tests is also reduced, the motor is prevented from repeated self-tests, and the working efficiency of the motor is improved.
[0020] In a possible implementation manner of the first aspect, after acquiring the first current rotation speed of the motor, the method further includes:
[0021] If the first current speed is less than or equal to the preset threshold, continue to perform self-test on the motor to obtain a self-test result of the motor;
[0022] If the self-test result is that the self-test passes, controlling the motor to enter a working mode;
[0023] If the self-test result is that the self-test fails, the self-test error information of the motor is output.
[0024] In this application, if after self-testing the motor, it is found that the motor may be faulty, it can be determined that the self-test has failed and the motor cannot work normally, and a self-test error is required to prompt the user to perform repairs.
[0025] In a possible implementation manner of the first aspect, the preset threshold is determined based on a tolerance of a rotation speed detection sensor of the motor and a vibration parameter of an engine connected to the motor.
[0026] In the present application, a preset threshold value of the motor speed is determined based on the tolerance of the motor speed detection sensor and the vibration parameters of the engine connected to the motor, so as to avoid the motor rotation due to the vibration of the engine, causing the detected state error of the motor, and avoid the speed detection error caused by the detection error caused by the tolerance of the speed detection sensor, so as to make the final determined operation mode of the motor more accurate.
[0027] In a possible implementation manner of the first aspect, controlling the motor to enter the self-test mode includes:
[0028] After the power system main relay is in a closed state, the motor is controlled to enter the self-test mode, wherein the power system main relay is respectively connected to the motor and a battery management module in the vehicle, and the motor is powered on after the power system main relay is powered on and closed.
[0029] In this application, the battery management module powers on the motor by closing the main relay of the power system, avoiding damage to the motor when the battery output current far exceeds the normal current. The contacts of the main relay of the power system can withstand a large current, and using it to connect the battery management module and the motor is equivalent to adding a "protective shield" to the motor, extending the service life of the motor.
[0030] In a possible implementation manner of the first aspect, when the vehicle changes from a power-off state to a power-on state, before obtaining the state of the motor, the method further includes:
[0031] Receiving a power-off instruction of the vehicle;
[0032] Controlling the vehicle to change from a powered-on state to a powered-off state;
[0033] After the vehicle is powered off, if the state of the power system main relay is in a closed state, the motor is controlled to remain in a non-dormant state, wherein the power system main relay is respectively connected to the motor and a battery management module in the vehicle, and the motor is powered on after the power system main relay is powered on and closed;
[0034] If the state of the power system main relay is disconnected, the motor is controlled to enter a dormant state.
[0035] In the present application, since the on and off state of the power system main relay is related to the power-on state of the motor, whether the motor is in a dormant state or not is determined according to the state of the power system main relay, making the determined state of the motor more accurate.
[0036] In a second aspect, an embodiment of the present application provides a control device for a motor, comprising:
[0037] A first state acquisition module, used for acquiring the state of the motor when the vehicle changes from a power-off state to a power-on state, wherein the motor is a motor with starting and power generation functions;
[0038] A mode determination module, used to determine the operation mode of the motor according to the state of the motor, wherein different states of the motor correspond to different operation modes;
[0039] A control module is used to control the operation of the motor based on the operation mode.
[0040] In a possible implementation manner of the second aspect, the mode determination module is further configured to:
[0041] If the state of the motor is not in the sleep state, prohibit the motor from entering the self-test mode, and determine that the operation mode of the motor is the working mode; or, if no self-test record of the motor in this operation is found, output the self-test error information of the motor;
[0042] If the state of the motor is a sleep state, it is determined that the operation mode of the motor is the self-test mode.
[0043] In a possible implementation manner of the second aspect, when the operation mode of the motor is a self-test mode, the control module is used to:
[0044] Controlling the motor to enter the self-test mode;
[0045] When the motor is in a self-test mode, obtaining a first current speed of the motor;
[0046] If the first current rotation speed is greater than a preset threshold, the motor is controlled to exit the self-check mode, and the motor is controlled to enter the working mode.
[0047] In a possible implementation manner of the second aspect, the control module is further configured to:
[0048] If the first current speed is less than or equal to the preset threshold, continue to perform self-test on the motor to obtain a self-test result of the motor;
[0049] If the self-test result is that the self-test passes, controlling the motor to enter a working mode;
[0050] If the self-test result is that the self-test fails, the self-test error information of the motor is output.
[0051] In a possible implementation manner of the second aspect, the preset threshold is determined based on a tolerance of a rotation speed detection sensor of the motor and a vibration parameter of an engine connected to the motor.
[0052] In a possible implementation manner of the second aspect, the control module is further configured to:
[0053] After the power system main relay is in a closed state, the motor is controlled to enter the self-test mode, wherein the power system main relay is respectively connected to the motor and a battery management module in the vehicle, and the motor is powered on after the power system main relay is powered on and closed.
[0054] In a possible implementation manner of the second aspect, connected to the first state acquisition module further includes:
[0055] A command receiving module, used for receiving a power-off command of the vehicle;
[0056] A state change module, used for controlling the vehicle to change from a power-on state to a power-off state;
[0057] a state determination module, configured to control the motor to remain in a non-dormant state if the state of a power system main relay is in a closed state after the vehicle is powered off, wherein the power system main relay is respectively connected to the motor and a battery management module in the vehicle, and the motor is powered on after the power system main relay is powered on and closed;
[0058] The state determination module is also used to control the motor to enter a dormant state if the state of the power system main relay is an off state.
[0059] In a third aspect, an embodiment of the present application provides a vehicle, comprising: a motor, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the motor control method described in any one of the first aspects above when executing the computer program.
[0060] In a fourth aspect, an embodiment of the present application provides a terminal device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the motor control method described in any one of the first aspects above when executing the computer program.
[0061] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the motor control method described in any one of the first aspects above is implemented.
[0062] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the motor control method described in any one of the above-mentioned first aspects.
[0063] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0065] Figure 1 is a process schematic diagram of a motor control method provided by an embodiment of the present application;
[0066] Figure 2is a flow chart of a motor control method used in the present application provided by an embodiment of the present application;
[0067] Figure 3 It is a flowchart of a method for performing a self-check process of a motor provided by an embodiment of the present application;
[0068] Figure 4 is a flow chart of a motor control method provided by another embodiment of the present application;
[0069] Figure 5 is a schematic structural diagram of a motor control device provided in one embodiment of the present application;
[0070] Figure 6 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0071] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0072] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0073] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0074] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0075] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0076] In order to optimize the performance of the vehicle, a motor, an engine and a starter are set in the vehicle. For example, the BSG motor is connected to the front end of the engine through a belt drive mechanism. During the operation of the vehicle, the BSG motor can intervene and assist the operation of the engine according to the different working conditions of the vehicle. For example, when the battery management module (Battery Management System, BMS) is fully charged, the engine can be started by the motor. The starter is an important auxiliary component of the engine. Its main function is to convert the battery's electrical energy into mechanical energy when the engine starts, drive the engine's crankshaft to rotate, and put the engine from a stationary state into a working state. For example, when the BMS is low on power or the ambient temperature is too low, it is necessary to use the battery to drive the starter to start the engine.
[0077] It can be seen that in terms of engine starting, both the BSG motor and the starter have the function of starting the engine. The difference is that the starter is mainly used to meet the engine starting requirements under specific conditions such as cold start. Its power is relatively small, the working time is short, and it only works at starting. The BSG motor can not only assist the engine at starting, but also continue to work during the vehicle driving process to adjust and optimize the operation of the engine.
[0078] In addition, the BSG motor needs to be used with a 48V BMS, a DC-DC converter (DC / DC) and a Hydraulic Control Unit (HCU). The HCU can control the BMS to provide power to the BSG motor, and can also control the BSG motor to send the output torque to the engine to make the engine work; in addition, the BSG motor can also convert the mechanical energy generated by the engine into direct current, which can charge the BMS on the one hand, and convert the 48V direct current into 12V through DC / DC and store it in the battery on the other hand.
[0079] The inventors found that during the use of the BSG motor, the BSG motor will directly enter the working mode (working state) after the vehicle is powered on. If the BSG motor fails, it will affect the entire power system and may also cause damage to other components in the vehicle, making it difficult to repair the vehicle.
[0080] Based on this, the inventor found that before the BSG motor is used, the BSG motor is self-checked to determine whether the BSG motor-related paths can be shut off when the BSG motor fails; in addition, the potential fault link can be detected to ensure that the link can be used normally. After the self-check is completed, the BSG motor is driven to work. This method, on the one hand, can detect problems in the early stage of the BSG motor failure and repair them as soon as possible to avoid further expansion of the failure, reduce damage and replacement of parts caused by the aggravation of the failure, reduce maintenance costs, and increase the service life of the BSG motor; on the other hand, it can also ensure that the BSG motor can operate normally after entering the working state, ensuring the normal driving of the vehicle.
[0081] It should be noted that for ease of description, this application uses the BSG motor as an example for explanation, but the BSG motor is only an embodiment and does not constitute a limitation to the method of this application. This application can be applied to any motor with starting and generating functions.
[0082] The following specifically describes an implementation process of a method for controlling a motor according to an embodiment of the present application. The method includes:
[0083] After the vehicle is unlocked, if a power-on command is detected, which is generated when the user clicks a power-on button or turns a vehicle key, the vehicle is powered on, changing the vehicle from a power-off state to a power-on state.
[0084] After the vehicle is powered on, if the motor needs to be used, the power system main relay connected to the motor needs to be closed so that the BMS can power the motor. The power system main relay can be a KL87 relay. In addition, the power system main relay is also the switch path for the doors, windows, lights, etc. After the power system main relay is closed, the BMS can provide power for the doors, windows, lights, etc. Because the doors, windows, lights, etc. are all controlled by the body control module (BCM), therefore, after the BCM is awakened, the power system main relay also needs to be closed.
[0085] For details, see Figure 1 As shown, for the convenience of writing, the main relay of the power system is taken as KL87 relay as an example.
[0086] After the main relay of the power system (KL87 relay) is closed, the control motor enters the self-test mode. When the motor enters the self-test mode, it starts to run the self-test program.
[0087] Get the current speed of the motor.
[0088] Case 1: if the current speed of the motor is less than the first threshold value (for example, the first threshold value can be set to 10rpm or 15rpm, etc., and the following explanation takes the first threshold value of 10rpm as an example), it means that the motor has no speed and the transmitter has no speed. This situation means that the motor is needed to start the engine. Therefore, the work can be carried out after the motor self-test is completed. Therefore, the motor can continue to be self-tested, that is, continue to run the self-test program until the self-test result is obtained.
[0089] If the self-test result is qualified, the motor is controlled to enter the working mode, and the motor can receive the instructions sent by the HCU and work according to the instructions sent by the HCU.
[0090] After the vehicle is powered off, if the main relay of the power system is disconnected, the motor is powered off and enters the sleep state normally; if the main relay of the power system is not disconnected (continues to remain closed) due to special reasons, for example, the door is not closed, etc., the motor remains powered on and cannot enter the sleep state, and the motor will remain in the non-sleep state.
[0091] After the vehicle is powered on again, if the motor is in a dormant state, the above self-test process for the motor can be continued after the power system main relay is closed.
[0092] After the vehicle is powered on again, if the motor is not in sleep state, since the main relay of the power system has been kept closed from before power off to this power on, and since the main relay of the power system has performed a self-check of the motor when it was just closed before the vehicle was powered off, after the vehicle is powered on this time, there is a record of the self-check of the motor after the main relay of the power system was powered on, and the motor can directly enter the working state.
[0093] If the self-test result is that the self-test fails, a self-test error message is output. The user can repair the vehicle according to the fault indication in the self-test error message.
[0094] Case 2: If the current speed of the motor is greater than or equal to the first threshold, the motor is controlled to exit the self-check mode and directly enter the working mode. When the current speed of the motor is greater than or equal to the first threshold, it means that the engine has a speed. At this time, the engine is started by the starter, and the motor also has a speed driven by the engine. Since the motor already has a speed, in order to ensure the rapid response of the motor and not affect the operation of the engine, the motor can directly skip the self-check process and directly enter the working state to improve the working efficiency of the motor.
[0095] Similarly, after the vehicle is powered off, the motor may enter a dormant state or a non-dormant state.
[0096] After the vehicle is powered on again, if the motor is in a dormant state, the above self-check process for the motor will continue after the power system main relay is closed.
[0097] After the vehicle is powered on again, if the motor is in a non-sleeping state (not in a sleeping state), since the main relay of the power system has been in a closed state, the motor was not self-checked when the vehicle was powered on last time and the main relay of the power system was just closed because the speed was greater than the first threshold. As a result, after the vehicle is powered on this time, the motor self-check record cannot be detected, the motor self-check reports an error, and the motor cannot work normally.
[0098] From the above description, it can be seen that when the motor speed is greater than the threshold, since the self-check of the motor is skipped, if the motor is not dormant after the vehicle is powered off, it will cause a self-check error after the vehicle is powered on again, affecting the use of the motor.
[0099] Based on this problem, the inventor has improved the above-mentioned motor control method. On the one hand, the speed threshold is increased to avoid the phenomenon of motor control errors caused by the speed detection sensor's own tolerance and the motor gear train vibration, and on the other hand, if the motor is not dormant after the vehicle is powered off, the motor self-check is prohibited after the vehicle is powered on again, and the motor is controlled to directly enter the working state, ensuring the normal operation of the motor and avoiding the phenomenon of self-check error.
[0100] Another method for controlling a motor according to an embodiment of the present application is described in detail below.
[0101] Figure 2 A schematic flow chart of the motor control method provided by the present application is shown, referring to Figure 2 , the method is described in detail as follows:
[0102] S101, when the vehicle changes from a power-off state to a power-on state, obtaining a state of a motor.
[0103] In this embodiment, when the vehicle is in a power-off state, if a power-on command is received, the vehicle changes from the power-off state to the power-on state. The power-on command may be a command generated after the user turns the key or presses the start button.
[0104] The vehicle is powered by the switch power supply, and the motor is powered by the power system. The vehicle is not the same as the motor. In addition, different relays are used for the vehicle and the motor. For example, the vehicle uses the KL15 relay, and the motor uses the KL87 relay. The vehicle is powered after the KL15 relay is closed, and the motor is powered after the KL87 relay is closed.
[0105] In this embodiment, the state of the motor before the vehicle is powered on is the state of the motor when the vehicle is just powered on. When the vehicle is powered off, if the motor is in a dormant state, then after the vehicle is powered on, the state of the motor is a dormant state. When the vehicle is powered off, if the motor is not in a dormant state, then after the vehicle is powered on, the state of the motor is a non-dormant state. The state of the motor before the vehicle is powered on may be a dormant state or a non-dormant state.
[0106] Specifically, the method for determining the state of the motor after the vehicle is powered off includes:
[0107] Receiving a power-off instruction of the vehicle; controlling the vehicle to change from a power-on state to a power-off state. After the vehicle is powered off, if the state of the power system main relay is in a closed state, controlling the motor to remain in a non-sleeping state. If the state of the power system main relay is in an open state, controlling the motor to enter a dormant state.
[0108] After the vehicle is powered off, if the main relay of the electric power system connected to the motor is disconnected, the motor will be powered off and enter a dormant state; if the main relay of the electric power system connected to the motor is not disconnected, for example, the vehicle door is not closed for a long time and the main relay of the electric power system is continuously closed, then the motor will continue to be powered and cannot enter a dormant state, and the motor will remain in a non-dormant state.
[0109] S102, determining an operation mode of the motor according to a state of the motor, wherein different states of the motor correspond to different operation modes.
[0110] In this embodiment, the operation modes corresponding to different motor states are preset. The operation modes of the motor may include a self-check mode and a working mode.
[0111] S103: Control the motor to operate based on the operation mode.
[0112] In the present application, when the vehicle changes from a power-off state to a power-on state, the operating mode of the motor is determined according to the state of the motor, and different states of the motor correspond to different operating modes; the operation of the motor is controlled based on the operating mode; the present application sets different operating modes for different motor states, which is richer than the control mode of the prior art; in addition, the present application can determine the operating mode of the motor according to the state of the motor after the vehicle is powered on, so that the determined operating mode of the motor is related to the state of the motor, and the operating mode of the motor is more in line with the state of the motor. Since the determined operating mode of the motor is more in line with the state of the motor, the probability of error reporting of the motor during operation is reduced.
[0113] In a possible implementation, the implementation process of step S102 may include:
[0114] S1021: If the state of the motor is not in the sleep state, prohibit the motor from entering the self-check mode, and determine that the operation mode of the motor is the working mode.
[0115] In this embodiment, if the state of the motor is not in the sleep state, it means that the motor has not been powered off since the vehicle was powered off. Therefore, there is no need to perform self-check on the motor and the motor can be directly put into working mode. This setting improves the working efficiency of the motor on the one hand; on the other hand, it makes the motor adaptable to all situations. Even if the motor is not self-checked before the vehicle is powered off, it will not affect the normal use of the motor. Therefore, no matter whether the motor is self-checked before the vehicle is powered off, the motor can be used normally after the vehicle is powered on this time, and there will be no self-check error caused by failure to self-check the motor.
[0116] S1022: If the state of the motor is the sleep state, determine that the operation mode of the motor is the self-test mode.
[0117] Specifically, if the state of the motor is a dormant state, it means that the motor is in a power-off state. After the motor is powered on, a self-check may be performed before the motor can work.
[0118] In this embodiment, if the motor is in a dormant state, it is determined that the main relay of the power system is disconnected. After the vehicle is powered on, the motor can be self-checked to ensure that the motor can be self-checked before it works, and whether the motor has a fault can be discovered in time to ensure smooth operation of the motor.
[0119] In a possible implementation, when the operation mode of the motor is the working mode, a specific implementation of step S103 includes:
[0120] Control the motor to enter working mode.
[0121] like Figure 3As shown, in a possible implementation, when the operation mode of the motor is the self-test mode, the specific implementation of step S103 includes:
[0122] S1031, controlling the motor to enter the self-test mode.
[0123] Specifically, after the state of the main relay of the power system is in the closed state, the motor is controlled to enter the self-check mode.
[0124] S1032: When the motor is in a self-test mode, obtain a first current rotation speed of the motor.
[0125] In this embodiment, after the motor enters the self-test mode, the motor starts to self-test. When the motor is self-tested, if the motor starts the engine, then after the main relay of the power system is closed, the motor has no speed before it starts working; if the starter starts the engine, then after the engine starts, the motor will have a speed, that is, the motor has a speed after the main relay of the power system is closed; therefore, in order to improve the working efficiency of the motor, different controls are performed on the motor at different speeds. Therefore, after the motor is in the self-test mode, the motor speed needs to be collected first.
[0126] Specifically, the motor starts to run a self-test program when it is in the self-test mode. When the self-test program is run, a first current rotation speed of the motor is acquired, and the current rotation speed of the motor can be acquired through a rotation speed detection sensor.
[0127] S1033: If the first current rotation speed is greater than a preset threshold, control the motor to exit the self-check mode, and control the motor to enter the working mode.
[0128] In this embodiment, the preset threshold is determined based on the tolerance of the speed detection sensor of the motor and the vibration parameters of the engine connected to the motor, so as to avoid the motor rotating due to the vibration of the engine, causing the detected state error of the motor, and to avoid the speed detection error caused by the detection error due to the tolerance of the speed detection sensor. For example, the preset threshold can be set to 100rpm or 120rpm. The value of the preset threshold is set to be greater than or equal to the speed of the motor caused by the tolerance of the speed detection sensor and the vibration parameters of the engine connected to the motor.
[0129] In this embodiment, if the first current speed of the motor is greater than the preset threshold, it means that the motor has a speed. In order not to affect the operation of the motor, the self-test process is exited and the motor is controlled to enter the working mode to improve the working response speed of the motor.
[0130] S1034: If the first current rotation speed is less than or equal to the preset threshold, continue to perform self-inspection of the motor to obtain a self-inspection result of the motor.
[0131] In this embodiment, if the first current speed of the motor is less than or equal to the preset threshold, it means that the motor has no speed, then the motor can continue to be self-checked, and the motor can be controlled to work after the self-check is completed to ensure the normal operation of the motor.
[0132] S1035: If the self-test result is that the self-test passes, control the motor to enter a working mode.
[0133] In this embodiment, if after the self-test of the motor, there is no possibility of failure of the motor, it can be determined that the self-test has passed and the motor can work normally.
[0134] S1036: If the self-test result is that the self-test fails, output self-test error information of the motor.
[0135] In this embodiment, if the motor may be faulty after self-testing, it can be determined that the self-test has failed and the motor cannot work normally, and a self-test error is required to prompt the user to perform maintenance.
[0136] like Figure 4 As shown, in a possible implementation, the above method may further include:
[0137] After the vehicle is unlocked and powered on, if the power system main relay is closed, the control motor enters the self-test mode.
[0138] When the motor performs self-test, a second current rotation speed of the motor is detected.
[0139] If the second current rotation speed is less than or equal to the preset threshold, the motor continues to be self-checked to obtain a self-check result, which is described by taking the preset threshold of 100 rpm as an example.
[0140] If the self-test result is self-test passed, the motor is controlled to enter the working mode.
[0141] If the self-test result is that the self-test fails, the self-test error information of the motor is output.
[0142] If the second current rotation speed is greater than a preset threshold, the motor is controlled to exit the self-check mode and enter the working mode.
[0143] After receiving a power-off instruction of the vehicle, the vehicle is controlled to change from a power-on state to a power-off state.
[0144] If the state of the power system main relay is closed, the control motor remains in the non-sleeping state.
[0145] If the state of the main relay of the power system is disconnected, the control motor enters the dormant state.
[0146] After the vehicle is powered on again, if the motor is in a dormant state, the motor is controlled to enter a self-test mode and start a self-test.
[0147] If the motor is not in sleep mode, the motor is prohibited from entering the self-test mode and the motor is controlled to enter the working mode.
[0148] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0149] Corresponding to the motor control method described in the above embodiment, Figure 5 A structural block diagram of a motor control device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0150] Reference Figure 5 The device 400 may include: a first state acquisition module 410, a mode determination module 420 and a control module 430.
[0151] The first state acquisition module 410 is used to acquire the state of the motor when the vehicle changes from a power-off state to a power-on state, wherein the motor is a motor having a starting and a power generation function;
[0152] A mode determination module 420, configured to determine an operation mode of the motor according to a state of the motor, wherein different states of the motor correspond to different operation modes;
[0153] The control module 430 is used to control the operation of the motor based on the operation mode.
[0154] In a possible implementation, the mode determination module 420 is further configured to:
[0155] If the state of the motor is not in the sleep state, prohibit the motor from entering the self-test mode, and determine that the operation mode of the motor is the working mode; or, if no self-test record of the motor in this operation is found, output the self-test error information of the motor;
[0156] If the state of the motor is a sleep state, it is determined that the operation mode of the motor is the self-test mode.
[0157] In a possible implementation, when the operation mode of the motor is the self-test mode, the control module 430 is used to:
[0158] Controlling the motor to enter the self-test mode;
[0159] When the motor is in a self-test mode, obtaining a first current speed of the motor;
[0160] If the first current rotation speed is greater than a preset threshold, the motor is controlled to exit the self-check mode, and the motor is controlled to enter the working mode.
[0161] In a possible implementation, the control module 430 is further configured to:
[0162] If the first current speed is less than or equal to the preset threshold, continue to perform self-test on the motor to obtain a self-test result of the motor;
[0163] If the self-test result is that the self-test passes, controlling the motor to enter a working mode;
[0164] If the self-test result is that the self-test fails, the self-test error information of the motor is output.
[0165] In a possible implementation manner, the preset threshold is determined based on a tolerance of a rotation speed detection sensor of the motor and a vibration parameter of an engine connected to the motor.
[0166] In a possible implementation, the control module 430 is further configured to:
[0167] After the power system main relay is in a closed state, the motor is controlled to enter the self-test mode, wherein the power system main relay is respectively connected to the motor and a battery management module in the vehicle, and the motor is powered on after the power system main relay is powered on and closed.
[0168] In a possible implementation, the first state acquisition module 410 is connected to further include:
[0169] A command receiving module, used for receiving a power-off command of the vehicle;
[0170] A state change module, used for controlling the vehicle to change from a power-on state to a power-off state;
[0171] a state determination module, configured to control the motor to remain in a non-dormant state if the state of a power system main relay is in a closed state after the vehicle is powered off, wherein the power system main relay is respectively connected to the motor and a battery management module in the vehicle, and the motor is powered on after the power system main relay is powered on and closed;
[0172] The state determination module is also used to control the motor to enter a dormant state if the state of the power system main relay is an off state.
[0173] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0174] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0175] An embodiment of the present application also provides a vehicle, comprising: a motor, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the above method is implemented when the processor executes the computer program.
[0176] The present application also provides a terminal device, see Figure 6 The terminal device 500 may include: at least one processor 510, a memory 520, and a computer program stored in the memory 520 and executable on the at least one processor 510. When the processor 510 executes the computer program, the steps in any of the above-mentioned method embodiments are implemented, for example Figure 2 Steps S101 to S103 in the illustrated embodiment. Alternatively, when the processor 510 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 5 The functions of the first state acquisition module 410 to the control module 430 are shown.
[0177] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 520, and executed by the processor 510 to complete the present application. The one or more modules / units may be a series of computer program segments capable of completing specific functions, and the program segments are used to describe the execution process of the computer program in the terminal device 500.
[0178] Those skilled in the art will understand that Figure 6 It is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.
[0179] The processor 510 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0180] The memory 520 may be an internal storage unit of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. The memory 520 is used to store the computer program and other programs and data required by the terminal device. The memory 520 may also be used to temporarily store data that has been output or is to be output.
[0181] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0182] The motor control method provided in the embodiment of the present application can be applied to terminal devices such as computers, tablet computers, laptops, netbooks, personal digital assistants (PDAs), etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.
[0183] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0184] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0185] In the embodiments provided in the present application, it should be understood that the disclosed terminal equipment, devices and methods can be implemented in other ways. For example, the terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0186] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0187] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0188] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by one or more processors, the steps of each of the above-mentioned method embodiments can be implemented.
[0189] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by one or more processors, the steps of each of the above-mentioned method embodiments can be implemented.
[0190] Similarly, as a computer program product, when the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0191] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.
[0192] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for controlling a motor, characterized in that: include: When the vehicle changes from a power-off state to a power-on state, obtaining a state of a motor, wherein the motor is a motor having a starting and a power generation function; Determining an operating mode of the motor according to a state of the motor, wherein different states of the motor correspond to different operating modes; The motor is controlled to operate based on the operation mode.
2. The motor control method according to claim 1, characterized in that: Determining the operation mode of the motor according to the state of the motor includes: If the state of the motor is not in the sleep state, prohibit the motor from entering the self-test mode, and determine that the operation mode of the motor is the working mode; or, if no self-test record of the motor in this operation is found, output the self-test error information of the motor; If the state of the motor is a sleep state, it is determined that the operation mode of the motor is the self-test mode.
3. The motor control method according to claim 2, characterized in that: When the operation mode of the motor is a self-test mode, controlling the motor to operate based on the operation mode includes: Controlling the motor to enter the self-test mode; When the motor is in a self-test mode, obtaining a first current speed of the motor; If the first current rotation speed is greater than a preset threshold, the motor is controlled to exit the self-check mode, and the motor is controlled to enter the working mode.
4. The motor control method according to claim 3, characterized in that: After acquiring the first current speed of the motor, the method further includes: If the first current speed is less than or equal to the preset threshold, continue to perform self-test on the motor to obtain a self-test result of the motor; If the self-test result is that the self-test passes, controlling the motor to enter a working mode; If the self-test result is that the self-test fails, the self-test error information of the motor is output.
5. The motor control method according to claim 3 or 4, characterized in that: The preset threshold is determined based on a tolerance of a rotation speed detection sensor of the motor and a vibration parameter of an engine connected to the motor.
6. The motor control method according to claim 3, characterized in that: The controlling the motor to enter the self-test mode comprises: After the power system main relay is in a closed state, the motor is controlled to enter the self-test mode, wherein the power system main relay is respectively connected to the motor and a battery management module in the vehicle, and the motor is powered on after the power system main relay is powered on and closed.
7. The motor control method according to claim 1, characterized in that: When the vehicle changes from a power-off state to a power-on state, before obtaining the state of the motor, the method further includes: Receiving a power-off instruction of the vehicle; Controlling the vehicle to change from a powered-on state to a powered-off state; After the vehicle is powered off, if the state of the power system main relay is in a closed state, the motor is controlled to remain in a non-dormant state, wherein the power system main relay is respectively connected to the motor and a battery management module in the vehicle, and the motor is powered on after the power system main relay is powered on and closed; If the state of the power system main relay is disconnected, the motor is controlled to enter a dormant state.
8. A control device for a motor, characterized in that: include: A first state acquisition module, used for acquiring the state of the motor when the vehicle changes from a power-off state to a power-on state, wherein the motor is a motor with starting and power generation functions; A mode determination module, used to determine the operation mode of the motor according to the state of the motor, wherein different states of the motor correspond to different operation modes; A control module is used to control the operation of the motor based on the operation mode.
9. A vehicle comprising a motor, a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for controlling the motor according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for controlling the motor according to any one of claims 1 to 7 is implemented.