Touch feedback control method and device for rotary knob, electronic equipment and medium
By optimizing motor control through sliding mode variable structure and Zebra optimization algorithm, combined with brushless motor and pressure sensor, the problem of poor feedback effect of rotary knob was solved, active tactile feedback was realized, and the user operation experience was improved.
Patent Information
- Application Number
- CN202511438898.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2026-01-09
AI Technical Summary
The existing rotary knob cannot actively provide tactile feedback, resulting in poor feedback performance.
Sliding mode variable structure control is adopted to optimize the dynamic response speed of the motor. The overshoot and convergence time are tuned by the Zebra optimization algorithm, the current Iq is adjusted to control the rotational feedback damping force, and vibration feedback is achieved by combining a brushless motor and a pressure sensor.
It enables active rotation and haptic feedback, enhancing the user experience.
Smart Images

Figure CN121308627A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of switch control technology, and in particular to a tactile feedback control method, device, electronic device and medium for a rotary knob. Background Technology
[0002] In existing technologies, rotary knobs are widely used due to their ease of operation and small footprint. However, current rotary knobs use mechanical encoders to obtain the knob's status, which cannot actively provide feedback to the user to determine whether the function has been triggered, resulting in poor feedback. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a tactile feedback control method, device, electronic device, and medium for a rotary knob.
[0004] In a first aspect, this application provides a tactile feedback control method for a rotary knob, the method comprising: The current I in the three-phase stationary coordinate system a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β ; The current I in the two-phase stationary coordinate system α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current I q ; Sliding mode variable structure control is used to optimize the convergence speed of the drive motor during the dynamic response process; The Zebra optimization algorithm is used for real-time tuning to minimize overshoot and optimize convergence time. By adjusting the current I q Control the magnitude of the rotational feedback damping force.
[0005] In one embodiment, the method of optimizing the motor's response speed during the dynamic response process using sliding mode variable structure control includes: Define the synovial surface S:
[0006] in, This is the reference speed for the motor. This refers to the actual speed of the motor; An exponentially approaching model is constructed based on the synovial surface S, and the exponentially approaching model includes the following formula:
[0007] in, For synovial surface The time derivative, which indicates the convergence rate. , For switching term coefficients, , The coefficients of the linear term, For a sign function, when Output 1 when Output -1.
[0008] In one embodiment, the real-time tuning using the Zebra optimization algorithm to minimize overshoot and optimize convergence time includes: Switching factor and linear term coefficients As an optimization vector, it forms a two-dimensional parameter vector. Set the zebra population size and randomly generate the initial parameter values for the two-dimensional parameter vector; Construct an objective function, the objective function of which has the following formula:
[0009] in, Let be the objective function. For overshoot, For convergence time; Calculate the overshoot using the following formula:
[0010] in, This is the maximum speed of the motor. This is the reference speed for the motor; Calculate the convergence time using the following formula:
[0011] in, for The motor speed at any given moment; A randomly generated two-dimensional parameter vector is used as a zebra individual, and the two-dimensional parameter vector is updated according to the current position and the historical best position.
[0012] in, Current position For historical position, To explore step length, rand() A random number in the range [0,1]. For the individual's historical optimal parameters; Introducing the global optimal position Guiding the group to move to a better area:
[0013] in, As a collaborative factor, This represents the two-dimensional parameter vector of the i-th individual after the group collaboration phase update. This represents the temporary two-dimensional parameter vector obtained after the individual exploration phase update; Perform boundary checks on the updated two-dimensional parameter vector and constrain the switching term coefficients. and linear term coefficients Within the preset physical range; If the change in the objective function J is less than a preset threshold or the maximum number of iterations is reached during a preset number of iterations, then the current global optimal position is output. As the optimal gain, and based on the optimal gain, the time derivative is optimized and controlled.
[0014] In one embodiment, the method further includes: Multiple damping curves are preset, and each damping curve is used to simulate the corresponding knob rotation feedback mode; The corresponding knob rotation feedback mode is switched based on the received user rotation operation.
[0015] In one embodiment, the method further includes: Calculate the torque value using the following torque command calculation formula:
[0016] For the first proportional gain, This is the first differential gain; This is a nonlinear damping term; For the current angle of the motor, Current motor speed.
[0017] In one embodiment, the method further includes: Obtain the raw pressure value, and then obtain the filtered pressure value based on the raw pressure value. ; Monitor the pressure baseline when no pressing operation is performed. The following formula is used to dynamically eliminate temperature drift and zero drift:
[0018] in, As a forgetting factor, only Update when the value is less than the current threshold; Set the dynamic threshold according to the following formula:
[0019] in, This is the threshold offset; When the filtered pressure value Greater than the dynamic threshold At any time, vibration feedback is triggered.
[0020] In one embodiment, the triggering of vibration feedback includes: A high-frequency attenuation sinusoidal position command is set according to the following formula:
[0021] in Indicates the motor reference position. A The amplitude of the vibration. The vibration frequency, It is the attenuation constant; A proportional-derivative (PD) controller is used to enable the motor to track ;
[0022] in As the current input command for the q-axis of the motor. This represents the actual position of the motor. This is the second proportional gain. This is the second differential gain.
[0023] Secondly, this application provides a tactile feedback control device for a rotary knob, the tactile feedback control device for the rotary knob comprising: The first conversion module is used to convert the current I in the three-phase stationary coordinate system. a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β ; The second conversion module is used to convert the current I of the two-phase stationary coordinate system. α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current I q ; The first processing module is used to optimize the convergence speed of the drive motor in the dynamic response process using sliding mode variable structure control. The second processing module is used to tune in real time using the Zebra optimization algorithm to minimize overshoot and optimize convergence time. Control module, used to adjust the current I q Control the magnitude of the rotational feedback damping force.
[0024] Thirdly, this application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the computer program executes the tactile feedback control method for a rotary knob provided in the first aspect when the processor is running.
[0025] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, executes the tactile feedback control method for a rotary knob provided in the first aspect.
[0026] The tactile feedback control method for the rotary knob provided in this application controls the current I in a three-phase stationary coordinate system. a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β The current I in the two-phase stationary coordinate system α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current I q The convergence speed of the drive motor during the dynamic response process is optimized using sliding mode variable structure control; real-time tuning is performed using the Zebra optimization algorithm to minimize overshoot and optimize convergence time; the current I is adjusted... q The magnitude of the rotational feedback damping force is controlled. This allows the user to control the speed and torque of the brushless motor via FOC (Fault Tolerance) when rotating the knob, providing different damping and tactile feedback at varying speeds and torques. When the user presses the knob, strain gauges sense the pressure and transmit it to a pressure sensor. Once a set pressure threshold is reached, the brushless motor is driven to rotate at high speed in alternating forward and reverse directions to simulate vibration, providing tactile feedback. This enables both active rotational and active pressing tactile feedback. Attached Figure Description
[0027] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be considered as a limitation on the scope of protection of this application. In the various drawings, similar components are numbered similarly.
[0028] Figure 1 A three-dimensional schematic diagram of the rotary knob provided in this application is shown; Figure 2 A three-dimensional exploded view of the rotary knob provided in this application is shown; Figure 3 A cross-sectional schematic diagram of the rotary knob provided in this application is shown; Figure 4 A three-dimensional schematic diagram of the pocket camera provided in this application is shown; Figure 5 A schematic diagram of the control knob system provided in this application is shown; Figure 6 A three-dimensional exploded view of the pocket camera provided in this application is shown; Figure 7 A schematic flowchart of the tactile feedback control method for the rotary knob provided in this application is shown. Figure 8 A schematic diagram of the tactile feedback control device for the rotary knob provided in this application is shown.
[0029] Icons: 800 - Tactile feedback control device for rotary knob, 801 - First conversion module, 802 - Second conversion module, 803 - First processing module, 804 - Second processing module, 805 - Control module. Detailed Implementation
[0030] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0031] The components of this application, typically described and illustrated in the accompanying drawings, can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0032] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0033] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0034] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0035] Example 1 This application provides a tactile feedback control method for a rotary knob.
[0036] The tactile feedback control method of this rotary knob can be applied to devices with rotary knobs, such as pocket cameras, cars, etc., without limitation.
[0037] See Figure 1 , Figure 1 The image shown is a three-dimensional schematic diagram of the rotary knob 10. Figure 2 The diagram shows the structure of a rotary knob, which includes a lens 1, a screen 2, a screen printed circuit board 3, a screen mounting bracket 4, a knob housing 5, a knob memory 6, a brushless motor 7, a motor mounting bracket 8, a mainboard printed circuit board 9, a mainboard bracket 10, and a knob base 11. (See also...) Figure 3 , Figure 3 The rotary knob shown also includes a pressure sensor 12 and a magnetic encoder 13. See also Figure 4 , Figure 4 The pocket camera shown includes a front-facing camera 14, a pocket camera screen 15, and a rotating knob 16. See also Figure 5 , Figure 5 The pocket camera shown also includes a front cover 17, a rear camera 18, a back cover 19, and a mainboard. It is understood that the structure of the rotating knob and the pocket camera itself can have other configurations, which are not limited here.
[0038] See Figure 6The pocket camera may include a knob housing 101, a main controller 102, a drive circuit 103, a brushless motor 7, a magnetic encoder 13, and a pressure sensor 12. The main controller 102 is electrically connected to the drive circuit 103, the magnetic encoder 13, and the pressure sensor 12. The drive circuit 103 is also electrically connected to the brushless motor 7, which is connected to the rotating housing 101 and the magnetic encoder 13. The main controller 102 can implement the steps of the tactile feedback control method for the rotating knob in this embodiment. The main controller 102 communicates with the pressure sensor 12 via a Serial Peripheral Interface (SPI), and the main controller 102 also communicates with the magnetic encoder 13 via SPI.
[0039] See Figure 7 The tactile feedback control method for the rotary knob in this embodiment includes the following steps: Step S101, convert the current I in the three-phase stationary coordinate system a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β .
[0040] In this embodiment, a sensorless FOC control mode is adopted, and decoupled control of torque and magnetic field is achieved through Clarke transformation, Park transformation and their inverse transformation.
[0041] Step S101 uses Clark transformation to obtain the current I according to the following formula (1). α and current I β .
[0042] (1) Step S102, convert the current I of the two-phase stationary coordinate system α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current I q .
[0043] In this embodiment, step S102 employs Park transformation, and the current I is obtained by transformation according to the following formula (2). d and current I q .
[0044] (2) in, This represents the rotor position angle.
[0045] Step S103: Sliding mode variable structure control is used to optimize the convergence speed of the drive motor in the dynamic response process.
[0046] In this embodiment, sliding mode variable structure control (SMC) is used to optimize the convergence speed: when the system is in an ideal control state, the deviation... This means that the actual rotational speed perfectly tracks the reference rotational speed. The sliding surface is the reference for the system state (in this case, rotational speed) to track the target. The goal of sliding mode control is to force the system state to follow the sliding surface by switching control strategies. Convergence eventually leads to error-free tracking.
[0047] In this embodiment, step S103 includes the following steps: Define the synovial surface S: (3) in, This is the reference speed for the motor. This refers to the actual speed of the motor; The exponential convergence model is used to design the switching logic of sliding mode control, ensuring that the system state converges quickly to the sliding surface. It combines fast convergence (switching term) and steady-state smoothness (linear term), avoiding the high-frequency chattering problem caused by using only the switching term in traditional sliding mode control, while ensuring that the system converges to the equilibrium point on the sliding surface according to an exponential law.
[0048] An exponentially approaching model is constructed based on the synovial surface S, and the exponentially approaching model includes the following formula: (4) in, For synovial surface The time derivative, which indicates the convergence rate. , For switching term coefficients, It determines the amplitude and speed of chattering when the system traverses the gliding surface.
[0049] , The coefficients of the linear term, Used to accelerate the convergence speed of the system near the synovial surface. For a sign function, when Output 1 when Output -1 to switch the control quantity.
[0050] Step S104: The Zebra optimization algorithm is used for real-time tuning to minimize overshoot and optimize convergence time.
[0051] In this embodiment, step S104 includes the following steps: Switching factor and linear term coefficients As an optimization vector, it forms a two-dimensional parameter vector. Set the zebra population size and randomly generate the initial parameter values of the two-dimensional parameter vector; the zebra population size can be 20 "zebras" or other values, which are not restricted here.
[0052] Construct an objective function, the objective function of which has the following formula: (5) in, Let be the objective function. This is the overshoot, which reflects the degree of oscillation in the system's transient response. The smaller the value, the better the stability. The convergence time represents the degree of oscillation in the transient response of the system. The smaller the value, the better the stability and the faster the system reaches steady state. The smaller the value, the faster the dynamic response. Calculate the overshoot using the following formula: (6) in, This is the maximum speed of the motor. This is the reference speed for the motor; Calculate the convergence time using the following formula: (7) in, for The motor speed at time τ; it should be noted that the meaning of formula (7) is: in the dynamic response process of the motor, find the minimum time t such that when time τ is greater than or equal to t, the motor speed ω(τ) at any time τ is equal to the reference speed ω. ref The absolute value of the relative error between them is always less than or equal to 2%, where 2% is the set steady-state error band, t s The smaller the value, the faster the system transitions from dynamic response to steady state, and the better its dynamic performance.
[0053] A randomly generated two-dimensional parameter vector is used as a zebra individual, and the two-dimensional parameter vector is updated according to the current position and the historical best position. (8) in, Current position For historical position, To explore step size (e.g., 0.5). rand() A random number in the range [0,1]. These are the individual's historical optimal parameters; it should be further noted that this is a two-dimensional parameter vector. The values of these parameters have a one-to-one correspondence with the individual's historical optimal parameters. The process of determining the individual's historical optimal parameters includes: comparing the objective function value J of the individual's current two-dimensional parameter vector (i.e., the value in Formula 5) with its own historical optimal value. If the current objective function value J is smaller, the current parameter vector is updated; otherwise, the original optimal parameters are maintained. Current position: The parameter vector updated by the individual through exploration and collaboration in the current iteration, i.e., the latest [ε, k]. Historical position: The parameter vector of the individual in the previous iteration, used to calculate the direction and step size of the position update. Individual historical optimal parameters: The parameter vector (optimal solution) that minimizes the objective function J from the initial iteration to the current state. The current position, historical position, and individual historical optimal parameters are all two-dimensional parameter vectors. The specific value.
[0054] Introducing the global optimal position Guiding the group to move to a better area: (9) Among them, the global optimal position This represents the parameter of the individual that minimizes the objective function J among all individuals in the current population. The collaboration factor (e.g., can be set to 0.3) controls the guidance strength of the global optimal position on individuals. This represents the two-dimensional parameter vector of the i-th individual after the group collaboration phase update; it is a temporary parameter vector obtained during the individual exploration phase. The result is a further optimization based on the previous one. This represents the temporary two-dimensional parameter vector obtained after the individual exploration phase update, i.e., the intermediate result calculated using Formula 8. rand(): a random number between [0,1], increasing the randomness of the search. This represents the original parameter vector of an individual at the start of the iteration.
[0055] Perform boundary checks on the updated two-dimensional parameter vector and constrain the switching term coefficients. and linear term coefficients Within the preset physical range.
[0056] As an example, perform boundary checks on the updated parameters to ensure and Within the physical range. If outside the range, truncate to the boundary value (e.g., ...). (When forced to be set to 5).
[0057] If the change in the objective function J is less than a preset threshold or the maximum number of iterations is reached during a preset number of iterations, then the current global optimal position is output. As the optimal gain, and based on the optimal gain, the time derivative is optimized and controlled.
[0058] As an example, when the objective function is in 5 consecutive iterations The change is less than the threshold (e.g., Δ). If the value is less than 0.01, or if the maximum number of iterations (e.g., 50) is reached, then the current value is output. As the optimal gain And apply it to the sliding mode controller. In this way, the equilibrium point in formula (4) can be determined.
[0059] Step S105, by adjusting the current I q Control the magnitude of the rotational feedback damping force.
[0060] In this embodiment, the rotational damping force is proportional to the motor torque, and is controlled by adjusting the current I. q The reference value is used to achieve damping variation.
[0061] In this embodiment, the following steps are also included: Multiple damping curves are preset, and each damping curve is used to simulate the corresponding knob rotation feedback mode; The corresponding knob rotation feedback mode is switched based on the received user rotation operation.
[0062] In this embodiment, various damping curves are preset, such as linear, exponential, and stepped curves, without limitation. The purpose of the damping curves is to simulate different knob rotation feel by providing damping forces related to angle and angular velocity, such as linear, exponential, or stepped resistance changes, thereby enhancing the realism of user operation and interactive experience. Figures 1-5 Both pressing down and rotating are operated by the control knob 16, and the pressure sensor 12 is used to sense pressure changes.
[0063] In this embodiment, the method further includes: Calculate the torque value using the following torque command calculation formula:
[0064] Indicates the torque value. The first proportional gain is used to provide a sense of positioning and a reset trend. For example, the system can set multiple virtual slot positions, and when the knob deviates from these positions, , The device generates a torque that attempts to pull the knob back to the nearest locking point, simulating a "click" click for positioning. When the user releases their hand, the knob automatically returns to zero (the defined initial locking point). The first derivative gain provides a speed-dependent resistance feel to stabilize the system, making the rotation feel smoother and more responsive than a dry mechanical friction. When quickly adjusting the rotation speed of knob 16, the resistance is greater, resulting in a stable feel; during slow, fine-tuning, the resistance is very small, providing a precise feel. From a control perspective, the derivative term is predictive. It senses the trend of speed changes, effectively suppressing potential oscillations and overshoots in the system (knob), resulting in smoother, more responsive torque from the motor, without producing a "jittering" or "buzzing" unpleasant experience. This is a nonlinear damping term, determined by the current angle of the motor. and rotational speed Together, they determine the linear, exponential, and stepped damping curves mentioned above; For the current angle of the motor, Current motor speed. It should be noted that the first proportional gain... The size is determined based on system design parameters such as the required positioning strength, the number and spacing of virtual card slots, and is used to adjust the reset torque intensity. First differential gain The values need to match the dynamic characteristics of the system (such as inertia, damping, etc.) and be determined through experimental debugging or model calculation to suppress oscillations and overshoot, and achieve a smooth and responsive feel.
[0065] In this embodiment, the method further includes: Obtain the raw pressure value, and then obtain the filtered pressure value based on the raw pressure value. .
[0066] As an example, the strain gauge resistance change is converted into a small voltage signal via a Wheatstone bridge, then amplified by an instrumentation amplifier, and finally sampled by an MCU to obtain the raw pressure value. .
[0067] High-frequency noise is suppressed using a moving average filter: (11) in is the filtered pressure value, and N is the sliding window size.
[0068] Monitor the pressure baseline when no pressing operation is performed. The following formula is used to dynamically eliminate temperature drift and zero drift: (12) in, As a forgetting factor (e.g., 0.999), only when... Update when the value is less than the current threshold.
[0069] Set the dynamic threshold according to the following formula: (13) in, This is the threshold offset, which can be manually set according to user mode or adaptively learned by the system: if the user presses multiple times without reaching the threshold, the system slightly reduces it. If minor false triggers occur multiple times, increase the risk. .
[0070] When the filtered pressure value Greater than the dynamic threshold At any time, vibration feedback is triggered.
[0071] By adopting the above process of using dynamic thresholds, false triggering can be avoided and the system can be adapted to different users.
[0072] It should be noted that the vibration feedback is controlled by a state machine to ensure that a complete vibration cycle can be completed whenever it is triggered, avoiding the inconsistent feeling of "half" vibration caused by different pressing times. In order to simulate high-quality vibration, it is not a simple drive motor to rotate forward and reverse, but a high-frequency decaying sine position command is given.
[0073] In this embodiment, the triggering of vibration feedback includes: A high-frequency attenuation sinusoidal position command is set according to the following formula: (14) in Indicates the motor reference position. A The amplitude of the vibration. The vibration frequency, The constant is used to simulate the decay process of natural vibrations. Formula 14 is used to provide the process of a simulated vibration.
[0074] A proportional-derivative (PD) controller is used to enable the motor to track ; (15) in As the current input command for the motor's q-axis, this current input command determines the motor's output torque. This represents the actual position of the motor. This is the second proportional gain, and the second proportional gain is related to the position deviation ( It is proportional to the position and is used to quickly reduce position errors.
[0075] The second differential gain is related to the actual angular velocity of the motor. The negative value is proportional to the value of the current, which is used to suppress motor speed, reduce overshoot, and improve tracking stability. Formula (15) simulates the vibration process and controls the output current of the motor's q-axis.
[0076] In addition to the screen built into the pocket camera, users can also interact with the screen on the rotating knob. Pressing the knob switches between function modes, such as standard camera mode and face tracking mode, live streaming mode and noise reduction mode. Rotating the knob adjusts the volume, brightness, and lens focus, and different rotation and pressing tactile feedback are available in different function modes.
[0077] The tactile feedback control method for the rotary knob provided in this embodiment controls the current I in a three-phase stationary coordinate system. a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β The current I in the two-phase stationary coordinate system α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current I q The convergence speed of the drive motor during the dynamic response process is optimized using sliding mode variable structure control; real-time tuning is performed using the Zebra optimization algorithm to minimize overshoot and optimize convergence time; the current I is adjusted... q The magnitude of the rotational feedback damping force is controlled. This allows the user to control the speed and torque of the brushless motor via FOC (Fault Tolerance) when rotating the knob, providing different damping and tactile feedback at varying speeds and torques. When the user presses the knob, strain gauges sense the pressure and transmit it to a pressure sensor. Once a set pressure threshold is reached, the brushless motor is driven to rotate at high speed in alternating forward and reverse directions to simulate vibration, providing tactile feedback. This enables both active rotational and active pressing tactile feedback.
[0078] Example 2 In addition, this application provides a tactile feedback control device for a rotary knob.
[0079] Specifically, such as Figure 8 As shown, the tactile feedback control device 800 for the rotary knob includes: The first conversion module 801 is used to convert the current I in the three-phase stationary coordinate system. a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β ; The second conversion module 802 is used to convert the current I of the two-phase stationary coordinate system. α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current Iq ; The first processing module 803 is used to optimize the convergence speed of the drive motor in the dynamic response process by using sliding mode variable structure control. The second processing module 804 is used to tune in real time using the Zebra optimization algorithm to minimize overshoot and optimize convergence time. Control module 805 is used to adjust the current I q Control the magnitude of the rotational feedback damping force.
[0080] The tactile feedback control device 800 for the rotary knob provided in this embodiment can realize the tactile feedback control method for the rotary knob provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0081] The tactile feedback control device for the rotary knob provided in this embodiment controls the current I in the three-phase stationary coordinate system. a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β The current I in the two-phase stationary coordinate system α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current I q The convergence speed of the drive motor during the dynamic response process is optimized using sliding mode variable structure control; real-time tuning is performed using the Zebra optimization algorithm to minimize overshoot and optimize convergence time; the current I is adjusted... q The magnitude of the rotational feedback damping force is controlled. This allows the user to control the speed and torque of the brushless motor via FOC (Fault Tolerance) when rotating the knob, providing different damping and tactile feedback at varying speeds and torques. When the user presses the knob, strain gauges sense the pressure and transmit it to a pressure sensor. Once a set pressure threshold is reached, the brushless motor is driven to rotate at high speed in alternating forward and reverse directions to simulate vibration, providing tactile feedback. This enables both active rotational and active pressing tactile feedback.
[0082] Example 3 In addition, this application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program executes the tactile feedback control method for a rotary knob provided in Embodiment 1 when it is run on the processor.
[0083] The electronic device provided in this embodiment can implement the tactile feedback control method of the rotary knob provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0084] Example 4 This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the tactile feedback control method for a rotary knob provided in Embodiment 1.
[0085] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0086] The computer-readable storage medium provided in this embodiment can implement the tactile feedback control method of the rotary knob provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0087] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0089] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A tactile feedback control method for a rotary knob, characterized in that, The method includes: The current I in the three-phase stationary coordinate system a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β ; The current I in the two-phase stationary coordinate system α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current I q ; Sliding mode variable structure control is used to optimize the convergence speed of the drive motor during the dynamic response process; The Zebra optimization algorithm is used for real-time tuning to minimize overshoot and optimize convergence time. By adjusting the current I q Control the magnitude of the rotational feedback damping force.
2. The method according to claim 1, characterized in that, The method of optimizing the motor's response speed during dynamic response using sliding mode variable structure control includes: Define the synovial surface S: in, This is the reference speed for the motor. This refers to the actual speed of the motor. An exponentially approaching model is constructed based on the synovial surface S, and the exponentially approaching model includes the following formula: in, For synovial surface The time derivative, which indicates the convergence rate. , For switching term coefficients, , The coefficients of the linear term, For a sign function, when Output 1 when Output -1.
3. The method according to claim 2, characterized in that, The real-time tuning using the Zebra optimization algorithm to minimize overshoot and optimize convergence time includes: Switching factor and linear term coefficients As an optimization vector, it forms a two-dimensional parameter vector. Set the zebra population size and randomly generate the initial parameter values for the two-dimensional parameter vector; Construct an objective function, the objective function of which has the following formula: in, Let be the objective function. For overshoot, For convergence time; Calculate the overshoot using the following formula: in, This is the maximum speed of the motor. This is the reference speed for the motor; Calculate the convergence time using the following formula: in, for The motor speed at any given moment; A randomly generated two-dimensional parameter vector is used as a zebra individual, and the two-dimensional parameter vector is updated according to the current position and the historical best position. in, Current position For historical position, To explore step length, rand() A random number in the range [0,1]. For the individual's historical optimal parameters; Introducing the global optimal position Guiding the group to move to a better area: in, As a collaborative factor, This represents the two-dimensional parameter vector of the i-th individual after the group collaboration phase update. This represents the temporary two-dimensional parameter vector obtained after the individual exploration phase update; Perform boundary checks on the updated two-dimensional parameter vector and constrain the switching term coefficients. and linear term coefficients Within the preset physical range; If the change in the objective function J is less than a preset threshold or the maximum number of iterations is reached during a preset number of iterations, then the current global optimal position is output. As the optimal gain, and based on the optimal gain, the time derivative is optimized and controlled.
4. The method according to claim 3, characterized in that, The method further includes: Multiple damping curves are preset, and each damping curve is used to simulate the corresponding knob rotation feedback mode; The corresponding knob rotation feedback mode is switched based on the received user rotation operation.
5. The method according to claim 4, characterized in that, The method further includes: Calculate the torque value using the following torque command calculation formula: For the first proportional gain, This is the first differential gain; This is a nonlinear damping term; For the current angle of the motor, Current motor speed.
6. The method according to claim 5, characterized in that, The method further includes: Obtain the raw pressure value, and then obtain the filtered pressure value based on the raw pressure value. ; Monitor the pressure baseline when no pressing operation is performed. The following formula is used to dynamically eliminate temperature drift and zero drift: in, As a forgetting factor, only Update when the value is less than the current threshold; Set the dynamic threshold according to the following formula: in, This is the threshold offset; When the filtered pressure value Greater than the dynamic threshold At any time, vibration feedback is triggered.
7. The method according to claim 6, characterized in that, The triggered vibration feedback includes: A high-frequency attenuation sinusoidal position command is set according to the following formula: in Indicates the motor reference position. A The amplitude of the vibration. The vibration frequency, It is the attenuation constant; A proportional-derivative (PD) controller is used to enable the motor to track ; in As the current input command for the q-axis of the motor. This represents the actual position of the motor. For the second proportional gain, This is the second differential gain.
8. A tactile feedback control device for a rotary knob, characterized in that, The device includes: The first conversion module is used to convert the current I in the three-phase stationary coordinate system. a Current I b Current I c The current I transformed into a two-phase stationary coordinate system α and current I β ; The second conversion module is used to convert the current I of the two-phase stationary coordinate system. α Current I β Current I converted to a two-phase rotating coordinate system oriented by the rotor flux linkage d and current I q ; The first processing module is used to optimize the convergence speed of the drive motor in the dynamic response process using sliding mode variable structure control. The second processing module is used to tune in real time using the Zebra optimization algorithm to minimize overshoot and optimize convergence time. Control module, used to adjust the current I q Control the magnitude of the rotational feedback damping force.
9. A pocket camera, characterized in that, It includes a memory and a processor, the memory storing a computer program that executes the tactile feedback control method of the rotary knob according to any one of claims 1 to 7 when the processor is running.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when run on a processor, executes the tactile feedback control method for the rotary knob as described in any one of claims 1 to 7.
Citation Information
Cited By
Testing system of rotating equipment
CN121633833A
A test system for a rotating device
CN121633833B