A segmented intelligent toilet seat motion control method

Through the segmented motion control method and PID control, the instability problem caused by torque fluctuation and vibration during the opening and closing process of the smart toilet seat is solved, achieving smooth operation of the toilet seat and improving user experience.

CN118316353BActive Publication Date: 2024-09-24HANSHAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410495413.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2024-09-24
Estimated Expiration
2044-04-24

AI Technical Summary

Technical Problem

The smart toilet seat is unstable due to torque fluctuations and changes in vibration amplitude during the opening and closing process. It is easy to shake and hit the water tank, causing damage and affecting the user experience.

Method used

Adopting a segmented intelligent toilet seat motion control method, by setting the initial angle and correcting the dead zone voltage, combined with PID control and S-shaped acceleration and deceleration control algorithm, the acceleration, uniform speed, deceleration and cushioning stages of the toilet seat are adjusted in segments, and real-time adjustments are made Control signals to ensure smooth operation.

Benefits of technology

It effectively prevents the toilet seat from shaking and hitting the water tank, improves the stability and reliability of the toilet seat, enhances the user experience, and extends the service life of the product.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118316353B
    Figure CN118316353B
Patent Text Reader

Abstract

The present invention provides a segmented intelligent toilet cover motion control method, which belongs to the technical field of sanitary ware intelligent manufacturing. The method includes: setting the initial angle, and correcting the dead zone voltage and the motor angle, and starting PID control after correcting to the initial angle; calculating the control signal according to the target position and the real-time feedback signal, and dynamically adjusting the output signal through PID, which is in the acceleration stage or the reverse acceleration stage; performing constant value processing on the control signal, which is in the uniform speed stage and runs smoothly; using position PID and incremental PID for staged regulation, so that the toilet cover is in the deceleration stage or the reverse deceleration stage; when the acquisition position is greater than the target position, the motor reversal speed value is added, and the flap speed is gradually reduced to 0 in the reverse direction. The present invention can ensure the smooth operation of the toilet cover, effectively avoid the toilet cover from shaking and hitting the water tank, and improve the user's toilet experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent manufacturing of sanitary ware, and more specifically, relates to a segmented intelligent toilet seat motion control method. Background Art

[0002] Smart toilet seats are an innovative technology in the field of modern sanitary ware, designed to improve the user experience and quality of life. However, in actual applications, some technical challenges may affect its stability and performance, including the instability of the toilet seat during opening and closing.

[0003] Torque fluctuation and vibration amplitude: The opening and closing of the smart toilet lid is usually controlled by a motor, and the operation of the motor may cause torque fluctuations and changes in vibration amplitude. Such fluctuations and vibrations may make the toilet lid not stable during the opening and closing process, especially during the start and stop stages.

[0004] Toilet lid shaking and hitting the water tank: Due to the influence of torque fluctuation and vibration amplitude, the toilet lid is prone to shaking during the opening and closing process. When the toilet lid shakes a lot, it may even collide with the water tank, which not only easily damages the toilet lid itself, but also causes inconvenience and bad experience for users.

[0005] During the actual user experience, due to the torque fluctuation and vibration amplitude of the system controlling the motor operation, the toilet lid does not run smoothly. The toilet lid is prone to shaking during the flipping process, causing the toilet lid to hit the water tank, making the toilet lid easily damaged and adversely affecting the user's toilet experience. Summary of the invention

[0006] The main purpose of this application is to provide a segmented smart toilet cover motion control method, which can ensure the smooth operation of the toilet cover, effectively prevent the toilet cover from shaking and hitting the water tank, thereby reducing the probability of damage to the toilet cover, improving the stability and reliability of the smart toilet cover, and enhancing the user's toilet experience.

[0007] In order to achieve the above purpose, the present application proposes a segmented intelligent toilet seat motion control method, comprising:

[0008] Set the initial angle, and calibrate the dead zone voltage and motor angle. After calibrating to the initial angle, start PID control.

[0009] The control signal is calculated according to the target position and the real-time feedback signal, and the output signal is dynamically adjusted through PID, so that the toilet cover is in the acceleration stage or the reverse acceleration stage;

[0010] The control signal is processed at a constant value so that the toilet seat is in a uniform speed stage and runs smoothly;

[0011] Use position PID and incremental PID to perform staged regulation, so that the toilet cover is in the deceleration stage or reverse deceleration stage;

[0012] When the acquisition position is greater than the target position, the motor reversal speed value is increased so that the toilet cover enters the cushioning stage;

[0013] Adding incremental PID control makes the toilet lid enter the buffer stage, at which time the flap speed is gradually reduced to 0.

[0014] Furthermore, the toilet lid is in an acceleration stage, including:

[0015] Setting the expected angle value of the acceleration phase as the target angle value of the acceleration phase, and the target position as the target angle value of the acceleration phase;

[0016] When the speed value in the acceleration phase is less than the middle value of the PID control in the acceleration phase, the proportional control signal in the PID is increased to speed up the speed increase ratio and perform accelerated motion;

[0017] When the speed value in the acceleration phase is greater than the middle value of the PID control in the acceleration phase, the proportional control signal in the PID is weakened to slow down the speed increase ratio and perform acceleration and deceleration movement;

[0018] When the speed value in the acceleration stage is greater than the maximum opening speed, the speed is limited to be equal to the maximum opening speed;

[0019] When the feedback signal reaches the expected angle value of the acceleration phase, it enters the next phase.

[0020] This stage is the acceleration stage in the S-type acceleration and deceleration control algorithm of the toilet lid. By using PID to dynamically adjust the output signal, precise control of the acceleration stage of the toilet lid can be achieved, making the movement of the toilet lid smoother and more efficient.

[0021] Furthermore, the barrel cover is in a reverse acceleration stage, comprising:

[0022] Setting the expected angle value of the reverse acceleration stage as the target angle value of the reverse acceleration stage, and the target position as the target angle value of the reverse acceleration stage;

[0023] When the speed value in the reverse acceleration stage is less than the middle value of the PID control in the reverse acceleration stage, the reverse control signal is enhanced to speed up the reverse increase rate and perform reverse acceleration motion;

[0024] When the speed value in the reverse acceleration stage is greater than the middle value of the PID control in the reverse acceleration stage, the reverse control signal is weakened to slow down the reverse increase rate and perform reverse acceleration and deceleration movement;

[0025] When the speed value in the reverse acceleration stage is greater than the maximum reverse speed, the speed is limited so that the speed value in the reverse acceleration stage is equal to the maximum reverse speed;

[0026] When the feedback signal reaches the expected angle value of the reverse acceleration phase, it enters the next phase.

[0027] Furthermore, the toilet lid is in a uniform speed stage, including:

[0028] Setting the expected angle value in the uniform speed stage as the target angle value in the uniform speed stage, and the target position as the target angle value in the uniform speed stage;

[0029] The toilet seat operates smoothly at the maximum speed between the expected angle value in the acceleration phase and the expected angle value in the uniform speed phase;

[0030] When the feedback signal reaches the expected angle value of the uniform speed stage, it enters the next stage.

[0031] This stage is the uniform speed stage in the S-type acceleration and deceleration control algorithm of the toilet lid. This process occurs when the toilet lid is opening. The uniform speed stage can ensure that the movement speed of the toilet lid remains constant before reaching the maximum opening angle, avoiding sudden acceleration or deceleration during the opening process, thereby reducing damage to the motor and improving the user experience.

[0032] Furthermore, the toilet lid is in a deceleration stage, comprising:

[0033] Set the expected angle value of the deceleration stage as the target angle value of the deceleration stage, and calculate the control signal according to the expected angle value of the deceleration stage and the real-time feedback signal:

[0034] The first stage: Use the position PID to control so that the speed value in the deceleration stage drops rapidly to the segmented speed controlled by the PID in the deceleration stage, and perform deceleration and acceleration motion;

[0035] The second stage: use incremental PID to control, so that the speed value in the deceleration stage slowly decreases to the minimum value of PID control in the deceleration stage, and deceleration movement is performed;

[0036] When the feedback signal reaches the expected angle value of the deceleration stage, it enters the next stage.

[0037] This stage is the deceleration stage in the S-type acceleration and deceleration control algorithm of the toilet lid. The deceleration stage occurs near the top of the toilet lid during the opening process of the toilet lid. It is divided into two stages in total. The two stages constitute a smooth S-shaped decreasing curve. On the one hand, it can allow the toilet lid to pass smoothly at the alternation of deceleration and acceleration motion and deceleration and acceleration motion, that is, increase the smoothness of the toilet lid during operation; on the other hand, it reduces the impact of sudden deceleration, reduces damage to the motor, and extends its service life.

[0038] Furthermore, the control using position PID includes:

[0039] Set the target position and target speed of the toilet seat in the first stage;

[0040] Set the proportional coefficient, integral coefficient and differential coefficient of the position PID controller;

[0041] The target position and target speed of the toilet seat cover as well as the proportional coefficient, integral coefficient and differential coefficient of the PID controller are input into the PID controller to calculate the PID control signal in real time;

[0042] Set the speed limiter to determine the range of PID output according to the set maximum motor speed;

[0043] When the toilet lid approaches the target position, the PID output is reduced so that the speed value in the deceleration stage drops rapidly to the segmented speed of the PID control in the deceleration stage.

[0044] This process is the specific control process of the first stage of the toilet lid opening process. In this process, by setting the PID parameters, the toilet lid speed can be quickly adjusted, which improves the response speed of the system and enables the toilet lid to reach the target position more quickly. In addition, setting the speed limiter can limit the range of PID output, effectively avoiding excessive output causing excessive motor load, thereby protecting the safe operation of the motor.

[0045] Furthermore, the incremental PID control includes:

[0046] Set the target position and target speed of the toilet seat in the second stage;

[0047] Set the proportional coefficient, integral coefficient and differential coefficient of the incremental PID controller;

[0048] Get the PID increment value at the current moment and get the incremental PID output;

[0049] Set the speed limiter to limit the value range of the incremental PID output;

[0050] Adjust the acceleration of the motor according to the numerical range limited by the speed limiter;

[0051] When the toilet lid approaches the target position, the acceleration is gradually reduced so that the speed slowly drops to the minimum speed until it stops at the target position.

[0052] This process is the specific control process of the second stage of the toilet lid opening process. In this process, the incremental PID controller can quickly calculate the incremental value, adjust the acceleration of the motor according to the speed limiter, and achieve rapid adjustment of the toilet lid speed, thereby improving the response speed of the system. In addition, by accurately controlling the movement of the toilet lid, the opening process can be made smoother, which improves the comfort of use.

[0053] Furthermore, the toilet seat enters the shock absorbing stage, including:

[0054] Set the expected angle value of the cushioning stage as the target angle value of the cushioning stage;

[0055] When the angle value in the collected data set is greater than the expected angle value, a reverse speed value is added to the motor to make the motor reverse;

[0056] When the motor reversal time is 2 / 3 of the time difference, a forward speed value is given to the motor to make the motor rotate forward for a duration of 1 / 3 of the time difference, where the time difference is the difference between the end time and the start time of the cushioning stage.

[0057] This stage occurs when the toilet lid is opened. When the toilet lid reaches the top, the motor force needs to be effectively removed to avoid continued movement due to inertia. Therefore, in this solution, a working condition is added in which the motor rotates in the opposite direction according to the real-time status, providing a cushioning stage when the toilet lid is at the top to avoid collision between the toilet lid and the water tank.

[0058] The present invention provides a segmented intelligent toilet seat motion control method, which has the following beneficial effects:

[0059] (1) The present invention innovatively combines PID control and S-type acceleration and deceleration control algorithms, and achieves precise control of the position and speed of the smart toilet lid through a refined segmented strategy, thereby reducing the shaking of the smart toilet lid during the opening process and effectively preventing the toilet lid from hitting the water tank, thereby providing users with a smoother and more comfortable experience, and also greatly improving the overall performance of the product.

[0060] (2) The control system of the present invention uses sensors to monitor data in real time and adjust the control signal at any time to achieve stable control of the smart toilet cover. This control method can effectively reduce the torque fluctuation and vibration amplitude during the control process of the smart toilet cover, and improve the stability and reliability of the smart toilet cover.

[0061] (3) The present invention effectively improves product performance and competitiveness by optimizing control algorithms and control strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A flow chart of opening a toilet lid in a segmented intelligent toilet lid motion control method of the present invention;

[0063] Figure 2 It is a segmented control curve diagram of the toilet cover opening in a segmented intelligent toilet cover motion control method of the present invention;

[0064] Figure 3 A flow chart of closing a toilet lid in a segmented intelligent toilet lid motion control method of the present invention;

[0065] Figure 4 It is a segmented control curve diagram of the closing of the toilet lid in the segmented intelligent toilet lid motion control method of the present invention.

[0066] In the figure, 1, correction stage, 2, acceleration stage, 3, uniform speed stage, 4, deceleration stage, 5, cushioning stage, 6, reverse acceleration stage, 7, reverse deceleration stage, 8, cushioning stage. DETAILED DESCRIPTION

[0067] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0068] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0069] In the description of the present invention, it is necessary to understand that the terms "middle", "length", "up", "down", "front", "back", "vertical", "horizontal", "inside", "outside", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0070] In the present invention, unless otherwise clearly specified and limited, the first feature "on" the second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. "Multiple" means at least two, such as two, three, etc., unless otherwise clearly and specifically limited.

[0071] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection, an electrical connection, or communication with each other; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0072] Example

[0073] Intelligent manufacturing is a manufacturing model that uses advanced information technology (such as the Internet of Things, big data, artificial intelligence, etc.) and modern manufacturing technology (such as digital design, intelligent robots, 3D printing, etc.) to improve the production efficiency, flexibility and intelligence level of the manufacturing industry. It realizes the interconnection between equipment, the digitization and automated management of the production process, the efficient use of production resources and the intelligent control of the production process, thereby achieving improved production efficiency, reduced costs and improved product quality. Among them, the application of intelligent manufacturing in sanitary ware has gradually become a trend. It has brought more functions and convenience to sanitary ware products by integrating intelligent technology and modern manufacturing technology. It mainly involves intelligent sanitary ware such as smart toilets, smart showers, and smart cleaners.

[0074] Among them, the smart toilet is a modern sanitary equipment that combines advanced technology, aiming to provide a more comfortable, convenient and hygienic user experience. Its design takes into account the user's comfort and hygiene needs, and has the characteristics of automation and intelligence. By integrating sensors, control systems and other electronic devices, the smart toilet can realize functions such as automatic flushing, seat heating, and deodorization, improving the overall quality of the bathroom. The smart toilet not only facilitates the user's life, but also reflects the application and value of technology in improving the quality of life. Among them, the toilet cover of the smart toilet collects the user's distance signal through the sensor and transmits the distance signal to the control system. The control system controls the opening and closing of the toilet cover according to whether the user is close to or far away from the toilet.

[0075] In the prior art, since the toilet lid is prone to shaking when the control system controls the opening or closing of the toilet lid, when the toilet lid reaches the top, the toilet lid is prone to collide with the water tank, making the toilet lid easily damaged, and in the process, the user experience is also reduced.

[0076] Based on this, an embodiment of the present invention provides a segmented intelligent toilet lid motion control method, which aims to prevent the toilet lid from shaking during movement, and prevent the toilet lid from colliding with the water tank when it reaches the top, thereby reducing the damage rate of the toilet lid and improving the user's toilet experience. The method includes two motion modes of the toilet lid: one is the toilet lid opening mode, and the other is the toilet lid closing mode.

[0077] It can be understood that the toilet lid reaching the top mentioned in this embodiment is the maximum angle presented when the toilet lid is fully opened.

[0078] In toilet lid open mode, see Figure 1-2 , the opening process of the toilet lid is as follows:

[0079] Step 1: The toilet control system sends an opening command. The system detects whether the toilet lid is opened and reaches the top through a sensor. If the sensor feedback signal to the system is a positive signal (reaching the top), the next step will not be executed. If the feedback signal is a negative signal, the next step will be executed.

[0080] Step 2: If the sensor feeds back a signal to the system that the toilet lid is not opened, the calibration phase 1 is entered first. In this phase, an initial angle needs to be set in advance for the control system, and then the dead zone voltage and the motor angle need to be corrected. Each time before starting the toilet, its state needs to be judged and its dead zone voltage needs to be corrected to accurately adjust the control signal of the switching device, eliminate the switch dead zone effect, reduce device losses, and improve system stability and anti-interference capabilities. If the initial angle of the toilet lid motor is too small, it will interfere with the subsequent toilet startup operation. Therefore, if the angle is too small, a certain PWM (pulse width) is given to the motor to correct the motor angle to the initial angle before starting PID control to achieve the purpose of precise control.

[0081] It is understandable that the control system mentioned in this embodiment adopts PID (Proportional Integral Derivative) control, namely incremental PID control and position PID control. Position PID control is mainly used for the speed and position regulation of the toilet during the acceleration stage to quickly reach the expected angle value; incremental PID is mainly used for deceleration control before the toilet tends to the shock-absorbing stage, and this process will be more stable. Specifically, position PID control may cause overshoot or oscillation when the system is saturated, and incremental PID control will be more stable.

[0082] It can be understood that the hardware architecture core of the toilet lid control system mentioned in this embodiment is composed of STM32C8T6 microcontroller, angle sensor and DC reduction motor key components. The angle sensor and DC reduction motor involved are common components on the market, and the inventive concept and technical problem of the present invention are not about how the sensor collects signals and sends them to the controller, so they will not be elaborated.

[0083] Step 3: After the system calibrates the dead zone voltage and the motor angle, the motor driving the toilet seat begins to enter acceleration stage 2.

[0084] Please refer to Figure 2 The acceleration stage 2 is an S-shaped increasing curve segment from 0 to t1. In this stage, the expected angle value AD of the acceleration stage 2 is set. 11 AD is the target angle value of acceleration stage 2, V is the speed value of acceleration stage 2, VC 11 VG is an intermediate value of PID control in the acceleration stage 2. _max The maximum speed of opening the cover. According to the target position AD 11 The control signal is calculated by the real-time feedback signal, and the output signal is dynamically adjusted through PID. <VC 11 Increase the proportional control signal in PID to speed up the speed increase ratio for accelerated motion. When V>VC 11 When V>VG, the proportional control signal in PID is reduced to slow down the speed increase ratio to perform acceleration and deceleration movement, which is consistent with the acceleration part in the S-curve acceleration and deceleration control. _max When the amplitude is limited, V = VG _max , the integral time coefficient and differential time coefficient have been determined in the process of opening the cover, and the proportional coefficient is mainly adjusted. When its feedback signal reaches the expected angle value AD 11 , it will enter the next stage.

[0085] In this step, in the acceleration phase 2 of the toilet lid S-type acceleration and deceleration control algorithm, the PID dynamic adjustment output signal is used to accurately control the acceleration process of the toilet lid to ensure its smooth and efficient movement.

[0086] Step 4: When the toilet lid completes the acceleration phase 2, it will enter the uniform speed phase 3. Please refer to Figure 2 In the stage t1 to t2, let the expected angle value AD of the uniform speed stage 3 be 12 The target angle AD of the uniform speed stage 3 is processed to maintain the maximum speed and ensure that the toilet lid is within the specified area (AD 11 ~AD 12 ) runs smoothly at maximum speed, at this time Figure 2The uniform speed part of the S-curve acceleration and deceleration control is consistent. When the feedback signal reaches the expected value AD 12 , it will enter the next stage.

[0087] This stage is the uniform speed stage 3 in the toilet lid S-type acceleration and deceleration control algorithm. The uniform speed stage 3 can ensure that the movement speed of the toilet lid remains constant before reaching the maximum opening angle, avoiding sudden acceleration or deceleration during the opening process, thereby reducing the impact and damage to the toilet lid and motor, and improving the user experience.

[0088] Step 5: When the toilet seat runs smoothly at the maximum speed until t2 ends, it enters the deceleration stage 4, that is, Figure 2 The t2~t3 stage.

[0089] Let the expected angle value AD of deceleration stage 4 be 13 is the target angle value AD of this stage, V represents the speed value, V x11 For this stage, V is the segmented speed value of PID control. x12 This is the minimum value of PID control in this stage. This process is based on the target position AD 13 The control signal is calculated by the real-time feedback signal. This is divided into two stages. The first stage uses position PID for regulation to quickly reduce V to V x11 The second stage is incremental PID control, which allows the speed to drop slowly and smoothly to V x12 The deceleration movement is carried out, which is consistent with the deceleration part in the S-curve acceleration and deceleration control. When the feedback signal reaches the expected value AD 13 , it will enter the next stage.

[0090] It should be noted that position PID is used for regulation in this step, and the main steps are as follows: first, the target position and target speed of the toilet lid in the first stage need to be set; then the proportional coefficient, integral coefficient and differential coefficient of the position PID controller are set; then the target position, target speed of the toilet lid and the proportional coefficient, integral coefficient and differential coefficient of the PID controller are input into the PID controller, and the PID control signal is calculated in real time; then the speed limiter is set to determine the range of the PID output according to the set maximum speed of the motor; finally, when the toilet lid approaches the target position, the PID output is reduced, so that the speed value of the deceleration stage 4 drops rapidly to the segmented speed of the deceleration stage 4 PID regulation.

[0091] This process is the specific control process of the first stage of the toilet lid opening process. In this process, by setting the PID parameters, the toilet lid speed can be quickly adjusted, which improves the response speed of the system and enables the toilet lid to reach the target position more quickly. In addition, setting the speed limiter can limit the range of PID output, effectively avoiding excessive output causing excessive motor load, thereby protecting the safe operation of the motor.

[0092] It should be noted that incremental PID control is used in this step, and the main steps are as follows: first, set the target position and target speed of the toilet lid in the second stage; secondly, set the proportional coefficient, integral coefficient and differential coefficient of the incremental PID controller; then obtain the PID incremental value at the current moment, and obtain the incremental PID output; then set the speed limiter to limit the numerical range of the incremental PID output; then adjust the acceleration of the motor according to the numerical range limited by the speed limiter; finally, when the toilet lid approaches the target position, gradually reduce the acceleration so that the speed slowly drops to the minimum speed until it stops at the target position.

[0093] This process is the specific control process of the second stage of the toilet lid opening process. In this process, the incremental PID controller can quickly calculate the incremental value, adjust the acceleration of the motor according to the speed limiter, and achieve rapid adjustment of the toilet lid speed, thereby improving the response speed of the system. In addition, by accurately controlling the movement of the toilet lid, the opening process can be made smoother, which improves the comfort of use.

[0094] This step is the deceleration stage 4 in the S-type acceleration and deceleration control algorithm of the toilet lid. The deceleration stage 4 occurs near the top of the toilet lid during the opening process of the toilet lid. It is divided into two stages in total. The two stages constitute a smooth S-shaped decreasing curve. On the one hand, it can allow the toilet lid to pass smoothly at the alternation of deceleration and acceleration motion and deceleration and acceleration motion, that is, increase the smoothness of the toilet lid during operation; on the other hand, it reduces the impact of sudden deceleration, reduces damage to the toilet lid and toilet, extends the service life, and saves energy.

[0095] Step 6: When the toilet seat finishes the uniform speed stage 3, it enters the top cushioning stage 5. For details, please refer to Figure 2 Middle t3~t4 stage.

[0096] When the toilet lid approaches the maximum value of data collection, the force of the motor needs to be effectively cancelled to avoid continued movement caused by inertia. If not controlled, the toilet lid will inevitably collide with the toilet tank, and it will gradually stabilize after multiple rebounds and collisions. In order to solve this collision problem that often occurs after the toilet lid reaches the top, the following algorithm is designed: Once the toilet lid is about to reach the top during the flipping process, the motor will intelligently reverse according to the real-time status. This reverse rotation is intended to reduce the impact force generated by gravity and inertia of the toilet lid to prevent it from violently hitting the water tank. During the reverse rotation process, the motor will continue to operate for a period of time, allowing the toilet lid to gradually approach the top at a slower speed. Once the toilet lid reaches the expected angle value, the motor will turn to forward rotation again and fine-tune at a small speed to ensure that the toilet lid can be smoothly and accurately flipped to the maximum angle position close to the water tank, thereby achieving precise control without collision. Of course, in order to prevent unexpected situations (such as sensor failure or motor loss of control), safety mechanisms are designed, such as setting the maximum rotation time and maximum rotation angle to ensure that even in abnormal situations, the toilet lid will not cause serious collision with the water tank.

[0097] At this stage, set the desired angle AD of the top cushioning stage 5 14 is the target angle value AD in the cushioning stage 5, V f is the reversal speed value, V Z It is the forward speed value. At this time, it is divided into two stages. In the first stage, when the collected AD is greater than AD 14 When the speed V f Reverse for a certain period of time After that, at speed V z Forward rotation duration The second stage is completed. At this time, the toilet lid flap reaches the top and is fully open.

[0098] In summary, in the smart toilet lid opening mode, the toilet lid goes through five stages: correction stage 1, acceleration stage 2, uniform speed stage 3, deceleration stage 4, and shock absorption stage 5. Figure 2 The "S curve-straight line-S curve" control variable shown combines the S curve algorithm with PID control to achieve control of the toilet cover motor speed.

[0099] In toilet lid closed mode, see Figure 3-4 , the closing process of the toilet lid is as follows:

[0100] Step 1: The toilet control system sends a lid closing command. The system detects through a sensor whether the toilet lid is open. If so, the next step is executed. If the sensor detects that the toilet lid has reached the bottom (the bottom means that the toilet lid is in contact with the toilet ring and the toilet lid is in a stopped state), the next step will not be executed.

[0101] Step 2: If it is detected that the toilet lid is in an open state, the calibration phase 1 is first entered, and the calibration process is consistent with the calibration process of the toilet lid in the open lid mode.

[0102] Step 3: After the calibration phase 1 is completed, the toilet lid enters the reverse acceleration phase 6. Please refer to Figure 4 The 0~t1 stage.

[0103] At this stage, please refer to Figure 3 , let the expected angle value AD of the reverse acceleration stage 6 be 21 AD is the target angle value for this stage, V is the speed value, VC 21 This is an intermediate value of PID control at this stage, VG _min is the maximum reverse speed. Since the downward force of gravity is the largest at this time, a larger reaction force is needed to offset part of the gravity. 21 The control signal is calculated based on the real-time feedback signal, and the output signal is dynamically adjusted through PID. <VC 21 The reverse control signal is enhanced to speed up the reverse increase rate and perform reverse acceleration motion. When V>VC 21 When V>VG, the reverse control signal is weakened to slow down the rate of reverse increase of the speed, and reverse acceleration and deceleration movement is performed, which is consistent with the acceleration part of the S-curve acceleration and deceleration control. _min When the amplitude is limited, V = VG _min , the feedback signal reaches the expected angle value AD 21 , it will enter the next stage.

[0104] Step 4: After the smart toilet lid ends the reverse acceleration stage 6, it enters the reverse deceleration stage 7. For details, please refer to Figure 4 Middle t1~t2 stage.

[0105] At this stage, refer to Figure 3 , according to the target position AD 22 The control signal is calculated with the real-time feedback signal. At this time, it is divided into two stages. The first stage uses position PID for regulation to quickly reduce V to V x21 , and then perform reverse deceleration movement; then perform incremental PID control to slowly and smoothly reduce the speed in the reverse direction to V x22 , and reverse deceleration movement is performed, which is consistent with the deceleration part of the S-curve acceleration and deceleration control. When the feedback signal reaches the expected value AD22 , it will enter the next stage.

[0106] Step 5: The smart toilet lid enters the buffering stage 8 after finishing the reverse deceleration stage 7. Please refer to Figure 4 Middle t2~t3 stage.

[0107] At this stage, the toilet lid is already close to the base. To avoid collision between the toilet lid and the base when closing the lid, an incremental PID control is added to allow the toilet to slowly flip over when it is close to the base. The flip speed is determined by V x22 Gradually decrease in the opposite direction to 0.

[0108] To sum up, in the smart toilet lid closing mode, the toilet lid goes through correction stage 1, reverse acceleration stage 6, reverse deceleration stage 7, and buffering stage 8 in total.

[0109] Note: The present invention Figure 3 , Figure 4 In the description process, the speed value is described in terms of the absolute value of the speed. By default, the positive half axis of the V (speed) axis is set to the positive direction, which means the motor is rotating forward and the direction is positive; the negative half axis of the V (speed) axis is set to the negative direction, which means the motor is rotating backward and the direction is negative.

[0110] In the process of opening and closing the toilet lid of the present invention, the microcontroller captures the angle data (i.e., AD value) of the toilet lid in real time through the angle sensor, and adjusts the speed and direction of the motor in real time according to the pre-set segmented motion control strategy, thereby ensuring that the movement process of the toilet lid is both stable and smooth. The feature of the present invention is that PID control and S-curve technology are combined in the segmented motion control strategy to achieve flexible control and strategy switching in different stages. Specifically, smooth acceleration is achieved in the initial stage, accurate position adjustment is guaranteed in the middle stage, and smooth deceleration is achieved in the end stage. At the same time, an anti-collision algorithm is added to avoid collision between the toilet lid and the water tank. Among them, the PID controller is responsible for real-time correction of the position error, and the S-curve algorithm ensures smooth changes in speed. This segmented control method not only makes the toilet lid flap action run smoothly and stably, but also effectively extends the service life of the toilet lid.

[0111] The above is only for explaining the implementation mode of the present invention and is not intended to limit the present invention. For those skilled in the art, any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention without creative work should be included in the protection scope of the present invention.

Claims

1. A segmented intelligent toilet seat motion control method, characterized in that: include: Set the initial angle, and calibrate the dead zone voltage and motor angle. After calibrating to the initial angle, start PID control. The control signal is calculated according to the target position and the real-time feedback signal, and the output signal is dynamically adjusted through PID, so that the toilet cover is in the acceleration stage or the reverse acceleration stage; The control signal is processed at a constant value so that the toilet seat is in a uniform speed stage and runs smoothly; Use position PID and incremental PID to perform staged regulation, so that the toilet cover is in the deceleration stage or reverse deceleration stage; When the acquisition position is greater than the target position, the motor reversal speed value is increased so that the toilet cover enters the cushioning stage; Add incremental PID control to make the toilet lid enter the buffer stage, at which time the flap speed is gradually reduced to 0; The toilet lid is in the acceleration stage, including: Setting the expected angle value of the acceleration phase as the target angle value of the acceleration phase, and the target position as the target angle value of the acceleration phase; When the speed value in the acceleration phase is less than the middle value of the PID control in the acceleration phase, the proportional control signal in the PID is increased to speed up the speed increase ratio and perform accelerated motion; When the speed value in the acceleration phase is greater than the middle value of the PID control in the acceleration phase, the proportional control signal in the PID is reduced to slow down the speed increase ratio and perform acceleration and deceleration motion; When the speed value in the acceleration stage is greater than the maximum opening speed, the speed is limited to be equal to the maximum opening speed; When the feedback signal reaches the expected angle value of the acceleration phase, it enters the next phase; The barrel cover is in a reverse acceleration stage, including: Setting the expected angle value of the reverse acceleration stage as the target angle value of the reverse acceleration stage, and the target position as the target angle value of the reverse acceleration stage; When the speed value in the reverse acceleration stage is less than the middle value of the PID control in the reverse acceleration stage, the reverse control signal is enhanced to speed up the reverse increase rate and perform reverse acceleration motion; When the speed value in the reverse acceleration stage is greater than the middle value of the PID control in the reverse acceleration stage, the reverse control signal is weakened to slow down the reverse increase rate and perform reverse acceleration and deceleration movement; When the speed value in the reverse acceleration stage is greater than the maximum reverse speed, the speed is limited so that the speed value in the reverse acceleration stage is equal to the maximum reverse speed; When the feedback signal reaches the expected angle value of the reverse acceleration phase, it enters the next phase; The toilet lid is in a uniform speed stage, including: Setting the expected angle value in the uniform speed stage as the target angle value in the uniform speed stage, and the target position as the target angle value in the uniform speed stage; The toilet seat operates smoothly at the maximum speed between the expected angle value in the acceleration phase and the expected angle value in the uniform speed phase; When the feedback signal reaches the expected angle value of the uniform speed stage, it enters the next stage; The toilet lid is in a deceleration stage, including: Set the expected angle value of the deceleration stage as the target angle value of the deceleration stage, and calculate the control signal according to the expected angle value of the deceleration stage and the real-time feedback signal: The first stage: Use the position PID to control so that the speed value in the deceleration stage drops rapidly to the segmented speed controlled by the PID in the deceleration stage, and perform deceleration and acceleration motion; The second stage: using incremental PID control, the speed value of the deceleration stage is slowly reduced to the minimum value of the PID control in the deceleration stage, and the deceleration movement is performed; When the feedback signal reaches the expected angle value of the deceleration stage, it enters the next stage; The control using position PID includes: Set the target position and target speed of the toilet seat in the first stage; Set the proportional coefficient, integral coefficient and differential coefficient of the position PID controller; The target position and target speed of the toilet seat cover as well as the proportional coefficient, integral coefficient and differential coefficient of the PID controller are input into the PID controller to calculate the PID control signal in real time; Set the speed limiter to determine the range of PID output according to the set maximum motor speed; When the toilet lid approaches the target position, the PID output is reduced, so that the speed value in the deceleration stage drops rapidly to the segmented speed of the PID control in the deceleration stage; The incremental PID control comprises: Set the target position and target speed of the toilet seat in the second stage; Set the proportional coefficient, integral coefficient and differential coefficient of the incremental PID controller; Get the PID increment value at the current moment and get the incremental PID output; Set the speed limiter to limit the value range of the incremental PID output; Adjust the acceleration of the motor according to the numerical range limited by the speed limiter; When the toilet lid approaches the target position, the acceleration is gradually reduced so that the speed slowly drops to the minimum speed until it stops at the target position; The toilet cover enters the shock absorbing stage, including: Set the expected angle value of the cushioning stage as the target angle value of the cushioning stage; When the angle value in the collected data set is greater than the expected angle value, a reverse speed value is added to the motor to make the motor reverse; When the motor reversal time is 2 / 3 of the time difference, a forward speed value is given to the motor to make the motor rotate forward for a duration of 1 / 3 of the time difference, where the time difference is the difference between the end time and the start time of the cushioning stage.