Vehicle rearview mirror synchronization control method, device and vehicle

By predicting the communication delay of the master-slave controller and aligning the current ripple feature points, the synchronization difficulties caused by individual differences in motors in the synchronous control of vehicle rearview mirrors are solved, achieving low-cost, real-time, and accurate synchronization.

CN122501252APending Publication Date: 2026-08-04SHENZHEN STREAMING VIDEO TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN STREAMING VIDEO TECH
Filing Date
2026-06-26
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing vehicle rearview mirror synchronization control schemes cannot achieve real-time speed matching and position alignment of the left and right motors during movement, especially due to the lack of sensor feedback in cost-sensitive components, which leads to synchronization difficulties.

Method used

By predicting the communication delay between the master and slave controllers and aligning the current ripple feature points, the current ripple feature points are used as a virtual encoder signal source to achieve synchronous control of the left and right rearview mirrors, including prediction of ripple count values ​​and adjustment of motor speed and position.

Benefits of technology

Without increasing the cost of sensor hardware, real-time and precise synchronous following of the left and right rearview mirrors was achieved, solving the problems of inconsistent speed and asynchronous position caused by individual differences in motors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122501252A_ABST
    Figure CN122501252A_ABST
Patent Text Reader

Abstract

The application relates to the field of vehicle motor control, in particular to a vehicle rearview mirror synchronous control method and device and a vehicle. The method comprises the following steps: a master controller periodically sends a first ripple count value corresponding to a target sampling timestamp and a first motor speed to a slave controller; the slave controller determines a communication delay based on a current timestamp and the target sampling timestamp; the slave controller can predict a second ripple count value of the master controller at the current timestamp by using the communication delay, the first ripple count value and the first motor speed, and the count deviation caused by the communication delay is compensated; the slave controller synchronously corrects two dimensions of speed and position by comprehensively considering the actual motor speed, the actual ripple count value, the predicted master-side ripple count value and the master-side motor speed. In the case of low cost without setting a sensor, real-time and accurate synchronous following of the master and the slave of the rearview mirror can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle motor control, and in particular to a method, device and vehicle for synchronous control of vehicle rearview mirrors. Background Technology

[0002] Conventional vehicle rearview mirror synchronization control schemes mostly cause the left and right rearview mirrors to start moving at the same time. However, even if the starting time is the same, due to differences in manufacturing tolerances, lubrication conditions, mechanical resistance, and wiring harness voltage drop between the left and right motors, their operating speeds may not be the same.

[0003] For cost-sensitive components such as vehicle rearview mirrors and windows, most use ordinary DC brushed motors without sensors, based on time control or current threshold control. However, these motors cannot sense the real-time position and phase of the motor, and therefore cannot perform real-time speed matching and position alignment of the left and right motors during movement.

[0004] Therefore, how to provide a low-cost method for motor synchronization control is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] The purpose of this application is to provide a method, device, and vehicle for synchronous control of vehicle rearview mirrors, which can achieve low-cost synchronous control of motors.

[0006] Firstly, a method for synchronous control of vehicle rearview mirrors is provided, including: After receiving the first ripple count value and the first motor speed corresponding to the target sampling timestamp periodically sent by the main controller, the slave controller determines the communication delay based on the current timestamp and the target sampling timestamp; the first ripple count value is the ripple count value obtained by the main controller counting the first ripple feature points, and the first ripple feature points are ripple feature points extracted based on the main armature current waveform; Based on the communication delay, the first ripple count value, and the first motor speed, the second ripple count value of the main controller at the current timestamp is predicted. Based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp, the motor speed and motor position of the slave controller are adjusted.

[0007] In a preferred embodiment, this application can be further configured to include, before adjusting the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp, the following additional features: Obtain the slave armature current waveform corresponding to the slave controller at the current timestamp; Extract the ripple feature points from the armature current waveform; The ripple feature points of the extracted armature current waveform are counted to obtain the third ripple count value of the slave controller at the current timestamp.

[0008] In a preferred embodiment, this application can be further configured to: extract the ripple feature points from the armature current waveform, including: The armature current waveform is preprocessed to obtain a preprocessed current waveform; wherein the preprocessing includes at least one of the following: baseline removal and adaptive bandpass filtering; Based on the preprocessed current waveform, the ripple feature point corresponding to the controller is determined.

[0009] In a preferred embodiment, this application can be further configured such that preprocessing includes adaptive bandpass filtering. The armature current waveform is preprocessed to obtain a preprocessed current waveform, including: The center frequency of the bandpass filter in the current control cycle is determined based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter in the previous control cycle. The forward and feedback coefficients of the bandpass filter are determined based on the sampling frequency and the center frequency of the bandpass filter in the current control cycle. The armature current waveform is filtered using a bandpass filter updated based on the forward and feedback coefficients to obtain a preprocessed current waveform.

[0010] In a preferred embodiment, this application may be further configured to include, before determining the center frequency of the bandpass filter for the current control cycle based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter for the previous control cycle, the following additional steps: The ripple frequency of the current control cycle is calculated based on the time interval between adjacent effective ripple feature points that have been detected. Alternatively, the ripple frequency of the current control cycle can be calculated based on the second motor speed and the number of effective ripple feature points per revolution.

[0011] In a preferred embodiment, this application can be further configured to: determine the ripple feature points corresponding to the controller based on the preprocessed current waveform, including: Differentiating the preprocessed current waveform yields peak information for multiple peaks, whereby the peak information includes peak position and peak amplitude. Based on the peak information of the multiple peaks, the ripple feature points corresponding to the controller are determined using a preset optimization method. The preset optimization method includes at least one of the following: Remove the peaks whose amplitude is not greater than a preset amplitude threshold from the plurality of peaks to obtain the ripple feature points corresponding to the controller; By supplementing the missing peaks between the two target peaks, the ripple feature points corresponding to the controller are obtained; The two target peaks refer to two peaks whose peak positions are more than a preset multiple of the desired interval. The missing peaks are determined based on the desired interval and the peak positions of the two target peaks.

[0012] In a preferred embodiment, this application may be further configured to include: If the main controller receives a stall status information, the system will enter either a waiting mode or a soft shutdown mode. The stall status information is information sent by the main controller via bus broadcast when it detects a stall in the main device.

[0013] Secondly, another method for synchronized control of vehicle rearview mirrors is provided, including: The main controller acquires the main armature current waveform and the first motor speed at the target sampling timestamp of the main motor; Extract the first ripple feature point from the main armature current waveform of the main motor; The first ripple count value is obtained by counting the first ripple feature points; The first ripple count value and the first motor speed corresponding to the target sampling timestamp are periodically sent to the slave controller; The slave controller is used to implement the vehicle rearview mirror synchronization control method as described in any of the first aspects.

[0014] Thirdly, a vehicle rearview mirror synchronization control device is provided, comprising: a communication delay determination module, configured to, after receiving a first ripple count value and a first motor speed corresponding to a target sampling timestamp periodically sent by a main controller, determine a communication delay based on the current timestamp and the target sampling timestamp by a slave controller; the first ripple count value is a ripple count value obtained by the main controller counting first ripple feature points, the first ripple feature points being ripple feature points extracted based on the main armature current waveform; a prediction module, configured to, based on the communication delay, the first ripple count value, and the first motor speed, predict a second ripple count value of the main controller at the current timestamp; and a control module, configured to, based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and a third ripple count value of the slave controller at the current timestamp, adjust the motor speed and motor position of the slave controller.

[0015] Fourthly, a vehicle rearview mirror synchronization control device is provided, comprising: an acquisition module for a main controller to acquire the main armature current waveform and a first motor speed at a target sampling timestamp of the main motor; an extraction module for extracting first ripple feature points from the main armature current waveform of the main motor; a counting module for counting the first ripple feature points to obtain a first ripple count value; and a sending module for periodically sending the first ripple count value and the first motor speed corresponding to the target sampling timestamp to a slave controller; wherein the slave controller is used to determine a communication delay based on the current timestamp and the target sampling timestamp; predict a second ripple count value of the main controller at the current timestamp based on the communication delay, the first ripple count value, and the first motor speed; and adjust the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp.

[0016] Fifthly, an electronic device is provided, the electronic device including a memory and a processor, the memory storing a computer program, the processor executing the method of any one of the first aspects, or the method of the second aspect, when running the computer program.

[0017] A sixth aspect provides a vehicle including a master controller and a slave controller, wherein the slave controller is configured to implement the method described in any of the first aspects; and the master controller is configured to implement the method described in the second aspect.

[0018] In a seventh aspect, a computer-readable storage medium is provided, wherein at least one piece of program code is stored therein, the program code being loaded and executed by a processor to implement the method as described in any of the first aspects, or the method as described in the second aspect.

[0019] Eighthly, a computer program product is provided, comprising a computer program or instructions that, when executed by a processor, implement the method as described in any of the first aspects, or the method as described in the second aspect.

[0020] In summary, the vehicle rearview mirror synchronization control method provided in this application has the following beneficial technical effects: the master controller periodically sends the first ripple count value and the first motor speed corresponding to the target sampling timestamp to the slave controller. The slave controller determines the communication delay based on the current timestamp and the target sampling timestamp. Using this communication delay, the first ripple count value, and the first motor speed, the slave controller can predict the second ripple count value that the master controller should have at the current timestamp, compensating for the counting deviation caused by the communication delay. The slave controller integrates its own current actual motor speed, actual ripple count value, and predicted master-side ripple count value and master-side motor speed to perform synchronization correction on both the speed and position dimensions. Real-time and accurate synchronization of the master and slave rearview mirrors can still be achieved without the need for sensors at low cost.

[0021] In addition, this application also provides a device and a vehicle, both of which have the aforementioned beneficial technical effects. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating a method for synchronous control of vehicle rearview mirrors provided in an embodiment of this application; Figure 2 This is a flowchart of a ripple feature point extraction and counting method provided in an embodiment of this application; Figure 3 This application provides a schematic diagram of the interaction between a master controller and a slave controller; Figure 4 This is a flowchart illustrating another method for synchronous control of vehicle rearview mirrors provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0024] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they are within the scope of this application.

[0025] It should be noted that, in the optional embodiments of this application, the data related to object information, when applied to specific products or technologies, requires the permission or consent of the object. Furthermore, the collection, use, and processing of this data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if the embodiments of this application involve data related to an object, it must be obtained with the permission and consent of the object, the permission and consent of relevant departments, and in accordance with the relevant laws, regulations, and standards of the country and region. If the embodiments involve personal information, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required. The embodiments also need to be implemented with the permission and consent of the object.

[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments 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, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0027] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0028] Most existing vehicle rearview mirror synchronization control solutions focus on initial synchronization, meaning that the left and right rearview mirrors start moving at the same moment. However, even if the starting moment is the same, due to differences in manufacturing tolerances, lubrication conditions, mechanical resistance, and wiring harness voltage drops between the left and right motors, their operating speeds may still be inconsistent. This can lead to one side moving faster and the other slower during the movement, resulting in a difference in the time it takes to reach the destination. This asynchrony affects the user's perception of the consistency of the movement.

[0029] To address process synchronization issues, traditional industrial solutions typically add Hall effect sensors or encoders to the motor to obtain precise position and speed feedback for closed-loop control. However, in cost-sensitive components such as automotive rearview mirrors and windows, sensorless standard brushed DC motors are mostly used to reduce costs.

[0030] For sensorless motors, related technologies typically employ time control or current threshold control. However, these technologies cannot sense the motor's real-time position and phase, thus making it impossible to perform real-time speed matching and position alignment between the left and right motors during motion.

[0031] The inventors discovered during their research that during the rotation of a DC brushed motor, the switching of brushes between commutator segments causes minute fluctuations in the power supply circuit current; these fluctuations are called current ripple. Each ripple cycle precisely corresponds to a fixed angle rotated by the motor (depending on the number of pole pairs), which can serve as a signal source for a virtual encoder. Therefore, this application utilizes this physical characteristic to propose a synchronization control method based on the alignment of current ripple feature points, achieving precise synchronization of the left and right rearview mirror movements without increasing sensor hardware costs.

[0032] Specifically, embodiments of this application provide a method for synchronous control of vehicle rearview mirrors, such as... Figure 1 As shown, the method provided in this embodiment can be executed by a slave controller, which is a controller corresponding to the rearview mirror. The method includes: S101. After receiving the first ripple count value and the first motor speed corresponding to the target sampling timestamp periodically sent by the main controller, the slave controller determines the communication delay based on the current timestamp and the target sampling timestamp. The first ripple count value is the ripple count value obtained by the main controller counting the first ripple feature points. The first ripple feature points are the ripple feature points extracted based on the main armature current waveform. In this diagram, the main controller refers to the controller corresponding to the left rearview mirror. The main controller periodically pushes data to the slave controller at fixed time intervals. This data includes the first ripple count value corresponding to the target sampling timestamp and the first motor speed. The slave controller is the controller corresponding to the rearview mirror. The target sampling timestamp represents the moment marked by the main controller when collecting data. The main controller collects data according to a set period. The target sampling timestamp is used for delay compensation. There is a communication delay when the data sent by the main controller reaches the slave controller. If the received first ripple count value is used directly, the slave controller will only obtain a delayed spindle state. By using the target sampling timestamp and the slave controller's local current timestamp, the communication delay between sending and receiving the message can be calculated. This delay is then combined with the first motor speed for extrapolation prediction, thereby obtaining the second ripple count value of the spindle at the current timestamp.

[0033] The first ripple count value represents the number of specific ripple feature points identified by the main controller in the main armature current waveform. This number is accumulated starting after the main motor of the main rearview mirror is started. The main armature current waveform refers to the curve waveform of the current flowing through the armature winding of the main motor as a function of time.

[0034] The first motor speed represents the main motor speed obtained by sampling the first ripple count value at the current timestamp. This speed can be estimated as an equivalent speed based on the count change rate of current ripple characteristic points. The controller counts the increment of the cumulative ripple count in two adjacent control cycles, and then divides it by the corresponding time interval to obtain the ripple counting speed, which can be expressed as... .in, For the first The cumulative ripple count of the left rearview mirror within each cycle. The time difference between two adjacent statistical moments is used to characterize the current operating speed of the main motor and to provide a basis for the time delay extrapolation prediction of the main controller.

[0035] The current timestamp refers to the moment when the controller reads its local clock upon receiving the first ripple count value and the first motor speed. Communication delay refers to the difference between the current timestamp and the target sampling timestamp.

[0036] In the embodiments of this application, during the synchronous deployment of the left and right rearview mirrors, the controller of the left rearview mirror can be the master controller and the controller of the right rearview mirror can be the slave controller; of course, the controller of the right rearview mirror can also be the master controller and the controller of the left rearview mirror can be the slave controller, and the embodiments of this application are not limited thereto.

[0037] After the master controller and slave controller synchronously control the corresponding motor to start, in order to further improve the speed consistency and position consistency of the two motors, the current sampling module of the controller collects the armature current waveform in real time during the operation of the master controller and slave controller driving their respective motors; and determines the ripple count value based on the armature current waveform. This ripple count value can be used as a virtual position for subsequent control of the consistency of the master and slave positions.

[0038] Understandably, strong current oscillations are common during the initial startup phase, making it difficult to extract a stable armature current waveform. During this stage, open-loop synchronization can be used initially, with preset profile PWM outputs on both sides without closed-loop adjustment, until the armature current waveforms for several consecutive cycles are relatively regular, without significant jumps or interruptions. At this point, the armature current waveform is considered stable, allowing for closed-loop switching only after a stable waveform is detected.

[0039] In this system, the master controller, acting as the master node, periodically sends the first ripple count value and the instantaneous speed (i.e., the first motor speed) of the target sampling timestamp to the slave controller. In one possible data transmission method, the master controller can periodically package the first ripple count value, the first motor speed, and the target sampling timestamp into a single data packet and broadcast it to the network via the CAN bus. Then, upon receiving the master node's message, the slave controller calculates the communication delay by combining its local current time with the message timestamp.

[0040] S102. Based on the communication delay, the first ripple count value and the first motor speed, predict the second ripple count value of the main controller at the current timestamp. In this embodiment of the application, considering the CAN bus transmission delay ( Using the received first ripple count value directly will result in hysteresis adjustment. The slave controller can use an extrapolation algorithm to predict the theoretical position of the master node at the current moment, that is, to predict the second ripple count value of the master controller at the current timestamp. .

[0041] The extrapolation algorithm is used from the controller: ,in, The predicted position on the main controller side is obtained by extrapolation from the controller (dimensionless, ripple count). The count value (dimensionless) on the main controller side corresponding to the message reception time, i.e., the current timestamp. The ripple counting speed of the main controller at the time of message reception (unit: count / s or count / ms, depending on the implementation definition). The default motor speed remains unchanged, which is the speed of the first motor. The current timestamp (in milliseconds) from the controller. The target sampling timestamp (time unit: ms) for the main controller. Indicates communication delay.

[0042] S103. Based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp, adjust the motor speed and motor position of the slave controller.

[0043] In this embodiment, the slave controller compares the predicted second ripple count value corresponding to the master controller with the actual local third ripple count value to obtain the position error. The speed error is obtained based on the speed of the first motor and the speed of the second motor from the controller at the current timestamp. The PD controller calculates the adjustment amount of the PWM duty cycle based on two errors. The drive circuit on the controller side responds to the adjustment command, increasing the motor terminal voltage to increase the speed. After several control cycles, the phase on the controller side gradually catches up with that on the main controller side, achieving dynamic synchronous following. These "several cycles" are calibration / operating condition related quantities; in engineering, it typically takes several to tens of control cycles to bring the phase difference back to an acceptable range; for example, when the control cycle is 10ms, it is typically 3... 20 cycles (approximately 30) (200ms), which may be longer when the load difference is larger or the limiting is more conservative.

[0044] Specifically, define the position error. and speed error : , ,in, This is the second ripple count value. This is the third ripple count value. The speed of the first motor. This is the speed of the second motor.

[0045] PWM adjustment amount from the controller PD control is adopted: ,in, For position error (dimensionless, ripple count). This represents the speed error (unit: count / s or count / ms, depending on the implementation definition). This is the PWM adjustment amount (dimensionless, which can be mapped to the duty cycle increment). These are the controller parameters (dimensionless, obtained through calibration).

[0046] Furthermore, to prevent instability caused by over-adjustment, an output saturation setting can be used to limit the PWM adjustment amount. Limited to the rated range. ,in, This is the PWM adjustment limit threshold, dimensionless, set according to system calibration or experience.

[0047] In this embodiment of the application, in order to solve the problems of inconsistent speeds, asynchronous positions, and large differences in arrival times of the left and right rearview mirrors during the movement of the vehicle due to differences in motor characteristics and load, this embodiment of the application uses the ripple count value as a virtual position, uses motor current ripple extraction technology to construct virtual position feedback, and achieves phase locking of the master and slave motors throughout the entire stroke through real-time phase (ripple count value) exchange and closed-loop adjustment between the master and slave controllers, ensuring that the two not only start at the same time, but also move at the same speed and arrive at the same time.

[0048] As can be seen, in this embodiment, the master controller periodically sends the first ripple count value and the first motor speed corresponding to the target sampling timestamp to the slave controller. The slave controller determines the communication delay based on the current timestamp and the target sampling timestamp. Using this communication delay, the first ripple count value, and the first motor speed, the slave controller can predict the second ripple count value that the master controller should have at the current timestamp, compensating for the counting deviation caused by the communication delay. The slave controller integrates its own current actual motor speed, actual ripple count value, and predicted master-side ripple count value and master-side motor speed to perform synchronous correction on both the speed and position dimensions. This achieves real-time and accurate synchronous following of the rearview mirror master and slave without the need for sensors, despite the low cost.

[0049] One possible implementation of this application, before adjusting the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp, further includes: SA1. Obtain the slave armature current waveform corresponding to the slave controller under the current timestamp; SA2, Extract the ripple feature points from the armature current waveform; Among them, the ripple feature point refers to the extreme point of the periodic fluctuation caused by the ripple effect in the waveform, which can be a peak or a trough.

[0050] Furthermore, based on the armature current waveform, peak / trough identification is performed to obtain ripple feature points. The derivative of the armature current waveform can be differentiated to find the zero-crossing point of the derivative and thus locate the peak. Then the peak is determined. This is the waveform of the armature current.

[0051] SA3. Count the ripple feature points of the extracted armature current waveform to obtain the third ripple count value of the controller at the current timestamp.

[0052] For each valid peak identified, the counter on the controller side is incremented by 1, thus obtaining the third ripple count value from the controller at the current timestamp.

[0053] The method by which the main controller determines the first ripple count value can be the same as the method by which the slave controller determines the third ripple count value, and will not be repeated in the embodiments of this application.

[0054] As can be seen, in this embodiment of the application, before adjusting the slave controller motor, the slave armature current waveform at the current timestamp is obtained, the ripple feature points of the waveform are extracted, and the feature points are counted to obtain the third ripple count value.

[0055] One possible implementation of this application embodiment is that SA2 extracts ripple feature points from the armature current waveform, including: preprocessing the armature current waveform to obtain a preprocessed current waveform; wherein, the preprocessing includes at least one of the following: baseline removal, adaptive bandpass filtering; and determining the ripple feature points corresponding to the controller based on the preprocessed current waveform.

[0056] The armature current waveform contains a large amount of PWM switching noise and load fluctuations, and the ripple signal is very weak. Therefore, in order to accurately extract the ripple feature points, this application can perform preprocessing, which includes at least one of the following: baseline removal and adaptive bandpass filtering.

[0057] In this embodiment, the controller drives the motor to run, and the current sampling module of the controller collects the armature current waveform in real time. The signal processing module extracts the commutation ripple, i.e. ripple feature points, from the noise through preprocessing and feature detection algorithms, and accumulates them to obtain the current virtual absolute position, i.e., the third ripple count value.

[0058] For baseline removal, to extract AC ripple, the DC component can be subtracted first. A moving average filter is used to estimate the DC component. . , For current ripple component (A); The original signal (A) for current sampling is the armature current waveform; The DC component is estimated (A). Then, the current ripple component is obtained, which serves as the baseline-removed current waveform.

[0059] For adaptive bandpass filtering, since the motor speed changes with the process, the ripple frequency also changes. Therefore, an adaptive filter can be used to adjust the center frequency. The signal-to-noise ratio is dynamically adjusted based on the estimated rotational speed.

[0060] In the embodiments of this application, either baseline removal or adaptive bandpass filtering can be used, or both baseline removal and adaptive bandpass filtering can be used.

[0061] As can be seen, in this embodiment, before extracting the ripple feature points from the armature current waveform, the waveform is preprocessed. This preprocessing includes baseline removal and / or adaptive bandpass filtering. Baseline removal eliminates DC offset in the current waveform, preventing interference with the detection of true ripple features; adaptive bandpass filtering dynamically filters out noise unrelated to the ripple frequency, preserving and enhancing the effective ripple signal. Based on the preprocessed current waveform, determining the ripple feature points significantly reduces the probability of false detections and missed detections.

[0062] One possible implementation of this application embodiment includes preprocessing with adaptive bandpass filtering to preprocess the armature current waveform to obtain a preprocessed current waveform. This includes: determining the center frequency of the bandpass filter for the current control cycle based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter for the previous control cycle; determining the forward coefficient and feedback coefficient of the bandpass filter based on the sampling frequency and the center frequency of the bandpass filter for the current control cycle; and using the updated bandpass filter based on the forward coefficient and feedback coefficient to filter the armature current waveform to obtain the preprocessed current waveform.

[0063] The center frequency of a bandpass filter cannot be fixed; otherwise, effective ripple will be filtered out when the motor speed changes. Therefore, the filter parameters for the current cycle are dynamically calculated using the frequency of the previous cycle or the motor speed to achieve adaptive tracking.

[0064] The adaptive bandpass filter does not use a fixed center frequency, but instead calculates the ripple frequency in real time based on the estimated current motor speed, and uses this ripple frequency as the target center frequency of the bandpass filter. Its specific implementation process includes: The ripple frequency of the current control cycle is calculated based on the time interval between adjacent effective ripple feature points that have been detected; or, the ripple frequency of the current control cycle is calculated based on the second motor speed and the number of effective ripple feature points per revolution.

[0065] Specifically, in one feasible approach, the current ripple frequency is estimated based on the time interval between detected adjacent valid ripple feature points. Let the... The timestamp of each effective ripple feature point is: The timestamp of the last valid ripple feature point is The original ripple frequency estimate is: ,in, This represents the original estimate of the current ripple frequency. This indicates the time interval between two consecutive effective commutation ripples.

[0066] In another feasible approach, if the system has already established a relationship between speed and ripple frequency based on motor parameters, the motor mechanical speed can be estimated first and then converted into ripple frequency. Let the motor mechanical speed be... The unit is r / s; the number of effective ripple feature points per revolution is The target ripple frequency is: ,in, The number of motor poles, the number of commutator segments, and the selected feature point detection method are all determined by these factors. For example, when the algorithm uses each commutation ripple peak as a valid count point, This indicates the number of valid peaks that can be detected per mechanical revolution of the motor.

[0067] Furthermore, to avoid sudden changes in the filter center frequency caused by jitter in a single detection, the system performs first-order smoothing on the target ripple frequency to obtain the actual center frequency used to update the filter. That is, based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter in the previous control cycle, the center frequency of the bandpass filter in the current cycle is determined. ,in, The center frequency of the bandpass filter in the current control cycle. The center frequency of the previous control cycle. The coefficients are updated for the center frequency. Obtained through calibration, this is used to strike a balance between frequency following speed and noise immunity stability. It can be or . It can be the ripple frequency after baseline removal.

[0068] Obtain the center frequency of the bandpass filter in the current control cycle. Then, based on the sampling frequency and preset quality factor Recalculate the digital bandpass filter coefficients (forward and feedback coefficients), and preset the quality factor. These are factors determined in advance based on experience or experimentation. Taking a second-order IIR bandpass filter as an example, the following parameters can be used: , ; and then according to and Calculate the forward and feedback coefficients of the second-order bandpass filter, and update the coefficients while the filter state is continuous, so that the filter passband always covers the current main ripple frequency, thereby achieving filtering and obtaining the pre-processed current waveform.

[0069] Furthermore, to ensure project stability, the center frequency update process can also be configured with amplitude limiting and anomaly hold logic. That is: ,in, and These are the lower and upper limits of the center frequency, determined based on the motor's minimum effective speed, maximum effective speed, and sampling frequency. The minimum effective speed can be set based on experience / actual needs, in rpm; the minimum analysis order can be set based on experience / actual needs. The unit is Hz, and the lowest analysis order is dimensionless. The maximum effective speed can be set based on experience or actual needs, in rpm; the maximum analysis order can also be set based on experience or actual needs. The unit is Hz, the highest analysis order is dimensionless, and 'a' is a parameter set according to actual needs, which can be 0.4 or 0.5.

[0070] Furthermore, when the ripple is not yet stable during the startup phase, a suspected false count is detected, the interval between adjacent ripples is abnormal, or the motor is close to stalling, the system will not use the abnormal frequency value to update the center frequency, but will maintain the previous valid center frequency or switch to the preset center frequency during the startup phase.

[0071] In one feasible approach, within each sampling period or each control period, the current sampling signal can first undergo baseline removal processing to obtain... Then input the dynamically updated bandpass filter with the center frequency as described above. The filtered output is used for subsequent peak / trough detection. As the motor speed changes, the ripple frequency will be reflected in... Thus, a smooth update This ensures the filter always operates around the actual commutation ripple frequency, thereby improving the signal-to-noise ratio and counting reliability of weak ripple signals at different speeds. The essence of center frequency following the estimated speed dynamic adjustment is to estimate the current ripple frequency using the ripple interval or motor speed model, use this frequency as the target center frequency of the bandpass filter, and dynamically update the filter coefficients after smoothing, limiting, and anomaly holding, so that the filter passband moves in real time with the motor's operating speed.

[0072] As can be seen, in this embodiment, the center frequency of the current control cycle is determined based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter in the previous control cycle. Then, the forward coefficient and feedback coefficient are calculated to update the filter. Finally, the current waveform is filtered to achieve frequency self-tracking of the bandpass filter, so that the filtered current waveform always has the highest signal-to-noise ratio, thereby improving the detection rate of ripple feature points.

[0073] One possible implementation of this application embodiment involves determining the ripple feature points corresponding to the controller based on the preprocessed current waveform, including: differentiating the preprocessed current waveform to obtain peak information of multiple peaks, wherein the peak information includes peak position and peak amplitude; determining the ripple feature points corresponding to the controller based on the peak information of the multiple peaks using a preset optimization method; wherein the preset optimization method includes at least one of the following: removing peaks whose peak amplitude is not greater than a preset amplitude threshold from the multiple peaks to obtain the ripple feature points corresponding to the controller; supplementing the missing peaks between two target peaks to obtain the ripple feature points corresponding to the controller; wherein the two target peaks represent two peaks whose peak positions are separated by an expected interval greater than a preset multiple, and the missing peaks are determined based on the expected interval and the peak positions of the two target peaks.

[0074] This application incorporates anti-interference and model correction mechanisms. An amplitude threshold is set, and a dead zone is introduced. In one possible scenario, a peak is considered valid only if its amplitude exceeds a preset amplitude threshold, thus obtaining ripple feature points and ignoring noise fluctuations with excessively small amplitudes. In another possible scenario, the system maintains a desired ripple interval model, i.e., the desired interval. If the detected peak interval is significantly larger than the desired interval, a missed count is determined, and a virtual count value is inserted to maintain phase continuity and reduce the risk of error accumulation. The desired interval is an estimated interval obtained by averaging the previous n peak intervals. Furthermore, if the interval between two peaks is detected to be greater than a preset multiple of the desired interval, it indicates that the peak interval is much larger than the desired model, and a missed count is determined. The preset multiple can be set empirically, such as 2 / 3. Furthermore, based on the interval between the peak positions of the two target peaks and the expected interval, the missing ripple count value is determined. The missing ripple count value = the interval between the peak positions of the two target peaks / the expected interval. If it is not an integer, it is rounded to the nearest integer or a decimal is retained. Thus, the missing ripple count value is obtained, and ripple feature points of the missing ripple count value are evenly supplemented between the peak positions of the two target peaks.

[0075] Optimizations were made to address the issues of missed and false detections in ripple extraction. Noise was removed by using an amplitude threshold, and missed peaks were interpolated using a desired interval. This significantly improved the accuracy of ripple counting.

[0076] As can be seen, in the embodiments of this application, peaks with amplitudes not greater than a preset amplitude threshold are removed, thereby eliminating false peaks caused by minor noise or residuals; missing peaks between two target peaks are supplemented, and real ripple peaks lost due to local signal attenuation are interpolated according to the expected interval and the positions of the two peaks. Even if the original current waveform has amplitude fluctuations, local distortions or interference, accurate ripple feature points can be output.

[0077] Based on any of the above embodiments, this application provides a process for extracting and counting ripple feature points, see [link to relevant documentation]. Figure 2 ,include: The controller (master controller or slave controller) first acquires the motor's raw current signal (armature current waveform) through a current sampling circuit. This raw signal simultaneously contains the motor's DC operating current, PWM switching noise, and weak ripple generated during commutation, which requires signal processing first.

[0078] First, the DC component is removed. The DC baseline of the current is estimated using methods such as moving average. Then from the original current Subtracting from the middle yields the ripple component. : Then, bandpass filtering is performed. Since the ripple signal is usually weak and contains PWM switching noise and load disturbances, bandpass filtering retains only the frequency band containing the ripple. Because the ripple frequency changes with the motor speed, the filter's center frequency... Dynamic adjustment based on the current rotational speed is required; therefore, an adaptive center filter is employed. Then, peaks and troughs are identified. The derivative of the filtered signal is calculated to find the location where the derivative crosses zero; when the first derivative is 0 and the second derivative is less than 0, it can be identified as a peak, which is a valid ripple characteristic point. Finally, counting is performed. For each valid peak detected, the motor is considered to have rotated through a corresponding fixed angle, and the local counter is incremented by 1, forming the main controller's count. and counting from the controller side It is used as a virtual location feedback.

[0079] In addition, to avoid false noise peaks, missed detections, or miscounting caused by abnormal ripple intervals, amplitude thresholds, dead zone judgments, and comparisons with theoretical interval models are added. If obvious abnormalities in ripple intervals are found, supplementary counting or interpolation corrections can be performed to ensure the continuity and robustness of the counting.

[0080] In summary, the embodiments of this application first remove as much of the position-independent components from the current, then find the regular peak values ​​from the remaining ripples, and accumulate and count each effective peak value as a rotation marker, thereby realizing virtual position tracking under sensorless conditions.

[0081] It should be noted that the methods for extracting and counting ripple features from the controller in this application are also applicable to the methods for extracting and counting ripple features from the main controller, and the two can be referred to each other.

[0082] One possible implementation of this application embodiment further includes: if a stall status information from the main controller is received, then entering a waiting mode or a soft shutdown mode; wherein, the stall status information is information sent by the main controller via bus broadcast when it detects that the main device has stalled.

[0083] During the process of controlling the motor's movement, if the main controller detects that the main motor is stalled, it will notify the slave controller via broadcast. The slave controller will then enter either a standby or soft-stop mode to avoid mechanical damage caused by continuous hard-on on one side. In standby mode, the motor remains energized but does not output torque (or outputs a very small holding torque), and the controller does not execute any motion commands, remaining in a suspended state. In soft-stop mode, the motor gradually decelerates to zero according to a set deceleration ramp, and then enters standby mode.

[0084] The main controller determines whether a stall has occurred by combining current, ripple count, and speed estimation. Under normal circumstances, the ripple count will continuously increase when the motor is running; if the current increases significantly but no new valid peaks appear for a continuous period, and the speed estimation is close to 0, a stall can be identified. To avoid false positives, a duration is added, preventing a stall diagnosis based solely on instantaneous current fluctuations.

[0085] See Figure 3 This application provides a schematic diagram of the interaction between a master controller and a slave controller, including: Set the left rearview mirror as the master axis and the right rearview mirror as the slave axis.

[0086] The left and right controllers collect the motor current on their respective sides in real time and accumulate the ripple feature points to obtain the current virtual absolute position. The main controller broadcasts information such as the accumulated ripple count value NL, instantaneous speed VL, and sampling timestamp Tstamp at fixed intervals (e.g., every 10ms).

[0087] Extrapolate from the controller and the communication delay to obtain the current predicted position NL' of the spindle.

[0088] The controller compares the predicted spindle position NL' with the local position NR and calculates the position error ep.

[0089] The controller dynamically adjusts the motor's PWM duty cycle based on the error ep using PD control, ensuring the slave axis continuously follows the master axis during movement. If ep > 0 (left side ahead), the right side PWM is increased to accelerate catching up. If ep < 0 (left side lagging), the right side PWM is decreased to decelerate and wait.

[0090] By using this high-frequency fine-tuning, the phase of the right motor is forcibly locked onto the left motor, achieving pixel-level synchronization throughout the entire process.

[0091] One possible implementation of this application embodiment involves adjusting the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp, including: The PWM adjustment amount is determined based on the first motor speed, the second motor speed from the controller at the current timestamp, the second ripple count value, and the third ripple count value from the controller at the current timestamp; The first PWM is determined based on the PWM adjustment amount and the reference duty cycle given by the open-loop profile; The motor speed and position are adjusted by the controller based on the first PWM.

[0092] Furthermore, based on the PWM adjustment and the reference duty cycle given by the open-loop profile, the first PWM is determined, including: Based on the relationship between the PWM adjustment amount and the preset adjustment threshold, the target PWM adjustment amount is determined. If the PWM adjustment amount is greater than the preset adjustment threshold, the target PWM adjustment amount is set as the preset adjustment threshold; otherwise, the target PWM adjustment amount is set as the PWM adjustment amount. The first PWM is determined based on the target PWM adjustment and the reference duty cycle given by the open-loop profile.

[0093] In one possible scenario, the first PWM is calculated as: Target PWM adjustment + Reference duty cycle given by the open-loop profile. In another scenario, a limit is set for the final PWM, requiring it to be between the minimum and maximum PWM values. Therefore, based on the target PWM adjustment and the reference duty cycle given by the open-loop profile, an initial first PWM is determined. If the initial first PWM is between the minimum and maximum PWM values, it is used as the final first PWM; if the initial first PWM is less than the minimum PWM value, it is used as the final first PWM; and if the initial first PWM is greater than the maximum PWM value, it is used as the final first PWM.

[0094] Specifically, this application uses PD control, a common proportional-derivative control method, and combines PD control with virtual position feedback and virtual speed feedback based on current ripple. It is applied to a dual-motor phase alignment and synchronization scenario without adding position sensors. In addition, it is combined with the spindle predicted phase after communication delay compensation, the slave axis local ripple count and speed error to form a complete phase-locked control loop.

[0095] The control law adopted by the controller in this application is as follows: This form is not classic PD control. In classic PD control, the differential term is the derivative of the position error with respect to time, i.e. In this scheme, the differential term directly uses the velocity difference between the master and slave sides. It does not perform numerical differentiation on the position error. This structure belongs to the engineered position-velocity state feedback control in the field of servo and motor motion control. It can avoid the noise amplification problem introduced by numerical differentiation of the position error, and and Each component can be calibrated independently, resulting in a more stable control response.

[0096] The specific implementation process is as follows: From the controller in each control cycle (For example, each) or each Obtain the following data: Current predicted position of the main axis. The second ripple count value is obtained using the aforementioned time delay extrapolation algorithm; spindle speed That is, the speed of the first motor, which is obtained from the ripple count speed carried in the main controller message; local actual position. The third ripple count value is obtained by accumulating the ripple counter on this side; the actual local speed. The second motor speed is obtained by the increment of the ripple count on this side within a fixed time window or sliding window, and low-pass filtering is performed if necessary. In the Calculate the position error and velocity error for each control cycle: ; ; The PWM adjustment amount is synthesized based on the position error and velocity error: ;in and The influence coefficients of position error and velocity error on PWM adjustment are obtained through offline calibration or online identification, respectively; the controller does not directly... As the final PWM duty cycle, but in the reference PWM Make overlay adjustments: ,in, Provided by the open-loop drive profile, it ensures that the motor has a roughly correct rotational tendency before closed-loop correction; It is only used for fine-tuning phase-locking on a reference.

[0097] To avoid overshoot or mechanical shock when the error is too large, both the adjustment amount and the final duty cycle are limited: , ;in, The threshold value for limiting the single-cycle PWM adjustment can be set according to actual needs; and The final lower and upper limits of the PWM duty cycle are determined based on the allowable operating range of the driver and motor.

[0098] In addition, to avoid high-frequency jitter and ineffective drive caused by frequent duty cycle fine-tuning when the error is very small, Dead zone handling is introduced into the calculation results: ,in, and These are the dead zone thresholds for position error and velocity error, respectively, obtained through system calibration. When both position error and velocity error fall within the dead zone, it is considered that the two sides are currently within an acceptable synchronization range, and no further adjustments are made in this cycle.

[0099] When the motor is in reverse motion mode and The symbols are flipped accordingly; when the main controller notifies of a stall via the bus, or when an abnormal current or speed is detected on the local side, the control law calculation is paused, and the controller switches to a soft stop or waiting state to avoid continuous hard adjustment from impacting the mechanical structure.

[0100] When the speed is from the controller side When the ripple loss cannot be reliably estimated temporarily, Briefly reset to zero or maintain the value from the previous cycle to avoid introducing false large values ​​through speed feedback. If convergence fails for an extended period, diagnostic logic or degradation protection strategies can be added, but these will not be included in the main control law.

[0101] The above steps are executed sequentially within each control cycle. The length of the control cycle is typically matched with the current sampling cycle or the ripple estimation cycle to ensure... and All of these reflect the current timestamp's state, thus achieving a stable phase-locking effect.

[0102] The following describes a vehicle rearview mirror synchronization control device provided in an embodiment of this application. The device described below can be referred to in correspondence with the method described above. The device in this embodiment is set in a slave controller and includes: a communication delay determination module, used to determine the communication delay based on the current timestamp and the target sampling timestamp after receiving the first ripple count value and the first motor speed corresponding to the target sampling timestamp periodically sent by the master controller; the first ripple count value is the ripple count value obtained by the master controller counting the first ripple feature points, and the first ripple feature points are ripple feature points extracted based on the main armature current waveform; a prediction module, used to predict the second ripple count value of the master controller at the current timestamp based on the communication delay, the first ripple count value, and the first motor speed; and a control module, used to adjust the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp.

[0103] In one possible implementation, the method further includes: a third ripple count value determination module, used to obtain the slave armature current waveform corresponding to the slave controller at the current timestamp; extract the ripple feature points of the slave armature current waveform; count the extracted ripple feature points of the slave armature current waveform to obtain the third ripple count value of the slave controller at the current timestamp.

[0104] In one feasible approach, the third ripple count value determination module extracts ripple feature points from the armature current waveform and is used to: preprocess the armature current waveform to obtain a preprocessed current waveform; wherein the preprocessing includes at least one of the following: baseline removal and adaptive bandpass filtering; and determine the ripple feature points corresponding to the controller based on the preprocessed current waveform.

[0105] In one feasible approach, preprocessing includes adaptive bandpass filtering. A third ripple count value determination module preprocesses the armature current waveform to obtain a preprocessed current waveform, which is used to: determine the center frequency of the bandpass filter for the current control cycle based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter for the previous control cycle; determine the forward coefficient and feedback coefficient of the bandpass filter based on the sampling frequency and the center frequency of the bandpass filter for the current control cycle; and filter the armature current waveform using the bandpass filter updated based on the forward coefficient and feedback coefficient to obtain the preprocessed current waveform.

[0106] In one possible implementation, the third ripple count value determination module is further configured to: calculate the ripple frequency of the current control cycle based on the time interval between the detected adjacent effective ripple feature points; or, calculate the ripple frequency of the current control cycle based on the second motor speed and the number of effective ripple feature points per revolution.

[0107] In one feasible approach, the third ripple counting value determination module determines the ripple feature points corresponding to the controller based on the preprocessed current waveform. This is done by: differentiating the preprocessed current waveform to obtain peak information for multiple peaks, where the peak information includes peak position and peak amplitude; and determining the ripple feature points corresponding to the controller based on the peak information using a preset optimization method. The preset optimization method includes at least one of the following: removing peaks whose peak amplitude is not greater than a preset amplitude threshold from the multiple peaks to obtain the ripple feature points corresponding to the controller; and supplementing the missing peaks between two target peaks to obtain the ripple feature points corresponding to the controller. The two target peaks represent two peaks whose peak positions are spaced more than a preset multiple of a desired interval. The missing peaks are determined based on the desired interval and the peak positions of the two target peaks.

[0108] In one possible implementation, the system further includes a mode switching module, which, upon receiving stall status information from the main controller, enters a waiting mode or a soft shutdown mode; wherein the stall status information is information sent by the main controller via bus broadcast when it detects a stall in the main device.

[0109] The above describes the synchronization method controlled by the controller. The following describes the control method of the master controller. The two methods can be referred to each other. Figure 4, Figure 4 This is a flowchart illustrating another vehicle rearview mirror synchronization control method provided in this application embodiment, executed by the main controller, including: S201, The main controller acquires the main armature current waveform and the first motor speed at the target sampling timestamp of the main motor.

[0110] The main controller acquires the main armature current waveform and the first motor speed at the target sampling timestamp. The first motor speed can be obtained from the motor speed sensor.

[0111] S202. Extract the first ripple feature point from the main armature current waveform of the main motor.

[0112] Here, ripple feature points refer to the extreme points of periodic fluctuations in the waveform caused by the ripple effect; these can be peaks or troughs. Furthermore, the first ripple feature point is obtained by identifying peaks / troughs based on the main armature current waveform. The peak can be located by finding the zero-crossing point of the derivative when differentiating the slave armature current waveform.

[0113] S203. Count the first ripple feature points to obtain the first ripple count value.

[0114] For each valid peak identified, the counter on the main controller side is incremented by 1, thereby obtaining the first ripple count value of the main controller under the target sampling timestamp.

[0115] S204. Periodically send the first ripple count value and the first motor speed corresponding to the target sampling timestamp to the slave controller; wherein, the slave controller is used to determine the communication delay based on the current timestamp and the target sampling timestamp; predict the second ripple count value of the master controller at the current timestamp based on the communication delay, the first ripple count value and the first motor speed; and adjust the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value and the third ripple count value of the slave controller at the current timestamp.

[0116] The following describes a vehicle rearview mirror synchronization control device provided in an embodiment of this application. The device described below can be referred to in correspondence with the method described above. The device in this embodiment is set in the main controller and includes: an acquisition module, used by the main controller to acquire the main armature current waveform of the main motor at the target sampling timestamp and the first motor speed; an extraction module, used to extract the first ripple feature points from the main armature current waveform of the main motor; a counting module, used to count the first ripple feature points to obtain the first ripple count value; and a sending module, used to periodically send the first ripple count value and the first motor speed corresponding to the target sampling timestamp to the slave controller; wherein, the slave controller is used to determine the communication delay based on the current timestamp and the target sampling timestamp; predict the second ripple count value of the main controller at the current timestamp based on the communication delay, the first ripple count value and the first motor speed; and adjust the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value and the third ripple count value of the slave controller at the current timestamp.

[0117] Based on any of the above embodiments, this application provides a method for synchronizing vehicle rearview mirrors, including: The main controller acquires the target sampling timestamp of the main motor, the main armature current waveform, and the first motor speed; extracts the first ripple feature point based on the main armature current waveform of the main motor; counts the first ripple feature point to obtain the ripple count value; and periodically sends the first ripple count value corresponding to the target sampling timestamp and the first motor speed to the slave controller. The slave controller determines the communication delay based on the current timestamp and the target sampling timestamp; predicts the second ripple count value of the master controller at the current timestamp based on the communication delay, the first ripple count value, and the first motor speed; adjusts the motor speed of the slave controller based on the first motor speed and the second motor speed of the slave controller at the current timestamp; and adjusts the motor position of the slave controller based on the second ripple count value and the third ripple count value of the slave controller at the current timestamp.

[0118] In this embodiment, by extracting the current ripple feature points generated by the commutation of the DC brushed motor in real time, a virtual position signal reflecting the absolute phase of the motor rotor is constructed. This signal is then exchanged and tracked in a closed loop between the master and slave controllers to achieve synchronous control of the vehicle's rearview mirror. Based on the spindle position and speed information received from the master controller, the slave controller uses an extrapolation algorithm to predict the current phase of the spindle and dynamically adjusts the PWM duty cycle accordingly, overcoming the synchronization error caused by distributed communication delay.

[0119] Furthermore, the filter parameters are dynamically adjusted using a motor speed model, and automatic interpolation correction is performed when ripple undercount (abnormal interval) is detected, ensuring high robustness of the full-stroke counting. It is understood that this embodiment constructs two independent motor systems as a virtual electronic shaft system. The periodic current ripple signal generated during DC motor commutation is used to extract the ripple peaks or zero-crossing points as feature points through signal processing algorithms. Each feature point represents the motor rotating α degrees (for example, for a 3-slot 2-pole motor, each ripple represents 60 degrees or 180 degrees, depending on the algorithm), thus determining the motor's position.

[0120] Furthermore, the entire synchronization system consists of a current sampling module, a signal processing module, a synchronization communication module, and a closed-loop control module. The current sampling module utilizes the current mirror pin (Current Sense) built into the H-bridge driver chip or a sampling resistor connected in series in the lower bridge arm. After amplification by an operational amplifier, the signal is input to the MCU's high-speed ADC for sampling. The sampling frequency needs to be much higher than the ripple frequency (e.g., >10kHz). The signal processing module includes: a bandpass filter (BPF) to filter out the DC component (motor operating current) and high-frequency switching noise, retaining only the commutation ripple component; zero-crossing detection or peak detection to identify the ripple period, outputting a real-time pulse count and instantaneous frequency (Ripple Freq). The synchronization communication module utilizes the CAN / CAN-FD bus, with the master controller periodically broadcasting high-priority messages: {NL, VL, Tstamp}. The closed-loop control module operates on the slave controller (or in a mutually coordinated manner) and includes a PD controller containing communication delay compensation logic, position error, and speed error handling.

[0121] In summary, by improving speed and position consistency during motion, based on simultaneous start-up, the left and right rearview mirrors move at roughly the same speed and reach their destination at close range, thus improving the user's perception of motion consistency. Utilizing existing current sampling and MCU computing power to construct virtual position feedback reduces reliance on Hall sensors, encoders, or additional signal lines, making it easier to achieve a balance between control performance and hardware cost. Introducing time delay extrapolation prediction and phase error closed-loop adjustment mechanisms reduces control lag caused by distributed communication delays, making synchronous control more stable under different operating conditions. Ripple characteristic analysis, in addition to its use in synchronous control, can also be used to assist in identifying abnormal resistance changes during motion, providing more timely input for safety strategies (such as abnormal resistance detection and protection).

[0122] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present invention, such as... Figure 5As shown, the electronic device includes a memory 60 and a processor 61. The memory 60 is used to store a computer program, and the processor 61 is used to implement the steps of the method described above when executing the computer program.

[0123] In one possible implementation, the electronic device is a slave controller, and the corresponding processor 61, when executing a computer program, can perform the following steps: after receiving the first ripple count value and the first motor speed corresponding to the target sampling timestamp periodically sent by the master controller, the slave controller determines the communication delay based on the current timestamp and the target sampling timestamp; the first ripple count value is the ripple count value obtained by the master controller counting the first ripple feature points, which are ripple feature points extracted based on the main armature current waveform; based on the communication delay, the first ripple count value, and the first motor speed, the second ripple count value of the master controller at the current timestamp is predicted; based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp, the motor speed and motor position of the slave controller are adjusted.

[0124] In some specific embodiments, when the processor 61 executes the computer subroutine stored in the memory 60, it can perform the following steps: obtain the slave armature current waveform corresponding to the slave controller under the current timestamp; extract the ripple feature points of the slave armature current waveform; count the extracted ripple feature points of the slave armature current waveform to obtain the third ripple count value of the slave controller under the current timestamp.

[0125] In some specific embodiments, when the processor 61 executes the computer subroutine stored in the memory 60, it can perform the following steps: preprocessing the armature current waveform to obtain a preprocessed current waveform; wherein, the preprocessing includes at least one of the following: baseline removal, adaptive bandpass filtering; and determining the ripple feature points corresponding to the controller based on the preprocessed current waveform.

[0126] In some specific embodiments, when the processor 61 executes the computer subroutine stored in the memory 60, it can perform the following steps: determine the center frequency of the bandpass filter for the current control cycle based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter for the previous control cycle; determine the forward coefficient and feedback coefficient of the bandpass filter according to the sampling frequency and the center frequency of the bandpass filter for the current control cycle; and use the bandpass filter updated based on the forward coefficient and feedback coefficient to filter the armature current waveform to obtain the preprocessed current waveform.

[0127] In some specific embodiments, when the processor 61 executes the computer subroutine stored in the memory 60, it can perform the following steps: calculate the ripple frequency of the current control cycle based on the time interval between the detected adjacent effective ripple feature points; or, calculate the ripple frequency of the current control cycle based on the second motor speed and the number of effective ripple feature points per revolution.

[0128] In some specific embodiments, when the processor 61 executes the computer subroutine stored in the memory 60, it can perform the following steps: derive the preprocessed current waveform to obtain peak information of multiple peaks, wherein the peak information includes peak position and peak amplitude; determine the ripple feature point corresponding to the controller based on the peak information of the multiple peaks using a preset optimization method; wherein the preset optimization method includes at least one of the following: removing peaks whose peak amplitude is not greater than a preset amplitude threshold from the multiple peaks to obtain the ripple feature point corresponding to the controller; supplementing the missing peaks between two target peaks to obtain the ripple feature point corresponding to the controller; wherein the two target peaks represent two peaks whose peak positions are separated by an expected interval greater than a preset multiple, and the missing peaks are determined based on the expected interval and the peak positions of the two target peaks.

[0129] In some specific embodiments, when the processor 61 executes the computer subroutine stored in the memory 60, it can perform the following steps: if it receives the stall status information from the main controller, it enters the waiting mode or the soft stop mode; wherein, the stall status information is the information sent by the main controller through the bus broadcast method when it detects that the main device has stalled.

[0130] In one possible implementation, the electronic device is a master controller, and the corresponding processor 61, when executing a computer program, can perform the following steps: the master controller acquires the main armature current waveform and the first motor speed of the master motor at the target sampling timestamp; extracts the first ripple feature points from the main armature current waveform of the master motor; counts the first ripple feature points to obtain a first ripple count value; periodically sends the first ripple count value and the first motor speed corresponding to the target sampling timestamp to the slave controller; wherein, the slave controller is used to determine the communication delay based on the current timestamp and the target sampling timestamp; predict the second ripple count value of the master controller at the current timestamp based on the communication delay, the first ripple count value, and the first motor speed; and adjust the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp.

[0131] Those skilled in the art will understand that Figure 5 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.

[0132] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, magnetic disks, or optical disks, and other media capable of storing program code.

[0133] Based on this, embodiments of the present invention also provide a vehicle, including a main controller and a slave controller, wherein the main controller is at least configured to: acquire the main armature current waveform and the first motor speed of the main motor at a target sampling timestamp; extract a first ripple feature point from the main armature current waveform of the main motor; count the first ripple feature point to obtain a first ripple count value; and periodically send the first ripple count value and the first motor speed corresponding to the target sampling timestamp to the slave controller; The slave controller is used to at least determine the communication delay based on the current timestamp and the target sampling timestamp; predict the second ripple count value of the master controller at the current timestamp based on the communication delay, the first ripple count value, and the first motor speed; and adjust the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp.

[0134] Based on this, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described above.

[0135] Based on this, embodiments of the present invention also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described method.

[0136] It should be noted that this application solution can be applied not only to rearview mirrors, but also to any scenario that requires at least two motors to be synchronized.

[0137] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0138] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for synchronous control of vehicle rearview mirrors, characterized in that, include: After receiving the first ripple count value and the first motor speed corresponding to the target sampling timestamp periodically sent by the main controller, the slave controller determines the communication delay based on the current timestamp and the target sampling timestamp; The first ripple count value is the ripple count value obtained by the main controller counting the first ripple feature points, and the first ripple feature points are ripple feature points extracted based on the main armature current waveform. Based on the communication delay, the first ripple count value, and the first motor speed, the second ripple count value of the main controller at the current timestamp is predicted. Based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp, the motor speed and motor position of the slave controller are adjusted.

2. The vehicle rearview mirror synchronization control method according to claim 1, characterized in that, Before adjusting the motor speed and motor position of the slave controller based on the first motor speed, the second motor speed of the slave controller at the current timestamp, the second ripple count value, and the third ripple count value of the slave controller at the current timestamp, the method further includes: Obtain the slave armature current waveform corresponding to the slave controller at the current timestamp; Extract the ripple feature points from the armature current waveform; The ripple feature points of the extracted armature current waveform are counted to obtain the third ripple count value of the slave controller at the current timestamp.

3. The vehicle rearview mirror synchronization control method according to claim 2, characterized in that, Extracting the ripple feature points from the armature current waveform includes: The armature current waveform is preprocessed to obtain a preprocessed current waveform; wherein the preprocessing includes at least one of the following: baseline removal and adaptive bandpass filtering; Based on the preprocessed current waveform, the ripple feature point corresponding to the controller is determined.

4. The vehicle rearview mirror synchronization control method according to claim 3, characterized in that, Preprocessing includes adaptive bandpass filtering. The armature current waveform is preprocessed to obtain a preprocessed current waveform, including: The center frequency of the bandpass filter in the current control cycle is determined based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter in the previous control cycle. The forward and feedback coefficients of the bandpass filter are determined based on the sampling frequency and the center frequency of the bandpass filter in the current control cycle. The armature current waveform is filtered using a bandpass filter updated based on the forward and feedback coefficients to obtain a preprocessed current waveform.

5. The vehicle rearview mirror synchronization control method according to claim 4, characterized in that, Before determining the center frequency of the bandpass filter for the current control cycle based on the ripple frequency of the current control cycle and the center frequency of the bandpass filter for the previous control cycle, the method further includes: The ripple frequency of the current control cycle is calculated based on the time interval between adjacent effective ripple feature points that have been detected. Alternatively, the ripple frequency of the current control cycle can be calculated based on the second motor speed and the number of effective ripple feature points per revolution.

6. The vehicle rearview mirror synchronization control method according to claim 3, characterized in that, Based on the preprocessed current waveform, the ripple feature points corresponding to the controller are determined, including: Differentiating the preprocessed current waveform yields peak information for multiple peaks, whereby the peak information includes peak position and peak amplitude. Based on the peak information of the multiple peaks, the ripple feature points corresponding to the controller are determined using a preset optimization method. The preset optimization method includes at least one of the following: Remove the peaks whose amplitude is not greater than a preset amplitude threshold from the plurality of peaks to obtain the ripple feature points corresponding to the controller; By supplementing the missing peaks between the two target peaks, the ripple feature points corresponding to the controller are obtained; The two target peaks refer to two peaks whose peak positions are more than a preset multiple of the desired interval. The missing peaks are determined based on the desired interval and the peak positions of the two target peaks.

7. The vehicle rearview mirror synchronization control method according to claim 1, characterized in that, Also includes: If the main controller receives a stall status information, the system will enter either a waiting mode or a soft shutdown mode. The stall status information is information sent by the main controller via bus broadcast when it detects a stall in the main device.

8. A method for synchronous control of vehicle rearview mirrors, characterized in that, include: The main controller acquires the main armature current waveform and the first motor speed at the target sampling timestamp of the main motor; Extract the first ripple feature point from the main armature current waveform of the main motor; The first ripple count value is obtained by counting the first ripple feature points; The first ripple count value and the first motor speed corresponding to the target sampling timestamp are periodically sent to the slave controller; The slave controller is used to implement the vehicle rearview mirror synchronization control method as described in any one of claims 1-7.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the vehicle rearview mirror synchronization control method according to any one of claims 1 to 7, or the vehicle rearview mirror synchronization control method according to claim 8, when running the computer program.

10. A vehicle, characterized in that, Includes master controller and slave controller, The controller is used to implement the vehicle rearview mirror synchronous control method as described in any one of claims 1 to 7; The main controller is used to implement the vehicle rearview mirror synchronization control method as described in claim 8.