Rotation control method and system of electronic equipment
By using sensors in the laptop to detect the angle and the component of gravity to adjust the control parameters of the rotation speed, the problem of uneven speed during the opening and closing of the display screen is solved, achieving uniform rotation of the display screen and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
In the prior art, the opening and closing process of a laptop screen is not smooth because the center of gravity changes with the opening and closing angle, which causes inaccurate output control of the drive device. This results in uneven screen rotation speed, and the user perceives the opening and closing process as uneven.
The target control parameters, including the first control parameter and the second control parameter, are obtained according to a preset cycle and sent to the drive module to generate a control signal to control the first body to rotate at a speed that meets the preset uniform speed condition during rotation. The rotation speed is adjusted by using sensors to detect the included angle and the component of gravity.
It enables the laptop screen to rotate at a constant speed, improving the smoothness of the user experience and the accuracy of control.
Smart Images

Figure CN121879520A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of control, and more particularly to a method and system for controlling the rotation of an electronic device. Background Technology
[0002] Laptops, as portable devices, are widely used in various scenarios.
[0003] To facilitate the opening and closing of a laptop, a drive mechanism can be installed along the axis between the laptop's display screen (A and B sides) and input keyboard (C and D sides). The opening and closing process of the laptop's display screen and input keyboard can be controlled by controlling the operation of the drive mechanism.
[0004] Currently, based on the display screen, the target angle of the display screen, and the set duration of the opening and closing action, the angular velocity required for the display screen of the laptop to open and close at a uniform speed is determined, and then the rotational speed of the drive device is determined using this angular velocity.
[0005] However, in actual control, due to various factors, such as the change of the center of gravity of the display screen with the opening and closing angle, the output control of the drive device may be inaccurate, which in turn leads to uneven angular velocity of the display screen rotation, making the user perceive that the opening and closing process of the display screen is not smooth. Summary of the Invention
[0006] The first aspect of this application provides a rotation control method for an electronic device, the electronic device comprising a first body and a second body rotatably connected, including:
[0007] Based on a preset period, target control parameters are obtained, wherein the target control parameters include a first control parameter and a second control parameter;
[0008] The target control parameters are sent to the drive module of the electronic device, so that the drive module generates a control signal based on the target control parameters. The control signal is used to control the rotation speed of the first body, so that the first body automatically rotates along the first rotation axis at a speed that meets the preset uniform speed condition during rotation.
[0009] A second aspect of this application provides a rotation control system for an electronic device, the electronic device comprising a first body and a second body rotatably connected, the rotation control system comprising:
[0010] The processor is used to obtain target control parameters according to a preset period, the target control parameters including a first control parameter and a second control parameter;
[0011] The drive module is used to generate a control signal based on the target control parameters. The control signal is used to control the rotation speed of the first body so that the first body automatically rotates along the first rotation axis at a speed that meets the preset uniform speed condition during rotation.
[0012] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the rotation control method of the electronic device described in the first aspect or any implementation thereof.
[0013] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0014] The memory is used to store computer programs;
[0015] The processor is used to execute the computer program so that the electronic device can implement the rotation control method of the electronic device according to the first aspect or any implementation thereof.
[0016] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to perform a rotation control method for the electronic device described in the first aspect or any implementation thereof. Attached Figure Description
[0017] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0018] Figure 1 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0019] Figure 2 This is a schematic flowchart of a rotation control method for an electronic device provided in an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the process for obtaining the first control parameter provided in an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of this application;
[0022] Figure 5 This is another schematic diagram of the electronic device provided in the embodiments of this application;
[0023] Figure 6 This is yet another schematic diagram of the electronic device provided in the embodiments of this application;
[0024] Figure 7 This is another schematic diagram of the electronic device provided in the embodiments of this application;
[0025] Figure 8 This is another schematic diagram of the electronic device provided in the embodiments of this application;
[0026] Figure 9 This is another schematic diagram of the electronic device provided in the embodiments of this application;
[0027] Figure 10 This is yet another schematic diagram of the electronic device provided in the embodiments of this application;
[0028] Figure 11 This is a schematic diagram of the process for obtaining the second control parameter provided in an embodiment of this application;
[0029] Figure 12 This is a schematic diagram of the structure of a rotation control system for an electronic device provided in an embodiment of this application;
[0030] Figure 13 This is a schematic diagram showing the first body and the second body in a first positional relationship in the electronic device provided in the embodiments of this application;
[0031] Figure 14 This is a schematic diagram showing the second positional relationship between the first body and the second body in the electronic device provided in the embodiments of this application;
[0032] Figure 15 This is a schematic diagram of the first body and the second body in the electronic device provided in this application switching from a first positional relationship to a second positional relationship;
[0033] Figure 16 This is another schematic diagram showing the switching of the first body and the second body from a first positional relationship to a second positional relationship in the electronic device provided in this application embodiment;
[0034] Figure 17 This is a schematic diagram of the system hardware of the electronic device provided in the embodiments of this application;
[0035] Figure 18 This is a scenario flowchart of the rotation control method for an electronic device provided in the embodiments of this application. Detailed Implementation
[0036] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0037] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0038] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0039] This application provides a rotation control method for an electronic device, which is applied to an electronic device including a first body and a second body that are rotatably connected.
[0040] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device includes: a first body 101, a second body 102, and a rotating shaft 103; the first body and the second body rotate along the rotating shaft. Figure 1 In the structure shown, a display screen is provided on the first body, and an input device is provided on the second body. The drive module controls the first body to rotate automatically along the rotation axis 103 at a preset angular velocity, so as to change its relative positional relationship with the second body. Factors affecting the actual rotation speed of the first body may include the component of the gravity of the first body acting on the rotation axis.
[0041] Figure 1 The four images from left to right show the first body 101 rotating along the rotation axis, changing sequentially from a first posture where the first body and the second body are in contact, to a second posture where the two bodies form an acute angle, a third posture where the two bodies form a right angle, and a fourth posture where the two bodies form an obtuse angle.
[0042] The gravity of the first body is vertically downward, as indicated by the arrow in the figure. During the rotation of the first body, the drive module controls the rotation of the first body at a set uniform rotational angular velocity. However, due to the influence of the gravity of the first body, the component of the gravity of the first body on the rotation axis will have the effect of speeding up or slowing down the rotation of the first body, resulting in the actual rotational speed of the first body not being uniform.
[0043] To address the issue that the actual rotation speed of the first body is not uniform, this application provides a rotation control method for an electronic device. The method involves obtaining target control parameters according to a preset cycle, using these parameters to control a drive module to generate a control signal. This control signal controls the rotation speed of the first body, ensuring that the first body rotates automatically and uniformly along the rotation axis during rotation. By periodically obtaining the target control parameters and adjusting the speed of the first body during rotation, uniform rotation can be achieved.
[0044] Reference Figure 2 , Figure 2 This is a flowchart illustrating a rotation control method for an electronic device provided in an embodiment of this application, as shown below. Figure 2 As shown in the figure, the rotation control method for an electronic device provided in this application embodiment may include steps 201 to 202, which are described in detail below.
[0045] 201. Based on the preset cycle, obtain the target control parameters, which include the first control parameter and the second control parameter;
[0046] The preset cycle is the cycle required to adjust the rotation speed of the first body. To improve the accuracy of the rotation speed of the first body, a smaller cycle length needs to be set to achieve near real-time adjustment.
[0047] For example, the preset period can be 100 milliseconds, 50 milliseconds, etc. The duration of the preset period can be set according to the actual situation. This application does not impose any restrictions on the value of the preset period duration.
[0048] The target control parameter is a control parameter that can counteract the effect on the rotation of the first body.
[0049] The first body is controlled to rotate by the drive module. The initial setting of the drive module is to control the first body to rotate at a preset angular velocity at a uniform speed. However, due to the influence of multiple factors, the rotation speed of the first body is not uniform during the rotation process.
[0050] Accordingly, the obtained target control parameters include a first control parameter and a second control parameter, which respectively counteract the effects of different influencing factors.
[0051] The specific process of obtaining the first and second control parameters will be described in detail in subsequent embodiments, but will not be described in detail in this embodiment.
[0052] 202. The target control parameters are sent to the drive module of the electronic device so that the drive module generates a control signal based on the target control parameters. The control signal is used to control the rotation speed of the first body so that the first body automatically rotates along the first rotation axis at a speed that meets the preset uniform speed condition during the rotation process.
[0053] The rotation of the first body in this electronic device is achieved by a drive module. The drive module controls the rotation process of the first body and can adjust the rotation speed of the first body by different values of the control signal.
[0054] The target control parameters are sent to the drive module, which generates a control signal based on the target control parameters. The control signal controls the rotation speed of the first body, and the first body can automatically rotate along the first rotation axis at a speed that meets the preset uniform speed condition during the rotation process according to the control signal.
[0055] The preset uniform speed condition can be considered as uniform rotation when the difference between the actual speed of the first body and the preset speed is within a small range.
[0056] For example, the preset uniform velocity condition is |V1-V0| < a° (1)
[0057] V1 represents the actual speed of the first body, and V0 represents the preset speed. The value of 'a' can be a small positive number, such as 0.1, 0.5, 1, etc. This application does not restrict the value of 'a'.
[0058] In one possible implementation, the rotational speed of the first body is expressed as angular velocity, the actual speed of the first body is its actual angular velocity during rotation, and the preset speed is a preset angular velocity.
[0059] In one possible implementation, the first body is driven to rotate by a motor. The drive module outputs a control signal to the motor. Accordingly, the target control parameter can be an adjustment of the PWM (Pulse Width Modulation) duty cycle determined based on the output torque τ of the motor. The drive module generates a control signal based on the PWM duty cycle. This control signal can be a signal that triggers the motor to maintain rotation. This control signal controls the rotation of the motor.
[0060] In one possible implementation, the first body can rotate along multiple rotation axes, and in this embodiment, the first rotation axis can be any one of the multiple rotation axes.
[0061] For example, the first rotation axis can be a rotation axis on a horizontal plane, through which the first body can rotate in the horizontal plane; or the first rotation axis can be a rotation axis in the vertical direction, through which the first body can rotate in a vertical plane perpendicular to the horizontal plane.
[0062] In this embodiment, target control parameters are obtained according to a preset period. The target control parameters include a first control parameter and a second control parameter. The target control parameters are sent to the drive module of the electronic device so that the drive module generates a control signal based on the target control parameters. The control signal is used to control the rotation speed of the first body so that the first body automatically rotates along the first rotation axis at a speed that meets the preset uniform speed condition during rotation. The target control parameters are obtained periodically and the speed of the first body during rotation is adjusted so that it can rotate at a uniform speed.
[0063] Figure 3 This is a flowchart illustrating the process of obtaining the first control parameter provided in an embodiment of this application, which may include steps 301 to 302. These steps will be described in detail below.
[0064] 301. Based on the preset cycle, obtain the target angle between the first body and the horizontal plane in the current cycle;
[0065] Based on the preset cycle, the target angle of the first body relative to the horizontal plane is obtained in the current cycle.
[0066] In one possible implementation, the first and second bodies of the electronic device are each equipped with a sensor that can detect the angle between the body and the horizontal plane. After the sensor acquires the angle between the body and the horizontal plane, it can upload the two measured angles to the processor. The processor can use these two angles between the body and the horizontal plane to determine the target angle of the first body relative to the horizontal plane.
[0067] The target angle can be the angle between the first body and the side where the second body is located, or the angle between the first body and the horizontal plane.
[0068] As the first body rotates along the first rotation axis, the included angle of the target changes continuously.
[0069] The electronic device is placed on a support surface during use. This support surface can be a plane parallel to the horizontal plane, an inclined plane at a certain angle to the horizontal plane, or a V-shaped surface.
[0070] For example, the second body of the electronic device is placed on a heat dissipation bracket, which forms a certain angle with the horizontal plane; for example, the second body of the electronic device is placed on the user's arm, and the first and second bodies of the electronic device are arranged in a "V" shape on the arm.
[0071] Figure 4This is a schematic diagram of an electronic device provided in an embodiment of this application. The electronic device includes a first body 401 and a second body 402. In this schematic diagram, the second body 402 of the electronic device is placed on a horizontal plane, which is represented by a dashed line. A sensor 4011 installed on the first body 401 detects that the angle between the first body 401 and the horizontal plane is θ1. A sensor 4021 installed on the second body 402 detects that the angle between the second body 402 and the horizontal plane is θ2 (θ2 is 0°, not shown in the diagram). θ1 and θ2 are uploaded to a processor, which determines a target angle θ between the first body and the horizontal plane based on these two angles. Figure 4 In the left-middle diagram, θ1 is the acute angle between the first body and the horizontal plane, while the angle on the side where the second body is located is obtuse. Correspondingly, Figure 4 In the left-middle figure, the angle θ between the first body and the target on the horizontal plane is determined to be (180° - θ1). Wherein, this... Figure 4 In the right-hand diagram, θ1 is the acute angle between the first body and the horizontal plane. The first body and the target on the horizontal plane on the same side are at the same angle θ. Correspondingly, Figure 4 In the left-middle figure, the angle θ = θ1 between the first body and the target on the horizontal plane is determined.
[0072] Figure 5 This is another schematic diagram of the electronic device provided in this application embodiment. The electronic device includes a first body 501 and a second body 502. In this schematic diagram, the second body 502 of the electronic device is placed on a non-horizontal surface. The dashed line in the figure represents the horizontal surface. A sensor 5011 disposed on the first body 501 detects that the angle between the first body 501 and the horizontal surface is θ1. A sensor 5021 disposed on the second body 502 detects that the angle between the second body 502 and the horizontal surface is θ2. These θ1 and θ2 are uploaded to the processor. The processor determines the target angle θ of the first body relative to the horizontal surface based on these two angles. Figure 5 In the left-middle diagram, θ1 is the acute angle between the first body and the horizontal plane, while the angle on the side where the second body is located is obtuse. Correspondingly, Figure 5 In the left-middle figure, the angle θ between the first body and the target on the horizontal plane is determined to be (180° - θ1). Wherein, this... Figure 5 In the right-hand diagram, θ1 is the acute angle between the first body and the horizontal plane. The first body and the target on the horizontal plane on the same side are at the same angle θ. Correspondingly, Figure 5 In the left-middle figure, the angle θ = θ1 between the first body and the target on the horizontal plane is determined.
[0073] Figure 6This is another schematic diagram of the electronic device provided in this application embodiment. The electronic device includes a first body 601 and a second body 602. In this schematic diagram, the second body 602 of the electronic device is placed on a non-horizontal surface. The dotted line in the figure represents the horizontal surface. A sensor 6011 disposed on the first body 601 detects that the angle between the first body 601 and the horizontal surface is θ1. A sensor 6021 disposed on the second body 602 detects that the angle between the second body 602 and the horizontal surface is θ2. These θ1 and θ2 are uploaded to the processor. The processor determines the target angle θ of the first body relative to the horizontal surface based on these two angles. Figure 6 In the left-middle diagram, θ1 is the acute angle between the first body and the horizontal plane, while the angle on the side where the second body is located is obtuse. Correspondingly, Figure 6 In the left-middle figure, the angle θ between the first body and the target on the horizontal plane is determined to be (180° - θ1). Wherein, this... Figure 6 In the right-hand diagram, θ1 is the acute angle between the first body and the horizontal plane, which is the same as the target angle θ on the horizontal plane on the side where the second body is located. Correspondingly, this... Figure 6 In the left-middle figure, the angle θ = θ1 between the first body and the target on the horizontal plane is determined.
[0074] 302. Based on the target angle, determine the first control parameter for the next cycle.
[0075] After determining the target angle between the first body and the horizontal plane, the first control parameter for the next cycle can be determined using this angle.
[0076] Based on the target angle between the first body and the horizontal plane in the previous cycle, a first control parameter is determined. This first control parameter is used to control the rotation speed of the first body in the next cycle, thereby adjusting the rotation speed of the first body according to the cycle.
[0077] In this embodiment, based on a preset cycle, the first control parameter for the next cycle is determined by the target angle between the first body and the horizontal plane in the current cycle, so that the rotation speed of the first body is adjusted according to the cycle, and the rotation speed of the first body meets the preset uniform speed condition.
[0078] In one possible implementation, the first control parameter for the next cycle is determined based on the target angle, including:
[0079] The target force is determined, which can affect the rotation speed of the first body; based on the target angle and the target force, the first control parameter for the next cycle is determined.
[0080] Based on the first body, a target force is determined, which is a force capable of affecting the rotational speed of the first body.
[0081] When the target force matches the rotation direction of the first body, the target force will be superimposed in the rotational direction of the first body, thereby promoting the rotation of the first body and causing the rotation speed of the first body to increase; when the target force does not match the rotation direction of the first body, the target force will be superimposed in the opposite direction of the rotational direction of the first body, thereby hindering the rotation of the first body and causing the rotation speed of the first body to decrease.
[0082] Since the rotation of the first body is along the first rotation axis, this rotation can be decomposed into two directional components at the location of the first body, such as upward and rightward, upward and leftward, downward and rightward, and downward and leftward. If the direction of one component is the same as the direction of the target force, it can be determined that the target force matches the rotation direction of the first body, and the target force can act as a directional assist for that component, causing the rotation speed of the first body to increase. If the direction of one component is opposite to the direction of the target force, it can be determined that the target force does not match the rotation direction of the first body, and the target force can act as a directional resistance for that component, causing the rotation speed of the first body to decrease.
[0083] Based on the target angle and the target force, the component force affecting the rotation speed of the first body can be determined. Based on the direction of the component force, the control force for adjusting the rotation speed of the first body can be determined, and the control force can be used as the basis for the control drive module to control the rotation speed of the first body.
[0084] In one possible implementation, a first control parameter can be determined based on the component force, wherein the direction of the first control parameter is opposite to the direction of the component force, and the magnitude of the first control parameter is the same as that of the component force.
[0085] For example, the target force could be the gravity of the first body, with the direction of gravity being vertically downwards from the center of gravity of the first body. The target angle is the target angle between the first body and the horizontal plane. Then, based on the gravity of the first body, the distance from the center of gravity of the first body to the first rotation axis, and the target angle, the component of the gravity of the first body along the rotation axis can be calculated. This component is a downward force along the first rotation axis. When the first body rotates diagonally downwards, this component, superimposed in the downward direction, propels the rotation of the first body, causing its rotational speed to increase. When the first body rotates diagonally upwards, this component, superimposed in the downward direction, hinders the rotation of the first body, causing its rotational speed to decrease.
[0086] Since the weight of the first body and the distance from the center of gravity of the first body to the first rotation axis are constant, the change of the component force affecting the rotation speed of the first body is determined by the target angle. Therefore, during the rotation of the first body, the target angle changes in real time, and correspondingly, the component force of the weight of the first body on the first rotation axis also changes in real time.
[0087] In this embodiment, by determining the target force that can affect the rotation speed of the first body, and combining the target angle and the target force, the component force in the target force that affects the rotation speed of the first body can be determined. Then, the first control parameter of the next cycle can be determined using this component force. The first control parameter of the next cycle can be obtained through physical calculation, with a small amount of data processing.
[0088] In one possible implementation, the first control parameters for the next cycle are determined based on the target angle and the target force, including:
[0089] Obtain the preset angle and the rotation direction of the first body in the current cycle; determine the first control parameter for the next cycle based on the relationship between the target angle and the preset angle, the rotation direction, and the target force.
[0090] The preset angle serves as the basis for determining the component of the target force on the first rotation axis of the first body. When the relationship between the target angle and the preset angle differs, the component of the target force on the first rotation axis can be determined by combining the rotation direction, and then this component force can be used to determine the first control parameter for the next cycle.
[0091] In one possible implementation, the preset angle can be one angle or several angles.
[0092] For example, the preset angle can be 90°. Based on the preset angle, the relative positional relationship between the centroid of the first body and the second body can be distinguished, so that different calculation methods can be used for different situations. Here, there is no restriction on the value of the preset angle.
[0093] In one possible implementation, the target force is the gravity of the first body, which is vertically downward. Therefore, when the first body is vertically downward, its gravity has no effect on the rotation of the first body. However, when the first body is inclined (incline upward or downward, etc.), its gravity has an effect on the rotation of the first body.
[0094] In one possible implementation, based on the relationship between the target angle and the preset angle, the nature of the target angle can be determined. This includes whether the target angle is an obtuse angle greater than 90°, an acute angle less than 90°, or even an angle below the horizontal plane. Based on the target angle and the direction of rotation, it can be determined whether the component of the target force on the first rotation axis accelerates or hinders the rotation of the first body. Furthermore, based on this acceleration or hindering effect, the direction of the first control parameter can be determined.
[0095] In one possible implementation, the first control parameter for the next cycle is determined based on the relationship between the target angle and the preset angle, the direction of rotation, and the target force, including the following cases:
[0096] 1. When the rotation direction is the direction in which the first body approaches the second body, the first control sub-parameter and the second control sub-parameter for the next cycle are determined based on the relationship between the target angle and the preset angle and the target force. The first control sub-parameter and the second control sub-parameter have opposite functions in controlling the rotation speed of the first body.
[0097] When the relationship between the target angle and the preset angle is a first relationship, the first control sub-parameter is determined; when the relationship between the target angle and the preset angle is a second relationship, the second control sub-parameter is determined. The first relationship and the second relationship are different, and the first control sub-parameter and the second control sub-parameter have opposite effects on the rotation speed of the first body, one is to accelerate and the other is to hinder.
[0098] The preset angle can be 90°, used to distinguish between acute and obtuse angles. If the target angle is greater than the preset angle, it indicates that the target angle is obtuse. If the target angle is less than the preset angle, it indicates that the target angle is acute or a negative angle less than zero, which means that the angle between the first body and the horizontal plane is below the horizontal plane.
[0099] If the rotation direction of the first body is towards the direction of the second body, the angle between the first body and the target on the horizontal plane can change from an obtuse angle to a right angle, an acute angle, or even a negative angle.
[0100] As the first body rotates towards the second body, the first body can transition from an obtuse angle to closing with the second body. If the bearing surface of the electronic device is parallel to the horizontal plane, then when the first body and the second body close, the target angle between the first body and the horizontal plane changes sequentially from an obtuse angle to a right angle and then to an acute angle. If the bearing surface of the electronic device forms a certain angle with the horizontal plane, then when the first body and the second body close, the target angle between the first body and the horizontal plane changes sequentially from an obtuse angle to a right angle, then to an acute angle, and finally to a negative angle.
[0101] As the first body rotates closer to the second body, the angle between the first body and the target horizontal plane is obtuse. At this time, the drive module moves the first body so that its center of gravity moves obliquely upwards. This requires overcoming the component of the first body's gravity on the first rotation axis. Based on gravity and the target angle, the first control sub-parameter for the next cycle is determined. This first control sub-parameter is to counteract the component of the first body's gravity superimposed on the rotation axis. When this first control sub-parameter is the torque applied to the first rotation axis, it can be in the same direction as the rotation direction of the first body.
[0102] As the first body rotates closer to the second body, and the angle between the first body and the target horizontal plane is acute, the drive module moves the first body so that its center of gravity moves diagonally downwards. The component of the first body's gravity on the first rotation axis is superimposed on this downward force. Based on this gravity and the target angle, the second control sub-parameter for the next cycle is determined. This second control sub-parameter is used to counteract the component of the first body's gravity superimposed on the rotation axis. When this second control sub-parameter is the torque applied to the first rotation axis, it can be in the opposite direction to the rotation direction of the first body.
[0103] As the first body rotates closer to the second body, and the angle between the first body and the target horizontal plane is negative, the drive module moves the first body so that its center of gravity moves diagonally downwards. The component of the first body's gravity on the first rotation axis is superimposed on this downward force. Based on this gravity and the target angle, the second control sub-parameter for the next cycle is determined. This second control sub-parameter is also used to counteract the component of the first body's gravity superimposed on the rotation axis. When the second control sub-parameter is the torque applied to the first rotation axis, it can also be in the opposite direction to the rotation direction of the first body.
[0104] Figure 7 This is another schematic diagram of the electronic device provided in this application embodiment. The electronic device includes a first body 701, a second body 702, and a first rotating shaft 703. In this schematic diagram, the dashed line represents a horizontal plane, which is the bearing surface. The process of the target included angle θ of the first body's horizontal plane changing from an obtuse angle to an acute angle is illustrated. Figure 7 The middle left figure shows the case where the included angle θ of the target is an obtuse angle. Figure 7 The middle right figure shows the case where the target angle θ is an acute angle. The dashed arrow indicates the direction of the gravity (target force) of the first body 701.
[0105] Figure 7 In the left figure, according to the rules of physics, the component of gravity on the first rotation axis 703 can be expressed by the following formula:
[0106] G1=G×L×sin(180°-θ)(2)
[0107] G1 is Figure 7 In the left figure, G represents the gravity of the first body, and L represents the distance from the center of gravity of the first body to the first rotation axis.
[0108] The first body rotates to the upper right, approaching the second body. The gravity of the first body opposes its rotation. The determined first control sub-parameter can be expressed by the following formula:
[0109] τ1=G1(3)
[0110] τ1 is the first control sub-parameter, which can be the output torque of the drive module, increasing the output torque for the rotation of the first body.
[0111] Figure 7 In the right figure, according to the rules of physics, the component of gravity on the first rotation axis 703 can be expressed by the following formula:
[0112] G2=G×L×sinθ(4)
[0113] G2 is Figure 7 In the right figure, the force component is G, which represents the gravity of the first body, and L, which represents the distance from the center of gravity of the first body to the first rotation axis.
[0114] The first body rotates to the lower right, approaching the second body. The gravity of the first body accelerates its rotation. The determined second control sub-parameter can be expressed by the following formula:
[0115] τ2=-G2(5)
[0116] τ2 is the second control sub-parameter, which can be the output torque of the drive module. - indicates that the output torque is reduced for the rotation of the first body.
[0117] Figure 8 This is another schematic diagram of the electronic device provided in this application embodiment. The electronic device includes a first body 801, a second body 802, and a first rotation axis 803. In this schematic diagram, the target angle θ is the angle below the horizontal plane. The dashed arrow indicates the direction of the gravity (target force) of the first body 801, the dashed line represents the horizontal plane, and the dotted line represents the bearing surface. According to physical rules, the component of this gravity on the first rotation axis 803 can be expressed by the following formula:
[0118] G2'=G×L×sin(-θ)(6)
[0119] G2' is the component force, where G represents the gravity of the first body and L represents the distance from the center of gravity of the first body to the first rotation axis.
[0120] The first body rotates downwards, approaching the second body. The gravity of the first body accelerates its rotation. The determined second control sub-parameter can be expressed by the following formula:
[0121] τ3=-G2'(7)
[0122] τ3 is the second control sub-parameter, which can be the output torque of the drive module. - indicates that the output torque is reduced for the rotation of the first body.
[0123] Should Figure 8 The diagram shows the case where the angle between the first body and the target is negative during the rotation of the first body. The angles between the first body and the target on the horizontal plane are obtuse and acute, as described above. Figure 7 As shown in the figure, it will not be repeated here.
[0124] Second, when the rotation direction is the direction in which the first body moves away from the second body, the third control sub-parameter and the fourth control sub-parameter for the next cycle are determined based on the relationship between the target angle and the first preset angle, as well as the target force and the target angle. The third control sub-parameter and the fourth control sub-parameter have opposite effects on controlling the rotation speed of the first body.
[0125] When the relationship between the target angle and the preset angle is the first relationship, the third control sub-parameter is determined; when the relationship between the target angle and the preset angle is the second relationship, the fourth control sub-parameter is determined. The first and second relationships are different, and the third and fourth control sub-parameters have opposite effects on the rotation speed of the first body, one is to accelerate and the other is to hinder.
[0126] If the rotation direction of the first body is the direction in which the first body moves away from the second body, the angle between the first body and the target on the horizontal plane can change from 0° (fitting) to an acute angle, a right angle, and an obtuse angle in sequence. The angle between the first body and the target on the horizontal plane can initially be a negative angle.
[0127] As the first body rotates away from the second body, its position changes from being in contact with the second body to forming an obtuse angle. If the supporting surface of the electronic device is parallel to the horizontal plane, then as the first body moves away from the second body, the target angle between the first body and the horizontal plane changes sequentially from an acute angle to a right angle and then to an obtuse angle. If the supporting surface of the electronic device forms a certain angle with the horizontal plane, then as the first body moves away from the second body, the target angle between the first body and the horizontal plane changes sequentially from a negative angle to an acute angle, a right angle, and then to an obtuse angle.
[0128] As the first body rotates away from the second body, the angle between the first body and the target horizontal plane is acute. At this time, the drive module moves the first body so that its center of gravity moves obliquely upwards. This requires overcoming the component of the first body's gravity on the first rotation axis. Based on gravity and the target angle, the third control sub-parameter for the next cycle is determined. This third control sub-parameter is to counteract the component of the first body's gravity superimposed on the rotation axis. When this third control sub-parameter is the torque applied to the first rotation axis, it can be in the same direction as the rotation direction of the first body.
[0129] As the first body rotates away from the second body, and the angle between the first body and the target horizontal plane is obtuse, the drive module moves the first body so that its center of gravity moves diagonally downwards. The component of the first body's gravity on the first rotation axis is superimposed on this diagonally downward force. Based on this gravity and the target angle, the fourth control sub-parameter for the next cycle is determined. This fourth control sub-parameter is used to counteract the component of the first body's gravity superimposed on the rotation axis. When this fourth control sub-parameter is the torque applied to the first rotation axis, it can be in the opposite direction to the rotation direction of the first body.
[0130] As the first body rotates away from the second body, the angle between the first body and the target horizontal plane is negative. At this time, the drive module moves the first body so that its center of gravity moves obliquely upwards. This requires overcoming the component of the first body's gravity on the first rotation axis. Based on gravity and the target angle, the third control sub-parameter for the next cycle is determined. This third control sub-parameter is to counteract the component of the first body's gravity superimposed on the rotation axis. When this third control sub-parameter is the torque applied to the first rotation axis, it can also be in the same direction as the rotation of the first body.
[0131] Figure 9 This is another schematic diagram of the electronic device provided in this application embodiment. The electronic device includes a first body 901, a second body 902, and a first rotating shaft 903. In this schematic diagram, the dashed line represents a horizontal plane, which is the bearing surface. The process of the target angle θ of the first body's horizontal plane changing from an acute angle to an obtuse angle is illustrated. Figure 9 The middle left figure shows the case where the included angle θ of the target is an acute angle. Figure 9 The middle right figure shows the case where the included angle θ of the target is an obtuse angle. The dashed arrow indicates the direction of the gravity (target force) of the first body 901.
[0132] Should Figure 9 In the left figure, according to the physical rules, the component of the gravity of the first body at the first rotation axis 903, G2, can be obtained. The calculation formula can be the aforementioned formula (4).
[0133] The first body rotates to the upper left, away from the second body. The gravity of the first body opposes its rotation. The determined third control sub-parameter can be expressed by the following formula:
[0134] τ4=G2(8)
[0135] τ4 is the third control sub-parameter, which can be the output torque of the drive module, increasing the output torque for the rotation of the first body.
[0136] Should Figure 9 In the right figure, according to the physical rules, the component of the gravity of the first body at the first rotation axis 903, G1, can be obtained. The calculation formula can be the aforementioned formula (2).
[0137] The first body rotates to the lower left, away from the second body. The gravity of the first body accelerates its rotation. The determined fourth control sub-parameter can be expressed by the following formula:
[0138] τ5=-G1(9)
[0139] τ5 is the fourth control sub-parameter, which can be the output torque of the drive module. - indicates that the output torque is reduced for the rotation of the first body.
[0140] Figure 10 This is another schematic diagram of the electronic device provided in the embodiments of this application. The electronic device includes a first body 1001, a second body 1002, and a first rotation axis 1003. In this schematic diagram, the target angle θ is the angle below the horizontal plane. The dashed arrow indicates the direction of the gravity (target force) of the first body 1001, the dashed line represents the horizontal plane, and the dotted line represents the bearing surface. According to physical rules, the component force G2' of the gravity on the first rotation axis 1003 can be obtained, and the calculation formula can be the aforementioned formula (6).
[0141] The first body rotates upwards, away from the second body. The gravity of the first body opposes its rotation. The determined third control sub-parameter can be expressed by the following formula:
[0142] τ6=G2'(10)
[0143] τ6 is the third control sub-parameter, which can be the output torque of the drive module, increasing the output torque for the rotation of the first body.
[0144] Should Figure 10 The diagram shows the case where the angle between the first body and the target is negative during the rotation of the first body. The angles between the first body and the target on the horizontal plane are obtuse and acute, as described above. Figure 9 As shown in the figure, it will not be repeated here.
[0145] In this embodiment, based on the first preset angle and the second preset angle, three angle intervals are determined: greater than the first preset angle, less than the first preset angle but greater than the second preset angle, and less than or equal to the second preset angle. For each case where the target angle belongs to one of the three angle intervals, the first control parameter for the next cycle is determined based on whether the rotation direction of the first body is closer to or farther from the second body, according to the target force and the target angle. For each case where the target angle belongs to one of the three angle intervals and the rotation direction is different, the determined control sub-parameters have opposite effects on informing the rotation speed. This achieves the goal of determining the control sub-parameters based on the target angle and rotation direction during the rotation of the first body, thereby improving the accuracy of controlling the rotation speed of the first body.
[0146] Figure 11 This is a flowchart illustrating the process of obtaining the second control parameter provided in an embodiment of this application, which may include steps 1001 to 1002. These steps will be described in detail below.
[0147] 1101. Obtain the first angular velocity of the first body relative to the second body in the current cycle;
[0148] During the process of the drive module controlling the rotation of the first body, due to hardware reasons such as friction or signal transmission errors, the actual rotation speed of the first body may not be consistent with the set rotation speed, and this error needs to be corrected.
[0149] First, determine the actual rotational speed of the first body. In this embodiment, the rotational speed is expressed as angular velocity. Then, obtain the first angular velocity of the first body's rotation according to the period.
[0150] In one possible implementation, an encoder can be used to determine the angular velocity of the first body on the first rotation axis.
[0151] 1102. Based on the difference between the first angular velocity and the preset angular velocity, determine the second control parameter for the next cycle.
[0152] The preset angular velocity is the angular velocity set in the drive module for the rotation of the first body.
[0153] In one possible implementation, the first angular velocity is subtracted from the preset angular velocity to obtain the difference between the two. This difference is determined once for each cycle, and the second control parameter for the next cycle is determined based on the difference in this cycle.
[0154] When the first angular velocity is greater than the preset angular velocity, the second control parameter is used to control the reduction of the angular velocity of the first body rotation. When the first angular velocity is less than the preset angular velocity, the second control parameter is used to control the increase of the angular velocity of the first body rotation, so as to infinitely approach the preset angular velocity and achieve the purpose of uniform rotation.
[0155] The value of the preset angular velocity can be set according to the actual situation, and this application does not restrict the value of the preset angular velocity.
[0156] The second control parameter can be the torque applied to the first rotating shaft. The torque is calculated based on the difference in angular velocity according to the preset calculation rules for torque and rotational angular velocity.
[0157] Subsequently, the first torque corresponding to the difference in angular velocity and the second torque determined according to the target force are added together to obtain the total output torque of the drive module. The torque output by the drive module includes the second torque used to overcome the influence of gravity of the first body through feedforward, and the first torque used to fine-tune the rotational angular velocity of the first body through feedback. Through feedback and feedforward adjustment, the purpose of controlling the first body to rotate at a uniform speed is achieved.
[0158] In this embodiment, a first angular velocity of the first body relative to the second body in the current cycle is obtained; based on the difference between the first angular velocity and a preset angular velocity, a second control parameter for the next cycle is determined. By utilizing the difference between the first angular velocity of the first body in the current cycle and the preset angular velocity, a second control parameter for controlling the rotation of the first body in the next cycle is determined. The rotational angular velocity of the first body is fine-tuned through feedback, thereby improving the accuracy of control.
[0159] In one possible implementation, the rotation control method for the electronic device further includes:
[0160] A trigger command is obtained, which is used to trigger the first body to reach the target position along the first rotation axis and form a preset angle with the second body; the target duration corresponding to the preset angle is determined; and the preset angular velocity is determined based on the preset angle and the target duration.
[0161] The scheme in this embodiment is executed before the target control parameters are obtained according to the preset period.
[0162] The trigger command can be generated when a preset button in the electronic device is activated. This preset button can be a single physical button, a combination of buttons, or a virtual button or combination of virtual buttons on a touchscreen.
[0163] As an example, the key combination Shift+P+M on a keyboard in an electronic device is used as a key combination. When this key combination is triggered, a trigger command is generated. Of course, the key combination that triggers this command is not limited to the example above; it can be set according to the actual situation in the specific implementation.
[0164] The trigger command can also be set through the operating interface in the electronic device. The opening and closing parameters of the first body can be set through the operating interface, such as the rotation speed, rotation distance and target position of the first body.
[0165] The first body rotates along the first rotation axis to reach a target position where it forms a preset angle with the second body. When the first body reaches the target position, the rotation process of the first body ends and it stops rotating.
[0166] In one possible implementation, when a trigger command is received, the drive module starts to drive the first body to rotate, and when the first body reaches the target position, the drive module stops running and the first body stops rotating.
[0167] The trigger command indicates a preset angle for the first body to rotate. Due to hardware limitations of the drive module, a target duration can be set for this preset angle. This target duration indicates that the first body will rotate through the preset angle to reach the target position within the target duration. Generally, the larger the preset angle, the longer the corresponding target duration.
[0168] Accordingly, given the preset angle that the first body needs to rotate through and the target time required to rotate that preset angle, the preset angular velocity used by the first body during rotation can be calculated based on these two factors. The preset angular velocity ω0 can be calculated using the following formula:
[0169] ω0=ωm / t (11)
[0170] Where ωm represents the preset included angle and t represents the target duration.
[0171] The trigger command can be one of a set of trigger commands, and each trigger command in the set of trigger commands can trigger the first body to rotate along the first rotation axis to form multiple preset angles.
[0172] For example, in an electronic device, the key combination Shift+P+M on a keyboard generates a trigger command when it is pressed. Each time 'm' is pressed, the preset angle is 120°. For each subsequent press of 'm', the preset angle increases by 10°. An angle cap can be set, such as 150°. Once the preset angle cap is reached, pressing 'm' again will not trigger a response.
[0173] The drive module may include a motor, which drives the first body to rotate along the first rotation axis. Based on the correspondence between the angular velocity of the first body rotation and the PWM duty cycle, after determining the preset angular velocity, the PWM duty cycle can be calculated based on the correspondence. The motor is driven to operate when the level is high. The larger the duty cycle, the greater the angular velocity of the first body rotation driven by the motor per unit time.
[0174] In one possible implementation, a limit switch or Hall sensor can be set to provide feedback on the rotation of the first body. If the target position is reached, the rotation of the first body will be stopped.
[0175] In this embodiment, a trigger command is obtained to trigger the first body to reach a target position along the first rotation axis that forms a preset angle with the second body; a target duration corresponding to the preset angle is determined; and a preset angular velocity is determined based on the preset angle and the target duration. By obtaining the trigger command, the preset angle that the first body needs to rotate through and the corresponding target duration are determined, and then the preset angular velocity during the rotation of the first body is determined using both. The preset angular velocity can be obtained through simple calculation, resulting in a low data processing burden.
[0176] In one possible implementation, the triggering instruction is obtained, including:
[0177] When the electronic device is in the first state or the second state, a preset key value is received through a preset module; a trigger command is generated based on the preset key value; wherein, in the first state, the electronic device is configured to power on each functional module; and in the second state, the electronic device is configured to power on some functional modules.
[0178] The electronic device includes at least two states. In the first state, all functional modules of the electronic device are powered on, and the electronic device operates normally. In the second state, some functional modules of the electronic device are powered on, and the electronic device can be in a powered-off or hibernation state, with only the powered functional modules operating. The electronic device can also have a third state, in which all functional modules are not powered on, and the electronic device is completely powered off. In the first and second states, the automatic rotation of the first body can be triggered; however, in the third state, the automatic rotation of the first body cannot be triggered.
[0179] The functional modules that remain powered on in the second state may include: a sensor for detecting the angle between the first body and the target on the horizontal plane, a processor for executing the rotation control method of the electronic device in the aforementioned embodiments, modules, and intermediate components between the various structures.
[0180] As an example, the functional modules powered on in the second state may include: a gravity sensor for the first and second bodies, a model chip, an MCU (Microcontroller Unit), a motor driver, and a motor. The gravity sensor is used to detect the angle between the body and the horizontal plane; the model chip is equipped with a large model and other processing models for preliminary analysis and processing of the received angle and other data; the MCU is used to further process the processing results of the model chip to obtain control parameters; the motor driver adjusts the duty cycle of the PWM according to the control parameters, and the motor runs according to the PWM signal to drive the first body to rotate automatically.
[0181] The preset key value is received by the preset module, which is in a powered-on state. It can be a physical keyboard and mouse structure or a touch screen structure. Buttons are set on the structure. When the preset key value is received, a trigger command is generated to trigger the automatic rotation process of the first body.
[0182] In this embodiment, the electronic device includes at least two states. In the first state, all functional modules in the electronic device are powered on; in the second state, some functional modules in the electronic device are powered on. When the electronic device is in the first state or the second state, a preset key value is received through a preset module; a trigger command is generated based on the preset key value, realizing the generation of a trigger command in response to the received preset key value for states where at least some functional modules and all functional modules in the electronic device are powered on. This allows the first body to automatically rotate in multiple usage states, improving the ease of operation of the electronic device.
[0183] The above describes a rotation control method for an electronic device provided by an embodiment of this application. The following describes a system that performs the above-described rotation control method for an electronic device.
[0184] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of a rotation control system for an electronic device provided in an embodiment of this application. Figure 12 As shown, the rotation control system 1200 of the electronic device includes:
[0185] The processor 1201 is used to obtain target control parameters according to a preset period, the target control parameters including a first control parameter and a second control parameter;
[0186] The processor can be a processor with certain data processing capabilities, such as an MCU or EC (Electronic Control Unit), or a processor with powerful data processing capabilities, such as a CPU (Central Processing Unit).
[0187] When the electronic device exists in both a first state and a second state, since the MCU can retain power even when the electronic device is powered off, the processor can use a processing unit such as an MCU. When the electronic device exists in the first state but not in the second state, the processor can use a processing unit such as an MCU or a CPU.
[0188] The drive module 1202 is used to generate a control signal based on the target control parameters. The control signal is used to control the rotation speed of the first body so that the first body automatically rotates along the first rotation axis at a speed that meets the preset uniform speed condition during rotation.
[0189] The drive module is connected to the processor, generates a control signal based on the target control parameters output by the processor, and controls the rotation process of the first body based on the control signal.
[0190] The drive module may include a motor drive, a motor, and a corresponding hardware structure. The hardware structure may be a mechanical transmission system (worm gear / gear and lead screw, etc.) and an opening and closing bracket. The mechanical transmission system is used to convert the rotational motion of the motor into linear motion. The opening and closing bracket is connected to the first body and drives the first body to rotate.
[0191] It should be noted that the specific process of the processor performing its functions and the corresponding explanations can be found in the explanations in the foregoing method embodiments, and will not be repeated here.
[0192] In one possible implementation, the driver module includes: a first driver structure and a second driver structure.
[0193] A first driving structure is used to drive the first body to rotate along the first rotation axis;
[0194] The second drive structure is used to drive the first body to rotate along the second rotation axis, so that the first body and the second body switch between a first position relationship and a second position relationship, and the second rotation axis is perpendicular to the first rotation axis;
[0195] The first positional relationship is that the first surface of the first body is opposite to the first surface of the second body, and the second positional relationship is that the second surface of the first body is opposite to the first surface of the second body. The first surface and the second surface of the first body are arranged back to back. The first surface of the first body is provided with a display screen, and the first surface of the second body is provided with an input device.
[0196] The first rotation axis and the second rotation axis are at a certain angle, and the first body can rotate along the two rotation axes respectively. The first body rotates in different directions and the second body presents different postures.
[0197] The first body rotates along the second rotation axis, causing the first surface of the first body to rotate from a position opposite to the first surface of the second body to a position where the second surface of the first body is opposite to the first surface of the second body.
[0198] As an example, the first body is the AB side body of a laptop computer, and the second body is the CD side body of the laptop computer. In the first positional relationship, the B side and the C side are opposite each other, and the BC side is either closed or unfolded during the rotation of the first body along the first rotation axis. In the second positional relationship, the A side and the C side are opposite each other, and the AC side is either closed or unfolded during the rotation of the first body along the first rotation axis. The first side of the first body is the B side, the second side is the A side, and the first side of the second body is the C side.
[0199] In one possible implementation, a connecting structure is provided at the center of the adjacent sides of the first body and the second body. The connecting structure contains a drive module and other structures, which drive the first body to rotate along the first rotation axis and the second rotation axis respectively.
[0200] During the process of switching from a first positional relationship to a second positional relationship between the first body and the second body, the first body can be controlled to rotate along the first rotation axis to a first target position, and then the first body can be controlled to rotate along the second rotation axis to a second target position. At the second target position, the first body and the second body are in a second positional relationship. Alternatively, the first body can be controlled to rotate along the second rotation axis to a third target position, and then the first body can be controlled to rotate along the first rotation axis to a fourth target position. At the fourth target position, the first body and the second body are in a second positional relationship.
[0201] In one possible implementation, the first target position can be a position where the first body and the second body are nearly perpendicular, and the second target position is a position where the second surface of the first body and the first surface of the second body are opposite each other.
[0202] In one possible implementation, the third target position can be a position where the first body and the second body are nearly non-overlapping, and the fourth target position is a position where the second surface of the first body and the first surface of the second body are opposite each other.
[0203] Figure 13 This is a schematic diagram illustrating a first body and a second body in a first positional relationship in an electronic device provided in this application embodiment. It includes a first body 1301, a second body 1302, and a connector 1303 connecting the two. The connector 1303 is disposed at the center of the adjacent sides of the first body 1301 and the second body 1302. Through the connector 1303, the first body 1301 can rotate along a first rotation axis, changing the angle between the adjacent surfaces of the first and second bodies to fit closer to or move away from the second body. The first rotation axis in the diagram is perpendicular to the direction shown. Figure 13 The diagram illustrates the process of the first and second bodies moving from being joined together to unfolding to a perpendicular angle and then back to unfolding at an obtuse angle. The first and second bodies can also switch from unfolding to being joined together. During this process, only the first body needs to rotate along the first rotation axis; it does not rotate along the second rotation axis. Figure 13 The image shows a side view of the electronic device, in which the connector is not visible and is indicated by dashed lines.
[0204] Figure 14 This is a schematic diagram of a first body and a second body in a second positional relationship in an electronic device provided in this application embodiment. It includes a first body 1401, a second body 1402, and a connector 1403 connecting the two. The connector 1403 is disposed at the center of the adjacent sides of the first body 1401 and the second body 1402. Through the connector 1403, the first body 1401 can rotate along a second rotation axis. In this schematic diagram, the first body and the second body are in a second positional relationship, with the second surface 14012 (surface A) of the first body facing the first surface 14021 (surface C) of the second body. The first body rotates along a first rotation axis. The first body and the second body are viewed from a perpendicular angle (…). Figure 14 (As shown in the middle left image) Switch to Fit ( Figure 14 As shown in the right-middle figure), when the first body and the second body are attached, the second surface 14012 of the first body and the first surface 14021 of the second body are attached, the second surface 14012 of the first body is blocked, and the first surface 14011 (surface B) of the first body is exposed. Figure 14 The image shows a side view of the electronic device, in which the connector is not visible and is indicated by dashed lines.
[0205] Figure 15 This is a schematic diagram illustrating the switching of a first body and a second body in an electronic device provided in this application from a first positional relationship to a second positional relationship. It includes a first body 1501, a second body 1502, and a connector 1503 connecting the two. The connector 1503 is located at the center of the adjacent sides of the first body 1501 and the second body 1502. Through the connector 1503, the first body 1501 can rotate along a second rotation axis. In this schematic diagram, the first body first rotates along the first rotation axis, then along the second rotation axis. The first body has rotated along the first rotation axis to a perpendicular angle with the second body. Then, along the second rotation axis, the first body rotates sequentially from a position where the first surface 15011 (surface B) and the first surface 15021 (surface C) of the second body are opposite each other, until the first surface 15011 (surface B) and the first surface 15021 (surface C) of the first body form an acute angle, the two surfaces are perpendicular, and the second surface 15012 of the first body and the first surface 15021 of the second body are opposite each other.
[0206] Figure 16 This is another schematic diagram of the electronic device provided in this application, showing the switching of a first body and a second body from a first positional relationship to a second positional relationship. It includes a first body 1601, a second body 1602, and a connector 1603 connecting the two. The connector 1603 is located at the center of the adjacent sides of the first body 1601 and the second body 1602. Through the connector 1603, the first body 1601 can rotate along a second rotation axis, which is perpendicular to the rotation axis of the first body and the second body. In this schematic diagram, the first body first rotates along the second rotation axis, and then rotates along the first rotation axis. Starting from the contact posture of the first surface 16011 of the first body and the first surface 16021 of the second body, the first body 1601 first rotates along the second rotation axis until it reaches a position where it almost does not overlap with the second body. Figure 16 The first three figures illustrate the rotation process along the second rotation axis (the first three figures are top views). The second surface 16012 of the first body and the first surface 16021 of the second body face the same direction. The first body then rotates along the first rotation axis to flip the second surface 16012 to a position opposite to the first surface 16021 of the second body. This rotation continues until the second surface 16012 and the first surface 16021 of the first body form an obtuse angle, the two surfaces are perpendicular, and the second surface 16012 and the first surface 16021 of the first body are in contact. Figure 16 The last three figures show the process of rotation along the first axis of rotation (the last three figures are side views).
[0207] In one possible implementation, the processor is further configured to determine, based on the first positional relationship between the first body and the second body, that the operating mode of the electronic device is a first operating mode, and respond to input information from the input device in the second body; and to determine, based on the second positional relationship between the first body and the second body, that the operating mode of the electronic device is a second operating mode, and prohibit responding to input information from the input device in the second body.
[0208] When the first body and the second body are in a first positional relationship, with the first surface of the first body facing the first surface of the second body, and the surface where the display screen is located facing the surface where the input device is located, forming a certain angle between them, the user can operate the input device and simultaneously view the content displayed on the display screen. Therefore, in the first positional relationship, the electronic device is controlled to operate in a first operating mode, and in this first operating mode, it responds to input information from the input device in the second body.
[0209] When the first and second bodies are in a second positional relationship, with the first surfaces of the first and second bodies facing away from each other, and the display screen and input device facing away from each other, the user cannot operate the input device while simultaneously viewing the content displayed on the screen. Therefore, in this second positional relationship, the electronic device is controlled to operate in a second operating mode, and in this second operating mode, input information from the input device in the second body is disabled to reduce accidental touches on the input device and also to reduce the power consumption of the electronic device.
[0210] In one possible implementation, when the first body rotates along the second rotation axis to a position where the second surface of the first body is opposite to the first surface of the second body, the operating mode of the electronic device switches to the second operating mode; when the first body rotates along the second rotation axis to a position where the first surface of the first body is opposite to the first surface of the second body, the operating mode of the electronic device switches to the first operating mode. In the intermediate state, the operating mode of the electronic device can be the first operating mode. This application does not limit the operating mode corresponding to the intermediate state.
[0211] Figure 17 This is a schematic diagram of the system hardware of the electronic device provided in this application embodiment. The system includes a gravity sensor 1701, a model chip 1702, an MCU 1703, an encoder 1704, three drives (drives 1-3), and three motors (motors 1-3). Drives 1 and motors 1 are used to drive the first body to rotate in the horizontal direction, and drives 2-3 and motors 2-3 are used to drive the first body to rotate in the vertical direction. The horizontal direction corresponds to the direction of the second rotation axis proposed in the previous embodiment, and the vertical direction corresponds to the direction of the first rotation axis proposed in the previous embodiment. The model chip can be a chip that carries an AI (Artificial Intelligence) model, such as a large model. The encoder 1704 determines the angular velocity of the first body's rotation. The MCU, encoder, drives, and corresponding motors can be integrated on a single chip, which is indicated by dashed lines in the figure.
[0212] Gravity sensor 1701 detects the gravitational acceleration of the first and second bodies of the electronic device and transmits the acquired data to model chip 1702 via I2C (Inter-Integrated Circuit) bus. Model chip 1702 processes the received data and then sends it to MCU 1703 via SMBUS (System Management Bus). The processing by model chip 1702 may include denoising the data, determining the angles between the two bodies and the horizontal plane, the angle between the two bodies, or even target control parameters based on the gravitational acceleration. This application does not limit the content of the processing operations of the model chip. The encoder 1704 transmits the detected angular velocity to the MCU via SPI (Serial Peripheral Interface). The MCU 1703 can determine the target control parameter based on the received information such as the angle between the two bodies and the horizontal plane, the angle between the two bodies, and the angular velocity of the first body (the determination process is explained in the aforementioned method embodiment and will not be repeated here). The target control parameter is to adjust the duty cycle of the PWM. The MCU can also calculate and adjust the PWM duty cycle based on the received target control parameter. When adjusting the PWM duty cycle for the first body to rotate along the first rotation axis, the total output torque of the motor can be output to the driver 2-3. The driver 2-3 controls the motor rotation process based on the adjusted PWM duty cycle.
[0213] Figure 18 This is a flowchart illustrating a scenario of the rotation control method for an electronic device provided in this application embodiment. The scenario employs... Figure 17 The system hardware of electronic devices in the system.
[0214] The data detected by the gravity sensor is transmitted to the model chip, which outputs an angle, including the angles between the two bodies and the horizontal plane. The angle deviation is then calculated using the angle output by the model chip.
[0215] Users set opening and closing parameters through the user interface in the electronic device. These parameters include the rotation speed, distance, and position of the first body.
[0216] The rotational speed of the first body is fed back in real time through an encoder; the rotational position of the first body is fed back through a Hall sensor / limit switch.
[0217] The angle deviation, opening and closing parameters, rotation speed and position are input into the MCU. The MCU calculates the control command, which can be the duty cycle adjusted by PWM.
[0218] The MCU outputs the adjusted duty cycle to the motor driver board (which is a structure used to drive the motor). The motor driver board generates a drive current to the hollow cup motor, which outputs rotational motion. The mechanical transmission system converts this rotational motion into linear motion, which drives the screen opening and closing bracket to move linearly, thereby opening and closing the first body. The rotational speed of the first body is adjusted to achieve uniform speed control of the closing of the first body.
[0219] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the electronic device rotation control methods provided in this application.
[0220] This application also provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0221] Memory is used to store computer programs;
[0222] The processor is used to execute computer programs, enabling the electronic device to implement any of the rotation control methods for electronic devices provided in the embodiments of this application.
[0223] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the rotation control methods for electronic devices provided in this application.
[0224] The data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0225] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0226] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for controlling the rotation of an electronic device, the electronic device comprising a first body and a second body rotatably connected, comprising: Based on a preset period, target control parameters are obtained, wherein the target control parameters include a first control parameter and a second control parameter; The target control parameters are sent to the drive module of the electronic device, so that the drive module generates a control signal based on the target control parameters. The control signal is used to control the rotation speed of the first body, so that the first body automatically rotates along the first rotation axis at a speed that meets the preset uniform speed condition during rotation.
2. The rotation control method for the electronic device according to claim 1, wherein obtaining the first control parameter includes: Based on a preset period, obtain the target angle between the first body and the horizontal plane in the current period; Based on the target angle, the first control parameter for the next cycle is determined.
3. The rotation control method for the electronic device according to claim 2, wherein determining the first control parameter for the next cycle based on the target included angle includes: A target force is determined, which can affect the rotational speed of the first body; Based on the target angle and the target force, the first control parameter for the next cycle is determined.
4. The rotation control method for the electronic device according to claim 3, wherein determining the first control parameter for the next cycle based on the target angle and the target force includes: Obtain the preset angle and the rotation direction of the first body in the current cycle; Based on the relationship between the target angle and the preset angle, the rotation direction, and the target force, the first control parameter for the next cycle is determined.
5. The rotation control method for an electronic device according to claim 4, wherein determining the first control parameter for the next cycle based on the relationship between the target angle and the preset angle, the rotation direction, and the target force includes: When the rotation direction is the direction in which the first body approaches the second body, the first control sub-parameter and the second control sub-parameter for the next cycle are determined based on the relationship between the target angle and the preset angle and the target force. The first control sub-parameter and the second control sub-parameter have opposite functions in controlling the rotation speed of the first body. When the rotation direction is the direction in which the first body moves away from the second body, the third and fourth control sub-parameters for the next cycle are determined based on the relationship between the target angle and the preset angle, as well as the target force and the target angle. The third and fourth control sub-parameters have opposite effects on controlling the rotation speed of the first body.
6. The rotation control method for the electronic device according to claim 1, wherein obtaining the second control parameter includes: Obtain the first angular velocity of the first body relative to the second body in the current cycle; Based on the difference between the first angular velocity and the preset angular velocity, the second control parameter for the next cycle is determined.
7. The rotation control method for an electronic device according to claim 1, further comprising, before obtaining the target control parameters according to a preset period: A trigger command is obtained, which is used to trigger the first body to reach a target position along the first rotation axis that forms a preset angle with the second body; Determine the target duration corresponding to the preset angle; The preset angular velocity is determined based on the preset included angle and the target duration.
8. The rotation control method for the electronic device according to claim 7, wherein obtaining the trigger command includes: When the electronic device is in the first state or the second state, a preset key value is received through the preset module; A trigger command is generated based on the preset key value; In the first state, each functional module in the electronic device is powered on; in the second state, some functional modules in the electronic device are powered on.
9. A rotation control system for an electronic device, applied to the electronic device, the electronic device comprising a first body and a second body rotatably connected, the rotation control system comprising: The processor is used to obtain target control parameters according to a preset period, the target control parameters including a first control parameter and a second control parameter; The drive module is used to generate a control signal based on the target control parameters. The control signal is used to control the rotation speed of the first body so that the first body automatically rotates along the first rotation axis at a speed that meets the preset uniform speed condition during rotation.
10. The rotation control system of the electronic device according to claim 9, wherein the drive module comprises: A first driving structure is used to drive the first body to rotate along the first rotation axis; The second driving structure is used to drive the first body to rotate along the second rotation axis, so that the first body and the second body switch between a first position relationship and a second position relationship, wherein the second rotation axis is perpendicular to the first rotation axis; Wherein, the first positional relationship is that the first surface of the first body is opposite to the first surface of the second body, and the second positional relationship is that the second surface of the first body is opposite to the first surface of the second body. The first surface and the second surface of the first body are back to back. The first surface of the first body is provided with a display screen, and the first surface of the second body is provided with an input device.