Band-type brake failure protection method and motor controller
The motor controller calculates the position information of the motor rotor in real time and switches the control mode, which solves the risk of vehicle rolling downhill caused by electromagnetic brake failure and ensures safe and stable parking of the vehicle.
Patent Information
- Application Number
- CN202510839563.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-16
AI Technical Summary
The electromagnetic brake may fail during long-term operation of an electric forklift, resulting in the risk of the vehicle sliding or losing control when climbing or descending a slope.
The motor controller receives the stop command from the vehicle controller, converts the voltage signal of the position sensor into an orthogonal pulse signal, calculates the position information of the motor rotor in real time, and switches to the position control mode when the position difference exceeds the preset value to keep the motor rotor stationary.
It effectively prevents the vehicle from sliding downhill or losing control, improves vehicle safety, and keeps the vehicle controllable when the brakes fail.
Smart Images

Figure CN120658143A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor control, and in particular to a brake failure protection method and a motor controller. Background Art
[0002] With the increasing popularity of Class III electric forklifts, their operating conditions are becoming increasingly complex, and various safety protection features are becoming increasingly important in different working scenarios. Among them, the electromagnetic brake of the traction motor provides braking force to keep the vehicle stationary when it stops.
[0003] However, during long-term operation of an electric forklift, the gears and friction plates on the inner wall of the electromagnetic brake will wear out as the electromagnetic brake is constantly opened and closed. This may cause the electromagnetic brake to fail to lock the motor, which is called electromagnetic brake failure. If the electromagnetic brake fails while the vehicle is climbing or descending a slope, there is a risk of the vehicle sliding down the slope or even losing control. Summary of the Invention
[0004] The present invention provides a brake failure protection method and a motor controller, which are used to solve the problem in the prior art that a vehicle loses control when an electromagnetic brake fails.
[0005] In a first aspect, the present application provides a brake failure protection method, the method comprising:
[0006] After receiving the stop command sent by the vehicle controller, the motor controller sends a brake control signal to the electromagnetic brake;
[0007] The motor controller converts the voltage signal representing the motor rotor position information sent by the position sensor into an orthogonal pulse signal;
[0008] The motor controller calculates the position information of the motor rotor in real time based on the number of orthogonal pulses and the preset number of pulses, wherein the number of orthogonal pulses is obtained by sampling the orthogonal pulse signal;
[0009] When the motor controller determines that the difference between the second position information and the first position information is greater than a preset value, the motor controller switches the motor control algorithm from the speed control mode to the position control mode, wherein the first position information is the position information after receiving the closing signal and delayed for a first predetermined time, and the second position information is the position information after recording the first position information and delayed for a second predetermined time.
[0010] In a possible implementation, before the motor controller calculates the position information of the motor rotor, the method further includes:
[0011] The motor controller samples the orthogonal pulse signal using a preset frequency multiplication factor to obtain the number of orthogonal pulses.
[0012] In one possible implementation, the motor controller calculates the position information of the motor rotor in real time based on the number of orthogonal pulses and the preset number of pulses, including:
[0013] After the motor controller calculates a first product of the preset number of pulses and the preset frequency multiplication number, it calculates a ratio of the number of collected orthogonal pulses to the first product;
[0014] The motor controller multiplies the ratio by a second product of a preset degree as the position information.
[0015] In a possible implementation, after the motor controller sends the brake control signal to the electromagnetic brake, the method further includes:
[0016] The motor controller starts an internal timer and uses the timed time as the second predetermined time.
[0017] In a possible implementation, before the motor controller switches the motor control algorithm from the speed control mode to the position control mode, the motor controller further includes:
[0018] The motor controller uses the second position information as a target position for position control;
[0019] The motor controller switches the motor control algorithm from a speed control mode to a position control mode, including:
[0020] The motor controller compares the target position with actual position information to obtain a position error signal, wherein the actual position information is output by a position and speed calculator;
[0021] The motor controller obtains a speed target value based on the position error signal;
[0022] The motor controller controls the rotation speed of the motor based on the speed target value.
[0023] In a possible implementation, after the motor controller uses the second position information as the target position for position control and before switching the motor control algorithm from the speed control mode to the position control mode, the method further includes:
[0024] The motor controller sets the brake failure flag.
[0025] In a possible implementation, after the motor controller sets the brake failure flag, the process further includes:
[0026] The motor controller sends a set brake failure flag to the vehicle controller, and after receiving the set brake failure flag, the vehicle controller sends a speed instruction to the motor controller;
[0027] After receiving the speed instruction sent by the vehicle controller, the motor controller switches the motor control algorithm from the position control mode to the speed control mode.
[0028] In a possible implementation, the orthogonal pulse signal is an AB orthogonal pulse signal.
[0029] In a possible implementation, the first predetermined time is the time from receiving the closing signal to the closing of the circuit breaker being completely locked.
[0030] In a second aspect, the present application further provides a motor controller, comprising:
[0031] processor;
[0032] a memory for storing instructions executable by the processor;
[0033] The processor is configured to execute the instructions to implement the brake failure protection method as described in any one of the first aspects.
[0034] In a third aspect, the present application further provides a motor controller, comprising:
[0035] The transceiver module is used to send a brake control signal to the electromagnetic brake after receiving a stop command from the vehicle controller;
[0036] A conversion module, used to convert the voltage signal representing the motor rotor position information sent by the position sensor into an orthogonal pulse signal;
[0037] a calculation module, configured to calculate position information of a motor rotor in real time based on the number of orthogonal pulses and a preset number of pulses, wherein the number of orthogonal pulses is obtained by sampling the orthogonal pulse signal;
[0038] A switching module is used to switch the motor control algorithm from a speed control mode to a position control mode when it is determined that the difference between the second position information and the first position information is greater than a preset value, wherein the first position information is the position information after receiving the closing signal and delayed by a first predetermined time, and the second position information is the position information after the first position information is recorded and delayed by a second predetermined time.
[0039] In a possible implementation, the motor controller further includes a sampling module;
[0040] Before calculating the position information of the motor rotor, the sampling module is used to sample the orthogonal pulse signal using a preset frequency multiplication number to obtain the number of orthogonal pulses.
[0041] In a possible implementation, the calculation module is specifically configured to:
[0042] After calculating a first product of the preset number of pulses and the preset frequency multiplication number, calculating a ratio of the number of orthogonal pulses to the product;
[0043] A second product of the ratio and the preset degree is used as the position information.
[0044] In a possible implementation, the motor controller further includes a determination module;
[0045] After sending the brake control signal to the electromagnetic brake, the determining module is configured to start an internal timer and use the timed time as the second predetermined time.
[0046] In a possible implementation, before switching the motor control algorithm from the speed control mode to the position control mode, the switching module is further configured to:
[0047] The second position information is used as the target position for position control; the target position is compared with the actual position information to obtain a position error signal, wherein the actual position information is output by a position and speed calculator; a speed target value is obtained based on the position error signal; and the speed of the motor is controlled based on the speed target value.
[0048] In a possible implementation, the motor controller further includes a setting module;
[0049] After the second position information is used as the target position for position control and before the motor control algorithm is switched from the speed control mode to the position control mode, the setting module is configured to set a brake failure flag.
[0050] In a possible implementation, after setting the brake failure flag:
[0051] The transceiver module is further configured to send a set brake failure flag to the vehicle controller, and the vehicle controller sends a speed instruction to the motor controller after receiving the set brake failure flag.
[0052] The switching module is further configured to switch the motor control algorithm from the position control mode to the speed control mode after receiving a speed instruction sent by the vehicle controller.
[0053] In a possible implementation, the position sensor detects the motor rotor position information in real time.
[0054] In a possible implementation, the position sensor periodically sends a voltage signal to the motor controller.
[0055] In a possible implementation, the orthogonal pulse signal is an AB orthogonal pulse signal.
[0056] In a possible implementation, the first predetermined time is the time from receiving the closing signal to the closing of the circuit breaker being completely locked.
[0057] The beneficial effects of the present invention are as follows:
[0058] This application provides a brake failure method and motor controller. Upon receiving a stop command from a vehicle controller, the motor controller sends a brake control signal to an electromagnetic brake. The motor controller then converts a voltage signal representing rotor position information from a position sensor into a quadrature pulse signal. The motor rotor position information is then calculated in real time based on the number of quadrature pulses and a preset number of pulses. The quadrature pulse number is obtained by sampling the quadrature pulse signal. Finally, upon determining that the difference between second position information and first position information is greater than a preset value, the motor controller switches the motor control algorithm from a speed control mode to a position control mode. The first position information is position information obtained after receiving a closing signal and after a first predetermined time delay, and the second position information is position information obtained after recording the first position information and after a second predetermined time delay. In an embodiment of the present application, if the difference between the second position information and the first position information is greater than a preset value, it indicates that the motor rotor has rotated, thus determining that the electromagnetic brake has failed. At this point, the motor control algorithm is switched from a speed control mode to a position control mode, thereby controlling the motor rotor to maintain its current position and remain stationary, thereby preventing the vehicle from rolling down a slope or losing control and improving vehicle safety. The brake failure control method of this application is simple, computationally intensive, and performs real-time position detection. Furthermore, the motor controller of the present application sends a set brake failure flag to the vehicle controller. After the vehicle controller receives the set brake failure flag, it sends a speed instruction to the motor controller. After the motor controller receives the speed instruction sent by the vehicle controller, it switches the motor control algorithm from position control mode to speed control mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0060] Figure 1 Schematic diagram of the motor, electromagnetic brake, and position sensor provided in an embodiment of the present application;
[0061] Figure 2 A schematic flow chart of a brake failure protection method provided in an embodiment of the present application;
[0062] Figure 3 A schematic structural diagram of a vehicle provided in an embodiment of the present application;
[0063] Figure 4 A complete flow chart of a brake failure protection method provided in an embodiment of the present application;
[0064] Figure 5 A waveform diagram of a voltage signal, an AB quadrature pulse signal, and a pulse count provided in an embodiment of the present application;
[0065] Figure 6 A block diagram of a position control mode provided in an embodiment of the present application;
[0066] Figure 7 A schematic diagram of the structure of a motor controller provided in an embodiment of the present application;
[0067] Figure 8 A schematic diagram of the structure of another motor controller provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only some, not all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.
[0069] like Figure 1 As shown in FIG, a schematic diagram of a motor, an electromagnetic brake and a position sensor provided in an embodiment of the present application, wherein the electromagnetic brake is fixed to the rotor shaft at the tail end of the motor, as shown in FIG. Figure 1 Position ① in the middle; Figure 1 A position sensor is embedded in the middle position ②, which can be a rotary transformer; Figure 1 The middle position ③ is the motor body.
[0070] The parking logic of the forklift is as follows: when the permanent magnet synchronous motor controller receives the parking command sent by the vehicle controller, the permanent magnet synchronous motor controller adaptively outputs torque through the speed feedback from the position sensor to control the motor to stop. When the motor speed drops to close to 0RPM, the permanent magnet synchronous motor controller outputs a brake control signal to the electromagnetic brake. After receiving the brake control signal, the electromagnetic brake closes. The motor cannot rotate at this time because the electromagnetic brake is closed. After a delay, the permanent magnet synchronous motor controller cuts off the power supply to the motor, and the forklift parking process ends.
[0071] When the electromagnetic brake is engaged, the motor shaft is mechanically limited, theoretically preventing rotation. However, if the electromagnetic brake fails, the motor shaft will rotate due to external forces. If the electromagnetic brake fails while the forklift is on a slope, gravity will cause it to slide downward, rendering it out of control and extremely dangerous.
[0072] In order to solve the problem that the motor cannot remain stopped after the electromagnetic brake fails, the embodiments of the present application provide a brake failure protection method and a motor controller, which are described in detail below in conjunction with specific embodiments.
[0073] like Figure 2 FIG. 1 is a flow chart of a brake failure protection method provided in an embodiment of the present application, which specifically includes the following steps:
[0074] S201: After receiving a stop command from a vehicle controller, the motor controller sends a brake control signal to the electromagnetic brake;
[0075] S202, the motor controller converts the voltage signal representing the motor rotor position information sent by the position sensor into an orthogonal pulse signal;
[0076] S203, the motor controller calculates the position information of the motor rotor in real time based on the number of orthogonal pulses and the preset number of pulses, wherein the number of orthogonal pulses is obtained by sampling the orthogonal pulse signal;
[0077] S204. When the motor controller determines that the difference between the second position information and the first position information is greater than a preset value, the motor controller switches the motor control algorithm from the speed control mode to the position control mode, wherein the first position information is the position information after receiving the closing signal and delayed by the first predetermined time, and the second position information is the position information after the first position information is recorded and delayed by the second predetermined time.
[0078] In the embodiment of the present application, after receiving a stop command from the vehicle controller, the motor controller sends a brake control signal to the electromagnetic brake, then converts the voltage signal representing the rotor position information sent by the position sensor into an orthogonal pulse signal, and then calculates the position information of the motor rotor in real time based on the number of orthogonal pulses and a preset number of pulses, wherein the number of orthogonal pulses is obtained by sampling the orthogonal pulse signal. Finally, when the motor controller determines that the difference between the second position information and the first position information is greater than a preset value, it switches the motor control algorithm from a speed control mode to a position control mode, wherein the first position information is the position information after receiving the closing signal and after a first predetermined time delay, and the second position information is the position information after the first position information is recorded and after a second predetermined time delay. In the embodiment of the present application, if the difference between the second position information and the first position information is greater than the preset value, it indicates that the motor rotor has rotated, i.e., it is determined that the electromagnetic brake has failed. At this time, the motor control algorithm is switched from the speed control mode to the position control mode, thereby controlling the motor rotor to maintain its current position and remain stationary, thereby preventing the vehicle from sliding or losing control and improving vehicle safety.
[0079] In one embodiment, the motor controller may be a permanent magnet synchronous motor controller, and the orthogonal pulse signal may be an AB orthogonal pulse signal. The following description will be made using the example where the motor controller is a permanent magnet synchronous motor controller and the orthogonal pulse signal is an AB orthogonal pulse signal.
[0080] like Figure 3 As shown, it is a structural schematic diagram of a vehicle provided in an embodiment of the present application, wherein the vehicle includes a vehicle controller, a permanent magnet synchronous motor controller, an electromagnetic brake, a position sensor and a motor, wherein the permanent magnet synchronous motor controller includes an MCU, a brake driver, a decoding module and an inverter bridge.
[0081] like Figure 4 The figure is a complete flow chart of a brake failure protection method provided by an embodiment of the present application. Figure 3 and Figure 4 The implementation of this application is described in detail. The complete process of the brake failure protection method provided in the embodiment of this application specifically includes the following steps:
[0082] S401: The permanent magnet synchronous motor controller outputs a brake control signal to the electromagnetic brake and sets the brake closing flag to the position;
[0083] The electromagnetic brake closes after receiving the brake control signal.
[0084] S402, the permanent magnet synchronous motor controller receives a voltage signal representing motor rotor position information sent by a position sensor;
[0085] In a specific implementation, the position sensor periodically sends a voltage signal to the permanent magnet synchronous motor controller.
[0086] S403, the decoding module in the permanent magnet synchronous motor controller converts the voltage signal representing the motor rotor position information into an AB quadrature pulse signal;
[0087] After the permanent magnet synchronous motor controller receives the voltage signal sent by the position sensor that represents the motor rotor position information, the decoding module in the permanent magnet synchronous motor controller converts the voltage signal received by the permanent magnet synchronous motor controller into an AB orthogonal pulse signal. That is, the permanent magnet synchronous motor controller receives a voltage signal, and the decoding module performs a conversion between the voltage signal and the AB orthogonal pulse signal.
[0088] S404, the MCU in the permanent magnet synchronous motor controller samples the AB orthogonal pulse signal using a quadrature frequency technology to obtain the number of orthogonal pulses x;
[0089] In a specific implementation, the decoding module outputs m pulses every time an electrical cycle passes. Preferably, m=1024. In order to improve the accuracy of angle measurement, the MCU adopts quadrature frequency technology to sample the AB orthogonal pulse signal, that is, sampling is triggered at the rising edge and falling edge of the AB orthogonal pulse signal, thereby generating four counting pulses in each signal cycle of the AB orthogonal pulse signal. The MCU obtains the number of orthogonal pulses x of the AB orthogonal pulse signal, that is, the number of rising edges and falling edges of the AB orthogonal pulse signal.
[0090] S405, the permanent magnet synchronous motor controller calculates the position information of the motor rotor based on the orthogonal pulse number x and the preset pulse number;
[0091] Specifically, the position information of the motor rotor can be calculated according to Formula 1:
[0092]
[0093] Among them, θ is the position information of the motor rotor, x is the number of orthogonal pulses of the AB orthogonal pulse signal obtained by the MCU, and m is the number of pulses output by the decoding module per electrical cycle.
[0094] S406: After the permanent magnet synchronous motor controller outputs a brake control signal to the electromagnetic brake, it starts the internal timer of the MCU and starts timing.
[0095] In the embodiment of the present application, the brake control signal is the closing signal, and the first predetermined time is the time from when the closing signal is received to when the closing is completely locked, that is, the time from when the electromagnetic brake receives the closing signal to when the position of the motor rotor theoretically does not change. After starting the internal timer of the MCU, the real-time position information of the motor rotor is updated and saved in real time.
[0096] After the permanent magnet synchronous motor controller outputs the brake control signal to the electromagnetic brake, the permanent magnet synchronous motor controller starts the internal timer of the MCU, and the internal timer of the MCU starts timing, and the timing time is used as the first predetermined time.
[0097] S407: When the permanent magnet synchronous motor controller determines through the MCU that the timing time of the internal timer is equal to the first predetermined time, the position information calculated at this time is used as the first position information θ1 of the motor rotor, and the first position information θ1 is recorded. After the MCU determines that the first position information θ1 is recorded, the controller determines that the timing time is equal to the second predetermined time, and the position information calculated at this time is used as the second position information θ2 of the motor rotor.
[0098] After the MCU's internal timer is turned on, the MCU determines whether the timed interval is equal to a first predetermined interval. For example, the first predetermined interval is 1 second. After the permanent magnet synchronous motor controller outputs a brake control signal, the MCU's internal timer begins timing. When the timed interval is equal to the first predetermined interval, the position information calculated at this time is used as the first position information θ1 of the motor rotor, and the first position information θ1 is recorded. After recording the first position information θ1, the MCU determines that the timed interval of the internal timer is equal to a second predetermined interval, and the position information calculated at this time is used as the second position information θ2 of the motor rotor.
[0099] For example, the position sensor sends a voltage signal representing the motor rotor position information to the permanent magnet synchronous motor controller every 0.1s. After the permanent magnet synchronous motor controller receives the voltage signal sent by the position sensor each time, the decoding module converts the received voltage signal into an AB orthogonal pulse signal. Then, the MCU samples the AB orthogonal pulse signal using the quadrature frequency technology to obtain the number of orthogonal pulses x. Based on the formula Calculate the position information of the motor rotor; when the internal timer counts to 1s, the permanent magnet synchronous motor controller uses the calculated position information of the motor rotor as the first position information θ1, records the first position information θ1, and the internal timer continues to count. When the internal timer counts to the second predetermined time of 5.1s, the permanent magnet synchronous motor controller uses the calculated position information of the motor rotor θ2 as the second position information.
[0100] It should be noted that after the first location information is recorded, the internal timer can be reset or continue to count after the first predetermined time has been counted. For example, after the first location information is recorded, the internal timer is reset to zero and the second predetermined time of 0.1s is counted again. Alternatively, after the first location information is recorded, the internal timer does not reset to zero and counts the second predetermined time of 5.1s. This embodiment of the present application is not limited to this.
[0101] like Figure 5 As shown in FIG. 1 , a waveform diagram of a voltage signal, an AB quadrature pulse signal and a pulse count provided in an embodiment of the present application is shown. Figure 5 It can be seen that a sine wave corresponds to m A pulses and m B pulses. The time difference of 90 degrees between A pulse and B pulse is called AB orthogonal pulse signal. The square wave period of A pulse and B pulse is the signal period, that is, one sine wave period includes m signal periods.
[0102] Figure 5 In the triangle wave, the first slant line from 0 to 4m corresponds to a complete sine wave. The working principle of pulse counting is: a count is accumulated on each rising and falling edge of the AB orthogonal pulse, so it is accumulated 4 times in one signal cycle and 4m times in one sine wave cycle.
[0103] When the closing signal is received and the first predetermined time is delayed, the sampling time of the MCU corresponds to Figure 5 At X1 in the figure, after the first position information is recorded and delayed for a second predetermined time, that is, the moment of judging whether the motor rotates corresponds to X2. The position of the motor rotor corresponding to X1 is the first position information θ1, and the position of the motor rotor corresponding to X2 is the second position information θ2.
[0104] S408, the permanent magnet synchronous motor controller determines whether the difference between the second position information θ2 and the first position information θ1 is greater than a preset value, if so, executing S409, otherwise ending;
[0105] If the difference between the second position information θ2 and the first position information θ1 is greater than a preset value, it is determined that the motor shaft has rotated; if the difference between the second position information θ2 and the first position information θ1 is less than or equal to the preset value, it is determined that the motor shaft has not rotated.
[0106] Under normal circumstances, depending on the characteristics of the electromagnetic brake, the motor shaft will not rotate after the electromagnetic brake is closed. Therefore, if the motor shaft rotates after the electromagnetic brake is closed, it is determined that the brake is invalid. The real-time position information at this time is recorded as the second position information θ2, which is used for the target position θ of the position control. ref .
[0107] S409: The permanent magnet synchronous motor controller uses the second position information θ2 as the target position θ for position control. ref and set the brake failure flag to the 1st position;
[0108] S410: After the permanent magnet synchronous motor controller determines that the brake failure flag is set, it switches the motor control algorithm from the speed control mode to the position control mode;
[0109] like Figure 6As shown in the figure, in position control mode, the position control loop is added to the motor control algorithm. The speed target value ωref is not obtained from the vehicle controller, but instead is obtained through the position control loop. Specifically, the second position information θ2 is input into the target position θref of the position control loop. The operator in the position control loop subtracts the target position θref from the actual position θ to obtain a position error signal. The actual position θ is output from the position and speed calculator. The position error signal outputs the speed target value ωref to the speed regulator via the PI regulator.
[0110] The position control mode controls the motor output torque through the three-loop control algorithm of position loop, speed loop and current loop, controls the motor to keep stationary, keeps the forklift in place, and prevents the forklift from moving unexpectedly.
[0111] S411: After the permanent magnet synchronous motor controller determines that the brake failure flag is set, it sends the command to the vehicle controller via bus communication. After the vehicle controller receives the set brake failure flag, it sends a speed command to the permanent magnet synchronous motor controller.
[0112] S412: After the speed regulator in the permanent magnet synchronous motor controller receives a speed instruction from the vehicle controller, the permanent magnet synchronous motor controller switches from a position control mode to a speed control mode.
[0113] The permanent magnet synchronous motor controller switches from position control mode to speed control mode. The position control loop exits motor control and outputs torque through the speed loop and current loop to control the vehicle to move to a safe zone. Therefore, even in the brake failure state, the vehicle is always in a controllable state for the driver. This method effectively protects the driver and the vehicle and improves vehicle safety.
[0114] In a specific implementation, the position sensor can be a rotating transformer, and the voltage signal output by the position sensor is a sinusoidal voltage. The sinusoidal voltage is output to the decoding module of the permanent magnet synchronous motor controller. After receiving the sinusoidal voltage, the decoding module converts the sinusoidal voltage and outputs an AB orthogonal pulse signal. The decoding module outputs the converted AB orthogonal pulse signal to the MCU of the permanent magnet synchronous motor controller. The MCU solves the AB orthogonal pulse signal into angle information and speed information, wherein the angle information is the position information of the motor rotor in the above embodiment.
[0115] In this embodiment, the resolver outputs AB quadrature pulse signals through hard decoding, and the permanent magnet synchronous motor controller calculates the motor speed by sampling the number of AB quadrature pulse signals per unit time. The angle information is calculated by the number of AB quadrature pulse signals output per motor rotation. For example, if the motor produces 1024 pulses per rotation and the angle of the motor is 360 degrees, then 512 pulses correspond to 180 degrees.
[0116] Based on the same inventive concept, an embodiment of the present application also provides a motor controller. The principle of the motor controller in solving the technical problem is similar to the principle of the above-mentioned brake failure protection method in solving the technical problem, and the repeated parts will not be repeated.
[0117] like Figure 7 FIG. 1 is a schematic diagram of a motor controller according to an embodiment of the present invention, wherein the motor controller includes:
[0118] Processor 701;
[0119] a memory 702 for storing instructions executable by the processor;
[0120] In which, the processor is configured to execute the instructions to send a brake control signal to the electromagnetic brake after receiving a parking command sent by the vehicle controller; convert the voltage signal sent by the position sensor representing the motor rotor position information into an orthogonal pulse signal; calculate the position information of the motor rotor in real time based on the number of orthogonal pulses and the preset number of pulses, wherein the number of orthogonal pulses is obtained by sampling the orthogonal pulse signal; when it is determined that the difference between the second position information and the first position information is greater than the preset value, switch the motor control algorithm from the speed control mode to the position control mode, wherein the first position information is the position information after the closing signal is received and delayed for a first predetermined time, and the second position information is the position information after the first position information is recorded and delayed for a second predetermined time.
[0121] In one embodiment, before the motor controller calculates the position information of the motor rotor, the processor 701 is further configured to:
[0122] The orthogonal pulse signal is sampled using a preset frequency multiplication number to obtain the number of orthogonal pulses.
[0123] In one embodiment, the processor 701 is specifically configured to:
[0124] After calculating the first product of the preset number of pulses and the preset frequency multiplication number, calculate the ratio of the collected number of orthogonal pulses and the first product; and use the ratio and the second product of the preset degree as the position information.
[0125] In one embodiment, after sending the brake control signal to the electromagnetic brake, the processor 701 is further configured to:
[0126] Start the internal timer and use the timed time as the second predetermined time.
[0127] In one embodiment, before switching the motor control algorithm from the speed control mode to the position control mode, the processor 701 is further configured to:
[0128] using the second position information as a target position for position control;
[0129] The processor 701 is specifically configured to:
[0130] The target position is compared with actual position information to obtain a position error signal, wherein the actual position information is output by a position and speed calculator; a speed target value is obtained based on the position error signal; and the speed of the motor is controlled based on the speed target value.
[0131] In one embodiment, after using the second position information as the target position for position control and before switching the motor control algorithm from the speed control mode to the position control mode, the processor 701 is further configured to set a brake failure flag.
[0132] In one embodiment, after setting the brake failure flag, the processor 701 is further configured to:
[0133] Sending a set brake failure flag to the vehicle controller, and after the vehicle controller receives the set brake failure flag, sending a speed instruction to the motor controller; after receiving the speed instruction sent by the vehicle controller, switching the motor control algorithm from the position control mode to the speed control mode.
[0134] In one embodiment, the orthogonal pulse signal is an AB orthogonal pulse signal.
[0135] In one embodiment, the first predetermined time is the time from receiving the closing signal to the closing of the circuit breaker being completely locked.
[0136] Based on the same inventive concept, an embodiment of the present application also provides a motor controller. The principle of the motor controller in solving the technical problem is similar to the principle of the above-mentioned brake failure protection method in solving the technical problem, and the repeated parts will not be repeated.
[0137] like Figure 8 FIG. 1 is a schematic diagram of a motor controller according to an embodiment of the present invention, comprising:
[0138] The transceiver module 801 is used to send a brake control signal to the electromagnetic brake after receiving a stop command sent by the vehicle controller;
[0139] The conversion module 802 is used to convert the voltage signal representing the motor rotor position information sent by the position sensor into an orthogonal pulse signal;
[0140] A calculation module 803 is configured to calculate the position information of the motor rotor in real time based on the number of orthogonal pulses and a preset number of pulses, wherein the number of orthogonal pulses is obtained by sampling the orthogonal pulse signal;
[0141] The switching module 804 is used to switch the motor control algorithm from the speed control mode to the position control mode when it is determined that the difference between the second position information and the first position information is greater than a preset value, wherein the first position information is the position information after the closing signal is received and delayed for a first predetermined time, and the second position information is the position information after the first position information is recorded and delayed for a second predetermined time.
[0142] In one embodiment, the motor controller further includes a sampling module;
[0143] Before calculating the position information of the motor rotor, the sampling module is used to sample the orthogonal pulse signal using a preset frequency multiplication number to obtain the number of orthogonal pulses.
[0144] In one embodiment, the calculation module is specifically configured to:
[0145] After calculating a first product of the preset number of pulses and the preset frequency multiplication number, calculating a ratio of the number of orthogonal pulses to the product;
[0146] A second product of the ratio and the preset degree is used as the position information.
[0147] In one embodiment, the motor controller further includes a determination module;
[0148] After sending the brake control signal to the electromagnetic brake, the determining module is configured to start an internal timer and use the timed time as the second predetermined time.
[0149] In one embodiment, before switching the motor control algorithm from the speed control mode to the position control mode, the switching module is further configured to:
[0150] The second position information is used as the target position for position control; the target position is compared with the actual position information to obtain a position error signal, wherein the actual position information is output by a position and speed calculator; a speed target value is obtained based on the position error signal; and the speed of the motor is controlled based on the speed target value.
[0151] In one embodiment, the motor controller further includes a setting module;
[0152] After the second position information is used as the target position for position control and before the motor control algorithm is switched from the speed control mode to the position control mode, the setting module is configured to set a brake failure flag.
[0153] In one embodiment, after setting the brake failure flag:
[0154] The transceiver module is further configured to send a set brake failure flag to the vehicle controller, and the vehicle controller sends a speed instruction to the motor controller after receiving the set brake failure flag.
[0155] The switching module is further configured to switch the motor control algorithm from the position control mode to the speed control mode after receiving a speed instruction sent by the vehicle controller.
[0156] In a possible implementation, the position sensor detects the motor rotor position information in real time.
[0157] In a possible implementation, the position sensor periodically sends a voltage signal to the motor controller.
[0158] In one embodiment, the orthogonal pulse signal is an AB orthogonal pulse signal.
[0159] In a possible implementation, the first predetermined time is the time from receiving the closing signal to the closing of the circuit breaker being completely locked.
[0160] The present application provides a brake failure method and motor controller. After receiving a stop command from a vehicle controller, the motor controller sends a brake control signal to the electromagnetic brake. The motor controller then converts a voltage signal representing rotor position information sent by a position sensor into an orthogonal pulse signal. The motor rotor position information is then calculated in real time based on the number of orthogonal pulses and a preset number of pulses. The number of orthogonal pulses is obtained by sampling the orthogonal pulse signal. Finally, if the motor controller determines that the difference between the second position information and the first position information is greater than a preset value, the motor control algorithm switches from a speed control mode to a position control mode. The first position information is the position information after receiving the closing signal and delayed by a first predetermined time, and the second position information is the position information after recording the first position information and delayed by a second predetermined time. In an embodiment of the present application, if the difference between the second position information and the first position information is greater than the preset value, it indicates that the motor rotor has rotated, i.e., the electromagnetic brake is determined to have failed. At this time, the motor control algorithm is switched from the speed control mode to the position control mode, thereby controlling the motor rotor to maintain its current position and remain stationary, thereby preventing the vehicle from sliding or losing control and improving vehicle safety.
[0161] In addition, the brake failure control of the present application is simple, requires little computation, and performs real-time position detection. Furthermore, the motor controller of the present application sends a set brake failure flag to the vehicle controller. Upon receiving the set brake failure flag, the vehicle controller sends a speed command to the motor controller. Upon receiving the speed command from the vehicle controller, the motor controller switches the motor control algorithm from position control mode to speed control mode.
[0162] The present application is described above with reference to block diagrams and / or flow charts illustrating methods, apparatus (systems) and / or computer program products according to embodiments of the present application. It should be understood that a block of a block diagram and / or flow chart, as well as a combination of blocks of a block diagram and / or flow chart, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer and / or other programmable data processing device to produce a machine such that instructions executed by the computer processor and / or other programmable data processing device create a method for implementing the functions / actions specified in the block diagram and / or flow chart block.
[0163] Accordingly, the present application may also be implemented using hardware and / or software (including firmware, resident software, microcode, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in conjunction with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, transmit, or convey a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0164] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A brake failure protection method, characterized in that: The method includes: After receiving the stop command sent by the vehicle controller, the motor controller sends a brake control signal to the electromagnetic brake; The motor controller converts the voltage signal representing the motor rotor position information sent by the position sensor into an orthogonal pulse signal; The motor controller calculates the position information of the motor rotor in real time based on the number of orthogonal pulses and the preset number of pulses, wherein the number of orthogonal pulses is obtained by sampling the orthogonal pulse signal; When the motor controller determines that the difference between the second position information and the first position information is greater than a preset value, the motor controller switches the motor control algorithm from the speed control mode to the position control mode, wherein the first position information is the position information after receiving the closing signal and delayed by the first predetermined time, and the second position information is the position information after the first position information is recorded and delayed by the second predetermined time.
2. The method according to claim 1, wherein Before the motor controller calculates the position information of the motor rotor, the method further includes: The motor controller samples the orthogonal pulse signal using a preset frequency multiplication factor to obtain the number of orthogonal pulses.
3. The method according to claim 2, wherein The motor controller calculates the position information of the motor rotor in real time based on the number of orthogonal pulses and the preset number of pulses, including: After the motor controller calculates a first product of the preset number of pulses and the preset frequency multiplication number, it calculates a ratio of the number of collected orthogonal pulses to the first product; The motor controller multiplies the ratio by a second product of a preset degree as the position information.
4. The method according to claim 1, wherein After the motor controller sends a brake control signal to the electromagnetic brake, the method further includes: The motor controller starts an internal timer and uses the timed time as the second predetermined time.
5. The method according to claim 1, wherein Before the motor controller switches the motor control algorithm from the speed control mode to the position control mode, the motor controller further includes: The motor controller uses the second position information as a target position for position control; The motor controller switches the motor control algorithm from a speed control mode to a position control mode, including: The motor controller compares the target position with actual position information to obtain a position error signal, wherein the actual position information is output by a position and speed calculator; The motor controller obtains a speed target value based on the position error signal; The motor controller controls the rotation speed of the motor based on the speed target value.
6. The method according to claim 5, wherein After the motor controller uses the second position information as the target position for position control and before switching the motor control algorithm from the speed control mode to the position control mode, the motor controller further includes: The motor controller sets the brake failure flag.
7. The method according to claim 6, wherein After the motor controller sets the brake failure flag, the further step includes: The motor controller sends a set brake failure flag to the vehicle controller, and after receiving the set brake failure flag, the vehicle controller sends a speed instruction to the motor controller; After receiving the speed instruction sent by the vehicle controller, the motor controller switches the motor control algorithm from the position control mode to the speed control mode.
8. The method according to any one of claims 1 to 7, wherein: The orthogonal pulse signal is an AB orthogonal pulse signal.
9. The method according to any one of claims 1 to 7, wherein: The first predetermined time is the time from receiving the closing signal to the closing of the circuit breaker being completely locked.
10. A motor controller, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the brake failure protection method according to any one of claims 1 to 8.
11. A motor controller, characterized in that: include: The transceiver module is used to send a brake control signal to the electromagnetic brake after receiving a stop command from the vehicle controller; A conversion module, used to convert the voltage signal representing the motor rotor position information sent by the position sensor into an orthogonal pulse signal; a calculation module, configured to calculate position information of a motor rotor in real time based on the number of orthogonal pulses and a preset number of pulses, wherein the number of orthogonal pulses is obtained by sampling the orthogonal pulse signal; A switching module is used to switch the motor control algorithm from a speed control mode to a position control mode when it is determined that the difference between the second position information and the first position information is greater than a preset value, wherein the first position information is the position information after receiving the closing signal and delayed for a first predetermined time, and the second position information is the position information after the first position information is recorded and delayed for a second predetermined time.
12. The motor controller according to claim 11, wherein: Also includes sampling module; Before calculating the position information of the motor rotor, the sampling module is used to sample the orthogonal pulse signal using a preset frequency multiplication number to obtain the number of orthogonal pulses.
13. The motor controller according to claim 12, wherein: The calculation module is specifically used for: After calculating a first product of the preset number of pulses and the preset frequency multiplication number, calculating a ratio of the number of collected orthogonal pulses to the first product; A second product of the ratio and the preset degree is used as the position information.
14. The motor controller according to claim 11, wherein: Also included is a determination module; After sending the brake control signal to the electromagnetic brake, the determining module is configured to start an internal timer and use the timed time as the second predetermined time.
15. The motor controller according to claim 11, wherein: Before switching the motor control algorithm from the speed control mode to the position control mode, the switching module is further configured to: The second position information is used as the target position for position control; the target position is compared with the actual position information to obtain a position error signal, wherein the actual position information is output by a position and speed calculator; a speed target value is obtained based on the position error signal; and the speed of the motor is controlled based on the speed target value.
16. The motor controller according to claim 15, wherein: Also includes a set module; After the second position information is used as the target position for position control and before the motor control algorithm is switched from the speed control mode to the position control mode, the setting module is configured to set a brake failure flag.
17. The motor controller according to claim 16, wherein: After setting the brake failure flag: The transceiver module is further configured to send a set brake failure flag to the vehicle controller, and the vehicle controller sends a speed instruction to the motor controller after receiving the set brake failure flag. The switching module is further configured to switch the motor control algorithm from the position control mode to the speed control mode after receiving a speed instruction sent by the vehicle controller.
18. The motor controller according to claim 11, wherein: The position sensor detects the motor rotor position information in real time.
19. The motor controller according to claim 18, wherein: The position sensor periodically sends a voltage signal to the motor controller.
20. The motor controller according to any one of claims 11 to 19, wherein: The orthogonal pulse signal is an AB orthogonal pulse signal.
21. The motor controller according to any one of claims 11 to 19, wherein: The first predetermined time is the time from receiving the closing signal to the closing of the circuit breaker being completely locked.