A control method and system based on an electric lifting clothes hanger
By collecting real-time operating status data of the master and slave motors of the electric lifting clothes rack, calculating displacement deviation and smoothing it, the problems of accuracy and adaptability of synchronous control are solved, and the stability and safety of the clothes rack's operation are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG TUTTI HARDWARE CO LTD
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-12
Smart Images

Figure CN122194800A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of clothes hanger control technology, and in particular to a control method and system based on an electric lifting clothes hanger. Background Technology
[0002] With the popularization of smart home technology, electric lifting clothes racks have become an important part of modern homes due to their advantages such as convenient operation and space saving. To ensure the stability and load-bearing capacity of the lifting process, mainstream products generally adopt an architecture driven synchronously by a master motor and a slave motor. In such dual-motor systems, how to achieve high-precision synchronous control of the master and slave motors under various operating conditions, and effectively prevent the clothes rack from tilting, running jamming, or even structural damage caused by asynchronous lifting on both sides, is the core technical challenge to improve the overall reliability, safety, and user experience of the product.
[0003] Currently, several technical solutions have been proposed in the industry for the synchronous control of dual motors in electric lifting clothes racks. One is to adopt an open-loop control strategy, that is, to preset the same drive parameters for the two motors and achieve speed matching by relying on the consistency of the motor's own performance. The other is to introduce closed-loop feedback control, which involves installing sensors such as encoders at the motor end to collect speed or displacement information in real time, and calculating speed compensation values based on classic proportional (P) or proportional-integral (PI) control algorithms to correct deviations.
[0004] However, the aforementioned existing technical solutions still have the following drawbacks in practical applications: First, open-loop control cannot overcome the real-time speed differences introduced by factors such as mechanical manufacturing tolerances, uneven load distribution, component characteristic drift, and external power supply disturbances. This leads to the accumulation of synchronization errors over time, which can easily cause the clothes hanger to tilt significantly or its movement to be obstructed after long-term use. Second, although closed-loop control improves accuracy, its control parameters are mostly statically set, making it difficult to adaptively adjust them in different dynamic stages such as clothes hanger start-up, uniform speed operation, and braking. This can easily lead to response hysteresis or overshoot oscillation, affecting synchronization stability. Third, the compensation commands directly output by the control algorithm often have abrupt changes. Driving the motor without processing can easily cause sudden torque changes, resulting in mechanical vibration and operating noise, which can damage product lifespan and user comfort. Therefore, the above problems make existing electric lifting clothes hangers insufficient in terms of the accuracy, adaptability, and smoothness of synchronization control, thus affecting their overall stability and safety in use. Summary of the Invention
[0005] To address the aforementioned shortcomings in the existing technology, the present invention aims to provide a control method for an electric lifting clothes rack, which improves the stability and safety of the electric lifting clothes rack.
[0006] The above-mentioned objective of this invention is achieved through the following technical solution: A control method based on an electric lifting clothes rack, the electric lifting clothes rack including a master motor and a slave motor, the method comprising: Responding to the clothes hanger lifting control command, it acquires infrared sensor signals; Based on the infrared sensor signals, the real-time operating status data of the master motor and slave motor are determined; Based on the operating status data, the real-time displacements of the master motor and the slave motor are determined. Based on the real-time displacement of the master motor and the slave motor, the displacement deviation between them is calculated. The initial velocity compensation amount is determined based on the preset deviation range in which the absolute value of the displacement deviation falls; The initial velocity compensation amount is smoothed to obtain the target velocity compensation amount; Based on the target speed compensation amount, the operating state of the master motor is adjusted to achieve synchronous lifting and lowering of the master motor and the slave motor.
[0007] By adopting the above technical solution, infrared sensor signals are first collected, effectively preventing the risk of collision caused by the cabinet door not being opened or foreign objects in the path, thus improving operational safety. Then, by collecting the displacement of the two motors in real time and calculating the deviation, combined with a multi-strategy compensation mechanism based on a preset deviation range, the rapid identification and adaptive precise adjustment of synchronization errors are achieved, improving the accuracy and dynamic response capability of the dual-motor synchronous control. Finally, by smoothing the compensation amount, abrupt changes in speed commands are avoided, ensuring the smoothness and continuity of the motor speed adjustment process, thereby fundamentally improving the operational smoothness, overall stability, and service life of the clothes hanger lifting mechanism.
[0008] Preferably, the infrared sensor signal includes a first state and a second state; The step of determining the real-time operating status data of the master motor and slave motor based on the infrared sensor signal includes: The infrared sensor signal is preprocessed to obtain the preprocessed infrared sensor signal; Identify the preprocessed infrared sensor signal; When the preprocessed infrared sensor signal is in the first state, the operating status data of the master motor and slave motor are collected in real time.
[0009] By adopting the above technical solution, it is possible to effectively avoid the clothes rack from being accidentally triggered when the cabinet door is not open, thereby preventing equipment collisions or damage and improving safety. At the same time, by preprocessing and identifying the status of the infrared sensor signals, the accuracy of the cabinet door status judgment and the reliability of the system response are improved.
[0010] Preferably, determining the real-time displacement of the master motor and the slave motor based on the operating status data includes: The real-time pulse counts of the master motor and the slave motor are extracted from the operating status data, respectively. The real-time displacement of the main motor is calculated based on the real-time cumulative number of pulses of the main motor and the first preset conversion coefficient. The real-time displacement of the slave motor is calculated based on the real-time pulse accumulation of the slave motor and the second preset conversion coefficient. The first preset conversion coefficient and the second preset conversion coefficient are determined based on the encoder resolution, mechanical transmission ratio and lead parameters of the corresponding motor.
[0011] By adopting the above technical solution, and by extracting the real-time pulse accumulation of the motor encoder and using the preset conversion coefficient for displacement calculation, high-precision digital measurement of the actual movement position of the master and slave motors is achieved. Moreover, the conversion coefficient integrates key mechanical and electrical parameters such as encoder resolution, transmission ratio and lead, which enables the displacement calculation to be adapted to different motor models and transmission mechanisms, enhances the versatility and configurability of the control method, and fundamentally ensures the accuracy and real-time performance of the position feedback information on which synchronous control depends.
[0012] Preferably, the step of calculating the displacement deviation between the master motor and the slave motor based on their real-time displacement includes: The displacement deviation is obtained by calculating the difference between the real-time displacement of the slave motor and the real-time displacement of the master motor.
[0013] By adopting the above technical solution, the synchronization deviation between the slave and master motors can be directly quantified by calculating the difference in real-time displacement. The calculation method is simple and efficient, and can clearly reflect the leading or lagging position of the two motors during operation, ensuring the real-time and targeted nature of the synchronous control response.
[0014] Preferably, determining the initial velocity compensation amount based on the preset deviation range in which the absolute value of the displacement deviation falls includes: The absolute value of the displacement deviation is compared with the first preset deviation threshold, the second preset deviation threshold, and the third preset deviation threshold, respectively. If the absolute value of the displacement deviation is less than the first preset deviation threshold, then the first strategy is executed; If the absolute value of the displacement deviation is greater than or equal to the first preset deviation threshold and less than the second preset deviation threshold, then the second strategy is executed; If the absolute value of the displacement deviation is greater than or equal to the second preset deviation threshold and less than the third preset deviation threshold, then the third strategy is executed.
[0015] By adopting the above technical solution, the displacement deviation is divided into different intervals by setting multiple preset deviation thresholds, and corresponding compensation strategies are matched for different intervals. This achieves refined hierarchical processing of synchronization error, enabling the adoption of conservative strategies to maintain system stability when the deviation is small, and the use of more powerful compensation strategies such as proportional or proportional-integral to quickly eliminate the error when the deviation is medium or large. This effectively avoids the limitations of a single control strategy in dealing with deviations of different sizes.
[0016] Preferably, the first strategy is to set the initial velocity compensation amount to zero; The second strategy is to calculate the initial velocity compensation amount based on the product of the first preset proportional coefficient and the displacement deviation. The third strategy is to calculate the initial velocity compensation based on the product of the second preset proportional coefficient and the displacement deviation, and the sum of the preset integral coefficient and the historical cumulative value of the displacement deviation.
[0017] By adopting the above technical solutions, a zero-compensation strategy is used in the small deviation range to avoid oscillations caused by over-adjustment near the equilibrium point, thereby improving the stability of operation. In the medium deviation range, proportional control is introduced to achieve a fast and linear response to deviations, effectively suppressing further expansion of errors. In the large deviation range, proportional and integral control are combined to eliminate steady-state errors through integral action while responding quickly, ensuring accurate return to synchronization.
[0018] Preferably, the smoothing process of the initial velocity compensation amount to obtain the target velocity compensation amount includes: Obtain the historical speed compensation amount from the previous control cycle; Calculate the difference between the initial speed compensation amount and the historical speed compensation amount in the current control cycle to obtain the instantaneous change amount; Determine whether the absolute value of the instantaneous change is greater than the preset maximum allowable change per single period; If it is greater than that, then the algebraic sum of the historical speed compensation amount and the maximum allowable change amount in a single period is calculated as the target speed compensation amount; Otherwise, the initial speed compensation amount of the current control cycle shall be used as the target speed compensation amount.
[0019] By adopting the above technical solution and smoothing the initial speed compensation amount based on the rate of change limit, the step jump in speed compensation command caused by sudden deviation changes or control strategy switching is effectively avoided. This not only protects the motor and transmission mechanism and extends the service life of the equipment, but also makes the lifting and lowering process of the clothes hanger more stable and smooth, improving the user experience and sense of security.
[0020] Preferably, after identifying the preprocessed infrared sensor signal, the method further includes: If the preprocessed infrared sensor signal is in the second state, it is determined that the descent condition is not met, the descent of the clothes hanger is prohibited, and an alarm response operation is triggered.
[0021] By adopting the above technical solution, the clothes hanger can be prevented from descending and an alarm response can be triggered in time when the cabinet door is not opened, which can effectively prevent the equipment from colliding or getting stuck due to misoperation. At the same time, it enhances the intelligence of the system and the user interaction experience, and improves the overall safety and reliability.
[0022] The second objective of this invention is to provide a control system based on an electric lifting clothes rack, which improves the stability and safety of the electric lifting clothes rack.
[0023] The second objective of this invention is achieved through the following technical solution: A control system based on an electric lifting clothes rack, the electric lifting clothes rack including a main motor and a slave motor, the system comprising: The signal acquisition module is used to acquire infrared sensor signals in response to the clothes hanger lifting control command; The data acquisition module is used to determine the real-time operating status data of the master motor and slave motor based on the infrared sensor signal. The displacement calculation module is used to determine the real-time displacement of the master motor and the slave motor based on the operating status data. The deviation calculation module is used to calculate the displacement deviation between the master motor and the slave motor based on their real-time displacements. The compensation decision module is used to determine the initial velocity compensation amount based on the preset deviation range in which the absolute value of the displacement deviation is located; A smoothing module is used to smooth the initial velocity compensation amount to obtain the target velocity compensation amount; The motor control module is used to adjust the operating state of the master motor based on the target speed compensation amount, so as to realize the synchronous lifting and lowering of the master motor and the slave motor.
[0024] By adopting the above technical solutions, and through modular design, functions such as obstacle safety detection, dual-motor displacement synchronous monitoring, adaptive deviation compensation, and smooth control are organically integrated, a complete control system is constructed. This system realizes full-process automated control from safety protection and status perception to intelligent decision-making and precise execution, effectively improving the synchronization accuracy, adaptability, stability, and overall reliability of the electric lifting clothes rack.
[0025] Preferably, the infrared sensor signal includes a first state and a second state; The data acquisition module includes: The processing submodule is used to preprocess the infrared sensor signal to obtain the preprocessed infrared sensor signal. The identification submodule is used to identify the preprocessed infrared sensor signal; The acquisition submodule is used to acquire the operating status data of the master motor and slave motor in real time when the preprocessed infrared sensor signal is in the first state.
[0026] By adopting the above technical solution, the preprocessing, status recognition and data acquisition process of infrared sensor signals is modularized, which improves the accuracy and response efficiency of the system in judging the opening and closing status of the cabinet door. At the same time, it ensures that the data acquisition of the motor running status and the subsequent lowering operation are only started when the cabinet door is open under safe conditions, which effectively avoids malfunctions and enhances the safety and stability of the system.
[0027] The third objective of this invention is to provide an electronic device that improves the stability and safety of electric lifting clothes racks.
[0028] The above-mentioned third objective of this invention is achieved through the following technical solution: An electronic device includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed by the control method based on the electric lifting clothes rack described above.
[0029] The fourth objective of this invention is to provide a computer-readable storage medium capable of storing corresponding programs, which facilitates the improvement of the stability and safety of electric lifting clothes racks.
[0030] The fourth objective of this invention is achieved through the following technical solution: A computer-readable storage medium storing a computer program that can be loaded by a processor and execute the control method based on the electric lifting clothes rack described in any of the preceding claims.
[0031] The fifth objective of this invention is to provide a computer program product, including a computer program and program instructions stored on a non-transitory computer-readable storage medium, which has the characteristics of facilitating the improvement of the stability and safety of electric lifting clothes racks.
[0032] The fifth objective of this invention is achieved through the following technical solution: A computer program product that, when the program instructions are executed by a computer, causes the computer to perform the control method based on an electric lifting clothes rack as described in any of the preceding claims.
[0033] In summary, the present invention has at least one of the following beneficial technical effects: This invention can acquire infrared sensor signals after responding to the clothes hanger lifting control command, and collect master and slave motor operating status data based on this signal to determine the real-time displacement of the master and slave motors, calculate the displacement deviation, determine the initial speed compensation amount according to the deviation range, obtain the target speed compensation amount after smoothing, adjust the master motor operating status, realize synchronous lifting of master and slave motors, avoid danger caused by obstacles during descent, and improve the safety of clothes hanger use. This invention achieves precise synchronization between master and slave motors by real-time acquisition of operating status data of master and slave motors, determining real-time displacement and calculating displacement deviation, thus adapting to complex operating environments and long-term wear and tear. This invention adjusts the operating state of the main motor after smoothing the initial speed compensation amount, ensuring that the clothes hanger operates stably and efficiently during the lifting and lowering process. Attached Figure Description
[0034] Figure 1 This is a flowchart illustrating the steps of a control method based on an electric lifting clothes rack provided in Embodiment 1 of the present invention.
[0035] Figure 2 This is a product appearance diagram of an electric lifting clothes rack provided in Embodiment 1 of the present invention.
[0036] Figure 3 This is a hardware circuit block diagram of an electric lifting clothes rack provided in Embodiment 1 of the present invention.
[0037] Figure 4 This is a flowchart of a control method based on an electric lifting clothes rack provided in Embodiment 1 of the present invention.
[0038] Figure 5 This is a structural block diagram of a control system based on an electric lifting clothes rack provided in Embodiment 2 of the present invention. Detailed Implementation
[0039] This invention provides a control method and system based on an electric lifting clothes rack, addressing the shortcomings of existing electric lifting clothes racks in terms of the accuracy, adaptability, and operational stability of synchronous control, which consequently affect their overall stability and safety. It effectively improves the stability and safety of electric lifting clothes racks.
[0040] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0041] It should be noted that, in the embodiments of this invention, when the relevant object information and other related data are used in specific products or technologies, permission or consent from the object is required, and the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if the embodiments of this invention involve data related to an object, it must be obtained with the object's authorization and consent, the authorization and consent of relevant departments, and in accordance with the relevant laws, regulations, and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information requires the individual's consent; if sensitive information is involved, the separate consent of the information subject is required. The embodiments also need to be implemented with the object's authorization and consent.
[0042] It should be noted that the terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this disclosure.
[0043] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship. Example 1
[0044] Please see Figures 1 to 4 This invention provides a control method for an electric lifting clothes rack, the electric lifting clothes rack including a master motor and a slave motor, the method comprising: The electric lifting clothes rack includes a left motor (slave) and a right motor (master). The master and slave are connected via a communication line, which can be an RS485 communication line. This communication line is used for bidirectional data exchange between the master and slave, and its core functions include: 1. Real-time exchange of movement position data between the two motors, supporting position deviation calculation and speed compensation; 2. Transmission of heartbeat detection signals to ensure communication status monitoring; 3. Synchronization of command response and abnormal information, such as motor abnormalities and obstacle detection, to ensure that the master and slave work together to perform lifting, reversing, and pausing operations.
[0045] Furthermore, the right motor's hardware circuit uses an MCU as its control core, paired with a DC to DC power supply block to provide stable power. It also integrates multiple instruction input modules, including a touch module that supports manual operation, buttons, and an offline voice module that can receive voice control commands. In terms of communication, it not only has an RS485 communication block to achieve bidirectional data interaction with the slave unit through an RS485 communication line, but also carries an RF2.4G radio frequency block to expand wireless communication capabilities. In terms of detection modules, it is equipped with an infrared detection module, which is used to identify the cabinet door status and detect obstacles during lifting. It also integrates a Hall effect sensor to collect the motor speed in real time to calculate the moving position. The drive module is connected to the right motor through a motor drive block, receives MCU commands to control the motor to rotate forward, reverse, and pause, and performs speed compensation based on position deviation.
[0046] The left motor is also equipped with an independent MCU and DC to DC power supply block to achieve autonomous power supply and control calculation. The communication module only has an RS485 communication block, which synchronizes position data, heartbeat signals and abnormal information with the host through the RS485 communication line. There is no additional wireless communication module. The infrared detection module in the detection module is only used for obstacle detection during lifting and does not participate in the cabinet door status judgment. The Hall acquisition block collects the local motor speed in real time and calculates the movement position and feeds it back to the host. The drive module is connected to the left motor through the motor drive block, receives MCU instructions and speed compensation data synchronized with the host, and realizes coordinated lifting, reversing and pausing operations with the host. There is no independent instruction input module. Relevant instructions are transmitted synchronously by the host.
[0047] It should be noted that this electric lifting clothes rack is integrated into customized wardrobes, walk-in closets, or overall home furnishing solutions. As a subsystem of smart homes, it can be linked with a smart central control system to achieve scenario-based control. It can also be used in balconies, laundry rooms, or walk-in closets as a smart lifting clothes rack or clothing storage system. Its infrared safety detection function can prevent accidental operation that could cause pinching or collisions when the cabinet door is not open or when there are obstacles such as children or pets in the path. It is especially suitable for families with elderly people or children, improving the level of home safety.
[0048] Step 101: Respond to the clothes hanger lifting control command and obtain the infrared sensor signal.
[0049] Clothes hanger lifting control commands: These are digital or logical commands issued by the user through input devices such as touch buttons, offline voice modules, and RF2.4G wireless remote controls, used to control the electric lifting clothes hanger to perform rising, lowering, or pausing actions.
[0050] Infrared sensor signal: refers to the electrical signal output by the infrared sensor when detecting the status of the cabinet door or obstacle. It is usually in the form of high and low level and is used to indicate the presence or absence of the detected target.
[0051] It should be noted that the infrared sensor is an infrared pair or a reflective infrared sensor. When the sensor detects the status of the cabinet door, it outputs a digital level signal. A high level, such as "1", indicates that an obstruction has been detected, i.e., the cabinet door is closed / there is an obstacle. A low level, such as "0", indicates that no obstruction has been detected, i.e., the cabinet door is open / there is no obstacle.
[0052] Understandably, after responding to the clothes hanger lifting control command, the command is parsed to obtain the operation code field. The operation code field is compared with the preset command code library to determine the command type. If the command type is descent, an infrared sensor is used for detection to obtain the infrared sensor signal. If the command type is ascent, since the ascent action usually retracts the clothes hanger into the cabinet or away from the ground, the risk of collision is low. Therefore, the subsequent synchronous control process can proceed directly. The preset command code library defines the mapping relationship between different operation codes and command types, such as ascent, descent, pause, and light on. For example, operation code 0x01 corresponds to a descent command, 0x02 corresponds to an ascent command, and so on.
[0053] In this embodiment of the invention, when a user triggers a clothes hanger lifting control command via touch button, offline voice module, or RF2.4G wireless remote control, the main control unit, such as the MCU on the right motor side, after receiving the command, first determines whether the command type is a descent command. If it is a descent command, the main control unit immediately reads the output level of the infrared sensor through its I / O port to obtain the infrared sensor signal.
[0054] Step 102: Based on the infrared sensor signal, determine the real-time operating status data of the master motor and slave motor.
[0055] The infrared sensor signal includes a first state and a second state.
[0056] First state: refers to the system state characterized by the infrared sensor output being low. In this state, the infrared sensor detects that the infrared light it emits is not reflected or blocked, indicating that the infrared beam path is unobstructed. In practical application scenarios, this corresponds to the cabinet door being fully open or there being no obstacles on the descent path.
[0057] The second state refers to the system state characterized by the infrared sensor outputting a high level. In this state, the infrared sensor detects that the infrared light it emits is reflected or blocked, indicating that the infrared beam path is blocked. This corresponds to the cabinet door being closed or an obstacle being present on the descent path in actual application scenarios.
[0058] Preferably, step 102, determining whether the obstacle detection signal meets the preset descent conditions, may include the following sub-steps: S11. Preprocess the infrared sensor signal to obtain the preprocessed infrared sensor signal.
[0059] Preprocessed infrared sensor signal: refers to a stable and clean digital signal obtained after preprocessing operations such as filtering and shaping, which can be directly used for logical judgment and control decision-making.
[0060] In this embodiment of the invention, since the infrared sensor may be affected by factors such as ambient light, electromagnetic interference or mechanical vibration during the detection process, the original signal may have glitches or level fluctuations. Therefore, the signal is first low-pass filtered to suppress high-frequency noise, and then the filtered signal is shaped by a digital comparator to convert it into a stable logic level signal, thereby obtaining the preprocessed infrared sensor signal.
[0061] S12. Identify the pre-processed infrared sensor signal.
[0062] Understandably, the main control unit compares the pre-processed level signal with a preset threshold, such as 50% of the power supply voltage as the dividing point: if the signal is low and below the threshold, it is determined to be in the first state, indicating that the cabinet door is open or the path is unobstructed; if the signal is high and above the threshold, it is determined to be in the second state, indicating that the cabinet door is closed or there is an obstacle in the path.
[0063] In this embodiment of the invention, the preprocessed infrared sensor signal is compared with a preset threshold to determine whether the infrared sensor signal is in a first state or a second state.
[0064] S13. When the preprocessed infrared sensor signal is in the first state, the operating status data of the host motor and slave motor are collected in real time.
[0065] Operating status data refers to a set of parameters that reflect the motor's motion status, including at least: the cumulative number of pulses output by the Hall sensor (used to calculate displacement), instantaneous speed, direction indicator (forward / reverse), and possibly health status information such as motor temperature and current.
[0066] Understandably, when the pre-processed infrared sensor signal is identified as being in the first state, the main control unit (right motor MCU) determines that the safe descent condition is met. Through its integrated Hall sensor acquisition block, it reads the Hall sensor pulse signal of the right motor in real time, thereby obtaining its original operating data such as speed, direction, and pulse accumulation. At the same time, the main control unit sends a data request command to the left motor MCU through the RS485 communication block. After receiving the command, the slave MCU collects the real-time operating data of the left motor through its own Hall sensor acquisition block and sends the data back to the main MCU through the RS485 communication line. Thus, the main MCU synchronously obtains the real-time operating status data of both the main and slave MCUs.
[0067] In this embodiment of the invention, when the preprocessed infrared sensor signal is in the first state, the operating status data of the host motor and the slave motor are collected in real time.
[0068] In addition to the above-described feasible embodiments, the following sub-steps may be included after S12: S21. If the preprocessed infrared sensor signal is in the second state, it is determined that the descent conditions are not met, the clothes hanger is prohibited from descending, and an alarm response operation is triggered.
[0069] It should be noted that alarm response actions include, but are not limited to, voice, light, and beeping.
[0070] In this embodiment of the invention, when the pre-processed infrared sensor signal is identified as being in the second state, the main control unit (right motor MCU) immediately determines that the current conditions for safe descent are not met, sends a locking command to the motor drive block, and controls the main motor and slave motor to immediately enter braking or holding states to ensure that the clothes hanger does not undergo any downward displacement. Simultaneously, a preset alarm program is also activated, for example, by broadcasting a prompt voice through the connected offline voice module, such as "Cabinet door not open, descent prohibited" or "Obstacle detected," and sending an alarm status code to the user's remote control or central control system via the RF2.4G radio frequency block. The alarm will continue until the infrared sensor signal returns to the first state or the user provides manual confirmation.
[0071] It is worth mentioning that during this real-time data acquisition and communication process, the system also executes the following safety monitoring and anomaly handling logic in parallel to ensure the reliability and safety of the entire lifting process: 1. Motor Anomaly Monitoring: The host MCU continuously verifies the validity of local data and data received from the slave unit. If no local Hall signal is collected within a preset time, it indicates that the host motor may be stalling, the encoder may be faulty, or the drive may be malfunctioning. Alternatively, if no response data is received from the slave unit via RS485, it indicates that the slave motor may be malfunctioning, the slave MCU may be faulty, or the communication link may be interrupted at a single point. Therefore, the host control unit immediately determines that a motor anomaly has occurred, controls both motors to enter a safe stop state, and broadcasts a specific alarm voice through the offline voice module, such as "Motor anomaly, please check".
[0072] 2. Obstacle Dynamic Detection: During the descent of the clothes hanger, the master and slave infrared detection modules continuously operate, detecting obstacles in real time along the descent path. If any infrared sensor detects an obstacle, its output becomes a high level "1". The master control unit will immediately send an emergency command to the slave unit via RS485, controlling both the master and slave motors to simultaneously reverse until the obstacle is cleared or a safe position is reached. Simultaneously, the offline voice module will broadcast an obstacle alarm, such as "Obstacle detected, reversing."
[0073] 3. Communication Heartbeat Monitoring: The master and slave devices communicate via an RS485 communication line, sending heartbeat detection signals to each other at fixed intervals, such as every 100 milliseconds. If the master device does not receive a heartbeat signal from the slave device within several consecutive cycles, it is determined to be a communication abnormality, such as a broken communication line or a dead slave MCU. In this case, the master device will control the local motor to stop and attempt to restore communication. If it cannot restore communication, it will broadcast a communication fault through the offline voice module, such as "Communication abnormality, please check the connection".
[0074] It should be noted that the above-mentioned anomaly monitoring runs continuously as a background task, and the high-priority interruption it triggers can interrupt the normal lifting process at any time to ensure that safety response takes precedence over motion control.
[0075] Step 103: Based on the operating status data, determine the real-time displacement of the master motor and the slave motor.
[0076] Preferably, step 103 may include the following sub-steps: S31. Extract the real-time pulse accumulation count of the master motor and slave motor respectively from the operating status data.
[0077] Real-time pulse accumulation: refers to the total number of valid pulse signals output by the motor Hall sensor from a certain reference time, such as the initial power-on time or the zeroing time, up to the current time.
[0078] Understandably, after acquiring the synchronized master and slave operating status data, the master control unit parses the data and extracts the real-time pulse accumulation count from it. Specifically: For the master motor, the cumulative pulse count is directly derived from the counter register value of the local Hall sensor acquisition block. This register records the cumulative number of all pulses generated by the master motor's Hall sensor since system startup or the last reset. For the slave motor, the cumulative pulse count is extracted from the slave status data frame received via RS485 communication. This data frame contains the locally accumulated pulse value synchronously acquired and packaged by the slave MCU.
[0079] In this embodiment of the invention, the value of the pulse accumulation digital segment is read from the running status data.
[0080] S32. Calculate the real-time displacement of the main motor based on the real-time cumulative number of pulses of the main motor and the first preset conversion coefficient.
[0081] The first preset conversion factor refers to the proportional coefficient that converts the cumulative number of pulses of the host motor into the real-time linear displacement of its drive side. This value is determined by the encoder resolution of the host motor itself and the geometric and motion parameters of the mechanical transmission mechanism it drives, including but not limited to the lead screw, reduction ratio, etc. It is determined by parameter calibration before leaving the factory and remains unchanged during use.
[0082] Real-time displacement: refers to the actual linear distance that the clothes hanger moves relative to a preset reference point, such as the upper limit or zero point, under the drive of the motor.
[0083] Understandably, after extracting the real-time cumulative pulse count of the main motor, the main control unit calculates the real-time displacement of the main motor using the following formula:
[0084] In the formula, For the real-time displacement of the main motor, This represents the real-time pulse accumulation count. This is the first preset conversion coefficient.
[0085] First preset conversion coefficient The method for determining it is as follows:
[0086] In the formula, L is the lead of the lead screw or traction mechanism, which is the distance the clothes hanger moves in the straight line when the motor rotates one revolution, and the unit is millimeters per revolution (mm / rev). The encoder resolution of the host motor is the number of pulses output by its Hall sensor when the motor rotates one revolution, measured in pulses per revolution (pulse / rev). This is the mechanical transmission ratio on the host side. If there is a speed reduction or speed increase mechanism, it is defined as the ratio of the motor output shaft speed to the final drive screw speed. If it is a direct drive, then =1.
[0087] It should be noted that, , as well as The methods for obtaining it are as follows: L is the inherent geometric and design parameter of the linear transmission mechanism such as lead screw, rack, or traction wheel used. It can be directly read from the product design drawings, specifications, or technical data provided by the manufacturer, or it can be calculated by measuring the exact integer number of revolutions of the motor, such as the total distance D that the load moves after N revolutions, and then calculating L=D / N. These are inherent electrical parameters of the main motor assembly. They can be obtained directly from the product specifications of the motor or motor driver. Alternatively, with the control circuit powered on but the motor unloaded, the motor output shaft can be manually rotated slowly one full revolution, and the total number of Hall pulses generated during this process can be counted using the counting function of the MCU. It is the comprehensive kinematic parameter of all intermediate transmission links between the main motor output shaft and the final drive screw / traction wheel. The total transmission ratio can be calculated by the number of teeth of all gears in the transmission chain or the pitch circle diameter of the pulley. If it is a reduction, If it is the growth rate, If the motor is directly connected to the leadscrew, then =1, or you can lock the hanger to keep it stationary. Mark the motor output shaft and the end of the lead screw, manually rotate the motor, and record the rotation of the motor shaft. During the rotation, the lead screw rotates... Circle, then .
[0088] In this embodiment of the invention, the real-time displacement of the host motor is calculated based on the real-time cumulative number of pulses of the host motor and the first preset conversion coefficient.
[0089] S33. Calculate the real-time displacement of the slave motor based on the real-time pulse accumulation of the slave motor and the second preset conversion coefficient.
[0090] The second preset conversion coefficient is a proportional coefficient used to convert the cumulative number of pulses of the slave motor into the real-time linear displacement of its drive side. This value is determined by the encoder resolution of the slave motor itself and the actual parameters of the mechanical transmission mechanism it drives. This coefficient is calibrated and fixed during system manufacturing or commissioning.
[0091] Slave real-time displacement: refers to the actual linear distance the clothes hanger moves relative to the same preset reference point under the drive of the slave motor.
[0092] It should be noted that the same preset reference point must be consistent with the host side reference point, which is usually achieved by aligning the system upon power-up or through a zero-finding operation.
[0093] After extracting the real-time pulse accumulation count of the slave motor, the master control unit calculates the real-time displacement of the slave motor using the following formula:
[0094] In the formula, This represents the real-time displacement of the slave motor. This represents the real-time pulse accumulation count. This is the second preset conversion coefficient.
[0095] It should be noted that the method for determining the second preset conversion coefficient is similar to that for the first preset conversion coefficient, but it requires the use of parameters from the slave side, which will not be elaborated here. Furthermore, due to manufacturing tolerances, assembly differences, or long-term wear, the mechanical transmission mechanisms and motor characteristics of the master and slave machines cannot be completely identical. Therefore, the second preset conversion coefficient is usually different from the first preset conversion coefficient in value. The process of obtaining the second preset conversion coefficient is the same as that of the first preset conversion system, but it must be calculated and calibrated independently using the actual parameters from the slave side.
[0096] In this embodiment of the invention, the real-time displacement of the slave motor is calculated based on the real-time cumulative number of pulses of the master motor and the second preset conversion coefficient.
[0097] The first preset conversion coefficient and the second preset conversion coefficient are determined based on the encoder resolution, mechanical transmission ratio and lead parameters of the corresponding motor.
[0098] Step 104: Calculate the displacement deviation between the master motor and the slave motor based on their real-time displacement.
[0099] Preferably, step 104 may include the following sub-steps: S41. Calculate the difference between the real-time displacement of the slave motor and the real-time displacement of the master motor to obtain the displacement deviation.
[0100] Understandably, after calculating the real-time displacement of the master motor and the slave motor respectively, the following calculation is performed to obtain the displacement deviation:
[0101] In the formula, This is the displacement deviation. For the real-time displacement of the slave motor, This is the real-time displacement of the main motor.
[0102] It is worth mentioning that when When, it indicates that the real-time displacement of the slave motor is greater than the real-time displacement of the master motor, that is, the position of the clothes hanger on the slave side is relatively ahead of the master side, or the master side is relatively lagging behind; when When this occurs, it indicates that the real-time displacement of the slave motor is less than the real-time displacement of the master motor, meaning the position of the clothes hanger on the slave side is relatively lagging behind the master side, or the master side is relatively ahead. When the time is equal, it indicates that the master and slave motors have the same real-time displacement, and the clothes hanger is in an ideal synchronized state.
[0103] In this embodiment of the invention, the two calculated absolute position information are converted into a relative quantity that directly represents the magnitude of the synchronization error, thereby effectively used to determine the severity of the deviation and select the corresponding compensation strategy.
[0104] Step 105: Determine the initial velocity compensation amount based on the preset deviation range in which the absolute value of the displacement deviation is located.
[0105] Preferably, step 105 may include the following sub-steps: S51. The absolute value of the displacement deviation is compared with the first preset deviation threshold, the second preset deviation threshold and the third preset deviation threshold respectively.
[0106] The absolute value of the displacement deviation: refers to the magnitude of the displacement deviation, without directional information, and is a non-negative value used to assess the severity of synchronization error.
[0107] Preset deviation threshold: refers to the boundary value set in advance to divide the magnitude of synchronization error. The specific value can be determined by engineering experience and experimental testing based on factors such as the mechanical transmission accuracy of a typical household electric lifting clothes rack (usually the lead screw is 2-4mm), the physical width of the clothes rack (usually 1-1.5 meters), and the maximum tilt angle allowed for safe operation (usually corresponding to a height difference of no more than 5-10mm between the two sides).
[0108] It is understandable that the absolute value of the obtained displacement deviation is compared with the first preset deviation threshold. Second preset deviation threshold Third preset deviation threshold In comparison, among which, By comparing these factors, the severity of the current synchronization error can be categorized into four different ranges, allowing for the implementation of different control strategies.
[0109] Preferably, the first preset deviation threshold can be 0.5mm, the second preset deviation threshold can be 2.0mm, and the third preset deviation threshold can be 5.0mm.
[0110] Understandably, by comparing threshold values, the displacement deviation can be divided into four intervals: 1. Interval 1:
[0111] 2. Interval Two:
[0112] 3. Interval Three:
[0113] 4. Interval Four:
[0114] In this embodiment of the invention, the absolute value of the displacement deviation is compared with a first preset deviation threshold, a second preset deviation threshold, and a third preset deviation threshold to determine different intervals.
[0115] S52. If the absolute value of the displacement deviation is less than the first preset deviation threshold, then the first strategy is executed.
[0116] Specifically, the first strategy is to set the initial velocity compensation to zero.
[0117] Initial speed compensation: refers to the original speed adjustment value calculated based on the current displacement deviation using a preset control strategy, without any limiting or filtering processing.
[0118] The first strategy refers to a non-intervention control strategy or zero-compensation strategy adopted when the absolute value of the displacement deviation is in a small range.
[0119] In this embodiment of the invention, when the comparison result shows that the absolute value of the displacement deviation is less than the first preset deviation threshold, it is determined that the current synchronization error is within an acceptable small range. Therefore, the initial speed compensation amount that needs to be output in the current control cycle is directly assigned to 0, which avoids torque fluctuations, mechanical vibrations and additional energy consumption caused by frequent small speed adjustments, making the clothes hanger run more smoothly and quietly.
[0120] S53. If the absolute value of the displacement deviation is greater than or equal to the first preset deviation threshold and less than the second preset deviation threshold, then the second strategy is executed.
[0121] Specifically, the second strategy is to calculate the initial velocity compensation based on the product of the first preset proportional coefficient and the displacement deviation.
[0122] First preset proportional coefficient: refers to a positive gain parameter used in the second strategy to linearly convert the displacement deviation into the initial velocity compensation.
[0123] The second strategy refers to a proportional control algorithm used when the absolute value of the displacement deviation is in a medium range.
[0124] When the comparison result is the absolute value of the displacement deviation, it satisfies When the main control unit determines that the current synchronization error has exceeded a negligible range and entered a medium deviation range requiring active correction, it needs to execute the second strategy, which is a proportional control algorithm calculated using the following formula:
[0125] In the formula, This is the initial velocity compensation amount. First preset proportional coefficient, This represents the displacement deviation.
[0126] It should be noted that the first preset proportional coefficient can be initially estimated based on the system's electromechanical time constant and control cycle, and is preferably... .
[0127] In this embodiment of the invention, if the absolute value of the displacement deviation is greater than or equal to the first preset deviation threshold and less than the second preset deviation threshold, the product of the first preset proportional coefficient and the displacement deviation is calculated as the initial velocity compensation amount.
[0128] S54. If the absolute value of the displacement deviation is greater than or equal to the second preset deviation threshold and less than the third preset deviation threshold, then the third strategy is executed.
[0129] Specifically, the third strategy is to calculate the initial velocity compensation based on the product of the second preset proportional coefficient and the displacement deviation, and the sum of the preset integral coefficient and the historical cumulative value of the displacement deviation.
[0130] Second preset scaling factor: refers to the positive gain parameter used in the third strategy to provide a fast scaling response.
[0131] Preset integral coefficient: refers to the positive gain parameter used in the third strategy to eliminate steady-state error.
[0132] The third strategy refers to a proportional-integral (PI) control algorithm used when the absolute value of the displacement deviation is in a large range.
[0133] When the comparison result is the absolute value of the displacement deviation, it satisfies When the main control unit determines that the current synchronization error has reached a large deviation range requiring strong correction, it needs to execute the third strategy, which is calculated using the following formula:
[0134] In the formula, This is the second preset proportional coefficient. For the preset integral coefficient, It is the cumulative value of displacement deviation within a certain historical window or since the last time it entered this interval.
[0135] It should be noted that the second preset proportional coefficient is usually slightly larger than the first preset proportional coefficient in order to provide a stronger instantaneous proportional response when the deviation is large, and to speed up the correction of the main deviation components. The preset integral coefficient needs to be set to ensure that the integral action is smooth, so as to avoid system overshoot oscillation due to integral saturation or too fast accumulation.
[0136] Preferably, the second preset proportional coefficient can be The preset integral coefficient can be The specific value can be determined through simulation or on-site debugging based on the actual system's load inertia, motor response capability, and maximum allowable adjustment time.
[0137] It should be noted that the historical cumulative value of the displacement deviation can be obtained in the following ways: When the absolute value of the displacement deviation first enters or re-enters the third strategy range, the main control unit initiates or resets the integral accumulation process. This ensures that the integral action only accumulates errors that persist within the larger deviation range, avoiding the inclusion of errors in small or medium deviation ranges into the integral, thereby preventing integral saturation or over-adjustment. Then, during the active phase of the integral action, the main control unit performs the following operations in each control cycle, such as every T milliseconds: Get the displacement deviation for the current period .
[0138] Will Multiply by the control period T to obtain the integral increment of the deviation within the current period. .
[0139] The increment is added to the historical cumulative value register: .
[0140] Finally, when the absolute value of the displacement deviation falls outside the third strategy range, the main control unit stops integrating and accumulating, but usually maintains the current value. The value remains unchanged.
[0141] It is worth mentioning that, to prevent the integral term from becoming too large due to long-term accumulation, which could lead to the control quantity exceeding the limit, a positive and negative symmetrical limit value will also be set for the historical accumulated value. That is, when At that time, a mandatory order ;when At that time, a mandatory order .
[0142] In this embodiment of the invention, if the absolute value of the displacement deviation is greater than or equal to the second preset deviation threshold and less than the third preset deviation threshold, the product of the second preset proportional coefficient and the displacement deviation is calculated, and the sum of the preset integral coefficient and the historical cumulative value of the displacement deviation is added. The calculation result is used as the initial velocity compensation amount.
[0143] Based on the above-described feasible embodiments, when the absolute value of the displacement deviation is greater than or equal to the third preset deviation threshold, the main control unit determines that the current synchronization error has entered a dangerous or faulty range. This deviation exceeds the range that can be safely and effectively compensated by conventional control algorithms, and immediately executes the highest priority safety protection strategy: such as the main control unit sending an emergency stop command to the motor drive blocks of the host and slave units, controlling the dual motors to immediately enter the braking or free stop state, stopping the current lifting motion, continuously broadcasting clear safety alarm voice through the offline voice module, and sending a specific fault status code to the host computer or user remote control through the RF2.4G radio frequency block. It can also be placed in a fault lock state to block all subsequent lifting control commands to prevent misoperation, and record the current displacement deviation, motor status, timestamp and other information in non-volatile memory for subsequent diagnosis and analysis.
[0144] It is worth mentioning that this state usually requires manual intervention, such as checking the mechanical structure, removing foreign objects, and resetting the system before it can be resolved. At the same time, during the reset, the historical accumulated values are cleared to zero, and the motor position is recalibrated or zeroed to restore the normal working state.
[0145] Step 106: Smooth the initial velocity compensation amount to obtain the target velocity compensation amount.
[0146] Preferably, step 106 may include the following sub-steps: S61. Obtain the historical speed compensation amount from the previous control cycle.
[0147] Previous control cycle: refers to the fixed time interval immediately preceding the current control cycle in which all control calculations and executions have been completed.
[0148] Historical speed compensation: refers to the speed compensation value that is finally output and applied to the motor drive after calculation by the complete control algorithm in the previous control cycle.
[0149] When the smoothing process begins at the start of the current control cycle, the main control unit first needs to obtain the speed compensation amount that was finally output from the previous control cycle and actually applied to the motor drive. This value is called the historical speed compensation amount, denoted as . .
[0150] Understandably, the main control unit reads this value from its internal memory, and at the end of each control cycle, it calculates and determines the target speed compensation amount based on all the steps of that cycle. The data is stored in this memory as the historical speed compensation amount for the next control cycle, and the following relationship exists:
[0151] In the formula, For the current nth control cycle, This refers to the previous control cycle.
[0152] In this embodiment of the invention, the historical speed compensation amount of the previous control cycle is obtained.
[0153] S62. Calculate the difference between the initial speed compensation amount and the historical speed compensation amount in the current control cycle to obtain the instantaneous change amount.
[0154] Instantaneous change: refers to the difference between the newly calculated value of the current period and the old value of the previous period for the same physical quantity.
[0155] Understandably, after obtaining the historical speed compensation amount, the instantaneous change is determined using the following formula:
[0156] In the formula, It is a quantity that changes instantaneously.
[0157] It should be noted that when When, it indicates that the compensation command calculated in the current control cycle has increased compared to the previous cycle; when When, it indicates that the current compensation instruction has not changed. When this occurs, it indicates that the current compensation command has decreased compared to the previous cycle.
[0158] In this embodiment of the invention, the initial velocity compensation amount calculated directly based on the latest displacement deviation and corresponding strategy within the current control cycle is subtracted from the historical velocity compensation amount of the previous cycle to obtain the degree of abrupt change between the two cycles, which can quantitatively determine the transient intensity of the control command.
[0159] S63. Determine whether the absolute value of the instantaneous change is greater than the preset maximum allowable change per single period.
[0160] The preset maximum allowable change per single cycle refers to the maximum absolute value of the allowable speed compensation amount between two adjacent control cycles.
[0161] It should be noted that the maximum allowable change in a single cycle is determined comprehensively based on the motor's maximum acceleration / deceleration capability, the mechanical stiffness and strength of the transmission mechanism, and the system's requirements for operational stability. This limits the maximum allowable change in the speed compensation command between two adjacent control cycles. If the command change exceeds this limit, it may cause current surges to the motor driver, resulting in mechanical vibration or audible noise.
[0162] In this embodiment of the invention, it is determined whether the absolute value of the instantaneous change is greater than the preset maximum allowable change in a single period.
[0163] S64. If it is greater than, then calculate the algebraic sum of the historical speed compensation amount and the maximum allowable change amount in a single cycle, and use it as the target speed compensation amount.
[0164] Target speed compensation amount: refers to the speed compensation command value that is finally determined and will be output to the motor driver after smoothing.
[0165] It is understandable that the absolute value of an instantaneous change... Greater than the preset maximum allowable change per single period At that time, to prevent the impact of this mutation, a limiting output strategy is implemented, specifically: Based on the sign of the instantaneous change, it is determined whether to add or subtract a maximum allowable change from the historical compensation amount, thereby obtaining the target speed compensation amount for this control cycle:
[0166] In the formula, For the target speed compensation amount, For a sign function, when hour, ,when hour, .
[0167] In this embodiment of the invention, the algebraic sum of the historical speed compensation amount and the maximum allowable change amount in a single cycle is calculated as the target speed compensation amount. This can smooth the transition of motor drive commands by smoothing out abrupt peaks into the maximum allowable gradual changes, effectively avoiding torque abrupt changes, mechanical vibration and operating noise, protecting the motor and transmission mechanism, and improving operating comfort.
[0168] S65. Otherwise, the initial speed compensation amount of the current control cycle shall be used as the target speed compensation amount.
[0169] In this embodiment of the invention, if the absolute value of the instantaneous change is less than or equal to the preset maximum allowable change in a single cycle, it is determined that the change range of the currently calculated initial speed compensation amount is within an acceptable safety and smooth range. There is no need to perform mandatory amplitude limiting, and the initial speed compensation amount is directly used as the target speed compensation amount, which simplifies the processing flow and improves real-time calculation efficiency.
[0170] Step 107: Based on the target speed compensation amount, adjust the operating state of the main motor to achieve synchronous lifting and lowering of the main motor and the slave motor.
[0171] Adjusting the operating status of the main motor: This refers to controlling the speed, direction, and torque of the main motor by changing the electrical parameters applied to it, thereby changing the speed and position of the clothes hanger side it drives.
[0172] Synchronous lifting: This refers to the real-time coordination of the drive speeds of the main and slave motors during the lifting process of the clothes hanger, thereby ensuring that the linear displacement on both sides of the clothes hanger remains consistent within the allowable error range, and the clothes hanger as a whole maintains horizontal movement without tilting or jamming.
[0173] After obtaining the target speed compensation amount, the main control unit directly uses it as the speed adjustment command for the master motor in the current control cycle. The main control unit converts the speed adjustment command into a corresponding PWM signal or voltage signal through its motor drive block, and drives the master motor to run according to the command, thereby adjusting its speed in real time to compensate for the displacement deviation between the master motor and the slave motor.
[0174] Meanwhile, the master control unit sends the target speed compensation amount to the slave motor's MCU in real time via an RS485 communication line. Based on the received compensation amount and its local reference speed, the slave MCU calculates its own target speed and drives the slave motor to run.
[0175] For example, assuming that in the current control cycle, the target speed compensation amount is calculated to be +30mm / s after all the aforementioned steps, this positive value indicates that the host motor needs to increase its speed.
[0176] The main control unit adds a compensation of +30 mm / s to the current base speed command. For example, if the base descent speed is 100 mm / s, the target speed of the main motor is 130 mm / s. Then, according to the internally preset speed-control quantity mapping relationship, the target speed of 130 mm / s is converted into the corresponding PWM duty cycle. For example, if the duty cycle is adjusted from the original 60% to 78%, the motor drive block adjusts the drive voltage or current output to the main motor according to the PWM signal, so that the actual speed of the main motor is increased to about 130 mm / s, thereby achieving acceleration.
[0177] Meanwhile, the master control unit encapsulates the target speed compensation amount +30mm / s into a data frame via the RS485 communication line and sends it to the MCU of the slave motor. After receiving the data, the slave MCU parses out the speed compensation amount. Since the slave usually follows the master speed as a reference, the slave MCU may directly use the received target speed (130 mm / s) as its own target, or it may make fine-tuning calculations based on its own reference. The slave MCU controls its local motor drive block to drive the slave motor to accelerate synchronously to about 130 mm / s.
[0178] In this embodiment of the invention, the operating state of the master motor is adjusted based on the target speed compensation amount to achieve synchronous lifting and lowering of the master motor and the slave motor. Example 2
[0179] Please see Figure 5The present invention provides a control system based on an electric lifting clothes rack, comprising: The signal acquisition module 201 is used to acquire infrared sensor signals in response to the clothes hanger lifting control command.
[0180] The data acquisition module 202 is used to determine the real-time operating status data of the master motor and slave motor based on infrared sensor signals.
[0181] The displacement calculation module 203 is used to determine the real-time displacement of the master motor and the slave motor based on the operating status data.
[0182] The deviation calculation module 204 is used to calculate the displacement deviation between the master motor and the slave motor based on their real-time displacement.
[0183] The compensation decision module 205 is used to determine the initial velocity compensation amount based on the preset deviation range in which the absolute value of the displacement deviation is located.
[0184] The smoothing module 206 is used to smooth the initial velocity compensation amount to obtain the target velocity compensation amount.
[0185] The motor control module 207 is used to adjust the operating state of the master motor based on the target speed compensation amount, so as to realize the synchronous lifting and lowering of the master motor and the slave motor.
[0186] Preferably, the infrared sensor signal includes a first state and a second state.
[0187] The data acquisition module 202 includes the following sub-modules: The processing submodule is used to preprocess the infrared sensor signal to obtain the preprocessed infrared sensor signal.
[0188] The identification submodule is used to identify the pre-processed infrared sensor signals.
[0189] The acquisition submodule is used to acquire the operating status data of the master motor and slave motor in real time when the preprocessed infrared sensor signal is in the first state.
[0190] Since the above is a system corresponding to a control method based on an electric lifting clothes rack, and its implementation principle is the same as that of a control method based on an electric lifting clothes rack, for the sake of convenience and brevity, those skilled in the art can clearly understand that the specific working process of the system and modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. Example 3
[0191] An electronic device according to an embodiment of the present invention includes: a memory and a processor, wherein the memory stores a computer program; when the computer program is executed by the processor, the processor performs a control method based on an electric lifting clothes rack as described in any of the above embodiments.
[0192] The memory can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. The memory has storage space for program code used to perform any of the method steps described above. For example, the storage space for program code may include individual program codes for implementing the various steps in the methods described above. This program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact discs (CDs), memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When run by a computing processing device, this code causes the computing processing device to perform the various steps in the methods described above. Example 4
[0193] This invention provides a computer-readable storage medium storing a computer program thereon, which, when executed, implements the control method based on an electric lifting clothes rack according to any of the above embodiments. Example 5
[0194] This invention provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the control method based on an electric lifting clothes rack as described in any of the above embodiments.
[0195] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0196] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0197] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0198] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0199] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0200] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A control method based on an electric lifting clothes rack, characterized in that, The electric lifting clothes rack includes a main motor and a slave motor, and the method includes: Responding to the clothes hanger lifting control command, it acquires infrared sensor signals; Based on the infrared sensor signals, the real-time operating status data of the master motor and slave motor are determined; Based on the operating status data, the real-time displacements of the master motor and the slave motor are determined. Based on the real-time displacement of the master motor and the slave motor, the displacement deviation between them is calculated. The initial velocity compensation amount is determined based on the preset deviation range in which the absolute value of the displacement deviation falls; The initial velocity compensation amount is smoothed to obtain the target velocity compensation amount; Based on the target speed compensation amount, the operating state of the master motor is adjusted to achieve synchronous lifting and lowering of the master motor and the slave motor.
2. The control method based on an electric lifting clothes rack according to claim 1, characterized in that, The infrared sensor signal includes a first state and a second state; The step of determining the real-time operating status data of the master motor and slave motor based on the infrared sensor signal includes: The infrared sensor signal is preprocessed to obtain the preprocessed infrared sensor signal; Identify the preprocessed infrared sensor signal; When the preprocessed infrared sensor signal is in the first state, the operating status data of the master motor and slave motor are collected in real time.
3. The control method based on an electric lifting clothes rack according to claim 1, characterized in that, Determining the real-time displacement of the master motor and the slave motor based on the operating status data includes: The real-time pulse counts of the master motor and the slave motor are extracted from the operating status data, respectively. The real-time displacement of the main motor is calculated based on the real-time cumulative number of pulses of the main motor and the first preset conversion coefficient. The real-time displacement of the slave motor is calculated based on the real-time pulse accumulation of the slave motor and the second preset conversion coefficient. The first preset conversion coefficient and the second preset conversion coefficient are determined based on the encoder resolution, mechanical transmission ratio and lead parameters of the corresponding motor.
4. The control method based on an electric lifting clothes rack according to claim 1, characterized in that, The calculation of the displacement deviation between the master motor and the slave motor based on their real-time displacement includes: The displacement deviation is obtained by calculating the difference between the real-time displacement of the slave motor and the real-time displacement of the master motor.
5. The control method based on an electric lifting clothes rack according to claim 1, characterized in that, Determining the initial velocity compensation amount based on the preset deviation range where the absolute value of the displacement deviation falls includes: The absolute value of the displacement deviation is compared with the first preset deviation threshold, the second preset deviation threshold, and the third preset deviation threshold, respectively. If the absolute value of the displacement deviation is less than the first preset deviation threshold, then the first strategy is executed; If the absolute value of the displacement deviation is greater than or equal to the first preset deviation threshold and less than the second preset deviation threshold, then the second strategy is executed; If the absolute value of the displacement deviation is greater than or equal to the second preset deviation threshold and less than the third preset deviation threshold, then the third strategy is executed.
6. The control method based on an electric lifting clothes rack according to claim 5, characterized in that, The first strategy is to set the initial velocity compensation amount to zero; The second strategy is to calculate the initial velocity compensation amount based on the product of the first preset proportional coefficient and the displacement deviation. The third strategy is to calculate the initial velocity compensation based on the product of the second preset proportional coefficient and the displacement deviation, and the sum of the preset integral coefficient and the historical cumulative value of the displacement deviation.
7. The control method based on an electric lifting clothes rack according to claim 1, characterized in that, The process of smoothing the initial velocity compensation amount to obtain the target velocity compensation amount includes: Obtain the historical speed compensation amount from the previous control cycle; Calculate the difference between the initial speed compensation amount and the historical speed compensation amount in the current control cycle to obtain the instantaneous change amount; Determine whether the absolute value of the instantaneous change is greater than the preset maximum allowable change per single period; If it is greater than that, then the algebraic sum of the historical speed compensation amount and the maximum allowable change amount in a single period is calculated as the target speed compensation amount; Otherwise, the initial speed compensation amount of the current control cycle shall be used as the target speed compensation amount.
8. The control method based on an electric lifting clothes rack according to claim 2, characterized in that, After identifying the preprocessed infrared sensor signal, the method further includes: If the preprocessed infrared sensor signal is in the second state, it is determined that the descent condition is not met, the descent of the clothes hanger is prohibited, and an alarm response operation is triggered.
9. A control system based on an electric lifting clothes rack, characterized in that, The electric lifting clothes rack includes a main motor and a slave motor, and the system includes: The signal acquisition module is used to acquire infrared sensor signals in response to the clothes hanger lifting control command; The data acquisition module is used to determine the real-time operating status data of the master motor and slave motor based on the infrared sensor signal. The displacement calculation module is used to determine the real-time displacement of the master motor and the slave motor based on the operating status data. The deviation calculation module is used to calculate the displacement deviation between the master motor and the slave motor based on their real-time displacements. The compensation decision module is used to determine the initial velocity compensation amount based on the preset deviation range in which the absolute value of the displacement deviation is located; A smoothing module is used to smooth the initial velocity compensation amount to obtain the target velocity compensation amount; The motor control module is used to adjust the operating state of the master motor based on the target speed compensation amount, so as to realize the synchronous lifting and lowering of the master motor and the slave motor.
10. The control system for the electric lifting clothes rack according to claim 9, characterized in that, The infrared sensor signal includes a first state and a second state; The data acquisition module includes: The processing submodule is used to preprocess the infrared sensor signal to obtain the preprocessed infrared sensor signal. The identification submodule is used to identify the preprocessed infrared sensor signal; The acquisition submodule is used to acquire the operating status data of the master motor and slave motor in real time when the preprocessed infrared sensor signal is in the first state.
11. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that, The computer program is stored and can be loaded by a processor and executed as described in any one of claims 1 to 8.
13. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, wherein when the program instructions are executed by a computer, the computer performs the control method based on an electric lifting clothes rack as described in any one of claims 1-8.