Vehicle window position recognition method, device, equipment and storage medium
By identifying the operating status of the window motor through current sampling resistors and filtering technology, and calculating the window position by combining the number of ripple cycles, the difficulty of position identification when the motor is stopped or running inertia is solved, and high-precision and reliable window position identification is achieved.
Patent Information
- Application Number
- CN202411340997.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2044-09-25
AI Technical Summary
In existing technologies for window position recognition, especially when the motor is stopped or running inertial motion, ripple signals are difficult to identify accurately, leading to inaccurate window position calculations and affecting the reliability of the anti-pinch function.
The current signal of the window motor is obtained by sampling the current resistor, filtered and counted for cycles to identify the motor's operating status, and the current window position is calculated by combining the initial window position and the number of ripple cycles.
It improves the accuracy of window position recognition and the adaptability of the system, ensuring that the window stops safely and accurately under various working conditions, and enhances the reliability of the anti-pinch function.
Smart Images

Figure CN119266660B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automobile electronic control, in particular to a vehicle window position recognition method, device, equipment and storage medium. BACKGROUND
[0002] With the continuous development of automobile electric window technology, the vehicle window anti-pinch function has become a key link in vehicle safety. The core is to accurately calculate the position of the vehicle window by identifying the ripple generated when the motor is running. However, during the movement of the vehicle window, the inertia and reverse electromotive force of the motor change, especially when the vehicle window stops halfway, which will cause difficulty in identifying the ripple. This makes the accuracy of the vehicle window position recognition and the reliability of the anti-pinch function face challenges, and it is urgent to improve the accuracy of the existing method.
[0003] Currently, the main method of vehicle window position recognition is to determine the position of the vehicle window by directly counting the number of ripples generated when the motor is running. This method can accurately reflect the position of the vehicle window when the motor is running stably, and the ripple signal is obvious. However, when the motor stops driving but still runs due to inertia, the sharp change of the reverse electromotive force will cause the ripple signal to be difficult to identify, thereby affecting the accuracy of the position calculation.
[0004] Although the existing method can identify the ripple when the motor is running stably, during the inertia running stage, the current signal fluctuates sharply due to the reverse electromotive force, resulting in a small ripple voltage, making it difficult to accurately count the ripple. In addition, when the vehicle window is lowered to a non-bottom position, the ripple generated by the continuous movement of the motor cannot accurately reflect the position of the vehicle window, which may eventually lead to disorder of the vehicle window function and failure of the anti-pinch function. Therefore, the existing method cannot effectively ensure the accurate recognition of the vehicle window position under various working conditions. Therefore, how to accurately identify the position of the vehicle window has become a problem to be solved.
[0005] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0006] The present application aims to provide a vehicle window position recognition method, device, equipment and storage medium, which aims to solve the technical problem of how to accurately identify the position of the vehicle window.
[0007] To achieve the above-mentioned purpose, the present application provides a vehicle window position recognition method, which is applied to a vehicle window position recognition circuit, the vehicle window position recognition circuit comprising a relay and a current sampling resistor, the relay being connected with the current sampling resistor, the relay being used to control the reverse rotation of the vehicle window motor, the method comprising:
[0008] obtaining an initial vehicle window position, and collecting a current signal of the vehicle window motor through the current sampling resistor;
[0009] filtering and period counting the current signal to obtain an initial ripple period number and an operation state of the window motor;
[0010] identifying a current window position according to the initial window position, the initial ripple period number and the operation state.
[0011] In an embodiment, the step of identifying the current window position according to the initial window position, the initial ripple period number and the operation state comprises:
[0012] determining a target window moving distance according to the operation state and the initial ripple period number;
[0013] identifying the current window position according to the target window moving distance and the initial window position.
[0014] In an embodiment, the current signal comprises a current ripple signal, and the step of determining the target window moving distance according to the operation state and the initial ripple period number comprises:
[0015] when the operation state is a continuous driving state, obtaining a ripple period value and determining a first window moving distance according to the initial ripple period number;
[0016] when the operation state is an inertia operation state, performing timing counting according to the ripple period value to determine a second window moving distance;
[0017] when the operation state is a stop state, stopping the timing counting, counting the current ripple signal to determine a third window moving distance;
[0018] determining the target window moving distance according to the first window moving distance, the second window moving distance and the third window moving distance.
[0019] In an embodiment, the inertia operation state comprises an initial inertia operation state and a deceleration inertia operation state, and the step of performing timing counting according to the ripple period value to determine the second window moving distance when the operation state is the inertia operation state comprises:
[0020] when the operation state is the initial inertia operation state, performing timing counting according to the ripple period value to determine a fourth window moving distance;
[0021] when the operation state is the deceleration inertia operation state, performing the timing counting according to the ripple period value, a preset rising adjustment coefficient and a preset falling adjustment coefficient to obtain a fifth window moving distance;
[0022] The second window moving distance is obtained according to the fourth window moving distance and the fifth window moving distance.
[0023] In an embodiment, the step of performing the timing counting according to the ripple period value, a preset rising adjustment coefficient and a preset falling adjustment coefficient to obtain a fifth window moving distance comprises:
[0024] A rising period value and a falling period value are obtained according to the ripple period value, the preset rising adjustment coefficient and the preset falling adjustment coefficient.
[0025] When the window is rising, the timing counting is performed according to the rising period value to obtain a window rising distance.
[0026] When the window is falling, the timing counting is performed according to the falling period value to obtain a window falling distance.
[0027] A fifth window moving distance is obtained according to the window rising distance and the window falling distance.
[0028] In an embodiment, the step of filtering and period counting the current signal to obtain an initial ripple period number and an operation state of the window motor comprises:
[0029] The current signal is filtered to extract a current ripple signal and a current voltage signal.
[0030] The current ripple signal is period counted to obtain an initial ripple period number.
[0031] The operation state of the window motor is obtained according to the magnitude of the current voltage in the current voltage signal.
[0032] In an embodiment, the step of obtaining the operation state of the window motor according to the magnitude of the current voltage in the current voltage signal comprises:
[0033] When the current voltage is greater than a preset positive current threshold, it is determined that the operation state of the window motor is a continuous driving state.
[0034] When the current voltage is less than a first preset negative current threshold, it is determined that the operation state of the window motor is an initial inertia operation state.
[0035] When the current voltage is greater than the first preset negative current threshold and less than or equal to a second preset negative current threshold, it is determined that the operation state of the window motor is a deceleration inertia operation state.
[0036] When the rotation speed of the window motor is less than the preset speed and the current voltage is greater than or equal to the second preset negative current threshold, it is determined that the running state of the window motor is a stop state.
[0037] In addition, to achieve the above object, the present application further provides a window position recognition device, which comprises:
[0038] a data acquisition module, configured to acquire an initial window position and collect a current signal of the window motor through the current sampling resistor;
[0039] a signal processing module, configured to filter and cycle count the current signal to obtain an initial ripple cycle number and a running state of the window motor;
[0040] a position recognition module, configured to recognize a current window position according to the initial window position, the initial ripple cycle number and the running state.
[0041] In addition, to achieve the above object, the present application further provides a window position recognition device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the window position recognition method as described above.
[0042] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the window position recognition method as described above.
[0043] The one or more technical solutions provided by the present application have at least the following technical effects:
[0044] The initial window position is acquired, and the current signal of the window motor is collected through the current sampling resistor; the current signal is filtered and counted, to obtain the initial ripple period number and the running state of the window motor; and the current window position is identified according to the initial window position, the initial ripple period number and the running state. Firstly, the system determines the starting state of the window and the current intensity of the motor by acquiring the initial position of the window and collecting the current signal of the window motor through the current sampling resistor. Next, the collected current signal is filtered to remove noise and interference, and the current ripple signal and the current voltage signal are extracted, and the current ripple signal is counted to obtain the initial ripple period number and the running state of the window motor. This processing step can accurately identify the working state of the motor, such as continuous driving or inertial running. Finally, the system calculates the current window position in combination with the initial window position, the initial ripple period number and the running state of the motor. The application not only improves the accuracy of window position recognition and accurately identifies the window position, but also enhances the adaptability and reliability of the system, effectively compensates for the inertial effect, and ensures that the window can be safely and accurately stopped under various working conditions. BRIEF DESCRIPTION OF DRAWINGS
[0045] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor.
[0047] Figure 1 The flowchart provided for the first embodiment of the window position recognition method of the present application;
[0048] Figure 2 The window position recognition circuit schematic diagram provided for the first embodiment of the window position recognition method of the present application;
[0049] Figure 3 The ripple counting position compensation schematic diagram provided for the first embodiment of the window position recognition method of the present application;
[0050] Figure 4 The flowchart provided for the second embodiment of the window position recognition method of the present application;
[0051] Figure 5 The module structure schematic diagram of the window position recognition device of the present application embodiment;
[0052] Figure 6A device structure schematic diagram of a hardware running environment involved in a vehicle window position recognition method in the embodiments of the present application.
[0053] Explanation of reference numerals:
[0054] Relay K1; first port 1; second port 2; third port 3; fourth port 4; fifth port 5; sixth port 6; seventh port 7; eighth port 8; ninth port 9; tenth port 10.
[0055] The purposes, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0056] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not intended to limit the present application.
[0057] In order to better understand the technical solutions of the present application, the specific embodiments will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] With the development of automotive electric window technology, the anti-pinch function of the vehicle window becomes crucial, which lies in accurately identifying the ripple of the motor in operation to calculate the position of the vehicle window. However, the inertia and reverse electromotive force of the motor change, especially when the vehicle window stops, making it difficult to identify the ripple, affecting the accuracy of position detection and the reliability of the anti-pinch function. Currently, the method of determining the position by counting the ripple is effective when the motor is stable, but when the motor stops or runs due to inertia, the current signal fluctuation caused by the reverse electromotive force makes it difficult to count the ripple, especially when the vehicle window is not fully lowered, which may cause vehicle window function failure and anti-pinch failure, so it is necessary to improve the technical precision to adapt to different working conditions.
[0059] The main solution of the embodiments of the present application is: first, obtaining the current signal of the vehicle window motor through the current sampling resistor, determining the initial position of the vehicle window and the current intensity of the motor, then filtering the signal to extract the current ripple and voltage signal, and performing cycle counting to identify the working state of the motor, and finally calculating the current vehicle window position based on these information.
[0060] It should be noted that the execution subject of the embodiments of the present application can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a vehicle window position recognition circuit, a vehicle window position recognition system, etc. capable of realizing the above functions. The embodiments of the present application will be described below with the vehicle window position recognition system as an example.
[0061] Based on this, the embodiments of the present application provide a vehicle window position recognition method, which is described in detail with reference to Figure 1 , Figure 1The flowchart of the first embodiment of the vehicle window position recognition method of the present application.
[0062] In this embodiment, the method is applied to a vehicle window position recognition circuit. Please refer to Figure 2 , Figure 2A vehicle window position recognition circuit schematic diagram is provided for the first embodiment of the vehicle window position recognition method of the present application. The vehicle window position recognition circuit includes a relay K1 and a current sampling resistor R. The relay K1 is connected with the current sampling resistor R. The relay K1 is used to control the reverse rotation of the vehicle window motor. The first port (port 1) and the seventh port (port 7) of the relay K1 are connected with a relay drive chip. The second port and the sixth port of the relay are connected with a relay coil power supply. The fifth port and the tenth port of the relay are connected with the positive and negative electrodes of the vehicle window motor. The third port and the eighth port of the relay are connected with the positive electrode of the relay. The fourth port and the ninth port of the relay are connected with the negative electrode of the relay. This diagram shows the detailed layout and component connection relationship of the vehicle window position recognition circuit. In the circuit, C830 and C835 are 47nF capacitors used for filtering and stabilizing the power supply. PWR_KL30_Window1 is the power input of the vehicle window motor, which controls the forward and reverse rotation of the motor through the K1 relay. R1068 and R1080 are 5mR / 1W resistors used for current detection, connected with the current sampling resistors respectively, with measurement ports Current_1 and Current_2. TP510 and TP517 are test points for detecting current signals. The circuit also contains two H-bridge drivers ULQ2003-3 and ULQ2003-4, which control the upward and downward movement of the window respectively. WIN_GND is the ground terminal of the vehicle window motor. In the circuit, the relay K1 is connected with the relay coil power supply through port 2 (second port) and port 6 (sixth port) to provide driving for the vehicle window motor. Port 5 (fifth port) and port 10 (tenth port) are the output terminals of the relay, connected to the positive and negative terminals of the vehicle window motor respectively. Port 3 (third port) and port 8 (eighth port) are the positive electrode of the relay, while port 4 (fourth port) and port 9 (ninth port) are the negative electrode of the relay. Before port 4 and port 9, there are 5mR / 1W current sampling resistors R1068 and R1080 respectively, used to measure the motor current and transmit the current signal to the microcontroller (MCU) through the measurement ports Current_1 and Current_2 for processing. The capacitors C830 and C835, both 47nF, are connected between the power supply and the ground, serving the purpose of filtering and stabilizing the power supply. The microcontroller (MCU) collects the motor current signal through Current_1 and Current_2, processes the signal after filtering, and extracts the current ripple signal and current voltage signal. The current ripple signal is a sinusoidal waveform, and its period can be calculated in real time. The size of the current voltage signal is used to judge the running state of the motor, so as to use the corresponding position compensation strategy. In addition, the circuit also contains two H-bridge drivers ULQ2003-3 and ULQ2003-4, which are used to control the upward and downward movement of the window respectively.These drivers are connected with the window motor through H-Bridge RL Window UP OUT and H-Bridge RL Window DOWN OUT ports to realize the forward and reverse rotation control of the motor. WIN_GND is the ground terminal of the window motor to ensure the stable operation of the circuit. The entire circuit design aims to improve the reliability of the anti-pinch function of the window ripple and the accuracy of the window position by precise current signal acquisition and processing combined with ripple counting position compensation method.
[0063] The window position recognition method includes steps S10-S30:
[0064] Step S10, obtain the initial window position, and collect the current signal of the window motor through the current sampling resistor;
[0065] It should be noted that the initial window position refers to the specific physical position of the window at the start of system startup or operation, which can be the position of the window being completely closed, partially opened or completely opened. Usually, the system will obtain this initial position through previous running data or position sensors to ensure accurate subsequent window operation. The current sampling resistor is a low resistance resistor used to measure current. When current passes through the resistor, a small voltage will be generated across its terminals. By measuring this voltage, the current flowing through the motor can be indirectly calculated. This current sampling resistor is one of the key elements for obtaining the current signal of the window motor, and is usually connected to the corresponding position of the motor circuit. The window motor refers to the electric motor that drives the window to rise or fall. It converts electrical energy into mechanical energy through mechanical connection with the window to realize the lifting or lowering of the window. The window motor generates current signals during operation. The change of current is closely related to the load of the motor (such as the movement state of the window), so these signals can be used to determine the position or movement state of the window. The current signal refers to the characteristics of the current flowing through the circuit over time when the window motor is running. This signal reflects the working state of the motor (such as acceleration, deceleration or stop), and by analyzing the changes of these currents, the running condition of the motor and the position of the window can be determined. These signals are collected and processed through the current sampling resistor to achieve precise window position control.
[0066] It can be understood that first, the system needs to determine the current physical position of the window, which is called the initial window position, which is usually obtained through pre-set sensors or historical operation data, ensuring that the starting state of the window is known, such as the window being fully closed, partially open or fully open. Next, the system collects the current signal of the window motor through the current sampling resistor installed in the motor circuit. The current sampling resistor is a low resistance resistor that generates a voltage proportional to the current intensity when the current passes through it. The system measures this voltage and calculates the actual current value of the motor. The current signal reflects the working state of the motor, including the speed, load and other information of the motor, and through these signals, the motion state of the window can be further analyzed, such as acceleration, deceleration, stop, etc. The core of this step is to monitor and calculate the window position in real time through the change of the current signal, thereby providing accurate data information for subsequent control.
[0067] Step S20, filtering and cycle counting the current signal to obtain the initial ripple cycle number and the running state of the window motor;
[0068] It should be noted that filtering refers to processing the collected current signal to remove noise and interference signals. The current signal may contain noise or noise introduced by external electromagnetic interference, unstable motor operation, etc. during actual collection. Through filtering, the useful part of the current signal can be extracted, especially the ripple signal related to motor movement. Filtering techniques can generally be divided into low-pass filtering, high-pass filtering, band-pass filtering, etc. According to the frequency characteristics of the signal, select the appropriate filter. Cycle counting refers to analyzing the ripple in the current signal and measuring the number of ripple cycles. Ripple is a periodic change in the current signal. By counting the rising and falling cycles of the ripple, the number of complete ripple cycles generated during motor operation can be determined. This counting process helps to evaluate the motion state of the motor, especially by changing the number of cycles to determine the speed or position of the motor. The initial number of ripple cycles refers to the number of ripples recorded during the initial stage of motor operation, which is usually obtained after the motor starts or the system resets, representing the number of ripples generated by the motor when the window starts moving. Through the initial cycle number, the initial motion state of the window can be evaluated and used as a reference for subsequent control algorithms. The running state refers to the current working condition of the window motor, including whether the motor is accelerating, decelerating, running at a constant speed, or in a stopped state. The running state of the motor is usually determined by analyzing the characteristics of the current signal, such as current size, ripple cycle and waveform change, etc. For example, the frequency and amplitude of the current signal can reflect the speed and load of the motor, and then determine the different running states of the window, such as rising, falling or stopping.
[0069] It can be understood that first, the system will collect the current signal of the window motor and filter it, that is, through the filter to remove the noise and interference in the signal and retain the key signal related to the operation of the motor, especially the ripple signal generated by the motor. The ripple signal is a periodic fluctuation generated when the motor is running, which reflects the running state of the motor. After filtering, the system performs cycle counting on the ripple signal, that is, by detecting the rising and falling periods of the ripple to calculate the number of times the ripple appears. The initial ripple period number refers to the first complete ripple period number recorded by the system when the motor starts, which provides a reference basis for judging the initial movement of the window. By analyzing these ripple period numbers and the changes in the current signal, the system can further infer the running state of the window motor, such as whether the motor is accelerating, decelerating, constant speed or stopping. This process helps to accurately grasp the current working condition of the motor, thereby providing support for accurate control of the window position.
[0070] As an example, the step of filtering and cycle counting the current signal to obtain the initial ripple period number and the running state of the window motor includes: filtering the current signal to extract the current ripple signal and the current voltage signal; cycle counting the current ripple signal to obtain the initial ripple period number; and obtaining the running state of the window motor according to the size of the current voltage in the current voltage signal.
[0071] The current ripple signal refers to the periodic current fluctuation generated by the window motor when it is running. This fluctuation is a sinusoidal or similar sinusoidal fluctuation that appears in the current signal during the operation of the motor, especially when the motor load changes. The current ripple reflects the rotational speed and load state of the motor, and by analyzing the frequency and period of the ripple signal, the motion state of the motor and the displacement of the window can be determined. The current voltage signal refers to the part of the current signal that reflects the voltage intensity, which is the voltage signal measured by the current sampling resistor and indirectly represents the current size when the window motor is running. The current voltage signal can provide more information about the motor load and running state, helping the system to identify whether the motor is accelerating, decelerating or in an inertial motion state. The current voltage is the voltage amplitude in the current signal, which reflects the strength of the current when the window motor is working. Generally, the current voltage changes with the change of the motor load and running state, for example, the current voltage is larger when the motor is accelerating, and the current voltage decreases when the motor is decelerating or in inertial motion. Through the size of the current voltage, the system can identify the working state of the motor, such as whether it is in normal operation, stop, or enter the reverse electromotive force state (i.e. the motor is no longer driven but still runs due to inertia).
[0072] First, the system processes the collected current signal, removing noise and irrelevant interference through filtering, and retaining the key signals related to the running state of the window motor. After filtering, the current signal is divided into two parts: the current ripple signal and the current voltage signal. The current ripple signal is the periodic fluctuation generated by the motor during operation, reflecting the changes in motor speed and load. Then, the system performs periodic counting on the current ripple signal, that is, by detecting each complete fluctuation period, it calculates the number of initial ripple periods generated after the motor starts, which is used to determine the initial motion state of the window. In addition, the system also determines the running state of the motor according to the current voltage value in the current voltage signal. The current voltage reflects the strength of the motor current, when the current voltage is large, it means that the motor is in a high load or acceleration state, while when the voltage is small, the motor may be in a deceleration or inertial motion state. Through these information, the system can accurately assess the current working condition of the window motor.
[0073] As an example, the step of determining the running state of the window motor according to the size of the current voltage in the current voltage signal includes: when the current voltage is greater than a preset positive current threshold, determining that the running state of the window motor is a continuous driving state; when the current voltage is less than a first preset negative current threshold, determining that the running state of the window motor is an initial inertial running state; when the current voltage is greater than the first preset negative current threshold and less than or equal to a second preset negative current threshold, determining that the running state of the window motor is a deceleration inertial running state; when the rotational speed of the window motor is less than a preset speed and the current voltage is greater than or equal to the second preset negative current threshold, determining that the running state of the window motor is a stop state.
[0074] The preset positive current threshold refers to the current intensity threshold when the motor is running normally. For example, assume the preset positive current threshold is +1000 mV (millivolts). When the current voltage is greater than this value, it indicates that the window motor is actively driving the window movement, typically in a continuous driving state for window raising or lowering. The continuous driving state refers to the case where the current voltage is greater than the preset positive current threshold, which means that the window motor is continuously driving the window movement, the motor is in a normal working state, and the current signal is stable and sufficient to support the window lifting operation. For example, when the current voltage is greater than +1000 mV, the motor is in a continuous driving state. The first preset negative current threshold refers to a low value threshold in the current signal, used to identify the initial state of the motor from the driving state to the inertial running state. For example, assume the first preset negative current threshold is -300 mV (the negative sign indicates the negative direction of the current, but does not indicate the positive and negative of the value, which does not affect the size). When the current voltage is less than -300 mV, the state of the motor is considered to be the initial state of inertial running. The initial state of inertial running refers to the case where the current voltage is greater than the first preset negative current threshold but less than or equal to the second preset negative current threshold, at which time the motor has stopped active driving, but due to inertia, the motor is still running slowly. The second preset negative current threshold refers to a lower current value used to distinguish the deceleration inertial running state of the motor. For example, assume the second preset negative current threshold is -600 mV. When the current voltage is greater than -300 mV and less than or equal to -1300 mV, the state of the motor is considered to be the deceleration inertial running state, which refers to the case where the current voltage is greater than the first preset negative current threshold and less than or equal to the second preset negative current threshold. This indicates that the motor is in the process of inertial running, and the rotation speed has been significantly reduced, and the current signal has also been greatly reduced. For example, when the current voltage is between -300 mV and -1300 mV, the motor is in the deceleration inertial running state. The rotation speed refers to the rotational speed of the window motor, usually expressed in revolutions per minute (RPM). It reflects the rotation frequency of the motor, which directly affects the lifting speed of the window. The preset speed refers to the set rotational speed threshold of the window motor. For example, assume the preset speed is 50 RPM. When the actual rotation speed of the motor is lower than this preset speed, it indicates that the motor may have approached a stopped state. The stopped state refers to the case where the rotation speed of the window motor is less than the preset speed, and the current voltage is greater than or equal to the second preset negative current threshold (since the running resistance eventually the motor rotation will tend to stop. At this time, the back electromotive force will also gradually weaken, and the current voltage will increase), for example, when the current voltage is greater than or equal to -1300 mV and the motor speed is lower than 50 RPM, the motor almost stops running and enters the stopped state. In this state, the system will stop using the deceleration inertial running compensation and switch back to using the ripple signal for position counting.
[0075] First, when the current voltage is greater than a preset positive current threshold (e.g., +1200 mV), the operating state of the window motor is determined to be a sustained drive state, in which the motor is actively driving the window movement. Second, when the current voltage is less than a first preset negative current threshold (e.g., -200 mV), the operating state of the window motor is determined to be an initial inertia run state, in which the motor has stopped actively driving but is still slowly rotating due to inertia. Third, when the current voltage is greater than the first preset negative current threshold but less than or equal to a second preset negative current threshold (e.g., -1000 mV), the operating state of the motor is determined to be a decelerating inertia run state, in which the motor speed is decreasing and the current signal is low. Finally, when the motor speed is less than a preset speed (e.g., 50 RPM) and the current voltage is greater than or equal to the second preset negative current threshold (e.g., -1500 mV), the operating state of the motor is determined to be a stopped state, in which the motor is nearly stopped and the current signal can be high, indicating that the motor is close to stopping.
[0076] Please refer to Figure 3 , Figure 3The ripple count position compensation schematic diagram provided by the first embodiment of the vehicle window position recognition method of the present application shows the dynamic changes of the ripple count position compensation during the vehicle window lifting process. In the diagram, the red curve represents the current voltage value, which changes with the lifting of the vehicle window; the dark blue wavy line represents the ripple curve, which reflects the current ripple generated during the operation of the motor; and the light blue square wave represents the vehicle window position count recognized by the software compensation, with each square wave period representing an increase of one in the vehicle window position count. Different SimState states are also marked in the diagram, such as SimState0 (continuous driving state), SimState1 (initial inertia running state), SimState2 (deceleration inertia running state), and SimState3 (stop state), which reflect the working conditions of the vehicle window motor in different running stages. In the SimState0 state, the vehicle window motor is continuously driven, the current output is stable, and the ripple is used for position counting; in the SimState1 state, the vehicle window is disconnected from the motor drive after reaching the expected position, at which time the back electromotive force will be generated, and the last ripple period value in SimState0 is used for timing counting; in the SimState2 state, the motor continues to rotate due to inertia, but the speed gradually decreases, the ripple signal is not available, the last ripple period value in SimState0 is continued to be used, but the period length needs to be adjusted according to the speed decrease; in the SimState3 state, the motor rotation tends to stop, the back electromotive force weakens, and when the current voltage value increases to a certain extent, the compensation counting of SimState2 is terminated, and the ripple recognition counting is switched back. The entire diagram describes in detail the working principle of the ripple count position recognition and compensation method when the vehicle window stops during lifting through the changes of the current voltage value and the ripple curve, as well as the counting methods in different SimState states.
[0077] In step S30, the current vehicle window position is recognized according to the initial vehicle window position, the initial ripple period number, and the running state.
[0078] It should be noted that the initial vehicle window position is the vehicle window position recorded by the system before starting the calculation, which can be the actual position when the vehicle window is started, such as fully closed, partially opened, or fully opened. The initial ripple period number is the current ripple period number recorded by the vehicle window motor in the initial state, which reflects the motion state of the vehicle window at the initial position and serves as a reference value for subsequent position calculation. The running state is the state of the motor during the actual operation of the vehicle window, including the continuous driving state, the initial inertia running state, the deceleration inertia running state, or the stop state, which affects the motion mode of the motor and thus affects the position calculation of the vehicle window.
[0079] Understandably, this step involves comprehensively utilizing the initial window position, initial ripple cycle count, and operating status to identify the current window position. First, the system records the window's initial position, i.e., its actual physical position at the start, such as fully closed or partially open. Next, the system records the initial ripple cycle count, i.e., the number of current ripple cycles of the window motor in its initial state, providing baseline data for calculating window movement. During window operation, the operating status is analyzed based on real-time acquired current signals, including continuous drive, initial inertial operation, deceleration inertial operation, or a stopped state. The system adjusts its calculation strategy according to different operating states; for example, it relies on ripple counting during continuous drive and uses previous ripple cycles for position compensation during inertial operation. Using this information, the system can accurately calculate the window's current position—its actual position after passing through various states during operation—thus ensuring the accuracy of the window's position and the reliability of the operation.
[0080] This embodiment provides a method for identifying the position of a vehicle window. The method involves acquiring the initial window position and collecting the current signal of the window motor using a current sampling resistor. The current signal is then filtered and its cycles are counted to obtain the initial ripple cycle count and the operating state of the window motor. Based on the initial window position, the initial ripple cycle count, and the operating state, the current window position is identified. First, the system determines the initial state of the window and the current intensity of the motor by acquiring the initial window position and collecting the current signal of the window motor using a current sampling resistor. Next, the collected current signal is filtered to remove noise and interference, extracting the current ripple signal and the current voltage signal. The current ripple signal is then cycle-counted to obtain the initial ripple cycle count and the operating state of the window motor. This processing step accurately identifies the motor's operating state, such as continuous drive or inertial operation. Finally, the system calculates the current window position by combining the initial window position, the initial ripple cycle count, and the motor's operating state. This embodiment not only improves the accuracy of window position recognition, enabling accurate identification of window position, but also enhances the system's adaptability and reliability. By effectively compensating for inertial effects, it ensures that the window can stop safely and accurately under various working conditions.
[0081] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the vehicle window position recognition method of this application. Step S30 of the vehicle window position recognition method includes steps S31 to S32:
[0082] Step S31: Determine the target window movement distance based on the operating status and the initial ripple cycle number;
[0083] It should be noted that the target window movement distance refers to the actual distance the window moves from its initial position to its current target position. This is the displacement achieved by the window under the drive of the motor, and it is usually used to adjust the accurate position of the window and ensure the normal operation of the window function.
[0084] Understandably, based on the operating status of the window motor and the initial ripple cycle count, the system can calculate the target window's movement distance. First, the operating status (such as continuous drive, inertial movement, deceleration, etc.) affects the window's movement mode and speed, therefore the system needs to adjust the calculation method according to different statuses. Next, the initial ripple cycle count provides reference data for the motor in the initial stage, which helps determine the window's position reference at the start of operation. Combining these two factors, the system calculates the actual distance the window travels from its initial position to the target position based on the motor's actual operating conditions (e.g., acceleration, deceleration, or inertial movement) and the initial ripple cycle data. This calculation ensures the window stops at a precise position, thus achieving reliable window control and operation.
[0085] As an example, the current signal includes a current ripple signal. The step of determining the target window movement distance based on the operating state and the initial ripple cycle count includes: when the operating state is a continuous drive state, acquiring the ripple cycle value and determining the first window movement distance based on the initial ripple cycle count; when the operating state is an inertial operation state, performing timed counting based on the ripple cycle value to determine the second window movement distance; when the operating state is a stopped state, stopping the timed counting, counting the current ripple signal, and determining the third window movement distance; and obtaining the target window movement distance based on the first window movement distance, the second window movement distance, and the third window movement distance.
[0086] The ripple period value refers to the duration of a complete cycle of the current ripple signal, determined by analyzing the current ripple signal of the motor under specific operating conditions. The ripple period value reflects the periodic fluctuation characteristics of the motor under continuous drive, providing benchmark data for calculating the window movement distance. The first window movement distance refers to the window displacement calculated based on the acquired ripple period value and the initial number of ripple periods when the motor is in continuous drive mode. In this state, the window movement distance is directly determined by the normal operating state of the motor and the changes in the ripple signal. Timed counting refers to calculating time intervals based on the ripple period value when the window motor is in an inertial operating state. This method determines the actual window displacement by calculating the window movement within a certain time interval, compensating for speed changes caused by motor inertia. The second window movement distance refers to the window displacement obtained through timed counting when the motor is in an inertial operating state. In this state, the motor is no longer actively driven, and the window movement depends on inertia; therefore, the movement distance needs to be calculated based on the ripple period value. The third window's movement distance refers to the window's displacement obtained by counting the current ripple signal after the motor has stopped and the timing count has ceased. When the motor stops, the window's position count directly relies on the accumulated value of the ripple signal, ensuring accurate measurement of the window's position. The target window's movement distance refers to the actual distance the window moves from its initial position to its target position. It is the final displacement obtained by comprehensively calculating the movement distances of the first, second, and third windows. This calculation ensures that the window accurately reaches the predetermined position during actual operation, supporting precise control and safe operation.
[0087] First, when the window motor is continuously driven, the system acquires the ripple period value of the current ripple signal and calculates the first window movement distance based on the initial ripple period count. This value reflects the window displacement during normal motor operation. Second, when the motor is in an inertial running state, the system performs timed counting based on the acquired ripple period value to calculate the second window movement distance. This step compensates for changes in window speed caused by inertia. Finally, when the motor stops, the system stops timed counting and instead counts the current ripple signal to determine the third window movement distance. This value represents the window displacement after the motor stops. Combining the window movement distances in these three states, the system calculates the target window movement distance, which is the actual total displacement of the window from the initial position to the target position, ensuring that the window accurately reaches the predetermined position.
[0088] As an example, the inertial operation state includes an initial inertial operation state and a deceleration inertial operation state. The step of determining the movement distance of the second window by performing timed counting based on the ripple period value when the operation state is in the inertial operation state includes: when the operation state is the initial inertial operation state, performing timed counting based on the ripple period value to determine the movement distance of the fourth window; when the operation state is the deceleration inertial operation state, performing timed counting based on the ripple period value, a preset upward adjustment coefficient, and a preset downward adjustment coefficient to obtain the movement distance of the fifth window; and obtaining the movement distance of the second window based on the movement distance of the fourth window and the movement distance of the fifth window.
[0089] The fourth window movement distance refers to the window displacement calculated by timing the count based on the ripple period value of the current ripple signal when the window motor is in the initial inertial operation phase. In this state, the window motor has stopped actively driving, but it is still slowly rotating due to inertia. The fourth window movement distance reflects the window displacement during this initial inertial phase. The preset rise adjustment coefficient is a coefficient used to adjust the calculated window movement distance when the window motor is rising in inertial operation. It compensates for possible displacement changes due to inertia during the rising process. For example, if the inertial effect is strong during rising, the coefficient may be greater than 1, such as 1.5, to increase the calculated displacement. The preset fall adjustment coefficient is a coefficient used to adjust the calculated window movement distance when the window motor is falling in inertial operation. It compensates for displacement changes due to inertia during the falling process. Since the inertial effect is usually strong during falling, the preset fall adjustment coefficient may be greater than 1, such as 1.2, to more accurately calculate the displacement. The fifth window's movement distance refers to the window's displacement calculated based on the ripple period value and preset rise and fall adjustment coefficients during the window motor's deceleration inertial operation. In this stage, the motor's speed gradually decreases, and the inertial effect significantly impacts the actual movement distance of the window. Therefore, the calculation result is corrected using adjustment coefficients to obtain a more accurate displacement. The second window's movement distance is determined by combining the fourth and fifth window movement distances, representing the window's actual movement distance throughout the entire inertial operation. This step combines the displacement from the initial inertia and deceleration inertia stages to ensure accurate calculation of the window's total displacement during inertial operation.
[0090] The handling of the window's inertial operation involves two sub-states: the initial inertial operation state and the deceleration inertial operation state. When the window motor is in the inertial operation state, the system first performs timing counts based on the ripple period value of the current ripple signal to determine the fourth window's movement distance. This distance reflects the window's displacement in the initial inertial operation state. Next, in the deceleration inertial operation state, the system still performs timing counts based on the ripple period value, but this time it incorporates preset rise and fall adjustment coefficients to calculate the fifth window's movement distance. These coefficients are used to correct displacement errors caused by inertial effects. Finally, the second window's movement distance is obtained by combining the fourth and fifth window movement distances; it represents the window's actual total displacement throughout the entire inertial operation state. This process ensures accurate calculation and adjustment of the window position during the window motor's inertial operation.
[0091] As an example, the step of performing the timing count based on the ripple period value, the preset rise adjustment coefficient, and the preset fall adjustment coefficient to obtain the movement distance of the fifth window includes: obtaining the rise period value and the fall period value based on the ripple period value, the preset rise adjustment coefficient, and the preset fall adjustment coefficient; when the window is raised, performing the timing count based on the rise period value to obtain the window rise distance; when the window is lowered, performing the timing count based on the fall period value to obtain the window fall distance; and obtaining the movement distance of the fifth window based on the window rise distance and the window fall distance.
[0092] The rising cycle value refers to the period length of the current ripple signal during the window's upward movement. It is calculated based on the ripple cycle value and a preset rising adjustment coefficient, reflecting the current ripple cycle of the window in the rising state. This value is used to adjust the timing count for more accurate calculation of the window's upward displacement. The falling cycle value refers to the period length of the current ripple signal during the window's downward movement. It is calculated based on the ripple cycle value and a preset falling adjustment coefficient, reflecting the current ripple cycle of the window in the falling state. This value is used to adjust the timing count for more accurate calculation of the window's downward displacement. The window rising distance refers to the amount of window displacement calculated by timing the rising cycle value during the window's upward movement. It represents the actual distance the window moves in the rising state, determined by counting the rising cycle value. The window falling distance refers to the amount of window displacement calculated by timing the falling cycle value during the window's downward movement. It represents the actual distance the window moves in the falling state, determined by counting the falling cycle value.
[0093] First, the rising period value is calculated by combining the ripple period value and a preset rising adjustment coefficient. Then, the falling period value is calculated using the ripple period value and a preset falling adjustment coefficient. Next, when the window is in the rising state, the system uses the rising period value for timed counting to determine the window's rising distance, i.e., the actual distance the window moves during the rising process. When the window is in the falling state, the system uses the falling period value for timed counting to determine the window's falling distance, i.e., the actual distance the window moves during the falling process. Finally, by combining the rising and falling distances, the fifth window movement distance is obtained, representing the total actual displacement of the window throughout its inertial operation, ensuring accurate displacement calculations for the window in different states.
[0094] Step S32: Identify the current window position based on the target window's moving distance and the initial window position.
[0095] It should be noted that the current window position refers to the actual position of the window after it has moved a certain distance from its initial position to the target window position during actual operation. Specifically, it is calculated by combining the target window's movement distance with the initial window position. The target window's movement distance is the actual displacement of the window from its initial position to the target position; combined with the initial window position, the accurate position of the window during actual operation can be determined.
[0096] Understandably, the system first uses the initial window position as the starting point, which is typically the window's actual physical position recorded at the start of operation. Then, based on the target window movement distance—the actual distance the window travels from the initial position to the target position—the system calculates the window's displacement during the actual operation. By adding or subtracting the initial window position from the target window movement distance (depending on the window's direction of movement), the system can accurately identify the current window position—its latest actual position after traveling the specified distance. This calculation ensures the window stays in the correct position, enabling precise control and safe operation.
[0097] This embodiment determines the target window movement distance based on the operating state and the initial ripple cycle count; it then identifies the current window position based on the target window movement distance and the initial window position. Based on the window motor's operating state and the initial ripple cycle count, the system first calculates the target window movement distance. This process adjusts the calculation method according to different operating states (e.g., continuous drive, inertial operation, and stop). For example, in continuous drive mode, the ripple cycle value is used directly, while in inertial operation mode, adjustments need to be made considering inertial effects. Through this step, the system can accurately determine the distance the window should move, thereby improving the accuracy and reliability of position calculation. Subsequently, the system combines the initial window position—the window's actual position at the start of operation—with the calculated target window movement distance to accurately identify the current window position. This process, by combining the target movement distance with the initial position, ensures the accurate position of the window during actual operation, thereby optimizing window control and improving the accuracy of window function and the overall reliability of the system.
[0098] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the window position recognition method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0099] This application also provides a vehicle window position recognition device, please refer to... Figure 5 The vehicle window position recognition device includes:
[0100] The data acquisition module 10 is used to acquire the initial window position and to acquire the current signal of the window motor through the current sampling resistor;
[0101] The signal processing module 20 is used to filter and count the cycles of the current signal to obtain the initial ripple cycle number and the operating status of the window motor.
[0102] The position recognition module 30 is used to identify the current window position based on the initial window position, the initial ripple cycle number, and the operating status.
[0103] In one embodiment, the position recognition module 30 is further configured to determine the target window movement distance based on the operating state and the initial ripple cycle number; and to identify the current window position based on the target window movement distance and the initial window position.
[0104] In one embodiment, the position recognition module 30 is further configured to: acquire a ripple period value and determine a first window movement distance based on the initial ripple period count when the operating state is a continuous drive state; perform timed counting based on the ripple period value to determine a second window movement distance when the operating state is an inertial operation state; stop the timed counting and count the current ripple signal to determine a third window movement distance when the operating state is a stopped state; and obtain the target window movement distance based on the first window movement distance, the second window movement distance, and the third window movement distance.
[0105] In one embodiment, the position recognition module 30 is further configured to: determine the moving distance of the fourth window by performing timed counting based on the ripple period value when the operating state is the initial state of inertial operation; obtain the moving distance of the fifth window by performing timed counting based on the ripple period value, a preset upward adjustment coefficient, and a preset downward adjustment coefficient when the operating state is the deceleration inertial operation state; and obtain the moving distance of the second window based on the moving distance of the fourth window and the moving distance of the fifth window.
[0106] In one embodiment, the position recognition module 30 is further configured to obtain an upward cycle value and a downward cycle value based on the ripple cycle value, a preset upward adjustment coefficient, and a preset downward adjustment coefficient; when the window is raised, the timed counting is performed based on the upward cycle value to obtain the window raising distance; when the window is lowered, the timed counting is performed based on the downward cycle value to obtain the window lowering distance; and the fifth window moving distance is obtained based on the window raising distance and the window lowering distance.
[0107] In one embodiment, the signal processing module 20 is further configured to filter the current signal to extract the current ripple signal and the current voltage signal; count the cycles of the current ripple signal to obtain the initial number of ripple cycles; and obtain the operating status of the window motor based on the magnitude of the current voltage in the current voltage signal.
[0108] In one embodiment, the signal processing module 20 is further configured to: determine that the operating state of the window motor is a continuous drive state when the current voltage is greater than a preset positive current threshold; determine that the operating state of the window motor is an initial inertial operation state when the current voltage is less than a first preset negative current threshold; determine that the operating state of the window motor is a deceleration inertial operation state when the current voltage is greater than the first preset negative current threshold and the current voltage is less than or equal to the second preset negative current threshold; and determine that the operating state of the window motor is a stopped state when the rotational speed of the window motor is less than a preset speed and the current voltage is greater than or equal to the second preset negative current threshold.
[0109] The window position recognition device provided in this application, employing the window position recognition method in the above embodiments, can solve the technical problem of how to accurately identify the position of a window. Compared with the prior art, the beneficial effects of the window position recognition device provided in this application are the same as those of the window position recognition method provided in the above embodiments, and other technical features in the window position recognition device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0110] This application provides a vehicle window position recognition device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the vehicle window position recognition method in the first embodiment described above.
[0111] The following is for reference. Figure 6 The diagram illustrates a structural schematic suitable for implementing a vehicle window position recognition device according to embodiments of this application. The vehicle window position recognition device in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The illustrated window position recognition device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0112] like Figure 6As shown, the window position recognition device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the window position recognition device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the window position recognition device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show window position recognition devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0113] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0114] The window position recognition device provided in this application, employing the window position recognition method in the above embodiments, can solve the technical problem of how to accurately identify the position of a window. Compared with the prior art, the beneficial effects of the window position recognition device provided in this application are the same as those of the window position recognition method provided in the above embodiments, and other technical features of this window position recognition device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0115] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0116] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0117] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the window position recognition method in the above embodiments.
[0118] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0119] The aforementioned computer-readable storage medium may be included in the window position recognition device; or it may exist independently and not be installed in the window position recognition device.
[0120] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the window position recognition device, the window position recognition device causes the following: to acquire an initial window position and to acquire a current signal of the window motor through the current sampling resistor; to filter and count the current signal to obtain an initial ripple cycle count and the operating state of the window motor; and to identify the current window position based on the initial window position, the initial ripple cycle count, and the operating state.
[0121] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0123] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0124] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described window position recognition method, thereby solving the technical problem of how to accurately identify the window position. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the window position recognition method provided in the above embodiments, and will not be repeated here.
[0125] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the window position recognition method described above.
[0126] The computer program product provided in this application can solve the technical problem of how to accurately identify the position of a vehicle window. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the vehicle window position identification method provided in the above embodiments, and will not be repeated here.
[0127] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A vehicle window position recognition method characterized by, The method is applied to a vehicle window position recognition circuit, the vehicle window position recognition circuit comprising a relay and a current sampling resistor, the relay being connected with the current sampling resistor, the relay being used for controlling a vehicle window motor to reverse, the method comprising: acquiring an initial vehicle window position and collecting a current signal of the vehicle window motor through the current sampling resistor; filtering and period counting the current signal to obtain an initial ripple period number and an operation state of the vehicle window motor; recognizing a current vehicle window position according to the initial vehicle window position, the initial ripple period number and the operation state; wherein the step of recognizing the current vehicle window position according to the initial vehicle window position, the initial ripple period number and the operation state comprises: determining a target vehicle window moving distance according to the operation state and the initial ripple period number; recognizing the current vehicle window position according to the target vehicle window moving distance and the initial vehicle window position; wherein the current signal comprises a current ripple signal; the step of determining the target vehicle window moving distance according to the operation state and the initial ripple period number comprises: when the operation state is a continuous driving state, acquiring a ripple period value and determining a first vehicle window moving distance according to the initial ripple period number; when the operation state is an inertial operation state, performing timing counting according to the ripple period value to determine a second vehicle window moving distance; when the operation state is a stop state, stopping the timing counting, counting the current ripple signal to determine a third vehicle window moving distance; determining the target vehicle window moving distance according to the first vehicle window moving distance, the second vehicle window moving distance and the third vehicle window moving distance; wherein the inertial operation state comprises an initial inertial operation state and a deceleration inertial operation state, and the ripple period value is a time length of one complete period of the current ripple signal; the step of performing timing counting according to the ripple period value to determine the second vehicle window moving distance when the operation state is the inertial operation state comprises: when the operation state is the initial inertial operation state, performing timing counting according to the ripple period value to determine a fourth vehicle window moving distance; when the operation state is the deceleration inertial operation state, performing the timing counting according to the ripple period value, a preset rising adjustment coefficient and a preset falling adjustment coefficient to obtain a fifth vehicle window moving distance; determining the second vehicle window moving distance according to the fourth vehicle window moving distance and the fifth vehicle window moving distance.
2. The method of claim 1, wherein, the step of performing the timing counting according to the ripple period value, the preset rising adjustment coefficient and the preset falling adjustment coefficient to obtain the fifth vehicle window moving distance comprises: obtaining a rising period value and a falling period value according to the ripple period value, the preset rising adjustment coefficient and the preset falling adjustment coefficient; when the vehicle window is rising, performing the timing counting according to the rising period value to obtain a vehicle window rising distance; when the vehicle window is falling, performing the timing counting according to the falling period value to obtain a vehicle window falling distance; A fifth window moving distance is obtained according to the window lifting distance and the window lowering distance.
3. The method of claim 1, wherein, The step of filtering and cycle counting the current signal to obtain an initial ripple cycle number and an operating state of the window motor comprises: The current signal is filtered to extract a current ripple signal and a current voltage signal; The current ripple signal is cycle counted to obtain an initial ripple cycle number; The operating state of the window motor is obtained according to the magnitude of the current voltage in the current voltage signal.
4. The method of claim 3, wherein, The step of obtaining the operating state of the window motor according to the magnitude of the current voltage in the current voltage signal comprises: When the current voltage is greater than a preset positive current threshold, the operating state of the window motor is determined to be a continuous driving state; When the current voltage is less than a first preset negative current threshold, the operating state of the window motor is determined to be an initial inertia running state; When the current voltage is greater than the first preset negative current threshold and less than or equal to a second preset negative current threshold, the operating state of the window motor is determined to be a deceleration inertia running state; When the rotational speed of the window motor is less than a preset speed and the current voltage is greater than or equal to the second preset negative current threshold, the operating state of the window motor is determined to be a stop state.
5. A vehicle window position recognition apparatus characterized by comprising: The application is applied to a window position recognition circuit, which comprises a relay and a current sampling resistor, the relay is connected with the current sampling resistor, and the relay is used for controlling the reverse rotation of a window motor. The device comprises: a data acquisition module, which is used for acquiring an initial window position and collecting a current signal of the window motor through the current sampling resistor; a signal processing module, which is used for filtering and cycle counting the current signal to obtain an initial ripple cycle number and an operating state of the window motor; a position recognition module, which is used for recognizing a current window position according to the initial window position, the initial ripple cycle number and the operating state; The position recognition module is further used for determining a target window moving distance according to the operating state and the initial ripple cycle number, and recognizing the current window position according to the target window moving distance and the initial window position. The current signal comprises a current ripple signal. The position recognition module is further used for acquiring a ripple cycle value when the operating state is a continuous driving state, determining a first window moving distance according to the initial ripple cycle number, performing timing counting according to the ripple cycle value when the operating state is an inertia running state, determining a second window moving distance, stopping the timing counting, counting the current ripple signal when the operating state is a stop state, determining a third window moving distance, and obtaining a target window moving distance according to the first window moving distance, the second window moving distance and the third window moving distance. The inertia running state comprises an initial inertia running state and a deceleration inertia running state, and the ripple cycle value is the time length of one complete cycle of the current ripple signal. The position recognition module is further configured to: when the running state is the initial inertia running state, perform timing counting according to the ripple period value to determine a fourth window moving distance; when the running state is the deceleration inertia running state, perform the timing counting according to the ripple period value, a preset rising adjustment coefficient and a preset falling adjustment coefficient to obtain a fifth window moving distance; and obtain a second window moving distance according to the fourth window moving distance and the fifth window moving distance.
6. A vehicle window position recognition apparatus characterized by comprising: The device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the vehicle window position recognition method according to any one of claims 1 to 4.
7. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the vehicle window position recognition method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Power window apparatus for vehicle
JP2002364246A