Self-adaptive stroke motor control method and system and storage medium
Through the adaptive stroke motor control method, the problem of differences in installation distance and stroke of push rod motors in different styles of furniture is solved, the adaptation to different types of furniture is realized, and the service life and user experience of the furniture are improved.
Patent Information
- Application Number
- CN202410665325.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-10-01
AI Technical Summary
Differences in the installation distance and stroke of existing push rod motors in different styles of furniture lead to over-push or over-pull, which affects the user experience and may lead to furniture structural deformation and motor overload.
Adopting an adaptive stroke motor control method, the critical point and operating point range of furniture are obtained through self-learning, and the motor operating point is adjusted to adapt to different types of furniture, and the reserved gap and current detection are used to prevent trapped objects. Phenomenon.
It improves the service life and user experience of furniture, reduces the cost of organizing and storing motors, and reduces the risk of furniture structure deformation and motor overload.
Smart Images

Figure CN118739196A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor control technology, and in particular to a motor control method, system and storage medium with adaptive stroke. Background Art
[0002] Generally, push rod motors are used in furniture with folding, rotating and other requirements, such as sofas, beds, etc. When installing push rod motors on furniture, the installation distance and stroke of the push rod motors need to be adapted to the installation structure in the furniture. However, there are many styles of furniture, and each style of furniture has its own installation structure, which will inevitably lead to different installation distances and strokes of push rod motors in different styles of furniture. This requires the redesign of the push rod motor, which ultimately results in a large number of motor models in the warehouse and high material management costs. Even for the same style of furniture, the manufacturing error of the furniture will cause tolerances in the installation distance and stroke of the push rod motor, and the same batch or the same model of push rod motors themselves will also have manufacturing tolerances during the production process. If the tolerances of the two do not match, the push rod motor will also be over-pushed or over-pulled, which will cause shaking during the use of the furniture, affecting the user experience. Severe cases may also cause permanent deformation of the furniture's installation structure, and the motor may be overloaded for a long time and burned. Summary of the invention
[0003] In order to increase the service life of furniture at a low cost, the embodiments of the present application provide a motor control method, system and storage medium with adaptive stroke.
[0004] In a first aspect, this embodiment provides a motor control method with adaptive stroke, the method comprising: Obtaining a self-learning request, generating a motion instruction based on the self-learning request, and outputting the motion instruction to put the furniture in a folded state and an open state, and recording the position of the motor when the furniture is in the folded state and the open state as a critical point; Acquire a reserved gap set for the operation of the motor, and determine an operation point interval of the motor based on the reserved gap and the critical point; Obtain the running direction and running position of the motor at the current moment, determine whether the running position falls into the running point interval corresponding to the running direction, and the motor runs to the stall point. If so, generate a stop command to stop the motor, obtain the actual position of the motor at the current moment, and update the actual position to the critical point corresponding to the running direction.
[0005] In some embodiments, the critical point includes a folded critical point and an opened critical point, the operating point interval includes a folded operating point interval and an opened operating point interval, and determining the operating point interval of the motor based on the reserved gap and the critical point includes: Add the reserved gap to the critical point of folding to obtain the upper limit of the folding operation point interval, and determine the interval from negative infinity to the upper limit of the folding operation point interval as the folding operation point interval of the motor; The reserved gap is subtracted from the opening critical point to obtain the lower limit of the opening operation point interval, and the lower limit of the opening operation point interval to positive infinity is determined as the opening operation point interval of the motor.
[0006] In some embodiments, determining whether the motor runs to a stall point includes: Obtaining the running current value of the motor at the current moment, and determining whether the running current value exceeds a preset current value, and if so, the motor runs to a stall point; If it does not exceed, the motor has not run to the stall point.
[0007] In some embodiments, before obtaining the running direction and running point of the motor at the current moment, the method further includes: Obtain each intermediate point corresponding to the motor and a reference current value corresponding to each intermediate point; The corresponding points and reference current values are stored in a bundled manner.
[0008] In some embodiments, the running direction is an opening running direction or a folding running direction, and the method further includes: If the running direction is the retracting running direction, obtaining the actual current value of each moving point reached by the motor; Subtract the reference current value corresponding to the operating point from the actual current value to obtain a current difference; It is determined whether the current difference falls within a preset current range. If not, a clamping instruction is generated to indicate that there is a clamping phenomenon in the furniture, and the clamping instruction is output to stop the motor and run in the opening direction for a preset period of time.
[0009] In some embodiments, the method further comprises: The working state of the motor is acquired in real time to determine whether the working state is a power-on mode. If not, the running point of the motor at the current moment is recorded.
[0010] In some embodiments, the method further comprises: If the operating point falls into the operating point interval corresponding to the operating direction but the motor has not run to the stall point, the working speed of the motor is obtained, and the working speed is multiplied by a preset percentage to obtain an adjustment speed, so that the motor continues to work in the operating direction at the adjustment speed.
[0011] In a second aspect, this embodiment provides a motor control system with an adaptive stroke, the system comprising: a self-learning module, a reserved module and an adaptive control module; wherein: The self-learning module is used to obtain a self-learning request, generate a motion instruction based on the self-learning request, and output the motion instruction to put the furniture in a folded state and an open state, and record the position of the motor when the furniture is in the folded state and the open state as a critical point; The reservation module is used to obtain a reserved gap set for the operation of the motor, and determine the operation point interval of the motor based on the reserved gap and the critical point; The adaptive control module is also used to obtain the running direction and running point of the motor at the current moment, determine whether the running point falls into the running point interval corresponding to the running direction, and the motor runs to the stall point. If so, generate a stop command to stop the motor, and obtain the actual point of the motor at the current moment, and update the actual point to the critical point corresponding to the running direction.
[0012] In some of the embodiments, the system further comprises a detection module; wherein, The detection module is used to obtain each intermediate point corresponding to the motor and the reference current corresponding to each intermediate point; and store the corresponding points and reference currents in a bundled manner.
[0013] In a third aspect, this embodiment provides a computer-readable storage medium having stored thereon a computer program that can be run on a processor, and when the computer program is executed by the processor, an adaptive stroke motor control method as described in the first aspect is implemented.
[0014] By adopting the above method, the present application first obtains a self-learning request, generates motion instructions based on the self-learning request, and outputs motion instructions to put the furniture in a folded state and an open state, and records the position of the motor when the furniture is in the folded state and the open state as a critical point. In this way, after receiving the self-learning request, a motion instruction is generated based on the self-learning request and a motion instruction is output to make the motor move, so that the furniture reaches the folded state and the open state respectively, and at the same time, the critical point corresponding to the folded state and the critical point corresponding to the open state are recorded, so that the approximate stroke of the motor in the furniture is obtained based on these two critical points, and relevant information is provided for subsequent motor control. And through self-learning, the motor can cope with different types of furniture, reducing the cost of organizing and storing the motor.
[0015] Then, the reserved gap set for the motor operation is obtained, and the motor operation point range is determined based on the reserved gap and critical point. In this way, the motor's safe operation range is further limited by the reserved gap and critical point, providing a reference operation point range for the subsequent adaptive adjustment of the motor's stroke to complete the control of the motor. The operation point range is used to increase the safety of the motor operation and improve the service life of the motor and furniture.
[0016] Finally, the running direction and running position of the motor at the current moment are obtained, and it is determined whether the running position falls into the running position interval corresponding to the running direction, and the motor runs to the stall point. If so, a stop command is generated to stop the motor, and the actual position of the motor at the current moment is obtained, and the actual position is updated to the critical position corresponding to the running direction. In this way, after the motor completes self-learning and obtains the critical position of the motor, the position deviation of the motor is automatically corrected, that is, the self-correction of the stroke is performed to further obtain the accurate stroke of the motor, so that the motor can better adapt to the structure of the furniture, achieve low-cost improvement of the service life of the furniture, and adapt to the differences and abnormalities of the same type of furniture.
[0017] In addition, each intermediate point corresponding to the motor and the reference current value corresponding to each intermediate point are obtained, and the corresponding points and reference current values are stored in a bundled manner. This facilitates the subsequent provision of reference information for detecting whether objects are trapped during the folding process of the furniture.
[0018] If the running direction is the folding running direction, obtain the actual current value of the motor at each moving point, subtract the reference current value corresponding to the running point from the actual current value to obtain the current difference; determine whether the current difference falls within the preset current range, if not, generate a clamping instruction to indicate that there is a clamping phenomenon in the furniture, and output the clamping instruction to stop the motor and run in the opening running direction for a preset period of time. In this way, during use, when the motor runs in the reverse direction to fold, call the self-learned current matrix table to determine whether the current value of each point exceeds the threshold. If it exceeds, it is forced to stop and run in the reverse stroke to prevent clamping. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a block diagram of a motor control method with adaptive stroke provided in an embodiment of the present application.
[0020] Figure 2 It is a schematic diagram of the process of self-learning of the motor provided in the embodiment of the present application.
[0021] Figure 3 It is a schematic diagram of the process of automatically correcting the position deviation of the motor provided in the embodiment of the present application.
[0022] Figure 4 It is a flow chart of completing the current memory work provided in the embodiment of the present application.
[0023] Figure 5 It is a flowchart of the anti-pinch detection work provided in the embodiment of the present application.
[0024] Figure 6 It is a framework diagram of an adaptive stroke motor control system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. However, it should be understood by those of ordinary skill in the art that the present application can be implemented without these details. For those of ordinary skill in the art, it is obvious that various changes can be made to the embodiments disclosed in the present application, and without departing from the principles and scope of the present application, the general principles defined in the present application can be applied to other embodiments and application scenarios. Therefore, the present application is not limited to the embodiments shown, but conforms to the broadest scope consistent with the scope claimed for protection in the present application.
[0026] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.
[0027] As people's demand for comfort continues to increase, furniture such as sofas have gradually been adjusted from the original fixed single state to a mode in which the sofa state can be changed through operations such as rotation and extension. Among them, the sofa needs to use a motor to provide power when performing operations such as rotation and extension. In this application, on the one hand, due to the shortcomings of brushed motors such as high noise and low efficiency, on the other hand, when using brushed motors, it is also necessary to install a travel limit switch in the push rod assembly, which increases the manufacturing cost of the sofa. The brushless motor can just avoid these shortcomings. Therefore, this application uses a DC brushless push rod motor.
[0028] The brushless DC push rod motor is composed of a front cover, a bearing, a rotor, a stator, a coil, a PCB board and a casing. The brushless motor used in this application does not have a carbon brush structure, which can make the brushless motor have a longer life and a smaller sound when the motor is working. Under the condition of the same volume, the motor efficiency is more than 15% higher than that of the brushed motor. At the same time, the PCB board in the brushless motor can be used to realize the motor position memory function, eliminate the travel limit switch, and reduce the structural cost of the sofa. In addition, through the self-learning and memory program of the brushless motor, the brushless motor can automatically adapt to a variety of iron frames with different installation distances and travels, and realize the installation distance and travel adaptive function. Moreover, the manufacturing errors of the travel and installation distance of a single iron frame can be eliminated through the adaptive function, which improves the user experience and reduces the risks of iron frame deformation, motor overload, etc.
[0029] Figure 1 is a block diagram of a motor control method for adaptive travel provided by an embodiment of the present application. Figure 1 As shown, a motor control method for adaptive stroke includes the following steps: Step S100, obtaining a self-learning request, generating a motion instruction based on the self-learning request, and outputting the motion instruction to put the furniture in a folded state and an open state, and recording the position of the motor when the furniture is in the folded state and the open state as a critical position.
[0030] A control terminal is also provided in the furniture, and the control terminal can execute a motor control method with adaptive stroke of the present application. This embodiment is described from the perspective of the control terminal. After the furniture is produced and before it is put on the market for users to purchase and use, a testing phase is also provided. During the testing phase, the tester will send a self-learning request to the control terminal, so that the control terminal obtains the self-learning request. The above self-learning request refers to a request that requires the motor to obtain the maximum stroke of the motor in this furniture through movement.
[0031] After receiving the self-learning request, the control end generates a motion instruction including a folding motion instruction and an opening motion instruction according to the self-learning request. It can be selected whether to execute the folding motion instruction first and then the opening motion instruction, or to execute the opening motion instruction first and then the folding motion instruction according to the actual situation. The embodiment of the present application is described by taking the execution of the folding motion instruction first and then the opening motion instruction as an example. Figure 2 Schematic diagram of the process flow of the motor self-learning provided by the embodiment of the present application. Figure 2 As shown, the control end first outputs a folding motion instruction to the motor to control the motor to run in reverse, so that the furniture gradually approaches the folding state. And during the reverse running of the motor, it is detected whether the furniture is in the folding state, that is, whether the motor runs to the reverse stall point. Among them, the current value of the motor at this time can be obtained, and the obtained current value is compared with the preset current value. If the obtained current value is greater than the preset current value, it indicates that the motor runs to the reverse stall point. If the current value obtained is not greater than the preset current value, it indicates that the motor does not run to the reverse stall point. When the motor is moving forward or reverse normally, the current value of the motor is at a relatively stable value and will not suddenly increase. The preset current value is a value higher than the current value when the motor is running normally. The preset current value can be determined according to the sensitivity requirement of detecting whether the stall point is reached. If the sensitivity is required to be lower, the preset current value can be set to be larger; if the sensitivity requirement is higher, the preset current value can be set to be smaller. However, the preset current value is higher than the maximum current value when the motor is working normally.
[0032] If the motor does not run to the reverse stall point, the motor will continue to move in the reverse direction until the motor runs to the reverse stall point and stops the reverse movement. If the motor runs to the reverse stall point, the control end will record the point where the motor rotates at this time as a critical point, that is, the folding critical point. In the embodiment of the present application, the folding critical point = 0. At the same time, an opening movement instruction is output to the motor to control the forward operation of the motor so that the furniture gradually approaches the open state. And during the forward operation of the motor, it is detected whether the furniture is in the open state, that is, whether the motor runs to the forward stall point. Among them, the working principle of detecting whether the motor runs to the forward stall point is the same as that of detecting whether the motor runs to the reverse stall point, and it will not be repeated here. The preset current value corresponding to the reverse stall point can be the same as the preset current value corresponding to the forward stall point, or it can be different from the preset current value corresponding to the forward stall point, and no further limitation is made here.
[0033] If the motor does not run to the forward stall point, the motor continues to move forward until it runs to the forward stall point and stops moving forward. If the motor moves to the forward stall point, the control end will record the point where the motor rotates at this time as a critical point, that is, the open critical point. In the embodiment of the present application, the open critical point = PCNT. In this way, after receiving the self-learning request, a motion instruction is generated based on the self-learning request and a motion instruction is output to make the motor move, so that the furniture reaches the folded state and the open state respectively, and the critical point corresponding to the folded state and the critical point corresponding to the open state are recorded at the same time, so as to obtain the approximate stroke of the motor in this furniture according to these two critical points, and provide relevant information for subsequent motor control. And through self-learning, the motor can cope with different types of furniture, reducing the cost of sorting and storing the motor.
[0034] In addition, if Figure 2 As shown in the figure, during the self-learning process of the motor, it also detects in real time whether the external power supply to the motor is normal, that is, whether the motor is in the power-on state. If the motor is in the power-on state, it means that the motor can move normally and the motor can also perform self-learning. If the motor is in the power-off state, it means that the motor cannot move normally and the motor cannot perform self-learning. At this time, it is necessary to wait for the motor to be powered on and perform self-learning again.
[0035] Step S200, obtaining a reserved gap set for the operation of the motor, and determining the operation point interval of the motor based on the reserved gap and the critical point.
[0036] The above-mentioned reserved gap refers to a fault-tolerant point set to prevent the stroke from exceeding the range due to abnormal conditions during actual use. The reserved gap can be determined by the designer, and the reserved gap has been stored on the control end when the furniture production is completed. The control end can obtain the reserved gap set for the operation of the motor by checking the stored information. Among them, the reserved gap corresponding to the folded state and the reserved gap corresponding to the open state can be the same or different, which can be determined according to actual conditions and is not further limited here. The size of the reserved gap representation can also be determined according to actual conditions and is not further limited here.
[0037] Originally, the folding critical point and the opening critical point constitute a point interval, that is, a movement stroke of the motor. However, considering that abnormal conditions may cause changes in the motor stroke during actual use, the reserved gap can be substituted into the critical point to obtain the folding operation point interval when the motor is close to the folded state, and the opening operation point interval when the motor is close to the opening state. When the motor enters the folding operation point interval, it indicates that the furniture is about to reach the folded state; when the motor enters the opening operation point interval, it indicates that the furniture is about to reach the open state.
[0038] Among them, determining the operating point interval of the motor based on the reserved gap and the critical point includes the following steps: adding the reserved gap to the closing critical point to obtain the point upper limit of the closing operating point interval, and determining the interval composed of negative infinity to the point upper limit of the closing operating point interval as the closing operating point interval of the motor; subtracting the reserved gap from the opening critical point to obtain the point lower limit of the opening operating point interval, and determining the point lower limit of the opening operating point interval to positive infinity as the opening operating point interval of the motor.
[0039] The control end can obtain the distinguishing point where the control end believes that the furniture is about to change from the non-folded state to the folded state by adding the reserved gap to the folding critical point, so that when the motor position is less than this distinguishing point, it is considered that the furniture is in the folded state, and the motor can be controlled to stop reverse movement, thereby reducing the probability that the motor continues to run and causes deformation to the structure of the furniture, or the motor is overloaded. Similarly, the control end can obtain the distinguishing point where the control end believes that the furniture is about to change from the non-opened state to the open state by subtracting the reserved gap from the opening critical point, so that when the motor position is greater than this distinguishing point, it is considered that the furniture is in the open state, and the motor can be controlled to stop forward movement, thereby reducing the probability that the motor continues to run and causes deformation to the structure of the furniture, or the motor is overloaded. In this way, the reserved gap and critical point are used to further limit the operating range in which the motor can work safely, and provide a reference operating point range for the subsequent adaptive adjustment of the motor stroke to complete the control of the motor. And the operating point range is used to increase the safety of motor operation and improve the service life of the motor and furniture.
[0040] Step S300, obtain the running direction and running position of the motor at the current moment, determine whether the running position falls into the running point interval corresponding to the running direction, and the motor runs to the stall point. If so, generate a stop command to stop the motor, and obtain the actual position of the motor at the current moment, and update the actual position to the critical point corresponding to the running direction.
[0041] After the motor completes self-learning and obtains the critical point of the motor, in order to further obtain the accurate stroke of the motor, so that the motor can better adapt to the structure of the furniture, achieve low-cost improvement of the service life of the furniture, and adapt to the differences and abnormalities of the same type of furniture, it is also necessary to automatically correct the position deviation of the motor, that is, to perform self-correction of the stroke. The above-mentioned running direction refers to the direction of the motor at the current moment, that is, whether the motor is in a forward working state or a reverse working state at the current moment. Among them, there is a point corresponding to each rotation of the motor. Therefore, there will be multiple points in the process from closing the critical point to opening the critical point during the self-learning stage, that is, the entire stroke consists of multiple points. The running direction of the motor at the current moment can be obtained by checking whether the two adjacent points of the motor obtained recently are in an increasing trend or a decreasing trend. If the two adjacent points of the motor obtained recently are in an increasing trend, it indicates that the running direction of the motor at the current moment is the forward running direction. If the two adjacent points of the motor obtained recently are in a decreasing trend, it indicates that the running direction of the motor at the current moment is the reverse running direction. In addition, the furniture is also equipped with a device for reading the motor position, which will store the read motor position in real time. The operating point of the motor at the current moment can be obtained by checking the most recently stored motor position.
[0042] In order to further reduce the possibility that the control end mistakenly believes that the furniture has reached the folded state due to obstruction by objects and to improve the accuracy of automatic correction of position deviation, it is necessary to simultaneously determine whether the operating point falls into the operating point range corresponding to the operating direction and whether the motor runs to the stall point.
[0043] Through the running direction of the motor at the current moment, it can be known which state the furniture is moving towards, that is, whether the running point interval corresponding to the movement direction is the folding running point interval or the opening running point interval. If the running direction is the forward running direction, then the running point of the motor at the current moment is compared with the lower limit of the opening running point interval. If the running point of the motor at the current moment is less than the lower limit of the opening running point interval, it indicates that the running point does not fall into the running point interval corresponding to the running direction; if the running point of the motor at the current moment is not less than the lower limit of the opening running point interval, it indicates that the running point falls into the running point interval corresponding to the running direction.
[0044] If the running direction is the reverse running direction, then the running point of the motor at the current moment is compared with the upper limit of the gathered running point interval. If the running point of the motor at the current moment is greater than the upper limit of the gathered running point interval, it indicates that the running point does not fall into the running point interval corresponding to the running direction; if the running point of the motor at the current moment is not greater than the upper limit of the gathered running point interval, it indicates that the running point falls into the running point interval corresponding to the running direction.
[0045] Determining whether the motor has reached a stall point includes the following steps: obtaining the running current value of the motor at the current moment, and determining whether the running current value exceeds a preset current value. If so, the motor has reached a stall point; if not, the motor has not reached a stall point.
[0046] Here, the implementation method is the same as the above step S100 in which the motor is detected during operation to detect whether the furniture is in the folded state or the open state. That is, the operating current value of the motor at the current moment is obtained by reading the current value of the motor, and then the obtained operating current value is compared with the preset current value. If the operating current value exceeds the preset current value, it indicates that the motor has reached an end value of the stroke, that is, the motor has reached a stall point. If the operating current value does not exceed the preset current value, it indicates that the motor has not reached an end value of the stroke, that is, the motor has not reached a stall point.
[0047] When it is determined that the running point of the motor falls into the running point interval corresponding to the running direction, and the motor runs to the stall point, it indicates that the motor's position at this time is an endpoint value of the motor stroke. At this time, the control end will generate a stop command to stop the motor from working and no longer move in the current running direction, thereby reducing the damage to the furniture structure and the occurrence of motor overload.
[0048] At the same time, when it is determined that the running point of the motor falls into the running point interval corresponding to the running direction, and the motor runs to the stall point, the control end also uses the critical point corresponding to the running direction of the motor obtained in the above step S100 as the point of the motor at this time, that is, the point of the motor at this time is forcibly updated to the critical point corresponding to the running direction of the motor obtained in the above step S100, thereby completing the automatic correction of the position deviation of the motor, so that the motor can automatically obtain the accurate stroke of the furniture in the working process, and complete the self-correction of the motor to deal with the difference and abnormal stroke of the same type of furniture, thereby reducing the deformation of the furniture structure and the occurrence of motor overload. The motor can adapt to the difference and abnormality of the furniture structure through self-learning and self-correction, and increase the service life of the furniture at a low cost. Among them, if the running direction of the motor at the current moment is the forward running direction, then the self-correction of an endpoint value of the stroke when the furniture is in the open state will be completed; if the running direction of the motor at the current moment is the reverse running direction, then the self-correction of an endpoint value of the stroke when the furniture is in the folded state will be completed.
[0049] Figure 3 1 is a schematic diagram of the process of automatically correcting the position deviation of the motor provided in the embodiment of the present application. Figure 3As shown, firstly, the motor is powered on, then the running direction of the motor is obtained, and it is determined whether the motor is running in the forward direction. If it is running in the forward direction, the running point of the motor is read, and it is determined whether the running point of the motor falls into the opening running point interval and the motor runs to the forward blocking point. If so, a stop command is generated to control the motor to stop running, and the running point of the motor at this time is forcibly updated to the opening critical point corresponding to the forward running. At this time, the self-correction of the endpoint value of the stroke in the forward direction is completed; if not, the motor continues to run in the forward direction, and the running point of the motor is read.
[0050] If the motor runs in the reverse direction, the position of the motor is also read, and a judgment is made as to whether the position of the motor falls within the retraction operation point interval and the motor runs to the reverse blocking point. If so, a stop command is generated to control the motor to stop running, and the position of the motor at this time is forcibly updated to the retraction critical point corresponding to the reverse operation. At this time, the self-correction of the endpoint value in the reverse direction of the stroke is completed; if not, the motor continues to run in the reverse direction and the position of the motor is read.
[0051] When the self-correction of the endpoint value in the forward direction and the endpoint value in the reverse direction are completed at the same time, it means that the automatic correction of the motor's position deviation is completed. Among them, in the process of completing the automatic correction of the motor's position deviation, the working state of the motor is also obtained in real time to determine whether the working state is in the power-on mode. If so, the above-mentioned automatic correction of the position deviation continues; if not, the motor cannot work, and the above-mentioned automatic correction of the position deviation cannot be performed. The running point of the motor at the current moment can be recorded to facilitate the subsequent correction work after the motor is powered on. Among them, judging whether the working state of the motor is in the power-on mode runs through the entire process of the motor's automatic correction of the position deviation. Figure 3 It only shows some nodes in the process of automatic correction of motor position deviation and determines whether the working state of the motor is the power-on mode.
[0052] If the running point falls into the running point interval corresponding to the running direction but the motor has not run to the stall point, the control end also obtains the working speed of the motor, multiplies the working speed by the preset percentage to obtain the adjustment speed, and makes the motor continue to work in the running direction at the adjustment speed. In this way, the motor is about to reach the critical point. At this time, by reducing the working speed of the motor, the collision force caused by the motor reaching the critical point on the furniture structure can be reduced, thereby reducing the damage to the furniture structure.
[0053] In addition, in some other embodiments, current memory work can be performed before obtaining the running direction and running point of the motor at the current moment, that is, obtaining each intermediate point corresponding to the motor and the reference current value corresponding to each intermediate point; the corresponding points and reference current values are stored in a bundled manner.
[0054] The current memory operation may be interspersed in the movement process of the furniture between the folded state and the open state in the above step S100; or the motor may be operated after the self-learning is completed to convert the furniture from the open state to the folded state, and the power memory operation may be performed in this process. Figure 4 Schematic diagram of the process of completing the current memory work provided by the embodiment of the present application. Figure 4 As shown, first control the motor to run forward, then detect whether the motor runs to the forward stall point. If it runs to the forward stall point, record the motor's running point at this time as the opening critical point, and control the motor to move in the reverse direction; every time the motor rotates one circle, that is, one point, record the motor's reference current value at this time, reduce the motor's running point at this time by one, and judge whether the motor runs to the reverse stall point. If it runs to, all the corresponding points and reference current values are stored in a bundled manner, that is, the matrix table of motor position and current value is written into the internal FLASH of the chip, so as to complete the current memory work. If it does not run to the reverse stall point, continue to make the motor move in the reverse direction. This facilitates the subsequent furniture to provide reference information for detecting whether there is a phenomenon such as clamping during the folding process.
[0055] In other embodiments, the furniture also has an anti-pinch detection function. That is, the running direction of the motor is the opening running direction or the folding running direction. If the running direction is the folding running direction, the actual current value of the motor is obtained at each movement point, and the reference current value corresponding to the running point is subtracted from the actual current value to obtain the current difference; it is determined whether the current difference falls within the preset current range. If not, a clamping instruction is generated to characterize the existence of the furniture clamping phenomenon, and the clamping instruction is output to stop the motor from working and run in the opening running direction for a preset period of time. Among them, the preset current range includes a preset current upper limit and a preset current lower limit, and the preset current lower limit is zero.
[0056] Figure 5 Schematic diagram of the process of anti-pinch detection provided by the embodiment of the present application. Figure 5As shown, first control the motor to run in reverse, then obtain the current position and current running current of the motor, read the motor position and current value matrix table from the chip according to the current position, and judge whether the current current is not less than the sum of the current value of the corresponding matrix table and the preset current upper limit. If so, it indicates that the furniture has clamped objects. At this time, the motor is forced to stop immediately, and after the motor stops, the motor is controlled to run forward for a preset period of time to release the clamped objects. If not, continue to obtain the current position and current running current of the motor. In this way, during use, when the motor runs in reverse and retracts, the self-learned current matrix table is called to judge whether the current value of each point exceeds the threshold. If it exceeds, it is forced to stop and run in reverse to prevent clamping.
[0057] Figure 6 : is a framework diagram of a motor control system with adaptive travel provided by an embodiment of the present application. Figure 6 As shown, a motor control system with adaptive stroke includes: a self-learning module, a reserved module, an adaptive control module and a detection module.
[0058] Among them, the self-learning module is used to obtain the self-learning request, generate motion instructions based on the self-learning request, and output the motion instructions to put the furniture in the folded state and the open state, and record the position of the motor when the furniture is in the folded state and the open state as the critical point. The reservation module is used to obtain the reserved gap set for the motor operation, and determine the operating point interval of the motor based on the reserved gap and the critical point. The adaptive control module is also used to obtain the running direction and running point of the motor at the current moment, determine whether the running point falls into the running point interval corresponding to the running direction, and the motor runs to the stall point. If so, generate a stop command to stop the motor, and obtain the actual point of the motor at the current moment, and update the actual point to the critical point corresponding to the running direction. The detection module is used to obtain each intermediate point corresponding to the motor, and the reference current corresponding to each intermediate point; the corresponding point and reference current are stored in a bundled manner.
[0059] The other functions performed by the above-mentioned self-learning module, reserved module, adaptive control module and detection module and the technical details of each function are the same or similar to the corresponding features in the adaptive stroke motor control method described above, so they will not be repeated here.
[0060] An embodiment of the present application further provides a computer storage medium having a computer program stored thereon. When the computer storage medium is run on a computer, the computer can execute the steps in the above-described method for controlling a motor with an adaptive stroke.
[0061] It should be understood that, although the steps in the flowchart of the accompanying drawings are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless explicitly stated in this document, the execution of these steps is not strictly limited in order and can be performed in other orders.
[0062] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A motor control method with adaptive stroke, It is characterized in that The method comprises: Obtaining a self-learning request, generating a motion instruction based on the self-learning request, and outputting the motion instruction to put the furniture in a folded state and an open state, and recording the position of the motor when the furniture is in the folded state and the open state as a critical point; Acquire a reserved gap set for the operation of the motor, and determine an operation point interval of the motor based on the reserved gap and the critical point; Obtain the running direction and running position of the motor at the current moment, determine whether the running position falls into the running point interval corresponding to the running direction, and the motor runs to the stall point. If so, generate a stop command to stop the motor, obtain the actual position of the motor at the current moment, and update the actual position to the critical point corresponding to the running direction.
2. The method according to claim 1, It is characterized in that The critical point includes a folded critical point and an opened critical point, the operating point interval includes a folded operating point interval and an opened operating point interval, and the determining of the operating point interval of the motor based on the reserved gap and the critical point includes: Add the reserved gap to the critical point of folding to obtain the upper limit of the folding operation point interval, and determine the interval from negative infinity to the upper limit of the folding operation point interval as the folding operation point interval of the motor; The reserved gap is subtracted from the opening critical point to obtain the lower limit of the opening operation point interval, and the lower limit of the opening operation point interval to positive infinity is determined as the opening operation point interval of the motor.
3. The method according to claim 1, It is characterized in that The determining whether the motor runs to a stall point comprises: Obtaining the running current value of the motor at the current moment, and determining whether the running current value exceeds a preset current value, and if so, the motor runs to a stall point; If it is not exceeded, the motor has not run to the stall point.
4. The method according to claim 2, It is characterized in that Before obtaining the running direction and running point of the motor at the current moment, the method further includes: Obtain each intermediate point corresponding to the motor and a reference current value corresponding to each intermediate point; The corresponding points and reference current values are stored in a bundled manner.
5. The method according to claim 4, It is characterized in that The running direction is an opening running direction or a folding running direction, and the method further includes: If the running direction is the retracting running direction, obtaining the actual current value of each moving point reached by the motor; Subtract the reference current value corresponding to the operating point from the actual current value to obtain a current difference; It is determined whether the current difference falls within a preset current range. If not, a clamping instruction is generated to indicate that there is a clamping phenomenon in the furniture, and the clamping instruction is output to stop the motor and run in the opening direction for a preset period of time.
6. The method according to claim 1, It is characterized in that The method further comprises: The working state of the motor is acquired in real time to determine whether the working state is a power-on mode. If not, the running point of the motor at the current moment is recorded.
7. The method according to claim 1, It is characterized in that The method further comprises: If the operating point falls into the operating point interval corresponding to the operating direction but the motor has not run to the stall point, the working speed of the motor is obtained, and the working speed is multiplied by a preset percentage to obtain an adjustment speed, so that the motor continues to work in the operating direction at the adjustment speed.
8. A motor control system with adaptive travel, It is characterized in that The system includes: a self-learning module, a reservation module and an adaptive control module; wherein, The self-learning module is used to obtain a self-learning request, generate a motion instruction based on the self-learning request, and output the motion instruction to put the furniture in a folded state and an open state, and record the position of the motor when the furniture is in the folded state and the open state as a critical point; The reservation module is used to obtain a reserved gap set for the operation of the motor, and determine the operation point interval of the motor based on the reserved gap and the critical point; The adaptive control module is also used to obtain the running direction and running point of the motor at the current moment, determine whether the running point falls into the running point interval corresponding to the running direction, and the motor runs to the stall point. If so, generate a stop command to stop the motor, and obtain the actual point of the motor at the current moment, and update the actual point to the critical point corresponding to the running direction.
9. The system according to claim 8, It is characterized in that The system also includes a detection module; wherein, The detection module is used to obtain each intermediate point corresponding to the motor and the reference current corresponding to each intermediate point; and store the corresponding points and reference currents in a bundled manner.
10. A computer-readable storage medium having stored thereon a computer program executable on a processor, It is characterized in that When the computer program is executed by the processor, the method for controlling a motor with an adaptive stroke as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Brushless push rod self-learning control method and system
CN119385408A
Vehicle control method, vehicle control device, vehicle, and storage medium
CN121492834A
