Vehicle window control method and device, electronic equipment and storage medium
By controlling the movement of the windows with variable speed, the problems of smoothness and mechanical damage in traditional window control are solved, resulting in a more comfortable driving experience and a longer window life.
Patent Information
- Application Number
- CN202310487535.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-04-28
AI Technical Summary
Traditional window motion control results in an uneven, non-smooth operation of the window throughout its entire travel, generating significant noise and damaging the mechanical structure, failing to meet users' needs for comfort and mechanical lifespan.
By calculating the distance between the stationary position of the car window and the target position, the maximum target speed is determined, and a target output duty cycle array is generated based on this. The car window is controlled to perform variable speed movement, including acceleration, constant speed and deceleration stages. Closed-loop control is performed by combining Hall signal square wave and voltage monitoring, and a specific anti-pinch judgment algorithm is designed during the design stage.
It improves the smoothness of window movement, reduces the impact and noise of mechanical structures, extends the service life of windows, and enhances the comfort of drivers and passengers.
Smart Images

Figure CN116291114B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent automobiles, in particular to a vehicle window control method and device, an electronic device and a storage medium. BACKGROUND
[0002] With the continuous deepening of the development of the "new four modernizations" of the automobile industry, the degree of electrical control, intelligence and networking of automobiles is becoming higher and higher, and the service level for users is also becoming higher and higher. Therefore, the requirements of the driver and passenger for experience and comfort are also becoming higher and higher.
[0003] The vehicle window is an important part of the vehicle, which can meet the lighting, ventilation and field of view requirements of the driver and passenger in the vehicle. Most of the vehicle windows are electric windows. The traditional vehicle window motion control is controlled by a relay. The relay has only two states of on and off, and the output voltage is constant. Therefore, the speed of the vehicle window is constant in the motion state, and the motion process of the vehicle window opening or closing is not smooth, which has a large impact on the mechanical structure of the vehicle window, generates a large noise, and also causes a large damage to the mechanical structure of the vehicle window, thereby affecting the service life of the mechanical structure of the vehicle window. SUMMARY
[0004] In view of the above-mentioned shortcomings of the prior art, the present application provides a vehicle window control method and device, an electronic device and a storage medium to solve the technical problems that the vehicle window is not smooth in the full stroke uniform speed running, has a large impact on the mechanical structure of the vehicle window, and generates a large noise and damages the mechanical structure of the vehicle window.
[0005] The present application provides a vehicle window control method, which comprises: in response to a vehicle window control instruction, obtaining a stop position and a target position of a target vehicle window; determining a maximum target speed according to the stop position and the target position, and determining a target output duty cycle array based on the maximum target speed; controlling a driving mechanism corresponding to the target vehicle window according to the target output duty cycle array to drive the target vehicle window to move, and the movement process of the target vehicle window is a variable speed process.
[0006] In an embodiment of the present application, the distance between the stop position and the target position is calculated; if the distance is greater than or equal to a preset distance threshold, a preset speed threshold is taken as the maximum target speed; if the distance is less than the preset distance threshold, a ratio of the distance to the preset distance threshold is calculated as a distance ratio, and the maximum target speed is calculated according to the distance ratio and the preset speed threshold, so that the ratio of the maximum target speed to the preset speed threshold is equal to the distance ratio.
[0007] In an embodiment of the present application, the variable speed process comprises an acceleration phase, a constant speed phase and a deceleration phase; or, the variable speed process comprises an acceleration phase and a deceleration phase.
[0008] In an embodiment of the present application, a target speed control curve is generated based on the maximum target speed, the stop position, the target position, and a preset speed control curve, the target speed control curve including target speeds corresponding to different positions between the stop position and the target position; a target output duty ratio corresponding to each position is matched from a preset output duty ratio array to obtain the target output duty ratio array, the preset output duty ratio array including a plurality of preset output duty ratios, the preset output duty ratios having a corresponding relationship with the target speeds.
[0009] In an embodiment of the present application, a maximum distance of the target window is acquired, and the preset speed control curve is generated based on the maximum distance of the target window and the preset speed threshold, the preset speed control curve including an acceleration interval, a constant speed interval, and a deceleration interval, the acceleration of the acceleration interval and the acceleration of the deceleration interval both being variable; a plurality of target speeds are extracted from the preset speed control curve, and corresponding target driving voltages are calculated based on the target speeds to obtain a plurality of target driving voltages, the target speeds having a corresponding relationship with the target driving voltages; corresponding preset output duty ratios are calculated based on the target driving voltages to obtain a plurality of preset output duty ratios, the target driving voltages having a corresponding relationship with the preset output duty ratios; the corresponding relationship between the target speeds and the preset output duty ratios is configured, and the plurality of preset output duty ratios are determined as the preset output duty ratio array.
[0010] In an embodiment of the present application, a current position of the target window and a Hall signal square wave are acquired, the acquisition time of the Hall signal square wave being the same as the acquisition time of the current position; a current speed corresponding to the current position is calculated based on a pulse width value of the Hall signal square wave, the pulse width value of the Hall signal square wave having a corresponding relationship with the current speed; a target speed corresponding to the current position is determined from the speed target control curve based on the current position, and a difference between the current speed corresponding to the current position and the target speed corresponding to the current position is calculated; if the difference is outside a preset interval, the target output duty ratio array is modified based on the difference to control the driving mechanism according to the modified target output duty ratio array.
[0011] In an embodiment of the present application, a Hall signal square wave of the acceleration stage is acquired, and a number of times that a pulse width value of the Hall signal square wave of the acceleration stage is greater than a preset anti-pinch pulse width threshold value is counted as a first comparison number; an anti-pinch determination is performed based on the first comparison number, and if the first comparison number is greater than a preset number threshold value, an anti-pinch action is triggered, the anti-pinch action including driving the target window to stop moving or moving in reverse.
[0012] In an embodiment of the present application, the Hall signal square wave in the uniform speed stage is collected, and the current battery voltage is collected at the same time as the collection time of the Hall signal square wave; the voltage difference between the preset battery voltage threshold and the current battery voltage in the uniform speed stage is calculated, and the number of times that the pulse width value of the Hall signal square wave in the uniform speed stage is greater than the anti-pinch pulse width threshold is counted as a second comparison number; the anti-pinch determination is performed according to the voltage difference and the second comparison number, if the voltage difference is less than or equal to the preset voltage difference threshold, and the second comparison number is greater than the preset number threshold, the anti-pinch action is triggered, the anti-pinch pulse width threshold is obtained based on the pulse width value of the critical state Hall signal square wave collected before entering the uniform speed stage; or, the driving voltage or current in the uniform speed stage is collected, and the current battery voltage is collected at the same time as the collection time of the driving voltage or current; the voltage difference between the preset battery voltage threshold and the current battery voltage in the uniform speed stage is calculated, and the number of times that the driving voltage or current in the uniform speed stage is greater than the anti-pinch voltage or current threshold is counted as a third comparison number; the anti-pinch determination is performed according to the voltage difference and the third comparison number, if the voltage difference is less than or equal to the preset voltage difference threshold, and the third comparison number is greater than the preset number threshold, the anti-pinch action is triggered, the anti-pinch voltage or current threshold is obtained based on the critical state driving voltage or current collected before entering the uniform speed stage.
[0013] In an embodiment of the present application, the driving voltage or current in the deceleration stage is collected, and the number of times that the driving voltage or current in the deceleration stage is greater than the preset anti-pinch voltage or current threshold is counted as a fourth comparison number; the anti-pinch determination is performed according to the fourth comparison number, if the fourth comparison number is greater than the preset number threshold, the anti-pinch action is triggered.
[0014] In an embodiment of the present application, the preset anti-pinch pulse width threshold, the preset number threshold, and the preset anti-pinch voltage or current threshold change with the change of the current vehicle state information, the current vehicle state information is obtained based on collection, including at least one of the current battery voltage, the vehicle environment temperature, the vehicle mileage, and the vehicle speed.
[0015] In an embodiment of the present application, if the voltage difference is greater than the preset voltage difference threshold, the anti-pinch determination is closed until a new uniform speed stage is re-entered; a new anti-pinch pulse width threshold or a new anti-pinch voltage or current threshold is re-determined, the new anti-pinch pulse width threshold is determined based on the pulse width value of the critical state Hall signal square wave collected before entering the new uniform speed stage, and the new anti-pinch voltage or current threshold is determined based on the critical state driving voltage or current collected before entering the new uniform speed stage.
[0016] In an embodiment of the present application, the target window comprises at least one of a door side window and a roof sunroof.
[0017] In an embodiment of the present application, a window control device is also provided, comprising: an acquisition module configured to acquire a stay position and a target position of a target window in response to a window control instruction; a determination module configured to determine a maximum target speed according to the stay position and the target position, and determine a target output duty cycle array based on the maximum target speed; and a control module configured to control a driving mechanism corresponding to the target window according to the target output duty cycle array, so as to drive the target window to move, wherein the movement of the target window is a variable speed movement.
[0018] In an embodiment of the present application, an electronic device is also provided, comprising: one or more processors; and a storage device configured to store one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the window control method as described above.
[0019] In an embodiment of the present application, a computer readable storage medium is also provided, which stores a computer program, which, when executed by a processor of a computer, causes the computer to execute the window control method as described above.
[0020] The present application provides a window control method, device, electronic device and storage medium, which determines a maximum target speed according to a stay position and a target position of a target window, and determines a target output duty cycle array based on the maximum target speed, so as to drive the target window to move at a variable speed, thereby improving the smoothness of the movement of the window, reducing the impact on the mechanical structure of the window, reducing noise and damage to the mechanical structure of the window, improving the comfort of the driver and passenger, and prolonging the service life of the mechanical structure of the window.
[0021] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application. BRIEF DESCRIPTION OF DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application. It is apparent that the accompanying drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. In the drawings:
[0023] Figure 1 is a schematic diagram of an implementation environment of a window control method according to an exemplary embodiment of the present application;
[0024] Figure 2 is a flow chart of a vehicle window control method according to an exemplary embodiment of the present application;
[0025] Figure 3 is a schematic diagram of a preset speed control curve according to an exemplary embodiment of the present application;
[0026] Figure 4 is a schematic diagram of the variation of speed-Hall signal square wave-driving voltage or current according to an exemplary embodiment of the present application;
[0027] Figure 5 is a brief flow chart of a vehicle window control method with closed loop control according to another exemplary embodiment of the present application;
[0028] Figure 6 is a block diagram of a vehicle window control device according to an exemplary embodiment of the present application;
[0029] Figure 7 shows a structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0030] The implementation of the present application will be described hereinafter with reference to the drawings and preferred embodiments, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in the present specification. The present application can also be implemented or applied by means of other different specific embodiments, and the details in the present specification can be modified or changed in various ways based on different views and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, and are not intended to limit the protection scope of the present application.
[0031] It should be noted that the diagrams provided in the following embodiments only schematically illustrate the basic concept of the present application, and only the components related to the present application are shown in the diagrams, not the number, shape and size of the components when actually implemented. The shape, number and proportion of the components when actually implemented can be arbitrarily changed, and the layout pattern of the components can also be more complex.
[0032] It should be noted that in the present application, "first", "second", etc. are only for distinguishing similar objects, and are not intended to limit the order or sequence of the similar objects. The described "including", "having" and other variants represent the scope of the subject covered by the word in addition to the examples shown by the word, and are not exclusive.
[0033] It can be understood that various numbers, step numbers and the like described in the present application are distinguished for the convenience of description, and do not limit the scope of the present application. The size of the reference signs in the present application does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic.
[0034] In the following description, a large number of details are discussed in order to provide a more thorough explanation of the embodiments of the application, however, it will be apparent to those skilled in the art that the embodiments of the application can be implemented without these specific details, and in other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in the form of details, in order to avoid making the embodiments of the application difficult to understand.
[0035] It should be noted that the traditional window movement control is controlled by a relay, the relay has only two states of on and off, the output voltage is constant, so the window has only two states of movement and stop, and the speed is constant in the movement state, and the anti-pinch determination algorithm based on this also has only one. With the continuous improvement of user requirements for vehicle comfort and experience, it is required that the window be more flexible when starting and stopping during opening and closing, and the damage to the mechanical structure of the window is also required to be further reduced. The traditional window movement control technology cannot meet the above requirements.
[0036] Based on the above requirements, the embodiments of the present application respectively propose a window control method, a window control device, an electronic device, a computer readable storage medium and a computer program product, which will be described in detail below.
[0037] Please refer to Figure 1 , Figure 1 is a schematic diagram of an implementation environment of a window control method according to an example embodiment of the present application.
[0038] As Figure 1 shown, the implementation environment can include a sending end 101, an intelligent vehicle 102 and a computer device 103. Among them, the instruction sending end 101 can be at least one of a vehicle end, a cloud end, a mobile terminal and the like, the computer device 103 can be at least one of a microcomputer, an embedded computer, a neural network computer and the like, the computer device 103 can be configured in the intelligent vehicle 102, or can be an independent computer device, which is not limited here. The sending end 101 sends a window control instruction to the computer device 103, the computer device 103 receives and responds to the window control instruction, obtains the stop position and target position of the target window in the intelligent vehicle 102, to determine the target output duty cycle array, and then drive the target window of the intelligent vehicle 102 to perform variable speed movement.
[0039] Illustratively, in response to the window control instruction, the dwell position and the target position of the target window are obtained, the maximum target speed is determined according to the dwell position and the target position, and the target output duty cycle array is determined based on the maximum target speed. The driving mechanism corresponding to the target window is controlled according to the target output duty cycle array, so as to drive the target window to move, wherein the movement process of the target window is a variable speed process. It can be seen that the technical scheme of the embodiment of the present application can improve the smoothness of the window movement process, reduce the impact on the window mechanical structure, reduce the noise and damage to the window mechanical structure, improve the comfort of the driver and passenger, and prolong the service life of the window mechanical structure.
[0040] It should be noted that the window control method provided by the embodiment of the present application is generally executed by the computer device 103, and correspondingly, the window control device is generally arranged in the computer device 103.
[0041] Please refer to Figure 2 , Figure 2 is a flowchart of a window control method according to an example embodiment of the present application. The method can be applied to Figure 1 the implementation environment shown in the figure, and is specifically executed by the computer device 103 in the implementation environment. It should be understood that the method can also be applied to other example implementation environments, and is specifically executed by devices in other implementation environments, and the embodiment does not limit the implementation environment to which the method is applied.
[0042] As shown in Figure 2 , in an example embodiment, the window control method at least includes steps S210 to S230, which are described in detail as follows:
[0043] Step S210, in response to the window control instruction, the dwell position and the target position of the target window are obtained.
[0044] In an embodiment of the present application, the window refers to an electric window, including at least one of the windows installed around the vehicle body and the windows installed on the roof. The number of ripples of the ripple current of the driving mechanism corresponding to the window is different when the window is at different positions, and the position of the window corresponds to the number of ripples of the ripple current one by one. The number of ripples of the current ripple of the driving mechanism corresponding to the window can be recorded each time the window stops. After receiving the window control instruction, the dwell position of the target window can be calculated according to the recorded number of ripples of the current ripple of the driving mechanism corresponding to the target window. The position of the window when the window is completely opened and the position of the window when the window is completely closed are pre-set, for example, the position of the window when the window is completely opened is 0, and the position of the window when the window is completely closed is L max . The window control instruction includes a window opening instruction or a window closing instruction. When the window opening instruction is responded, the target position is L maxThe target position is 0 in response to a window closing instruction.
[0045] In addition, when the number of windows is multiple, a corresponding window identifier can also be pre-configured for each window, and the sending end 101 can generate a window control instruction based on the target window identifier, so as to determine the target window according to the target window identifier in the window control instruction, and the movement of one or more target windows can be controlled.
[0046] In an embodiment of the present application, the target window includes at least one of a door side window and a sunroof. In step S220, the maximum target speed is determined according to the stay position and the target position, and the target output duty cycle array is determined based on the maximum target speed.
[0047] In an embodiment of the present application, the maximum target speed that can be reached in the movement of the target window is predicted according to the stay position of the target window and the target position of the target window, the maximum target drive voltage is determined according to the maximum target speed, the speed and the drive voltage have a corresponding relationship, and the maximum target output duty cycle is determined according to the maximum target drive voltage. The duty cycle refers to the proportion of the conduction time of the PWM (Pulse Width Modulation) square wave in a pulse period relative to the total time, or in other words, the proportion of the high level in the entire period in a pulse period. The maximum target output duty cycle is taken as the upper limit, different target output duty cycles are adjusted according to the preset duty cycle change value, and then the target output duty cycle array is obtained. In other words, the target output duty cycle array includes the maximum target output duty cycle and target output duty cycles of different values smaller than the maximum target output duty cycle, and the change value between two adjacent target output duty cycles is equal to the preset duty cycle change value. For example, the preset duty cycle change value can be 10%, and other values can also be set according to actual needs.
[0048] In an embodiment of the present application, the maximum target speed is determined according to the stay position and the target position, including the following:
[0049] The distance between the stay position and the target position is calculated;
[0050] If the distance is greater than or equal to the preset distance threshold, the preset speed threshold is taken as the maximum target speed;
[0051] If the distance is less than the preset distance threshold, the ratio of the distance to the preset distance threshold is calculated as a distance ratio, and the maximum target speed is calculated according to the distance ratio and the preset speed threshold, so that the ratio of the maximum target speed to the preset speed threshold is equal to the distance ratio.
[0052] In this embodiment, the distance required for the target window to move from the stationary position to the target position is calculated based on the stationary position and the target position. This distance is then compared with a preset distance threshold, and the calculation method for the maximum target speed of the target window is determined based on the comparison result. The maximum speed of the drive mechanism is pre-acquired as V. MAX Then the maximum speed at which the target car window moves is also V. MAX This is used as a preset speed threshold to make the target car window's running speed increase from 0 to V. MAX A minimum distance of D1, i.e., a preset distance threshold, is required. If the distance between the stationary position and the target position is greater than or equal to the preset distance threshold, the preset speed threshold is used as the maximum target speed. If the distance between the stationary position and the target position is less than the preset distance threshold, the maximum target speed is calculated as follows:
[0053] V / V MAX =D TO / D1 (1)
[0054] Where V is the maximum target velocity, V MAX As a preset speed threshold, D TO D1 represents the distance between the stopping position and the target position, and is a preset distance threshold. For example, the preset distance threshold could be 2cm, and the preset speed threshold could be 0.2m / s. Other thresholds can be set for the preset distance and speed thresholds according to actual needs. In this case, although the target car window cannot reach the designed maximum speed V... MAX However, the target window movement will be smoother, resulting in a more comfortable user experience.
[0055] In one embodiment of this application, determining the target output duty cycle array based on the maximum target velocity includes the following:
[0056] A target speed control curve is generated based on the maximum target speed, the dwell position, the target position, and the preset speed control curve. The target speed control curve includes the target speed corresponding to different positions between the dwell position and the target position.
[0057] Based on the target speed corresponding to each position, the corresponding target output duty cycle is matched from the preset output duty cycle array to obtain the target output duty cycle array. The preset output duty cycle array includes multiple preset output duty cycles, and the preset output duty cycle has a corresponding relationship with the target speed.
[0058] In the embodiment, two positions corresponding to the maximum target speed in the preset speed control curve are found, two segments of the speed control curve corresponding to 0 to the maximum target speed and the maximum target speed to 0 are extracted, the two segments of the speed control curve are spliced, the starting position and the ending position of the spliced speed control curve correspond to the stay position and the target position respectively, a target speed control curve is obtained, the target speed control curve includes target speeds of different positions between the stay position and the target position. The target speeds corresponding to the different positions are matched with the plurality of preset output duty cycles in the preset output duty cycle array in the order of the positions, a target output duty cycle array is obtained, the target output duty cycle array includes a plurality of target output duty cycles, and the order of the target output duty cycles is consistent with the order of the positions.
[0059] In an embodiment of the present application, before responding to the window control instruction, the window control method comprises:
[0060] obtaining a maximum distance of the window, generating a preset speed control curve according to the maximum distance of the window and a preset speed threshold, the preset speed control curve including an acceleration interval, a constant speed interval and a deceleration interval, the acceleration of the acceleration interval and the acceleration of the deceleration interval are both variable;
[0061] extracting a plurality of target speeds from the preset speed control curve, and calculating corresponding target drive voltages according to the target speeds to obtain a plurality of target drive voltages, the target speed and the target drive voltage having a corresponding relationship;
[0062] calculating corresponding preset output duty cycles according to the target drive voltages to obtain a plurality of preset output duty cycles, the target drive voltage and the preset output duty cycle having a corresponding relationship;
[0063] configuring the corresponding relationship between the target speed and the preset output duty cycle, and determining the plurality of preset output duty cycles as a preset output duty cycle array.
[0064] In the embodiment, a distance between a fully opened position of the window and a fully closed position of the window is acquired as a maximum distance of the window, a speed control curve is designed based on the maximum distance of the window, and the speed control curve is divided into three intervals, namely, an acceleration interval, a constant speed interval and a deceleration interval in sequence. A target speed at each position in the acceleration interval is calculated by using a trigonometric function formula and a preset speed threshold, and a speed control curve of the acceleration interval is obtained, so that the acceleration of the acceleration interval presents a change trend of gradually increasing and then gradually decreasing. The preset speed threshold is taken as a target speed of the constant speed interval, and the speed control curve of the acceleration interval is mirrored to obtain a speed control curve of the deceleration interval, thereby obtaining a preset speed control curve. A plurality of target speeds are extracted from the preset speed control curve, a target driving voltage corresponding to each target speed is calculated according to a preset corresponding relationship between the speed and the voltage, and a preset output duty cycle corresponding to each target driving voltage is calculated according to a preset corresponding relationship between the voltage and the duty cycle, thereby obtaining a plurality of preset output duty cycles. A corresponding relationship between the target speed and the preset output duty cycle is configured, so that the target speed corresponding to each target driving voltage and the preset output duty cycle corresponding to the target driving voltage correspond to each other in one-to-one manner. The plurality of preset output duty cycles are taken as a preset output duty cycle array.
[0065] Please refer to Figure 3 , Figure 3 is a schematic diagram of a preset speed control curve shown in an example embodiment of the present application. As shown in Figure 3 , the horizontal direction represents distance change from 0 to the maximum distance of the window, and the vertical direction represents target speed change of the designed window movement. The preset speed control curve is a full stroke speed control curve. In the acceleration stage, the target speed V continuously increases, and the acceleration a gradually increases from 0 and then gradually decreases to 0. In the constant speed stage, the target speed V is the maximum target speed and remains unchanged, and the acceleration a is 0. In the deceleration stage, the target speed V continuously decreases, and the absolute value of the acceleration a gradually increases from 0 and then gradually decreases to 0.
[0066] In another embodiment of the present application, the target output duty cycle array is determined based on the maximum target speed, and further includes the following steps.
[0067] A target speed control curve is generated based on the maximum target speed, the stay position and the target position, the target speed control curve including target speeds corresponding to different positions between the stay position and the target position. If the distance between the stay position and the target position is greater than a preset distance threshold, the target speed control curve includes an acceleration interval, a constant speed interval and a deceleration interval. If the distance between the stay position and the target position is less than or equal to the preset distance threshold, the target speed control curve includes an acceleration interval and a deceleration interval. The acceleration of the acceleration interval and the acceleration of the deceleration interval are both variable.
[0068] The target driving voltage corresponding to each position is calculated according to the target speed corresponding to each position, and the target speed and the target driving voltage have a corresponding relationship.
[0069] The target output duty cycle corresponding to each position is calculated according to the target driving voltage corresponding to each position, and a target output duty cycle array is obtained, and the target driving voltage and the target output duty cycle have a corresponding relationship.
[0070] The target speed control curve and the target output duty cycle array of the embodiment are obtained by real-time calculation, and the preset speed control curve and the preset output duty cycle array are calculated in advance in the foregoing embodiment, and the target speed control curve and the target output duty cycle array are obtained by corresponding matching after receiving the window control instruction. The embodiment and the foregoing embodiment can make the window run smoothly, but the foregoing embodiment is simpler and more convenient in actual application, and has stronger implementability. The calculation principles of the target speed control curve and the target output duty cycle array of the embodiment are the same as those of the preset speed control curve and the preset output duty cycle array in the foregoing embodiment, and will not be repeated here.
[0071] In step S230, the driving mechanism corresponding to the target window is controlled according to the target output duty cycle array to drive the target window to move, and the movement process of the target window is a variable speed process.
[0072] In an embodiment of the application, each window is configured with a corresponding driving mechanism for driving the window to move, and the window movement includes window opening or window closing. The driving mechanism can be a driving motor or other driving device. The driving mechanism corresponding to the target window is controlled according to the target output duty cycle array to drive the target window to move. Since the target output duty cycle array includes target output duty cycles with different values, a driving chip can be used to output a variable duty cycle PWM control driving motor voltage according to the target output duty cycle array through a MOS full-bridge circuit, to realize speed regulation and drive the target window to move at variable speed.
[0073] In an embodiment of the application, the variable speed process includes an acceleration phase, a constant speed phase and a deceleration phase.
[0074] Or,
[0075] The variable speed process includes an acceleration phase and a deceleration phase. In an embodiment of the present application, when the distance is greater than the preset distance threshold, the variable speed process of the predicted target window movement includes an acceleration phase, a constant speed phase and a deceleration phase in sequence. In the variable speed process of the target window movement, the target window starts from the rest position, accelerates from 0 to the maximum target speed, which is the acceleration phase, to reach the maximum target speed, then enters the constant speed phase, and finally decelerates from the maximum target speed to 0, which is the deceleration phase. When the speed is 0, the target position is reached.
[0076] In another embodiment of the present application, when the distance is less than or equal to the preset distance threshold, the variable speed process of the target window movement includes an acceleration phase and a deceleration phase in sequence. In the variable speed process of the target window movement, the target window starts from the rest position, accelerates from 0 to the maximum target speed, which is the acceleration phase, to reach the maximum target speed, then decelerates from the maximum target speed to 0, which is the deceleration phase. When the speed is 0, the target position is reached.
[0077] The acceleration and deceleration movements are used in the start and end phases of the window movement, which can effectively improve the smoothness of the start and end phases of the window movement and further reduce the impact on the mechanical structure of the window. In addition, the acceleration in the acceleration phase and the deceleration phase can be stable or variable. Illustratively, the acceleration can adopt a change of first small, then large, then small and finally 0. For example, in the acceleration phase, the drive motor completes the acceleration process of 0→slow acceleration→fast acceleration→slow acceleration→0, and finally runs at a constant speed with the maximum target speed, enters the constant speed phase, and after running at a constant speed for a distance, enters the deceleration phase. In the deceleration phase, the drive motor completes the deceleration process of 0→slow deceleration→fast deceleration→slow deceleration→0, and finally reaches the target position with a speed of 0, which can make the start and end phases of the window movement more smooth.
[0078] In the process of the target window movement, a closed-loop control can also be established by software to monitor the current speed of the target window. When the current speed does not meet the designed target speed control curve, the target output duty cycle is corrected to ensure the smoothness of the target window movement.
[0079] In an embodiment of the present application, in the process of the target window movement, the window control method includes:
[0080] The current position of the target window and the Hall signal square wave are collected. The collection time of the Hall signal square wave is the same as the collection time of the current position;
[0081] The current speed corresponding to the current position is calculated according to the pulse width value of the Hall signal square wave. The pulse width value of the Hall signal square wave has a corresponding relationship with the current speed;
[0082] determining a target speed corresponding to the current position from the target speed control curve, and calculating a difference between the current speed corresponding to the current position and the target speed corresponding to the current position;
[0083] If the difference exceeds a preset interval, the target output duty cycle array is corrected based on the difference, so as to control the driving mechanism according to the corrected target output duty cycle array.
[0084] In the embodiment, during the driving process, the software continuously monitors the Hall signal square wave returned by the sampling, reversely calculates the current speed, compares the current speed with the target speed, and corrects the target output duty cycle to be output in the target output duty cycle array according to the comparison result. The current position of the target window and the Hall signal square wave are collected in real time or periodically, and the collection time of the current position is the same as that of the Hall signal square wave, so as to ensure that the Hall signal square wave corresponds to the current position. The Hall signal square wave corresponding to the current position is filtered, and the proportional relationship (corresponding relationship) between the Hall signal square wave and the speed is pre-configured. The current speed corresponding to the current position is calculated according to the pulse width value of the filtered Hall signal square wave. The target speed corresponding to the current position is determined from the target speed control curve according to the current position, and the current speed corresponding to the current position is compared with the target speed corresponding to the current position. If the difference between the current speed and the target speed is within a preset interval, no correction is performed. If the difference between the current speed and the target speed is outside the preset interval, each target output duty cycle to be output is corrected according to the difference. If the difference is negative, each target output duty cycle to be output is increased according to a preset duty cycle change value. If the difference is positive, each target output duty cycle to be output is decreased according to a preset duty cycle change value. The corrected target output duty cycle array is obtained, so as to control the driving mechanism according to the corrected target output duty cycle array. The movement speed of the window is always within the error range (the preset interval) allowed by the ideal movement curve (the target speed control curve), so as to ensure the smooth movement of the window and better user experience. For example, the preset interval can be [-0.1 m / s, 0.1 m / s], or can be set to other intervals according to actual needs.
[0085] In another embodiment of the present application, during the driving process, the software continuously monitors the Hall signal square wave returned by the sampling, reversely calculates the current speed, calculates the current driving voltage corresponding to the current speed according to the corresponding relationship between the speed and the voltage, calculates the current duty cycle corresponding to the current driving voltage according to the corresponding relationship between the voltage and the duty cycle, and compares the current duty cycle with the target output duty cycle. The target output duty cycle to be output is corrected according to the comparison result, so as to realize the closed-loop control of the movement speed of the window. The specific correction process is described in detail in the above embodiment, which will not be described here.
[0086] During the movement of the target vehicle window, an anti-pinch detection mechanism must be activated to ensure the safety of the occupants and prevent damage to window components. Traditional anti-pinch detection methods, due to their constant speed, use the same algorithm model throughout the entire movement, whether Hall effect or ripple effect, relying on the trend of waveform pulse width changes for judgment. However, according to... Figure 3 As shown, throughout the entire travel of the window, the speed and speed change trend (acceleration) of the window movement are different, and correspondingly, the pulse width value of the Hall signal square wave and the driving voltage or current are also different, with each stage having its own characteristics. Please refer to Table 1, which is a table showing the change trend of electrical characteristic parameters under normal operating conditions according to an exemplary embodiment of this application. As shown in Table 1, during the acceleration stage, the driving voltage or current continuously increases, the speed continuously increases, the acceleration is initially small, then large, and then small again, and the pulse width of the Hall signal square wave continuously decreases; during the constant speed stage, the driving voltage or current remains unchanged, the speed remains unchanged, the acceleration is 0, and the pulse width of the Hall signal square wave remains unchanged; during the deceleration stage, the driving voltage or current continuously decreases, the speed continuously decreases, the absolute value of the acceleration is initially small, then large, and then small again, and the pulse width of the Hall signal square wave continuously increases.
[0087]
[0088] Table 1
[0089] Based on the characteristics of each electrical parameter shown in Table 1 at different stages, different anti-pinch judgment algorithms can be designed for the three stages. Please refer to [link / reference]. Figure 4 , Figure 4 This is a schematic diagram illustrating the change in speed-Hall signal square wave-drive voltage or current, as shown in an exemplary embodiment of this application. Figure 4 As shown, during the acceleration phase, the pulse width of the Hall signal square wave under normal operating conditions gradually narrows. If the pulse width of the Hall signal square wave widens, it is determined to be anti-pinch, i.e., the anti-pinch action is triggered. Since the driving voltage / current (driving voltage or current) under normal operating conditions increases during the acceleration phase, anti-pinch detection cannot be based on changes in driving voltage or current. During the constant speed phase, the pulse width of the Hall signal square wave under normal operating conditions remains constant. If the pulse width of the Hall signal square wave widens, it is determined to be anti-pinch. Furthermore, the driving voltage or current under normal operating conditions remains constant; if the driving voltage or current increases, it is determined to be anti-pinch. During the deceleration phase, because the pulse width of the Hall signal square wave under normal operating conditions gradually narrows, anti-pinch detection cannot be based on changes in the pulse width of the Hall signal square wave. The driving voltage or current under normal operating conditions gradually decreases; if the driving voltage or current increases, it is determined to be anti-pinch.
[0090] In one embodiment of this application, during the acceleration phase, the window control method includes:
[0091] Collect the Hall signal square wave in the acceleration stage, and count the number of times that the pulse width value of the Hall signal square wave in the acceleration stage is greater than a preset anti-pinch pulse width threshold value as a first comparison number;
[0092] Anti-pinch determination is performed according to the first comparison number, and if the first comparison number is greater than a preset number threshold value, an anti-pinch action is triggered, and the anti-pinch action includes driving the target window to stop moving or moving in reverse.
[0093] In the present embodiment, anti-pinch determination is started in the acceleration stage, and specifically, it can be determined that an obstacle is encountered by the fact that the pulse width value of the Hall signal square wave abnormally increases. In this stage, under normal working conditions, the driving motor gradually accelerates, and the pulse width of the Hall signal square wave continuously shortens until the end of the acceleration stage. Therefore, in theory, when the window encounters an obstacle, the speed will decrease, and the pulse width of the Hall signal square wave will increase, and the anti-pinch determination can be performed by this change. In actual application, filtering is required, and a preset anti-pinch pulse width threshold value and a preset number threshold value are required. When the pulse width value of the Hall signal square wave collected in real time or periodically is greater than the preset anti-pinch pulse width threshold value and continuously exceeds the preset number threshold value, it can be determined that an obstacle is encountered, and at this time, an anti-pinch action is triggered, and the anti-pinch action includes driving the target window to stop moving or moving in reverse. Exemplarily, the preset anti-pinch pulse width threshold value can be 8 milliseconds, and the preset number threshold value can be 15, or other values can be set according to actual needs.
[0094] If the first comparison number is less than or equal to the preset number threshold value, the anti-pinch action is not triggered.
[0095] In addition, the continuous time length of the pulse width value of the Hall signal square wave in the acceleration stage being greater than the preset anti-pinch pulse width threshold value can also be counted. If the continuous time length is greater than a preset time length threshold value, the anti-pinch action is triggered, and if the continuous time length is less than or equal to the preset time length threshold value, the anti-pinch action is not triggered. Exemplarily, the preset time length threshold value can be 1 second, or other values can be set according to actual needs.
[0096] In an embodiment of the present application, in the constant speed stage, the window control method comprises:
[0097] Collect the Hall signal square wave in the constant speed stage and the current battery voltage, and the collection time of the Hall signal square wave is the same as the collection time of the current battery voltage;
[0098] Calculate the voltage difference between the preset battery voltage threshold value and the current battery voltage in the constant speed stage, and count the number of times that the pulse width value of the Hall signal square wave in the constant speed stage is greater than the anti-pinch pulse width threshold value as a second comparison number;
[0099] The anti-pinch determination is performed according to the voltage difference and the second comparison number, if the voltage difference is less than or equal to a preset voltage difference threshold value, and the second comparison number is greater than a preset number threshold value, an anti-pinch action is triggered, and the anti-pinch pulse width threshold value is obtained based on a pulse width value of a critical state Hall signal square wave collected before entering the constant speed stage.
[0100] In the embodiment, when entering the constant speed stage, the critical state Hall signal square wave refers to a stable running Hall signal square wave collected at a critical moment of entering the constant speed stage from the acceleration stage or the deceleration stage, and the pulse width value of the Hall signal square wave is increased as the anti-pinch pulse width threshold value. In this stage, under normal working conditions, the driving motor operating speed remains unchanged, and the Hall signal square wave pulse width also remains unchanged until the end of the constant speed stage. When encountering an obstacle, the pulse width of the Hall signal square wave will be longer, and theoretically, the change can be used for determination. In actual application, due to unstable battery voltage, the pulse width value of the collected Hall signal square wave will also be larger, therefore, the anti-pinch determination can be combined according to the pulse width value change of the Hall signal square wave and the current battery voltage change. The Hall signal square wave and the current battery voltage are collected in real time or periodically in the constant speed stage, if the voltage difference between the current battery voltage collected at the same moment in the constant speed stage and the preset battery voltage threshold value is less than or equal to a preset voltage difference threshold value, and the pulse width value of the Hall signal square wave collected in the constant speed stage is greater than the anti-pinch pulse width threshold value for more than a preset number threshold value, it is determined that an obstacle is encountered, and the anti-pinch action is triggered. Exemplarily, the preset voltage difference threshold value can be 5V, or can be set to other values according to actual needs.
[0101] If the voltage difference is less than or equal to the preset voltage difference threshold value, and the second comparison number is less than or equal to the preset number threshold value, the anti-pinch action is not triggered.
[0102] In addition, the continuous time length of the pulse width value of the Hall signal square wave in the constant speed stage being greater than the anti-pinch pulse width threshold value can also be counted, if the voltage difference is less than or equal to the preset voltage difference threshold value, and the continuous time length is greater than a preset time length threshold value, the anti-pinch action is triggered, if the voltage difference is less than or equal to the preset voltage difference threshold value, and the continuous time length is less than or equal to the preset time length threshold value, the anti-pinch action is not triggered.
[0103] In another embodiment of the present application, in the constant speed stage, the vehicle window control method further comprises:
[0104] The driving voltage or current in the constant speed stage and the current battery voltage are collected, and the collection moment of the driving voltage or current is the same as the collection moment of the current battery voltage;
[0105] The voltage difference between the preset battery voltage threshold value and the current battery voltage in the constant speed stage is calculated, and the number of times that the driving voltage or current in the constant speed stage is greater than the anti-pinch voltage or current threshold value is counted as a third comparison number;
[0106] According to the voltage difference and the third comparison number, if the voltage difference is less than or equal to a preset voltage difference threshold value, and the third comparison number is greater than a preset number threshold value, a pinch protection action is triggered, and the pinch protection voltage or current threshold value is obtained based on the critical state driving voltage or current collected before entering the constant speed stage.
[0107] In the embodiment, in the constant speed stage, it can also be determined that an obstacle is encountered by means of an abnormal increase in the driving voltage or current. The critical state driving voltage or current refers to the stable output driving voltage or current collected at the critical moment of entering the constant speed stage from the acceleration stage or the deceleration stage, and the value of the driving voltage or current is increased as the pinch protection voltage or current threshold value. After the motor enters the constant speed stage, the driving voltage or current tends to be stable, and when an obstacle is encountered, the pulse width of the Hall signal square wave will become longer, and the driving voltage or current will also become larger. Therefore, the change in the driving voltage or current and the change in the current battery voltage can be combined for pinch protection determination. In the constant speed stage, the driving voltage or current and the current battery voltage are collected in real time or periodically, and when the voltage difference between the current battery voltage collected at the same moment in the constant speed stage and the preset battery voltage threshold value is less than or equal to a preset voltage difference threshold value, and the driving voltage or current collected in the constant speed stage is greater than the pinch protection voltage or current threshold value for more than a preset number threshold value, it is determined that an obstacle is encountered, and a pinch protection action is triggered at this time.
[0108] If the voltage difference is less than or equal to the preset voltage difference threshold value, and the third comparison number is less than or equal to the preset number threshold value, the pinch protection action is not triggered.
[0109] In addition, the continuous time length of the driving voltage or current greater than the pinch protection voltage or current threshold value in the constant speed stage can also be counted, and if the voltage difference is less than or equal to the preset voltage difference threshold value, and the continuous time length is greater than a preset time length threshold value, the pinch protection action is triggered, and if the voltage difference is less than or equal to the preset voltage difference threshold value, and the continuous time length is less than or equal to the preset time length threshold value, the pinch protection action is not triggered.
[0110] In an embodiment of the present application, in the deceleration stage, the vehicle window control method comprises:
[0111] The driving voltage or current in the deceleration stage is collected, and the number of times that the driving voltage or current in the deceleration stage is greater than a preset pinch protection voltage or current threshold value is counted as a fourth comparison number;
[0112] According to the fourth comparison number, if the fourth comparison number is greater than a preset number threshold, the anti-pinch action is triggered. In this embodiment, in the deceleration stage, the abnormal increase of the driving voltage or current can be used to determine that an obstacle is encountered. In the deceleration stage, since the driving motor operating speed continues to decrease, the pulse width of the Hall signal square wave continues to increase, and therefore the change of the pulse width of the Hall signal square wave cannot be used for anti-pinch determination. However, in the deceleration stage, the driving voltage or current of the normal working condition gradually decreases, and when an obstacle is encountered, the driving voltage or current will increase. Therefore, the anti-pinch determination can be performed according to the change of the driving voltage or current. A preset anti-pinch voltage or current threshold is provided, and when the real-time or periodic collected driving voltage or current is greater than the preset anti-pinch voltage or current threshold and continuously exceeds the preset number threshold, it is determined that an obstacle is encountered, and the anti-pinch action is triggered. For example, the preset anti-pinch voltage or current threshold can be 18V or 20A, and other values can also be set according to actual needs.
[0113] If the fourth comparison number is less than or equal to the preset number threshold, the anti-pinch action is not triggered.
[0114] In addition, the continuous time length of the driving voltage or current greater than the preset anti-pinch voltage or current threshold in the deceleration stage can also be counted, and if the continuous time length is greater than a preset time length threshold, the anti-pinch action is triggered, and if the continuous time length is less than or equal to the preset time length threshold, the anti-pinch action is not triggered.
[0115] In an embodiment of the present application, the preset anti-pinch pulse width threshold, the preset number threshold, and the preset anti-pinch voltage or current threshold change with the current vehicle state information, and the current vehicle state information is based on the collected information and includes at least one of the current battery voltage, the vehicle environmental temperature, the vehicle mileage, and the vehicle speed.
[0116] In this embodiment, the following compensation factors also need to be added in the anti-pinch determination process:
[0117] (1) The current battery voltage. The voltage of the battery is the basis of the driving force and the movement speed, and the current battery voltage is different, and the values of the anti-pinch determination parameters can be changed, that is, the preset anti-pinch pulse width threshold, the preset number threshold, and the preset anti-pinch voltage or current threshold are increased or decreased, but the determination process is the same. When the current battery voltage is high, the anti-pinch determination needs to be accelerated, for example, the preset number threshold or the preset time length threshold is reduced, to avoid excessive anti-pinch force caused by inertia. When the current battery voltage is low, in order to avoid anti-pinch misjudgment, the anti-pinch determination needs to be slowed down, for example, the preset number threshold or the preset time length threshold is increased.
[0118] (2) Vehicle ambient temperature. Vehicle ambient temperature mainly affects mechanical components. When the temperature is low, the structure is hard, and the anti-pinch determination needs to be accelerated, for example, the preset number threshold or the preset time threshold is reduced. When the temperature is high, the structure is soft, and the anti-pinch determination force needs to be smaller, for example, the preset anti-pinch pulse width threshold, the preset anti-pinch voltage or current threshold is reduced.
[0119] (3) Vehicle mileage. Mechanical structures will age, and motor electrical performance will decay. The anti-pinch determination parameters need to be compensated according to the aging degree of system components, that is, the anti-pinch determination is slowed down. Since the aging degree of system components cannot be directly obtained, the vehicle mileage can be equivalent to the aging degree of system components. The main goal of compensation here is to prevent false anti-pinch from occurring. For example: the longer the vehicle mileage, the higher the preset number threshold or the preset time threshold.
[0120] (4) Vehicle speed. Vehicle speed can reflect the current vehicle state, such as the amplitude of the jolt and the frequency of the vibration, which will affect the anti-pinch determination and need to be compensated. The main goal of compensation here is to prevent false anti-pinch from occurring. For example: the faster the vehicle speed, the greater the amplitude of the jolt and the frequency of the vibration. In order to prevent false anti-pinch, the preset anti-pinch pulse width threshold, the preset anti-pinch voltage or current threshold, or the preset number threshold or the preset time threshold can be adjusted.
[0121] In a specific embodiment of the present application, during the drive motor startup acceleration phase, the preset anti-pinch pulse width threshold and the preset number threshold calibrated under the condition of 12V and 25℃ are retrieved, and then compensated by the current battery voltage, vehicle ambient temperature, vehicle mileage, and vehicle speed, to obtain the compensated preset anti-pinch pulse width threshold and the compensated preset number threshold. If the pulse width value of the collected Hall signal square wave is less than the compensated preset anti-pinch pulse width threshold, no determination is made, and the anti-pinch action is not triggered. If the pulse width value of the collected Hall signal square wave is greater than or equal to the compensated preset anti-pinch pulse width threshold, and the number of consecutive times is greater than the compensated preset number threshold, it is determined that an obstacle is encountered, and the anti-pinch action is triggered.
[0122] In an embodiment of the present application, after calculating the voltage difference between the preset battery voltage threshold and the current battery voltage in the uniform speed phase, the vehicle window control method comprises:
[0123] If the voltage difference is greater than the preset voltage difference threshold, the anti-pinch determination is turned off until a new uniform speed phase is re-entered;
[0124] A new anti-pinch pulse width threshold or a new anti-pinch voltage or current threshold is re-determined. The new anti-pinch pulse width threshold is determined based on the pulse width value of the critical state Hall signal square wave collected before entering the new uniform speed phase, and the new anti-pinch voltage or current threshold is determined based on the drive voltage or current collected before entering the new uniform speed phase.
[0125] In the present embodiment, in the uniform speed stage, if the current battery voltage suddenly becomes high or low (filtering is required, filtering normal jitter, generally set to 0.5V), if the voltage difference between the current battery voltage and the preset battery voltage threshold is greater than the preset voltage difference threshold, the anti-pinch judgment must be temporarily closed until a new uniform speed stage is re-entered, and at the critical moment of entering the new uniform speed stage, any one of the Hall signal square wave (i.e. the critical state Hall signal square wave), driving voltage or current (i.e. the critical state driving voltage or current) at the time of stable operation is collected, the pulse width value of the Hall signal square wave is increased as a new anti-pinch pulse width threshold, or the value of the driving voltage or current is increased as a new anti-pinch voltage or current threshold. Recalculate the new anti-pinch pulse width threshold or the new anti-pinch voltage or current threshold to avoid excessive anti-pinch force or false anti-pinch.
[0126] The technical scheme of the present embodiment further improves the experience and comfort of the driver and passenger by segmenting the speed control during the window movement process and adapting the anti-pinch judgment algorithm, reduces the wear and tear of the mechanical structure, and improves the performance of the entire window system.
[0127] Please refer to Figure 5 , Figure 5 is a brief flowchart of a window control method with closed-loop control according to another exemplary embodiment of the present application. As shown in Figure 5 , the brief flowchart of the window control method with closed-loop control is as follows:
[0128] (1) Obtain the stop position and target position
[0129] In response to the control command (window control command), obtain the stop position and target position of the target window. Calculate the maximum target speed according to the stop position and the target position. Assume that the maximum speed of the driving motor is V MAX , i.e. the preset speed threshold, it needs to reach V MAX from V=0, at least D1 distance, i.e. the preset distance threshold, if the distance D TO between the stop position and the target position is D MAX 1, set V TO as the maximum target speed, if the distance D TO between the stop position and the target position is less than D TO 1, calculate the maximum target speed according to formula (1).
[0130] (2) Calculate the target speed
[0131] Generate a target speed control curve based on the maximum target speed, the stop position and the target position, wherein the target speed control curve includes the target speed corresponding to different positions between the stop position and the target position. In addition, when D TOD1, the target speed control curve includes an acceleration section, a constant speed section and a deceleration section, when D TO ≤D1, the target speed control curve includes an acceleration section and a deceleration section. The acceleration of the acceleration section and the acceleration of the deceleration section are both variable to drive the motor to control the window movement, complete the acceleration process of 0→slow acceleration→fast acceleration→slow acceleration, and finally run at a maximum target speed, and complete the deceleration process of 0→slow deceleration→fast deceleration→slow deceleration, and finally reach the target position with a speed of 0.
[0132] (3) Calculate the drive voltage (target drive voltage)
[0133] Based on the preset target speed-target drive voltage correspondence and the target speed corresponding to each position, the target drive voltage corresponding to each position is calculated.
[0134] (4) Calculate the duty cycle (target output duty cycle)
[0135] Based on the preset target drive voltage-target output duty cycle correspondence and the target drive voltage corresponding to each position, the target output duty cycle corresponding to each position is calculated to obtain the target output duty cycle array.
[0136] (5) Output voltage (drive voltage) to drive the motor
[0137] According to the target output duty cycle array, adjust the output voltage of the motor (drive motor) corresponding to the target window, so that the motor drives the window related hardware to control the window to move at variable speed. For example, in the acceleration stage, the drive motor completes the acceleration process of 0→slow acceleration→fast acceleration→slow acceleration, and finally runs at a maximum target speed.
[0138] (6) Hall signal square wave back sampling, calculate current speed
[0139] In each stage of the window movement process, the Hall signal square wave is back sampled and the current position is collected, and the current speed corresponding to the current position is calculated according to the pulse width value of the Hall signal square wave, the pulse width value of the Hall signal square wave and the pre-configured correspondence between the speed.
[0140] (7) Compare the current speed with the target speed and correct the duty cycle
[0141] The target speed corresponding to the current position is extracted from the target speed control curve, and the current speed of the current position is compared with the target speed of the current position. Whether the target output duty cycle array needs to be recalculated (corrected) is determined according to the comparison result. The specific determination rule and correction method are described in detail in the above embodiment, which will not be repeated here. If the correction is performed, the output voltage of the motor is adjusted according to the corrected target output duty cycle array. If the correction is not performed, the output voltage of the motor is adjusted according to the target output duty cycle array, so that the motor continues to drive the window hardware and control the window movement. Through closed-loop control of the target output duty cycle array, it can be ensured that the movement speed of the target window always falls within the error range allowed by the ideal movement curve, and the window movement process is smooth, and the user experience is better.
[0142] Please refer to Figure 6 , Figure 6 is a block diagram of a window control device according to an example embodiment of the present application. The device can be applied to Figure 1 the implementation environment shown in the figure, and is specifically configured in the computer device 103. The device can also be applied to other example implementation environments, and is specifically configured in other devices. The present embodiment does not limit the implementation environment to which the device is applied.
[0143] As shown in Figure 6 , the example window control device includes:
[0144] The acquisition module 610 is configured to acquire the target position and the stay position of the target window in response to the window control instruction. The determination module 620 is configured to determine the maximum target speed according to the target position and the stay position, and determine the target output duty cycle array based on the maximum target speed. The control module 630 is configured to control the driving mechanism corresponding to the target window according to the target output duty cycle array, so as to drive the target window to move. The movement process of the target window is a variable speed process.
[0145] It should be noted that the window control device provided by the above embodiment and the window control method provided by the above embodiment belong to the same concept. The specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, which will not be repeated here. The window control device provided by the above embodiment can be used in actual application. The above functions can be completed by different functional modules according to the needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions, and this is not limited herein.
[0146] Embodiments of the present application also provide an electronic device, comprising: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the vehicle window control method provided in each of the above embodiments.
[0147] Referring to Figure 7 , Figure 7 A structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present application is shown. It should be noted that Figure 7 The computer system 700 of the electronic device shown is only an example and should not impose any limitation on the functions and use range of embodiments of the present application.
[0148] As Figure 7 shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 702 or programs loaded from a storage portion 708 into a random access memory (RAM) 703, such as performing the methods described in the above embodiments. In the RAM 703, various programs and data required for system operation are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0149] The following components are connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output portion 707 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage portion 708 including a hard disk, and the like; and a communication portion 709 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as necessary. A removable recording medium 711 such as a magnetic disk, an optical disc, a magneto-optical disc, a semiconductor memory, and the like is attached to the drive 710 as necessary, so that a computer program read therefrom is installed in the storage portion 708 as necessary.
[0150] In particular, the processes described above with reference to the flow charts can be implemented as computer software programs in accordance with the embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising computer programs for executing the methods illustrated by the flow charts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, various functions defined in the system of the present application are executed.
[0151] It should be noted that the computer readable medium shown in the embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable signal medium can include a data signal propagated in a baseband or as a carrier wave in a propagated data signal, in which the computer readable computer program is carried. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium that can send, propagate or transfer the program for use by or in connection with the instruction execution system, apparatus or device. The computer program contained on the computer readable medium can be transmitted in any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination thereof.
[0152] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowcharts, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0153] The units described in the embodiments of the present application can be implemented by software, or by hardware, or by a combination of software and hardware. The units described may
[0154] Another aspect of the present application provides a computer readable storage medium, having stored thereon a computer program, which, when executed by a processor of a computer, causes the computer to perform the vehicle window control method as described above. The computer readable storage medium can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device.
[0155] Another aspect of the present application provides a computer program product or computer program, which comprises computer instructions. The computer instructions are stored in a computer readable storage medium. A processor of a computer reads the computer instructions from the computer readable storage medium, and executes the computer instructions, so that the computer performs the vehicle window control method provided in the above embodiments.
[0156] The above embodiments are only illustrative of the principles and effects of the present application, and are not intended to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas of the present application should be covered by the claims of the present application.
Claims
1. A vehicle window control method characterized by, The vehicle window control method comprises: in response to a vehicle window control instruction, obtaining a stay position and a target position of a target vehicle window; determining a maximum target speed according to the stay position and the target position, and determining a maximum target drive voltage based on the maximum target speed, determining a maximum target output duty cycle according to the maximum target drive voltage, taking the maximum target output duty cycle as the upper limit, adjusting different target output duty cycles according to a preset duty cycle change value to obtain a target output duty cycle array; controlling a drive mechanism corresponding to the target vehicle window according to the target output duty cycle array to drive the target vehicle window to move, monitoring the current speed of the target vehicle window in the process of moving the target vehicle window, and correcting the target output duty cycle when the current speed does not meet the target speed control curve by collecting the current position of the target vehicle window and the Hall signal square wave; the process of the target vehicle window moving is a variable speed process, and the variable speed process comprises a deceleration stage, wherein in the deceleration stage, the drive voltage or current of the deceleration stage is collected, and the number of times that the drive voltage or current of the deceleration stage is greater than a preset anti-pinch voltage or current threshold is counted as a fourth comparison number; anti-pinch determination is performed according to the fourth comparison number, and if the fourth comparison number is greater than a preset number threshold, an anti-pinch action is triggered.
2. The vehicle window control method according to claim 1, characterized by, determining a maximum target speed according to the stay position and the target position comprises: calculating the distance between the stay position and the target position; if the distance is greater than or equal to a preset distance threshold, taking a preset speed threshold as the maximum target speed; if the distance is less than the preset distance threshold, calculating the ratio of the distance to the preset distance threshold as a distance ratio, and calculating the maximum target speed according to the distance ratio and the preset speed threshold, so that the ratio of the maximum target speed to the preset speed threshold is equal to the distance ratio.
3. The vehicle window control method according to claim 2, characterized by, The variable speed process further comprises an acceleration stage and a constant speed stage. Or, the variable speed process further comprises an acceleration stage.
4. The vehicle window control method according to claim 3, characterized by, obtaining a target output duty cycle array comprises: generating a target speed control curve based on the maximum target speed, the stay position, the target position, and a preset speed control curve, the target speed control curve comprising target speeds corresponding to different positions between the stay position and the target position; matching corresponding target output duty cycles from a preset output duty cycle array according to the target speeds corresponding to each position to obtain the target output duty cycle array, the preset output duty cycle array comprising a plurality of preset output duty cycles, the preset output duty cycles having a corresponding relationship with the target speeds.
5. The vehicle window control method according to claim 4, characterized by, Before responding to the vehicle window control instruction, the vehicle window control method comprises: obtaining a maximum distance of the vehicle window, and generating the preset speed control curve according to the maximum distance of the vehicle window and the preset speed threshold, the preset speed control curve comprising an acceleration interval, a constant speed interval, and a deceleration interval, the acceleration of the acceleration interval and the acceleration of the deceleration interval both being variable; extract a plurality of target speeds from the preset speed control curve, and calculate a corresponding target driving voltage according to the target speed, to obtain a plurality of target driving voltages, the target speed and the target driving voltage having a corresponding relationship; calculate a corresponding preset output duty cycle according to the target driving voltage, to obtain a plurality of preset output duty cycles, the target driving voltage and the preset output duty cycle having a corresponding relationship; configure the corresponding relationship between the target speed and the preset output duty cycle, and determine the plurality of preset output duty cycles as the preset output duty cycle array.
6. The vehicle window control method according to claim 4, characterized by, In the process of the target window movement, the window control method comprises: collecting a current position of the target window and a Hall signal square wave, the collection time of the Hall signal square wave being the same as the collection time of the current position; calculating a current speed corresponding to the current position according to a pulse width value of the Hall signal square wave, the pulse width value of the Hall signal square wave and the current speed having a corresponding relationship; determining a target speed corresponding to the current position from the target speed control curve according to the current position, and calculating a difference between the current speed corresponding to the current position and the target speed corresponding to the current position; if the difference is outside a preset interval, modifying the target output duty cycle array based on the difference, to control the driving mechanism according to the modified target output duty cycle array.
7. The vehicle window control method according to claim 3, characterized by, In the acceleration stage, the window control method comprises: collecting a Hall signal square wave of the acceleration stage, and counting a number of times that a pulse width value of the Hall signal square wave of the acceleration stage is greater than a preset anti-pinch pulse width threshold value, as a first comparison number; performing anti-pinch determination according to the first comparison number, if the first comparison number is greater than a preset number threshold value, triggering an anti-pinch action, the anti-pinch action comprising driving the target window to stop movement or reverse movement.
8. The vehicle window control method according to claim 7, characterized by, In the constant speed stage, the window control method comprises one of the following: collecting a Hall signal square wave of the constant speed stage and a current battery voltage, the collection time of the Hall signal square wave being the same as the collection time of the current battery voltage; calculating a voltage difference between a preset battery voltage threshold value and the current battery voltage of the constant speed stage, and counting a number of times that a pulse width value of the Hall signal square wave of the constant speed stage is greater than an anti-pinch pulse width threshold value, as a second comparison number; performing anti-pinch determination according to the voltage difference and the second comparison number, if the voltage difference is less than or equal to a preset voltage difference threshold value, and the second comparison number is greater than the preset number threshold value, triggering the anti-pinch action, the anti-pinch pulse width threshold value being obtained based on a pulse width value of a critical state Hall signal square wave collected before entering the constant speed stage; or, collecting a driving voltage or current of the constant speed stage and a current battery voltage, the collection time of the driving voltage or current being the same as the collection time of the current battery voltage; calculating a voltage difference between a preset battery voltage threshold value and the current battery voltage of the constant speed stage, and counting a number of times that the driving voltage or current of the constant speed stage is greater than an anti-pinch voltage or current threshold value, as a third comparison number; The anti-pinch determination is performed according to the voltage difference and the third comparison number, if the voltage difference is less than or equal to a preset voltage difference threshold value, and the third comparison number is greater than a preset number threshold value, the anti-pinch action is triggered, and the anti-pinch voltage or current threshold value is obtained based on a critical state driving voltage or current collected before entering the constant speed stage.
9. The vehicle window control method according to claim 8, characterized by, The preset anti-pinch pulse width threshold value, the preset number threshold value, and the preset anti-pinch voltage or current threshold value change with current vehicle state information, and the current vehicle state information is obtained based on at least one of a current battery voltage, a vehicle ambient temperature, a vehicle mileage, and a vehicle speed.
10. The vehicle window control method according to claim 8, characterized by, After calculating a voltage difference between a preset battery voltage threshold value and a current battery voltage of the constant speed stage, the vehicle window control method comprises: If the voltage difference is greater than the preset voltage difference threshold value, the anti-pinch determination is closed until a new constant speed stage is re-entered; A new anti-pinch pulse width threshold value or a new anti-pinch voltage or current threshold value is re-determined, the new anti-pinch pulse width threshold value is determined based on a pulse width value of a critical state Hall signal square wave collected before entering the new constant speed stage, and the new anti-pinch voltage or current threshold value is determined based on a critical state driving voltage or current collected before entering the new constant speed stage.
11. The vehicle window control method according to any one of claims 1 to 10, characterized by, The target vehicle window comprises at least one of a door side window and a roof window.
12. A vehicle window control device characterized by comprising: The vehicle window control device comprises: An acquisition module is configured to acquire a stay position and a target position of a target vehicle window in response to a vehicle window control instruction; A determination module is configured to determine a maximum target speed according to the stay position and the target position, determine a maximum target driving voltage based on the maximum target speed, determine a maximum target output duty cycle according to the maximum target driving voltage, adjust different target output duty cycles according to a preset duty cycle change value, and obtain a target output duty cycle array; A control module is configured to control a driving mechanism corresponding to the target vehicle window according to the target output duty cycle array to drive the target vehicle window to move, monitor a current speed of the target vehicle window in the process of moving the target vehicle window, and correct the target output duty cycle according to a current position and a Hall signal square wave of the target vehicle window when the current speed does not meet a target speed control curve; the process of moving the target vehicle window is a variable speed process, and the variable speed process comprises a deceleration stage, wherein, in the deceleration stage, a driving voltage or current of the deceleration stage is collected, and a number of times that the driving voltage or current of the deceleration stage is greater than a preset anti-pinch voltage or current threshold value is counted as a fourth comparison number; the anti-pinch determination is performed according to the fourth comparison number, and if the fourth comparison number is greater than a preset number threshold value, the anti-pinch action is triggered.
13. An electronic device, comprising: The electronic device comprises: One or more processors; A storage device is configured to store one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the vehicle window control method according to any one of claims 1 to 11. The electronic device comprises: One or more processors; A storage device is configured to store one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the vehicle window control method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, a computer program is stored, which, when executed by a processor of a computer, causes the computer to perform the vehicle window control method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Electric skylight self-adaptive anti-pinch method based on speed detection
CN105730389A
Electric car window anti-pinch parameter learning method and car window anti-pinch control method
CN107489333A
Subway shielding door control system and method capable of eliminating driving force mutation
CN110185351A
Power-operated window for vehicle
CN1861971A
Controller for article to be driven
JP1994042257A