Intelligent door lock, motor control method and device thereof and medium
By using an absolute magnetic encoder and current sensor to acquire process data in smart door locks, and combining it with a standard angle current model, the problem of the inability to monitor the movement of the bolt in existing technologies is solved, enabling precise control and fault diagnosis, and improving energy efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-10
AI Technical Summary
Existing smart door locks rely on end position detection to control the movement of the bolt, which cannot monitor the bolt movement process in real time. This results in coarse control logic, increased energy consumption and wear, and an inability to identify potential faults.
An absolute magnetic encoder and a current sensor are used to obtain the absolute angular position and real-time operating current of the motor. The results are then analyzed using a standard angular current model to achieve precise control of the bolt movement.
It achieves precise judgment of the bolt position, reduces energy consumption, extends the battery life of battery-powered door locks, and has fault diagnosis capabilities, thereby improving product reliability and user experience.
Smart Images

Figure CN121643569A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent control, and in particular to an intelligent door lock and its motor control method, device and medium. Background Technology
[0002] Most mainstream smart locks currently rely on Hall effect sensors or photoelectric sensors to detect the final position of the bolt when controlling its movement. The core principle of this approach is to determine whether the lock / unlock operation is complete by sensing when the bolt reaches a preset point of full extension or retraction. Based on this, a current sensor is used to monitor the motor's operating current to prevent the motor from burning out due to stalling.
[0003] However, this end-position detection-based technical solution has inherent limitations. Since Hall effect sensors or photoelectric sensors can only provide effective switching signals at the start and end points of the bolt's movement trajectory, they cannot monitor the entire movement process of the bolt from start to end. This results in the acquired data essentially being two discrete state points, namely the start and end, while continuous process quantities such as the intermediate states during the bolt's movement, like the real-time rotation angle of the motor or changes in load at different angles, cannot be effectively collected and analyzed.
[0004] This lack of awareness of process parameters directly leads to coarse control logic. Smart locks cannot accurately determine the actual position of the bolt at any given instant, nor can they identify changes in resistance during movement. Therefore, to ensure the bolt reliably reaches its final position, control strategies tend to be conservative, instructing the motor to continue operating for an additional time or angle after the sensor detects the bolt's position, to overcome potential transmission gaps or minor resistance. This drive beyond the necessary travel is called dead-zone drive or idling stroke. This idling stroke not only wastes electrical energy, significantly shortening the battery life of battery-powered locks, but also increases unnecessary wear on the motor and transmission mechanism. Furthermore, due to the inability to sense process resistance, it is difficult to diagnose and warn of potential faults such as bolt movement sluggishness or slight misalignment during installation. Summary of the Invention
[0005] The primary objective of this application is to solve at least one of the aforementioned problems by providing an intelligent door lock and its motor control method, device, and medium.
[0006] To achieve the various objectives of this application, the following technical solution is adopted: A smart door lock motor control method provided for one of the purposes of this application includes the following steps: Acquire process quantity data generated by the motor of the current smart door lock during the process of driving the bolt actuator. The process quantity data includes the absolute angular position and real-time operating current of the motor. By applying a preset standard angle current model, the instantaneous execution state of the motor is determined based on the process quantity data. The standard angle current model is used to characterize the correspondence between the absolute angle position and the real-time operating current of the current smart door lock under normal working conditions. The corresponding motor-associated control command is triggered based on the real-time execution status.
[0007] A smart door lock motor control device, proposed to meet one of the objectives of this application, includes: The data acquisition module is configured to acquire process quantity data generated by the motor of the current smart door lock during the process of driving the bolt actuator. The process quantity data includes the absolute angular position and real-time operating current of the motor. The state determination module is configured to apply a preset standard angle current model to determine the instantaneous execution state of the motor based on the process quantity data. The standard angle current model is used to characterize the correspondence between the absolute angle position and the real-time operating current of the smart door lock under normal working conditions. The instruction triggering module is configured to trigger the corresponding motor-associated control instruction based on the real-time execution status.
[0008] On another note, a smart lock provided for one of the purposes of this application includes: Motor, latch actuator, absolute magnetic encoder, current sensor and microcontroller unit; The output shaft of the motor is connected to the latch actuator for driving the latch to extend or retract; the sensing part of the absolute magnetic encoder is coaxially fixedly connected to the output shaft of the motor or the drive shaft of the actuator for detecting the rotation angle of the corresponding shaft and outputting the absolute angular position; the current sensor is connected in series in the power supply circuit of the motor for collecting the real-time operating current of the motor. The microcontroller unit is electrically connected to the absolute magnetic encoder and the current sensor, respectively, and is configured to: receive and synchronize the absolute angle position signal and the real-time operating current signal to form process quantity data; apply a preset standard angle current model and determine the instantaneous operating state of the motor based on the process quantity data; and generate and output corresponding motor-associated control commands to the motor according to the instantaneous operating state. In another aspect, a smart door lock provided to meet one of the purposes of this application includes a processor and a memory, wherein the processor calls and runs a computer program in the memory to execute the steps of the smart door lock motor control method.
[0009] On another aspect, a computer-readable storage medium is provided to suit another purpose of this application, which stores in the form of computer-readable instructions a computer program implemented according to the intelligent door lock motor control method, which, when called by a computer, executes the steps included in the corresponding method.
[0010] The technical solution provided in this application effectively overcomes the shortcomings of traditional methods that rely solely on end-position detection by acquiring two process quantities: the absolute angular position and the real-time operating current generated by the motor during the driving of the latch actuator. This data is then analyzed using a pre-defined standard angular current model. Since the absolute angular position provides continuous tracking of the latch movement process, and the real-time operating current reflects load changes, the judgment of the motor's and even the entire latch actuator's operating state is no longer limited to two discrete points: the starting and ending points.
[0011] This fundamental improvement brings several beneficial effects. First, based on the correspondence model between absolute angular position and real-time operating current, it enables precise judgment of the moment when the bolt is effectively locked. For example, when the model detects that the motor has rotated to a specific angle and the current reaches its peak, it can determine that the bolt is effectively locked, thus immediately stopping the motor. This completely avoids the unnecessary travel of the motor idling in traditional solutions to ensure reliability, significantly reducing energy consumption per lock / unlock operation, and effectively extending the battery life of battery-powered smart locks.
[0012] Furthermore, the ability to acquire angle and current data throughout the entire movement process enhances the ability to perceive the door lock's status. By comparing real-time data with the standard model, anomalies can also be identified. For example, if the operating current consistently exceeds the normal fluctuation range in the model within a specific angle range, it may indicate a risk of structural jamming at that location. This continuous monitoring of process quantities enables early fault diagnosis, allowing for timely prompts for user maintenance and improving product reliability and user experience. Attached Figure Description
[0013] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a schematic diagram illustrating the electrical structure of the smart door lock described in this application. Figure 2 This is a flowchart illustrating a typical embodiment of the intelligent door lock motor control method of this application; Figure 3 This is a schematic block diagram of the intelligent door lock motor control device of this application; Figure 4This is a schematic diagram of the structure of a computer device used in this application. Detailed Implementation
[0014] The technical solution of this application will now be clearly and completely described with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0015] Figure 1 An electrical block diagram of an embodiment of a smart door lock according to this application is shown. As shown, the smart door lock includes a microcontroller unit 11, a motor 14, a latch actuator 15, an absolute magnetic encoder 12, and a current sensor 13. The microcontroller unit 11, as the core control component, contains a processor and a memory. The motor 14, as the drive component, has its output shaft connected to the latch actuator 15 via a mechanical transmission component. The absolute magnetic encoder 12 includes a sensing element and a signal processing circuit; its sensing element is coaxially and fixedly connected to the output shaft of the motor 14 or the transmission shaft of the latch actuator 15. The current sensor 13 is a current detection device connected in series in the power supply circuit of the motor 14.
[0016] In terms of electrical connections, the microcontroller unit 11 is connected to the absolute magnetic encoder 12 and the current sensor 13 via electrical circuits to receive signals from them. Simultaneously, the microcontroller unit 11 is connected to the motor 14 via a drive circuit to send control commands to the motor 14. The absolute magnetic encoder 12 detects the rotation angle of its coaxially connected shaft in real time and transmits a signal representing the absolute angular position to the microcontroller unit 11. The current sensor 13 detects the operating current flowing through the motor 14 in real time and transmits a signal representing the real-time operating current to the microcontroller unit 11.
[0017] The entire circuit operates as follows: The microcontroller unit 11 generates commands to control the rotation direction and start / stop of the motor 14 according to user instructions or automatic logic. The motor 14 rotates according to the commands, driving the latch actuator 15 via a transmission mechanism, thereby extending or retracting the latch. During this process, the absolute magnetic encoder 12 continuously provides precise angular information about the latch's position during its travel, while the current sensor 13 continuously provides current information indicating the load on the motor 14. The microcontroller unit 11 simultaneously acquires these two types of information, forming process data, and processes and judges it according to predetermined control logic to determine the real-time execution state of the motor 14, thereby adjusting the control of the motor 14 based on the real-time execution state.
[0018] The computer program used to implement the intelligent door lock motor 14 control method of this application can be stored in the memory of the microcontroller unit 11 and loaded and run by the processor of the microcontroller unit 11. The program is configured to perform steps including acquiring process quantity data, applying a standard angle current model to determine the instantaneous execution state, and triggering control commands according to the instantaneous execution state.
[0019] Process data refers to the dynamic data generated during the process of motor 14 driving the latch actuator 15, including absolute angular position and real-time operating current. The absolute angular position is an angle value provided by absolute magnetic encoder 12, uniquely determining the specific position of motor 14 or latch in the motion cycle. The real-time operating current is a current value provided by current sensor 13, reflecting the instantaneous load on motor 14. The standard angular current model is a data model pre-established and stored in microcontroller unit 11, used to characterize the correspondence between absolute angular position and real-time operating current under normal operating conditions. In one embodiment, this model can be represented as a data lookup table. In another embodiment, the model can be represented as a mathematical fitting function and can be constructed based on a machine learning model.
[0020] In conclusion, Figure 1 The system architecture shown provides the hardware foundation for implementing the intelligent door lock motor control method described in this application. The following sections will elaborate on various specific implementation methods of this application in conjunction with this architecture.
[0021] Please see Figure 2 In some embodiments, the smart door lock motor control method of this application can be implemented as an application program running in the microprocessor unit of the smart door lock. The method includes: Step S3100: Obtain process quantity data generated by the motor of the current smart door lock during the process of driving the bolt actuator. The process quantity data includes the absolute angular position and real-time operating current of the motor. When a smart lock responds to a user's control command via fingerprint, password, proximity card, or remote application, or initiates the locking / unlocking process based on automatic logic such as timed tasks, its microcontroller sends a drive signal to the motor. The motor then begins to rotate, driving the bolt actuator through the transmission mechanism. From the moment the motor starts, it begins to acquire process quantity data reflecting the dynamic characteristics of the current driving process in real time.
[0022] The process data mainly includes the absolute angular position of the motor and the real-time operating current. The absolute angular position refers to the angle value that uniquely determines the specific orientation of the motor output shaft or the coaxial latch actuator drive shaft within a complete rotation cycle; it is also called the rotation angle. This value is detected and provided in real time by an absolute magnetic encoder. In one embodiment, the sensing part of the absolute magnetic encoder, such as a permanent magnet, is directly fixed to the motor's output shaft and rotates with it. The encoder chip below it detects changes in the magnetic field direction and outputs a digital signal representing the absolute angle, which is provided to the microcontroller unit for analysis and extraction of the absolute angular position. In another embodiment, to more accurately reflect the actual position of the latch, the sensing part can be mounted on the drive shaft of the latch actuator.
[0023] Real-time operating current refers to the instantaneous value of the current flowing through the motor armature winding, which is obtained by sampling from a current sensor connected in series in the motor power supply circuit. This current sensor can directly measure the operating current flowing through the motor winding. In one embodiment, the current sensor can be a Hall current sensor, which calculates the current value by detecting the magnetic field strength generated by the current. In another embodiment, a sampling resistor combined with a differential amplifier circuit can also be used. The microcontroller unit performs analog-to-digital conversion and acquisition on the signal output by the current sensor at a certain sampling frequency, for example, 1,000 times per second, thereby obtaining a series of discrete, time-sequentially arranged real-time operating current data. The current sensor amplifies the detected small signal and converts it into a voltage or digital signal that the microcontroller unit can read, thereby obtaining the corresponding real-time operating current through the analysis and conversion by the microcontroller unit. Its sampling frequency must be sufficient to capture the dynamic changes of the current.
[0024] The microcontroller unit (MCU) ensures synchronous data acquisition from the absolute magnetic encoder and current sensor through its built-in timer or interrupt mechanism. In one implementation, the MCU simultaneously reads the values corresponding to the absolute angular position and real-time operating current at fixed time intervals, and timestamps each set of data. In another implementation, the absolute magnetic encoder can trigger an interrupt when a specific minimum increment in angle occurs, and the MCU reads the current current value in the interrupt service routine. Through time synchronization, the absolute angular position acquired at the same moment is bound to the real-time operating current value, forming a complete process quantity data point. As the motor runs, multiple such data points acquired continuously constitute a process quantity data sequence for subsequent analysis.
[0025] Step S3200: Apply a preset standard angle current model to determine the instantaneous execution state of the motor based on the process quantity data. The standard angle current model is used to characterize the correspondence between the absolute angle position and the real-time operating current of the current smart door lock under normal working conditions. After the microcontroller unit obtains the process data, it can begin to analyze and process the data using a preset standard angle current model to determine the motor's real-time execution state. The standard angle current model can be a data reference benchmark pre-established and stored in the microcontroller unit's memory. It characterizes the correspondence between the absolute angular position of the motor and the real-time operating current during the full stroke of the driving bolt, under ideal operating conditions of normal installation and no mechanical structural faults. Essentially, this model abstracts normal operating characteristics into a queryable mapping relationship.
[0026] In one embodiment, the standard angle current model can be represented as a data lookup table structure. The model is established by pre-collecting a large number of data samples from multiple smart door locks of the same model operating under standard installation and normal working conditions, and then performing statistical analysis such as noise reduction and averaging. Specifically, the absolute angle positions in the collected data samples are discretized at a specific resolution and used as index values for the lookup table. For each angle point corresponding to the index value, the average operating current of all data samples at that angle point is calculated as the standard operating current reference value for that angle. Simultaneously, the standard deviation of these operating currents is calculated, and a reasonable fluctuation range, such as 1 or 2 times the tolerance, is set based on this standard deviation as the normal current fluctuation range for that angle, i.e., the tolerance band. Finally, this data set consisting of the angle index, the standard operating current reference value, and the normal current fluctuation range forms the standard angle current model. When the microcontroller unit is used, it can obtain the corresponding standard reference value and normal fluctuation range by querying this table based on the real-time acquired absolute angle position.
[0027] After determining the specific form of the standard angle current model as a data lookup table, the microcontroller unit executes the state determination logic. Specifically, it can look up the preset standard angle current model based on the absolute angle position in the process quantity data to obtain the standard operating current reference value and its normal current fluctuation range corresponding to the current absolute angle position. Then, it determines whether the real-time operating current in the process quantity data deviates from the standard operating current reference value and exceeds the obtained normal current fluctuation range. If the real-time operating current does not exceed the normal current fluctuation range, it enters the first determination process to determine that the immediate execution state is normal. Conversely, if the real-time operating current exceeds the normal current fluctuation range, it enters the second determination process to determine that the immediate execution state is abnormal.
[0028] In another embodiment, the standard angle current model can be represented as a trained machine learning classification model. This type of model does not directly output specific current reference values, but instead maps process quantity data to preset category labels. In this embodiment, model construction relies on a large amount of labeled data. First, process quantity data of the smart lock under various states, including normal operation, locking completion, and different types of abnormal states such as jamming and misalignment, needs to be collected, and each data segment is labeled with its corresponding immediate execution state label. This labeled data constitutes the training set. Subsequently, an appropriate machine learning algorithm, such as support vector machine, decision tree, or simple neural network, is selected, using features extracted from the process quantity data, such as absolute angle position sequences, real-time operating current sequences, and statistical features, as input, and state labels as output, to perform supervised learning training on the model. After training, the resulting model can learn the complex mapping relationship between different states and process quantity data patterns. When the microcontroller unit is applied, the continuously collected process quantity data in real time is constructed into feature vectors and input into the trained machine learning classification model, which directly outputs a classification result about the immediate execution state.
[0029] The immediate execution status includes, but is not limited to, various states commonly encountered during the daily operation of the latch actuator, such as the normal operation status, the locking completed status, the jamming abnormal status indicating a jamming fault in the lock body structure, and the misalignment abnormal status indicating a door lock installation misalignment fault.
[0030] Step S3300: Trigger the corresponding motor-associated control command according to the real-time execution status.
[0031] After determining the motor's immediate execution state, the microcontroller unit triggers corresponding motor-associated control commands based on that state. These commands can directly affect the motor drive circuit or trigger alarms, thus achieving precise control of the door lock's actuator.
[0032] The specific content of the motor-associated control command is closely related to the type of real-time execution state, aiming to achieve different control objectives. Its specific forms include, but are not limited to, motor stop control commands triggered when locking is completed to eliminate idling energy consumption, motor fault control commands triggered when an abnormality is detected to provide early warning, and motor drive control commands triggered during normal operation to maintain the current drive state.
[0033] In one embodiment, a corresponding motor-associated control command is triggered based on the immediate execution state, including a motor stop control command that stops the motor when the immediate execution state is a locking completion state. This command causes the motor to stop immediately after the locking tongue is effectively locked, thereby avoiding unnecessary idling and achieving energy-saving goals.
[0034] In another embodiment, a corresponding motor-associated control command is triggered based on the immediate execution state. This includes triggering a motor fault warning control command when the immediate execution state is a stuck or misaligned abnormal state. This command activates the corresponding alarm mechanism to alert the user that the door lock may have a mechanical fault or installation problem. Additionally, optionally, a corresponding motor stop control command or motor return control command can be triggered to cancel the corresponding drive process.
[0035] In another embodiment, a corresponding motor-associated control command is triggered based on the immediate execution state, including a motor drive control command that maintains or continues the current operation of the motor when the immediate execution state is in normal operation. This command ensures that the motor continues to operate in the normal state until a preset switching / locking stroke is completed or the state changes.
[0036] Through the above embodiments, this application overcomes the inherent defects of traditional technologies in multiple dimensions and achieves significant technological progress. Its core advantages are mainly reflected in the following aspects: First, it achieves a fundamental shift from result monitoring to process perception. Traditional technologies rely on Hall effect or photoelectric sensors, which can only acquire two discrete state signals—the start and end points of the latch movement—and are completely unaware of the intermediate processes. This application introduces an absolute magnetic encoder to acquire the absolute angular position of the motor or drive shaft in real time, combined with the real-time operating current collected by a current sensor, forming continuous and dynamic process data. Through angle mapping and current reflection, the specific position of the latch at any instant and the resistance it encounters can be accurately determined, thereby upgrading the control basis from coarse endpoint judgment to precise characterization of the entire motion process.
[0037] Secondly, the standard angle current model constructed based on process quantity data enables intelligent and precise control logic, significantly improving energy efficiency. Traditional technologies, to avoid the latch not fully engaging due to transmission gaps or minor resistance, generally employ a conservative strategy: allowing the motor to idle for a dead zone after detecting the latch has reached its endpoint, resulting in energy waste. This application utilizes the standard angle current model to accurately identify the critical point of effective latch engagement. Once the locking state is determined, a stop command is immediately issued, completely eliminating invalid idle travel. For battery-powered smart locks, this directly reduces energy consumption per operation, significantly extends battery life, and demonstrates outstanding energy-saving advantages.
[0038] Furthermore, it possesses fault diagnosis and early warning capabilities lacking in traditional technologies, improving product reliability and user experience. Traditional technologies lack process quantity sensing and cannot identify abnormal resistance changes during operation. This application, by comparing real-time process quantity data with a standard model representing a normal state, can effectively identify abnormal patterns. For example, when the current is consistently abnormally high within a specific angular range, it can be identified as a jamming abnormality; when the entire current curve is abnormal in shape and the peak position is offset, it can be identified as a misalignment abnormality. The smart lock can then trigger alarm commands accordingly, promptly notifying the user for maintenance, preventing small faults from accumulating into major problems, or minimizing the risk of lock failure, achieving a leap from passive response to proactive early warning.
[0039] Furthermore, this application possesses high flexibility and adaptability, providing ample room for product optimization and functional expansion. This application maintains openness regarding the implementation method of the standard angle current model, allowing for both a statistical data lookup table approach—simple, reliable, and computationally inefficient—and a machine learning model, which excels at handling complex, nonlinear pattern recognition problems and can detect subtle fault characteristics imperceptible to the human eye. This flexibility enables the solution to adapt to product designs with varying costs and performance requirements. Simultaneously, the continuous accumulation of process data can, in turn, optimize the model, creating a virtuous cycle.
[0040] Based on any embodiment of the method in this application, process quantity data generated by the motor of the current smart lock during the driving of the bolt actuator is obtained, including: Step S3110: Using a current sensor connected in series in the power supply circuit of the motor, sample the operating current of the motor when it rotates to drive the locking tongue actuator, and obtain the real-time operating current; In the specific implementation of acquiring process quantity data, the first step is to sample the real-time operating current. This can be achieved using a current sensor connected in series in the motor power supply circuit. This current sensor is directly connected to the power supply circuit that provides the operating current to the motor, enabling it to sense the actual current value flowing through the motor windings. In one embodiment, the current sensor can be a Hall effect sensor, which indirectly and non-contactly calculates the current magnitude by detecting changes in the magnetic field strength generated by the current. In another embodiment, a precision sampling resistor can be connected in series in the power supply circuit. By measuring the voltage drop across the resistor and amplifying the signal through a differential amplifier circuit, the microcontroller unit acquires and converts the signal to obtain the real-time operating current. The microcontroller unit continuously acquires and performs analog-to-digital conversion on the signal output by the sensor at a preset sampling frequency, such as 1,000 times per second, ensuring that the dynamic changes in the motor's real-time operating current can be captured.
[0041] Step S3120: Obtain the rotation angle generated by the detection of the sensing part of the absolute magnetic encoder, which is coaxially fixedly connected to the output shaft of the motor or the transmission shaft of the actuator, as the absolute angle position; The absolute angular position is obtained using an absolute magnetic encoder. The encoder's sensing element, typically a permanent magnet, is coaxially fixed to the motor's output shaft or the latch actuator's drive shaft, ensuring its rotation is strictly synchronized with the latch's linear movement. As the shaft rotates, the sensing element rotates accordingly, and the encoder chip outputs a digital signal corresponding to the absolute rotation angle by detecting continuous changes in the direction of the surrounding magnetic field. In one embodiment, to simplify the structure, the sensing element is directly mounted on the motor's output shaft. In another embodiment, to more accurately reflect the actual position of the latch and avoid errors caused by backlash in the transmission chain, the sensing element can be mounted on the drive shaft that ultimately drives the latch. The microcontroller unit reads this angle signal from the encoder via a specific communication interface, such as I2C or SPI.
[0042] Step S3130: Synchronize the real-time operating current with the absolute angular position according to time to form the process quantity data.
[0043] After obtaining the two independent physical quantities, absolute angular position and real-time operating current, they are time-synchronized and correlated to form meaningful process quantity data. The microcontroller unit (MCU) must ensure that each current sampling point corresponds to an absolute angular position at a specific moment. In one implementation, the MCU uses an internal timer to generate interrupts at fixed intervals. The interrupt service routine synchronously reads the current angle and current values, binds them into a data pair, and records a timestamp. In another approach, an absolute magnetic encoder can trigger an interrupt when the angle change exceeds a minimum resolution. Upon responding to this interrupt, the MCU immediately acquires the current current value, thus achieving event-triggered synchronization. Through this synchronization mechanism, the real-time operating current and absolute angular position are no longer independent time series, but are integrated into a unified data unit that reflects the motor load at a specific mechanical position—that is, process quantity data.
[0044] Through the above-described specific implementation methods, this application ensures the accuracy and relevance of data at the source of data acquisition. The series connection of the current sensor guarantees the authenticity of the current measurement, the absolute magnetic encoder provides high-precision position feedback, and the strict time synchronization correlation enables the two key parameters of current and angle to be accurately correlated, providing a reliable and high-quality data foundation for subsequent accurate state identification and intelligent control based on the standard angle current model.
[0045] Based on any embodiment of the method in this application, a preset standard angle current model is applied to determine the instantaneous execution state of the motor based on the process quantity data, including: Step S3210: Based on the absolute angle position in the process quantity data, query the preset standard angle current model to obtain the standard working current reference value and normal current fluctuation range corresponding to the current absolute angle position. The standard angle current model generates a standard current curve that changes with the absolute angle position and a tolerance band that characterizes the normal current fluctuation range based on statistical analysis by statistically analyzing data samples of multiple smart door locks operating under standard working conditions. In determining the instantaneous execution state of the motor using a preset standard angle current model, when the model is specifically implemented as a data lookup table, the model can be queried based on the absolute angle position in the process quantity data. The microcontroller unit extracts the current absolute angle position value from the synchronously acquired process quantity data, for example, the motor rotating to 125 degrees. Subsequently, the microcontroller unit uses this absolute angle position as an index key to access the standard angle current model stored in its non-volatile memory, i.e., the aforementioned data lookup table.
[0046] In one embodiment, the data lookup table is organized using discrete angle values as indexes. The microcontroller takes the acquired continuous absolute angle position values, such as 125.36 degrees, and rounds or segments them according to a preset precision, such as in 1-degree intervals, to locate the nearest indexed angle value in the lookup table, such as 125 degrees. By querying this index entry, the microcontroller can retrieve and obtain the standard operating current reference value and the normal current fluctuation range corresponding to that angle position. The standard operating current reference value represents the expected current level under normal operating conditions at that angle, while the normal current fluctuation range defines the acceptable deviation range around the reference value.
[0047] In another embodiment, to improve query accuracy and efficiency, the data lookup table can support query methods based on nearest neighbor interpolation or linear interpolation. When the obtained absolute angular position lies between two preset discrete index angles, the microcontroller not only reads the reference values and fluctuation ranges corresponding to the two adjacent index angles, but also uses an interpolation algorithm to calculate the standard operating current reference value and normal current fluctuation range that should exist at the current precise angular position. This approach can provide smoother and more accurate model output without excessively increasing storage space.
[0048] Through the above query operation, the microcontroller successfully converts real-time, single absolute angle position information into a set of reference standards with clear statistical significance, namely, the standard operating current reference value at the current angle and its normal fluctuation boundaries. This set of data provides a crucial benchmark for subsequently comparing real-time measurements with the standards to objectively determine whether the motor's current operating status is normal.
[0049] Step S3220: Determine whether the real-time operating current in the process quantity data deviates from the standard operating current reference value and exceeds the normal current fluctuation range; After obtaining the standard operating current reference value and normal current fluctuation range corresponding to the current absolute angular position, the microcontroller unit executes a judgment process, comparing the real-time operating current in the process quantity data with the standard. Specifically, the microcontroller unit calculates the difference between the real-time operating current and the standard operating current reference value, and determines whether the absolute value of the difference exceeds the boundary defined by the normal current fluctuation range. In one embodiment, if the normal current fluctuation range is defined as a fixed threshold fluctuation above and below the standard operating current reference value, then it is determined whether the real-time operating current falls within this range. In another embodiment, if the normal current fluctuation range is a dynamic range defined based on the statistical standard deviation, then it is determined whether the real-time operating current exceeds the range determined by adding or subtracting a certain number of times the standard deviation from the reference value.
[0050] Step S3230: If the real-time operating current does not exceed the normal current fluctuation range, then proceed to the first determination process of determining that the immediate execution state is a normal state. If the real-time operating current does not exceed the normal current fluctuation range, the first determination process, which identifies the immediate execution state as normal, is initiated. This process indicates that the motor load at the current angle is within the expected range, and the overall operating state is normal. The microcontroller unit will initially determine the state as normal based on this, and further refine the state type by combining information such as angle position.
[0051] Step S3240: If the real-time operating current exceeds the normal current fluctuation range, then proceed to the second determination process to determine that the immediate execution state is an abnormal state.
[0052] If the real-time operating current exceeds the normal current fluctuation range, the system enters the second determination process to identify the immediate execution state as abnormal. This process indicates that the motor is experiencing an abnormal load at the current angle, which may be due to mechanical jamming, installation misalignment, or other faults. The microcontroller unit will initially determine the state as abnormal based on this and will need to further analyze the abnormal characteristics to determine the specific fault type.
[0053] Through the above embodiments, this application constructs a clear state recognition framework. Based on objective data comparison, this framework transforms complex operating state judgments into a binary judgment of whether current deviation exceeds statistical tolerance. The framework is logically rigorous and easy to implement, and can assist in achieving highly reliable intelligent diagnosis of motor operating states.
[0054] Based on any embodiment of the method in this application, if the real-time operating current does not exceed the normal current fluctuation range, then the first determination process for determining that the immediate execution state is a normal state is entered, including any one or more of the following: Step S3231: If the absolute angle position does not reach the preset locking critical range, then the immediate execution state is determined to be a normal operating state. Once it is determined that the real-time operating current does not exceed the normal current fluctuation range, meaning the motor load is at a normal level, the microcontroller unit enters the first judgment process to further refine the immediate execution state. This process precisely distinguishes the normal operating state based on the relationship between the absolute angular position and the lock-up critical range, as well as whether the current peak value has been reached.
[0055] In this application, the locking critical interval is defined using a preset angle range, and its boundary values are obtained through experimental calibration based on the mechanical design parameters of the specific smart door lock. This interval defines a key stage on the bolt's movement trajectory near the fully locked position. Within this interval, the bolt begins to mechanically contact the strike plate or lock plate on the door frame and gradually presses against it, resulting in a significant increase in load and a rise in the motor's operating current until it reaches its peak value. In one embodiment, this interval can be set as the range where the absolute angular position starts five degrees before the theoretical locking point and ends two degrees after the theoretical locking point.
[0056] If the absolute angular position does not reach the preset locking critical range, the immediate execution state is determined to be the normal operating state. This situation indicates that the bolt is still in the middle stage of its movement stroke and has not approached the fully locked position. Since the current is normal and the position has not entered the critical range, it can be determined that the motor is smoothly driving the bolt to move towards the target position without any abnormalities, therefore the state is the normal operating state.
[0057] Step S3232: If the absolute angle position is within the locking critical range and the real-time operating current does not reach the current peak value corresponding to the door lock locking position, then the immediate execution state is determined to be a normal operating state. If the absolute angular position is within the critical locking range, and the real-time operating current has not reached the peak current corresponding to the locked position of the door lock, then the immediate execution state is also determined to be the normal operating state. This situation indicates that although the bolt has entered the critical area close to complete locking, the motor load has not yet shown the typical peak characteristics of reaching the end of its travel. Therefore, it can be determined that the bolt is completing its final movement, but the effective locking action has not yet been completed. Therefore, the state is still the normal operating state, and the motor needs to continue running.
[0058] Step S3233: If the absolute angular position is within the locking critical range and the real-time operating current reaches the current peak value corresponding to the door lock locking position, then the immediate execution state is determined to be the locking completion state.
[0059] If the absolute angular position is within the locking critical range, and the real-time operating current reaches the peak current corresponding to the locked position of the door lock, then the immediate execution state is determined to be the locking completion state. This situation is a clear indication that the bolt is effectively locked. The appearance of the peak current within the critical range indicates that the bolt has overcome the maximum resistance and is fully in place. Based on this, it is determined that the effective locking action has been completed, and the state is the locking completion state, providing an accurate basis for triggering the stop command subsequently.
[0060] By refining the first determination process through the above embodiments, this application achieves refined management of the motor's operating status under normal working conditions. This process not only distinguishes between the ordinary operating state and the locked state that marks the completion of the task, but more importantly, by introducing the current peak value as a key criterion within the locking critical range, it achieves accurate judgment on whether the locking tongue is truly and effectively in place. This allows the application to cut off the motor power at the optimal time, completely eliminate idling energy consumption, and thus achieve energy-saving benefits.
[0061] Based on any embodiment of the method in this application, if the real-time operating current exceeds the normal current fluctuation range, a second determination process is initiated to determine that the immediate execution state is an abnormal state, including any one or more of the following: Step S3241: When the motor rotates along the first direction to drive the bolt to the locked position, if the real-time working current deviates from the normal current fluctuation range by more than a preset amplitude within the angle range from the initial driving angle to the final locking angle, then the immediate execution state is determined to be a jammed abnormal state that characterizes the jamming fault of the lock body structure. After determining that the real-time operating current exceeds the normal current fluctuation range, i.e., the motor load is abnormal, the microcontroller unit enters the second judgment process to distinguish the abnormality type. When the motor rotates along the first direction to drive the bolt to the locked position, if the real-time operating current deviates from the normal current fluctuation range by more than a preset amplitude within the angle range from the initial driving angle to the final locking angle, the immediate execution state is determined to be a jamming abnormal state that represents a jamming fault in the lock body structure.
[0062] Focusing on the angular range formed by the movement from the initial drive angle to the final locking angle implies that the anomaly does not occur throughout the entire motion stroke, but is concentrated at one or more specific mechanical positions. In one embodiment, this angular range may correspond to a specific transmission stage driving the slant or latch. If the real-time operating current deviates from the normal current fluctuation range by a preset amplitude, it indicates that at that local position, the motor needs to continuously output torque far exceeding the normal level to overcome resistance. The preset amplitude can be a threshold set based on experimental data to distinguish between ordinary current fluctuations and true fault overloads; for example, it can be set to 1.5 times the upper limit of the normal current fluctuation range.
[0063] The microcontroller unit can confirm this condition by analyzing continuously acquired process data. This is achieved by checking whether the real-time operating current is significantly higher than the standard value within the same or several consecutive small angular increment ranges. In one implementation, the microcontroller sets a sustained angular threshold; for example, if the real-time operating current is abnormally high within a range exceeding 5 degrees continuously, it is considered a sustained exceedance. This localized, continuous, and severe current increase typically corresponds to mechanical jamming inside the lock body due to dust accumulation, insufficient lubrication, or component wear, causing the bolt to be obstructed at a specific position. Therefore, this state can be accurately identified as an abnormal jamming condition.
[0064] Step S3242: When the motor rotates along the first direction, if the first curve formed by the real-time operating current continuously collected by the motor shifts upward relative to the second curve formed by the standard operating current reference value, and the absolute angular position of the current peak corresponding to the locking position shifts ahead or behind, then the immediate execution state is determined to be an abnormal state of misalignment characterizing the door lock installation misalignment fault.
[0065] In the second determination process, when the motor rotates along the first direction to drive the latch to the locked position, if the first curve composed of continuously collected real-time operating current data shifts upward relative to the second curve composed of standard operating current reference values, and the absolute angular position of the current peak corresponding to the locked position shifts ahead or behind, then the immediate execution state is determined to be an abnormal state of misalignment that characterizes the door lock installation misalignment fault.
[0066] This criterion focuses on the systematic distortion of the current curve shape throughout the entire movement. An overall upward shift of the first curve relative to the second curve indicates that the baseline level of the real-time operating current is higher than the standard value throughout the entire bolt movement stroke or its main phase. This typically indicates that the motor needs to continuously output greater torque to drive the bolt, rather than an occasional fluctuation at a local point. In one embodiment, the microcontroller unit can quantify the degree of this overall upward shift by calculating the average current of the first curve at multiple sampling points and comparing it with the corresponding average value of the second curve. In another embodiment, the overall upward shift can be determined by observing whether most data points of the first curve are above the second curve.
[0067] Meanwhile, another key characteristic is the shift in the absolute angular position of the current peak corresponding to the locked position. Under normal installation conditions, the current peak should appear at a relatively fixed absolute angular position when the bolt is fully locked. Installation misalignment will cause the bolt's movement trajectory to change, causing its engagement point with the strike plate to be earlier or later. If the current peak appears at an angle significantly earlier than the standard position, it is considered an advanced offset, indicating that the lock body is installed too far forward. If it is significantly later than the standard position, it is considered a lagging offset, indicating that the lock body is installed too far back or the gap between the lock body and the door frame is too large. The microcontroller unit can determine whether the offset exists and its direction by comparing the real-time peak angle with the peak angle calibrated in the standard angular current model.
[0068] When both an upward shift in the overall current curve and a shift in the peak angle occur simultaneously, it strongly indicates an installation misalignment fault in the door lock. Installation misalignment causes a deviation in the alignment of the bolt and the door frame strike box, resulting in increased frictional resistance of the bolt throughout its movement and a change in the final engagement point. Therefore, this condition can be accurately identified as an abnormal misalignment, providing users with a clear warning for recalibration and installation.
[0069] By finely distinguishing and judging abnormal states through the above embodiments, this application has achieved significant technical advantages, realizing accurate diagnosis and early warning of smart lock faults, and upgrading the traditional single overcurrent protection to an intelligent diagnostic system with fault type identification capabilities. This system can not only accurately identify mechanical jamming faults by detecting localized continuous high current, but also diagnose installation misalignment problems by analyzing the upward shift of the overall current curve and the peak angle deviation. This allows users to perform precise maintenance targeting specific fault causes, such as cleaning, lubrication, or recalibrating the installation, rather than simply perceiving the vague phenomenon of the lock malfunctioning. This greatly improves the maintainability, reliability, and user experience of the product.
[0070] Based on any embodiment of the method in this application, a preset standard angle current model is applied to determine the instantaneous execution state of the motor based on the process quantity data, including: Step S3201: Construct a feature vector from the multiple process quantity data continuously generated during the operation of the motor. The input feature includes the absolute angle position sequence and the real-time operating current sequence extracted from each process quantity data. In an embodiment of using a machine learning classification model to determine the instantaneous execution state of a motor, multiple process quantity data continuously generated during motor operation need to be constructed into feature vectors in order to convert the dynamic, serialized raw data into a standardized input format that the machine learning model can process.
[0071] When constructing the feature vector, the microcontroller first retrieves a sequence of process quantity data collected over a continuous time period from the cache. This sequence contains multiple data points arranged in chronological order, each containing an absolute angular position value and a corresponding real-time operating current value. The input features of the feature vector are extracted from these data points, mainly including the absolute angular position sequence and the real-time operating current sequence. The absolute angular position sequence reflects the trajectory of the latch's position change over time during its movement, while the real-time operating current sequence synchronously records the dynamic fluctuations of the motor load.
[0072] In one embodiment, the feature vector can be constructed by direct concatenation. For example, the microcontroller selects the most recent N consecutive sampling points (e.g., N=50), arranges the absolute angular position values of these N points into a subsequence in sequence, then arranges the corresponding N real-time operating current values into another subsequence in the same order, and finally concatenates these two subsequences to form a feature vector of length 2N. This method preserves the temporal information of the original data to the greatest extent possible.
[0073] In another embodiment, to reduce the dimensionality of the feature vector and highlight key information, feature engineering can be performed to extract statistical features from the original sequence to construct the feature vector. These statistical features may include, but are not limited to, the mean, variance, and slope of the absolute angular position sequence, and the maximum, minimum, mean, variance, and integral values within a specific interval of the real-time operating current sequence. For example, the average and variance of the current within every 10-degree angular interval after the latch begins to move can be calculated, and these statistics can be combined into a feature vector. The features extracted in this way are more representative and can effectively reduce the amount of computation.
[0074] Step S3202: Input the feature vector into the pre-trained standard angle current model to obtain the corresponding classification result. The standard angle current model is a machine learning classification model, which is obtained by using multiple sets of door lock operation process data labeled with corresponding immediate execution state labels as training set for supervised learning. The standard angle current model in this embodiment is a machine learning classification model, which can be prepared offline. Therefore, a training set for supervised learning needs to be prepared first. The training set consists of multiple sets of door lock operation process data labeled with corresponding immediate execution state tags. During preparation, in a laboratory environment, numerous opening and closing cycles are performed on multiple smart door lock samples in normal and simulated specific fault states, while simultaneously collecting their process data, namely absolute angle position sequences and real-time operating current sequences. Following the construction method of the previous step, these process data are constructed into corresponding feature vectors. Subsequently, experts or automated test scripts, based on test conditions and data characteristics, label the feature vectors corresponding to each collected process data sequence with their corresponding immediate execution state tags, such as normal operation state, locking completion state, jamming abnormal state, or offset abnormal state. These data pairs with accurate labels constitute the training samples required for supervised learning.
[0075] Once the training set is obtained, training the machine learning classification model can begin. In one embodiment, decision trees or random forest algorithms can be used, as these models have relatively low data requirements and strong interpretability. In another embodiment, support vector machines can be used for more complex patterns, especially when the feature dimensions are carefully designed. If the amount of data is sufficient and computing resources allow, simple neural networks, such as multilayer perceptrons, can also be used. The training process involves continuously adjusting the model's internal parameters through algorithms, enabling the model to learn the complex mapping relationship between the input feature vectors and the output instantaneous execution state labels. The trained model serves as a preset standard angle current model and can be deployed in the microcontroller unit of a smart lock.
[0076] During the model inference phase, the microcontroller inputs the real-time constructed feature vectors into the pre-trained machine learning classification model. Internally, the model calculates the input features based on its learned decision rules. In one embodiment, the model may output a specific state label, such as directly providing the classification result for the locking completion state. In another embodiment, the model may output a probability distribution of each possible state, and the microcontroller selects the state with the highest probability as the final classification result. This classification result directly corresponds to the motor's immediate execution state, completing the end-to-end mapping from raw data to state judgment.
[0077] Step S3203: Determine the corresponding immediate execution status based on the classification results.
[0078] After the machine learning classification model outputs a classification result, the microcontroller unit (MCU) can determine the corresponding immediate execution state based on that result. The form of the classification result depends on the specific machine learning model used and the design of its output layer. In one embodiment, the model directly outputs a clear discrete label that corresponds directly to a predefined immediate execution state. For example, the model outputs category number "2," and the mapping table stored internally by the MCU specifies that number "2" represents the locking completion state. In this case, the MCU directly maps the output to the locking completion state and determines the immediate execution state accordingly.
[0079] In another embodiment, the model outputs a probability distribution, where each element represents the probability that the input feature vector belongs to a specific immediate execution state. For example, for a system with four states, the model might output a probability distribution such as [0.02, 0.05, 0.90, 0.03], corresponding to the probabilities of the normal operation state, the latch-up state, the jamming anomaly state, and the misalignment anomaly state, respectively. The microcontroller then applies a decision rule to determine the final state. The most common rule is to select the state with the highest probability. In this example, the jamming anomaly state, corresponding to a probability of 0.90, is determined as the final immediate execution state. To improve reliability, a probability threshold can also be set; the state is only confirmed when the highest probability exceeds this threshold; otherwise, it can be considered an uncertain state and a default processing strategy is adopted.
[0080] After the above process, once the immediate execution status is determined based on the classification results, it can be used to determine the motor-associated control commands.
[0081] The above embodiments employ a machine learning-based classification model to identify the instantaneous execution state, enabling end-to-end intelligent identification of the instantaneous execution state of the motor. This allows the system to automatically learn and capture deep nonlinear mapping relationships between process data and complex states that are difficult to describe with explicit rules. As a result, when dealing with variable operating conditions and identifying compound faults or subtle abnormal patterns, the system exhibits stronger adaptability and higher judgment accuracy than methods based on fixed thresholds and rules. This greatly improves the intelligence level and reliability of state diagnosis, providing more advanced and powerful technical support for the stable and reliable operation of smart locks in complex real-world environments.
[0082] Based on any embodiment of the method in this application, triggering the corresponding motor-associated control command according to the immediate execution state includes: Step S3310: When the immediate execution state is the lock-up completion state, a motor stop control command to stop the motor is triggered. When the microcontroller determines that the immediate execution state is the locking completion state, it immediately triggers a motor stop control command to stop the motor. This command is a direct output of the control logic, designed to immediately terminate the motor's power output. This completely eliminates the invalid travel that is reserved in traditional control schemes to ensure reliability, where the motor continues to idle after the locking tongue is in place. This directly avoids the resulting energy waste and achieves energy-saving benefits.
[0083] The motor stop control command is issued through the microcontroller's general purpose input / output interface or a dedicated motor control pin. In one embodiment, the command is sent to a motor drive circuit connected between the microcontroller and the motor, such as a driver chip or discrete component circuit composed of a half-bridge or full-bridge topology. The stop command received by the drive circuit can specifically be manifested as a specific combination of logic levels or a command word sent via a communication protocol.
[0084] The drive circuit executes specific power-off or braking operations based on the received stop command. In one implementation, the drive circuit completely cuts off the current flowing to the motor by turning off all output power transistors, allowing the motor to stop naturally due to its own friction and load resistance. In another implementation, to achieve a faster stop and avoid minor overshoot caused by inertia, the drive circuit can take active braking measures. For example, in a full-bridge drive, the two ends of the motor can be briefly short-circuited, or a reverse voltage pulse can be applied to consume the rotational kinetic energy of the motor, causing it to stop quickly.
[0085] Step S3320: When the immediate execution state is a stuck abnormal state or an off-center abnormal state, a motor fault warning control command for fault early warning is triggered. When the microcontroller determines that the immediate execution state is a jammed or misaligned abnormal state, it triggers a motor fault warning control command for fault early warning. This command is used to alert the user or system administrator to the potential fault risk of the door lock, rather than directly interfering with the current operation of the motor, in order to avoid secondary problems or misoperations that may be caused when the nature of the fault is not clear.
[0086] The execution of motor malfunction control commands can manifest in various specific alarm forms. In one embodiment, the microcontroller unit controls the audible and visual alarm devices on the smart lock body through its input / output interfaces. For example, the microcontroller unit can drive a buzzer to sound at a specific rhythm, or control an indicator light to provide a prompt with a specific color and flashing pattern, such as a rapidly flashing red light. This local alarm method can instantly alert nearby users.
[0087] In another embodiment, the microcontroller unit uploads fault information to a cloud server or a user-attached mobile terminal via its integrated communication module. For example, the microcontroller unit can send an alarm message containing information such as the fault type and time of occurrence to the user's smartphone application via a wireless communication module such as Wi-Fi or Bluetooth. This allows the user to remotely check the door lock status.
[0088] Furthermore, alarm messages can include specific fault type identifiers. For example, when the status is stuck, the alarm message can clearly indicate "The lock body may be stuck; it is recommended to check and lubricate." When the status is misaligned, it can indicate "The door lock installation may be misaligned; it is recommended to recalibrate." This precise fault description greatly improves the effectiveness and operability of the alarms, providing users with clear maintenance directions.
[0089] In certain application scenarios, alarm commands can also trigger more complex linkage logic. In one embodiment, the microcontroller unit can record detailed data on the fault occurrence, such as relevant current curve segments and angle information, while triggering the alarm, and store them in non-volatile memory for subsequent analysis by technicians. In another embodiment, the alarm can be set to be triggered only after the same abnormal state is detected multiple times consecutively, in order to improve the reliability of the alarm and avoid false alarms caused by momentary interference.
[0090] By triggering motor fault control commands, this application enables smart door locks to have the ability to self-diagnose and proactively warn of their status, transforming traditional passive fault handling into proactive status management, which significantly improves the intelligence level of the product and the user experience.
[0091] Step S3330: When the immediate execution state is the normal operation state, maintain or continue the motor drive control command currently running the motor.
[0092] When the microcontroller determines that the immediate execution state is in normal operation, it triggers a motor drive control command to maintain or continue the current operation of the motor. The key is that when it is determined that the motor and its driven locking tongue actuator are in a stable operation phase without any abnormalities, no unnecessary intervention is applied. Instead, the motor is ensured to continuously receive power to complete the preset opening and closing stroke.
[0093] Motor drive control commands are sent to the motor drive circuit via the output channel of the microcontroller unit. In one embodiment, the command manifests as maintaining a specific set of control signals. For example, for a motor controlled by a pulse-width modulation (PWM) signal, the microcontroller unit continues to output a PWM waveform with the current duty cycle to the drive circuit, which then maintains the motor's current speed and torque output accordingly. In another embodiment, for a smart drive chip controlled via a digital communication interface, the microcontroller unit may need to periodically send command words to maintain the current operating state.
[0094] Maintaining the current operation means that the microcontroller unit will not change the target motor rotation direction, speed, or torque that was set before entering normal operation. For example, if the motor is rotating forward at a certain speed to drive the latch to extend, the instruction is intended to maintain this motion. Continuing the current operation emphasizes the continuity of control; the microcontroller unit continuously monitors process data and updates state judgments, cyclically executing output drive commands as long as the state does not change.
[0095] This control strategy ensures a smooth and continuous door lock opening and closing process, based on the fundamental judgment that, under normal operating conditions, neither the locking completion point requiring a shutdown has been reached nor any abnormalities have been detected. Therefore, the most reasonable control action is to allow the motor to continue its predetermined task. This seemingly simple default operation is precisely the foundation for ensuring stable and efficient operation under most normal working conditions, avoiding jitter or interruptions that may be introduced by unnecessary control actions.
[0096] Through the aforementioned embodiments that map different real-time execution states to specific motor-related control commands, this application further constructs a complete, closed-loop, and highly intelligent control execution system. This allows the real-time execution state judgment obtained from process quantity data and standard angle current model analysis to be directly and accurately transformed into the optimal control action. It not only achieves core energy-saving benefits through precise shutdown in the locked state but also enhances state perception capabilities into decision support capabilities that guide user maintenance through proactive early warning in abnormal states. Simultaneously, it ensures the smoothness of basic operations through uninterrupted maintenance during normal operation. Ultimately, this application upgrades the control logic of smart door locks from a single, passive switch drive to an adaptive intelligent system capable of autonomous decision-making based on real-time operating status, possessing both energy efficiency optimization and fault immunity capabilities, significantly improving the product's overall performance and market competitiveness.
[0097] Please see Figure 3This application provides a smart door lock motor control device for use in the microprocessor unit of a smart door lock. It is a functional embodiment of the smart door lock motor control method of this application. The device includes a data acquisition module 3100, a state determination module 3200, and an instruction triggering module 3300. The data acquisition module 3100 is configured to acquire process quantity data generated by the motor of the current smart door lock during the driving of the latch actuator. The process quantity data includes the absolute angular position and real-time operating current of the motor. The state determination module 3200 is configured to apply a preset standard angular current model to determine the instantaneous execution state of the motor based on the process quantity data. The standard angular current model characterizes the correspondence between the absolute angular position and the real-time operating current under normal operating conditions of the current smart door lock. The instruction triggering module 3300 is configured to trigger corresponding motor-associated control instructions according to the instantaneous execution state.
[0098] Based on any embodiment of the device in this application, the data acquisition module 3100 includes: a current sampling module, configured to use a current sensor connected in series in the power supply circuit of the motor to sample the operating current of the motor when it rotates to drive the latch actuator, and obtain the real-time operating current; an angle sampling module, configured to obtain the rotation angle generated by the detection of the sensing part coaxially fixedly connected to the output shaft of the motor or the transmission shaft of the actuator by an absolute magnetic encoder, as the absolute angle position; and a data construction module, configured to synchronously associate the real-time operating current and the absolute angle position in time to form the process quantity data.
[0099] Based on any embodiment of the device in this application, the state determination module 3200 includes: a standard query module, configured to query a preset standard angle current model based on the absolute angle position in the process quantity data, to obtain the standard operating current reference value and normal current fluctuation range corresponding to the current absolute angle position, wherein the standard angle current model generates a standard current curve that changes with the absolute angle position and a tolerance band characterizing the normal current fluctuation range based on statistical analysis by statistically analyzing data samples of multiple smart door locks operating under standard conditions; a current detection module, configured to determine whether the real-time operating current in the process quantity data deviates from the standard operating current reference value and exceeds the normal current fluctuation range; a normal state determination module, configured to enter a first determination process to determine the immediate execution state as a normal state if the real-time operating current does not exceed the normal current fluctuation range; and an abnormal state determination module, configured to enter a second determination process to determine the immediate execution state as an abnormal state if the real-time operating current exceeds the normal current fluctuation range.
[0100] Based on any embodiment of the device in this application, the normal state determination module includes any one or more of the following: a first normal state determination module, configured to determine that the immediate execution state is a normal operating state if the absolute angle position does not reach a preset locking critical range; a second normal state determination module, configured to determine that the immediate execution state is a normal operating state if the absolute angle position is within the locking critical range and the real-time operating current does not reach the current peak value corresponding to the door lock locking position; and a locking state determination module 3200, configured to determine that the immediate execution state is a locking completion state if the absolute angle position is within the locking critical range and the real-time operating current reaches the current peak value corresponding to the door lock locking position.
[0101] Based on any embodiment of the device in this application, the anomaly determination module includes any one or more of the following: a jamming state determination module 3200, configured to determine that when the motor rotates along the first direction to drive the latch to the locked position, if the real-time operating current deviates continuously beyond the normal current fluctuation range by a preset amplitude within the angular range from the initial driving angle to the final locking angle, the immediate execution state is a jamming abnormal state characterizing a lock body structure jamming fault; and a misalignment state determination module 3200, configured to determine that when the motor rotates along the first direction, if the first curve formed by the continuously collected real-time operating current of the motor shifts upward relative to the second curve formed by the standard operating current reference value, and the absolute angular position of the current peak corresponding to the locked position shifts ahead or behind, the immediate execution state is a misalignment abnormal state characterizing a door lock installation misalignment fault.
[0102] Based on any embodiment of the device in this application, the state determination module 3200 includes: a vector construction module, configured to construct a feature vector from multiple process quantity data continuously generated during the operation of the motor, wherein the input features include an absolute angle position sequence and a real-time operating current sequence extracted from each process quantity data; a result reasoning module, configured to input the feature vector into a pre-trained standard angle current model to obtain a corresponding classification result, wherein the standard angle current model is a machine learning classification model, which is obtained by supervised learning using multiple sets of door lock operation process quantity data labeled with corresponding immediate execution state labels as a training set; and a result recognition module, configured to determine the corresponding immediate execution state based on the classification result.
[0103] Based on any embodiment of the device in this application, the instruction triggering module 3300 includes: a stop triggering module, configured to trigger a motor stop control command to stop the motor when the immediate execution state is a lock-up completion state; a fault warning triggering module, configured to trigger a motor fault warning control command for fault early warning when the immediate execution state is a jamming abnormal state or a misalignment abnormal state; and a drive triggering module, configured to maintain or continue the motor drive control command currently running the motor when the immediate execution state is a normal operation state.
[0104] To address the aforementioned technical problems, embodiments of this application also provide a computer device that can be used to implement a smart door lock. For example... Figure 4 The diagram shows the internal structure of a computer device. This computer device includes a processor, a computer-readable storage medium, a memory, a network interface, and various communication components connected via a system bus. The processor may be a microprocessor unit. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, they enable the processor to implement a smart door lock motor control method. The processor of this computer device provides computing and control capabilities, supporting the operation of the entire computer device. The memory of this computer device may store computer-readable instructions. When these computer-readable instructions are executed by the processor, they enable the processor to execute the smart door lock motor control method of this application. The network interface of this computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0105] In this embodiment, the processor is used to execute... Figure 3 The system contains the specific functions of each module and its sub-modules, and the memory stores the program code and various data required to execute these modules or sub-modules. A network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the intelligent door lock motor control device of this application, and the server can call the server's program code and data to execute the functions of all sub-modules.
[0106] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the smart door lock motor control method of any embodiment of this application.
[0107] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0108] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those in the open-source operations, methods, and processes of this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.
[0109] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for controlling a motor of an intelligent door lock, the method comprising: The application comprises: acquiring process quantity data generated by a motor of a current smart door lock in the process of driving a lock bolt actuator, the process quantity data including absolute angle position of the motor and real-time working current; applying a preset standard angle current model to determine the instant execution state of the motor based on the process quantity data, the standard angle current model being used to represent the corresponding relationship between the absolute angle position and the real-time working current of the current smart door lock under normal working conditions; triggering corresponding motor-associated control instructions according to the instant execution state.
2. The intelligent door lock motor control method of claim 1, wherein, The acquisition of process quantity data generated by a motor of a current smart door lock in the process of driving a lock bolt actuator comprises: sampling the working current of the motor when rotating to drive the lock bolt actuator by using a current sensor connected in series in the power supply circuit of the motor to obtain the real-time working current; acquiring the rotation angle generated by an absolute magnetic encoder when detecting the sensing part fixedly connected coaxially with the output shaft of the motor or the transmission shaft of the actuator as the absolute angle position; synchronously associating the real-time working current with the absolute angle position according to time to constitute the process quantity data.
3. The intelligent door lock motor control method of claim 1, wherein, The application of a preset standard angle current model to determine the instant execution state of the motor based on the process quantity data comprises: querying the preset standard angle current model according to the absolute angle position in the process quantity data to obtain the corresponding standard working current reference value and normal current fluctuation range under the current absolute angle position, wherein the standard angle current model generates a standard current curve varying with the absolute angle position and a tolerance band representing the normal current fluctuation range determined based on statistical analysis by statistically analyzing the data samples of a plurality of the smart door locks running under standard working conditions; judging whether the real-time working current in the process quantity data deviates from the standard working current reference value and exceeds the normal current fluctuation range; if the real-time working current does not exceed the normal current fluctuation range, entering a first determination process of determining that the instant execution state is normal; if the real-time working current exceeds the normal current fluctuation range, entering a second determination process of determining that the instant execution state is abnormal.
4. The intelligent door lock motor control method of claim 3, wherein, If the real-time working current does not exceed the normal current fluctuation range, entering a first determination process of determining that the instant execution state is normal, which comprises any one or any multiple of the following: if the absolute angle position does not reach a preset locking critical interval, determining that the instant execution state is a normal running state; if the absolute angle position is in the locking critical interval and the real-time working current does not reach the current peak value corresponding to the door lock closed position, determining that the instant execution state is a normal running state; if the absolute angle position is in the locking critical interval and the real-time working current reaches the current peak value corresponding to the door lock closed position, determining that the instant execution state is a lock closing completion state.
5. The intelligent door lock motor control method of claim 3, wherein, If the real-time working current exceeds the normal current fluctuation range, a second determination process is entered to determine that the instant execution state is an abnormal state, including any one or any combination of the following: When the motor rotates in the first direction to drive the latch to the locked position, if the real-time working current deviates from the normal current fluctuation range by more than a preset amplitude within the angular interval from the initial driving angle to the terminal locking angle, it is determined that the instant execution state is a jam abnormal state representing a lock body structure jam fault; When the motor rotates in the first direction, if the first curve formed by the continuously collected real-time working currents of the motor is shifted upward relative to the second curve formed by the standard working current reference value, and the absolute angular position of the current peak corresponding to the locked position is shifted forward or backward, it is determined that the instant execution state is a misalignment abnormal state representing a door lock installation misalignment fault.
6. The intelligent door lock motor control method of claim 1, wherein, Applying a preset standard angle current model, the instant execution state of the motor is determined based on the process quantity data, including: The multiple process quantity data continuously generated during the operation of the motor are constructed as a feature vector, and the input features include an absolute angular position sequence and a real-time working current sequence extracted from each process quantity data; The feature vector is input into a pre-trained standard angle current model to obtain a corresponding classification result, and the standard angle current model is a machine learning classification model obtained by supervised learning using multiple sets of door lock operation process quantity data labeled with corresponding instant execution state labels as a training set; The corresponding instant execution state is determined according to the classification result.
7. The intelligent door lock motor control method according to any one of claims 1 to 6, characterized in that, According to the instant execution state, a corresponding motor-associated control instruction is triggered, including: When the instant execution state is a locking completion state, a motor stop control instruction is triggered to stop the motor; When the instant execution state is a jam abnormal state or a misalignment abnormal state, a motor fault warning control instruction is triggered for fault warning; When the instant execution state is a normal running state, the motor driving control instruction for the current operation of the motor is maintained or continued.
8. A smart door lock motor control device, characterized by, A door lock applied to an intelligent door lock, including: A data acquisition module configured to acquire process quantity data generated by a motor of a current intelligent door lock during driving of a latch actuator, the process quantity data including an absolute angular position of the motor and a real-time working current; A state determination module configured to apply a preset standard angle current model to determine the instant execution state of the motor based on the process quantity data, the standard angle current model representing the corresponding relationship between the absolute angular position and the real-time working current of the current intelligent door lock under normal working conditions; An instruction triggering module configured to trigger a corresponding motor-associated control instruction according to the instant execution state.
9. An intelligent door lock, characterized by Including: A motor, a latch actuator, an absolute magnetic encoder, a current sensor, and a micro control unit; The output shaft of the motor is in transmission connection with the bolt execution mechanism, for driving the bolt to extend or retract; the sensing part of the absolute magnetic encoder is fixedly connected coaxially with the output shaft of the motor or the transmission shaft of the execution mechanism, for detecting the rotation angle of the corresponding shaft and outputting the absolute angle position; the current sensor is connected in series in the power supply circuit of the motor, for collecting the real-time working current of the motor; The micro control unit is electrically connected with the absolute magnetic encoder and the current sensor respectively, and is configured to: receive and synchronize the absolute angle position signal and the real-time working current signal to constitute process quantity data; apply a preset standard angle current model, and determine the instant working state of the motor based on the process quantity data; and generate and output corresponding motor associated control instructions to the motor according to the instant working state.
10. A computer-readable storage medium, characterized in that, The computer readable instructions store a computer program implemented according to the intelligent door lock motor control method, and the computer program is called and run by a computer to execute the steps included in the method of any one of claims 1 to 7.